From 45996906011e1990a32b90b67bdb185726b84b77 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Fri, 27 Jun 2025 15:59:25 -0700 Subject: [PATCH] chore: smaller commits --- js/libs/effekseer.min.js | 114 + js/libs/effekseer.wasm | Bin 0 -> 1107728 bytes js/libs/localforage.min.js | 7 + js/libs/pako.min.js | 1 + js/libs/pixi.js | 45223 ++++++++++++++++++++++ js/libs/vorbisdecoder.js | 6 + js/main.js | 161 + js/plugins.js | 10 + js/plugins/AltMenuScreen.js | 105 + js/plugins/AltSaveScreen.js | 126 + js/plugins/BBS_VersionDisplay.js | 209 + js/plugins/ButtonPicture.js | 106 + js/plugins/HealOnLevelUp.js | 57 + js/plugins/TextPicture.js | 116 + js/plugins/VisuMZ_0_CoreEngine.js | 7873 ++++ js/plugins/VisuMZ_1_BattleCore.js | 17276 +++++++++ js/plugins/VisuMZ_2_BattleSystemSTB.js | 1746 + js/plugins/VisuMZ_2_QuestSystem.js | 2418 ++ js/plugins/VisuMZ_3_SideviewBattleUI.js | 1117 + js/rmmz_core.js | 6421 +++ js/rmmz_managers.js | 3116 ++ js/rmmz_objects.js | 11307 ++++++ js/rmmz_scenes.js | 3583 ++ js/rmmz_sprites.js | 3699 ++ js/rmmz_windows.js | 6630 ++++ 25 files changed, 111427 insertions(+) create mode 100644 js/libs/effekseer.min.js create mode 100644 js/libs/effekseer.wasm create mode 100644 js/libs/localforage.min.js create mode 100644 js/libs/pako.min.js create mode 100644 js/libs/pixi.js create mode 100644 js/libs/vorbisdecoder.js create mode 100644 js/main.js create mode 100644 js/plugins.js create mode 100644 js/plugins/AltMenuScreen.js create mode 100644 js/plugins/AltSaveScreen.js create mode 100644 js/plugins/BBS_VersionDisplay.js create mode 100644 js/plugins/ButtonPicture.js create mode 100644 js/plugins/HealOnLevelUp.js create mode 100644 js/plugins/TextPicture.js create mode 100644 js/plugins/VisuMZ_0_CoreEngine.js create mode 100644 js/plugins/VisuMZ_1_BattleCore.js create mode 100644 js/plugins/VisuMZ_2_BattleSystemSTB.js create mode 100644 js/plugins/VisuMZ_2_QuestSystem.js create mode 100644 js/plugins/VisuMZ_3_SideviewBattleUI.js create mode 100644 js/rmmz_core.js create mode 100644 js/rmmz_managers.js create mode 100644 js/rmmz_objects.js create mode 100644 js/rmmz_scenes.js create mode 100644 js/rmmz_sprites.js create mode 100644 js/rmmz_windows.js diff --git a/js/libs/effekseer.min.js b/js/libs/effekseer.min.js new file mode 100644 index 0000000..95366d1 --- /dev/null +++ b/js/libs/effekseer.min.js @@ -0,0 +1,114 @@ +/*! + * Effekseer for WebGL v1.61e + * https://github.com/effekseer/EffekseerForWebGL + * + * This software is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ +var effekseer_native = (function() { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; + return ( +function(effekseer_native) { + effekseer_native = effekseer_native || {}; + +var Module=typeof effekseer_native!=="undefined"?effekseer_native:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=function shell_read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);return nodeFS["readFileSync"](filename,binary?null:"utf8")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);quit_=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit==="function"){quit_=function(status){quit(status)}}if(typeof print!=="undefined"){if(typeof console==="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!=="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var STACK_ALIGN=16;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=Number(type.substr(1));assert(bits%8===0,"getNativeTypeSize invalid bits "+bits+", type "+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}function convertJsFunctionToWasm(func,sig){if(typeof WebAssembly.Function==="function"){var typeNames={"i":"i32","j":"i64","f":"f32","d":"f64"};var type={parameters:[],results:sig[0]=="v"?[]:[typeNames[sig[0]]]};for(var i=1;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var wasmMemory;var wasmTable=new WebAssembly.Table({"initial":1317,"maximum":1317+0,"element":"anyfunc"});var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string")return UTF8ToString(ret);if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function UTF16ToString(ptr){var endPtr=ptr;var idx=endPtr>>1;while(HEAP16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder){return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}else{var i=0;var str="";while(1){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)return str;++i;str+=String.fromCharCode(codeUnit)}}}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var WASM_PAGE_SIZE=65536;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var STACK_BASE=5573184,DYNAMIC_BASE=5573184,DYNAMICTOP_PTR=330144;var INITIAL_INITIAL_MEMORY=Module["INITIAL_MEMORY"]||33554432;if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_INITIAL_MEMORY/WASM_PAGE_SIZE,"maximum":2147483648/WASM_PAGE_SIZE})}if(wasmMemory){buffer=wasmMemory.buffer}INITIAL_INITIAL_MEMORY=buffer.byteLength;updateGlobalBufferAndViews(buffer);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what+="";out(what);err(what);ABORT=true;EXITSTATUS=1;what="abort("+what+"). Build with -s ASSERTIONS=1 for more info.";throw new WebAssembly.RuntimeError(what)}function hasPrefix(str,prefix){return String.prototype.startsWith?str.startsWith(prefix):str.indexOf(prefix)===0}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return hasPrefix(filename,dataURIPrefix)}var fileURIPrefix="file://";function isFileURI(filename){return hasPrefix(filename,fileURIPrefix)}var wasmBinaryFile="effekseer.core.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(){var info={"env":asmLibraryArg,"wasi_snapshot_preview1":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch==="function"){fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync();return{}}var tempDouble;var tempI64;var ASM_CONSTS={300736:function($0,$1){return Module._loadBinary(UTF16ToString($0),$1)!=null},300801:function($0,$1,$2,$3){var buffer=Module._loadBinary(UTF16ToString($0),$3);var memptr=_malloc(buffer.byteLength);HEAP8.set(new Uint8Array(buffer),memptr);setValue($1,memptr,"i32");setValue($2,buffer.byteLength,"i32")},301256:function($0){return Module._loadImage(UTF16ToString($0))!=null},301315:function($0,$1){var binding=GLctx.getParameter(GLctx.TEXTURE_BINDING_2D);var img=Module._loadImage(UTF16ToString($0));GLctx.bindTexture(GLctx.TEXTURE_2D,GL.textures[$1]);var pa=gl.getParameter(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL);GLctx.pixelStorei(GLctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL,false);GLctx.texImage2D(GLctx.TEXTURE_2D,0,GLctx.RGBA,GLctx.RGBA,GLctx.UNSIGNED_BYTE,img);if(Module._isPowerOfTwo(img)){GLctx.generateMipmap(GLctx.TEXTURE_2D)}GLctx.pixelStorei(GLctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL,pa);GLctx.bindTexture(GLctx.TEXTURE_2D,binding)}};function _emscripten_asm_const_iii(code,sigPtr,argbuf){var args=readAsmConstArgs(sigPtr,argbuf);return ASM_CONSTS[code].apply(null,args)}__ATINIT__.push({func:function(){___wasm_call_ctors()}});function demangle(func){return func}function demangleAll(text){var regex=/\b_Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function ___cxa_allocate_exception(size){return _malloc(size)}function _atexit(func,arg){__ATEXIT__.unshift({func:func,arg:arg})}function ___cxa_atexit(a0,a1){return _atexit(a0,a1)}var ___exception_infos={};var ___exception_last=0;function __ZSt18uncaught_exceptionv(){return __ZSt18uncaught_exceptionv.uncaught_exceptions>0}function ___cxa_throw(ptr,type,destructor){___exception_infos[ptr]={ptr:ptr,adjusted:[ptr],type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};___exception_last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exceptions=1}else{__ZSt18uncaught_exceptionv.uncaught_exceptions++}throw ptr}function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}function ___map_file(pathname,size){setErrNo(63);return-1}var PATH={splitPath:function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)}};var SYSCALLS={mappings:{},buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},get64:function(low,high){return low}};function ___sys_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;return 0}function ___sys_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;return 0}function syscallMunmap(addr,len){if((addr|0)===-1||len===0){return-28}var info=SYSCALLS.mappings[addr];if(!info)return 0;if(len===info.len){SYSCALLS.mappings[addr]=null;if(info.allocated){_free(info.malloc)}}return 0}function ___sys_munmap(addr,len){return syscallMunmap(addr,len)}function ___sys_open(path,flags,varargs){SYSCALLS.varargs=varargs}function _abort(){abort()}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof setImmediate==="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function(){var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else if(typeof dateNow!=="undefined"){_emscripten_get_now=dateNow}else _emscripten_get_now=function(){return performance.now()};function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){noExitRuntime=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=func;Browser.mainLoop.arg=arg;var browserIterationFunc;if(typeof arg!=="undefined"){browserIterationFunc=function(){Module["dynCall_vi"](func,arg)}}else{browserIterationFunc=function(){Module["dynCall_v"](func)}}var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}Browser.mainLoop.runIter(browserIterationFunc);if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"unwind"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!=="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);canvasContainer.requestFullscreen()},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame==="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeCallback:function(func){return function(){if(!ABORT)return func.apply(null,arguments)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){noExitRuntime=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){noExitRuntime=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}},timeout)},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h0?AL.freeIds.pop():AL._nextId++},freeIds:[],scheduleContextAudio:function(ctx){if(Browser.mainLoop.timingMode===1&&document["visibilityState"]!="visible"){return}for(var i in ctx.sources){AL.scheduleSourceAudio(ctx.sources[i])}},scheduleSourceAudio:function(src,lookahead){if(Browser.mainLoop.timingMode===1&&document["visibilityState"]!="visible"){return}if(src.state!==4114){return}var currentTime=AL.updateSourceTime(src);var startTime=src.bufStartTime;var startOffset=src.bufOffset;var bufCursor=src.bufsProcessed;for(var i=0;i=src.bufQueue.length){if(src.looping){bufCursor%=src.bufQueue.length}else{break}}var buf=src.bufQueue[bufCursor%src.bufQueue.length];if(buf.length===0){skipCount++;if(skipCount===src.bufQueue.length){break}}else{var audioSrc=src.context.audioCtx.createBufferSource();audioSrc.buffer=buf.audioBuf;audioSrc.playbackRate.value=src.playbackRate;if(buf.audioBuf._loopStart||buf.audioBuf._loopEnd){audioSrc.loopStart=buf.audioBuf._loopStart;audioSrc.loopEnd=buf.audioBuf._loopEnd}var duration=0;if(src.type===4136&&src.looping){duration=Number.POSITIVE_INFINITY;audioSrc.loop=true;if(buf.audioBuf._loopStart){audioSrc.loopStart=buf.audioBuf._loopStart}if(buf.audioBuf._loopEnd){audioSrc.loopEnd=buf.audioBuf._loopEnd}}else{duration=(buf.audioBuf.duration-startOffset)/src.playbackRate}audioSrc._startOffset=startOffset;audioSrc._duration=duration;audioSrc._skipCount=skipCount;skipCount=0;audioSrc.connect(src.gain);if(typeof audioSrc.start!=="undefined"){startTime=Math.max(startTime,src.context.audioCtx.currentTime);audioSrc.start(startTime,startOffset)}else if(typeof audioSrc.noteOn!=="undefined"){startTime=Math.max(startTime,src.context.audioCtx.currentTime);audioSrc.noteOn(startTime)}audioSrc._startTime=startTime;src.audioQueue.push(audioSrc);startTime+=duration}startOffset=0;bufCursor++}},updateSourceTime:function(src){var currentTime=src.context.audioCtx.currentTime;if(src.state!==4114){return currentTime}if(!isFinite(src.bufStartTime)){src.bufStartTime=currentTime-src.bufOffset/src.playbackRate;src.bufOffset=0}var nextStartTime=0;while(src.audioQueue.length){var audioSrc=src.audioQueue[0];src.bufsProcessed+=audioSrc._skipCount;nextStartTime=audioSrc._startTime+audioSrc._duration;if(currentTime=src.bufQueue.length&&!src.looping){AL.setSourceState(src,4116)}else if(src.type===4136&&src.looping){var buf=src.bufQueue[0];if(buf.length===0){src.bufOffset=0}else{var delta=(currentTime-src.bufStartTime)*src.playbackRate;var loopStart=buf.audioBuf._loopStart||0;var loopEnd=buf.audioBuf._loopEnd||buf.audioBuf.duration;if(loopEnd<=loopStart){loopEnd=buf.audioBuf.duration}if(delta0){src.bufStartTime+=Math.floor((currentTime-src.bufStartTime)/srcDuration)*srcDuration}}for(var i=0;i=src.bufQueue.length){if(src.looping){src.bufsProcessed%=src.bufQueue.length}else{AL.setSourceState(src,4116);break}}var buf=src.bufQueue[src.bufsProcessed];if(buf.length>0){nextStartTime=src.bufStartTime+buf.audioBuf.duration/src.playbackRate;if(currentTime1){src.audioQueue.length=1}},stopSourceAudio:function(src){for(var i=0;isrc.bufQueue[src.bufsProcessed].audioBuf.duration){offset-=src.bufQueue[src.bufsProcessed].audiobuf.duration;src.bufsProcessed++}src.bufOffset=offset}if(playing){AL.setSourceState(src,4114)}},getGlobalParam:function(funcname,param){if(!AL.currentCtx){return null}switch(param){case 49152:return AL.currentCtx.dopplerFactor;case 49155:return AL.currentCtx.speedOfSound;case 53248:return AL.currentCtx.distanceModel;default:AL.currentCtx.err=40962;return null}},setGlobalParam:function(funcname,param,value){if(!AL.currentCtx){return}switch(param){case 49152:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}AL.currentCtx.dopplerFactor=value;AL.updateListenerSpace(AL.currentCtx);break;case 49155:if(!Number.isFinite(value)||value<=0){AL.currentCtx.err=40963;return}AL.currentCtx.speedOfSound=value;AL.updateListenerSpace(AL.currentCtx);break;case 53248:switch(value){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:AL.currentCtx.distanceModel=value;AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}},getListenerParam:function(funcname,param){if(!AL.currentCtx){return null}switch(param){case 4100:return AL.currentCtx.listener.position;case 4102:return AL.currentCtx.listener.velocity;case 4111:return AL.currentCtx.listener.direction.concat(AL.currentCtx.listener.up);case 4106:return AL.currentCtx.gain.gain.value;default:AL.currentCtx.err=40962;return null}},setListenerParam:function(funcname,param,value){if(!AL.currentCtx){return}if(value===null){AL.currentCtx.err=40962;return}var listener=AL.currentCtx.listener;switch(param){case 4100:if(!Number.isFinite(value[0])||!Number.isFinite(value[1])||!Number.isFinite(value[2])){AL.currentCtx.err=40963;return}listener.position[0]=value[0];listener.position[1]=value[1];listener.position[2]=value[2];AL.updateListenerSpace(AL.currentCtx);break;case 4102:if(!Number.isFinite(value[0])||!Number.isFinite(value[1])||!Number.isFinite(value[2])){AL.currentCtx.err=40963;return}listener.velocity[0]=value[0];listener.velocity[1]=value[1];listener.velocity[2]=value[2];AL.updateListenerSpace(AL.currentCtx);break;case 4106:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}AL.currentCtx.gain.gain.value=value;break;case 4111:if(!Number.isFinite(value[0])||!Number.isFinite(value[1])||!Number.isFinite(value[2])||!Number.isFinite(value[3])||!Number.isFinite(value[4])||!Number.isFinite(value[5])){AL.currentCtx.err=40963;return}listener.direction[0]=value[0];listener.direction[1]=value[1];listener.direction[2]=value[2];listener.up[0]=value[3];listener.up[1]=value[4];listener.up[2]=value[5];AL.updateListenerSpace(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}},getBufferParam:function(funcname,bufferId,param){if(!AL.currentCtx){return}var buf=AL.buffers[bufferId];if(!buf||bufferId===0){AL.currentCtx.err=40961;return}switch(param){case 8193:return buf.frequency;case 8194:return buf.bytesPerSample*8;case 8195:return buf.channels;case 8196:return buf.length*buf.bytesPerSample*buf.channels;case 8213:if(buf.length===0){return[0,0]}else{return[(buf.audioBuf._loopStart||0)*buf.frequency,(buf.audioBuf._loopEnd||buf.length)*buf.frequency]}default:AL.currentCtx.err=40962;return null}},setBufferParam:function(funcname,bufferId,param,value){if(!AL.currentCtx){return}var buf=AL.buffers[bufferId];if(!buf||bufferId===0){AL.currentCtx.err=40961;return}if(value===null){AL.currentCtx.err=40962;return}switch(param){case 8196:if(value!==0){AL.currentCtx.err=40963;return}break;case 8213:if(value[0]<0||value[0]>buf.length||value[1]<0||value[1]>buf.Length||value[0]>=value[1]){AL.currentCtx.err=40963;return}if(buf.refCount>0){AL.currentCtx.err=40964;return}if(buf.audioBuf){buf.audioBuf._loopStart=value[0]/buf.frequency;buf.audioBuf._loopEnd=value[1]/buf.frequency}break;default:AL.currentCtx.err=40962;return}},getSourceParam:function(funcname,sourceId,param){if(!AL.currentCtx){return null}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return null}switch(param){case 514:return src.relative;case 4097:return src.coneInnerAngle;case 4098:return src.coneOuterAngle;case 4099:return src.pitch;case 4100:return src.position;case 4101:return src.direction;case 4102:return src.velocity;case 4103:return src.looping;case 4105:if(src.type===4136){return src.bufQueue[0].id}else{return 0}case 4106:return src.gain.gain.value;case 4109:return src.minGain;case 4110:return src.maxGain;case 4112:return src.state;case 4117:if(src.bufQueue.length===1&&src.bufQueue[0].id===0){return 0}else{return src.bufQueue.length}case 4118:if(src.bufQueue.length===1&&src.bufQueue[0].id===0||src.looping){return 0}else{return src.bufsProcessed}case 4128:return src.refDistance;case 4129:return src.rolloffFactor;case 4130:return src.coneOuterGain;case 4131:return src.maxDistance;case 4132:return AL.sourceTell(src);case 4133:var offset=AL.sourceTell(src);if(offset>0){offset*=src.bufQueue[0].frequency}return offset;case 4134:var offset=AL.sourceTell(src);if(offset>0){offset*=src.bufQueue[0].frequency*src.bufQueue[0].bytesPerSample}return offset;case 4135:return src.type;case 4628:return src.spatialize;case 8201:var length=0;var bytesPerFrame=0;for(var i=0;i0){var audioSrc=src.audioQueue[0];audioSrc.loop=true;audioSrc._duration=Number.POSITIVE_INFINITY}}else if(value===0){src.looping=false;var currentTime=AL.updateSourceTime(src);if(src.type===4136&&src.audioQueue.length>0){var audioSrc=src.audioQueue[0];audioSrc.loop=false;audioSrc._duration=src.bufQueue[0].audioBuf.duration/src.playbackRate;audioSrc._startTime=currentTime-src.bufOffset/src.playbackRate}}else{AL.currentCtx.err=40963;return}break;case 4105:if(src.state===4114||src.state===4115){AL.currentCtx.err=40964;return}if(value===0){for(var i in src.bufQueue){src.bufQueue[i].refCount--}src.bufQueue.length=1;src.bufQueue[0]=AL.buffers[0];src.bufsProcessed=0;src.type=4144}else{var buf=AL.buffers[value];if(!buf){AL.currentCtx.err=40963;return}for(var i in src.bufQueue){src.bufQueue[i].refCount--}src.bufQueue.length=0;buf.refCount++;src.bufQueue=[buf];src.bufsProcessed=0;src.type=4136}AL.initSourcePanner(src);AL.scheduleSourceAudio(src);break;case 4106:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.gain.gain.value=value;break;case 4109:if(!Number.isFinite(value)||value<0||value>Math.min(src.maxGain,1)){AL.currentCtx.err=40963;return}src.minGain=value;break;case 4110:if(!Number.isFinite(value)||value1){AL.currentCtx.err=40963;return}src.maxGain=value;break;case 4128:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.refDistance=value;if(src.panner){src.panner.refDistance=value}break;case 4129:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.rolloffFactor=value;if(src.panner){src.panner.rolloffFactor=value}break;case 4130:if(!Number.isFinite(value)||value<0||value>1){AL.currentCtx.err=40963;return}src.coneOuterGain=value;if(src.panner){src.panner.coneOuterGain=value}break;case 4131:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.maxDistance=value;if(src.panner){src.panner.maxDistance=value}break;case 4132:if(value<0||value>AL.sourceDuration(src)){AL.currentCtx.err=40963;return}AL.sourceSeek(src,value);break;case 4133:var srcLen=AL.sourceDuration(src);if(srcLen>0){var frequency;for(var bufId in src.bufQueue){if(bufId){frequency=src.bufQueue[bufId].frequency;break}}value/=frequency}if(value<0||value>srcLen){AL.currentCtx.err=40963;return}AL.sourceSeek(src,value);break;case 4134:var srcLen=AL.sourceDuration(src);if(srcLen>0){var bytesPerSec;for(var bufId in src.bufQueue){if(bufId){var buf=src.bufQueue[bufId];bytesPerSec=buf.frequency*buf.bytesPerSample*buf.channels;break}}value/=bytesPerSec}if(value<0||value>srcLen){AL.currentCtx.err=40963;return}AL.sourceSeek(src,value);break;case 4628:if(value!==0&&value!==1&&value!==2){AL.currentCtx.err=40963;return}src.spatialize=value;AL.initSourcePanner(src);break;case 8201:case 8202:case 8203:AL.currentCtx.err=40964;break;case 53248:switch(value){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:src.distanceModel=value;if(AL.currentCtx.sourceDistanceModel){AL.updateContextGlobal(AL.currentCtx)}break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}},captures:{},sharedCaptureAudioCtx:null,requireValidCaptureDevice:function(deviceId,funcname){if(deviceId===0){AL.alcErr=40961;return null}var c=AL.captures[deviceId];if(!c){AL.alcErr=40961;return null}var err=c.mediaStreamError;if(err){AL.alcErr=40961;return null}return c}};function _alBufferData(bufferId,format,pData,size,freq){if(!AL.currentCtx){return}var buf=AL.buffers[bufferId];if(!buf){AL.currentCtx.err=40963;return}if(freq<=0){AL.currentCtx.err=40963;return}var audioBuf=null;try{switch(format){case 4352:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(1,size,freq);var channel0=audioBuf.getChannelData(0);for(var i=0;i0){audioBuf=AL.currentCtx.audioCtx.createBuffer(1,size>>1,freq);var channel0=audioBuf.getChannelData(0);pData>>=1;for(var i=0;i>1;++i){channel0[i]=HEAP16[pData++]*30517578125e-15}}buf.bytesPerSample=2;buf.channels=1;buf.length=size>>1;break;case 4354:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(2,size>>1,freq);var channel0=audioBuf.getChannelData(0);var channel1=audioBuf.getChannelData(1);for(var i=0;i>1;++i){channel0[i]=HEAPU8[pData++]*.0078125-1;channel1[i]=HEAPU8[pData++]*.0078125-1}}buf.bytesPerSample=1;buf.channels=2;buf.length=size>>1;break;case 4355:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(2,size>>2,freq);var channel0=audioBuf.getChannelData(0);var channel1=audioBuf.getChannelData(1);pData>>=1;for(var i=0;i>2;++i){channel0[i]=HEAP16[pData++]*30517578125e-15;channel1[i]=HEAP16[pData++]*30517578125e-15}}buf.bytesPerSample=2;buf.channels=2;buf.length=size>>2;break;case 65552:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(1,size>>2,freq);var channel0=audioBuf.getChannelData(0);pData>>=2;for(var i=0;i>2;++i){channel0[i]=HEAPF32[pData++]}}buf.bytesPerSample=4;buf.channels=1;buf.length=size>>2;break;case 65553:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(2,size>>3,freq);var channel0=audioBuf.getChannelData(0);var channel1=audioBuf.getChannelData(1);pData>>=2;for(var i=0;i>3;++i){channel0[i]=HEAPF32[pData++];channel1[i]=HEAPF32[pData++]}}buf.bytesPerSample=4;buf.channels=2;buf.length=size>>3;break;default:AL.currentCtx.err=40963;return}buf.frequency=freq;buf.audioBuf=audioBuf}catch(e){AL.currentCtx.err=40963;return}}function _alDeleteBuffers(count,pBufferIds){if(!AL.currentCtx){return}for(var i=0;i>2];if(bufId===0){continue}if(!AL.buffers[bufId]){AL.currentCtx.err=40961;return}if(AL.buffers[bufId].refCount){AL.currentCtx.err=40964;return}}for(var i=0;i>2];if(bufId===0){continue}AL.deviceRefCounts[AL.buffers[bufId].deviceId]--;delete AL.buffers[bufId];AL.freeIds.push(bufId)}}function _alSourcei(sourceId,param,value){switch(param){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:AL.setSourceParam("alSourcei",sourceId,param,value);break;default:AL.setSourceParam("alSourcei",sourceId,param,null);break}}function _alDeleteSources(count,pSourceIds){if(!AL.currentCtx){return}for(var i=0;i>2];if(!AL.currentCtx.sources[srcId]){AL.currentCtx.err=40961;return}}for(var i=0;i>2];AL.setSourceState(AL.currentCtx.sources[srcId],4116);_alSourcei(srcId,4105,0);delete AL.currentCtx.sources[srcId];AL.freeIds.push(srcId)}}function _alGenBuffers(count,pBufferIds){if(!AL.currentCtx){return}for(var i=0;i>2]=buf.id}}function _alGenSources(count,pSourceIds){if(!AL.currentCtx){return}for(var i=0;i>2]=src.id}}function _alGetSourcei(sourceId,param,pValue){var val=AL.getSourceParam("alGetSourcei",sourceId,param);if(val===null){return}if(!pValue){AL.currentCtx.err=40963;return}switch(param){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[pValue>>2]=val;break;default:AL.currentCtx.err=40962;return}}function _alListenerfv(param,pValues){if(!AL.currentCtx){return}if(!pValues){AL.currentCtx.err=40963;return}switch(param){case 4100:case 4102:AL.paramArray[0]=HEAPF32[pValues>>2];AL.paramArray[1]=HEAPF32[pValues+4>>2];AL.paramArray[2]=HEAPF32[pValues+8>>2];AL.setListenerParam("alListenerfv",param,AL.paramArray);break;case 4111:AL.paramArray[0]=HEAPF32[pValues>>2];AL.paramArray[1]=HEAPF32[pValues+4>>2];AL.paramArray[2]=HEAPF32[pValues+8>>2];AL.paramArray[3]=HEAPF32[pValues+12>>2];AL.paramArray[4]=HEAPF32[pValues+16>>2];AL.paramArray[5]=HEAPF32[pValues+20>>2];AL.setListenerParam("alListenerfv",param,AL.paramArray);break;default:AL.setListenerParam("alListenerfv",param,null);break}}function _alSourcePause(sourceId){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}AL.setSourceState(src,4115)}function _alSourcePlay(sourceId){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}AL.setSourceState(src,4114)}function _alSourceStop(sourceId){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}AL.setSourceState(src,4116)}function _alSourcef(sourceId,param,value){switch(param){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:AL.setSourceParam("alSourcef",sourceId,param,value);break;default:AL.setSourceParam("alSourcef",sourceId,param,null);break}}function _alSourcefv(sourceId,param,pValues){if(!AL.currentCtx){return}if(!pValues){AL.currentCtx.err=40963;return}switch(param){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:var val=HEAPF32[pValues>>2];AL.setSourceParam("alSourcefv",sourceId,param,val);break;case 4100:case 4101:case 4102:AL.paramArray[0]=HEAPF32[pValues>>2];AL.paramArray[1]=HEAPF32[pValues+4>>2];AL.paramArray[2]=HEAPF32[pValues+8>>2];AL.setSourceParam("alSourcefv",sourceId,param,AL.paramArray);break;default:AL.setSourceParam("alSourcefv",sourceId,param,null);break}}function _alcCreateContext(deviceId,pAttrList){if(!(deviceId in AL.deviceRefCounts)){AL.alcErr=40961;return 0}var options=null;var attrs=[];var hrtf=null;pAttrList>>=2;if(pAttrList){var attr=0;var val=0;while(true){attr=HEAP32[pAttrList++];attrs.push(attr);if(attr===0){break}val=HEAP32[pAttrList++];attrs.push(val);switch(attr){case 4103:if(!options){options={}}options.sampleRate=val;break;case 4112:case 4113:break;case 6546:switch(val){case 0:hrtf=false;break;case 1:hrtf=true;break;case 2:break;default:AL.alcErr=40964;return 0}break;case 6550:if(val!==0){AL.alcErr=40964;return 0}break;default:AL.alcErr=40964;return 0}}}var AudioContext=window.AudioContext||window.webkitAudioContext;var ac=null;try{if(options){ac=new AudioContext(options)}else{ac=new AudioContext}}catch(e){if(e.name==="NotSupportedError"){AL.alcErr=40964}else{AL.alcErr=40961}return 0}if(typeof ac.createGain==="undefined"){ac.createGain=ac.createGainNode}var gain=ac.createGain();gain.connect(ac.destination);var ctx={deviceId:deviceId,id:AL.newId(),attrs:attrs,audioCtx:ac,listener:{position:[0,0,0],velocity:[0,0,0],direction:[0,0,0],up:[0,0,0]},sources:[],interval:setInterval(function(){AL.scheduleContextAudio(ctx)},AL.QUEUE_INTERVAL),gain:gain,distanceModel:53250,speedOfSound:343.3,dopplerFactor:1,sourceDistanceModel:false,hrtf:hrtf||false,_err:0,get err(){return this._err},set err(val){if(this._err===0||val===0){this._err=val}}};AL.deviceRefCounts[deviceId]++;AL.contexts[ctx.id]=ctx;if(hrtf!==null){for(var ctxId in AL.contexts){var c=AL.contexts[ctxId];if(c.deviceId===deviceId){c.hrtf=hrtf;AL.updateContextGlobal(c)}}}return ctx.id}function _alcMakeContextCurrent(contextId){if(contextId===0){AL.currentCtx=null;return 0}else{AL.currentCtx=AL.contexts[contextId];return 1}}function _alcOpenDevice(pDeviceName){if(pDeviceName){var name=UTF8ToString(pDeviceName);if(name!==AL.DEVICE_NAME){return 0}}if(typeof AudioContext!=="undefined"||typeof webkitAudioContext!=="undefined"){var deviceId=AL.newId();AL.deviceRefCounts[deviceId]=0;return deviceId}else{return 0}}var _emscripten_get_now_is_monotonic=true;function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if((clk_id===1||clk_id===4)&&_emscripten_get_now_is_monotonic){now=_emscripten_get_now()}else{setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}var EGL={errorCode:12288,defaultDisplayInitialized:false,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:false,depth:false,stencil:false,antialias:false},stringCache:{},setErrorCode:function(code){EGL.errorCode=code},chooseConfig:function(display,attribList,config,config_size,numConfigs){if(display!=62e3){EGL.setErrorCode(12296);return 0}if(attribList){for(;;){var param=HEAP32[attribList>>2];if(param==12321){var alphaSize=HEAP32[attribList+4>>2];EGL.contextAttributes.alpha=alphaSize>0}else if(param==12325){var depthSize=HEAP32[attribList+4>>2];EGL.contextAttributes.depth=depthSize>0}else if(param==12326){var stencilSize=HEAP32[attribList+4>>2];EGL.contextAttributes.stencil=stencilSize>0}else if(param==12337){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples>0}else if(param==12338){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples==1}else if(param==12544){var requestedPriority=HEAP32[attribList+4>>2];EGL.contextAttributes.lowLatency=requestedPriority!=12547}else if(param==12344){break}attribList+=8}}if((!config||!config_size)&&!numConfigs){EGL.setErrorCode(12300);return 0}if(numConfigs){HEAP32[numConfigs>>2]=1}if(config&&config_size>0){HEAP32[config>>2]=62002}EGL.setErrorCode(12288);return 1}};function _eglGetProcAddress(name_){return _emscripten_GetProcAddress(name_)}function _emscripten_get_sbrk_ptr(){return 330144}function __webgl_acquireInstancedArraysExtension(ctx){var ext=ctx.getExtension("ANGLE_instanced_arrays");if(ext){ctx["vertexAttribDivisor"]=function(index,divisor){ext["vertexAttribDivisorANGLE"](index,divisor)};ctx["drawArraysInstanced"]=function(mode,first,count,primcount){ext["drawArraysInstancedANGLE"](mode,first,count,primcount)};ctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){ext["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)}}}function __webgl_acquireVertexArrayObjectExtension(ctx){var ext=ctx.getExtension("OES_vertex_array_object");if(ext){ctx["createVertexArray"]=function(){return ext["createVertexArrayOES"]()};ctx["deleteVertexArray"]=function(vao){ext["deleteVertexArrayOES"](vao)};ctx["bindVertexArray"]=function(vao){ext["bindVertexArrayOES"](vao)};ctx["isVertexArray"]=function(vao){return ext["isVertexArrayOES"](vao)}}}function __webgl_acquireDrawBuffersExtension(ctx){var ext=ctx.getExtension("WEBGL_draw_buffers");if(ext){ctx["drawBuffers"]=function(n,bufs){ext["drawBuffersWEBGL"](n,bufs)}}}var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:[],currentContext:null,offscreenCanvases:{},timerQueriesEXT:[],programInfos:{},stringCache:{},unpackAlignment:4,init:function(){var miniTempFloatBuffer=new Float32Array(GL.MINI_TEMP_BUFFER_SIZE);for(var i=0;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){var ctx=canvas.getContext("webgl",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},registerContext:function(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;if(context.version<2){__webgl_acquireInstancedArraysExtension(GLctx);__webgl_acquireVertexArrayObjectExtension(GLctx);__webgl_acquireDrawBuffersExtension(GLctx)}GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query");var automaticallyEnabledExtensions=["OES_texture_float","OES_texture_half_float","OES_standard_derivatives","OES_vertex_array_object","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","OES_element_index_uint","EXT_texture_filter_anisotropic","EXT_frag_depth","WEBGL_draw_buffers","ANGLE_instanced_arrays","OES_texture_float_linear","OES_texture_half_float_linear","EXT_blend_minmax","EXT_shader_texture_lod","EXT_texture_norm16","WEBGL_compressed_texture_pvrtc","EXT_color_buffer_half_float","WEBGL_color_buffer_float","EXT_sRGB","WEBGL_compressed_texture_etc1","EXT_disjoint_timer_query","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_astc","EXT_color_buffer_float","WEBGL_compressed_texture_s3tc_srgb","EXT_disjoint_timer_query_webgl2","WEBKIT_WEBGL_compressed_texture_pvrtc"];var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(automaticallyEnabledExtensions.indexOf(ext)!=-1){GLctx.getExtension(ext)}})},populateUniformTable:function(program){var p=GL.programs[program];var ptable=GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1};var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,35718);for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _emscripten_glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.timerQueriesEXT[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.timerQueriesEXT[id]=null}}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteVertexArraysOES(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthFunc(x0){GLctx["depthFunc"](x0)}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDepthRangef(x0,x1){GLctx["depthRange"](x0,x1)}function _emscripten_glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _emscripten_glDrawArraysInstancedANGLE(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}var __tempFixedLengthArray=[];function _emscripten_glDrawBuffersWEBGL(n,bufs){var bufArray=__tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawElementsInstancedANGLE(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _emscripten_glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.timerQueriesEXT);query.name=id;GL.timerQueriesEXT[id]=query;HEAP32[ids+i*4>>2]=id}}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenVertexArraysOES(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _emscripten_glGetActiveAttrib(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveAttrib(program,index);if(!info)return;var numBytesWrittenExclNull=bufSize>0&&name?stringToUTF8(info.name,name,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull;if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetActiveUniform(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getActiveUniform(program,index);if(!info)return;var numBytesWrittenExclNull=bufSize>0&&name?stringToUTF8(info.name,name,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull;if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}}function _emscripten_glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Native code calling glGet"+type+"v("+name_+") and it returns "+result+" of type "+typeof result+"!");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _emscripten_glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,4)}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _emscripten_glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _emscripten_glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}function _emscripten_glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectui64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}function _emscripten_glGetQueryObjectuivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;var numBytesWrittenExclNull=bufSize>0&&source?stringToUTF8(result,source,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _emscripten_glGetTexParameterfv(target,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}function jstoi_q(str){return parseInt(str)}function _emscripten_glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?jstoi_q(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]=data;break;case 2:HEAPF32[params>>2]=data;break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break;default:throw"internal emscriptenWebGLGetUniform() error, bad type: "+type}}}}function _emscripten_glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,2)}function _emscripten_glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}function _emscripten_glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data&&data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break;case 5:HEAP32[params>>2]=Math.fround(data);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break;case 5:HEAP32[params+i*4>>2]=Math.fround(data[i]);break;default:throw"internal emscriptenWebGLGetVertexAttrib() error, bad type: "+type}}}}function _emscripten_glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,2)}function _emscripten_glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,5)}function _emscripten_glHint(x0,x1){GLctx["hint"](x0,x1)}function _emscripten_glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}function _emscripten_glIsEnabled(x0){return GLctx["isEnabled"](x0)}function _emscripten_glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}function _emscripten_glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}function _emscripten_glIsQueryEXT(id){var query=GL.timerQueriesEXT[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}function _emscripten_glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}function _emscripten_glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glIsVertexArrayOES(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.populateUniformTable(program)}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glPolygonOffset(x0,x1){GLctx["polygonOffset"](x0,x1)}function _emscripten_glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.timerQueriesEXT[id],target)}function __computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function __colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4};return colorChannels[format-6402]||1}function __heapObjectForWebGLType(type){type-=5120;if(type==1)return HEAPU8;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922)return HEAPU32;return HEAPU16}function __heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=__heapObjectForWebGLType(type);var shift=__heapAccessShiftForWebGLHeap(heap);var byteSize=1<>shift,pixels+bytes>>shift)}function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(GL.uniforms[location],v0)}function _emscripten_glUniform1fv(location,count,value){if(count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferFloatViews[count-1];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(GL.uniforms[location],view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}function _emscripten_glUniform1iv(location,count,value){if(count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferIntViews[count-1];for(var i=0;i>2]}}else{var view=HEAP32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1iv(GL.uniforms[location],view)}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(2*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferFloatViews[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(GL.uniforms[location],view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2iv(location,count,value){if(2*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferIntViews[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2iv(GL.uniforms[location],view)}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(3*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferFloatViews[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(GL.uniforms[location],view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){if(3*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferIntViews[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3iv(GL.uniforms[location],view)}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferFloatViews[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferIntViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(GL.uniforms[location],view)}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(4*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferFloatViews[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(9*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferFloatViews[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(16*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferFloatViews[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _emscripten_glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}function _emscripten_glVertexAttrib2f(x0,x1,x2){GLctx["vertexAttrib2f"](x0,x1,x2)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3f(x0,x1,x2,x3){GLctx["vertexAttrib3f"](x0,x1,x2,x3)}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisorANGLE(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function _emscripten_get_heap_size(){return HEAPU8.length}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){requestedSize=requestedSize>>>0;var oldSize=_emscripten_get_heap_size();var PAGE_MULTIPLE=65536;var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){return false}var minHeapSize=16777216;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(minHeapSize,requestedSize,overGrownHeapSize),PAGE_MULTIPLE));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function __getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":(typeof navigator==="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8","_":__getExecutableName()};for(var x in ENV){env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(x+"="+env[x])}getEnvStrings.strings=strings}return getEnvStrings.strings}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAP32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAP32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[penviron_buf_size>>2]=bufSize;return 0}function _fd_close(fd){return 0}function _fd_read(fd,iov,iovcnt,pnum){var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){}function _fd_write(fd,iov,iovcnt,pnum){var num=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j>2]=num;return 0}function _glActiveTexture(x0){GLctx["activeTexture"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindBuffer(target,buffer){GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBlendEquation(x0){GLctx["blendEquation"](x0)}function _glBlendEquationSeparate(x0,x1){GLctx["blendEquationSeparate"](x0,x1)}function _glBlendFuncSeparate(x0,x1,x2,x3){GLctx["blendFuncSeparate"](x0,x1,x2,x3)}function _glBufferData(target,size,data,usage){GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}function _glBufferSubData(target,offset,size,data){GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _glClear(x0){GLctx["clear"](x0)}function _glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexSubImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glCullFace(x0){GLctx["cullFace"](x0)}function _glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GL.currArrayBuffer)GL.currArrayBuffer=0;if(id==GL.currElementArrayBuffer)GL.currElementArrayBuffer=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDepthFunc(x0){GLctx["depthFunc"](x0)}function _glDepthMask(flag){GLctx.depthMask(!!flag)}function _glDisable(x0){GLctx["disable"](x0)}function _glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _glEnable(x0){GLctx["enable"](x0)}function _glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,4)}function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source===null||source.length==0?0:source.length+1;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function _glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?jstoi_q(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _glUniformMatrix4fv(location,count,transpose,value){if(16*count<=GL.MINI_TEMP_BUFFER_SIZE){var view=GL.miniTempBufferFloatViews[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _pthread_create(){return 6}function _pthread_join(){}function _pthread_mutexattr_destroy(){}function _pthread_mutexattr_init(){}function _pthread_mutexattr_settype(){}function _roundf(d){d=+d;return d>=+0?+Math_floor(d+ +.5):+Math_ceil(d-+.5)}function _setTempRet0($i){setTempRet0($i|0)}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value==="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}else{return"PM"}},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?"01":"00"},"%V":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return"53"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return"01"}var daysDifference;if(firstWeekStartThisYear.getFullYear()=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};for(var rule in EXPANSION_RULES_2){if(pattern.indexOf(rule)>=0){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}function readAsmConstArgs(sigPtr,buf){if(!readAsmConstArgs.array){readAsmConstArgs.array=[]}var args=readAsmConstArgs.array;args.length=0;var ch;while(ch=HEAPU8[sigPtr++]){if(ch===100||ch===102){buf=buf+7&~7;args.push(HEAPF64[buf>>3]);buf+=8}else{buf=buf+3&~3;args.push(HEAP32[buf>>2]);buf+=4}}return args}Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas){Browser.requestFullscreen(lockPointer,resizeCanvas)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var GLctx;GL.init();for(var i=0;i<32;i++)__tempFixedLengthArray.push(new Array(i));var ASSERTIONS=false;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmLibraryArg={"__cxa_allocate_exception":___cxa_allocate_exception,"__cxa_atexit":___cxa_atexit,"__cxa_throw":___cxa_throw,"__map_file":___map_file,"__sys_fcntl64":___sys_fcntl64,"__sys_ioctl":___sys_ioctl,"__sys_munmap":___sys_munmap,"__sys_open":___sys_open,"abort":_abort,"alBufferData":_alBufferData,"alDeleteBuffers":_alDeleteBuffers,"alDeleteSources":_alDeleteSources,"alGenBuffers":_alGenBuffers,"alGenSources":_alGenSources,"alGetSourcei":_alGetSourcei,"alListenerfv":_alListenerfv,"alSourcePause":_alSourcePause,"alSourcePlay":_alSourcePlay,"alSourceStop":_alSourceStop,"alSourcef":_alSourcef,"alSourcefv":_alSourcefv,"alSourcei":_alSourcei,"alcCreateContext":_alcCreateContext,"alcMakeContextCurrent":_alcMakeContextCurrent,"alcOpenDevice":_alcOpenDevice,"clock_gettime":_clock_gettime,"eglGetProcAddress":_eglGetProcAddress,"emscripten_asm_const_iii":_emscripten_asm_const_iii,"emscripten_get_sbrk_ptr":_emscripten_get_sbrk_ptr,"emscripten_glActiveTexture":_emscripten_glActiveTexture,"emscripten_glAttachShader":_emscripten_glAttachShader,"emscripten_glBeginQueryEXT":_emscripten_glBeginQueryEXT,"emscripten_glBindAttribLocation":_emscripten_glBindAttribLocation,"emscripten_glBindBuffer":_emscripten_glBindBuffer,"emscripten_glBindFramebuffer":_emscripten_glBindFramebuffer,"emscripten_glBindRenderbuffer":_emscripten_glBindRenderbuffer,"emscripten_glBindTexture":_emscripten_glBindTexture,"emscripten_glBindVertexArrayOES":_emscripten_glBindVertexArrayOES,"emscripten_glBlendColor":_emscripten_glBlendColor,"emscripten_glBlendEquation":_emscripten_glBlendEquation,"emscripten_glBlendEquationSeparate":_emscripten_glBlendEquationSeparate,"emscripten_glBlendFunc":_emscripten_glBlendFunc,"emscripten_glBlendFuncSeparate":_emscripten_glBlendFuncSeparate,"emscripten_glBufferData":_emscripten_glBufferData,"emscripten_glBufferSubData":_emscripten_glBufferSubData,"emscripten_glCheckFramebufferStatus":_emscripten_glCheckFramebufferStatus,"emscripten_glClear":_emscripten_glClear,"emscripten_glClearColor":_emscripten_glClearColor,"emscripten_glClearDepthf":_emscripten_glClearDepthf,"emscripten_glClearStencil":_emscripten_glClearStencil,"emscripten_glColorMask":_emscripten_glColorMask,"emscripten_glCompileShader":_emscripten_glCompileShader,"emscripten_glCompressedTexImage2D":_emscripten_glCompressedTexImage2D,"emscripten_glCompressedTexSubImage2D":_emscripten_glCompressedTexSubImage2D,"emscripten_glCopyTexImage2D":_emscripten_glCopyTexImage2D,"emscripten_glCopyTexSubImage2D":_emscripten_glCopyTexSubImage2D,"emscripten_glCreateProgram":_emscripten_glCreateProgram,"emscripten_glCreateShader":_emscripten_glCreateShader,"emscripten_glCullFace":_emscripten_glCullFace,"emscripten_glDeleteBuffers":_emscripten_glDeleteBuffers,"emscripten_glDeleteFramebuffers":_emscripten_glDeleteFramebuffers,"emscripten_glDeleteProgram":_emscripten_glDeleteProgram,"emscripten_glDeleteQueriesEXT":_emscripten_glDeleteQueriesEXT,"emscripten_glDeleteRenderbuffers":_emscripten_glDeleteRenderbuffers,"emscripten_glDeleteShader":_emscripten_glDeleteShader,"emscripten_glDeleteTextures":_emscripten_glDeleteTextures,"emscripten_glDeleteVertexArraysOES":_emscripten_glDeleteVertexArraysOES,"emscripten_glDepthFunc":_emscripten_glDepthFunc,"emscripten_glDepthMask":_emscripten_glDepthMask,"emscripten_glDepthRangef":_emscripten_glDepthRangef,"emscripten_glDetachShader":_emscripten_glDetachShader,"emscripten_glDisable":_emscripten_glDisable,"emscripten_glDisableVertexAttribArray":_emscripten_glDisableVertexAttribArray,"emscripten_glDrawArrays":_emscripten_glDrawArrays,"emscripten_glDrawArraysInstancedANGLE":_emscripten_glDrawArraysInstancedANGLE,"emscripten_glDrawBuffersWEBGL":_emscripten_glDrawBuffersWEBGL,"emscripten_glDrawElements":_emscripten_glDrawElements,"emscripten_glDrawElementsInstancedANGLE":_emscripten_glDrawElementsInstancedANGLE,"emscripten_glEnable":_emscripten_glEnable,"emscripten_glEnableVertexAttribArray":_emscripten_glEnableVertexAttribArray,"emscripten_glEndQueryEXT":_emscripten_glEndQueryEXT,"emscripten_glFinish":_emscripten_glFinish,"emscripten_glFlush":_emscripten_glFlush,"emscripten_glFramebufferRenderbuffer":_emscripten_glFramebufferRenderbuffer,"emscripten_glFramebufferTexture2D":_emscripten_glFramebufferTexture2D,"emscripten_glFrontFace":_emscripten_glFrontFace,"emscripten_glGenBuffers":_emscripten_glGenBuffers,"emscripten_glGenFramebuffers":_emscripten_glGenFramebuffers,"emscripten_glGenQueriesEXT":_emscripten_glGenQueriesEXT,"emscripten_glGenRenderbuffers":_emscripten_glGenRenderbuffers,"emscripten_glGenTextures":_emscripten_glGenTextures,"emscripten_glGenVertexArraysOES":_emscripten_glGenVertexArraysOES,"emscripten_glGenerateMipmap":_emscripten_glGenerateMipmap,"emscripten_glGetActiveAttrib":_emscripten_glGetActiveAttrib,"emscripten_glGetActiveUniform":_emscripten_glGetActiveUniform,"emscripten_glGetAttachedShaders":_emscripten_glGetAttachedShaders,"emscripten_glGetAttribLocation":_emscripten_glGetAttribLocation,"emscripten_glGetBooleanv":_emscripten_glGetBooleanv,"emscripten_glGetBufferParameteriv":_emscripten_glGetBufferParameteriv,"emscripten_glGetError":_emscripten_glGetError,"emscripten_glGetFloatv":_emscripten_glGetFloatv,"emscripten_glGetFramebufferAttachmentParameteriv":_emscripten_glGetFramebufferAttachmentParameteriv,"emscripten_glGetIntegerv":_emscripten_glGetIntegerv,"emscripten_glGetProgramInfoLog":_emscripten_glGetProgramInfoLog,"emscripten_glGetProgramiv":_emscripten_glGetProgramiv,"emscripten_glGetQueryObjecti64vEXT":_emscripten_glGetQueryObjecti64vEXT,"emscripten_glGetQueryObjectivEXT":_emscripten_glGetQueryObjectivEXT,"emscripten_glGetQueryObjectui64vEXT":_emscripten_glGetQueryObjectui64vEXT,"emscripten_glGetQueryObjectuivEXT":_emscripten_glGetQueryObjectuivEXT,"emscripten_glGetQueryivEXT":_emscripten_glGetQueryivEXT,"emscripten_glGetRenderbufferParameteriv":_emscripten_glGetRenderbufferParameteriv,"emscripten_glGetShaderInfoLog":_emscripten_glGetShaderInfoLog,"emscripten_glGetShaderPrecisionFormat":_emscripten_glGetShaderPrecisionFormat,"emscripten_glGetShaderSource":_emscripten_glGetShaderSource,"emscripten_glGetShaderiv":_emscripten_glGetShaderiv,"emscripten_glGetString":_emscripten_glGetString,"emscripten_glGetTexParameterfv":_emscripten_glGetTexParameterfv,"emscripten_glGetTexParameteriv":_emscripten_glGetTexParameteriv,"emscripten_glGetUniformLocation":_emscripten_glGetUniformLocation,"emscripten_glGetUniformfv":_emscripten_glGetUniformfv,"emscripten_glGetUniformiv":_emscripten_glGetUniformiv,"emscripten_glGetVertexAttribPointerv":_emscripten_glGetVertexAttribPointerv,"emscripten_glGetVertexAttribfv":_emscripten_glGetVertexAttribfv,"emscripten_glGetVertexAttribiv":_emscripten_glGetVertexAttribiv,"emscripten_glHint":_emscripten_glHint,"emscripten_glIsBuffer":_emscripten_glIsBuffer,"emscripten_glIsEnabled":_emscripten_glIsEnabled,"emscripten_glIsFramebuffer":_emscripten_glIsFramebuffer,"emscripten_glIsProgram":_emscripten_glIsProgram,"emscripten_glIsQueryEXT":_emscripten_glIsQueryEXT,"emscripten_glIsRenderbuffer":_emscripten_glIsRenderbuffer,"emscripten_glIsShader":_emscripten_glIsShader,"emscripten_glIsTexture":_emscripten_glIsTexture,"emscripten_glIsVertexArrayOES":_emscripten_glIsVertexArrayOES,"emscripten_glLineWidth":_emscripten_glLineWidth,"emscripten_glLinkProgram":_emscripten_glLinkProgram,"emscripten_glPixelStorei":_emscripten_glPixelStorei,"emscripten_glPolygonOffset":_emscripten_glPolygonOffset,"emscripten_glQueryCounterEXT":_emscripten_glQueryCounterEXT,"emscripten_glReadPixels":_emscripten_glReadPixels,"emscripten_glReleaseShaderCompiler":_emscripten_glReleaseShaderCompiler,"emscripten_glRenderbufferStorage":_emscripten_glRenderbufferStorage,"emscripten_glSampleCoverage":_emscripten_glSampleCoverage,"emscripten_glScissor":_emscripten_glScissor,"emscripten_glShaderBinary":_emscripten_glShaderBinary,"emscripten_glShaderSource":_emscripten_glShaderSource,"emscripten_glStencilFunc":_emscripten_glStencilFunc,"emscripten_glStencilFuncSeparate":_emscripten_glStencilFuncSeparate,"emscripten_glStencilMask":_emscripten_glStencilMask,"emscripten_glStencilMaskSeparate":_emscripten_glStencilMaskSeparate,"emscripten_glStencilOp":_emscripten_glStencilOp,"emscripten_glStencilOpSeparate":_emscripten_glStencilOpSeparate,"emscripten_glTexImage2D":_emscripten_glTexImage2D,"emscripten_glTexParameterf":_emscripten_glTexParameterf,"emscripten_glTexParameterfv":_emscripten_glTexParameterfv,"emscripten_glTexParameteri":_emscripten_glTexParameteri,"emscripten_glTexParameteriv":_emscripten_glTexParameteriv,"emscripten_glTexSubImage2D":_emscripten_glTexSubImage2D,"emscripten_glUniform1f":_emscripten_glUniform1f,"emscripten_glUniform1fv":_emscripten_glUniform1fv,"emscripten_glUniform1i":_emscripten_glUniform1i,"emscripten_glUniform1iv":_emscripten_glUniform1iv,"emscripten_glUniform2f":_emscripten_glUniform2f,"emscripten_glUniform2fv":_emscripten_glUniform2fv,"emscripten_glUniform2i":_emscripten_glUniform2i,"emscripten_glUniform2iv":_emscripten_glUniform2iv,"emscripten_glUniform3f":_emscripten_glUniform3f,"emscripten_glUniform3fv":_emscripten_glUniform3fv,"emscripten_glUniform3i":_emscripten_glUniform3i,"emscripten_glUniform3iv":_emscripten_glUniform3iv,"emscripten_glUniform4f":_emscripten_glUniform4f,"emscripten_glUniform4fv":_emscripten_glUniform4fv,"emscripten_glUniform4i":_emscripten_glUniform4i,"emscripten_glUniform4iv":_emscripten_glUniform4iv,"emscripten_glUniformMatrix2fv":_emscripten_glUniformMatrix2fv,"emscripten_glUniformMatrix3fv":_emscripten_glUniformMatrix3fv,"emscripten_glUniformMatrix4fv":_emscripten_glUniformMatrix4fv,"emscripten_glUseProgram":_emscripten_glUseProgram,"emscripten_glValidateProgram":_emscripten_glValidateProgram,"emscripten_glVertexAttrib1f":_emscripten_glVertexAttrib1f,"emscripten_glVertexAttrib1fv":_emscripten_glVertexAttrib1fv,"emscripten_glVertexAttrib2f":_emscripten_glVertexAttrib2f,"emscripten_glVertexAttrib2fv":_emscripten_glVertexAttrib2fv,"emscripten_glVertexAttrib3f":_emscripten_glVertexAttrib3f,"emscripten_glVertexAttrib3fv":_emscripten_glVertexAttrib3fv,"emscripten_glVertexAttrib4f":_emscripten_glVertexAttrib4f,"emscripten_glVertexAttrib4fv":_emscripten_glVertexAttrib4fv,"emscripten_glVertexAttribDivisorANGLE":_emscripten_glVertexAttribDivisorANGLE,"emscripten_glVertexAttribPointer":_emscripten_glVertexAttribPointer,"emscripten_glViewport":_emscripten_glViewport,"emscripten_memcpy_big":_emscripten_memcpy_big,"emscripten_resize_heap":_emscripten_resize_heap,"environ_get":_environ_get,"environ_sizes_get":_environ_sizes_get,"fd_close":_fd_close,"fd_read":_fd_read,"fd_seek":_fd_seek,"fd_write":_fd_write,"glActiveTexture":_glActiveTexture,"glAttachShader":_glAttachShader,"glBindBuffer":_glBindBuffer,"glBindFramebuffer":_glBindFramebuffer,"glBindTexture":_glBindTexture,"glBlendEquation":_glBlendEquation,"glBlendEquationSeparate":_glBlendEquationSeparate,"glBlendFuncSeparate":_glBlendFuncSeparate,"glBufferData":_glBufferData,"glBufferSubData":_glBufferSubData,"glClear":_glClear,"glClearColor":_glClearColor,"glCompileShader":_glCompileShader,"glCopyTexSubImage2D":_glCopyTexSubImage2D,"glCreateProgram":_glCreateProgram,"glCreateShader":_glCreateShader,"glCullFace":_glCullFace,"glDeleteBuffers":_glDeleteBuffers,"glDeleteFramebuffers":_glDeleteFramebuffers,"glDeleteProgram":_glDeleteProgram,"glDeleteShader":_glDeleteShader,"glDeleteTextures":_glDeleteTextures,"glDepthFunc":_glDepthFunc,"glDepthMask":_glDepthMask,"glDisable":_glDisable,"glDisableVertexAttribArray":_glDisableVertexAttribArray,"glDrawElements":_glDrawElements,"glEnable":_glEnable,"glEnableVertexAttribArray":_glEnableVertexAttribArray,"glFramebufferTexture2D":_glFramebufferTexture2D,"glGenBuffers":_glGenBuffers,"glGenFramebuffers":_glGenFramebuffers,"glGenTextures":_glGenTextures,"glGenerateMipmap":_glGenerateMipmap,"glGetAttribLocation":_glGetAttribLocation,"glGetBooleanv":_glGetBooleanv,"glGetIntegerv":_glGetIntegerv,"glGetProgramiv":_glGetProgramiv,"glGetShaderiv":_glGetShaderiv,"glGetString":_glGetString,"glGetUniformLocation":_glGetUniformLocation,"glIsEnabled":_glIsEnabled,"glLinkProgram":_glLinkProgram,"glShaderSource":_glShaderSource,"glTexImage2D":_glTexImage2D,"glTexParameteri":_glTexParameteri,"glUniform1i":_glUniform1i,"glUniform4fv":_glUniform4fv,"glUniformMatrix4fv":_glUniformMatrix4fv,"glUseProgram":_glUseProgram,"glVertexAttribPointer":_glVertexAttribPointer,"memory":wasmMemory,"pthread_create":_pthread_create,"pthread_join":_pthread_join,"pthread_mutexattr_destroy":_pthread_mutexattr_destroy,"pthread_mutexattr_init":_pthread_mutexattr_init,"pthread_mutexattr_settype":_pthread_mutexattr_settype,"roundf":_roundf,"setTempRet0":_setTempRet0,"strftime_l":_strftime_l,"table":wasmTable};var asm=createWasm();Module["asm"]=asm;var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["__wasm_call_ctors"]).apply(null,arguments)};var _memcpy=Module["_memcpy"]=function(){return(_memcpy=Module["_memcpy"]=Module["asm"]["memcpy"]).apply(null,arguments)};var _htons=Module["_htons"]=function(){return(_htons=Module["_htons"]=Module["asm"]["htons"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["free"]).apply(null,arguments)};var _strstr=Module["_strstr"]=function(){return(_strstr=Module["_strstr"]=Module["asm"]["strstr"]).apply(null,arguments)};var _EffekseerInit=Module["_EffekseerInit"]=function(){return(_EffekseerInit=Module["_EffekseerInit"]=Module["asm"]["EffekseerInit"]).apply(null,arguments)};var _EffekseerTerminate=Module["_EffekseerTerminate"]=function(){return(_EffekseerTerminate=Module["_EffekseerTerminate"]=Module["asm"]["EffekseerTerminate"]).apply(null,arguments)};var _EffekseerUpdate=Module["_EffekseerUpdate"]=function(){return(_EffekseerUpdate=Module["_EffekseerUpdate"]=Module["asm"]["EffekseerUpdate"]).apply(null,arguments)};var _EffekseerBeginUpdate=Module["_EffekseerBeginUpdate"]=function(){return(_EffekseerBeginUpdate=Module["_EffekseerBeginUpdate"]=Module["asm"]["EffekseerBeginUpdate"]).apply(null,arguments)};var _EffekseerEndUpdate=Module["_EffekseerEndUpdate"]=function(){return(_EffekseerEndUpdate=Module["_EffekseerEndUpdate"]=Module["asm"]["EffekseerEndUpdate"]).apply(null,arguments)};var _EffekseerUpdateHandle=Module["_EffekseerUpdateHandle"]=function(){return(_EffekseerUpdateHandle=Module["_EffekseerUpdateHandle"]=Module["asm"]["EffekseerUpdateHandle"]).apply(null,arguments)};var _EffekseerDraw=Module["_EffekseerDraw"]=function(){return(_EffekseerDraw=Module["_EffekseerDraw"]=Module["asm"]["EffekseerDraw"]).apply(null,arguments)};var _EffekseerBeginDraw=Module["_EffekseerBeginDraw"]=function(){return(_EffekseerBeginDraw=Module["_EffekseerBeginDraw"]=Module["asm"]["EffekseerBeginDraw"]).apply(null,arguments)};var _EffekseerEndDraw=Module["_EffekseerEndDraw"]=function(){return(_EffekseerEndDraw=Module["_EffekseerEndDraw"]=Module["asm"]["EffekseerEndDraw"]).apply(null,arguments)};var _EffekseerDrawHandle=Module["_EffekseerDrawHandle"]=function(){return(_EffekseerDrawHandle=Module["_EffekseerDrawHandle"]=Module["asm"]["EffekseerDrawHandle"]).apply(null,arguments)};var _EffekseerSetProjectionMatrix=Module["_EffekseerSetProjectionMatrix"]=function(){return(_EffekseerSetProjectionMatrix=Module["_EffekseerSetProjectionMatrix"]=Module["asm"]["EffekseerSetProjectionMatrix"]).apply(null,arguments)};var _EffekseerSetProjectionPerspective=Module["_EffekseerSetProjectionPerspective"]=function(){return(_EffekseerSetProjectionPerspective=Module["_EffekseerSetProjectionPerspective"]=Module["asm"]["EffekseerSetProjectionPerspective"]).apply(null,arguments)};var _EffekseerSetProjectionOrthographic=Module["_EffekseerSetProjectionOrthographic"]=function(){return(_EffekseerSetProjectionOrthographic=Module["_EffekseerSetProjectionOrthographic"]=Module["asm"]["EffekseerSetProjectionOrthographic"]).apply(null,arguments)};var _EffekseerSetCameraMatrix=Module["_EffekseerSetCameraMatrix"]=function(){return(_EffekseerSetCameraMatrix=Module["_EffekseerSetCameraMatrix"]=Module["asm"]["EffekseerSetCameraMatrix"]).apply(null,arguments)};var _EffekseerSetCameraLookAt=Module["_EffekseerSetCameraLookAt"]=function(){return(_EffekseerSetCameraLookAt=Module["_EffekseerSetCameraLookAt"]=Module["asm"]["EffekseerSetCameraLookAt"]).apply(null,arguments)};var _EffekseerLoadEffect=Module["_EffekseerLoadEffect"]=function(){return(_EffekseerLoadEffect=Module["_EffekseerLoadEffect"]=Module["asm"]["EffekseerLoadEffect"]).apply(null,arguments)};var _EffekseerReleaseEffect=Module["_EffekseerReleaseEffect"]=function(){return(_EffekseerReleaseEffect=Module["_EffekseerReleaseEffect"]=Module["asm"]["EffekseerReleaseEffect"]).apply(null,arguments)};var _EffekseerReloadResources=Module["_EffekseerReloadResources"]=function(){return(_EffekseerReloadResources=Module["_EffekseerReloadResources"]=Module["asm"]["EffekseerReloadResources"]).apply(null,arguments)};var _EffekseerStopAllEffects=Module["_EffekseerStopAllEffects"]=function(){return(_EffekseerStopAllEffects=Module["_EffekseerStopAllEffects"]=Module["asm"]["EffekseerStopAllEffects"]).apply(null,arguments)};var _EffekseerPlayEffect=Module["_EffekseerPlayEffect"]=function(){return(_EffekseerPlayEffect=Module["_EffekseerPlayEffect"]=Module["asm"]["EffekseerPlayEffect"]).apply(null,arguments)};var _EffekseerStopEffect=Module["_EffekseerStopEffect"]=function(){return(_EffekseerStopEffect=Module["_EffekseerStopEffect"]=Module["asm"]["EffekseerStopEffect"]).apply(null,arguments)};var _EffekseerStopRoot=Module["_EffekseerStopRoot"]=function(){return(_EffekseerStopRoot=Module["_EffekseerStopRoot"]=Module["asm"]["EffekseerStopRoot"]).apply(null,arguments)};var _EffekseerExists=Module["_EffekseerExists"]=function(){return(_EffekseerExists=Module["_EffekseerExists"]=Module["asm"]["EffekseerExists"]).apply(null,arguments)};var _EffekseerSetLocation=Module["_EffekseerSetLocation"]=function(){return(_EffekseerSetLocation=Module["_EffekseerSetLocation"]=Module["asm"]["EffekseerSetLocation"]).apply(null,arguments)};var _EffekseerSetRotation=Module["_EffekseerSetRotation"]=function(){return(_EffekseerSetRotation=Module["_EffekseerSetRotation"]=Module["asm"]["EffekseerSetRotation"]).apply(null,arguments)};var _EffekseerSetScale=Module["_EffekseerSetScale"]=function(){return(_EffekseerSetScale=Module["_EffekseerSetScale"]=Module["asm"]["EffekseerSetScale"]).apply(null,arguments)};var _EffekseerSetMatrix=Module["_EffekseerSetMatrix"]=function(){return(_EffekseerSetMatrix=Module["_EffekseerSetMatrix"]=Module["asm"]["EffekseerSetMatrix"]).apply(null,arguments)};var _EffekseerGetDynamicInput=Module["_EffekseerGetDynamicInput"]=function(){return(_EffekseerGetDynamicInput=Module["_EffekseerGetDynamicInput"]=Module["asm"]["EffekseerGetDynamicInput"]).apply(null,arguments)};var _EffekseerSetDynamicInput=Module["_EffekseerSetDynamicInput"]=function(){return(_EffekseerSetDynamicInput=Module["_EffekseerSetDynamicInput"]=Module["asm"]["EffekseerSetDynamicInput"]).apply(null,arguments)};var _EffekseerSetTargetLocation=Module["_EffekseerSetTargetLocation"]=function(){return(_EffekseerSetTargetLocation=Module["_EffekseerSetTargetLocation"]=Module["asm"]["EffekseerSetTargetLocation"]).apply(null,arguments)};var _EffekseerSetPaused=Module["_EffekseerSetPaused"]=function(){return(_EffekseerSetPaused=Module["_EffekseerSetPaused"]=Module["asm"]["EffekseerSetPaused"]).apply(null,arguments)};var _EffekseerSetShown=Module["_EffekseerSetShown"]=function(){return(_EffekseerSetShown=Module["_EffekseerSetShown"]=Module["asm"]["EffekseerSetShown"]).apply(null,arguments)};var _EffekseerSetSpeed=Module["_EffekseerSetSpeed"]=function(){return(_EffekseerSetSpeed=Module["_EffekseerSetSpeed"]=Module["asm"]["EffekseerSetSpeed"]).apply(null,arguments)};var _EffekseerGetRestInstancesCount=Module["_EffekseerGetRestInstancesCount"]=function(){return(_EffekseerGetRestInstancesCount=Module["_EffekseerGetRestInstancesCount"]=Module["asm"]["EffekseerGetRestInstancesCount"]).apply(null,arguments)};var _EffekseerGetUpdateTime=Module["_EffekseerGetUpdateTime"]=function(){return(_EffekseerGetUpdateTime=Module["_EffekseerGetUpdateTime"]=Module["asm"]["EffekseerGetUpdateTime"]).apply(null,arguments)};var _EffekseerGetDrawTime=Module["_EffekseerGetDrawTime"]=function(){return(_EffekseerGetDrawTime=Module["_EffekseerGetDrawTime"]=Module["asm"]["EffekseerGetDrawTime"]).apply(null,arguments)};var _EffekseerIsVertexArrayObjectSupported=Module["_EffekseerIsVertexArrayObjectSupported"]=function(){return(_EffekseerIsVertexArrayObjectSupported=Module["_EffekseerIsVertexArrayObjectSupported"]=Module["asm"]["EffekseerIsVertexArrayObjectSupported"]).apply(null,arguments)};var _EffekseerSetRestorationOfStatesFlag=Module["_EffekseerSetRestorationOfStatesFlag"]=function(){return(_EffekseerSetRestorationOfStatesFlag=Module["_EffekseerSetRestorationOfStatesFlag"]=Module["asm"]["EffekseerSetRestorationOfStatesFlag"]).apply(null,arguments)};var _EffekseerCaptureBackground=Module["_EffekseerCaptureBackground"]=function(){return(_EffekseerCaptureBackground=Module["_EffekseerCaptureBackground"]=Module["asm"]["EffekseerCaptureBackground"]).apply(null,arguments)};var _EffekseerResetBackground=Module["_EffekseerResetBackground"]=function(){return(_EffekseerResetBackground=Module["_EffekseerResetBackground"]=Module["asm"]["EffekseerResetBackground"]).apply(null,arguments)};var _EffekseerSetLogEnabled=Module["_EffekseerSetLogEnabled"]=function(){return(_EffekseerSetLogEnabled=Module["_EffekseerSetLogEnabled"]=Module["asm"]["EffekseerSetLogEnabled"]).apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){return(___errno_location=Module["___errno_location"]=Module["asm"]["__errno_location"]).apply(null,arguments)};var _htonl=Module["_htonl"]=function(){return(_htonl=Module["_htonl"]=Module["asm"]["htonl"]).apply(null,arguments)};var _ntohs=Module["_ntohs"]=function(){return(_ntohs=Module["_ntohs"]=Module["asm"]["ntohs"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["malloc"]).apply(null,arguments)};var _setThrew=Module["_setThrew"]=function(){return(_setThrew=Module["_setThrew"]=Module["asm"]["setThrew"]).apply(null,arguments)};var _emscripten_GetProcAddress=Module["_emscripten_GetProcAddress"]=function(){return(_emscripten_GetProcAddress=Module["_emscripten_GetProcAddress"]=Module["asm"]["emscripten_GetProcAddress"]).apply(null,arguments)};var _emscripten_main_thread_process_queued_calls=Module["_emscripten_main_thread_process_queued_calls"]=function(){return(_emscripten_main_thread_process_queued_calls=Module["_emscripten_main_thread_process_queued_calls"]=Module["asm"]["emscripten_main_thread_process_queued_calls"]).apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return(stackSave=Module["stackSave"]=Module["asm"]["stackSave"]).apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return(stackAlloc=Module["stackAlloc"]=Module["asm"]["stackAlloc"]).apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return(stackRestore=Module["stackRestore"]=Module["asm"]["stackRestore"]).apply(null,arguments)};var __growWasmMemory=Module["__growWasmMemory"]=function(){return(__growWasmMemory=Module["__growWasmMemory"]=Module["asm"]["__growWasmMemory"]).apply(null,arguments)};var dynCall_ii=Module["dynCall_ii"]=function(){return(dynCall_ii=Module["dynCall_ii"]=Module["asm"]["dynCall_ii"]).apply(null,arguments)};var dynCall_vi=Module["dynCall_vi"]=function(){return(dynCall_vi=Module["dynCall_vi"]=Module["asm"]["dynCall_vi"]).apply(null,arguments)};var dynCall_vii=Module["dynCall_vii"]=function(){return(dynCall_vii=Module["dynCall_vii"]=Module["asm"]["dynCall_vii"]).apply(null,arguments)};var dynCall_vif=Module["dynCall_vif"]=function(){return(dynCall_vif=Module["dynCall_vif"]=Module["asm"]["dynCall_vif"]).apply(null,arguments)};var dynCall_v=Module["dynCall_v"]=function(){return(dynCall_v=Module["dynCall_v"]=Module["asm"]["dynCall_v"]).apply(null,arguments)};var dynCall_viii=Module["dynCall_viii"]=function(){return(dynCall_viii=Module["dynCall_viii"]=Module["asm"]["dynCall_viii"]).apply(null,arguments)};var dynCall_viiii=Module["dynCall_viiii"]=function(){return(dynCall_viiii=Module["dynCall_viiii"]=Module["asm"]["dynCall_viiii"]).apply(null,arguments)};var dynCall_iii=Module["dynCall_iii"]=function(){return(dynCall_iii=Module["dynCall_iii"]=Module["asm"]["dynCall_iii"]).apply(null,arguments)};var dynCall_iiii=Module["dynCall_iiii"]=function(){return(dynCall_iiii=Module["dynCall_iiii"]=Module["asm"]["dynCall_iiii"]).apply(null,arguments)};var dynCall_viijii=Module["dynCall_viijii"]=function(){return(dynCall_viijii=Module["dynCall_viijii"]=Module["asm"]["dynCall_viijii"]).apply(null,arguments)};var dynCall_iiiii=Module["dynCall_iiiii"]=function(){return(dynCall_iiiii=Module["dynCall_iiiii"]=Module["asm"]["dynCall_iiiii"]).apply(null,arguments)};var dynCall_iiiiifi=Module["dynCall_iiiiifi"]=function(){return(dynCall_iiiiifi=Module["dynCall_iiiiifi"]=Module["asm"]["dynCall_iiiiifi"]).apply(null,arguments)};var dynCall_viiiii=Module["dynCall_viiiii"]=function(){return(dynCall_viiiii=Module["dynCall_viiiii"]=Module["asm"]["dynCall_viiiii"]).apply(null,arguments)};var dynCall_fi=Module["dynCall_fi"]=function(){return(dynCall_fi=Module["dynCall_fi"]=Module["asm"]["dynCall_fi"]).apply(null,arguments)};var dynCall_iiiiiiii=Module["dynCall_iiiiiiii"]=function(){return(dynCall_iiiiiiii=Module["dynCall_iiiiiiii"]=Module["asm"]["dynCall_iiiiiiii"]).apply(null,arguments)};var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=function(){return(dynCall_iiiiiii=Module["dynCall_iiiiiii"]=Module["asm"]["dynCall_iiiiiii"]).apply(null,arguments)};var dynCall_fii=Module["dynCall_fii"]=function(){return(dynCall_fii=Module["dynCall_fii"]=Module["asm"]["dynCall_fii"]).apply(null,arguments)};var dynCall_i=Module["dynCall_i"]=function(){return(dynCall_i=Module["dynCall_i"]=Module["asm"]["dynCall_i"]).apply(null,arguments)};var dynCall_fif=Module["dynCall_fif"]=function(){return(dynCall_fif=Module["dynCall_fif"]=Module["asm"]["dynCall_fif"]).apply(null,arguments)};var dynCall_viifff=Module["dynCall_viifff"]=function(){return(dynCall_viifff=Module["dynCall_viifff"]=Module["asm"]["dynCall_viifff"]).apply(null,arguments)};var dynCall_viiif=Module["dynCall_viiif"]=function(){return(dynCall_viiif=Module["dynCall_viiif"]=Module["asm"]["dynCall_viiif"]).apply(null,arguments)};var dynCall_fiii=Module["dynCall_fiii"]=function(){return(dynCall_fiii=Module["dynCall_fiii"]=Module["asm"]["dynCall_fiii"]).apply(null,arguments)};var dynCall_jii=Module["dynCall_jii"]=function(){return(dynCall_jii=Module["dynCall_jii"]=Module["asm"]["dynCall_jii"]).apply(null,arguments)};var dynCall_viij=Module["dynCall_viij"]=function(){return(dynCall_viij=Module["dynCall_viij"]=Module["asm"]["dynCall_viij"]).apply(null,arguments)};var dynCall_viif=Module["dynCall_viif"]=function(){return(dynCall_viif=Module["dynCall_viif"]=Module["asm"]["dynCall_viif"]).apply(null,arguments)};var dynCall_vijf=Module["dynCall_vijf"]=function(){return(dynCall_vijf=Module["dynCall_vijf"]=Module["asm"]["dynCall_vijf"]).apply(null,arguments)};var dynCall_iiifff=Module["dynCall_iiifff"]=function(){return(dynCall_iiifff=Module["dynCall_iiifff"]=Module["asm"]["dynCall_iiifff"]).apply(null,arguments)};var dynCall_vifffi=Module["dynCall_vifffi"]=function(){return(dynCall_vifffi=Module["dynCall_vifffi"]=Module["asm"]["dynCall_vifffi"]).apply(null,arguments)};var dynCall_fiff=Module["dynCall_fiff"]=function(){return(dynCall_fiff=Module["dynCall_fiff"]=Module["asm"]["dynCall_fiff"]).apply(null,arguments)};var dynCall_ji=Module["dynCall_ji"]=function(){return(dynCall_ji=Module["dynCall_ji"]=Module["asm"]["dynCall_ji"]).apply(null,arguments)};var dynCall_vij=Module["dynCall_vij"]=function(){return(dynCall_vij=Module["dynCall_vij"]=Module["asm"]["dynCall_vij"]).apply(null,arguments)};var dynCall_fiif=Module["dynCall_fiif"]=function(){return(dynCall_fiif=Module["dynCall_fiif"]=Module["asm"]["dynCall_fiif"]).apply(null,arguments)};var dynCall_iiiiii=Module["dynCall_iiiiii"]=function(){return(dynCall_iiiiii=Module["dynCall_iiiiii"]=Module["asm"]["dynCall_iiiiii"]).apply(null,arguments)};var dynCall_viiiiii=Module["dynCall_viiiiii"]=function(){return(dynCall_viiiiii=Module["dynCall_viiiiii"]=Module["asm"]["dynCall_viiiiii"]).apply(null,arguments)};var dynCall_jiji=Module["dynCall_jiji"]=function(){return(dynCall_jiji=Module["dynCall_jiji"]=Module["asm"]["dynCall_jiji"]).apply(null,arguments)};var dynCall_iidiiii=Module["dynCall_iidiiii"]=function(){return(dynCall_iidiiii=Module["dynCall_iidiiii"]=Module["asm"]["dynCall_iidiiii"]).apply(null,arguments)};var dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=function(){return(dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=Module["asm"]["dynCall_iiiiiiiii"]).apply(null,arguments)};var dynCall_iiiiij=Module["dynCall_iiiiij"]=function(){return(dynCall_iiiiij=Module["dynCall_iiiiij"]=Module["asm"]["dynCall_iiiiij"]).apply(null,arguments)};var dynCall_iiiiid=Module["dynCall_iiiiid"]=function(){return(dynCall_iiiiid=Module["dynCall_iiiiid"]=Module["asm"]["dynCall_iiiiid"]).apply(null,arguments)};var dynCall_iiiiijj=Module["dynCall_iiiiijj"]=function(){return(dynCall_iiiiijj=Module["dynCall_iiiiijj"]=Module["asm"]["dynCall_iiiiijj"]).apply(null,arguments)};var dynCall_iiiiiijj=Module["dynCall_iiiiiijj"]=function(){return(dynCall_iiiiiijj=Module["dynCall_iiiiiijj"]=Module["asm"]["dynCall_iiiiiijj"]).apply(null,arguments)};var dynCall_vffff=Module["dynCall_vffff"]=function(){return(dynCall_vffff=Module["dynCall_vffff"]=Module["asm"]["dynCall_vffff"]).apply(null,arguments)};var dynCall_vf=Module["dynCall_vf"]=function(){return(dynCall_vf=Module["dynCall_vf"]=Module["asm"]["dynCall_vf"]).apply(null,arguments)};var dynCall_viiiiiiii=Module["dynCall_viiiiiiii"]=function(){return(dynCall_viiiiiiii=Module["dynCall_viiiiiiii"]=Module["asm"]["dynCall_viiiiiiii"]).apply(null,arguments)};var dynCall_viiiiiiiii=Module["dynCall_viiiiiiiii"]=function(){return(dynCall_viiiiiiiii=Module["dynCall_viiiiiiiii"]=Module["asm"]["dynCall_viiiiiiiii"]).apply(null,arguments)};var dynCall_vff=Module["dynCall_vff"]=function(){return(dynCall_vff=Module["dynCall_vff"]=Module["asm"]["dynCall_vff"]).apply(null,arguments)};var dynCall_viiiiiii=Module["dynCall_viiiiiii"]=function(){return(dynCall_viiiiiii=Module["dynCall_viiiiiii"]=Module["asm"]["dynCall_viiiiiii"]).apply(null,arguments)};var dynCall_vfi=Module["dynCall_vfi"]=function(){return(dynCall_vfi=Module["dynCall_vfi"]=Module["asm"]["dynCall_vfi"]).apply(null,arguments)};var dynCall_viff=Module["dynCall_viff"]=function(){return(dynCall_viff=Module["dynCall_viff"]=Module["asm"]["dynCall_viff"]).apply(null,arguments)};var dynCall_vifff=Module["dynCall_vifff"]=function(){return(dynCall_vifff=Module["dynCall_vifff"]=Module["asm"]["dynCall_vifff"]).apply(null,arguments)};var dynCall_viffff=Module["dynCall_viffff"]=function(){return(dynCall_viffff=Module["dynCall_viffff"]=Module["asm"]["dynCall_viffff"]).apply(null,arguments)};Module["asm"]=asm;Module["cwrap"]=cwrap;Module["UTF8ToString"]=UTF8ToString;var calledRun;Module["then"]=function(func){if(calledRun){func(Module)}else{var old=Module["onRuntimeInitialized"];Module["onRuntimeInitialized"]=function(){if(old)old();func(Module)}}return Module};function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}noExitRuntime=true;run();Module["GL"]=GL; + + + return effekseer_native +} +); +})(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = effekseer_native; + else if (typeof define === 'function' && define['amd']) + define([], function() { return effekseer_native; }); + else if (typeof exports === 'object') + exports["effekseer_native"] = effekseer_native; + "use strict";var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){for(var i=0;i>2);Core.SetMatrix(this.context.nativeptr,this.native,arrmem);Module.stackRestore(stack);} +},{key:"setTargetLocation",value:function setTargetLocation(x,y,z){Core.SetTargetLocation(this.context.nativeptr,this.native,x,y,z);} +},{key:"getDynamicInput",value:function getDynamicInput(index){return Core.GetDynamicInput(this.context.nativeptr,this.native,index);} +},{key:"setDynamicInput",value:function setDynamicInput(index,value){Core.SetDynamicInput(this.context.nativeptr,this.native,index,value);} +},{key:"setPaused",value:function setPaused(paused){Core.SetPaused(this.context.nativeptr,this.native,paused);} +},{key:"setShown",value:function setShown(shown){Core.SetShown(this.context.nativeptr,this.native,shown);} +},{key:"setSpeed",value:function setSpeed(speed){Core.SetSpeed(this.context.nativeptr,this.native,speed);}}]);return EffekseerHandle;}();var _isImagePowerOfTwo=function _isImagePowerOfTwo(image){return!(image.width&image.width-1)&&!(image.height&image.height-1);};var calcNextPowerOfTwo=function calcNextPowerOfTwo(v){var sizes=[2,4,8,16,32,64,128,256,512,1024,2048];var foundInd=-1;for(var i=0;i=v){return sizes[i];}} +for(var i=sizes.length-1;i>=0;i--){if(sizes[i]<=v){return sizes[i];}} +return 1;};var _convertPowerOfTwoImage=function _convertPowerOfTwoImage(image){if(!_isImagePowerOfTwo(image)){var canvas=document.createElement("canvas");canvas.width=calcNextPowerOfTwo(image.width);canvas.height=calcNextPowerOfTwo(image.height);var context2d=canvas.getContext("2d");context2d.drawImage(image,0,0,image.width,image.height,0,0,canvas.width,canvas.height);image=canvas;} +return image;};var _loadBinFile=function _loadBinFile(url,onload,onerror){var xhr=new XMLHttpRequest();xhr.open('GET',url,true);xhr.responseType="arraybuffer";xhr.onload=function(){onload(xhr.response);};xhr.onerror=function(){if(!(typeof onerror==="undefined"))onerror('not found',url);};xhr.send(null);};var _loadResource=function _loadResource(path,onload,onerror){splitted_path=path.split('?');var ext_path=path;if(splitted_path.length>=2){ext_path=splitted_path[0];} +var extindex=ext_path.lastIndexOf(".");var ext=extindex>=0?ext_path.slice(extindex):"";if(ext==".png"||ext==".jpg"){var image=new Image();image.onload=function(){var converted_image=_convertPowerOfTwoImage(image);onload(converted_image);};image.onerror=function(){if(!(typeof onerror==="undefined"))onerror('not found',path);};image.crossOrigin=_imageCrossOrigin;image.src=path;}else if(ext==".tga"){if(!(typeof onerror==="undefined"))onerror('not supported',path);}else{_loadBinFile(path,function(buffer){onload(buffer);},onerror);}};var loadingEffect=null;var ContextStates=function(){function ContextStates(gl){_classCallCheck(this,ContextStates);this.restore_texture_slot_max=8;this.gl=gl;this.ext_vao=null;this.isWebGL2VAOEnabled=false;this.effekseer_vao=null;this.current_vao=null;this.current_vbo=null;this.current_ibo=null;this.current_textures=[];this.current_textures.length=this.restore_texture_slot_max;this.current_active_texture_id=null;this.ext_vao=gl.getExtension('OES_vertex_array_object');if(this.ext_vao!=null){this.effekseer_vao=this.ext_vao.createVertexArrayOES();}else if('createVertexArray'in this.gl){this.isWebGL2VAOEnabled=true;this.effekseer_vao=this.gl.createVertexArray();}} +_createClass(ContextStates,[{key:"save",value:function save(){this.current_vbo=this.gl.getParameter(this.gl.ARRAY_BUFFER_BINDING);this.current_ibo=this.gl.getParameter(this.gl.ELEMENT_ARRAY_BUFFER_BINDING);if(this.ext_vao!=null){this.current_vao=this.gl.getParameter(this.ext_vao.VERTEX_ARRAY_BINDING_OES);this.ext_vao.bindVertexArrayOES(this.effekseer_vao);}else if(this.isWebGL2VAOEnabled){this.current_vao=this.gl.getParameter(this.gl.VERTEX_ARRAY_BINDING);this.gl.bindVertexArray(this.effekseer_vao);} +this.current_active_texture_id=gl.getParameter(gl.ACTIVE_TEXTURE);for(var i=0;i>2);Core.SetProjectionMatrix(this.nativeptr,arrmem);Module.stackRestore(stack);} +},{key:"setProjectionPerspective",value:function setProjectionPerspective(fov,aspect,near,far){Core.SetProjectionPerspective(this.nativeptr,fov,aspect,near,far);} +},{key:"setProjectionOrthographic",value:function setProjectionOrthographic(width,height,near,far){Core.SetProjectionOrthographic(this.nativeptr,width,height,near,far);} +},{key:"setCameraMatrix",value:function setCameraMatrix(matrixArray){var stack=Module.stackSave();var arrmem=Module.stackAlloc(4*16);Module.HEAPF32.set(matrixArray,arrmem>>2);Core.SetCameraMatrix(this.nativeptr,arrmem);Module.stackRestore(stack);} +},{key:"setCameraLookAt",value:function setCameraLookAt(positionX,positionY,positionZ,targetX,targetY,targetZ,upvecX,upvecY,upvecZ){Core.SetCameraLookAt(this.nativeptr,positionX,positionY,positionZ,targetX,targetY,targetZ,upvecX,upvecY,upvecZ);} +},{key:"setCameraLookAtFromVector",value:function setCameraLookAtFromVector(position,target,upvec){upvecVector=(typeof upvecVector==="undefined"?"undefined":_typeof(upvecVector))==="object"?upvecVector:{x:0,y:1,z:0};Core.SetCameraLookAt(this.nativeptr,position.x,position.y,position.z,target.x,target.y,target.z,upvec.x,upvec.y,upvec.z);} +},{key:"loadEffect",value:function loadEffect(path){var scale=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1.0;var onload=arguments[2];var onerror=arguments[3];var redirect=arguments[4];this._makeContextCurrent();var effect=new EffekseerEffect(this);var dirIndex=path.lastIndexOf("/");if(typeof scale==="function"){console.log("Error : second arguments is number from version 1.5");effect.scale=1.0;effect.onload=scale;effect.onerror=onload;effect.redirect=redirect;}else{effect.scale=scale;effect.onload=onload;effect.onerror=onerror;effect.redirect=redirect;} +if(typeof path==="string"){effect.baseDir=dirIndex>=0?path.slice(0,dirIndex+1):"";_loadBinFile(path,function(buffer){effect._load(buffer);},effect.onerror);}else if(typeof path==="arraybuffer"){var buffer=path;effect._load(buffer);} +return effect;} +},{key:"releaseEffect",value:function releaseEffect(effect){this._makeContextCurrent();if(effect==null){console.warn("the effect is null.");return;} +if(!effect.isLoaded){console.warn("the effect has not be loaded yet.");return;} +if(effect.nativeptr==null){console.warn("the effect has been released.");return;} +Core.ReleaseEffect(this.nativeptr,effect.nativeptr);effect.nativeptr=null;} +},{key:"play",value:function play(effect,x,y,z){if(!effect||!effect.isLoaded){return null;} +if(x===undefined)x=0;if(y===undefined)y=0;if(z===undefined)z=0;var handle=Core.PlayEffect(this.nativeptr,effect.nativeptr,x,y,z);return handle>=0?new EffekseerHandle(this,handle):null;} +},{key:"stopAll",value:function stopAll(){Core.StopAllEffects(this.nativeptr);} +},{key:"setResourceLoader",value:function setResourceLoader(loader){_loadResource=loader;} +},{key:"getRestInstancesCount",value:function getRestInstancesCount(){return Core.GetRestInstancesCount(this.nativeptr);} +},{key:"getUpdateTime",value:function getUpdateTime(){return Core.GetUpdateTime(this.nativeptr);} +},{key:"getDrawTime",value:function getDrawTime(){return Core.GetDrawTime(this.nativeptr);} +},{key:"isVertexArrayObjectSupported",value:function isVertexArrayObjectSupported(){return Core.IsVertexArrayObjectSupported(this.nativeptr);} +},{key:"setRestorationOfStatesFlag",value:function setRestorationOfStatesFlag(flag){this._restorationOfStatesFlag=flag;Core.SetRestorationOfStatesFlag(this.nativeptr,flag);} +},{key:"captureBackground",value:function captureBackground(x,y,width,height){return Core.CaptureBackground(this.nativeptr,x,y,width,height);} +},{key:"resetBackground",value:function resetBackground(){return Core.ResetBackground(this.nativeptr);}}]);return EffekseerContext;}();var Effekseer=function(){function Effekseer(){_classCallCheck(this,Effekseer);} +_createClass(Effekseer,[{key:"initRuntime",value:function initRuntime(path,onload,onerror){if(typeof effekseer_native==="undefined"){onload();return;} +_onloadAssembly=onload;_onerrorAssembly=onerror;_initalize_wasm(path);} +},{key:"createContext",value:function createContext(){if(!_is_runtime_initialized){return null;} +return new EffekseerContext();} +},{key:"releaseContext",value:function releaseContext(context){if(context.nativeptr==null){return;} +Core.Terminate(context.nativeptr);context.nativeptr=null;} +},{key:"setSetLogEnabled",value:function setSetLogEnabled(flag){Core.SetLogEnabled(flag);} +},{key:"setImageCrossOrigin",value:function setImageCrossOrigin(crossOrigin){_imageCrossOrigin=crossOrigin;} +},{key:"init",value:function init(webglContext,settings){console.warn('deprecated : please use through createContext.');this.defaultContext=new EffekseerContext();this.defaultContext.init(webglContext,settings);} +},{key:"update",value:function update(deltaFrames){console.warn('deprecated : please use through createContext.');this.defaultContext.update(deltaFrames);}},{key:"beginUpdate",value:function beginUpdate(){console.warn('deprecated : please use through createContext.');this.defaultContext.beginUpdate();}},{key:"endUpdate",value:function endUpdate(){console.warn('deprecated : please use through createContext.');this.defaultContext.endUpdate();}},{key:"updateHandle",value:function updateHandle(handle,deltaFrames){console.warn('deprecated : please use through createContext.');this.defaultContext.updateHandle(handle,deltaFrames);} +},{key:"draw",value:function draw(){console.warn('deprecated : please use through createContext.');this.defaultContext.draw();}},{key:"beginDraw",value:function beginDraw(){console.warn('deprecated : please use through createContext.');this.defaultContext.beginDraw();}},{key:"endDraw",value:function endDraw(){console.warn('deprecated : please use through createContext.');this.defaultContext.endDraw();}},{key:"drawHandle",value:function drawHandle(handle){console.warn('deprecated : please use through createContext.');this.defaultContext.drawHandle(handle);} +},{key:"setProjectionMatrix",value:function setProjectionMatrix(matrixArray){console.warn('deprecated : please use through createContext.');this.defaultContext.setProjectionMatrix(matrixArray);} +},{key:"setProjectionPerspective",value:function setProjectionPerspective(fov,aspect,near,far){console.warn('deprecated : please use through createContext.');this.defaultContext.SetProjectionPerspective(fov,aspect,near,far);} +},{key:"setProjectionOrthographic",value:function setProjectionOrthographic(width,height,near,far){console.warn('deprecated : please use through createContext.');this.defaultContext.setProjectionOrthographic(width,height,near,far);} +},{key:"setCameraMatrix",value:function setCameraMatrix(matrixArray){console.warn('deprecated : please use through createContext.');this.defaultContext.setCameraMatrix(matrixArray);} +},{key:"setCameraLookAt",value:function setCameraLookAt(positionX,positionY,positionZ,targetX,targetY,targetZ,upvecX,upvecY,upvecZ){console.warn('deprecated : please use through createContext.');this.defaultContext.setCameraLookAt(positionX,positionY,positionZ,targetX,targetY,targetZ,upvecX,upvecY,upvecZ);} +},{key:"setCameraLookAtFromVector",value:function setCameraLookAtFromVector(position,target,upvec){console.warn('deprecated : please use through createContext.');this.defaultContext.setCameraLookAtFromVector(position,target,upvec);} +},{key:"loadEffect",value:function loadEffect(path){var scale=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1.0;var onload=arguments[2];var onerror=arguments[3];console.warn('deprecated : please use through createContext.');return this.defaultContext.loadEffect(path,scale,onload,onerror);} +},{key:"releaseEffect",value:function releaseEffect(effect){console.warn('deprecated : please use through createContext.');this.defaultContext.releaseEffect(effect);} +},{key:"play",value:function play(effect,x,y,z){console.warn('deprecated : please use through createContext.');return this.defaultContext.play(effect,x,y,z);} +},{key:"stopAll",value:function stopAll(){console.warn('deprecated : please use through createContext.');this.defaultContext.stopAll();} +},{key:"setResourceLoader",value:function setResourceLoader(loader){console.warn('deprecated : please use through createContext.');this.defaultContext.setResourceLoader(loader);} +},{key:"isVertexArrayObjectSupported",value:function isVertexArrayObjectSupported(){console.warn('deprecated : please use through createContext.');return this.defaultContext.isVertexArrayObjectSupported();}}]);return Effekseer;}();return new Effekseer();}();if(typeof exports!=='undefined'){exports=effekseer;} \ No newline at end of file diff --git a/js/libs/effekseer.wasm b/js/libs/effekseer.wasm new file mode 100644 index 0000000000000000000000000000000000000000..f35a0981dd4c5b20259862259c08773d7bf08c02 GIT binary patch literal 1107728 zcmeFa37B0~weP#y+RfTkwRcq|gamZeCLRk!jmm{Q5AT`{0YOo6g>w$?9W^PF3aLt^ zF{vQj2P8BqA|ixz4VO{msjQ&6_>$yk+5L-SJ3b#JwdQcbtEm z<&a46;2o*!Xz{AT}n*Nx+rC9UF=cj!~YI^?d$tAhX+ zAWJ?TT8^`gRV+Ky5t$TL3(LGm|wv1oOEnAw>MV`&a z=2By%c5KUN4KR>W5@j8FmO{%-VnKT0eVmcbgoI}kB*!^5LrMtmRZxP%6{7L!HFo%=jvC`Ys z>Kr-#@{x(dCN_+&J<>s`jabr>4eORSR;<`CvT>tJ?>%yS@yPhd#K?Y|R<0b`u+j6a zg(JuJH`s@*8eTE7!4<6>IlkZM+7+&#D@W4HN7i;!RVf3tcz9yiiv?{blEz2Yt~lV0 zn}*e|!$#H*ZxG_vR)3az;HI_9n>khw+&b!cMlMnt%O^&U8aaIA=!s1mMqFxg z9bLI@!m-Th@C`V+KG!j6vBR34M z@n&U&X-rHEFJF~aw;oW`(J(J+Kzs7kNi7{Rx_0&Cf-oyf%A1EOB+}M~(Kj3-xsW_W zLSevivd(s9LHmE(IMM-p=Of1tSUdcN@sWQY*)TD3v;)}KuwnQZN4L3PIl6HN1!f&N z-d=Udy3w^0NJOtt>1z`GRl^{9^j<5Ea%2`FjvGocp{<&zjEL{A8eP9;czu(bPFxP# z^oEwi)U5DQ%!VSG$xllCo)h{J>#^ESFH)S%QqO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O2R> zAHGczPuV^1Z51H@27g?UZ}P_#`HB9xB0opQRr#Y4*UHa%AW;4o#Fg|;LjQP~-b(Cf z$10?Z<5^SKKgXZmN5miUr|U(0wT$B<7ZKm=k0*=xAJvafDegNQu4~l~A2TdRAgr&f z`QGpgPT`pnFG}i>AU?Fh%ds!Qbs=rY{sjD1dC0U5fzExvoDY=zBr`Bq2-!b{-=-sf z9|7rKhU+@;$9L=?VIAT^Z9M`ymcS}2&O%=UDENHBehR+&b;Z$!a9wLX46-jjf{Z1h F{|DRN+t>gA literal 0 HcmV?d00001 diff --git a/js/libs/localforage.min.js b/js/libs/localforage.min.js new file mode 100644 index 0000000..eb87534 --- /dev/null +++ b/js/libs/localforage.min.js @@ -0,0 +1,7 @@ +/*! + localForage -- Offline Storage, Improved + Version 1.7.3 + https://localforage.github.io/localForage + (c) 2013-2017 Mozilla, Apache License 2.0 +*/ +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.localforage=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=43)}}).catch(function(){return!1})}function n(a){return"boolean"==typeof xa?va.resolve(xa):m(a).then(function(a){return xa=a})}function o(a){var b=ya[a.name],c={};c.promise=new va(function(a,b){c.resolve=a,c.reject=b}),b.deferredOperations.push(c),b.dbReady?b.dbReady=b.dbReady.then(function(){return c.promise}):b.dbReady=c.promise}function p(a){var b=ya[a.name],c=b.deferredOperations.pop();if(c)return c.resolve(),c.promise}function q(a,b){var c=ya[a.name],d=c.deferredOperations.pop();if(d)return d.reject(b),d.promise}function r(a,b){return new va(function(c,d){if(ya[a.name]=ya[a.name]||B(),a.db){if(!b)return c(a.db);o(a),a.db.close()}var e=[a.name];b&&e.push(a.version);var f=ua.open.apply(ua,e);b&&(f.onupgradeneeded=function(b){var c=f.result;try{c.createObjectStore(a.storeName),b.oldVersion<=1&&c.createObjectStore(wa)}catch(c){if("ConstraintError"!==c.name)throw c;console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),f.onerror=function(a){a.preventDefault(),d(f.error)},f.onsuccess=function(){c(f.result),p(a)}})}function s(a){return r(a,!1)}function t(a){return r(a,!0)}function u(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.versiona.db.version;if(d&&(a.version!==b&&console.warn('The database "'+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),e||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function v(a){return new va(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function w(a){return g([l(atob(a.data))],{type:a.type})}function x(a){return a&&a.__local_forage_encoded_blob}function y(a){var b=this,c=b._initReady().then(function(){var a=ya[b._dbInfo.name];if(a&&a.dbReady)return a.dbReady});return i(c,a,a),c}function z(a){o(a);for(var b=ya[a.name],c=b.forages,d=0;d0&&(!a.db||"InvalidStateError"===e.name||"NotFoundError"===e.name))return va.resolve().then(function(){if(!a.db||"NotFoundError"===e.name&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),t(a)}).then(function(){return z(a).then(function(){A(a,b,c,d-1)})}).catch(c);c(e)}}function B(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function C(a){function b(){return va.resolve()}var c=this,d={db:null};if(a)for(var e in a)d[e]=a[e];var f=ya[d.name];f||(f=B(),ya[d.name]=f),f.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=y);for(var g=[],h=0;h>4,k[i++]=(15&d)<<4|e>>2,k[i++]=(3&e)<<6|63&f;return j}function O(a){var b,c=new Uint8Array(a),d="";for(b=0;b>2],d+=Da[(3&c[b])<<4|c[b+1]>>4],d+=Da[(15&c[b+1])<<2|c[b+2]>>6],d+=Da[63&c[b+2]];return c.length%3==2?d=d.substring(0,d.length-1)+"=":c.length%3==1&&(d=d.substring(0,d.length-2)+"=="),d}function P(a,b){var c="";if(a&&(c=Ua.call(a)),a&&("[object ArrayBuffer]"===c||a.buffer&&"[object ArrayBuffer]"===Ua.call(a.buffer))){var d,e=Ga;a instanceof ArrayBuffer?(d=a,e+=Ia):(d=a.buffer,"[object Int8Array]"===c?e+=Ka:"[object Uint8Array]"===c?e+=La:"[object Uint8ClampedArray]"===c?e+=Ma:"[object Int16Array]"===c?e+=Na:"[object Uint16Array]"===c?e+=Pa:"[object Int32Array]"===c?e+=Oa:"[object Uint32Array]"===c?e+=Qa:"[object Float32Array]"===c?e+=Ra:"[object Float64Array]"===c?e+=Sa:b(new Error("Failed to get type for BinaryArray"))),b(e+O(d))}else if("[object Blob]"===c){var f=new FileReader;f.onload=function(){var c=Ea+a.type+"~"+O(this.result);b(Ga+Ja+c)},f.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(c){console.error("Couldn't convert value into a JSON string: ",a),b(null,c)}}function Q(a){if(a.substring(0,Ha)!==Ga)return JSON.parse(a);var b,c=a.substring(Ta),d=a.substring(Ha,Ta);if(d===Ja&&Fa.test(c)){var e=c.match(Fa);b=e[1],c=c.substring(e[0].length)}var f=N(c);switch(d){case Ia:return f;case Ja:return g([f],{type:b});case Ka:return new Int8Array(f);case La:return new Uint8Array(f);case Ma:return new Uint8ClampedArray(f);case Na:return new Int16Array(f);case Pa:return new Uint16Array(f);case Oa:return new Int32Array(f);case Qa:return new Uint32Array(f);case Ra:return new Float32Array(f);case Sa:return new Float64Array(f);default:throw new Error("Unkown type: "+d)}}function R(a,b,c,d){a.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,d)}function S(a){var b=this,c={db:null};if(a)for(var d in a)c[d]="string"!=typeof a[d]?a[d].toString():a[d];var e=new va(function(a,d){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(a){return d(a)}c.db.transaction(function(e){R(e,c,function(){b._dbInfo=c,a()},function(a,b){d(b)})},d)});return c.serializer=Va,e}function T(a,b,c,d,e,f){a.executeSql(c,d,e,function(a,g){g.code===g.SYNTAX_ERR?a.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function(a,h){h.rows.length?f(a,g):R(a,b,function(){a.executeSql(c,d,e,f)},f)},f):f(a,g)},f)}function U(a,b){var c=this;a=j(a);var d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"SELECT * FROM "+e.storeName+" WHERE key = ? LIMIT 1",[a],function(a,c){var d=c.rows.length?c.rows.item(0).value:null;d&&(d=e.serializer.deserialize(d)),b(d)},function(a,b){d(b)})})}).catch(d)});return h(d,b),d}function V(a,b){var c=this,d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"SELECT * FROM "+e.storeName,[],function(c,d){for(var f=d.rows,g=f.length,h=0;h0)return void f(W.apply(e,[a,h,c,d-1]));g(b)}})})}).catch(g)});return h(f,c),f}function X(a,b,c){return W.apply(this,[a,b,c,1])}function Y(a,b){var c=this;a=j(a);var d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"DELETE FROM "+e.storeName+" WHERE key = ?",[a],function(){b()},function(a,b){d(b)})})}).catch(d)});return h(d,b),d}function Z(a){var b=this,c=new va(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){T(b,d,"DELETE FROM "+d.storeName,[],function(){a()},function(a,b){c(b)})})}).catch(c)});return h(c,a),c}function $(a){var b=this,c=new va(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){T(b,d,"SELECT COUNT(key) as c FROM "+d.storeName,[],function(b,c){var d=c.rows.item(0).c;a(d)},function(a,b){c(b)})})}).catch(c)});return h(c,a),c}function _(a,b){var c=this,d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"SELECT key FROM "+e.storeName+" WHERE id = ? LIMIT 1",[a+1],function(a,c){var d=c.rows.length?c.rows.item(0).key:null;b(d)},function(a,b){d(b)})})}).catch(d)});return h(d,b),d}function aa(a){var b=this,c=new va(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){T(b,d,"SELECT key FROM "+d.storeName,[],function(b,c){for(var d=[],e=0;e '__WebKitDatabaseInfoTable__'",[],function(c,d){for(var e=[],f=0;f0}function ha(a){var b=this,c={};if(a)for(var d in a)c[d]=a[d];return c.keyPrefix=ea(a,b._defaultConfig),ga()?(b._dbInfo=c,c.serializer=Va,va.resolve()):va.reject()}function ia(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo.keyPrefix,c=localStorage.length-1;c>=0;c--){var d=localStorage.key(c);0===d.indexOf(a)&&localStorage.removeItem(d)}});return h(c,a),c}function ja(a,b){var c=this;a=j(a);var d=c.ready().then(function(){var b=c._dbInfo,d=localStorage.getItem(b.keyPrefix+a);return d&&(d=b.serializer.deserialize(d)),d});return h(d,b),d}function ka(a,b){var c=this,d=c.ready().then(function(){for(var b=c._dbInfo,d=b.keyPrefix,e=d.length,f=localStorage.length,g=1,h=0;h=0;b--){var c=localStorage.key(b);0===c.indexOf(a)&&localStorage.removeItem(c)}}):va.reject("Invalid arguments"),h(d,b),d}function ra(a,b){a[b]=function(){var c=arguments;return a.ready().then(function(){return a[b].apply(a,c)})}}function sa(){for(var a=1;a>>6:(a<65536?e[r++]=224|a>>>12:(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63),e[r++]=128|a>>>6&63),e[r++]=128|63&a);return e},a.buf2binstring=function(t){return d(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,i=e.length;a>10&1023,o[i++]=56320|1023&n)}return d(o,i)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+h[t[a]]>e?a:e}},{"./common":3}],5:[function(t,e,a){"use strict";e.exports=function(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,i){var n=o,r=i+a;t^=-1;for(var s=i;s>>8^n[255&(t^e[s])];return-1^t}},{}],8:[function(t,e,a){"use strict";var l,_=t("../utils/common"),h=t("./trees"),u=t("./adler32"),c=t("./crc32"),i=t("./messages"),d=0,f=4,b=0,g=-2,m=-1,w=4,n=2,p=8,v=9,r=286,s=30,o=19,k=2*r+1,y=15,x=3,z=258,B=z+x+1,S=42,E=113,A=1,Z=2,R=3,C=4;function N(t,e){return t.msg=i[e],e}function O(t){return(t<<1)-(4t.avail_out&&(a=t.avail_out),0!==a&&(_.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function U(t,e){h._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,I(t.strm)}function T(t,e){t.pending_buf[t.pending++]=e}function F(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,h=t.window,d=t.w_mask,f=t.prev,_=t.strstart+z,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<_);if(i=z-(_-r),r=_-z,sl&&0!=--n);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,i,n,r,s,o,l,h,d,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-B)){for(_.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=a=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--a;);for(e=a=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--a;);n+=f}if(0===t.strm.avail_in)break;if(s=t.strm,o=t.window,l=t.strstart+t.lookahead,h=n,d=void 0,d=s.avail_in,h=x)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x)if(i=h._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=h._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===d)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,U(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-B&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):(t.strstart>t.block_start&&(U(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,j),new M(4,5,16,8,j),new M(4,6,32,32,j),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return G(t,e,p,15,8,0)},a.deflateInit2=G,a.deflateReset=q,a.deflateResetKeep=Y,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,b):g},a.deflate=function(t,e){var a,i,n,r;if(!t||!t.state||5>8&255),T(i,i.gzhead.time>>16&255),T(i,i.gzhead.time>>24&255),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(T(i,255&i.gzhead.extra.length),T(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=c(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(T(i,0),T(i,0),T(i,0),T(i,0),T(i,0),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,3),i.status=E);else{var s=p+(i.w_bits-8<<4)<<8;s|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(s|=32),s+=31-s%31,i.status=E,F(i,s),0!==i.strstart&&(F(i,t.adler>>>16),F(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending!==i.pending_buf_size));)T(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindexn&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindexn&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&I(t),i.pending+2<=i.pending_buf_size&&(T(i,255&t.adler),T(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(I(t),0===t.avail_out)return i.last_flush=-1,b}else if(0===t.avail_in&&O(e)<=O(a)&&e!==f)return N(t,-5);if(666===i.status&&0!==t.avail_in)return N(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==d&&666!==i.status){var o=2===i.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===d)return A;break}if(t.match_length=0,a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):3===i.strategy?function(t,e){for(var a,i,n,r,s=t.window;;){if(t.lookahead<=z){if(H(t),t.lookahead<=z&&e===d)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(a=h._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):l[i.level].func(i,e);if(o!==R&&o!==C||(i.status=666),o===A||o===R)return 0===t.avail_out&&(i.last_flush=-1),b;if(o===Z&&(1===e?h._tr_align(i):5!==e&&(h._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),I(t),0===t.avail_out))return i.last_flush=-1,b}return e!==f?b:i.wrap<=0?1:(2===i.wrap?(T(i,255&t.adler),T(i,t.adler>>8&255),T(i,t.adler>>16&255),T(i,t.adler>>24&255),T(i,255&t.total_in),T(i,t.total_in>>8&255),T(i,t.total_in>>16&255),T(i,t.total_in>>24&255)):(F(i,t.adler>>>16),F(i,65535&t.adler)),I(t),0=a.w_size&&(0===r&&(D(a.head),a.strstart=0,a.block_start=0,a.insert=0),h=new _.Buf8(a.w_size),_.arraySet(h,e,d-a.w_size,a.w_size,0),e=h,d=a.w_size),s=t.avail_in,o=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,H(a);a.lookahead>=x;){for(i=a.strstart,n=a.lookahead-(x-1);a.ins_h=(a.ins_h<>>=v=p>>>24,c-=v,0===(v=p>>>16&255))S[r++]=65535&p;else{if(!(16&v)){if(0==(64&v)){p=b[(65535&p)+(u&(1<>>=v,c-=v),c<15&&(u+=B[i++]<>>=v=p>>>24,c-=v,!(16&(v=p>>>16&255))){if(0==(64&v)){p=g[(65535&p)+(u&(1<>>=v,c-=v,(v=r-s)>3,u&=(1<<(c-=k<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Z.Buf16(320),this.work=new Z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function s(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=F,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Z.Buf32(i),e.distcode=e.distdyn=new Z.Buf32(n),e.sane=1,e.back=-1,U):T}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,s(t)):T}function l(t,e){var a,i;return t&&t.state?(i=t.state,e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=r.wsize?(Z.arraySet(r.window,e,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(i<(n=r.wsize-r.wnext)&&(n=i),Z.arraySet(r.window,e,a-i,n,r.wnext),(i-=n)?(Z.arraySet(r.window,e,a-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,a.check=C(a.check,E,2,0),d=h=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=30;break}if(8!=(15&h)){t.msg="unknown compression method",a.mode=30;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg="invalid window size",a.mode=30;break}a.dmax=1<>8&1),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=3;case 3:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<>>8&255,E[2]=h>>>16&255,E[3]=h>>>24&255,a.check=C(a.check,E,4,0)),d=h=0,a.mode=4;case 4:for(;d<16;){if(0===o)break t;o--,h+=i[r++]<>8),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[r++]<>>8&255,a.check=C(a.check,E,2,0)),d=h=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(o<(u=a.length)&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Z.arraySet(a.head.extra,i,r,u,y)),512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===o)break t;for(u=0;y=i[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y)),y&&u>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=12;break;case 10:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===o)break t;o--,h+=i[r++]<>>=1)){case 0:a.mode=14;break;case 1:if(H(a),a.mode=20,6!==e)break;h>>>=2,d-=2;break t;case 2:a.mode=17;break;case 3:t.msg="invalid block type",a.mode=30}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[r++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&h,d=h=0,a.mode=15,6===e)break t;case 15:a.mode=16;case 16:if(u=a.length){if(o>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,286>>=3,d-=3}for(;a.have<19;)a.lens[A[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=O(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=30;break}a.have=0,a.mode=19;case 19:for(;a.have>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=g,d-=g,a.lens[a.have++]=w;else{if(16===w){for(B=g+2;d>>=g,d-=g,0===a.have){t.msg="invalid bit length repeat",a.mode=30;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===w){for(B=g+3;d>>=g)),h>>>=3,d-=3}else{for(B=g+7;d>>=g)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=30;break}for(;u--;)a.lens[a.have++]=y}}if(30===a.mode)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,z={bits:a.lenbits},x=O(D,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=O(I,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=30;break}if(a.mode=20,6===e)break t;case 20:a.mode=21;case 21:if(6<=o&&258<=l){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,N(t,_),s=t.next_out,n=t.output,l=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,12===a.mode&&(a.back=-1);break}for(a.back=0;m=(S=a.lencode[h&(1<>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,a.length=w,0===m){a.mode=26;break}if(32&m){a.back=-1,a.mode=12;break}if(64&m){t.msg="invalid literal/length code",a.mode=30;break}a.extra=15&m,a.mode=22;case 22:if(a.extra){for(B=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;m=(S=a.distcode[h&(1<>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,64&m){t.msg="invalid distance code",a.mode=30;break}a.offset=w,a.extra=15&m,a.mode=24;case 24:if(a.extra){for(B=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(0===l)break t;if(u=_-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=30;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),b=a.window}else b=n,c=s-a.offset,u=a.length;for(lu?(b=N[O+s[p]],g=A[Z+s[p]]):(b=96,g=0),l=1<>z)+(h-=l)]=c<<24|b<<16|g|0,0!==h;);for(l=1<>=1;if(0!==l?(E&=l-1,E+=l):E=0,p++,0==--R[w]){if(w===k)break;w=e[a+s[p]]}if(y>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function F(t,e,a){t.bi_valid>n-a?(t.bi_buf|=e<>n-t.bi_valid,t.bi_valid+=a-n):(t.bi_buf|=e<>>=1,a<<=1,0<--e;);return a>>>1}function j(t,e,a){var i,n,r=new Array(m+1),s=0;for(i=1;i<=m;i++)r[i]=s=s+a[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=H(r[o]++,o))}}function K(t){var e;for(e=0;e<_;e++)t.dyn_ltree[2*e]=0;for(e=0;e>1;1<=a;a--)Y(t,r,a);for(n=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Y(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,Y(t,r,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,i,n,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,b=0;for(r=0;r<=m;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a>=7;i>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e>>3,(r=t.static_len+3+7>>>3)<=n&&(n=r)):n=r=a+5,a+4<=n&&-1!==e?Q(t,e,a,i):4===t.strategy||r===n?(F(t,2+(i?1:0),3),q(t,S,E)):(F(t,4+(i?1:0),3),function(t,e,a,i){var n;for(F(t,e-257,5),F(t,a-1,5),F(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(Z[a]+f+1)]++,t.dyn_dtree[2*U(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;F(t,2,3),L(t,w,S),16===(e=t).bi_valid?(T(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":3}],15:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/":[function(t,e,a){"use strict";var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); diff --git a/js/libs/pixi.js b/js/libs/pixi.js new file mode 100644 index 0000000..96b098f --- /dev/null +++ b/js/libs/pixi.js @@ -0,0 +1,45223 @@ +/*! + * pixi.js - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * pixi.js is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ +var PIXI = (function (exports) { + 'use strict'; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); + } + + function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; + } + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + function getCjsExportFromNamespace (n) { + return n && n['default'] || n; + } + + var promise = createCommonjsModule(function (module, exports) { + (function(global){ + + // + // Check for native Promise and it has correct interface + // + + var NativePromise = global['Promise']; + var nativePromiseSupported = + NativePromise && + // Some of these methods are missing from + // Firefox/Chrome experimental implementations + 'resolve' in NativePromise && + 'reject' in NativePromise && + 'all' in NativePromise && + 'race' in NativePromise && + // Older version of the spec had a resolver object + // as the arg rather than a function + (function(){ + var resolve; + new NativePromise(function(r){ resolve = r; }); + return typeof resolve === 'function'; + })(); + + + // + // export if necessary + // + + if ('object' !== 'undefined' && exports) + { + // node.js + exports.Promise = nativePromiseSupported ? NativePromise : Promise; + exports.Polyfill = Promise; + } + else + { + // AMD + if (typeof undefined == 'function' && undefined.amd) + { + undefined(function(){ + return nativePromiseSupported ? NativePromise : Promise; + }); + } + else + { + // in browser add to global + if (!nativePromiseSupported) + { global['Promise'] = Promise; } + } + } + + + // + // Polyfill + // + + var PENDING = 'pending'; + var SEALED = 'sealed'; + var FULFILLED = 'fulfilled'; + var REJECTED = 'rejected'; + var NOOP = function(){}; + + function isArray(value) { + return Object.prototype.toString.call(value) === '[object Array]'; + } + + // async calls + var asyncSetTimer = typeof setImmediate !== 'undefined' ? setImmediate : setTimeout; + var asyncQueue = []; + var asyncTimer; + + function asyncFlush(){ + // run promise callbacks + for (var i = 0; i < asyncQueue.length; i++) + { asyncQueue[i][0](asyncQueue[i][1]); } + + // reset async asyncQueue + asyncQueue = []; + asyncTimer = false; + } + + function asyncCall(callback, arg){ + asyncQueue.push([callback, arg]); + + if (!asyncTimer) + { + asyncTimer = true; + asyncSetTimer(asyncFlush, 0); + } + } + + + function invokeResolver(resolver, promise) { + function resolvePromise(value) { + resolve(promise, value); + } + + function rejectPromise(reason) { + reject(promise, reason); + } + + try { + resolver(resolvePromise, rejectPromise); + } catch(e) { + rejectPromise(e); + } + } + + function invokeCallback(subscriber){ + var owner = subscriber.owner; + var settled = owner.state_; + var value = owner.data_; + var callback = subscriber[settled]; + var promise = subscriber.then; + + if (typeof callback === 'function') + { + settled = FULFILLED; + try { + value = callback(value); + } catch(e) { + reject(promise, e); + } + } + + if (!handleThenable(promise, value)) + { + if (settled === FULFILLED) + { resolve(promise, value); } + + if (settled === REJECTED) + { reject(promise, value); } + } + } + + function handleThenable(promise, value) { + var resolved; + + try { + if (promise === value) + { throw new TypeError('A promises callback cannot return that same promise.'); } + + if (value && (typeof value === 'function' || typeof value === 'object')) + { + var then = value.then; // then should be retrived only once + + if (typeof then === 'function') + { + then.call(value, function(val){ + if (!resolved) + { + resolved = true; + + if (value !== val) + { resolve(promise, val); } + else + { fulfill(promise, val); } + } + }, function(reason){ + if (!resolved) + { + resolved = true; + + reject(promise, reason); + } + }); + + return true; + } + } + } catch (e) { + if (!resolved) + { reject(promise, e); } + + return true; + } + + return false; + } + + function resolve(promise, value){ + if (promise === value || !handleThenable(promise, value)) + { fulfill(promise, value); } + } + + function fulfill(promise, value){ + if (promise.state_ === PENDING) + { + promise.state_ = SEALED; + promise.data_ = value; + + asyncCall(publishFulfillment, promise); + } + } + + function reject(promise, reason){ + if (promise.state_ === PENDING) + { + promise.state_ = SEALED; + promise.data_ = reason; + + asyncCall(publishRejection, promise); + } + } + + function publish(promise) { + var callbacks = promise.then_; + promise.then_ = undefined; + + for (var i = 0; i < callbacks.length; i++) { + invokeCallback(callbacks[i]); + } + } + + function publishFulfillment(promise){ + promise.state_ = FULFILLED; + publish(promise); + } + + function publishRejection(promise){ + promise.state_ = REJECTED; + publish(promise); + } + + /** + * @class + */ + function Promise(resolver){ + if (typeof resolver !== 'function') + { throw new TypeError('Promise constructor takes a function argument'); } + + if (this instanceof Promise === false) + { throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); } + + this.then_ = []; + + invokeResolver(resolver, this); + } + + Promise.prototype = { + constructor: Promise, + + state_: PENDING, + then_: null, + data_: undefined, + + then: function(onFulfillment, onRejection){ + var subscriber = { + owner: this, + then: new this.constructor(NOOP), + fulfilled: onFulfillment, + rejected: onRejection + }; + + if (this.state_ === FULFILLED || this.state_ === REJECTED) + { + // already resolved, call callback async + asyncCall(invokeCallback, subscriber); + } + else + { + // subscribe + this.then_.push(subscriber); + } + + return subscriber.then; + }, + + 'catch': function(onRejection) { + return this.then(null, onRejection); + } + }; + + Promise.all = function(promises){ + var Class = this; + + if (!isArray(promises)) + { throw new TypeError('You must pass an array to Promise.all().'); } + + return new Class(function(resolve, reject){ + var results = []; + var remaining = 0; + + function resolver(index){ + remaining++; + return function(value){ + results[index] = value; + if (!--remaining) + { resolve(results); } + }; + } + + for (var i = 0, promise; i < promises.length; i++) + { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') + { promise.then(resolver(i), reject); } + else + { results[i] = promise; } + } + + if (!remaining) + { resolve(results); } + }); + }; + + Promise.race = function(promises){ + var Class = this; + + if (!isArray(promises)) + { throw new TypeError('You must pass an array to Promise.race().'); } + + return new Class(function(resolve, reject) { + for (var i = 0, promise; i < promises.length; i++) + { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') + { promise.then(resolve, reject); } + else + { resolve(promise); } + } + }); + }; + + Promise.resolve = function(value){ + var Class = this; + + if (value && typeof value === 'object' && value.constructor === Class) + { return value; } + + return new Class(function(resolve){ + resolve(value); + }); + }; + + Promise.reject = function(reason){ + var Class = this; + + return new Class(function(resolve, reject){ + reject(reason); + }); + }; + + })(typeof window != 'undefined' ? window : typeof commonjsGlobal != 'undefined' ? commonjsGlobal : typeof self != 'undefined' ? self : commonjsGlobal); + }); + var promise_1 = promise.Promise; + var promise_2 = promise.Polyfill; + + /* + object-assign + (c) Sindre Sorhus + @license MIT + */ + + 'use strict'; + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); + } + + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } + + var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { + var arguments$1 = arguments; + + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments$1[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; + }; + + /*! + * @pixi/polyfill - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/polyfill is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + // Support for IE 9 - 11 which does not include Promises + if (!window.Promise) + { + window.Promise = promise_2; + } + + // References: + + if (!Object.assign) + { + Object.assign = objectAssign; + } + + var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + // References: + // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ + // https://gist.github.com/1579671 + // http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision + // https://gist.github.com/timhall/4078614 + // https://github.com/Financial-Times/polyfill-service/tree/master/polyfills/requestAnimationFrame + + // Expected to be used with Browserfiy + // Browserify automatically detects the use of `global` and passes the + // correct reference of `global`, `self`, and finally `window` + + var ONE_FRAME_TIME = 16; + + // Date.now + if (!(Date.now && Date.prototype.getTime)) + { + Date.now = function now() + { + return new Date().getTime(); + }; + } + + // performance.now + if (!(commonjsGlobal$1.performance && commonjsGlobal$1.performance.now)) + { + var startTime = Date.now(); + + if (!commonjsGlobal$1.performance) + { + commonjsGlobal$1.performance = {}; + } + + commonjsGlobal$1.performance.now = function () { return Date.now() - startTime; }; + } + + // requestAnimationFrame + var lastTime = Date.now(); + var vendors = ['ms', 'moz', 'webkit', 'o']; + + for (var x = 0; x < vendors.length && !commonjsGlobal$1.requestAnimationFrame; ++x) + { + var p = vendors[x]; + + commonjsGlobal$1.requestAnimationFrame = commonjsGlobal$1[(p + "RequestAnimationFrame")]; + commonjsGlobal$1.cancelAnimationFrame = commonjsGlobal$1[(p + "CancelAnimationFrame")] || commonjsGlobal$1[(p + "CancelRequestAnimationFrame")]; + } + + if (!commonjsGlobal$1.requestAnimationFrame) + { + commonjsGlobal$1.requestAnimationFrame = function (callback) { + if (typeof callback !== 'function') + { + throw new TypeError((callback + "is not a function")); + } + + var currentTime = Date.now(); + var delay = ONE_FRAME_TIME + lastTime - currentTime; + + if (delay < 0) + { + delay = 0; + } + + lastTime = currentTime; + + return setTimeout(function () { + lastTime = Date.now(); + callback(performance.now()); + }, delay); + }; + } + + if (!commonjsGlobal$1.cancelAnimationFrame) + { + commonjsGlobal$1.cancelAnimationFrame = function (id) { return clearTimeout(id); }; + } + + // References: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign + + if (!Math.sign) + { + Math.sign = function mathSign(x) + { + x = Number(x); + + if (x === 0 || isNaN(x)) + { + return x; + } + + return x > 0 ? 1 : -1; + }; + } + + // References: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger + + if (!Number.isInteger) + { + Number.isInteger = function numberIsInteger(value) + { + return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; + }; + } + + if (!window.ArrayBuffer) + { + window.ArrayBuffer = Array; + } + + if (!window.Float32Array) + { + window.Float32Array = Array; + } + + if (!window.Uint32Array) + { + window.Uint32Array = Array; + } + + if (!window.Uint16Array) + { + window.Uint16Array = Array; + } + + if (!window.Uint8Array) + { + window.Uint8Array = Array; + } + + if (!window.Int32Array) + { + window.Int32Array = Array; + } + + var appleIphone = /iPhone/i; + var appleIpod = /iPod/i; + var appleTablet = /iPad/i; + var appleUniversal = /\biOS-universal(?:.+)Mac\b/i; + var androidPhone = /\bAndroid(?:.+)Mobile\b/i; + var androidTablet = /Android/i; + var amazonPhone = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i; + var amazonTablet = /Silk/i; + var windowsPhone = /Windows Phone/i; + var windowsTablet = /\bWindows(?:.+)ARM\b/i; + var otherBlackBerry = /BlackBerry/i; + var otherBlackBerry10 = /BB10/i; + var otherOpera = /Opera Mini/i; + var otherChrome = /\b(CriOS|Chrome)(?:.+)Mobile/i; + var otherFirefox = /Mobile(?:.+)Firefox\b/i; + var isAppleTabletOnIos13 = function (navigator) { + return (typeof navigator !== 'undefined' && + navigator.platform === 'MacIntel' && + typeof navigator.maxTouchPoints === 'number' && + navigator.maxTouchPoints > 1 && + typeof MSStream === 'undefined'); + }; + function createMatch(userAgent) { + return function (regex) { return regex.test(userAgent); }; + } + function isMobile(param) { + var nav = { + userAgent: '', + platform: '', + maxTouchPoints: 0 + }; + if (!param && typeof navigator !== 'undefined') { + nav = { + userAgent: navigator.userAgent, + platform: navigator.platform, + maxTouchPoints: navigator.maxTouchPoints || 0 + }; + } + else if (typeof param === 'string') { + nav.userAgent = param; + } + else if (param && param.userAgent) { + nav = { + userAgent: param.userAgent, + platform: param.platform, + maxTouchPoints: param.maxTouchPoints || 0 + }; + } + var userAgent = nav.userAgent; + var tmp = userAgent.split('[FBAN'); + if (typeof tmp[1] !== 'undefined') { + userAgent = tmp[0]; + } + tmp = userAgent.split('Twitter'); + if (typeof tmp[1] !== 'undefined') { + userAgent = tmp[0]; + } + var match = createMatch(userAgent); + var result = { + apple: { + phone: match(appleIphone) && !match(windowsPhone), + ipod: match(appleIpod), + tablet: !match(appleIphone) && + (match(appleTablet) || isAppleTabletOnIos13(nav)) && + !match(windowsPhone), + universal: match(appleUniversal), + device: (match(appleIphone) || + match(appleIpod) || + match(appleTablet) || + match(appleUniversal) || + isAppleTabletOnIos13(nav)) && + !match(windowsPhone) + }, + amazon: { + phone: match(amazonPhone), + tablet: !match(amazonPhone) && match(amazonTablet), + device: match(amazonPhone) || match(amazonTablet) + }, + android: { + phone: (!match(windowsPhone) && match(amazonPhone)) || + (!match(windowsPhone) && match(androidPhone)), + tablet: !match(windowsPhone) && + !match(amazonPhone) && + !match(androidPhone) && + (match(amazonTablet) || match(androidTablet)), + device: (!match(windowsPhone) && + (match(amazonPhone) || + match(amazonTablet) || + match(androidPhone) || + match(androidTablet))) || + match(/\bokhttp\b/i) + }, + windows: { + phone: match(windowsPhone), + tablet: match(windowsTablet), + device: match(windowsPhone) || match(windowsTablet) + }, + other: { + blackberry: match(otherBlackBerry), + blackberry10: match(otherBlackBerry10), + opera: match(otherOpera), + firefox: match(otherFirefox), + chrome: match(otherChrome), + device: match(otherBlackBerry) || + match(otherBlackBerry10) || + match(otherOpera) || + match(otherFirefox) || + match(otherChrome) + }, + any: false, + phone: false, + tablet: false + }; + result.any = + result.apple.device || + result.android.device || + result.windows.device || + result.other.device; + result.phone = + result.apple.phone || result.android.phone || result.windows.phone; + result.tablet = + result.apple.tablet || result.android.tablet || result.windows.tablet; + return result; + } + + /*! + * @pixi/settings - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/settings is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + // The ESM/CJS versions of ismobilejs only + + var isMobile$1 = isMobile(window.navigator); + + /** + * The maximum recommended texture units to use. + * In theory the bigger the better, and for desktop we'll use as many as we can. + * But some mobile devices slow down if there is to many branches in the shader. + * So in practice there seems to be a sweet spot size that varies depending on the device. + * + * In v4, all mobile devices were limited to 4 texture units because for this. + * In v5, we allow all texture units to be used on modern Apple or Android devices. + * + * @private + * @param {number} max + * @returns {number} + */ + function maxRecommendedTextures(max) + { + var allowMax = true; + + if (isMobile$1.tablet || isMobile$1.phone) + { + allowMax = false; + + if (isMobile$1.apple.device) + { + var match = (navigator.userAgent).match(/OS (\d+)_(\d+)?/); + + if (match) + { + var majorVersion = parseInt(match[1], 10); + + // All texture units can be used on devices that support ios 11 or above + if (majorVersion >= 11) + { + allowMax = true; + } + } + } + if (isMobile$1.android.device) + { + var match$1 = (navigator.userAgent).match(/Android\s([0-9.]*)/); + + if (match$1) + { + var majorVersion$1 = parseInt(match$1[1], 10); + + // All texture units can be used on devices that support Android 7 (Nougat) or above + if (majorVersion$1 >= 7) + { + allowMax = true; + } + } + } + } + + return allowMax ? max : 4; + } + + /** + * Uploading the same buffer multiple times in a single frame can cause performance issues. + * Apparent on iOS so only check for that at the moment + * This check may become more complex if this issue pops up elsewhere. + * + * @private + * @returns {boolean} + */ + function canUploadSameBuffer() + { + return !isMobile$1.apple.device; + } + + /** + * User's customizable globals for overriding the default PIXI settings, such + * as a renderer's default resolution, framerate, float precision, etc. + * @example + * // Use the native window resolution as the default resolution + * // will support high-density displays when rendering + * PIXI.settings.RESOLUTION = window.devicePixelRatio; + * + * // Disable interpolation when scaling, will make texture be pixelated + * PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST; + * @namespace PIXI.settings + */ + var settings = { + + /** + * If set to true WebGL will attempt make textures mimpaped by default. + * Mipmapping will only succeed if the base texture uploaded has power of two dimensions. + * + * @static + * @name MIPMAP_TEXTURES + * @memberof PIXI.settings + * @type {PIXI.MIPMAP_MODES} + * @default PIXI.MIPMAP_MODES.POW2 + */ + MIPMAP_TEXTURES: 1, + + /** + * Default anisotropic filtering level of textures. + * Usually from 0 to 16 + * + * @static + * @name ANISOTROPIC_LEVEL + * @memberof PIXI.settings + * @type {number} + * @default 0 + */ + ANISOTROPIC_LEVEL: 0, + + /** + * Default resolution / device pixel ratio of the renderer. + * + * @static + * @name RESOLUTION + * @memberof PIXI.settings + * @type {number} + * @default 1 + */ + RESOLUTION: 1, + + /** + * Default filter resolution. + * + * @static + * @name FILTER_RESOLUTION + * @memberof PIXI.settings + * @type {number} + * @default 1 + */ + FILTER_RESOLUTION: 1, + + /** + * The maximum textures that this device supports. + * + * @static + * @name SPRITE_MAX_TEXTURES + * @memberof PIXI.settings + * @type {number} + * @default 32 + */ + SPRITE_MAX_TEXTURES: maxRecommendedTextures(32), + + // TODO: maybe change to SPRITE.BATCH_SIZE: 2000 + // TODO: maybe add PARTICLE.BATCH_SIZE: 15000 + + /** + * The default sprite batch size. + * + * The default aims to balance desktop and mobile devices. + * + * @static + * @name SPRITE_BATCH_SIZE + * @memberof PIXI.settings + * @type {number} + * @default 4096 + */ + SPRITE_BATCH_SIZE: 4096, + + /** + * The default render options if none are supplied to {@link PIXI.Renderer} + * or {@link PIXI.CanvasRenderer}. + * + * @static + * @name RENDER_OPTIONS + * @memberof PIXI.settings + * @type {object} + * @property {HTMLCanvasElement} view=null + * @property {number} resolution=1 + * @property {boolean} antialias=false + * @property {boolean} forceFXAA=false + * @property {boolean} autoDensity=false + * @property {boolean} transparent=false + * @property {number} backgroundColor=0x000000 + * @property {boolean} clearBeforeRender=true + * @property {boolean} preserveDrawingBuffer=false + * @property {number} width=800 + * @property {number} height=600 + * @property {boolean} legacy=false + */ + RENDER_OPTIONS: { + view: null, + antialias: false, + forceFXAA: false, + autoDensity: false, + transparent: false, + backgroundColor: 0x000000, + clearBeforeRender: true, + preserveDrawingBuffer: false, + width: 800, + height: 600, + legacy: false, + }, + + /** + * Default Garbage Collection mode. + * + * @static + * @name GC_MODE + * @memberof PIXI.settings + * @type {PIXI.GC_MODES} + * @default PIXI.GC_MODES.AUTO + */ + GC_MODE: 0, + + /** + * Default Garbage Collection max idle. + * + * @static + * @name GC_MAX_IDLE + * @memberof PIXI.settings + * @type {number} + * @default 3600 + */ + GC_MAX_IDLE: 60 * 60, + + /** + * Default Garbage Collection maximum check count. + * + * @static + * @name GC_MAX_CHECK_COUNT + * @memberof PIXI.settings + * @type {number} + * @default 600 + */ + GC_MAX_CHECK_COUNT: 60 * 10, + + /** + * Default wrap modes that are supported by pixi. + * + * @static + * @name WRAP_MODE + * @memberof PIXI.settings + * @type {PIXI.WRAP_MODES} + * @default PIXI.WRAP_MODES.CLAMP + */ + WRAP_MODE: 33071, + + /** + * Default scale mode for textures. + * + * @static + * @name SCALE_MODE + * @memberof PIXI.settings + * @type {PIXI.SCALE_MODES} + * @default PIXI.SCALE_MODES.LINEAR + */ + SCALE_MODE: 1, + + /** + * Default specify float precision in vertex shader. + * + * @static + * @name PRECISION_VERTEX + * @memberof PIXI.settings + * @type {PIXI.PRECISION} + * @default PIXI.PRECISION.HIGH + */ + PRECISION_VERTEX: 'highp', + + /** + * Default specify float precision in fragment shader. + * iOS is best set at highp due to https://github.com/pixijs/pixi.js/issues/3742 + * + * @static + * @name PRECISION_FRAGMENT + * @memberof PIXI.settings + * @type {PIXI.PRECISION} + * @default PIXI.PRECISION.MEDIUM + */ + PRECISION_FRAGMENT: isMobile$1.apple.device ? 'highp' : 'mediump', + + /** + * Can we upload the same buffer in a single frame? + * + * @static + * @name CAN_UPLOAD_SAME_BUFFER + * @memberof PIXI.settings + * @type {boolean} + */ + CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(), + + /** + * Enables bitmap creation before image load. This feature is experimental. + * + * @static + * @name CREATE_IMAGE_BITMAP + * @memberof PIXI.settings + * @type {boolean} + * @default false + */ + CREATE_IMAGE_BITMAP: false, + + /** + * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. + * Advantages can include sharper image quality (like text) and faster rendering on canvas. + * The main disadvantage is movement of objects may appear less smooth. + * + * @static + * @constant + * @memberof PIXI.settings + * @type {boolean} + * @default false + */ + ROUND_PIXELS: false, + }; + + var eventemitter3 = createCommonjsModule(function (module) { + 'use strict'; + + var has = Object.prototype.hasOwnProperty + , prefix = '~'; + + /** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @private + */ + function Events() {} + + // + // We try to not inherit from `Object.prototype`. In some engines creating an + // instance in this way is faster than calling `Object.create(null)` directly. + // If `Object.create(null)` is not supported we prefix the event names with a + // character to make sure that the built-in object properties are not + // overridden or used as an attack vector. + // + if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) { prefix = false; } + } + + /** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @private + */ + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + + /** + * Add a listener for a given event. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} once Specify if the listener is a one-time listener. + * @returns {EventEmitter} + * @private + */ + function addListener(emitter, event, fn, context, once) { + if (typeof fn !== 'function') { + throw new TypeError('The listener must be a function'); + } + + var listener = new EE(fn, context || emitter, once) + , evt = prefix ? prefix + event : event; + + if (!emitter._events[evt]) { emitter._events[evt] = listener, emitter._eventsCount++; } + else if (!emitter._events[evt].fn) { emitter._events[evt].push(listener); } + else { emitter._events[evt] = [emitter._events[evt], listener]; } + + return emitter; + } + + /** + * Clear event by name. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} evt The Event name. + * @private + */ + function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) { emitter._events = new Events(); } + else { delete emitter._events[evt]; } + } + + /** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @public + */ + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + + /** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @public + */ + EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) { return names; } + + for (name in (events = this._events)) { + if (has.call(events, name)) { names.push(prefix ? name.slice(1) : name); } + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; + }; + + /** + * Return the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Array} The registered listeners. + * @public + */ + EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event + , handlers = this._events[evt]; + + if (!handlers) { return []; } + if (handlers.fn) { return [handlers.fn]; } + + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + + return ee; + }; + + /** + * Return the number of listeners listening to a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Number} The number of listeners. + * @public + */ + EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event + , listeners = this._events[evt]; + + if (!listeners) { return 0; } + if (listeners.fn) { return 1; } + return listeners.length; + }; + + /** + * Calls each of the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @public + */ + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var arguments$1 = arguments; + + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) { return false; } + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) { this.removeListener(event, listeners.fn, undefined, true); } + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments$1[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) { this.removeListener(event, listeners[i].fn, undefined, true); } + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) { for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments$1[j]; + } } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; + }; + + /** + * Add a listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); + }; + + /** + * Add a one-time listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.once = function once(event, fn, context) { + return addListener(this, event, fn, context, true); + }; + + /** + * Remove the listeners of a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {*} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) { return this; } + if (!fn) { + clearEvent(this, evt); + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn && + (!once || listeners.once) && + (!context || listeners.context === context) + ) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn || + (once && !listeners[i].once) || + (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) { this._events[evt] = events.length === 1 ? events[0] : events; } + else { clearEvent(this, evt); } + } + + return this; + }; + + /** + * Remove all listeners, or those of the specified event. + * + * @param {(String|Symbol)} [event] The event name. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) { clearEvent(this, evt); } + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; + }; + + // + // Alias methods names because people roll like that. + // + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + + // + // Expose the prefix. + // + EventEmitter.prefixed = prefix; + + // + // Allow `EventEmitter` to be imported as module namespace. + // + EventEmitter.EventEmitter = EventEmitter; + + // + // Expose the module. + // + if ('undefined' !== 'object') { + module.exports = EventEmitter; + } + }); + + 'use strict'; + + var earcut_1 = earcut; + var default_1 = earcut; + + function earcut(data, holeIndices, dim) { + + dim = dim || 2; + + var hasHoles = holeIndices && holeIndices.length, + outerLen = hasHoles ? holeIndices[0] * dim : data.length, + outerNode = linkedList(data, 0, outerLen, dim, true), + triangles = []; + + if (!outerNode || outerNode.next === outerNode.prev) { return triangles; } + + var minX, minY, maxX, maxY, x, y, invSize; + + if (hasHoles) { outerNode = eliminateHoles(data, holeIndices, outerNode, dim); } + + // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox + if (data.length > 80 * dim) { + minX = maxX = data[0]; + minY = maxY = data[1]; + + for (var i = dim; i < outerLen; i += dim) { + x = data[i]; + y = data[i + 1]; + if (x < minX) { minX = x; } + if (y < minY) { minY = y; } + if (x > maxX) { maxX = x; } + if (y > maxY) { maxY = y; } + } + + // minX, minY and invSize are later used to transform coords into integers for z-order calculation + invSize = Math.max(maxX - minX, maxY - minY); + invSize = invSize !== 0 ? 1 / invSize : 0; + } + + earcutLinked(outerNode, triangles, dim, minX, minY, invSize); + + return triangles; + } + + // create a circular doubly linked list from polygon points in the specified winding order + function linkedList(data, start, end, dim, clockwise) { + var i, last; + + if (clockwise === (signedArea(data, start, end, dim) > 0)) { + for (i = start; i < end; i += dim) { last = insertNode(i, data[i], data[i + 1], last); } + } else { + for (i = end - dim; i >= start; i -= dim) { last = insertNode(i, data[i], data[i + 1], last); } + } + + if (last && equals(last, last.next)) { + removeNode(last); + last = last.next; + } + + return last; + } + + // eliminate colinear or duplicate points + function filterPoints(start, end) { + if (!start) { return start; } + if (!end) { end = start; } + + var p = start, + again; + do { + again = false; + + if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) { + removeNode(p); + p = end = p.prev; + if (p === p.next) { break; } + again = true; + + } else { + p = p.next; + } + } while (again || p !== end); + + return end; + } + + // main ear slicing loop which triangulates a polygon (given as a linked list) + function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) { + if (!ear) { return; } + + // interlink polygon nodes in z-order + if (!pass && invSize) { indexCurve(ear, minX, minY, invSize); } + + var stop = ear, + prev, next; + + // iterate through ears, slicing them one by one + while (ear.prev !== ear.next) { + prev = ear.prev; + next = ear.next; + + if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) { + // cut off the triangle + triangles.push(prev.i / dim); + triangles.push(ear.i / dim); + triangles.push(next.i / dim); + + removeNode(ear); + + // skipping the next vertex leads to less sliver triangles + ear = next.next; + stop = next.next; + + continue; + } + + ear = next; + + // if we looped through the whole remaining polygon and can't find any more ears + if (ear === stop) { + // try filtering points and slicing again + if (!pass) { + earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1); + + // if this didn't work, try curing all small self-intersections locally + } else if (pass === 1) { + ear = cureLocalIntersections(filterPoints(ear), triangles, dim); + earcutLinked(ear, triangles, dim, minX, minY, invSize, 2); + + // as a last resort, try splitting the remaining polygon into two + } else if (pass === 2) { + splitEarcut(ear, triangles, dim, minX, minY, invSize); + } + + break; + } + } + } + + // check whether a polygon node forms a valid ear with adjacent nodes + function isEar(ear) { + var a = ear.prev, + b = ear, + c = ear.next; + + if (area(a, b, c) >= 0) { return false; } // reflex, can't be an ear + + // now make sure we don't have other points inside the potential ear + var p = ear.next.next; + + while (p !== ear.prev) { + if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && + area(p.prev, p, p.next) >= 0) { return false; } + p = p.next; + } + + return true; + } + + function isEarHashed(ear, minX, minY, invSize) { + var a = ear.prev, + b = ear, + c = ear.next; + + if (area(a, b, c) >= 0) { return false; } // reflex, can't be an ear + + // triangle bbox; min & max are calculated like this for speed + var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x), + minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y), + maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x), + maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y); + + // z-order range for the current triangle bbox; + var minZ = zOrder(minTX, minTY, minX, minY, invSize), + maxZ = zOrder(maxTX, maxTY, minX, minY, invSize); + + var p = ear.prevZ, + n = ear.nextZ; + + // look for points inside the triangle in both directions + while (p && p.z >= minZ && n && n.z <= maxZ) { + if (p !== ear.prev && p !== ear.next && + pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && + area(p.prev, p, p.next) >= 0) { return false; } + p = p.prevZ; + + if (n !== ear.prev && n !== ear.next && + pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && + area(n.prev, n, n.next) >= 0) { return false; } + n = n.nextZ; + } + + // look for remaining points in decreasing z-order + while (p && p.z >= minZ) { + if (p !== ear.prev && p !== ear.next && + pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && + area(p.prev, p, p.next) >= 0) { return false; } + p = p.prevZ; + } + + // look for remaining points in increasing z-order + while (n && n.z <= maxZ) { + if (n !== ear.prev && n !== ear.next && + pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && + area(n.prev, n, n.next) >= 0) { return false; } + n = n.nextZ; + } + + return true; + } + + // go through all polygon nodes and cure small local self-intersections + function cureLocalIntersections(start, triangles, dim) { + var p = start; + do { + var a = p.prev, + b = p.next.next; + + if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) { + + triangles.push(a.i / dim); + triangles.push(p.i / dim); + triangles.push(b.i / dim); + + // remove two nodes involved + removeNode(p); + removeNode(p.next); + + p = start = b; + } + p = p.next; + } while (p !== start); + + return filterPoints(p); + } + + // try splitting polygon into two and triangulate them independently + function splitEarcut(start, triangles, dim, minX, minY, invSize) { + // look for a valid diagonal that divides the polygon into two + var a = start; + do { + var b = a.next.next; + while (b !== a.prev) { + if (a.i !== b.i && isValidDiagonal(a, b)) { + // split the polygon in two by the diagonal + var c = splitPolygon(a, b); + + // filter colinear points around the cuts + a = filterPoints(a, a.next); + c = filterPoints(c, c.next); + + // run earcut on each half + earcutLinked(a, triangles, dim, minX, minY, invSize); + earcutLinked(c, triangles, dim, minX, minY, invSize); + return; + } + b = b.next; + } + a = a.next; + } while (a !== start); + } + + // link every hole into the outer loop, producing a single-ring polygon without holes + function eliminateHoles(data, holeIndices, outerNode, dim) { + var queue = [], + i, len, start, end, list; + + for (i = 0, len = holeIndices.length; i < len; i++) { + start = holeIndices[i] * dim; + end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; + list = linkedList(data, start, end, dim, false); + if (list === list.next) { list.steiner = true; } + queue.push(getLeftmost(list)); + } + + queue.sort(compareX); + + // process holes from left to right + for (i = 0; i < queue.length; i++) { + eliminateHole(queue[i], outerNode); + outerNode = filterPoints(outerNode, outerNode.next); + } + + return outerNode; + } + + function compareX(a, b) { + return a.x - b.x; + } + + // find a bridge between vertices that connects hole with an outer ring and and link it + function eliminateHole(hole, outerNode) { + outerNode = findHoleBridge(hole, outerNode); + if (outerNode) { + var b = splitPolygon(outerNode, hole); + + // filter collinear points around the cuts + filterPoints(outerNode, outerNode.next); + filterPoints(b, b.next); + } + } + + // David Eberly's algorithm for finding a bridge between hole and outer polygon + function findHoleBridge(hole, outerNode) { + var p = outerNode, + hx = hole.x, + hy = hole.y, + qx = -Infinity, + m; + + // find a segment intersected by a ray from the hole's leftmost point to the left; + // segment's endpoint with lesser x will be potential connection point + do { + if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) { + var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y); + if (x <= hx && x > qx) { + qx = x; + if (x === hx) { + if (hy === p.y) { return p; } + if (hy === p.next.y) { return p.next; } + } + m = p.x < p.next.x ? p : p.next; + } + } + p = p.next; + } while (p !== outerNode); + + if (!m) { return null; } + + if (hx === qx) { return m; } // hole touches outer segment; pick leftmost endpoint + + // look for points inside the triangle of hole point, segment intersection and endpoint; + // if there are no points found, we have a valid connection; + // otherwise choose the point of the minimum angle with the ray as connection point + + var stop = m, + mx = m.x, + my = m.y, + tanMin = Infinity, + tan; + + p = m; + + do { + if (hx >= p.x && p.x >= mx && hx !== p.x && + pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) { + + tan = Math.abs(hy - p.y) / (hx - p.x); // tangential + + if (locallyInside(p, hole) && + (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) { + m = p; + tanMin = tan; + } + } + + p = p.next; + } while (p !== stop); + + return m; + } + + // whether sector in vertex m contains sector in vertex p in the same coordinates + function sectorContainsSector(m, p) { + return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0; + } + + // interlink polygon nodes in z-order + function indexCurve(start, minX, minY, invSize) { + var p = start; + do { + if (p.z === null) { p.z = zOrder(p.x, p.y, minX, minY, invSize); } + p.prevZ = p.prev; + p.nextZ = p.next; + p = p.next; + } while (p !== start); + + p.prevZ.nextZ = null; + p.prevZ = null; + + sortLinked(p); + } + + // Simon Tatham's linked list merge sort algorithm + // http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html + function sortLinked(list) { + var i, p, q, e, tail, numMerges, pSize, qSize, + inSize = 1; + + do { + p = list; + list = null; + tail = null; + numMerges = 0; + + while (p) { + numMerges++; + q = p; + pSize = 0; + for (i = 0; i < inSize; i++) { + pSize++; + q = q.nextZ; + if (!q) { break; } + } + qSize = inSize; + + while (pSize > 0 || (qSize > 0 && q)) { + + if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) { + e = p; + p = p.nextZ; + pSize--; + } else { + e = q; + q = q.nextZ; + qSize--; + } + + if (tail) { tail.nextZ = e; } + else { list = e; } + + e.prevZ = tail; + tail = e; + } + + p = q; + } + + tail.nextZ = null; + inSize *= 2; + + } while (numMerges > 1); + + return list; + } + + // z-order of a point given coords and inverse of the longer side of data bbox + function zOrder(x, y, minX, minY, invSize) { + // coords are transformed into non-negative 15-bit integer range + x = 32767 * (x - minX) * invSize; + y = 32767 * (y - minY) * invSize; + + x = (x | (x << 8)) & 0x00FF00FF; + x = (x | (x << 4)) & 0x0F0F0F0F; + x = (x | (x << 2)) & 0x33333333; + x = (x | (x << 1)) & 0x55555555; + + y = (y | (y << 8)) & 0x00FF00FF; + y = (y | (y << 4)) & 0x0F0F0F0F; + y = (y | (y << 2)) & 0x33333333; + y = (y | (y << 1)) & 0x55555555; + + return x | (y << 1); + } + + // find the leftmost node of a polygon ring + function getLeftmost(start) { + var p = start, + leftmost = start; + do { + if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) { leftmost = p; } + p = p.next; + } while (p !== start); + + return leftmost; + } + + // check if a point lies within a convex triangle + function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) { + return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && + (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && + (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0; + } + + // check if a diagonal between two polygon nodes is valid (lies in polygon interior) + function isValidDiagonal(a, b) { + return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges + (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible + (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors + equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case + } + + // signed area of a triangle + function area(p, q, r) { + return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); + } + + // check if two points are equal + function equals(p1, p2) { + return p1.x === p2.x && p1.y === p2.y; + } + + // check if two segments intersect + function intersects(p1, q1, p2, q2) { + var o1 = sign(area(p1, q1, p2)); + var o2 = sign(area(p1, q1, q2)); + var o3 = sign(area(p2, q2, p1)); + var o4 = sign(area(p2, q2, q1)); + + if (o1 !== o2 && o3 !== o4) { return true; } // general case + + if (o1 === 0 && onSegment(p1, p2, q1)) { return true; } // p1, q1 and p2 are collinear and p2 lies on p1q1 + if (o2 === 0 && onSegment(p1, q2, q1)) { return true; } // p1, q1 and q2 are collinear and q2 lies on p1q1 + if (o3 === 0 && onSegment(p2, p1, q2)) { return true; } // p2, q2 and p1 are collinear and p1 lies on p2q2 + if (o4 === 0 && onSegment(p2, q1, q2)) { return true; } // p2, q2 and q1 are collinear and q1 lies on p2q2 + + return false; + } + + // for collinear points p, q, r, check if point q lies on segment pr + function onSegment(p, q, r) { + return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y); + } + + function sign(num) { + return num > 0 ? 1 : num < 0 ? -1 : 0; + } + + // check if a polygon diagonal intersects any polygon segments + function intersectsPolygon(a, b) { + var p = a; + do { + if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && + intersects(p, p.next, a, b)) { return true; } + p = p.next; + } while (p !== a); + + return false; + } + + // check if a polygon diagonal is locally inside the polygon + function locallyInside(a, b) { + return area(a.prev, a, a.next) < 0 ? + area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : + area(a, b, a.prev) < 0 || area(a, a.next, b) < 0; + } + + // check if the middle point of a polygon diagonal is inside the polygon + function middleInside(a, b) { + var p = a, + inside = false, + px = (a.x + b.x) / 2, + py = (a.y + b.y) / 2; + do { + if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y && + (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x)) + { inside = !inside; } + p = p.next; + } while (p !== a); + + return inside; + } + + // link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two; + // if one belongs to the outer ring and another to a hole, it merges it into a single ring + function splitPolygon(a, b) { + var a2 = new Node(a.i, a.x, a.y), + b2 = new Node(b.i, b.x, b.y), + an = a.next, + bp = b.prev; + + a.next = b; + b.prev = a; + + a2.next = an; + an.prev = a2; + + b2.next = a2; + a2.prev = b2; + + bp.next = b2; + b2.prev = bp; + + return b2; + } + + // create a node and optionally link it with previous one (in a circular doubly linked list) + function insertNode(i, x, y, last) { + var p = new Node(i, x, y); + + if (!last) { + p.prev = p; + p.next = p; + + } else { + p.next = last.next; + p.prev = last; + last.next.prev = p; + last.next = p; + } + return p; + } + + function removeNode(p) { + p.next.prev = p.prev; + p.prev.next = p.next; + + if (p.prevZ) { p.prevZ.nextZ = p.nextZ; } + if (p.nextZ) { p.nextZ.prevZ = p.prevZ; } + } + + function Node(i, x, y) { + // vertex index in coordinates array + this.i = i; + + // vertex coordinates + this.x = x; + this.y = y; + + // previous and next vertex nodes in a polygon ring + this.prev = null; + this.next = null; + + // z-order curve value + this.z = null; + + // previous and next nodes in z-order + this.prevZ = null; + this.nextZ = null; + + // indicates whether this is a steiner point + this.steiner = false; + } + + // return a percentage difference between the polygon area and its triangulation area; + // used to verify correctness of triangulation + earcut.deviation = function (data, holeIndices, dim, triangles) { + var hasHoles = holeIndices && holeIndices.length; + var outerLen = hasHoles ? holeIndices[0] * dim : data.length; + + var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim)); + if (hasHoles) { + for (var i = 0, len = holeIndices.length; i < len; i++) { + var start = holeIndices[i] * dim; + var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; + polygonArea -= Math.abs(signedArea(data, start, end, dim)); + } + } + + var trianglesArea = 0; + for (i = 0; i < triangles.length; i += 3) { + var a = triangles[i] * dim; + var b = triangles[i + 1] * dim; + var c = triangles[i + 2] * dim; + trianglesArea += Math.abs( + (data[a] - data[c]) * (data[b + 1] - data[a + 1]) - + (data[a] - data[b]) * (data[c + 1] - data[a + 1])); + } + + return polygonArea === 0 && trianglesArea === 0 ? 0 : + Math.abs((trianglesArea - polygonArea) / polygonArea); + }; + + function signedArea(data, start, end, dim) { + var sum = 0; + for (var i = start, j = end - dim; i < end; i += dim) { + sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]); + j = i; + } + return sum; + } + + // turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts + earcut.flatten = function (data) { + var dim = data[0][0].length, + result = {vertices: [], holes: [], dimensions: dim}, + holeIndex = 0; + + for (var i = 0; i < data.length; i++) { + for (var j = 0; j < data[i].length; j++) { + for (var d = 0; d < dim; d++) { result.vertices.push(data[i][j][d]); } + } + if (i > 0) { + holeIndex += data[i - 1].length; + result.holes.push(holeIndex); + } + } + return result; + }; + earcut_1.default = default_1; + + var punycode = createCommonjsModule(function (module, exports) { + /*! https://mths.be/punycode v1.3.2 by @mathias */ + ;(function(root) { + + /** Detect free variables */ + var freeExports = 'object' == 'object' && exports && + !exports.nodeType && exports; + var freeModule = 'object' == 'object' && module && + !module.nodeType && module; + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal; + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * http://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.3.2', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof undefined == 'function' && + typeof undefined.amd == 'object' && + undefined.amd + ) { + undefined('punycode', function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { // in Rhino or a web browser + root.punycode = punycode; + } + + }(commonjsGlobal)); + }); + + 'use strict'; + + var util = { + isString: function(arg) { + return typeof(arg) === 'string'; + }, + isObject: function(arg) { + return typeof(arg) === 'object' && arg !== null; + }, + isNull: function(arg) { + return arg === null; + }, + isNullOrUndefined: function(arg) { + return arg == null; + } + }; + var util_1 = util.isString; + var util_2 = util.isObject; + var util_3 = util.isNull; + var util_4 = util.isNullOrUndefined; + + // Copyright Joyent, Inc. and other Node contributors. + // + // Permission is hereby granted, free of charge, to any person obtaining a + // copy of this software and associated documentation files (the + // "Software"), to deal in the Software without restriction, including + // without limitation the rights to use, copy, modify, merge, publish, + // distribute, sublicense, and/or sell copies of the Software, and to permit + // persons to whom the Software is furnished to do so, subject to the + // following conditions: + // + // The above copyright notice and this permission notice shall be included + // in all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + 'use strict'; + + // If obj.hasOwnProperty has been overridden, then calling + // obj.hasOwnProperty(prop) will break. + // See: https://github.com/joyent/node/issues/1707 + function hasOwnProperty$1(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + var decode = function(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, vstr, k, v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty$1(obj, k)) { + obj[k] = v; + } else if (Array.isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; + }; + + // Copyright Joyent, Inc. and other Node contributors. + // + // Permission is hereby granted, free of charge, to any person obtaining a + // copy of this software and associated documentation files (the + // "Software"), to deal in the Software without restriction, including + // without limitation the rights to use, copy, modify, merge, publish, + // distribute, sublicense, and/or sell copies of the Software, and to permit + // persons to whom the Software is furnished to do so, subject to the + // following conditions: + // + // The above copyright notice and this permission notice shall be included + // in all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + 'use strict'; + + var stringifyPrimitive = function(v) { + switch (typeof v) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } + }; + + var encode = function(obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; + } + + if (typeof obj === 'object') { + return Object.keys(obj).map(function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (Array.isArray(obj[k])) { + return obj[k].map(function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + + } + + if (!name) { return ''; } + return encodeURIComponent(stringifyPrimitive(name)) + eq + + encodeURIComponent(stringifyPrimitive(obj)); + }; + + var querystring = createCommonjsModule(function (module, exports) { + 'use strict'; + + exports.decode = exports.parse = decode; + exports.encode = exports.stringify = encode; + }); + var querystring_1 = querystring.decode; + var querystring_2 = querystring.parse; + var querystring_3 = querystring.encode; + var querystring_4 = querystring.stringify; + + // Copyright Joyent, Inc. and other Node contributors. + // + // Permission is hereby granted, free of charge, to any person obtaining a + // copy of this software and associated documentation files (the + // "Software"), to deal in the Software without restriction, including + // without limitation the rights to use, copy, modify, merge, publish, + // distribute, sublicense, and/or sell copies of the Software, and to permit + // persons to whom the Software is furnished to do so, subject to the + // following conditions: + // + // The above copyright notice and this permission notice shall be included + // in all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + 'use strict'; + + + + + var parse = urlParse; + var resolve = urlResolve; + var resolveObject = urlResolveObject; + var format = urlFormat; + + var Url_1 = Url; + + function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; + } + + // Reference: RFC 3986, RFC 1808, RFC 2396 + + // define these here so at least they only have to be + // compiled once on the first module load. + var protocolPattern = /^([a-z0-9.+-]+:)/i, + portPattern = /:[0-9]*$/, + + // Special case for a simple path URL + simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, + + // RFC 2396: characters reserved for delimiting URLs. + // We actually just auto-escape these. + delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], + + // RFC 2396: characters not allowed for various reasons. + unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), + + // Allowed by RFCs, but cause of XSS attacks. Always escape these. + autoEscape = ['\''].concat(unwise), + // Characters that are never ever allowed in a hostname. + // Note that any invalid chars are also handled, but these + // are the ones that are *expected* to be seen, so we fast-path + // them. + nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), + hostEndingChars = ['/', '?', '#'], + hostnameMaxLen = 255, + hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, + // protocols that can allow "unsafe" and "unwise" chars. + unsafeProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that never have a hostname. + hostlessProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that always contain a // bit. + slashedProtocol = { + 'http': true, + 'https': true, + 'ftp': true, + 'gopher': true, + 'file': true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true + }; + + function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && util.isObject(url) && url instanceof Url) { return url; } + + var u = new Url; + u.parse(url, parseQueryString, slashesDenoteHost); + return u; + } + + Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + if (!util.isString(url)) { + throw new TypeError("Parameter 'url' must be a string, not " + typeof url); + } + + // Copy chrome, IE, opera backslash-handling behavior. + // Back slashes before the query string get converted to forward slashes + // See: https://code.google.com/p/chromium/issues/detail?id=25916 + var queryIndex = url.indexOf('?'), + splitter = + (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', + uSplit = url.split(splitter), + slashRegex = /\\/g; + uSplit[0] = uSplit[0].replace(slashRegex, '/'); + url = uSplit.join(splitter); + + var rest = url; + + // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + rest = rest.trim(); + + if (!slashesDenoteHost && url.split('#').length === 1) { + // Try fast path regexp + var simplePath = simplePathPattern.exec(rest); + if (simplePath) { + this.path = rest; + this.href = rest; + this.pathname = simplePath[1]; + if (simplePath[2]) { + this.search = simplePath[2]; + if (parseQueryString) { + this.query = querystring.parse(this.search.substr(1)); + } else { + this.query = this.search.substr(1); + } + } else if (parseQueryString) { + this.search = ''; + this.query = {}; + } + return this; + } + } + + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + this.protocol = lowerProto; + rest = rest.substr(proto.length); + } + + // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === '//'; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + + if (!hostlessProtocol[proto] && + (slashes || (proto && !slashedProtocol[proto]))) { + + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + + // find the first instance of any hostEndingChars + var hostEnd = -1; + for (var i = 0; i < hostEndingChars.length; i++) { + var hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + { hostEnd = hec; } + } + + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + var auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } + + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (var i = 0; i < nonHostChars.length; i++) { + var hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + { hostEnd = hec; } + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) + { hostEnd = rest.length; } + + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + // pull out port. + this.parseHost(); + + // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + this.hostname = this.hostname || ''; + + // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + var ipv6Hostname = this.hostname[0] === '[' && + this.hostname[this.hostname.length - 1] === ']'; + + // validate a little. + if (!ipv6Hostname) { + var hostparts = this.hostname.split(/\./); + for (var i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) { continue; } + if (!part.match(hostnamePartPattern)) { + var newpart = ''; + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } + // we test again with ASCII char only + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = '/' + notHost.join('.') + rest; + } + this.hostname = validParts.join('.'); + break; + } + } + } + } + + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ''; + } else { + // hostnames are always lower case. + this.hostname = this.hostname.toLowerCase(); + } + + if (!ipv6Hostname) { + // IDNA Support: Returns a punycoded representation of "domain". + // It only converts parts of the domain name that + // have non-ASCII characters, i.e. it doesn't matter if + // you call it with a domain that already is ASCII-only. + this.hostname = punycode.toASCII(this.hostname); + } + + var p = this.port ? ':' + this.port : ''; + var h = this.hostname || ''; + this.host = h + p; + this.href += this.host; + + // strip [ and ] from the hostname + // the host field still retains them, though + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + if (rest[0] !== '/') { + rest = '/' + rest; + } + } + } + + // now rest is set to the post-host stuff. + // chop off any delim chars. + if (!unsafeProtocol[lowerProto]) { + + // First, make 100% sure that any "autoEscape" chars get + // escaped, even if encodeURIComponent doesn't think they + // need to be. + for (var i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + if (rest.indexOf(ae) === -1) + { continue; } + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + + + // chop off from the tail first. + var hash = rest.indexOf('#'); + if (hash !== -1) { + // got a fragment string. + this.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + var qm = rest.indexOf('?'); + if (qm !== -1) { + this.search = rest.substr(qm); + this.query = rest.substr(qm + 1); + if (parseQueryString) { + this.query = querystring.parse(this.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + // no query string, but parseQueryString still requested + this.search = ''; + this.query = {}; + } + if (rest) { this.pathname = rest; } + if (slashedProtocol[lowerProto] && + this.hostname && !this.pathname) { + this.pathname = '/'; + } + + //to support http.request + if (this.pathname || this.search) { + var p = this.pathname || ''; + var s = this.search || ''; + this.path = p + s; + } + + // finally, reconstruct the href based on what has been validated. + this.href = this.format(); + return this; + }; + + // format a parsed object into a url string + function urlFormat(obj) { + // ensure it's an object, and not a string url. + // If it's an obj, this is a no-op. + // this way, you can call url_format() on strings + // to clean up potentially wonky urls. + if (util.isString(obj)) { obj = urlParse(obj); } + if (!(obj instanceof Url)) { return Url.prototype.format.call(obj); } + return obj.format(); + } + + Url.prototype.format = function() { + var auth = this.auth || ''; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ':'); + auth += '@'; + } + + var protocol = this.protocol || '', + pathname = this.pathname || '', + hash = this.hash || '', + host = false, + query = ''; + + if (this.host) { + host = auth + this.host; + } else if (this.hostname) { + host = auth + (this.hostname.indexOf(':') === -1 ? + this.hostname : + '[' + this.hostname + ']'); + if (this.port) { + host += ':' + this.port; + } + } + + if (this.query && + util.isObject(this.query) && + Object.keys(this.query).length) { + query = querystring.stringify(this.query); + } + + var search = this.search || (query && ('?' + query)) || ''; + + if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; } + + // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // unless they had them to begin with. + if (this.slashes || + (!protocol || slashedProtocol[protocol]) && host !== false) { + host = '//' + (host || ''); + if (pathname && pathname.charAt(0) !== '/') { pathname = '/' + pathname; } + } else if (!host) { + host = ''; + } + + if (hash && hash.charAt(0) !== '#') { hash = '#' + hash; } + if (search && search.charAt(0) !== '?') { search = '?' + search; } + + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace('#', '%23'); + + return protocol + host + pathname + search + hash; + }; + + function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); + } + + Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); + }; + + function urlResolveObject(source, relative) { + if (!source) { return relative; } + return urlParse(source, false, true).resolveObject(relative); + } + + Url.prototype.resolveObject = function(relative) { + if (util.isString(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + + var result = new Url(); + var tkeys = Object.keys(this); + for (var tk = 0; tk < tkeys.length; tk++) { + var tkey = tkeys[tk]; + result[tkey] = this[tkey]; + } + + // hash is always overridden, no matter what. + // even href="" will remove it. + result.hash = relative.hash; + + // if the relative url is empty, then there's nothing left to do here. + if (relative.href === '') { + result.href = result.format(); + return result; + } + + // hrefs like //foo/bar always cut to the protocol. + if (relative.slashes && !relative.protocol) { + // take everything except the protocol from relative + var rkeys = Object.keys(relative); + for (var rk = 0; rk < rkeys.length; rk++) { + var rkey = rkeys[rk]; + if (rkey !== 'protocol') + { result[rkey] = relative[rkey]; } + } + + //urlParse appends trailing / to urls like http://www.example.com + if (slashedProtocol[result.protocol] && + result.hostname && !result.pathname) { + result.path = result.pathname = '/'; + } + + result.href = result.format(); + return result; + } + + if (relative.protocol && relative.protocol !== result.protocol) { + // if it's a known url protocol, then changing + // the protocol does weird things + // first, if it's not file:, then we MUST have a host, + // and if there was a path + // to begin with, then we MUST have a path. + // if it is file:, then the host is dropped, + // because that's known to be hostless. + // anything else is assumed to be absolute. + if (!slashedProtocol[relative.protocol]) { + var keys = Object.keys(relative); + for (var v = 0; v < keys.length; v++) { + var k = keys[v]; + result[k] = relative[k]; + } + result.href = result.format(); + return result; + } + + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + var relPath = (relative.pathname || '').split('/'); + while (relPath.length && !(relative.host = relPath.shift())){ ; } + if (!relative.host) { relative.host = ''; } + if (!relative.hostname) { relative.hostname = ''; } + if (relPath[0] !== '') { relPath.unshift(''); } + if (relPath.length < 2) { relPath.unshift(''); } + result.pathname = relPath.join('/'); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ''; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + // to support http.request + if (result.pathname || result.search) { + var p = result.pathname || ''; + var s = result.search || ''; + result.path = p + s; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + + var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), + isRelAbs = ( + relative.host || + relative.pathname && relative.pathname.charAt(0) === '/' + ), + mustEndAbs = (isRelAbs || isSourceAbs || + (result.host && relative.pathname)), + removeAllDots = mustEndAbs, + srcPath = result.pathname && result.pathname.split('/') || [], + relPath = relative.pathname && relative.pathname.split('/') || [], + psychotic = result.protocol && !slashedProtocol[result.protocol]; + + // if the url is a non-slashed url, then relative + // links like ../.. should be able + // to crawl up to the hostname, as well. This is strange. + // result.protocol has already been set by now. + // Later on, put the first path part into the host field. + if (psychotic) { + result.hostname = ''; + result.port = null; + if (result.host) { + if (srcPath[0] === '') { srcPath[0] = result.host; } + else { srcPath.unshift(result.host); } + } + result.host = ''; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === '') { relPath[0] = relative.host; } + else { relPath.unshift(relative.host); } + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); + } + + if (isRelAbs) { + // it's absolute. + result.host = (relative.host || relative.host === '') ? + relative.host : result.host; + result.hostname = (relative.hostname || relative.hostname === '') ? + relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + // fall through to the dot-handling below. + } else if (relPath.length) { + // it's relative + // throw away the existing file, and take the new path instead. + if (!srcPath) { srcPath = []; } + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!util.isNullOrUndefined(relative.search)) { + // just pull out the search. + // like href='?foo'. + // Put this after the other two cases because it simplifies the booleans + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + //to support http.request + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.href = result.format(); + return result; + } + + if (!srcPath.length) { + // no path at all. easy. + // we've already handled the other stuff above. + result.pathname = null; + //to support http.request + if (result.search) { + result.path = '/' + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + + // if a url ENDs in . or .., then it must get a trailing slash. + // however, if it ends in anything else non-slashy, + // then it must NOT get a trailing slash. + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = ( + (result.host || relative.host || srcPath.length > 1) && + (last === '.' || last === '..') || last === ''); + + // strip single dots, resolve double dots to parent dir + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + if (last === '.') { + srcPath.splice(i, 1); + } else if (last === '..') { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift('..'); + } + } + + if (mustEndAbs && srcPath[0] !== '' && + (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { + srcPath.unshift(''); + } + + if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { + srcPath.push(''); + } + + var isAbsolute = srcPath[0] === '' || + (srcPath[0] && srcPath[0].charAt(0) === '/'); + + // put the host back + if (psychotic) { + result.hostname = result.host = isAbsolute ? '' : + srcPath.length ? srcPath.shift() : ''; + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + mustEndAbs = mustEndAbs || (result.host && srcPath.length); + + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(''); + } + + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join('/'); + } + + //to support request.http + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + }; + + Url.prototype.parseHost = function() { + var host = this.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ':') { + this.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) { this.hostname = host; } + }; + + var url = { + parse: parse, + resolve: resolve, + resolveObject: resolveObject, + format: format, + Url: Url_1 + }; + + /*! + * @pixi/constants - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/constants is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + /** + * Different types of environments for WebGL. + * + * @static + * @memberof PIXI + * @name ENV + * @enum {number} + * @property {number} WEBGL_LEGACY - Used for older v1 WebGL devices. PixiJS will aim to ensure compatibility + * with older / less advanced devices. If you experience unexplained flickering prefer this environment. + * @property {number} WEBGL - Version 1 of WebGL + * @property {number} WEBGL2 - Version 2 of WebGL + */ + + (function (ENV) { + ENV[ENV["WEBGL_LEGACY"] = 0] = "WEBGL_LEGACY"; + ENV[ENV["WEBGL"] = 1] = "WEBGL"; + ENV[ENV["WEBGL2"] = 2] = "WEBGL2"; + })(exports.ENV || (exports.ENV = {})); + /** + * Constant to identify the Renderer Type. + * + * @static + * @memberof PIXI + * @name RENDERER_TYPE + * @enum {number} + * @property {number} UNKNOWN - Unknown render type. + * @property {number} WEBGL - WebGL render type. + * @property {number} CANVAS - Canvas render type. + */ + + (function (RENDERER_TYPE) { + RENDERER_TYPE[RENDERER_TYPE["UNKNOWN"] = 0] = "UNKNOWN"; + RENDERER_TYPE[RENDERER_TYPE["WEBGL"] = 1] = "WEBGL"; + RENDERER_TYPE[RENDERER_TYPE["CANVAS"] = 2] = "CANVAS"; + })(exports.RENDERER_TYPE || (exports.RENDERER_TYPE = {})); + /** + * Various blend modes supported by PIXI. + * + * IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes. + * Anything else will silently act like NORMAL. + * + * @memberof PIXI + * @name BLEND_MODES + * @enum {number} + * @property {number} NORMAL + * @property {number} ADD + * @property {number} MULTIPLY + * @property {number} SCREEN + * @property {number} OVERLAY + * @property {number} DARKEN + * @property {number} LIGHTEN + * @property {number} COLOR_DODGE + * @property {number} COLOR_BURN + * @property {number} HARD_LIGHT + * @property {number} SOFT_LIGHT + * @property {number} DIFFERENCE + * @property {number} EXCLUSION + * @property {number} HUE + * @property {number} SATURATION + * @property {number} COLOR + * @property {number} LUMINOSITY + * @property {number} NORMAL_NPM + * @property {number} ADD_NPM + * @property {number} SCREEN_NPM + * @property {number} NONE + * @property {number} SRC_IN + * @property {number} SRC_OUT + * @property {number} SRC_ATOP + * @property {number} DST_OVER + * @property {number} DST_IN + * @property {number} DST_OUT + * @property {number} DST_ATOP + * @property {number} SUBTRACT + * @property {number} SRC_OVER + * @property {number} ERASE + * @property {number} XOR + */ + + (function (BLEND_MODES) { + BLEND_MODES[BLEND_MODES["NORMAL"] = 0] = "NORMAL"; + BLEND_MODES[BLEND_MODES["ADD"] = 1] = "ADD"; + BLEND_MODES[BLEND_MODES["MULTIPLY"] = 2] = "MULTIPLY"; + BLEND_MODES[BLEND_MODES["SCREEN"] = 3] = "SCREEN"; + BLEND_MODES[BLEND_MODES["OVERLAY"] = 4] = "OVERLAY"; + BLEND_MODES[BLEND_MODES["DARKEN"] = 5] = "DARKEN"; + BLEND_MODES[BLEND_MODES["LIGHTEN"] = 6] = "LIGHTEN"; + BLEND_MODES[BLEND_MODES["COLOR_DODGE"] = 7] = "COLOR_DODGE"; + BLEND_MODES[BLEND_MODES["COLOR_BURN"] = 8] = "COLOR_BURN"; + BLEND_MODES[BLEND_MODES["HARD_LIGHT"] = 9] = "HARD_LIGHT"; + BLEND_MODES[BLEND_MODES["SOFT_LIGHT"] = 10] = "SOFT_LIGHT"; + BLEND_MODES[BLEND_MODES["DIFFERENCE"] = 11] = "DIFFERENCE"; + BLEND_MODES[BLEND_MODES["EXCLUSION"] = 12] = "EXCLUSION"; + BLEND_MODES[BLEND_MODES["HUE"] = 13] = "HUE"; + BLEND_MODES[BLEND_MODES["SATURATION"] = 14] = "SATURATION"; + BLEND_MODES[BLEND_MODES["COLOR"] = 15] = "COLOR"; + BLEND_MODES[BLEND_MODES["LUMINOSITY"] = 16] = "LUMINOSITY"; + BLEND_MODES[BLEND_MODES["NORMAL_NPM"] = 17] = "NORMAL_NPM"; + BLEND_MODES[BLEND_MODES["ADD_NPM"] = 18] = "ADD_NPM"; + BLEND_MODES[BLEND_MODES["SCREEN_NPM"] = 19] = "SCREEN_NPM"; + BLEND_MODES[BLEND_MODES["NONE"] = 20] = "NONE"; + BLEND_MODES[BLEND_MODES["SRC_OVER"] = 0] = "SRC_OVER"; + BLEND_MODES[BLEND_MODES["SRC_IN"] = 21] = "SRC_IN"; + BLEND_MODES[BLEND_MODES["SRC_OUT"] = 22] = "SRC_OUT"; + BLEND_MODES[BLEND_MODES["SRC_ATOP"] = 23] = "SRC_ATOP"; + BLEND_MODES[BLEND_MODES["DST_OVER"] = 24] = "DST_OVER"; + BLEND_MODES[BLEND_MODES["DST_IN"] = 25] = "DST_IN"; + BLEND_MODES[BLEND_MODES["DST_OUT"] = 26] = "DST_OUT"; + BLEND_MODES[BLEND_MODES["DST_ATOP"] = 27] = "DST_ATOP"; + BLEND_MODES[BLEND_MODES["ERASE"] = 26] = "ERASE"; + BLEND_MODES[BLEND_MODES["SUBTRACT"] = 28] = "SUBTRACT"; + BLEND_MODES[BLEND_MODES["XOR"] = 29] = "XOR"; + })(exports.BLEND_MODES || (exports.BLEND_MODES = {})); + /** + * Various webgl draw modes. These can be used to specify which GL drawMode to use + * under certain situations and renderers. + * + * @memberof PIXI + * @static + * @name DRAW_MODES + * @enum {number} + * @property {number} POINTS + * @property {number} LINES + * @property {number} LINE_LOOP + * @property {number} LINE_STRIP + * @property {number} TRIANGLES + * @property {number} TRIANGLE_STRIP + * @property {number} TRIANGLE_FAN + */ + + (function (DRAW_MODES) { + DRAW_MODES[DRAW_MODES["POINTS"] = 0] = "POINTS"; + DRAW_MODES[DRAW_MODES["LINES"] = 1] = "LINES"; + DRAW_MODES[DRAW_MODES["LINE_LOOP"] = 2] = "LINE_LOOP"; + DRAW_MODES[DRAW_MODES["LINE_STRIP"] = 3] = "LINE_STRIP"; + DRAW_MODES[DRAW_MODES["TRIANGLES"] = 4] = "TRIANGLES"; + DRAW_MODES[DRAW_MODES["TRIANGLE_STRIP"] = 5] = "TRIANGLE_STRIP"; + DRAW_MODES[DRAW_MODES["TRIANGLE_FAN"] = 6] = "TRIANGLE_FAN"; + })(exports.DRAW_MODES || (exports.DRAW_MODES = {})); + /** + * Various GL texture/resources formats. + * + * @memberof PIXI + * @static + * @name FORMATS + * @enum {number} + * @property {number} RGBA=6408 + * @property {number} RGB=6407 + * @property {number} ALPHA=6406 + * @property {number} LUMINANCE=6409 + * @property {number} LUMINANCE_ALPHA=6410 + * @property {number} DEPTH_COMPONENT=6402 + * @property {number} DEPTH_STENCIL=34041 + */ + + (function (FORMATS) { + FORMATS[FORMATS["RGBA"] = 6408] = "RGBA"; + FORMATS[FORMATS["RGB"] = 6407] = "RGB"; + FORMATS[FORMATS["ALPHA"] = 6406] = "ALPHA"; + FORMATS[FORMATS["LUMINANCE"] = 6409] = "LUMINANCE"; + FORMATS[FORMATS["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA"; + FORMATS[FORMATS["DEPTH_COMPONENT"] = 6402] = "DEPTH_COMPONENT"; + FORMATS[FORMATS["DEPTH_STENCIL"] = 34041] = "DEPTH_STENCIL"; + })(exports.FORMATS || (exports.FORMATS = {})); + /** + * Various GL target types. + * + * @memberof PIXI + * @static + * @name TARGETS + * @enum {number} + * @property {number} TEXTURE_2D=3553 + * @property {number} TEXTURE_CUBE_MAP=34067 + * @property {number} TEXTURE_2D_ARRAY=35866 + * @property {number} TEXTURE_CUBE_MAP_POSITIVE_X=34069 + * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_X=34070 + * @property {number} TEXTURE_CUBE_MAP_POSITIVE_Y=34071 + * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_Y=34072 + * @property {number} TEXTURE_CUBE_MAP_POSITIVE_Z=34073 + * @property {number} TEXTURE_CUBE_MAP_NEGATIVE_Z=34074 + */ + + (function (TARGETS) { + TARGETS[TARGETS["TEXTURE_2D"] = 3553] = "TEXTURE_2D"; + TARGETS[TARGETS["TEXTURE_CUBE_MAP"] = 34067] = "TEXTURE_CUBE_MAP"; + TARGETS[TARGETS["TEXTURE_2D_ARRAY"] = 35866] = "TEXTURE_2D_ARRAY"; + TARGETS[TARGETS["TEXTURE_CUBE_MAP_POSITIVE_X"] = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X"; + TARGETS[TARGETS["TEXTURE_CUBE_MAP_NEGATIVE_X"] = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X"; + TARGETS[TARGETS["TEXTURE_CUBE_MAP_POSITIVE_Y"] = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y"; + TARGETS[TARGETS["TEXTURE_CUBE_MAP_NEGATIVE_Y"] = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y"; + TARGETS[TARGETS["TEXTURE_CUBE_MAP_POSITIVE_Z"] = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z"; + TARGETS[TARGETS["TEXTURE_CUBE_MAP_NEGATIVE_Z"] = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z"; + })(exports.TARGETS || (exports.TARGETS = {})); + /** + * Various GL data format types. + * + * @memberof PIXI + * @static + * @name TYPES + * @enum {number} + * @property {number} UNSIGNED_BYTE=5121 + * @property {number} UNSIGNED_SHORT=5123 + * @property {number} UNSIGNED_SHORT_5_6_5=33635 + * @property {number} UNSIGNED_SHORT_4_4_4_4=32819 + * @property {number} UNSIGNED_SHORT_5_5_5_1=32820 + * @property {number} FLOAT=5126 + * @property {number} HALF_FLOAT=36193 + */ + + (function (TYPES) { + TYPES[TYPES["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE"; + TYPES[TYPES["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT"; + TYPES[TYPES["UNSIGNED_SHORT_5_6_5"] = 33635] = "UNSIGNED_SHORT_5_6_5"; + TYPES[TYPES["UNSIGNED_SHORT_4_4_4_4"] = 32819] = "UNSIGNED_SHORT_4_4_4_4"; + TYPES[TYPES["UNSIGNED_SHORT_5_5_5_1"] = 32820] = "UNSIGNED_SHORT_5_5_5_1"; + TYPES[TYPES["FLOAT"] = 5126] = "FLOAT"; + TYPES[TYPES["HALF_FLOAT"] = 36193] = "HALF_FLOAT"; + })(exports.TYPES || (exports.TYPES = {})); + /** + * The scale modes that are supported by pixi. + * + * The {@link PIXI.settings.SCALE_MODE} scale mode affects the default scaling mode of future operations. + * It can be re-assigned to either LINEAR or NEAREST, depending upon suitability. + * + * @memberof PIXI + * @static + * @name SCALE_MODES + * @enum {number} + * @property {number} LINEAR Smooth scaling + * @property {number} NEAREST Pixelating scaling + */ + + (function (SCALE_MODES) { + SCALE_MODES[SCALE_MODES["NEAREST"] = 0] = "NEAREST"; + SCALE_MODES[SCALE_MODES["LINEAR"] = 1] = "LINEAR"; + })(exports.SCALE_MODES || (exports.SCALE_MODES = {})); + /** + * The wrap modes that are supported by pixi. + * + * The {@link PIXI.settings.WRAP_MODE} wrap mode affects the default wrapping mode of future operations. + * It can be re-assigned to either CLAMP or REPEAT, depending upon suitability. + * If the texture is non power of two then clamp will be used regardless as WebGL can + * only use REPEAT if the texture is po2. + * + * This property only affects WebGL. + * + * @name WRAP_MODES + * @memberof PIXI + * @static + * @enum {number} + * @property {number} CLAMP - The textures uvs are clamped + * @property {number} REPEAT - The texture uvs tile and repeat + * @property {number} MIRRORED_REPEAT - The texture uvs tile and repeat with mirroring + */ + + (function (WRAP_MODES) { + WRAP_MODES[WRAP_MODES["CLAMP"] = 33071] = "CLAMP"; + WRAP_MODES[WRAP_MODES["REPEAT"] = 10497] = "REPEAT"; + WRAP_MODES[WRAP_MODES["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT"; + })(exports.WRAP_MODES || (exports.WRAP_MODES = {})); + /** + * Mipmap filtering modes that are supported by pixi. + * + * The {@link PIXI.settings.MIPMAP_TEXTURES} affects default texture filtering. + * Mipmaps are generated for a baseTexture if its `mipmap` field is `ON`, + * or its `POW2` and texture dimensions are powers of 2. + * Due to platform restriction, `ON` option will work like `POW2` for webgl-1. + * + * This property only affects WebGL. + * + * @name MIPMAP_MODES + * @memberof PIXI + * @static + * @enum {number} + * @property {number} OFF - No mipmaps + * @property {number} POW2 - Generate mipmaps if texture dimensions are pow2 + * @property {number} ON - Always generate mipmaps + */ + + (function (MIPMAP_MODES) { + MIPMAP_MODES[MIPMAP_MODES["OFF"] = 0] = "OFF"; + MIPMAP_MODES[MIPMAP_MODES["POW2"] = 1] = "POW2"; + MIPMAP_MODES[MIPMAP_MODES["ON"] = 2] = "ON"; + })(exports.MIPMAP_MODES || (exports.MIPMAP_MODES = {})); + /** + * How to treat textures with premultiplied alpha + * + * @name ALPHA_MODES + * @memberof PIXI + * @static + * @enum {number} + * @property {number} NO_PREMULTIPLIED_ALPHA - Source is not premultiplied, leave it like that. + * Option for compressed and data textures that are created from typed arrays. + * @property {number} PREMULTIPLY_ON_UPLOAD - Source is not premultiplied, premultiply on upload. + * Default option, used for all loaded images. + * @property {number} PREMULTIPLIED_ALPHA - Source is already premultiplied + * Example: spine atlases with `_pma` suffix. + * @property {number} NPM - Alias for NO_PREMULTIPLIED_ALPHA. + * @property {number} UNPACK - Default option, alias for PREMULTIPLY_ON_UPLOAD. + * @property {number} PMA - Alias for PREMULTIPLIED_ALPHA. + */ + + (function (ALPHA_MODES) { + ALPHA_MODES[ALPHA_MODES["NPM"] = 0] = "NPM"; + ALPHA_MODES[ALPHA_MODES["UNPACK"] = 1] = "UNPACK"; + ALPHA_MODES[ALPHA_MODES["PMA"] = 2] = "PMA"; + ALPHA_MODES[ALPHA_MODES["NO_PREMULTIPLIED_ALPHA"] = 0] = "NO_PREMULTIPLIED_ALPHA"; + ALPHA_MODES[ALPHA_MODES["PREMULTIPLY_ON_UPLOAD"] = 1] = "PREMULTIPLY_ON_UPLOAD"; + ALPHA_MODES[ALPHA_MODES["PREMULTIPLY_ALPHA"] = 2] = "PREMULTIPLY_ALPHA"; + })(exports.ALPHA_MODES || (exports.ALPHA_MODES = {})); + /** + * The gc modes that are supported by pixi. + * + * The {@link PIXI.settings.GC_MODE} Garbage Collection mode for PixiJS textures is AUTO + * If set to GC_MODE, the renderer will occasionally check textures usage. If they are not + * used for a specified period of time they will be removed from the GPU. They will of course + * be uploaded again when they are required. This is a silent behind the scenes process that + * should ensure that the GPU does not get filled up. + * + * Handy for mobile devices! + * This property only affects WebGL. + * + * @name GC_MODES + * @enum {number} + * @static + * @memberof PIXI + * @property {number} AUTO - Garbage collection will happen periodically automatically + * @property {number} MANUAL - Garbage collection will need to be called manually + */ + + (function (GC_MODES) { + GC_MODES[GC_MODES["AUTO"] = 0] = "AUTO"; + GC_MODES[GC_MODES["MANUAL"] = 1] = "MANUAL"; + })(exports.GC_MODES || (exports.GC_MODES = {})); + /** + * Constants that specify float precision in shaders. + * + * @name PRECISION + * @memberof PIXI + * @constant + * @static + * @enum {string} + * @property {string} LOW='lowp' + * @property {string} MEDIUM='mediump' + * @property {string} HIGH='highp' + */ + + (function (PRECISION) { + PRECISION["LOW"] = "lowp"; + PRECISION["MEDIUM"] = "mediump"; + PRECISION["HIGH"] = "highp"; + })(exports.PRECISION || (exports.PRECISION = {})); + /** + * Constants for mask implementations. + * We use `type` suffix because it leads to very different behaviours + * + * @name MASK_TYPES + * @memberof PIXI + * @static + * @enum {number} + * @property {number} NONE - Mask is ignored + * @property {number} SCISSOR - Scissor mask, rectangle on screen, cheap + * @property {number} STENCIL - Stencil mask, 1-bit, medium, works only if renderer supports stencil + * @property {number} SPRITE - Mask that uses SpriteMaskFilter, uses temporary RenderTexture + */ + + (function (MASK_TYPES) { + MASK_TYPES[MASK_TYPES["NONE"] = 0] = "NONE"; + MASK_TYPES[MASK_TYPES["SCISSOR"] = 1] = "SCISSOR"; + MASK_TYPES[MASK_TYPES["STENCIL"] = 2] = "STENCIL"; + MASK_TYPES[MASK_TYPES["SPRITE"] = 3] = "SPRITE"; + })(exports.MASK_TYPES || (exports.MASK_TYPES = {})); + + /*! + * @pixi/utils - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/utils is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * The prefix that denotes a URL is for a retina asset. + * + * @static + * @name RETINA_PREFIX + * @memberof PIXI.settings + * @type {RegExp} + * @default /@([0-9\.]+)x/ + * @example `@2x` + */ + settings.RETINA_PREFIX = /@([0-9\.]+)x/; + /** + * Should the `failIfMajorPerformanceCaveat` flag be enabled as a context option used in the `isWebGLSupported` function. + * For most scenarios this should be left as true, as otherwise the user may have a poor experience. + * However, it can be useful to disable under certain scenarios, such as headless unit tests. + * + * @static + * @name FAIL_IF_MAJOR_PERFORMANCE_CAVEAT + * @memberof PIXI.settings + * @type {boolean} + * @default true + */ + settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = true; + + var saidHello = false; + var VERSION = '5.2.4'; + /** + * Skips the hello message of renderers that are created after this is run. + * + * @function skipHello + * @memberof PIXI.utils + */ + function skipHello() { + saidHello = true; + } + /** + * Logs out the version and renderer information for this running instance of PIXI. + * If you don't want to see this message you can run `PIXI.utils.skipHello()` before + * creating your renderer. Keep in mind that doing that will forever make you a jerk face. + * + * @static + * @function sayHello + * @memberof PIXI.utils + * @param {string} type - The string renderer type to log. + */ + function sayHello(type) { + var _a; + if (saidHello) { + return; + } + if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { + var args = [ + "\n %c %c %c PixiJS " + VERSION + " - \u2730 " + type + " \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665 \n\n", + 'background: #ff66a5; padding:5px 0;', + 'background: #ff66a5; padding:5px 0;', + 'color: #ff66a5; background: #030307; padding:5px 0;', + 'background: #ff66a5; padding:5px 0;', + 'background: #ffc3dc; padding:5px 0;', + 'background: #ff66a5; padding:5px 0;', + 'color: #ff2424; background: #fff; padding:5px 0;', + 'color: #ff2424; background: #fff; padding:5px 0;', + 'color: #ff2424; background: #fff; padding:5px 0;' ]; + (_a = window.console).log.apply(_a, args); + } + else if (window.console) { + window.console.log("PixiJS " + VERSION + " - " + type + " - http://www.pixijs.com/"); + } + saidHello = true; + } + + var supported; + /** + * Helper for checking for WebGL support. + * + * @memberof PIXI.utils + * @function isWebGLSupported + * @return {boolean} Is WebGL supported. + */ + function isWebGLSupported() { + if (typeof supported === 'undefined') { + supported = (function supported() { + var contextOptions = { + stencil: true, + failIfMajorPerformanceCaveat: settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT, + }; + try { + if (!window.WebGLRenderingContext) { + return false; + } + var canvas = document.createElement('canvas'); + var gl = (canvas.getContext('webgl', contextOptions) + || canvas.getContext('experimental-webgl', contextOptions)); + var success = !!(gl && gl.getContextAttributes().stencil); + if (gl) { + var loseContext = gl.getExtension('WEBGL_lose_context'); + if (loseContext) { + loseContext.loseContext(); + } + } + gl = null; + return success; + } + catch (e) { + return false; + } + })(); + } + return supported; + } + + /** + * Converts a hexadecimal color number to an [R, G, B] array of normalized floats (numbers from 0.0 to 1.0). + * + * @example + * PIXI.utils.hex2rgb(0xffffff); // returns [1, 1, 1] + * @memberof PIXI.utils + * @function hex2rgb + * @param {number} hex - The hexadecimal number to convert + * @param {number[]} [out=[]] If supplied, this array will be used rather than returning a new one + * @return {number[]} An array representing the [R, G, B] of the color where all values are floats. + */ + function hex2rgb(hex, out) { + out = out || []; + out[0] = ((hex >> 16) & 0xFF) / 255; + out[1] = ((hex >> 8) & 0xFF) / 255; + out[2] = (hex & 0xFF) / 255; + return out; + } + /** + * Converts a hexadecimal color number to a string. + * + * @example + * PIXI.utils.hex2string(0xffffff); // returns "#ffffff" + * @memberof PIXI.utils + * @function hex2string + * @param {number} hex - Number in hex (e.g., `0xffffff`) + * @return {string} The string color (e.g., `"#ffffff"`). + */ + function hex2string(hex) { + var hexString = hex.toString(16); + hexString = '000000'.substr(0, 6 - hexString.length) + hexString; + return "#" + hexString; + } + /** + * Converts a hexadecimal string to a hexadecimal color number. + * + * @example + * PIXI.utils.string2hex("#ffffff"); // returns 0xffffff + * @memberof PIXI.utils + * @function string2hex + * @param {string} The string color (e.g., `"#ffffff"`) + * @return {number} Number in hexadecimal. + */ + function string2hex(string) { + if (typeof string === 'string' && string[0] === '#') { + string = string.substr(1); + } + return parseInt(string, 16); + } + /** + * Converts a color as an [R, G, B] array of normalized floats to a hexadecimal number. + * + * @example + * PIXI.utils.rgb2hex([1, 1, 1]); // returns 0xffffff + * @memberof PIXI.utils + * @function rgb2hex + * @param {number[]} rgb - Array of numbers where all values are normalized floats from 0.0 to 1.0. + * @return {number} Number in hexadecimal. + */ + function rgb2hex(rgb) { + return (((rgb[0] * 255) << 16) + ((rgb[1] * 255) << 8) + (rgb[2] * 255 | 0)); + } + + /** + * Corrects PixiJS blend, takes premultiplied alpha into account + * + * @memberof PIXI.utils + * @function mapPremultipliedBlendModes + * @private + * @return {Array} Mapped modes. + */ + function mapPremultipliedBlendModes() { + var pm = []; + var npm = []; + for (var i = 0; i < 32; i++) { + pm[i] = i; + npm[i] = i; + } + pm[exports.BLEND_MODES.NORMAL_NPM] = exports.BLEND_MODES.NORMAL; + pm[exports.BLEND_MODES.ADD_NPM] = exports.BLEND_MODES.ADD; + pm[exports.BLEND_MODES.SCREEN_NPM] = exports.BLEND_MODES.SCREEN; + npm[exports.BLEND_MODES.NORMAL] = exports.BLEND_MODES.NORMAL_NPM; + npm[exports.BLEND_MODES.ADD] = exports.BLEND_MODES.ADD_NPM; + npm[exports.BLEND_MODES.SCREEN] = exports.BLEND_MODES.SCREEN_NPM; + var array = []; + array.push(npm); + array.push(pm); + return array; + } + /** + * maps premultiply flag and blendMode to adjusted blendMode + * @memberof PIXI.utils + * @const premultiplyBlendMode + * @type {Array} + */ + var premultiplyBlendMode = mapPremultipliedBlendModes(); + /** + * changes blendMode according to texture format + * + * @memberof PIXI.utils + * @function correctBlendMode + * @param {number} blendMode supposed blend mode + * @param {boolean} premultiplied whether source is premultiplied + * @returns {number} true blend mode for this texture + */ + function correctBlendMode(blendMode, premultiplied) { + return premultiplyBlendMode[premultiplied ? 1 : 0][blendMode]; + } + /** + * combines rgb and alpha to out array + * + * @memberof PIXI.utils + * @function premultiplyRgba + * @param {Float32Array|number[]} rgb input rgb + * @param {number} alpha alpha param + * @param {Float32Array} [out] output + * @param {boolean} [premultiply=true] do premultiply it + * @returns {Float32Array} vec4 rgba + */ + function premultiplyRgba(rgb, alpha, out, premultiply) { + out = out || new Float32Array(4); + if (premultiply || premultiply === undefined) { + out[0] = rgb[0] * alpha; + out[1] = rgb[1] * alpha; + out[2] = rgb[2] * alpha; + } + else { + out[0] = rgb[0]; + out[1] = rgb[1]; + out[2] = rgb[2]; + } + out[3] = alpha; + return out; + } + /** + * premultiplies tint + * + * @memberof PIXI.utils + * @function premultiplyTint + * @param {number} tint integer RGB + * @param {number} alpha floating point alpha (0.0-1.0) + * @returns {number} tint multiplied by alpha + */ + function premultiplyTint(tint, alpha) { + if (alpha === 1.0) { + return (alpha * 255 << 24) + tint; + } + if (alpha === 0.0) { + return 0; + } + var R = ((tint >> 16) & 0xFF); + var G = ((tint >> 8) & 0xFF); + var B = (tint & 0xFF); + R = ((R * alpha) + 0.5) | 0; + G = ((G * alpha) + 0.5) | 0; + B = ((B * alpha) + 0.5) | 0; + return (alpha * 255 << 24) + (R << 16) + (G << 8) + B; + } + /** + * converts integer tint and float alpha to vec4 form, premultiplies by default + * + * @memberof PIXI.utils + * @function premultiplyTintToRgba + * @param {number} tint input tint + * @param {number} alpha alpha param + * @param {Float32Array} [out] output + * @param {boolean} [premultiply=true] do premultiply it + * @returns {Float32Array} vec4 rgba + */ + function premultiplyTintToRgba(tint, alpha, out, premultiply) { + out = out || new Float32Array(4); + out[0] = ((tint >> 16) & 0xFF) / 255.0; + out[1] = ((tint >> 8) & 0xFF) / 255.0; + out[2] = (tint & 0xFF) / 255.0; + if (premultiply || premultiply === undefined) { + out[0] *= alpha; + out[1] *= alpha; + out[2] *= alpha; + } + out[3] = alpha; + return out; + } + + /** + * Generic Mask Stack data structure + * + * @memberof PIXI.utils + * @function createIndicesForQuads + * @param {number} size - Number of quads + * @param {Uint16Array|Uint32Array} [outBuffer] - Buffer for output, length has to be `6 * size` + * @return {Uint16Array|Uint32Array} - Resulting index buffer + */ + function createIndicesForQuads(size, outBuffer) { + if (outBuffer === void 0) { outBuffer = null; } + // the total number of indices in our array, there are 6 points per quad. + var totalIndices = size * 6; + outBuffer = outBuffer || new Uint16Array(totalIndices); + if (outBuffer.length !== totalIndices) { + throw new Error("Out buffer length is incorrect, got " + outBuffer.length + " and expected " + totalIndices); + } + // fill the indices with the quads to draw + for (var i = 0, j = 0; i < totalIndices; i += 6, j += 4) { + outBuffer[i + 0] = j + 0; + outBuffer[i + 1] = j + 1; + outBuffer[i + 2] = j + 2; + outBuffer[i + 3] = j + 0; + outBuffer[i + 4] = j + 2; + outBuffer[i + 5] = j + 3; + } + return outBuffer; + } + + function getBufferType(array) { + if (array.BYTES_PER_ELEMENT === 4) { + if (array instanceof Float32Array) { + return 'Float32Array'; + } + else if (array instanceof Uint32Array) { + return 'Uint32Array'; + } + return 'Int32Array'; + } + else if (array.BYTES_PER_ELEMENT === 2) { + if (array instanceof Uint16Array) { + return 'Uint16Array'; + } + } + else if (array.BYTES_PER_ELEMENT === 1) { + if (array instanceof Uint8Array) { + return 'Uint8Array'; + } + } + // TODO map out the rest of the array elements! + return null; + } + + /* eslint-disable object-shorthand */ + var map = { Float32Array: Float32Array, Uint32Array: Uint32Array, Int32Array: Int32Array, Uint8Array: Uint8Array }; + function interleaveTypedArrays(arrays, sizes) { + var outSize = 0; + var stride = 0; + var views = {}; + for (var i = 0; i < arrays.length; i++) { + stride += sizes[i]; + outSize += arrays[i].length; + } + var buffer = new ArrayBuffer(outSize * 4); + var out = null; + var littleOffset = 0; + for (var i = 0; i < arrays.length; i++) { + var size = sizes[i]; + var array = arrays[i]; + /* + @todo This is unsafe casting but consistent with how the code worked previously. Should it stay this way + or should and `getBufferTypeUnsafe` function be exposed that throws an Error if unsupported type is passed? + */ + var type = getBufferType(array); + if (!views[type]) { + views[type] = new map[type](buffer); + } + out = views[type]; + for (var j = 0; j < array.length; j++) { + var indexStart = ((j / size | 0) * stride) + littleOffset; + var index = j % size; + out[indexStart + index] = array[j]; + } + littleOffset += size; + } + return new Float32Array(buffer); + } + + // Taken from the bit-twiddle package + /** + * Rounds to next power of two. + * + * @function nextPow2 + * @memberof PIXI.utils + * @param {number} v input value + * @return {number} + */ + function nextPow2(v) { + v += v === 0 ? 1 : 0; + --v; + v |= v >>> 1; + v |= v >>> 2; + v |= v >>> 4; + v |= v >>> 8; + v |= v >>> 16; + return v + 1; + } + /** + * Checks if a number is a power of two. + * + * @function isPow2 + * @memberof PIXI.utils + * @param {number} v input value + * @return {boolean} `true` if value is power of two + */ + function isPow2(v) { + return !(v & (v - 1)) && (!!v); + } + /** + * Computes ceil of log base 2 + * + * @function log2 + * @memberof PIXI.utils + * @param {number} v input value + * @return {number} logarithm base 2 + */ + function log2(v) { + var r = (v > 0xFFFF ? 1 : 0) << 4; + v >>>= r; + var shift = (v > 0xFF ? 1 : 0) << 3; + v >>>= shift; + r |= shift; + shift = (v > 0xF ? 1 : 0) << 2; + v >>>= shift; + r |= shift; + shift = (v > 0x3 ? 1 : 0) << 1; + v >>>= shift; + r |= shift; + return r | (v >> 1); + } + + /** + * Remove items from a javascript array without generating garbage + * + * @function removeItems + * @memberof PIXI.utils + * @param {Array} arr Array to remove elements from + * @param {number} startIdx starting index + * @param {number} removeCount how many to remove + */ + function removeItems(arr, startIdx, removeCount) { + var length = arr.length; + var i; + if (startIdx >= length || removeCount === 0) { + return; + } + removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount); + var len = length - removeCount; + for (i = startIdx; i < len; ++i) { + arr[i] = arr[i + removeCount]; + } + arr.length = len; + } + + /** + * Returns sign of number + * + * @memberof PIXI.utils + * @function sign + * @param {number} n - the number to check the sign of + * @returns {number} 0 if `n` is 0, -1 if `n` is negative, 1 if `n` is positive + */ + function sign$1(n) { + if (n === 0) + { return 0; } + return n < 0 ? -1 : 1; + } + + var nextUid = 0; + /** + * Gets the next unique identifier + * + * @memberof PIXI.utils + * @function uid + * @return {number} The next unique identifier to use. + */ + function uid() { + return ++nextUid; + } + + // A map of warning messages already fired + var warnings = {}; + /** + * Helper for warning developers about deprecated features & settings. + * A stack track for warnings is given; useful for tracking-down where + * deprecated methods/properties/classes are being used within the code. + * + * @memberof PIXI.utils + * @function deprecation + * @param {string} version - The version where the feature became deprecated + * @param {string} message - Message should include what is deprecated, where, and the new solution + * @param {number} [ignoreDepth=3] - The number of steps to ignore at the top of the error stack + * this is mostly to ignore internal deprecation calls. + */ + function deprecation(version, message, ignoreDepth) { + if (ignoreDepth === void 0) { ignoreDepth = 3; } + // Ignore duplicat + if (warnings[message]) { + return; + } + /* eslint-disable no-console */ + var stack = new Error().stack; + // Handle IE < 10 and Safari < 6 + if (typeof stack === 'undefined') { + console.warn('PixiJS Deprecation Warning: ', message + "\nDeprecated since v" + version); + } + else { + // chop off the stack trace which includes PixiJS internal calls + stack = stack.split('\n').splice(ignoreDepth).join('\n'); + if (console.groupCollapsed) { + console.groupCollapsed('%cPixiJS Deprecation Warning: %c%s', 'color:#614108;background:#fffbe6', 'font-weight:normal;color:#614108;background:#fffbe6', message + "\nDeprecated since v" + version); + console.warn(stack); + console.groupEnd(); + } + else { + console.warn('PixiJS Deprecation Warning: ', message + "\nDeprecated since v" + version); + console.warn(stack); + } + } + /* eslint-enable no-console */ + warnings[message] = true; + } + + /** + * @todo Describe property usage + * + * @static + * @name ProgramCache + * @memberof PIXI.utils + * @type {Object} + */ + var ProgramCache = {}; + /** + * @todo Describe property usage + * + * @static + * @name TextureCache + * @memberof PIXI.utils + * @type {Object} + */ + var TextureCache = Object.create(null); + /** + * @todo Describe property usage + * + * @static + * @name BaseTextureCache + * @memberof PIXI.utils + * @type {Object} + */ + var BaseTextureCache = Object.create(null); + /** + * Destroys all texture in the cache + * + * @memberof PIXI.utils + * @function destroyTextureCache + */ + function destroyTextureCache() { + var key; + for (key in TextureCache) { + TextureCache[key].destroy(); + } + for (key in BaseTextureCache) { + BaseTextureCache[key].destroy(); + } + } + /** + * Removes all textures from cache, but does not destroy them + * + * @memberof PIXI.utils + * @function clearTextureCache + */ + function clearTextureCache() { + var key; + for (key in TextureCache) { + delete TextureCache[key]; + } + for (key in BaseTextureCache) { + delete BaseTextureCache[key]; + } + } + + /** + * Creates a Canvas element of the given size to be used as a target for rendering to. + * + * @class + * @memberof PIXI.utils + */ + var CanvasRenderTarget = /** @class */ (function () { + /** + * @param {number} width - the width for the newly created canvas + * @param {number} height - the height for the newly created canvas + * @param {number} [resolution=1] - The resolution / device pixel ratio of the canvas + */ + function CanvasRenderTarget(width, height, resolution) { + /** + * The Canvas object that belongs to this CanvasRenderTarget. + * + * @member {HTMLCanvasElement} + */ + this.canvas = document.createElement('canvas'); + /** + * A CanvasRenderingContext2D object representing a two-dimensional rendering context. + * + * @member {CanvasRenderingContext2D} + */ + this.context = this.canvas.getContext('2d'); + this.resolution = resolution || settings.RESOLUTION; + this.resize(width, height); + } + /** + * Clears the canvas that was created by the CanvasRenderTarget class. + * + * @private + */ + CanvasRenderTarget.prototype.clear = function () { + this.context.setTransform(1, 0, 0, 1, 0, 0); + this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); + }; + /** + * Resizes the canvas to the specified width and height. + * + * @param {number} width - the new width of the canvas + * @param {number} height - the new height of the canvas + */ + CanvasRenderTarget.prototype.resize = function (width, height) { + this.canvas.width = width * this.resolution; + this.canvas.height = height * this.resolution; + }; + /** + * Destroys this canvas. + * + */ + CanvasRenderTarget.prototype.destroy = function () { + this.context = null; + this.canvas = null; + }; + Object.defineProperty(CanvasRenderTarget.prototype, "width", { + /** + * The width of the canvas buffer in pixels. + * + * @member {number} + */ + get: function () { + return this.canvas.width; + }, + set: function (val) { + this.canvas.width = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CanvasRenderTarget.prototype, "height", { + /** + * The height of the canvas buffer in pixels. + * + * @member {number} + */ + get: function () { + return this.canvas.height; + }, + set: function (val) { + this.canvas.height = val; + }, + enumerable: true, + configurable: true + }); + return CanvasRenderTarget; + }()); + + /** + * Trim transparent borders from a canvas + * + * @memberof PIXI.utils + * @function trimCanvas + * @param {HTMLCanvasElement} canvas - the canvas to trim + * @returns {object} Trim data + */ + function trimCanvas(canvas) { + // https://gist.github.com/remy/784508 + var width = canvas.width; + var height = canvas.height; + var context = canvas.getContext('2d'); + var imageData = context.getImageData(0, 0, width, height); + var pixels = imageData.data; + var len = pixels.length; + var bound = { + top: null, + left: null, + right: null, + bottom: null, + }; + var data = null; + var i; + var x; + var y; + for (i = 0; i < len; i += 4) { + if (pixels[i + 3] !== 0) { + x = (i / 4) % width; + y = ~~((i / 4) / width); + if (bound.top === null) { + bound.top = y; + } + if (bound.left === null) { + bound.left = x; + } + else if (x < bound.left) { + bound.left = x; + } + if (bound.right === null) { + bound.right = x + 1; + } + else if (bound.right < x) { + bound.right = x + 1; + } + if (bound.bottom === null) { + bound.bottom = y; + } + else if (bound.bottom < y) { + bound.bottom = y; + } + } + } + if (bound.top !== null) { + width = bound.right - bound.left; + height = bound.bottom - bound.top + 1; + data = context.getImageData(bound.left, bound.top, width, height); + } + return { + height: height, + width: width, + data: data, + }; + } + + /** + * Regexp for data URI. + * Based on: {@link https://github.com/ragingwind/data-uri-regex} + * + * @static + * @constant {RegExp|string} DATA_URI + * @memberof PIXI + * @example data:image/png;base64 + */ + var DATA_URI = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i; + + /** + * @memberof PIXI.utils + * @interface DecomposedDataUri + */ + /** + * type, eg. `image` + * @memberof PIXI.utils.DecomposedDataUri# + * @member {string} mediaType + */ + /** + * Sub type, eg. `png` + * @memberof PIXI.utils.DecomposedDataUri# + * @member {string} subType + */ + /** + * @memberof PIXI.utils.DecomposedDataUri# + * @member {string} charset + */ + /** + * Data encoding, eg. `base64` + * @memberof PIXI.utils.DecomposedDataUri# + * @member {string} encoding + */ + /** + * The actual data + * @memberof PIXI.utils.DecomposedDataUri# + * @member {string} data + */ + /** + * Split a data URI into components. Returns undefined if + * parameter `dataUri` is not a valid data URI. + * + * @memberof PIXI.utils + * @function decomposeDataUri + * @param {string} dataUri - the data URI to check + * @return {PIXI.utils.DecomposedDataUri|undefined} The decomposed data uri or undefined + */ + function decomposeDataUri(dataUri) { + var dataUriMatch = DATA_URI.exec(dataUri); + if (dataUriMatch) { + return { + mediaType: dataUriMatch[1] ? dataUriMatch[1].toLowerCase() : undefined, + subType: dataUriMatch[2] ? dataUriMatch[2].toLowerCase() : undefined, + charset: dataUriMatch[3] ? dataUriMatch[3].toLowerCase() : undefined, + encoding: dataUriMatch[4] ? dataUriMatch[4].toLowerCase() : undefined, + data: dataUriMatch[5], + }; + } + return undefined; + } + + var tempAnchor; + /** + * Sets the `crossOrigin` property for this resource based on if the url + * for this resource is cross-origin. If crossOrigin was manually set, this + * function does nothing. + * Nipped from the resource loader! + * + * @ignore + * @param {string} url - The url to test. + * @param {object} [loc=window.location] - The location object to test against. + * @return {string} The crossOrigin value to use (or empty string for none). + */ + function determineCrossOrigin(url, loc) { + if (loc === void 0) { loc = window.location; } + // data: and javascript: urls are considered same-origin + if (url.indexOf('data:') === 0) { + return ''; + } + // default is window.location + loc = loc || window.location; + if (!tempAnchor) { + tempAnchor = document.createElement('a'); + } + // let the browser determine the full href for the url of this resource and then + // parse with the node url lib, we can't use the properties of the anchor element + // because they don't work in IE9 :( + tempAnchor.href = url; + var parsedUrl = parse(tempAnchor.href); + var samePort = (!parsedUrl.port && loc.port === '') || (parsedUrl.port === loc.port); + // if cross origin + if (parsedUrl.hostname !== loc.hostname || !samePort || parsedUrl.protocol !== loc.protocol) { + return 'anonymous'; + } + return ''; + } + + /** + * get the resolution / device pixel ratio of an asset by looking for the prefix + * used by spritesheets and image urls + * + * @memberof PIXI.utils + * @function getResolutionOfUrl + * @param {string} url - the image path + * @param {number} [defaultValue=1] - the defaultValue if no filename prefix is set. + * @return {number} resolution / device pixel ratio of an asset + */ + function getResolutionOfUrl(url, defaultValue) { + var resolution = settings.RETINA_PREFIX.exec(url); + if (resolution) { + return parseFloat(resolution[1]); + } + return defaultValue !== undefined ? defaultValue : 1; + } + + var utils_es = ({ + BaseTextureCache: BaseTextureCache, + CanvasRenderTarget: CanvasRenderTarget, + DATA_URI: DATA_URI, + ProgramCache: ProgramCache, + TextureCache: TextureCache, + clearTextureCache: clearTextureCache, + correctBlendMode: correctBlendMode, + createIndicesForQuads: createIndicesForQuads, + decomposeDataUri: decomposeDataUri, + deprecation: deprecation, + destroyTextureCache: destroyTextureCache, + determineCrossOrigin: determineCrossOrigin, + getBufferType: getBufferType, + getResolutionOfUrl: getResolutionOfUrl, + hex2rgb: hex2rgb, + hex2string: hex2string, + interleaveTypedArrays: interleaveTypedArrays, + isPow2: isPow2, + isWebGLSupported: isWebGLSupported, + log2: log2, + nextPow2: nextPow2, + premultiplyBlendMode: premultiplyBlendMode, + premultiplyRgba: premultiplyRgba, + premultiplyTint: premultiplyTint, + premultiplyTintToRgba: premultiplyTintToRgba, + removeItems: removeItems, + rgb2hex: rgb2hex, + sayHello: sayHello, + sign: sign$1, + skipHello: skipHello, + string2hex: string2hex, + trimCanvas: trimCanvas, + uid: uid, + isMobile: isMobile$1, + EventEmitter: eventemitter3, + earcut: earcut_1, + url: url + }); + + /*! + * @pixi/math - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/math is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + /** + * Common interface for points. Both Point and ObservablePoint implement it + * @memberof PIXI + * @interface IPoint + */ + /** + * X coord + * @memberof PIXI.IPoint# + * @member {number} x + */ + /** + * Y coord + * @memberof PIXI.IPoint# + * @member {number} y + */ + /** + * Sets the point to a new x and y position. + * If y is omitted, both x and y will be set to x. + * + * @method set + * @memberof PIXI.IPoint# + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=x] - position of the point on the y axis + */ + /** + * Copies x and y from the given point + * @method copyFrom + * @memberof PIXI.IPoint# + * @param {PIXI.IPoint} p - The point to copy from + * @returns {this} Returns itself. + */ + /** + * Copies x and y into the given point + * @method copyTo + * @memberof PIXI.IPoint# + * @param {PIXI.IPoint} p - The point to copy. + * @returns {PIXI.IPoint} Given point with values updated + */ + /** + * Returns true if the given point is equal to this point + * + * @method equals + * @memberof PIXI.IPoint# + * @param {PIXI.IPoint} p - The point to check + * @returns {boolean} Whether the given point equal to this point + */ + + /** + * The Point object represents a location in a two-dimensional coordinate system, where x represents + * the horizontal axis and y represents the vertical axis. + * + * @class + * @memberof PIXI + * @implements IPoint + */ + var Point = /** @class */ (function () { + /** + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=0] - position of the point on the y axis + */ + function Point(x, y) { + if (x === void 0) { x = 0; } + if (y === void 0) { y = 0; } + /** + * @member {number} + * @default 0 + */ + this.x = x; + /** + * @member {number} + * @default 0 + */ + this.y = y; + } + /** + * Creates a clone of this point + * + * @return {PIXI.Point} a copy of the point + */ + Point.prototype.clone = function () { + return new Point(this.x, this.y); + }; + /** + * Copies x and y from the given point + * + * @param {PIXI.IPoint} p - The point to copy from + * @returns {this} Returns itself. + */ + Point.prototype.copyFrom = function (p) { + this.set(p.x, p.y); + return this; + }; + /** + * Copies x and y into the given point + * + * @param {PIXI.IPoint} p - The point to copy. + * @returns {PIXI.IPoint} Given point with values updated + */ + Point.prototype.copyTo = function (p) { + p.set(this.x, this.y); + return p; + }; + /** + * Returns true if the given point is equal to this point + * + * @param {PIXI.IPoint} p - The point to check + * @returns {boolean} Whether the given point equal to this point + */ + Point.prototype.equals = function (p) { + return (p.x === this.x) && (p.y === this.y); + }; + /** + * Sets the point to a new x and y position. + * If y is omitted, both x and y will be set to x. + * + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=x] - position of the point on the y axis + * @returns {this} Returns itself. + */ + Point.prototype.set = function (x, y) { + if (x === void 0) { x = 0; } + if (y === void 0) { y = x; } + this.x = x; + this.y = y; + return this; + }; + return Point; + }()); + + /** + * The Point object represents a location in a two-dimensional coordinate system, where x represents + * the horizontal axis and y represents the vertical axis. + * + * An ObservablePoint is a point that triggers a callback when the point's position is changed. + * + * @class + * @memberof PIXI + * @implements IPoint + */ + var ObservablePoint = /** @class */ (function () { + /** + * @param {Function} cb - callback when changed + * @param {object} scope - owner of callback + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=0] - position of the point on the y axis + */ + function ObservablePoint(cb, scope, x, y) { + if (x === void 0) { x = 0; } + if (y === void 0) { y = 0; } + this._x = x; + this._y = y; + this.cb = cb; + this.scope = scope; + } + /** + * Creates a clone of this point. + * The callback and scope params can be overidden otherwise they will default + * to the clone object's values. + * + * @override + * @param {Function} [cb=null] - callback when changed + * @param {object} [scope=null] - owner of callback + * @return {PIXI.ObservablePoint} a copy of the point + */ + ObservablePoint.prototype.clone = function (cb, scope) { + if (cb === void 0) { cb = this.cb; } + if (scope === void 0) { scope = this.scope; } + return new ObservablePoint(cb, scope, this._x, this._y); + }; + /** + * Sets the point to a new x and y position. + * If y is omitted, both x and y will be set to x. + * + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=x] - position of the point on the y axis + * @returns {this} Returns itself. + */ + ObservablePoint.prototype.set = function (x, y) { + if (x === void 0) { x = 0; } + if (y === void 0) { y = x; } + if (this._x !== x || this._y !== y) { + this._x = x; + this._y = y; + this.cb.call(this.scope); + } + return this; + }; + /** + * Copies x and y from the given point + * + * @param {PIXI.IPoint} p - The point to copy from. + * @returns {this} Returns itself. + */ + ObservablePoint.prototype.copyFrom = function (p) { + if (this._x !== p.x || this._y !== p.y) { + this._x = p.x; + this._y = p.y; + this.cb.call(this.scope); + } + return this; + }; + /** + * Copies x and y into the given point + * + * @param {PIXI.IPoint} p - The point to copy. + * @returns {PIXI.IPoint} Given point with values updated + */ + ObservablePoint.prototype.copyTo = function (p) { + p.set(this._x, this._y); + return p; + }; + /** + * Returns true if the given point is equal to this point + * + * @param {PIXI.IPoint} p - The point to check + * @returns {boolean} Whether the given point equal to this point + */ + ObservablePoint.prototype.equals = function (p) { + return (p.x === this._x) && (p.y === this._y); + }; + Object.defineProperty(ObservablePoint.prototype, "x", { + /** + * The position of the displayObject on the x axis relative to the local coordinates of the parent. + * + * @member {number} + */ + get: function () { + return this._x; + }, + set: function (value) { + if (this._x !== value) { + this._x = value; + this.cb.call(this.scope); + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObservablePoint.prototype, "y", { + /** + * The position of the displayObject on the x axis relative to the local coordinates of the parent. + * + * @member {number} + */ + get: function () { + return this._y; + }, + set: function (value) { + if (this._y !== value) { + this._y = value; + this.cb.call(this.scope); + } + }, + enumerable: true, + configurable: true + }); + return ObservablePoint; + }()); + + /** + * Two Pi. + * + * @static + * @constant {number} PI_2 + * @memberof PIXI + */ + var PI_2 = Math.PI * 2; + /** + * Conversion factor for converting radians to degrees. + * + * @static + * @constant {number} RAD_TO_DEG + * @memberof PIXI + */ + var RAD_TO_DEG = 180 / Math.PI; + /** + * Conversion factor for converting degrees to radians. + * + * @static + * @constant {number} DEG_TO_RAD + * @memberof PIXI + */ + var DEG_TO_RAD = Math.PI / 180; + + (function (SHAPES) { + SHAPES[SHAPES["POLY"] = 0] = "POLY"; + SHAPES[SHAPES["RECT"] = 1] = "RECT"; + SHAPES[SHAPES["CIRC"] = 2] = "CIRC"; + SHAPES[SHAPES["ELIP"] = 3] = "ELIP"; + SHAPES[SHAPES["RREC"] = 4] = "RREC"; + })(exports.SHAPES || (exports.SHAPES = {})); + /** + * Constants that identify shapes, mainly to prevent `instanceof` calls. + * + * @static + * @constant + * @name SHAPES + * @memberof PIXI + * @type {enum} + * @property {number} POLY Polygon + * @property {number} RECT Rectangle + * @property {number} CIRC Circle + * @property {number} ELIP Ellipse + * @property {number} RREC Rounded Rectangle + * @enum {number} + */ + + /** + * The PixiJS Matrix as a class makes it a lot faster. + * + * Here is a representation of it: + * ```js + * | a | c | tx| + * | b | d | ty| + * | 0 | 0 | 1 | + * ``` + * @class + * @memberof PIXI + */ + var Matrix = /** @class */ (function () { + /** + * @param {number} [a=1] - x scale + * @param {number} [b=0] - x skew + * @param {number} [c=0] - y skew + * @param {number} [d=1] - y scale + * @param {number} [tx=0] - x translation + * @param {number} [ty=0] - y translation + */ + function Matrix(a, b, c, d, tx, ty) { + if (a === void 0) { a = 1; } + if (b === void 0) { b = 0; } + if (c === void 0) { c = 0; } + if (d === void 0) { d = 1; } + if (tx === void 0) { tx = 0; } + if (ty === void 0) { ty = 0; } + this.array = null; + /** + * @member {number} + * @default 1 + */ + this.a = a; + /** + * @member {number} + * @default 0 + */ + this.b = b; + /** + * @member {number} + * @default 0 + */ + this.c = c; + /** + * @member {number} + * @default 1 + */ + this.d = d; + /** + * @member {number} + * @default 0 + */ + this.tx = tx; + /** + * @member {number} + * @default 0 + */ + this.ty = ty; + } + /** + * Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows: + * + * a = array[0] + * b = array[1] + * c = array[3] + * d = array[4] + * tx = array[2] + * ty = array[5] + * + * @param {number[]} array - The array that the matrix will be populated from. + */ + Matrix.prototype.fromArray = function (array) { + this.a = array[0]; + this.b = array[1]; + this.c = array[3]; + this.d = array[4]; + this.tx = array[2]; + this.ty = array[5]; + }; + /** + * sets the matrix properties + * + * @param {number} a - Matrix component + * @param {number} b - Matrix component + * @param {number} c - Matrix component + * @param {number} d - Matrix component + * @param {number} tx - Matrix component + * @param {number} ty - Matrix component + * + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + Matrix.prototype.set = function (a, b, c, d, tx, ty) { + this.a = a; + this.b = b; + this.c = c; + this.d = d; + this.tx = tx; + this.ty = ty; + return this; + }; + /** + * Creates an array from the current Matrix object. + * + * @param {boolean} transpose - Whether we need to transpose the matrix or not + * @param {Float32Array} [out=new Float32Array(9)] - If provided the array will be assigned to out + * @return {number[]} the newly created array which contains the matrix + */ + Matrix.prototype.toArray = function (transpose, out) { + if (!this.array) { + this.array = new Float32Array(9); + } + var array = out || this.array; + if (transpose) { + array[0] = this.a; + array[1] = this.b; + array[2] = 0; + array[3] = this.c; + array[4] = this.d; + array[5] = 0; + array[6] = this.tx; + array[7] = this.ty; + array[8] = 1; + } + else { + array[0] = this.a; + array[1] = this.c; + array[2] = this.tx; + array[3] = this.b; + array[4] = this.d; + array[5] = this.ty; + array[6] = 0; + array[7] = 0; + array[8] = 1; + } + return array; + }; + /** + * Get a new position with the current transformation applied. + * Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering) + * + * @param {PIXI.Point} pos - The origin + * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input) + * @return {PIXI.Point} The new point, transformed through this matrix + */ + Matrix.prototype.apply = function (pos, newPos) { + newPos = newPos || new Point(); + var x = pos.x; + var y = pos.y; + newPos.x = (this.a * x) + (this.c * y) + this.tx; + newPos.y = (this.b * x) + (this.d * y) + this.ty; + return newPos; + }; + /** + * Get a new position with the inverse of the current transformation applied. + * Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input) + * + * @param {PIXI.Point} pos - The origin + * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input) + * @return {PIXI.Point} The new point, inverse-transformed through this matrix + */ + Matrix.prototype.applyInverse = function (pos, newPos) { + newPos = newPos || new Point(); + var id = 1 / ((this.a * this.d) + (this.c * -this.b)); + var x = pos.x; + var y = pos.y; + newPos.x = (this.d * id * x) + (-this.c * id * y) + (((this.ty * this.c) - (this.tx * this.d)) * id); + newPos.y = (this.a * id * y) + (-this.b * id * x) + (((-this.ty * this.a) + (this.tx * this.b)) * id); + return newPos; + }; + /** + * Translates the matrix on the x and y. + * + * @param {number} x How much to translate x by + * @param {number} y How much to translate y by + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + Matrix.prototype.translate = function (x, y) { + this.tx += x; + this.ty += y; + return this; + }; + /** + * Applies a scale transformation to the matrix. + * + * @param {number} x The amount to scale horizontally + * @param {number} y The amount to scale vertically + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + Matrix.prototype.scale = function (x, y) { + this.a *= x; + this.d *= y; + this.c *= x; + this.b *= y; + this.tx *= x; + this.ty *= y; + return this; + }; + /** + * Applies a rotation transformation to the matrix. + * + * @param {number} angle - The angle in radians. + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + Matrix.prototype.rotate = function (angle) { + var cos = Math.cos(angle); + var sin = Math.sin(angle); + var a1 = this.a; + var c1 = this.c; + var tx1 = this.tx; + this.a = (a1 * cos) - (this.b * sin); + this.b = (a1 * sin) + (this.b * cos); + this.c = (c1 * cos) - (this.d * sin); + this.d = (c1 * sin) + (this.d * cos); + this.tx = (tx1 * cos) - (this.ty * sin); + this.ty = (tx1 * sin) + (this.ty * cos); + return this; + }; + /** + * Appends the given Matrix to this Matrix. + * + * @param {PIXI.Matrix} matrix - The matrix to append. + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + Matrix.prototype.append = function (matrix) { + var a1 = this.a; + var b1 = this.b; + var c1 = this.c; + var d1 = this.d; + this.a = (matrix.a * a1) + (matrix.b * c1); + this.b = (matrix.a * b1) + (matrix.b * d1); + this.c = (matrix.c * a1) + (matrix.d * c1); + this.d = (matrix.c * b1) + (matrix.d * d1); + this.tx = (matrix.tx * a1) + (matrix.ty * c1) + this.tx; + this.ty = (matrix.tx * b1) + (matrix.ty * d1) + this.ty; + return this; + }; + /** + * Sets the matrix based on all the available properties + * + * @param {number} x - Position on the x axis + * @param {number} y - Position on the y axis + * @param {number} pivotX - Pivot on the x axis + * @param {number} pivotY - Pivot on the y axis + * @param {number} scaleX - Scale on the x axis + * @param {number} scaleY - Scale on the y axis + * @param {number} rotation - Rotation in radians + * @param {number} skewX - Skew on the x axis + * @param {number} skewY - Skew on the y axis + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + Matrix.prototype.setTransform = function (x, y, pivotX, pivotY, scaleX, scaleY, rotation, skewX, skewY) { + this.a = Math.cos(rotation + skewY) * scaleX; + this.b = Math.sin(rotation + skewY) * scaleX; + this.c = -Math.sin(rotation - skewX) * scaleY; + this.d = Math.cos(rotation - skewX) * scaleY; + this.tx = x - ((pivotX * this.a) + (pivotY * this.c)); + this.ty = y - ((pivotX * this.b) + (pivotY * this.d)); + return this; + }; + /** + * Prepends the given Matrix to this Matrix. + * + * @param {PIXI.Matrix} matrix - The matrix to prepend + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + Matrix.prototype.prepend = function (matrix) { + var tx1 = this.tx; + if (matrix.a !== 1 || matrix.b !== 0 || matrix.c !== 0 || matrix.d !== 1) { + var a1 = this.a; + var c1 = this.c; + this.a = (a1 * matrix.a) + (this.b * matrix.c); + this.b = (a1 * matrix.b) + (this.b * matrix.d); + this.c = (c1 * matrix.a) + (this.d * matrix.c); + this.d = (c1 * matrix.b) + (this.d * matrix.d); + } + this.tx = (tx1 * matrix.a) + (this.ty * matrix.c) + matrix.tx; + this.ty = (tx1 * matrix.b) + (this.ty * matrix.d) + matrix.ty; + return this; + }; + /** + * Decomposes the matrix (x, y, scaleX, scaleY, and rotation) and sets the properties on to a transform. + * + * @param {PIXI.Transform} transform - The transform to apply the properties to. + * @return {PIXI.Transform} The transform with the newly applied properties + */ + Matrix.prototype.decompose = function (transform) { + // sort out rotation / skew.. + var a = this.a; + var b = this.b; + var c = this.c; + var d = this.d; + var skewX = -Math.atan2(-c, d); + var skewY = Math.atan2(b, a); + var delta = Math.abs(skewX + skewY); + if (delta < 0.00001 || Math.abs(PI_2 - delta) < 0.00001) { + transform.rotation = skewY; + transform.skew.x = transform.skew.y = 0; + } + else { + transform.rotation = 0; + transform.skew.x = skewX; + transform.skew.y = skewY; + } + // next set scale + transform.scale.x = Math.sqrt((a * a) + (b * b)); + transform.scale.y = Math.sqrt((c * c) + (d * d)); + // next set position + transform.position.x = this.tx; + transform.position.y = this.ty; + return transform; + }; + /** + * Inverts this matrix + * + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + Matrix.prototype.invert = function () { + var a1 = this.a; + var b1 = this.b; + var c1 = this.c; + var d1 = this.d; + var tx1 = this.tx; + var n = (a1 * d1) - (b1 * c1); + this.a = d1 / n; + this.b = -b1 / n; + this.c = -c1 / n; + this.d = a1 / n; + this.tx = ((c1 * this.ty) - (d1 * tx1)) / n; + this.ty = -((a1 * this.ty) - (b1 * tx1)) / n; + return this; + }; + /** + * Resets this Matrix to an identity (default) matrix. + * + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + Matrix.prototype.identity = function () { + this.a = 1; + this.b = 0; + this.c = 0; + this.d = 1; + this.tx = 0; + this.ty = 0; + return this; + }; + /** + * Creates a new Matrix object with the same values as this one. + * + * @return {PIXI.Matrix} A copy of this matrix. Good for chaining method calls. + */ + Matrix.prototype.clone = function () { + var matrix = new Matrix(); + matrix.a = this.a; + matrix.b = this.b; + matrix.c = this.c; + matrix.d = this.d; + matrix.tx = this.tx; + matrix.ty = this.ty; + return matrix; + }; + /** + * Changes the values of the given matrix to be the same as the ones in this matrix + * + * @param {PIXI.Matrix} matrix - The matrix to copy to. + * @return {PIXI.Matrix} The matrix given in parameter with its values updated. + */ + Matrix.prototype.copyTo = function (matrix) { + matrix.a = this.a; + matrix.b = this.b; + matrix.c = this.c; + matrix.d = this.d; + matrix.tx = this.tx; + matrix.ty = this.ty; + return matrix; + }; + /** + * Changes the values of the matrix to be the same as the ones in given matrix + * + * @param {PIXI.Matrix} matrix - The matrix to copy from. + * @return {PIXI.Matrix} this + */ + Matrix.prototype.copyFrom = function (matrix) { + this.a = matrix.a; + this.b = matrix.b; + this.c = matrix.c; + this.d = matrix.d; + this.tx = matrix.tx; + this.ty = matrix.ty; + return this; + }; + Object.defineProperty(Matrix, "IDENTITY", { + /** + * A default (identity) matrix + * + * @static + * @const + * @member {PIXI.Matrix} + */ + get: function () { + return new Matrix(); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Matrix, "TEMP_MATRIX", { + /** + * A temp matrix + * + * @static + * @const + * @member {PIXI.Matrix} + */ + get: function () { + return new Matrix(); + }, + enumerable: true, + configurable: true + }); + return Matrix; + }()); + + // Your friendly neighbour https://en.wikipedia.org/wiki/Dihedral_group + /* + * Transform matrix for operation n is: + * | ux | vx | + * | uy | vy | + */ + var ux = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1]; + var uy = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1]; + var vx = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1]; + var vy = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1]; + /** + * [Cayley Table]{@link https://en.wikipedia.org/wiki/Cayley_table} + * for the composition of each rotation in the dihederal group D8. + * + * @type number[][] + * @private + */ + var rotationCayley = []; + /** + * Matrices for each `GD8Symmetry` rotation. + * + * @type Matrix[] + * @private + */ + var rotationMatrices = []; + /* + * Alias for {@code Math.sign}. + */ + var signum = Math.sign; + /* + * Initializes `rotationCayley` and `rotationMatrices`. It is called + * only once below. + */ + function init() { + for (var i = 0; i < 16; i++) { + var row = []; + rotationCayley.push(row); + for (var j = 0; j < 16; j++) { + /* Multiplies rotation matrices i and j. */ + var _ux = signum((ux[i] * ux[j]) + (vx[i] * uy[j])); + var _uy = signum((uy[i] * ux[j]) + (vy[i] * uy[j])); + var _vx = signum((ux[i] * vx[j]) + (vx[i] * vy[j])); + var _vy = signum((uy[i] * vx[j]) + (vy[i] * vy[j])); + /* Finds rotation matrix matching the product and pushes it. */ + for (var k = 0; k < 16; k++) { + if (ux[k] === _ux && uy[k] === _uy + && vx[k] === _vx && vy[k] === _vy) { + row.push(k); + break; + } + } + } + } + for (var i = 0; i < 16; i++) { + var mat = new Matrix(); + mat.set(ux[i], uy[i], vx[i], vy[i], 0, 0); + rotationMatrices.push(mat); + } + } + init(); + /** + * @memberof PIXI + * @typedef {number} GD8Symmetry + * @see PIXI.groupD8 + */ + /** + * Implements the dihedral group D8, which is similar to + * [group D4]{@link http://mathworld.wolfram.com/DihedralGroupD4.html}; + * D8 is the same but with diagonals, and it is used for texture + * rotations. + * + * The directions the U- and V- axes after rotation + * of an angle of `a: GD8Constant` are the vectors `(uX(a), uY(a))` + * and `(vX(a), vY(a))`. These aren't necessarily unit vectors. + * + * **Origin:**
+ * This is the small part of gameofbombs.com portal system. It works. + * + * @see PIXI.groupD8.E + * @see PIXI.groupD8.SE + * @see PIXI.groupD8.S + * @see PIXI.groupD8.SW + * @see PIXI.groupD8.W + * @see PIXI.groupD8.NW + * @see PIXI.groupD8.N + * @see PIXI.groupD8.NE + * @author Ivan @ivanpopelyshev + * @namespace PIXI.groupD8 + * @memberof PIXI + */ + var groupD8 = { + /** + * | Rotation | Direction | + * |----------|-----------| + * | 0° | East | + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + E: 0, + /** + * | Rotation | Direction | + * |----------|-----------| + * | 45°↻ | Southeast | + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + SE: 1, + /** + * | Rotation | Direction | + * |----------|-----------| + * | 90°↻ | South | + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + S: 2, + /** + * | Rotation | Direction | + * |----------|-----------| + * | 135°↻ | Southwest | + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + SW: 3, + /** + * | Rotation | Direction | + * |----------|-----------| + * | 180° | West | + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + W: 4, + /** + * | Rotation | Direction | + * |-------------|--------------| + * | -135°/225°↻ | Northwest | + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + NW: 5, + /** + * | Rotation | Direction | + * |-------------|--------------| + * | -90°/270°↻ | North | + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + N: 6, + /** + * | Rotation | Direction | + * |-------------|--------------| + * | -45°/315°↻ | Northeast | + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + NE: 7, + /** + * Reflection about Y-axis. + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + MIRROR_VERTICAL: 8, + /** + * Reflection about the main diagonal. + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + MAIN_DIAGONAL: 10, + /** + * Reflection about X-axis. + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + MIRROR_HORIZONTAL: 12, + /** + * Reflection about reverse diagonal. + * + * @memberof PIXI.groupD8 + * @constant {PIXI.GD8Symmetry} + */ + REVERSE_DIAGONAL: 14, + /** + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} ind - sprite rotation angle. + * @return {PIXI.GD8Symmetry} The X-component of the U-axis + * after rotating the axes. + */ + uX: function (ind) { return ux[ind]; }, + /** + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} ind - sprite rotation angle. + * @return {PIXI.GD8Symmetry} The Y-component of the U-axis + * after rotating the axes. + */ + uY: function (ind) { return uy[ind]; }, + /** + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} ind - sprite rotation angle. + * @return {PIXI.GD8Symmetry} The X-component of the V-axis + * after rotating the axes. + */ + vX: function (ind) { return vx[ind]; }, + /** + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} ind - sprite rotation angle. + * @return {PIXI.GD8Symmetry} The Y-component of the V-axis + * after rotating the axes. + */ + vY: function (ind) { return vy[ind]; }, + /** + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} rotation - symmetry whose opposite + * is needed. Only rotations have opposite symmetries while + * reflections don't. + * @return {PIXI.GD8Symmetry} The opposite symmetry of `rotation` + */ + inv: function (rotation) { + if (rotation & 8) // true only if between 8 & 15 (reflections) + { + return rotation & 15; // or rotation % 16 + } + return (-rotation) & 7; // or (8 - rotation) % 8 + }, + /** + * Composes the two D8 operations. + * + * Taking `^` as reflection: + * + * | | E=0 | S=2 | W=4 | N=6 | E^=8 | S^=10 | W^=12 | N^=14 | + * |-------|-----|-----|-----|-----|------|-------|-------|-------| + * | E=0 | E | S | W | N | E^ | S^ | W^ | N^ | + * | S=2 | S | W | N | E | S^ | W^ | N^ | E^ | + * | W=4 | W | N | E | S | W^ | N^ | E^ | S^ | + * | N=6 | N | E | S | W | N^ | E^ | S^ | W^ | + * | E^=8 | E^ | N^ | W^ | S^ | E | N | W | S | + * | S^=10 | S^ | E^ | N^ | W^ | S | E | N | W | + * | W^=12 | W^ | S^ | E^ | N^ | W | S | E | N | + * | N^=14 | N^ | W^ | S^ | E^ | N | W | S | E | + * + * [This is a Cayley table]{@link https://en.wikipedia.org/wiki/Cayley_table} + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} rotationSecond - Second operation, which + * is the row in the above cayley table. + * @param {PIXI.GD8Symmetry} rotationFirst - First operation, which + * is the column in the above cayley table. + * @return {PIXI.GD8Symmetry} Composed operation + */ + add: function (rotationSecond, rotationFirst) { return (rotationCayley[rotationSecond][rotationFirst]); }, + /** + * Reverse of `add`. + * + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} rotationSecond - Second operation + * @param {PIXI.GD8Symmetry} rotationFirst - First operation + * @return {PIXI.GD8Symmetry} Result + */ + sub: function (rotationSecond, rotationFirst) { return (rotationCayley[rotationSecond][groupD8.inv(rotationFirst)]); }, + /** + * Adds 180 degrees to rotation, which is a commutative + * operation. + * + * @memberof PIXI.groupD8 + * @param {number} rotation - The number to rotate. + * @returns {number} Rotated number + */ + rotate180: function (rotation) { return rotation ^ 4; }, + /** + * Checks if the rotation angle is vertical, i.e. south + * or north. It doesn't work for reflections. + * + * @memberof PIXI.groupD8 + * @param {PIXI.GD8Symmetry} rotation - The number to check. + * @returns {boolean} Whether or not the direction is vertical + */ + isVertical: function (rotation) { return (rotation & 3) === 2; }, + /** + * Approximates the vector `V(dx,dy)` into one of the + * eight directions provided by `groupD8`. + * + * @memberof PIXI.groupD8 + * @param {number} dx - X-component of the vector + * @param {number} dy - Y-component of the vector + * @return {PIXI.GD8Symmetry} Approximation of the vector into + * one of the eight symmetries. + */ + byDirection: function (dx, dy) { + if (Math.abs(dx) * 2 <= Math.abs(dy)) { + if (dy >= 0) { + return groupD8.S; + } + return groupD8.N; + } + else if (Math.abs(dy) * 2 <= Math.abs(dx)) { + if (dx > 0) { + return groupD8.E; + } + return groupD8.W; + } + else if (dy > 0) { + if (dx > 0) { + return groupD8.SE; + } + return groupD8.SW; + } + else if (dx > 0) { + return groupD8.NE; + } + return groupD8.NW; + }, + /** + * Helps sprite to compensate texture packer rotation. + * + * @memberof PIXI.groupD8 + * @param {PIXI.Matrix} matrix - sprite world matrix + * @param {PIXI.GD8Symmetry} rotation - The rotation factor to use. + * @param {number} tx - sprite anchoring + * @param {number} ty - sprite anchoring + */ + matrixAppendRotationInv: function (matrix, rotation, tx, ty) { + if (tx === void 0) { tx = 0; } + if (ty === void 0) { ty = 0; } + // Packer used "rotation", we use "inv(rotation)" + var mat = rotationMatrices[groupD8.inv(rotation)]; + mat.tx = tx; + mat.ty = ty; + matrix.append(mat); + }, + }; + + /** + * Transform that takes care about its versions + * + * @class + * @memberof PIXI + */ + var Transform = /** @class */ (function () { + function Transform() { + /** + * The world transformation matrix. + * + * @member {PIXI.Matrix} + */ + this.worldTransform = new Matrix(); + /** + * The local transformation matrix. + * + * @member {PIXI.Matrix} + */ + this.localTransform = new Matrix(); + /** + * The coordinate of the object relative to the local coordinates of the parent. + * + * @member {PIXI.ObservablePoint} + */ + this.position = new ObservablePoint(this.onChange, this, 0, 0); + /** + * The scale factor of the object. + * + * @member {PIXI.ObservablePoint} + */ + this.scale = new ObservablePoint(this.onChange, this, 1, 1); + /** + * The pivot point of the displayObject that it rotates around. + * + * @member {PIXI.ObservablePoint} + */ + this.pivot = new ObservablePoint(this.onChange, this, 0, 0); + /** + * The skew amount, on the x and y axis. + * + * @member {PIXI.ObservablePoint} + */ + this.skew = new ObservablePoint(this.updateSkew, this, 0, 0); + /** + * The rotation amount. + * + * @protected + * @member {number} + */ + this._rotation = 0; + /** + * The X-coordinate value of the normalized local X axis, + * the first column of the local transformation matrix without a scale. + * + * @protected + * @member {number} + */ + this._cx = 1; + /** + * The Y-coordinate value of the normalized local X axis, + * the first column of the local transformation matrix without a scale. + * + * @protected + * @member {number} + */ + this._sx = 0; + /** + * The X-coordinate value of the normalized local Y axis, + * the second column of the local transformation matrix without a scale. + * + * @protected + * @member {number} + */ + this._cy = 0; + /** + * The Y-coordinate value of the normalized local Y axis, + * the second column of the local transformation matrix without a scale. + * + * @protected + * @member {number} + */ + this._sy = 1; + /** + * The locally unique ID of the local transform. + * + * @protected + * @member {number} + */ + this._localID = 0; + /** + * The locally unique ID of the local transform + * used to calculate the current local transformation matrix. + * + * @protected + * @member {number} + */ + this._currentLocalID = 0; + /** + * The locally unique ID of the world transform. + * + * @protected + * @member {number} + */ + this._worldID = 0; + /** + * The locally unique ID of the parent's world transform + * used to calculate the current world transformation matrix. + * + * @protected + * @member {number} + */ + this._parentID = 0; + } + /** + * Called when a value changes. + * + * @protected + */ + Transform.prototype.onChange = function () { + this._localID++; + }; + /** + * Called when the skew or the rotation changes. + * + * @protected + */ + Transform.prototype.updateSkew = function () { + this._cx = Math.cos(this._rotation + this.skew.y); + this._sx = Math.sin(this._rotation + this.skew.y); + this._cy = -Math.sin(this._rotation - this.skew.x); // cos, added PI/2 + this._sy = Math.cos(this._rotation - this.skew.x); // sin, added PI/2 + this._localID++; + }; + /** + * Updates the local transformation matrix. + */ + Transform.prototype.updateLocalTransform = function () { + var lt = this.localTransform; + if (this._localID !== this._currentLocalID) { + // get the matrix values of the displayobject based on its transform properties.. + lt.a = this._cx * this.scale.x; + lt.b = this._sx * this.scale.x; + lt.c = this._cy * this.scale.y; + lt.d = this._sy * this.scale.y; + lt.tx = this.position.x - ((this.pivot.x * lt.a) + (this.pivot.y * lt.c)); + lt.ty = this.position.y - ((this.pivot.x * lt.b) + (this.pivot.y * lt.d)); + this._currentLocalID = this._localID; + // force an update.. + this._parentID = -1; + } + }; + /** + * Updates the local and the world transformation matrices. + * + * @param {PIXI.Transform} parentTransform - The parent transform + */ + Transform.prototype.updateTransform = function (parentTransform) { + var lt = this.localTransform; + if (this._localID !== this._currentLocalID) { + // get the matrix values of the displayobject based on its transform properties.. + lt.a = this._cx * this.scale.x; + lt.b = this._sx * this.scale.x; + lt.c = this._cy * this.scale.y; + lt.d = this._sy * this.scale.y; + lt.tx = this.position.x - ((this.pivot.x * lt.a) + (this.pivot.y * lt.c)); + lt.ty = this.position.y - ((this.pivot.x * lt.b) + (this.pivot.y * lt.d)); + this._currentLocalID = this._localID; + // force an update.. + this._parentID = -1; + } + if (this._parentID !== parentTransform._worldID) { + // concat the parent matrix with the objects transform. + var pt = parentTransform.worldTransform; + var wt = this.worldTransform; + wt.a = (lt.a * pt.a) + (lt.b * pt.c); + wt.b = (lt.a * pt.b) + (lt.b * pt.d); + wt.c = (lt.c * pt.a) + (lt.d * pt.c); + wt.d = (lt.c * pt.b) + (lt.d * pt.d); + wt.tx = (lt.tx * pt.a) + (lt.ty * pt.c) + pt.tx; + wt.ty = (lt.tx * pt.b) + (lt.ty * pt.d) + pt.ty; + this._parentID = parentTransform._worldID; + // update the id of the transform.. + this._worldID++; + } + }; + /** + * Decomposes a matrix and sets the transforms properties based on it. + * + * @param {PIXI.Matrix} matrix - The matrix to decompose + */ + Transform.prototype.setFromMatrix = function (matrix) { + matrix.decompose(this); + this._localID++; + }; + Object.defineProperty(Transform.prototype, "rotation", { + /** + * The rotation of the object in radians. + * + * @member {number} + */ + get: function () { + return this._rotation; + }, + set: function (value) { + if (this._rotation !== value) { + this._rotation = value; + this.updateSkew(); + } + }, + enumerable: true, + configurable: true + }); + /** + * A default (identity) transform + * + * @static + * @constant + * @member {PIXI.Transform} + */ + Transform.IDENTITY = new Transform(); + return Transform; + }()); + + /** + * Size object, contains width and height + * + * @memberof PIXI + * @typedef {object} ISize + * @property {number} width - Width component + * @property {number} height - Height component + */ + /** + * Rectangle object is an area defined by its position, as indicated by its top-left corner + * point (x, y) and by its width and its height. + * + * @class + * @memberof PIXI + */ + var Rectangle = /** @class */ (function () { + /** + * @param {number} [x=0] - The X coordinate of the upper-left corner of the rectangle + * @param {number} [y=0] - The Y coordinate of the upper-left corner of the rectangle + * @param {number} [width=0] - The overall width of this rectangle + * @param {number} [height=0] - The overall height of this rectangle + */ + function Rectangle(x, y, width, height) { + if (x === void 0) { x = 0; } + if (y === void 0) { y = 0; } + if (width === void 0) { width = 0; } + if (height === void 0) { height = 0; } + /** + * @member {number} + * @default 0 + */ + this.x = Number(x); + /** + * @member {number} + * @default 0 + */ + this.y = Number(y); + /** + * @member {number} + * @default 0 + */ + this.width = Number(width); + /** + * @member {number} + * @default 0 + */ + this.height = Number(height); + /** + * The type of the object, mainly used to avoid `instanceof` checks + * + * @member {number} + * @readOnly + * @default PIXI.SHAPES.RECT + * @see PIXI.SHAPES + */ + this.type = exports.SHAPES.RECT; + } + Object.defineProperty(Rectangle.prototype, "left", { + /** + * returns the left edge of the rectangle + * + * @member {number} + */ + get: function () { + return this.x; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Rectangle.prototype, "right", { + /** + * returns the right edge of the rectangle + * + * @member {number} + */ + get: function () { + return this.x + this.width; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Rectangle.prototype, "top", { + /** + * returns the top edge of the rectangle + * + * @member {number} + */ + get: function () { + return this.y; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Rectangle.prototype, "bottom", { + /** + * returns the bottom edge of the rectangle + * + * @member {number} + */ + get: function () { + return this.y + this.height; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Rectangle, "EMPTY", { + /** + * A constant empty rectangle. + * + * @static + * @constant + * @member {PIXI.Rectangle} + * @return {PIXI.Rectangle} An empty rectangle + */ + get: function () { + return new Rectangle(0, 0, 0, 0); + }, + enumerable: true, + configurable: true + }); + /** + * Creates a clone of this Rectangle + * + * @return {PIXI.Rectangle} a copy of the rectangle + */ + Rectangle.prototype.clone = function () { + return new Rectangle(this.x, this.y, this.width, this.height); + }; + /** + * Copies another rectangle to this one. + * + * @param {PIXI.Rectangle} rectangle - The rectangle to copy from. + * @return {PIXI.Rectangle} Returns itself. + */ + Rectangle.prototype.copyFrom = function (rectangle) { + this.x = rectangle.x; + this.y = rectangle.y; + this.width = rectangle.width; + this.height = rectangle.height; + return this; + }; + /** + * Copies this rectangle to another one. + * + * @param {PIXI.Rectangle} rectangle - The rectangle to copy to. + * @return {PIXI.Rectangle} Returns given parameter. + */ + Rectangle.prototype.copyTo = function (rectangle) { + rectangle.x = this.x; + rectangle.y = this.y; + rectangle.width = this.width; + rectangle.height = this.height; + return rectangle; + }; + /** + * Checks whether the x and y coordinates given are contained within this Rectangle + * + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coordinates are within this Rectangle + */ + Rectangle.prototype.contains = function (x, y) { + if (this.width <= 0 || this.height <= 0) { + return false; + } + if (x >= this.x && x < this.x + this.width) { + if (y >= this.y && y < this.y + this.height) { + return true; + } + } + return false; + }; + /** + * Pads the rectangle making it grow in all directions. + * If paddingY is omitted, both paddingX and paddingY will be set to paddingX. + * + * @param {number} [paddingX=0] - The horizontal padding amount. + * @param {number} [paddingY=0] - The vertical padding amount. + * @return {PIXI.Rectangle} Returns itself. + */ + Rectangle.prototype.pad = function (paddingX, paddingY) { + if (paddingX === void 0) { paddingX = 0; } + if (paddingY === void 0) { paddingY = paddingX; } + this.x -= paddingX; + this.y -= paddingY; + this.width += paddingX * 2; + this.height += paddingY * 2; + return this; + }; + /** + * Fits this rectangle around the passed one. + * + * @param {PIXI.Rectangle} rectangle - The rectangle to fit. + * @return {PIXI.Rectangle} Returns itself. + */ + Rectangle.prototype.fit = function (rectangle) { + var x1 = Math.max(this.x, rectangle.x); + var x2 = Math.min(this.x + this.width, rectangle.x + rectangle.width); + var y1 = Math.max(this.y, rectangle.y); + var y2 = Math.min(this.y + this.height, rectangle.y + rectangle.height); + this.x = x1; + this.width = Math.max(x2 - x1, 0); + this.y = y1; + this.height = Math.max(y2 - y1, 0); + return this; + }; + /** + * Enlarges rectangle that way its corners lie on grid + * + * @param {number} [resolution=1] resolution + * @param {number} [eps=0.001] precision + * @return {PIXI.Rectangle} Returns itself. + */ + Rectangle.prototype.ceil = function (resolution, eps) { + if (resolution === void 0) { resolution = 1; } + if (eps === void 0) { eps = 0.001; } + var x2 = Math.ceil((this.x + this.width - eps) * resolution) / resolution; + var y2 = Math.ceil((this.y + this.height - eps) * resolution) / resolution; + this.x = Math.floor((this.x + eps) * resolution) / resolution; + this.y = Math.floor((this.y + eps) * resolution) / resolution; + this.width = x2 - this.x; + this.height = y2 - this.y; + return this; + }; + /** + * Enlarges this rectangle to include the passed rectangle. + * + * @param {PIXI.Rectangle} rectangle - The rectangle to include. + * @return {PIXI.Rectangle} Returns itself. + */ + Rectangle.prototype.enlarge = function (rectangle) { + var x1 = Math.min(this.x, rectangle.x); + var x2 = Math.max(this.x + this.width, rectangle.x + rectangle.width); + var y1 = Math.min(this.y, rectangle.y); + var y2 = Math.max(this.y + this.height, rectangle.y + rectangle.height); + this.x = x1; + this.width = x2 - x1; + this.y = y1; + this.height = y2 - y1; + return this; + }; + return Rectangle; + }()); + + /** + * The Circle object is used to help draw graphics and can also be used to specify a hit area for displayObjects. + * + * @class + * @memberof PIXI + */ + var Circle = /** @class */ (function () { + /** + * @param {number} [x=0] - The X coordinate of the center of this circle + * @param {number} [y=0] - The Y coordinate of the center of this circle + * @param {number} [radius=0] - The radius of the circle + */ + function Circle(x, y, radius) { + if (x === void 0) { x = 0; } + if (y === void 0) { y = 0; } + if (radius === void 0) { radius = 0; } + /** + * @member {number} + * @default 0 + */ + this.x = x; + /** + * @member {number} + * @default 0 + */ + this.y = y; + /** + * @member {number} + * @default 0 + */ + this.radius = radius; + /** + * The type of the object, mainly used to avoid `instanceof` checks + * + * @member {number} + * @readOnly + * @default PIXI.SHAPES.CIRC + * @see PIXI.SHAPES + */ + this.type = exports.SHAPES.CIRC; + } + /** + * Creates a clone of this Circle instance + * + * @return {PIXI.Circle} a copy of the Circle + */ + Circle.prototype.clone = function () { + return new Circle(this.x, this.y, this.radius); + }; + /** + * Checks whether the x and y coordinates given are contained within this circle + * + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coordinates are within this Circle + */ + Circle.prototype.contains = function (x, y) { + if (this.radius <= 0) { + return false; + } + var r2 = this.radius * this.radius; + var dx = (this.x - x); + var dy = (this.y - y); + dx *= dx; + dy *= dy; + return (dx + dy <= r2); + }; + /** + * Returns the framing rectangle of the circle as a Rectangle object + * + * @return {PIXI.Rectangle} the framing rectangle + */ + Circle.prototype.getBounds = function () { + return new Rectangle(this.x - this.radius, this.y - this.radius, this.radius * 2, this.radius * 2); + }; + return Circle; + }()); + + /** + * The Ellipse object is used to help draw graphics and can also be used to specify a hit area for displayObjects. + * + * @class + * @memberof PIXI + */ + var Ellipse = /** @class */ (function () { + /** + * @param {number} [x=0] - The X coordinate of the center of this ellipse + * @param {number} [y=0] - The Y coordinate of the center of this ellipse + * @param {number} [halfWidth=0] - The half width of this ellipse + * @param {number} [halfHeight=0] - The half height of this ellipse + */ + function Ellipse(x, y, halfWidth, halfHeight) { + if (x === void 0) { x = 0; } + if (y === void 0) { y = 0; } + if (halfWidth === void 0) { halfWidth = 0; } + if (halfHeight === void 0) { halfHeight = 0; } + /** + * @member {number} + * @default 0 + */ + this.x = x; + /** + * @member {number} + * @default 0 + */ + this.y = y; + /** + * @member {number} + * @default 0 + */ + this.width = halfWidth; + /** + * @member {number} + * @default 0 + */ + this.height = halfHeight; + /** + * The type of the object, mainly used to avoid `instanceof` checks + * + * @member {number} + * @readOnly + * @default PIXI.SHAPES.ELIP + * @see PIXI.SHAPES + */ + this.type = exports.SHAPES.ELIP; + } + /** + * Creates a clone of this Ellipse instance + * + * @return {PIXI.Ellipse} a copy of the ellipse + */ + Ellipse.prototype.clone = function () { + return new Ellipse(this.x, this.y, this.width, this.height); + }; + /** + * Checks whether the x and y coordinates given are contained within this ellipse + * + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coords are within this ellipse + */ + Ellipse.prototype.contains = function (x, y) { + if (this.width <= 0 || this.height <= 0) { + return false; + } + // normalize the coords to an ellipse with center 0,0 + var normx = ((x - this.x) / this.width); + var normy = ((y - this.y) / this.height); + normx *= normx; + normy *= normy; + return (normx + normy <= 1); + }; + /** + * Returns the framing rectangle of the ellipse as a Rectangle object + * + * @return {PIXI.Rectangle} the framing rectangle + */ + Ellipse.prototype.getBounds = function () { + return new Rectangle(this.x - this.width, this.y - this.height, this.width, this.height); + }; + return Ellipse; + }()); + + /** + * A class to define a shape via user defined co-orinates. + * + * @class + * @memberof PIXI + */ + var Polygon = /** @class */ (function () { + /** + * @param {PIXI.Point[]|number[]|number[][]} points - This can be an array of Points + * that form the polygon, a flat array of numbers that will be interpreted as [x,y, x,y, ...], or + * the arguments passed can be all the points of the polygon e.g. + * `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the arguments passed can be flat + * x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are Numbers. + */ + function Polygon() { + var arguments$1 = arguments; + + var points = []; + for (var _i = 0; _i < arguments.length; _i++) { + points[_i] = arguments$1[_i]; + } + if (Array.isArray(points[0])) { + points = points[0]; + } + // if this is an array of points, convert it to a flat array of numbers + if (points[0] instanceof Point) { + points = points; + var p = []; + for (var i = 0, il = points.length; i < il; i++) { + p.push(points[i].x, points[i].y); + } + points = p; + } + /** + * An array of the points of this polygon + * + * @member {number[]} + */ + this.points = points; + /** + * The type of the object, mainly used to avoid `instanceof` checks + * + * @member {number} + * @readOnly + * @default PIXI.SHAPES.POLY + * @see PIXI.SHAPES + */ + this.type = exports.SHAPES.POLY; + /** + * `false` after moveTo, `true` after `closePath`. In all other cases it is `true`. + * @member {boolean} + * @default true + */ + this.closeStroke = true; + } + /** + * Creates a clone of this polygon + * + * @return {PIXI.Polygon} a copy of the polygon + */ + Polygon.prototype.clone = function () { + var points = this.points.slice(); + var polygon = new Polygon(points); + polygon.closeStroke = this.closeStroke; + return polygon; + }; + /** + * Checks whether the x and y coordinates passed to this function are contained within this polygon + * + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coordinates are within this polygon + */ + Polygon.prototype.contains = function (x, y) { + var inside = false; + // use some raycasting to test hits + // https://github.com/substack/point-in-polygon/blob/master/index.js + var length = this.points.length / 2; + for (var i = 0, j = length - 1; i < length; j = i++) { + var xi = this.points[i * 2]; + var yi = this.points[(i * 2) + 1]; + var xj = this.points[j * 2]; + var yj = this.points[(j * 2) + 1]; + var intersect = ((yi > y) !== (yj > y)) && (x < ((xj - xi) * ((y - yi) / (yj - yi))) + xi); + if (intersect) { + inside = !inside; + } + } + return inside; + }; + return Polygon; + }()); + + /** + * The Rounded Rectangle object is an area that has nice rounded corners, as indicated by its + * top-left corner point (x, y) and by its width and its height and its radius. + * + * @class + * @memberof PIXI + */ + var RoundedRectangle = /** @class */ (function () { + /** + * @param {number} [x=0] - The X coordinate of the upper-left corner of the rounded rectangle + * @param {number} [y=0] - The Y coordinate of the upper-left corner of the rounded rectangle + * @param {number} [width=0] - The overall width of this rounded rectangle + * @param {number} [height=0] - The overall height of this rounded rectangle + * @param {number} [radius=20] - Controls the radius of the rounded corners + */ + function RoundedRectangle(x, y, width, height, radius) { + if (x === void 0) { x = 0; } + if (y === void 0) { y = 0; } + if (width === void 0) { width = 0; } + if (height === void 0) { height = 0; } + if (radius === void 0) { radius = 20; } + /** + * @member {number} + * @default 0 + */ + this.x = x; + /** + * @member {number} + * @default 0 + */ + this.y = y; + /** + * @member {number} + * @default 0 + */ + this.width = width; + /** + * @member {number} + * @default 0 + */ + this.height = height; + /** + * @member {number} + * @default 20 + */ + this.radius = radius; + /** + * The type of the object, mainly used to avoid `instanceof` checks + * + * @member {number} + * @readonly + * @default PIXI.SHAPES.RREC + * @see PIXI.SHAPES + */ + this.type = exports.SHAPES.RREC; + } + /** + * Creates a clone of this Rounded Rectangle + * + * @return {PIXI.RoundedRectangle} a copy of the rounded rectangle + */ + RoundedRectangle.prototype.clone = function () { + return new RoundedRectangle(this.x, this.y, this.width, this.height, this.radius); + }; + /** + * Checks whether the x and y coordinates given are contained within this Rounded Rectangle + * + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coordinates are within this Rounded Rectangle + */ + RoundedRectangle.prototype.contains = function (x, y) { + if (this.width <= 0 || this.height <= 0) { + return false; + } + if (x >= this.x && x <= this.x + this.width) { + if (y >= this.y && y <= this.y + this.height) { + if ((y >= this.y + this.radius && y <= this.y + this.height - this.radius) + || (x >= this.x + this.radius && x <= this.x + this.width - this.radius)) { + return true; + } + var dx = x - (this.x + this.radius); + var dy = y - (this.y + this.radius); + var radius2 = this.radius * this.radius; + if ((dx * dx) + (dy * dy) <= radius2) { + return true; + } + dx = x - (this.x + this.width - this.radius); + if ((dx * dx) + (dy * dy) <= radius2) { + return true; + } + dy = y - (this.y + this.height - this.radius); + if ((dx * dx) + (dy * dy) <= radius2) { + return true; + } + dx = x - (this.x + this.radius); + if ((dx * dx) + (dy * dy) <= radius2) { + return true; + } + } + } + return false; + }; + return RoundedRectangle; + }()); + + /*! + * @pixi/display - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/display is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Sets the default value for the container property 'sortableChildren'. + * If set to true, the container will sort its children by zIndex value + * when updateTransform() is called, or manually if sortChildren() is called. + * + * This actually changes the order of elements in the array, so should be treated + * as a basic solution that is not performant compared to other solutions, + * such as @link https://github.com/pixijs/pixi-display + * + * Also be aware of that this may not work nicely with the addChildAt() function, + * as the zIndex sorting may cause the child to automatically sorted to another position. + * + * @static + * @constant + * @name SORTABLE_CHILDREN + * @memberof PIXI.settings + * @type {boolean} + * @default false + */ + settings.SORTABLE_CHILDREN = false; + + /** + * 'Builder' pattern for bounds rectangles. + * + * This could be called an Axis-Aligned Bounding Box. + * It is not an actual shape. It is a mutable thing; no 'EMPTY' or those kind of problems. + * + * @class + * @memberof PIXI + */ + var Bounds = function Bounds() + { + /** + * @member {number} + * @default 0 + */ + this.minX = Infinity; + + /** + * @member {number} + * @default 0 + */ + this.minY = Infinity; + + /** + * @member {number} + * @default 0 + */ + this.maxX = -Infinity; + + /** + * @member {number} + * @default 0 + */ + this.maxY = -Infinity; + + this.rect = null; + }; + + /** + * Checks if bounds are empty. + * + * @return {boolean} True if empty. + */ + Bounds.prototype.isEmpty = function isEmpty () + { + return this.minX > this.maxX || this.minY > this.maxY; + }; + + /** + * Clears the bounds and resets. + * + */ + Bounds.prototype.clear = function clear () + { + this.minX = Infinity; + this.minY = Infinity; + this.maxX = -Infinity; + this.maxY = -Infinity; + }; + + /** + * Can return Rectangle.EMPTY constant, either construct new rectangle, either use your rectangle + * It is not guaranteed that it will return tempRect + * + * @param {PIXI.Rectangle} rect - temporary object will be used if AABB is not empty + * @returns {PIXI.Rectangle} A rectangle of the bounds + */ + Bounds.prototype.getRectangle = function getRectangle (rect) + { + if (this.minX > this.maxX || this.minY > this.maxY) + { + return Rectangle.EMPTY; + } + + rect = rect || new Rectangle(0, 0, 1, 1); + + rect.x = this.minX; + rect.y = this.minY; + rect.width = this.maxX - this.minX; + rect.height = this.maxY - this.minY; + + return rect; + }; + + /** + * This function should be inlined when its possible. + * + * @param {PIXI.Point} point - The point to add. + */ + Bounds.prototype.addPoint = function addPoint (point) + { + this.minX = Math.min(this.minX, point.x); + this.maxX = Math.max(this.maxX, point.x); + this.minY = Math.min(this.minY, point.y); + this.maxY = Math.max(this.maxY, point.y); + }; + + /** + * Adds a quad, not transformed + * + * @param {Float32Array} vertices - The verts to add. + */ + Bounds.prototype.addQuad = function addQuad (vertices) + { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + var x = vertices[0]; + var y = vertices[1]; + + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = vertices[2]; + y = vertices[3]; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = vertices[4]; + y = vertices[5]; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = vertices[6]; + y = vertices[7]; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + this.minX = minX; + this.minY = minY; + this.maxX = maxX; + this.maxY = maxY; + }; + + /** + * Adds sprite frame, transformed. + * + * @param {PIXI.Transform} transform - transform to apply + * @param {number} x0 - left X of frame + * @param {number} y0 - top Y of frame + * @param {number} x1 - right X of frame + * @param {number} y1 - bottom Y of frame + */ + Bounds.prototype.addFrame = function addFrame (transform, x0, y0, x1, y1) + { + this.addFrameMatrix(transform.worldTransform, x0, y0, x1, y1); + }; + + /** + * Adds sprite frame, multiplied by matrix + * + * @param {PIXI.Matrix} matrix - matrix to apply + * @param {number} x0 - left X of frame + * @param {number} y0 - top Y of frame + * @param {number} x1 - right X of frame + * @param {number} y1 - bottom Y of frame + */ + Bounds.prototype.addFrameMatrix = function addFrameMatrix (matrix, x0, y0, x1, y1) + { + var a = matrix.a; + var b = matrix.b; + var c = matrix.c; + var d = matrix.d; + var tx = matrix.tx; + var ty = matrix.ty; + + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + var x = (a * x0) + (c * y0) + tx; + var y = (b * x0) + (d * y0) + ty; + + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = (a * x1) + (c * y0) + tx; + y = (b * x1) + (d * y0) + ty; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = (a * x0) + (c * y1) + tx; + y = (b * x0) + (d * y1) + ty; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = (a * x1) + (c * y1) + tx; + y = (b * x1) + (d * y1) + ty; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + this.minX = minX; + this.minY = minY; + this.maxX = maxX; + this.maxY = maxY; + }; + + /** + * Adds screen vertices from array + * + * @param {Float32Array} vertexData - calculated vertices + * @param {number} beginOffset - begin offset + * @param {number} endOffset - end offset, excluded + */ + Bounds.prototype.addVertexData = function addVertexData (vertexData, beginOffset, endOffset) + { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + for (var i = beginOffset; i < endOffset; i += 2) + { + var x = vertexData[i]; + var y = vertexData[i + 1]; + + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + } + + this.minX = minX; + this.minY = minY; + this.maxX = maxX; + this.maxY = maxY; + }; + + /** + * Add an array of mesh vertices + * + * @param {PIXI.Transform} transform - mesh transform + * @param {Float32Array} vertices - mesh coordinates in array + * @param {number} beginOffset - begin offset + * @param {number} endOffset - end offset, excluded + */ + Bounds.prototype.addVertices = function addVertices (transform, vertices, beginOffset, endOffset) + { + this.addVerticesMatrix(transform.worldTransform, vertices, beginOffset, endOffset); + }; + + /** + * Add an array of mesh vertices + * + * @param {PIXI.Matrix} matrix - mesh matrix + * @param {Float32Array} vertices - mesh coordinates in array + * @param {number} beginOffset - begin offset + * @param {number} endOffset - end offset, excluded + * @param {number} [padX] - x padding + * @param {number} [padY] - y padding + */ + Bounds.prototype.addVerticesMatrix = function addVerticesMatrix (matrix, vertices, beginOffset, endOffset, padX, padY) + { + var a = matrix.a; + var b = matrix.b; + var c = matrix.c; + var d = matrix.d; + var tx = matrix.tx; + var ty = matrix.ty; + + padX = padX || 0; + padY = padY || 0; + + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + for (var i = beginOffset; i < endOffset; i += 2) + { + var rawX = vertices[i]; + var rawY = vertices[i + 1]; + var x = (a * rawX) + (c * rawY) + tx; + var y = (d * rawY) + (b * rawX) + ty; + + minX = Math.min(minX, x - padX); + maxX = Math.max(maxX, x + padX); + minY = Math.min(minY, y - padY); + maxY = Math.max(maxY, y + padY); + } + + this.minX = minX; + this.minY = minY; + this.maxX = maxX; + this.maxY = maxY; + }; + + /** + * Adds other Bounds + * + * @param {PIXI.Bounds} bounds - TODO + */ + Bounds.prototype.addBounds = function addBounds (bounds) + { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + this.minX = bounds.minX < minX ? bounds.minX : minX; + this.minY = bounds.minY < minY ? bounds.minY : minY; + this.maxX = bounds.maxX > maxX ? bounds.maxX : maxX; + this.maxY = bounds.maxY > maxY ? bounds.maxY : maxY; + }; + + /** + * Adds other Bounds, masked with Bounds + * + * @param {PIXI.Bounds} bounds - TODO + * @param {PIXI.Bounds} mask - TODO + */ + Bounds.prototype.addBoundsMask = function addBoundsMask (bounds, mask) + { + var _minX = bounds.minX > mask.minX ? bounds.minX : mask.minX; + var _minY = bounds.minY > mask.minY ? bounds.minY : mask.minY; + var _maxX = bounds.maxX < mask.maxX ? bounds.maxX : mask.maxX; + var _maxY = bounds.maxY < mask.maxY ? bounds.maxY : mask.maxY; + + if (_minX <= _maxX && _minY <= _maxY) + { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + this.minX = _minX < minX ? _minX : minX; + this.minY = _minY < minY ? _minY : minY; + this.maxX = _maxX > maxX ? _maxX : maxX; + this.maxY = _maxY > maxY ? _maxY : maxY; + } + }; + + /** + * Adds other Bounds, multiplied by matrix. Bounds shouldn't be empty + * + * @param {PIXI.Bounds} bounds other bounds + * @param {PIXI.Matrix} matrix multiplicator + */ + Bounds.prototype.addBoundsMatrix = function addBoundsMatrix (bounds, matrix) + { + this.addFrameMatrix(matrix, bounds.minX, bounds.minY, bounds.maxX, bounds.maxY); + }; + + /** + * Adds other Bounds, masked with Rectangle + * + * @param {PIXI.Bounds} bounds - TODO + * @param {PIXI.Rectangle} area - TODO + */ + Bounds.prototype.addBoundsArea = function addBoundsArea (bounds, area) + { + var _minX = bounds.minX > area.x ? bounds.minX : area.x; + var _minY = bounds.minY > area.y ? bounds.minY : area.y; + var _maxX = bounds.maxX < area.x + area.width ? bounds.maxX : (area.x + area.width); + var _maxY = bounds.maxY < area.y + area.height ? bounds.maxY : (area.y + area.height); + + if (_minX <= _maxX && _minY <= _maxY) + { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + this.minX = _minX < minX ? _minX : minX; + this.minY = _minY < minY ? _minY : minY; + this.maxX = _maxX > maxX ? _maxX : maxX; + this.maxY = _maxY > maxY ? _maxY : maxY; + } + }; + + /** + * Pads bounds object, making it grow in all directions. + * If paddingY is omitted, both paddingX and paddingY will be set to paddingX. + * + * @param {number} [paddingX=0] - The horizontal padding amount. + * @param {number} [paddingY=0] - The vertical padding amount. + */ + Bounds.prototype.pad = function pad (paddingX, paddingY) + { + paddingX = paddingX || 0; + paddingY = paddingY || ((paddingY !== 0) ? paddingX : 0); + + if (!this.isEmpty()) + { + this.minX -= paddingX; + this.maxX += paddingX; + this.minY -= paddingY; + this.maxY += paddingY; + } + }; + + /** + * Adds padded frame. (x0, y0) should be strictly less than (x1, y1) + * + * @param {number} x0 - left X of frame + * @param {number} y0 - top Y of frame + * @param {number} x1 - right X of frame + * @param {number} y1 - bottom Y of frame + * @param {number} padX - padding X + * @param {number} padY - padding Y + */ + Bounds.prototype.addFramePad = function addFramePad (x0, y0, x1, y1, padX, padY) + { + x0 -= padX; + y0 -= padY; + x1 += padX; + y1 += padY; + + this.minX = this.minX < x0 ? this.minX : x0; + this.maxX = this.maxX > x1 ? this.maxX : x1; + this.minY = this.minY < y0 ? this.minY : y0; + this.maxY = this.maxY > y1 ? this.maxY : y1; + }; + + // _tempDisplayObjectParent = new DisplayObject(); + + /** + * The base class for all objects that are rendered on the screen. + * + * This is an abstract class and should not be used on its own; rather it should be extended. + * + * @class + * @extends PIXI.utils.EventEmitter + * @memberof PIXI + */ + var DisplayObject = /*@__PURE__*/(function (EventEmitter) { + function DisplayObject() + { + EventEmitter.call(this); + + this.tempDisplayObjectParent = null; + + // TODO: need to create Transform from factory + /** + * World transform and local transform of this object. + * This will become read-only later, please do not assign anything there unless you know what are you doing. + * + * @member {PIXI.Transform} + */ + this.transform = new Transform(); + + /** + * The opacity of the object. + * + * @member {number} + */ + this.alpha = 1; + + /** + * The visibility of the object. If false the object will not be drawn, and + * the updateTransform function will not be called. + * + * Only affects recursive calls from parent. You can ask for bounds or call updateTransform manually. + * + * @member {boolean} + */ + this.visible = true; + + /** + * Can this object be rendered, if false the object will not be drawn but the updateTransform + * methods will still be called. + * + * Only affects recursive calls from parent. You can ask for bounds manually. + * + * @member {boolean} + */ + this.renderable = true; + + /** + * The display object container that contains this display object. + * + * @member {PIXI.Container} + * @readonly + */ + this.parent = null; + + /** + * The multiplied alpha of the displayObject. + * + * @member {number} + * @readonly + */ + this.worldAlpha = 1; + + /** + * Which index in the children array the display component was before the previous zIndex sort. + * Used by containers to help sort objects with the same zIndex, by using previous array index as the decider. + * + * @member {number} + * @protected + */ + this._lastSortedIndex = 0; + + /** + * The zIndex of the displayObject. + * A higher value will mean it will be rendered on top of other displayObjects within the same container. + * + * @member {number} + * @protected + */ + this._zIndex = 0; + + /** + * The area the filter is applied to. This is used as more of an optimization + * rather than figuring out the dimensions of the displayObject each frame you can set this rectangle. + * + * Also works as an interaction mask. + * + * @member {?PIXI.Rectangle} + */ + this.filterArea = null; + + /** + * Sets the filters for the displayObject. + * * IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer. + * To remove filters simply set this property to `'null'`. + * + * @member {?PIXI.Filter[]} + */ + this.filters = null; + this._enabledFilters = null; + + /** + * The bounds object, this is used to calculate and store the bounds of the displayObject. + * + * @member {PIXI.Bounds} + * @protected + */ + this._bounds = new Bounds(); + this._boundsID = 0; + this._lastBoundsID = -1; + this._boundsRect = null; + this._localBoundsRect = null; + + /** + * The original, cached mask of the object. + * + * @member {PIXI.Graphics|PIXI.Sprite|null} + * @protected + */ + this._mask = null; + + /** + * Fired when this DisplayObject is added to a Container. + * + * @event PIXI.DisplayObject#added + * @param {PIXI.Container} container - The container added to. + */ + + /** + * Fired when this DisplayObject is removed from a Container. + * + * @event PIXI.DisplayObject#removed + * @param {PIXI.Container} container - The container removed from. + */ + + /** + * If the object has been destroyed via destroy(). If true, it should not be used. + * + * @member {boolean} + * @protected + */ + this._destroyed = false; + + /** + * used to fast check if a sprite is.. a sprite! + * @member {boolean} + */ + this.isSprite = false; + + /** + * Does any other displayObject use this object as a mask? + * @member {boolean} + */ + this.isMask = false; + } + + if ( EventEmitter ) { DisplayObject.__proto__ = EventEmitter; } + DisplayObject.prototype = Object.create( EventEmitter && EventEmitter.prototype ); + DisplayObject.prototype.constructor = DisplayObject; + + var prototypeAccessors = { _tempDisplayObjectParent: { configurable: true },x: { configurable: true },y: { configurable: true },worldTransform: { configurable: true },localTransform: { configurable: true },position: { configurable: true },scale: { configurable: true },pivot: { configurable: true },skew: { configurable: true },rotation: { configurable: true },angle: { configurable: true },zIndex: { configurable: true },worldVisible: { configurable: true },mask: { configurable: true } }; + + /** + * @protected + * @member {PIXI.DisplayObject} + */ + DisplayObject.mixin = function mixin (source) + { + // in ES8/ES2017, this would be really easy: + // Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + + // get all the enumerable property keys + var keys = Object.keys(source); + + // loop through properties + for (var i = 0; i < keys.length; ++i) + { + var propertyName = keys[i]; + + // Set the property using the property descriptor - this works for accessors and normal value properties + Object.defineProperty( + DisplayObject.prototype, + propertyName, + Object.getOwnPropertyDescriptor(source, propertyName) + ); + } + }; + + prototypeAccessors._tempDisplayObjectParent.get = function () + { + if (this.tempDisplayObjectParent === null) + { + this.tempDisplayObjectParent = new DisplayObject(); + } + + return this.tempDisplayObjectParent; + }; + + /** + * Updates the object transform for rendering. + * + * TODO - Optimization pass! + */ + DisplayObject.prototype.updateTransform = function updateTransform () + { + this._boundsID++; + + this.transform.updateTransform(this.parent.transform); + // multiply the alphas.. + this.worldAlpha = this.alpha * this.parent.worldAlpha; + }; + + /** + * Recalculates the bounds of the display object. + * + * Does nothing by default and can be overwritten in a parent class. + */ + DisplayObject.prototype.calculateBounds = function calculateBounds () + { + // OVERWRITE; + }; + + /** + * Recursively updates transform of all objects from the root to this one + * internal function for toLocal() + */ + DisplayObject.prototype._recursivePostUpdateTransform = function _recursivePostUpdateTransform () + { + if (this.parent) + { + this.parent._recursivePostUpdateTransform(); + this.transform.updateTransform(this.parent.transform); + } + else + { + this.transform.updateTransform(this._tempDisplayObjectParent.transform); + } + }; + + /** + * Retrieves the bounds of the displayObject as a rectangle object. + * + * @param {boolean} [skipUpdate] - Setting to `true` will stop the transforms of the scene graph from + * being updated. This means the calculation returned MAY be out of date BUT will give you a + * nice performance boost. + * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation. + * @return {PIXI.Rectangle} The rectangular bounding area. + */ + DisplayObject.prototype.getBounds = function getBounds (skipUpdate, rect) + { + if (!skipUpdate) + { + if (!this.parent) + { + this.parent = this._tempDisplayObjectParent; + this.updateTransform(); + this.parent = null; + } + else + { + this._recursivePostUpdateTransform(); + this.updateTransform(); + } + } + + if (this._boundsID !== this._lastBoundsID) + { + this.calculateBounds(); + this._lastBoundsID = this._boundsID; + } + + if (!rect) + { + if (!this._boundsRect) + { + this._boundsRect = new Rectangle(); + } + + rect = this._boundsRect; + } + + return this._bounds.getRectangle(rect); + }; + + /** + * Retrieves the local bounds of the displayObject as a rectangle object. + * + * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation. + * @return {PIXI.Rectangle} The rectangular bounding area. + */ + DisplayObject.prototype.getLocalBounds = function getLocalBounds (rect) + { + var transformRef = this.transform; + var parentRef = this.parent; + + this.parent = null; + this.transform = this._tempDisplayObjectParent.transform; + + if (!rect) + { + if (!this._localBoundsRect) + { + this._localBoundsRect = new Rectangle(); + } + + rect = this._localBoundsRect; + } + + var bounds = this.getBounds(false, rect); + + this.parent = parentRef; + this.transform = transformRef; + + return bounds; + }; + + /** + * Calculates the global position of the display object. + * + * @param {PIXI.IPoint} position - The world origin to calculate from. + * @param {PIXI.IPoint} [point] - A Point object in which to store the value, optional + * (otherwise will create a new Point). + * @param {boolean} [skipUpdate=false] - Should we skip the update transform. + * @return {PIXI.IPoint} A point object representing the position of this object. + */ + DisplayObject.prototype.toGlobal = function toGlobal (position, point, skipUpdate) + { + if ( skipUpdate === void 0 ) { skipUpdate = false; } + + if (!skipUpdate) + { + this._recursivePostUpdateTransform(); + + // this parent check is for just in case the item is a root object. + // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly + // this is mainly to avoid a parent check in the main loop. Every little helps for performance :) + if (!this.parent) + { + this.parent = this._tempDisplayObjectParent; + this.displayObjectUpdateTransform(); + this.parent = null; + } + else + { + this.displayObjectUpdateTransform(); + } + } + + // don't need to update the lot + return this.worldTransform.apply(position, point); + }; + + /** + * Calculates the local position of the display object relative to another point. + * + * @param {PIXI.IPoint} position - The world origin to calculate from. + * @param {PIXI.DisplayObject} [from] - The DisplayObject to calculate the global position from. + * @param {PIXI.IPoint} [point] - A Point object in which to store the value, optional + * (otherwise will create a new Point). + * @param {boolean} [skipUpdate=false] - Should we skip the update transform + * @return {PIXI.IPoint} A point object representing the position of this object + */ + DisplayObject.prototype.toLocal = function toLocal (position, from, point, skipUpdate) + { + if (from) + { + position = from.toGlobal(position, point, skipUpdate); + } + + if (!skipUpdate) + { + this._recursivePostUpdateTransform(); + + // this parent check is for just in case the item is a root object. + // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly + // this is mainly to avoid a parent check in the main loop. Every little helps for performance :) + if (!this.parent) + { + this.parent = this._tempDisplayObjectParent; + this.displayObjectUpdateTransform(); + this.parent = null; + } + else + { + this.displayObjectUpdateTransform(); + } + } + + // simply apply the matrix.. + return this.worldTransform.applyInverse(position, point); + }; + + /** + * Renders the object using the WebGL renderer. + * + * @param {PIXI.Renderer} renderer - The renderer. + */ + DisplayObject.prototype.render = function render (renderer) // eslint-disable-line no-unused-vars + { + // OVERWRITE; + }; + + /** + * Set the parent Container of this DisplayObject. + * + * @param {PIXI.Container} container - The Container to add this DisplayObject to. + * @return {PIXI.Container} The Container that this DisplayObject was added to. + */ + DisplayObject.prototype.setParent = function setParent (container) + { + if (!container || !container.addChild) + { + throw new Error('setParent: Argument must be a Container'); + } + + container.addChild(this); + + return container; + }; + + /** + * Convenience function to set the position, scale, skew and pivot at once. + * + * @param {number} [x=0] - The X position + * @param {number} [y=0] - The Y position + * @param {number} [scaleX=1] - The X scale value + * @param {number} [scaleY=1] - The Y scale value + * @param {number} [rotation=0] - The rotation + * @param {number} [skewX=0] - The X skew value + * @param {number} [skewY=0] - The Y skew value + * @param {number} [pivotX=0] - The X pivot value + * @param {number} [pivotY=0] - The Y pivot value + * @return {PIXI.DisplayObject} The DisplayObject instance + */ + DisplayObject.prototype.setTransform = function setTransform (x, y, scaleX, scaleY, rotation, skewX, skewY, pivotX, pivotY) + { + if ( x === void 0 ) { x = 0; } + if ( y === void 0 ) { y = 0; } + if ( scaleX === void 0 ) { scaleX = 1; } + if ( scaleY === void 0 ) { scaleY = 1; } + if ( rotation === void 0 ) { rotation = 0; } + if ( skewX === void 0 ) { skewX = 0; } + if ( skewY === void 0 ) { skewY = 0; } + if ( pivotX === void 0 ) { pivotX = 0; } + if ( pivotY === void 0 ) { pivotY = 0; } + + this.position.x = x; + this.position.y = y; + this.scale.x = !scaleX ? 1 : scaleX; + this.scale.y = !scaleY ? 1 : scaleY; + this.rotation = rotation; + this.skew.x = skewX; + this.skew.y = skewY; + this.pivot.x = pivotX; + this.pivot.y = pivotY; + + return this; + }; + + /** + * Base destroy method for generic display objects. This will automatically + * remove the display object from its parent Container as well as remove + * all current event listeners and internal references. Do not use a DisplayObject + * after calling `destroy()`. + * + */ + DisplayObject.prototype.destroy = function destroy () + { + if (this.parent) + { + this.parent.removeChild(this); + } + this.removeAllListeners(); + this.transform = null; + + this.parent = null; + this._bounds = null; + this._currentBounds = null; + this._mask = null; + + this.filters = null; + this.filterArea = null; + this.hitArea = null; + + this.interactive = false; + this.interactiveChildren = false; + + this._destroyed = true; + }; + + /** + * The position of the displayObject on the x axis relative to the local coordinates of the parent. + * An alias to position.x + * + * @member {number} + */ + prototypeAccessors.x.get = function () + { + return this.position.x; + }; + + prototypeAccessors.x.set = function (value) // eslint-disable-line require-jsdoc + { + this.transform.position.x = value; + }; + + /** + * The position of the displayObject on the y axis relative to the local coordinates of the parent. + * An alias to position.y + * + * @member {number} + */ + prototypeAccessors.y.get = function () + { + return this.position.y; + }; + + prototypeAccessors.y.set = function (value) // eslint-disable-line require-jsdoc + { + this.transform.position.y = value; + }; + + /** + * Current transform of the object based on world (parent) factors. + * + * @member {PIXI.Matrix} + * @readonly + */ + prototypeAccessors.worldTransform.get = function () + { + return this.transform.worldTransform; + }; + + /** + * Current transform of the object based on local factors: position, scale, other stuff. + * + * @member {PIXI.Matrix} + * @readonly + */ + prototypeAccessors.localTransform.get = function () + { + return this.transform.localTransform; + }; + + /** + * The coordinate of the object relative to the local coordinates of the parent. + * Assignment by value since pixi-v4. + * + * @member {PIXI.IPoint} + */ + prototypeAccessors.position.get = function () + { + return this.transform.position; + }; + + prototypeAccessors.position.set = function (value) // eslint-disable-line require-jsdoc + { + this.transform.position.copyFrom(value); + }; + + /** + * The scale factor of the object. + * Assignment by value since pixi-v4. + * + * @member {PIXI.IPoint} + */ + prototypeAccessors.scale.get = function () + { + return this.transform.scale; + }; + + prototypeAccessors.scale.set = function (value) // eslint-disable-line require-jsdoc + { + this.transform.scale.copyFrom(value); + }; + + /** + * The pivot point of the displayObject that it rotates around. + * Assignment by value since pixi-v4. + * + * @member {PIXI.IPoint} + */ + prototypeAccessors.pivot.get = function () + { + return this.transform.pivot; + }; + + prototypeAccessors.pivot.set = function (value) // eslint-disable-line require-jsdoc + { + this.transform.pivot.copyFrom(value); + }; + + /** + * The skew factor for the object in radians. + * Assignment by value since pixi-v4. + * + * @member {PIXI.ObservablePoint} + */ + prototypeAccessors.skew.get = function () + { + return this.transform.skew; + }; + + prototypeAccessors.skew.set = function (value) // eslint-disable-line require-jsdoc + { + this.transform.skew.copyFrom(value); + }; + + /** + * The rotation of the object in radians. + * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees. + * + * @member {number} + */ + prototypeAccessors.rotation.get = function () + { + return this.transform.rotation; + }; + + prototypeAccessors.rotation.set = function (value) // eslint-disable-line require-jsdoc + { + this.transform.rotation = value; + }; + + /** + * The angle of the object in degrees. + * 'rotation' and 'angle' have the same effect on a display object; rotation is in radians, angle is in degrees. + * + * @member {number} + */ + prototypeAccessors.angle.get = function () + { + return this.transform.rotation * RAD_TO_DEG; + }; + + prototypeAccessors.angle.set = function (value) // eslint-disable-line require-jsdoc + { + this.transform.rotation = value * DEG_TO_RAD; + }; + + /** + * The zIndex of the displayObject. + * If a container has the sortableChildren property set to true, children will be automatically + * sorted by zIndex value; a higher value will mean it will be moved towards the end of the array, + * and thus rendered on top of other displayObjects within the same container. + * + * @member {number} + */ + prototypeAccessors.zIndex.get = function () + { + return this._zIndex; + }; + + prototypeAccessors.zIndex.set = function (value) // eslint-disable-line require-jsdoc + { + this._zIndex = value; + if (this.parent) + { + this.parent.sortDirty = true; + } + }; + + /** + * Indicates if the object is globally visible. + * + * @member {boolean} + * @readonly + */ + prototypeAccessors.worldVisible.get = function () + { + var item = this; + + do + { + if (!item.visible) + { + return false; + } + + item = item.parent; + } while (item); + + return true; + }; + + /** + * Sets a mask for the displayObject. A mask is an object that limits the visibility of an + * object to the shape of the mask applied to it. In PixiJS a regular mask must be a + * {@link PIXI.Graphics} or a {@link PIXI.Sprite} object. This allows for much faster masking in canvas as it + * utilities shape clipping. To remove a mask, set this property to `null`. + * + * For sprite mask both alpha and red channel are used. Black mask is the same as transparent mask. + * @example + * const graphics = new PIXI.Graphics(); + * graphics.beginFill(0xFF3300); + * graphics.drawRect(50, 250, 100, 100); + * graphics.endFill(); + * + * const sprite = new PIXI.Sprite(texture); + * sprite.mask = graphics; + * @todo At the moment, PIXI.CanvasRenderer doesn't support PIXI.Sprite as mask. + * + * @member {PIXI.Container|PIXI.MaskData} + */ + prototypeAccessors.mask.get = function () + { + return this._mask; + }; + + prototypeAccessors.mask.set = function (value) // eslint-disable-line require-jsdoc + { + if (this._mask) + { + var maskObject = this._mask.maskObject || this._mask; + + maskObject.renderable = true; + maskObject.isMask = false; + } + + this._mask = value; + + if (this._mask) + { + var maskObject$1 = this._mask.maskObject || this._mask; + + maskObject$1.renderable = false; + maskObject$1.isMask = true; + } + }; + + Object.defineProperties( DisplayObject.prototype, prototypeAccessors ); + + return DisplayObject; + }(eventemitter3)); + + /** + * DisplayObject default updateTransform, does not update children of container. + * Will crash if there's no parent element. + * + * @memberof PIXI.DisplayObject# + * @function displayObjectUpdateTransform + */ + DisplayObject.prototype.displayObjectUpdateTransform = DisplayObject.prototype.updateTransform; + + function sortChildren(a, b) + { + if (a.zIndex === b.zIndex) + { + return a._lastSortedIndex - b._lastSortedIndex; + } + + return a.zIndex - b.zIndex; + } + + /** + * A Container represents a collection of display objects. + * + * It is the base class of all display objects that act as a container for other objects (like Sprites). + * + *```js + * let container = new PIXI.Container(); + * container.addChild(sprite); + * ``` + * + * @class + * @extends PIXI.DisplayObject + * @memberof PIXI + */ + var Container = /*@__PURE__*/(function (DisplayObject) { + function Container() + { + DisplayObject.call(this); + + /** + * The array of children of this container. + * + * @member {PIXI.DisplayObject[]} + * @readonly + */ + this.children = []; + + /** + * If set to true, the container will sort its children by zIndex value + * when updateTransform() is called, or manually if sortChildren() is called. + * + * This actually changes the order of elements in the array, so should be treated + * as a basic solution that is not performant compared to other solutions, + * such as @link https://github.com/pixijs/pixi-display + * + * Also be aware of that this may not work nicely with the addChildAt() function, + * as the zIndex sorting may cause the child to automatically sorted to another position. + * + * @see PIXI.settings.SORTABLE_CHILDREN + * + * @member {boolean} + */ + this.sortableChildren = settings.SORTABLE_CHILDREN; + + /** + * Should children be sorted by zIndex at the next updateTransform call. + * Will get automatically set to true if a new child is added, or if a child's zIndex changes. + * + * @member {boolean} + */ + this.sortDirty = false; + + /** + * Fired when a DisplayObject is added to this Container. + * + * @event PIXI.Container#childAdded + * @param {PIXI.DisplayObject} child - The child added to the Container. + * @param {PIXI.Container} container - The container that added the child. + * @param {number} index - The children's index of the added child. + */ + + /** + * Fired when a DisplayObject is removed from this Container. + * + * @event PIXI.DisplayObject#removedFrom + * @param {PIXI.DisplayObject} child - The child removed from the Container. + * @param {PIXI.Container} container - The container that removed removed the child. + * @param {number} index - The former children's index of the removed child + */ + } + + if ( DisplayObject ) { Container.__proto__ = DisplayObject; } + Container.prototype = Object.create( DisplayObject && DisplayObject.prototype ); + Container.prototype.constructor = Container; + + var prototypeAccessors = { width: { configurable: true },height: { configurable: true } }; + + /** + * Overridable method that can be used by Container subclasses whenever the children array is modified + * + * @protected + */ + Container.prototype.onChildrenChange = function onChildrenChange () + { + /* empty */ + }; + + /** + * Adds one or more children to the container. + * + * Multiple items can be added like so: `myContainer.addChild(thingOne, thingTwo, thingThree)` + * + * @param {...PIXI.DisplayObject} child - The DisplayObject(s) to add to the container + * @return {PIXI.DisplayObject} The first child that was added. + */ + Container.prototype.addChild = function addChild (child) + { + var arguments$1 = arguments; + + var argumentsLength = arguments.length; + + // if there is only one argument we can bypass looping through the them + if (argumentsLength > 1) + { + // loop through the arguments property and add all children + // use it the right way (.length and [i]) so that this function can still be optimized by JS runtimes + for (var i = 0; i < argumentsLength; i++) + { + this.addChild(arguments$1[i]); + } + } + else + { + // if the child has a parent then lets remove it as PixiJS objects can only exist in one place + if (child.parent) + { + child.parent.removeChild(child); + } + + child.parent = this; + this.sortDirty = true; + + // ensure child transform will be recalculated + child.transform._parentID = -1; + + this.children.push(child); + + // ensure bounds will be recalculated + this._boundsID++; + + // TODO - lets either do all callbacks or all events.. not both! + this.onChildrenChange(this.children.length - 1); + this.emit('childAdded', child, this, this.children.length - 1); + child.emit('added', this); + } + + return child; + }; + + /** + * Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown + * + * @param {PIXI.DisplayObject} child - The child to add + * @param {number} index - The index to place the child in + * @return {PIXI.DisplayObject} The child that was added. + */ + Container.prototype.addChildAt = function addChildAt (child, index) + { + if (index < 0 || index > this.children.length) + { + throw new Error((child + "addChildAt: The index " + index + " supplied is out of bounds " + (this.children.length))); + } + + if (child.parent) + { + child.parent.removeChild(child); + } + + child.parent = this; + this.sortDirty = true; + + // ensure child transform will be recalculated + child.transform._parentID = -1; + + this.children.splice(index, 0, child); + + // ensure bounds will be recalculated + this._boundsID++; + + // TODO - lets either do all callbacks or all events.. not both! + this.onChildrenChange(index); + child.emit('added', this); + this.emit('childAdded', child, this, index); + + return child; + }; + + /** + * Swaps the position of 2 Display Objects within this container. + * + * @param {PIXI.DisplayObject} child - First display object to swap + * @param {PIXI.DisplayObject} child2 - Second display object to swap + */ + Container.prototype.swapChildren = function swapChildren (child, child2) + { + if (child === child2) + { + return; + } + + var index1 = this.getChildIndex(child); + var index2 = this.getChildIndex(child2); + + this.children[index1] = child2; + this.children[index2] = child; + this.onChildrenChange(index1 < index2 ? index1 : index2); + }; + + /** + * Returns the index position of a child DisplayObject instance + * + * @param {PIXI.DisplayObject} child - The DisplayObject instance to identify + * @return {number} The index position of the child display object to identify + */ + Container.prototype.getChildIndex = function getChildIndex (child) + { + var index = this.children.indexOf(child); + + if (index === -1) + { + throw new Error('The supplied DisplayObject must be a child of the caller'); + } + + return index; + }; + + /** + * Changes the position of an existing child in the display object container + * + * @param {PIXI.DisplayObject} child - The child DisplayObject instance for which you want to change the index number + * @param {number} index - The resulting index number for the child display object + */ + Container.prototype.setChildIndex = function setChildIndex (child, index) + { + if (index < 0 || index >= this.children.length) + { + throw new Error(("The index " + index + " supplied is out of bounds " + (this.children.length))); + } + + var currentIndex = this.getChildIndex(child); + + removeItems(this.children, currentIndex, 1); // remove from old position + this.children.splice(index, 0, child); // add at new position + + this.onChildrenChange(index); + }; + + /** + * Returns the child at the specified index + * + * @param {number} index - The index to get the child at + * @return {PIXI.DisplayObject} The child at the given index, if any. + */ + Container.prototype.getChildAt = function getChildAt (index) + { + if (index < 0 || index >= this.children.length) + { + throw new Error(("getChildAt: Index (" + index + ") does not exist.")); + } + + return this.children[index]; + }; + + /** + * Removes one or more children from the container. + * + * @param {...PIXI.DisplayObject} child - The DisplayObject(s) to remove + * @return {PIXI.DisplayObject} The first child that was removed. + */ + Container.prototype.removeChild = function removeChild (child) + { + var arguments$1 = arguments; + + var argumentsLength = arguments.length; + + // if there is only one argument we can bypass looping through the them + if (argumentsLength > 1) + { + // loop through the arguments property and add all children + // use it the right way (.length and [i]) so that this function can still be optimized by JS runtimes + for (var i = 0; i < argumentsLength; i++) + { + this.removeChild(arguments$1[i]); + } + } + else + { + var index = this.children.indexOf(child); + + if (index === -1) { return null; } + + child.parent = null; + // ensure child transform will be recalculated + child.transform._parentID = -1; + removeItems(this.children, index, 1); + + // ensure bounds will be recalculated + this._boundsID++; + + // TODO - lets either do all callbacks or all events.. not both! + this.onChildrenChange(index); + child.emit('removed', this); + this.emit('childRemoved', child, this, index); + } + + return child; + }; + + /** + * Removes a child from the specified index position. + * + * @param {number} index - The index to get the child from + * @return {PIXI.DisplayObject} The child that was removed. + */ + Container.prototype.removeChildAt = function removeChildAt (index) + { + var child = this.getChildAt(index); + + // ensure child transform will be recalculated.. + child.parent = null; + child.transform._parentID = -1; + removeItems(this.children, index, 1); + + // ensure bounds will be recalculated + this._boundsID++; + + // TODO - lets either do all callbacks or all events.. not both! + this.onChildrenChange(index); + child.emit('removed', this); + this.emit('childRemoved', child, this, index); + + return child; + }; + + /** + * Removes all children from this container that are within the begin and end indexes. + * + * @param {number} [beginIndex=0] - The beginning position. + * @param {number} [endIndex=this.children.length] - The ending position. Default value is size of the container. + * @returns {PIXI.DisplayObject[]} List of removed children + */ + Container.prototype.removeChildren = function removeChildren (beginIndex, endIndex) + { + if ( beginIndex === void 0 ) { beginIndex = 0; } + + var begin = beginIndex; + var end = typeof endIndex === 'number' ? endIndex : this.children.length; + var range = end - begin; + var removed; + + if (range > 0 && range <= end) + { + removed = this.children.splice(begin, range); + + for (var i = 0; i < removed.length; ++i) + { + removed[i].parent = null; + if (removed[i].transform) + { + removed[i].transform._parentID = -1; + } + } + + this._boundsID++; + + this.onChildrenChange(beginIndex); + + for (var i$1 = 0; i$1 < removed.length; ++i$1) + { + removed[i$1].emit('removed', this); + this.emit('childRemoved', removed[i$1], this, i$1); + } + + return removed; + } + else if (range === 0 && this.children.length === 0) + { + return []; + } + + throw new RangeError('removeChildren: numeric values are outside the acceptable range.'); + }; + + /** + * Sorts children by zIndex. Previous order is mantained for 2 children with the same zIndex. + */ + Container.prototype.sortChildren = function sortChildren$1 () + { + var sortRequired = false; + + for (var i = 0, j = this.children.length; i < j; ++i) + { + var child = this.children[i]; + + child._lastSortedIndex = i; + + if (!sortRequired && child.zIndex !== 0) + { + sortRequired = true; + } + } + + if (sortRequired && this.children.length > 1) + { + this.children.sort(sortChildren); + } + + this.sortDirty = false; + }; + + /** + * Updates the transform on all children of this container for rendering + */ + Container.prototype.updateTransform = function updateTransform () + { + if (this.sortableChildren && this.sortDirty) + { + this.sortChildren(); + } + + this._boundsID++; + + this.transform.updateTransform(this.parent.transform); + + // TODO: check render flags, how to process stuff here + this.worldAlpha = this.alpha * this.parent.worldAlpha; + + for (var i = 0, j = this.children.length; i < j; ++i) + { + var child = this.children[i]; + + if (child.visible) + { + child.updateTransform(); + } + } + }; + + /** + * Recalculates the bounds of the container. + * + */ + Container.prototype.calculateBounds = function calculateBounds () + { + this._bounds.clear(); + + this._calculateBounds(); + + for (var i = 0; i < this.children.length; i++) + { + var child = this.children[i]; + + if (!child.visible || !child.renderable) + { + continue; + } + + child.calculateBounds(); + + // TODO: filter+mask, need to mask both somehow + if (child._mask) + { + var maskObject = child._mask.maskObject || child._mask; + + maskObject.calculateBounds(); + this._bounds.addBoundsMask(child._bounds, maskObject._bounds); + } + else if (child.filterArea) + { + this._bounds.addBoundsArea(child._bounds, child.filterArea); + } + else + { + this._bounds.addBounds(child._bounds); + } + } + + this._lastBoundsID = this._boundsID; + }; + + /** + * Recalculates the bounds of the object. Override this to + * calculate the bounds of the specific object (not including children). + * + * @protected + */ + Container.prototype._calculateBounds = function _calculateBounds () + { + // FILL IN// + }; + + /** + * Renders the object using the WebGL renderer + * + * @param {PIXI.Renderer} renderer - The renderer + */ + Container.prototype.render = function render (renderer) + { + // if the object is not visible or the alpha is 0 then no need to render this element + if (!this.visible || this.worldAlpha <= 0 || !this.renderable) + { + return; + } + + // do a quick check to see if this element has a mask or a filter. + if (this._mask || (this.filters && this.filters.length)) + { + this.renderAdvanced(renderer); + } + else + { + this._render(renderer); + + // simple render children! + for (var i = 0, j = this.children.length; i < j; ++i) + { + this.children[i].render(renderer); + } + } + }; + + /** + * Render the object using the WebGL renderer and advanced features. + * + * @protected + * @param {PIXI.Renderer} renderer - The renderer + */ + Container.prototype.renderAdvanced = function renderAdvanced (renderer) + { + renderer.batch.flush(); + + var filters = this.filters; + var mask = this._mask; + + // push filter first as we need to ensure the stencil buffer is correct for any masking + if (filters) + { + if (!this._enabledFilters) + { + this._enabledFilters = []; + } + + this._enabledFilters.length = 0; + + for (var i = 0; i < filters.length; i++) + { + if (filters[i].enabled) + { + this._enabledFilters.push(filters[i]); + } + } + + if (this._enabledFilters.length) + { + renderer.filter.push(this, this._enabledFilters); + } + } + + if (mask) + { + renderer.mask.push(this, this._mask); + } + + // add this object to the batch, only rendered if it has a texture. + this._render(renderer); + + // now loop through the children and make sure they get rendered + for (var i$1 = 0, j = this.children.length; i$1 < j; i$1++) + { + this.children[i$1].render(renderer); + } + + renderer.batch.flush(); + + if (mask) + { + renderer.mask.pop(this, this._mask); + } + + if (filters && this._enabledFilters && this._enabledFilters.length) + { + renderer.filter.pop(); + } + }; + + /** + * To be overridden by the subclasses. + * + * @protected + * @param {PIXI.Renderer} renderer - The renderer + */ + Container.prototype._render = function _render (renderer) // eslint-disable-line no-unused-vars + { + // this is where content itself gets rendered... + }; + + /** + * Removes all internal references and listeners as well as removes children from the display list. + * Do not use a Container after calling `destroy`. + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + Container.prototype.destroy = function destroy (options) + { + DisplayObject.prototype.destroy.call(this); + + this.sortDirty = false; + + var destroyChildren = typeof options === 'boolean' ? options : options && options.children; + + var oldChildren = this.removeChildren(0, this.children.length); + + if (destroyChildren) + { + for (var i = 0; i < oldChildren.length; ++i) + { + oldChildren[i].destroy(options); + } + } + }; + + /** + * The width of the Container, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + prototypeAccessors.width.get = function () + { + return this.scale.x * this.getLocalBounds().width; + }; + + prototypeAccessors.width.set = function (value) // eslint-disable-line require-jsdoc + { + var width = this.getLocalBounds().width; + + if (width !== 0) + { + this.scale.x = value / width; + } + else + { + this.scale.x = 1; + } + + this._width = value; + }; + + /** + * The height of the Container, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + prototypeAccessors.height.get = function () + { + return this.scale.y * this.getLocalBounds().height; + }; + + prototypeAccessors.height.set = function (value) // eslint-disable-line require-jsdoc + { + var height = this.getLocalBounds().height; + + if (height !== 0) + { + this.scale.y = value / height; + } + else + { + this.scale.y = 1; + } + + this._height = value; + }; + + Object.defineProperties( Container.prototype, prototypeAccessors ); + + return Container; + }(DisplayObject)); + + // performance increase to avoid using call.. (10x faster) + Container.prototype.containerUpdateTransform = Container.prototype.updateTransform; + + /*! + * @pixi/accessibility - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/accessibility is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Default property values of accessible objects + * used by {@link PIXI.accessibility.AccessibilityManager}. + * + * @private + * @function accessibleTarget + * @memberof PIXI.accessibility + * @type {Object} + * @example + * function MyObject() {} + * + * Object.assign( + * MyObject.prototype, + * PIXI.accessibility.accessibleTarget + * ); + */ + var accessibleTarget = { + /** + * Flag for if the object is accessible. If true AccessibilityManager will overlay a + * shadow div with attributes set + * + * @member {boolean} + * @memberof PIXI.DisplayObject# + */ + accessible: false, + + /** + * Sets the title attribute of the shadow div + * If accessibleTitle AND accessibleHint has not been this will default to 'displayObject [tabIndex]' + * + * @member {?string} + * @memberof PIXI.DisplayObject# + */ + accessibleTitle: null, + + /** + * Sets the aria-label attribute of the shadow div + * + * @member {string} + * @memberof PIXI.DisplayObject# + */ + accessibleHint: null, + + /** + * @member {number} + * @memberof PIXI.DisplayObject# + * @private + * @todo Needs docs. + */ + tabIndex: 0, + + /** + * @member {boolean} + * @memberof PIXI.DisplayObject# + * @todo Needs docs. + */ + _accessibleActive: false, + + /** + * @member {boolean} + * @memberof PIXI.DisplayObject# + * @todo Needs docs. + */ + _accessibleDiv: false, + + /** + * Specify the type of div the accessible layer is. Screen readers treat the element differently + * depending on this type. Defaults to button. + * + * @member {string} + * @memberof PIXI.DisplayObject# + * @default 'button' + */ + accessibleType: 'button', + + /** + * Specify the pointer-events the accessible div will use + * Defaults to auto. + * + * @member {string} + * @memberof PIXI.DisplayObject# + * @default 'auto' + */ + accessiblePointerEvents: 'auto', + + /** + * Setting to false will prevent any children inside this container to + * be accessible. Defaults to true. + * + * @member {boolean} + * @memberof PIXI.DisplayObject# + * @default true + */ + accessibleChildren: true, + }; + + // add some extra variables to the container.. + DisplayObject.mixin(accessibleTarget); + + var KEY_CODE_TAB = 9; + + var DIV_TOUCH_SIZE = 100; + var DIV_TOUCH_POS_X = 0; + var DIV_TOUCH_POS_Y = 0; + var DIV_TOUCH_ZINDEX = 2; + + var DIV_HOOK_SIZE = 1; + var DIV_HOOK_POS_X = -1000; + var DIV_HOOK_POS_Y = -1000; + var DIV_HOOK_ZINDEX = 2; + + /** + * The Accessibility manager recreates the ability to tab and have content read by screen readers. + * This is very important as it can possibly help people with disabilities access PixiJS content. + * + * A DisplayObject can be made accessible just like it can be made interactive. This manager will map the + * events as if the mouse was being used, minimizing the effort required to implement. + * + * An instance of this class is automatically created by default, and can be found at `renderer.plugins.accessibility` + * + * @class + * @memberof PIXI.accessibility + */ + var AccessibilityManager = function AccessibilityManager(renderer) + { + /** + * @type {?HTMLElement} + * @private + */ + this._hookDiv = null; + if (isMobile$1.tablet || isMobile$1.phone) + { + this.createTouchHook(); + } + + // first we create a div that will sit over the PixiJS element. This is where the div overlays will go. + var div = document.createElement('div'); + + div.style.width = DIV_TOUCH_SIZE + "px"; + div.style.height = DIV_TOUCH_SIZE + "px"; + div.style.position = 'absolute'; + div.style.top = DIV_TOUCH_POS_X + "px"; + div.style.left = DIV_TOUCH_POS_Y + "px"; + div.style.zIndex = DIV_TOUCH_ZINDEX; + + /** + * This is the dom element that will sit over the PixiJS element. This is where the div overlays will go. + * + * @type {HTMLElement} + * @private + */ + this.div = div; + + /** + * A simple pool for storing divs. + * + * @type {*} + * @private + */ + this.pool = []; + + /** + * This is a tick used to check if an object is no longer being rendered. + * + * @type {Number} + * @private + */ + this.renderId = 0; + + /** + * Setting this to true will visually show the divs. + * + * @type {boolean} + */ + this.debug = false; + + /** + * The renderer this accessibility manager works for. + * + * @member {PIXI.AbstractRenderer} + */ + this.renderer = renderer; + + /** + * The array of currently active accessible items. + * + * @member {Array<*>} + * @private + */ + this.children = []; + + /** + * pre-bind the functions + * + * @type {Function} + * @private + */ + this._onKeyDown = this._onKeyDown.bind(this); + + /** + * pre-bind the functions + * + * @type {Function} + * @private + */ + this._onMouseMove = this._onMouseMove.bind(this); + + /** + * A flag + * @type {boolean} + * @readonly + */ + this.isActive = false; + + /** + * A flag + * @type {boolean} + * @readonly + */ + this.isMobileAccessibility = false; + + /** + * count to throttle div updates on android devices + * @type number + * @private + */ + this.androidUpdateCount = 0; + + /** + * the frequency to update the div elements () + * @private + */ + this.androidUpdateFrequency = 500; // 2fps + + // let listen for tab.. once pressed we can fire up and show the accessibility layer + window.addEventListener('keydown', this._onKeyDown, false); + }; + + /** + * Creates the touch hooks. + * + * @private + */ + AccessibilityManager.prototype.createTouchHook = function createTouchHook () + { + var this$1 = this; + + var hookDiv = document.createElement('button'); + + hookDiv.style.width = DIV_HOOK_SIZE + "px"; + hookDiv.style.height = DIV_HOOK_SIZE + "px"; + hookDiv.style.position = 'absolute'; + hookDiv.style.top = DIV_HOOK_POS_X + "px"; + hookDiv.style.left = DIV_HOOK_POS_Y + "px"; + hookDiv.style.zIndex = DIV_HOOK_ZINDEX; + hookDiv.style.backgroundColor = '#FF0000'; + hookDiv.title = 'select to enable accessability for this content'; + + hookDiv.addEventListener('focus', function () { + this$1.isMobileAccessibility = true; + this$1.activate(); + this$1.destroyTouchHook(); + }); + + document.body.appendChild(hookDiv); + this._hookDiv = hookDiv; + }; + + /** + * Destroys the touch hooks. + * + * @private + */ + AccessibilityManager.prototype.destroyTouchHook = function destroyTouchHook () + { + if (!this._hookDiv) + { + return; + } + document.body.removeChild(this._hookDiv); + this._hookDiv = null; + }; + + /** + * Activating will cause the Accessibility layer to be shown. + * This is called when a user presses the tab key. + * + * @private + */ + AccessibilityManager.prototype.activate = function activate () + { + if (this.isActive) + { + return; + } + + this.isActive = true; + + window.document.addEventListener('mousemove', this._onMouseMove, true); + window.removeEventListener('keydown', this._onKeyDown, false); + + this.renderer.on('postrender', this.update, this); + + if (this.renderer.view.parentNode) + { + this.renderer.view.parentNode.appendChild(this.div); + } + }; + + /** + * Deactivating will cause the Accessibility layer to be hidden. + * This is called when a user moves the mouse. + * + * @private + */ + AccessibilityManager.prototype.deactivate = function deactivate () + { + if (!this.isActive || this.isMobileAccessibility) + { + return; + } + + this.isActive = false; + + window.document.removeEventListener('mousemove', this._onMouseMove, true); + window.addEventListener('keydown', this._onKeyDown, false); + + this.renderer.off('postrender', this.update); + + if (this.div.parentNode) + { + this.div.parentNode.removeChild(this.div); + } + }; + + /** + * This recursive function will run through the scene graph and add any new accessible objects to the DOM layer. + * + * @private + * @param {PIXI.Container} displayObject - The DisplayObject to check. + */ + AccessibilityManager.prototype.updateAccessibleObjects = function updateAccessibleObjects (displayObject) + { + if (!displayObject.visible || !displayObject.accessibleChildren) + { + return; + } + + if (displayObject.accessible && displayObject.interactive) + { + if (!displayObject._accessibleActive) + { + this.addChild(displayObject); + } + + displayObject.renderId = this.renderId; + } + + var children = displayObject.children; + + for (var i = 0; i < children.length; i++) + { + this.updateAccessibleObjects(children[i]); + } + }; + + /** + * Before each render this function will ensure that all divs are mapped correctly to their DisplayObjects. + * + * @private + */ + AccessibilityManager.prototype.update = function update () + { + /* On Android default web browser, tab order seems to be calculated by position rather than tabIndex, + * moving buttons can cause focus to flicker between two buttons making it hard/impossible to navigate, + * so I am just running update every half a second, seems to fix it. + */ + var now = performance.now(); + + if (isMobile$1.android.device && now < this.androidUpdateCount) + { + return; + } + + this.androidUpdateCount = now + this.androidUpdateFrequency; + + if (!this.renderer.renderingToScreen) + { + return; + } + + // update children... + this.updateAccessibleObjects(this.renderer._lastObjectRendered); + + var rect = this.renderer.view.getBoundingClientRect(); + + var resolution = this.renderer.resolution; + + var sx = (rect.width / this.renderer.width) * resolution; + var sy = (rect.height / this.renderer.height) * resolution; + + var div = this.div; + + div.style.left = (rect.left) + "px"; + div.style.top = (rect.top) + "px"; + div.style.width = (this.renderer.width) + "px"; + div.style.height = (this.renderer.height) + "px"; + + for (var i = 0; i < this.children.length; i++) + { + var child = this.children[i]; + + if (child.renderId !== this.renderId) + { + child._accessibleActive = false; + + removeItems(this.children, i, 1); + this.div.removeChild(child._accessibleDiv); + this.pool.push(child._accessibleDiv); + child._accessibleDiv = null; + + i--; + } + else + { + // map div to display.. + div = child._accessibleDiv; + var hitArea = child.hitArea; + var wt = child.worldTransform; + + if (child.hitArea) + { + div.style.left = ((wt.tx + (hitArea.x * wt.a)) * sx) + "px"; + div.style.top = ((wt.ty + (hitArea.y * wt.d)) * sy) + "px"; + + div.style.width = (hitArea.width * wt.a * sx) + "px"; + div.style.height = (hitArea.height * wt.d * sy) + "px"; + } + else + { + hitArea = child.getBounds(); + + this.capHitArea(hitArea); + + div.style.left = (hitArea.x * sx) + "px"; + div.style.top = (hitArea.y * sy) + "px"; + + div.style.width = (hitArea.width * sx) + "px"; + div.style.height = (hitArea.height * sy) + "px"; + + // update button titles and hints if they exist and they've changed + if (div.title !== child.accessibleTitle && child.accessibleTitle !== null) + { + div.title = child.accessibleTitle; + } + if (div.getAttribute('aria-label') !== child.accessibleHint + && child.accessibleHint !== null) + { + div.setAttribute('aria-label', child.accessibleHint); + } + } + + // the title or index may have changed, if so lets update it! + if (child.accessibleTitle !== div.title || child.tabIndex !== div.tabIndex) + { + div.title = child.accessibleTitle; + div.tabIndex = child.tabIndex; + if (this.debug) { this.updateDebugHTML(div); } + } + } + } + + // increment the render id.. + this.renderId++; + }; + + /** + * private function that will visually add the information to the + * accessability div + * + * @param {HTMLDivElement} div + */ + AccessibilityManager.prototype.updateDebugHTML = function updateDebugHTML (div) + { + div.innerHTML = "type: " + (div.type) + "
title : " + (div.title) + "
tabIndex: " + (div.tabIndex); + }; + + /** + * Adjust the hit area based on the bounds of a display object + * + * @param {PIXI.Rectangle} hitArea - Bounds of the child + */ + AccessibilityManager.prototype.capHitArea = function capHitArea (hitArea) + { + if (hitArea.x < 0) + { + hitArea.width += hitArea.x; + hitArea.x = 0; + } + + if (hitArea.y < 0) + { + hitArea.height += hitArea.y; + hitArea.y = 0; + } + + if (hitArea.x + hitArea.width > this.renderer.width) + { + hitArea.width = this.renderer.width - hitArea.x; + } + + if (hitArea.y + hitArea.height > this.renderer.height) + { + hitArea.height = this.renderer.height - hitArea.y; + } + }; + + /** + * Adds a DisplayObject to the accessibility manager + * + * @private + * @param {PIXI.DisplayObject} displayObject - The child to make accessible. + */ + AccessibilityManager.prototype.addChild = function addChild (displayObject) + { + //this.activate(); + + var div = this.pool.pop(); + + if (!div) + { + div = document.createElement('button'); + + div.style.width = DIV_TOUCH_SIZE + "px"; + div.style.height = DIV_TOUCH_SIZE + "px"; + div.style.backgroundColor = this.debug ? 'rgba(255,255,255,0.5)' : 'transparent'; + div.style.position = 'absolute'; + div.style.zIndex = DIV_TOUCH_ZINDEX; + div.style.borderStyle = 'none'; + + // ARIA attributes ensure that button title and hint updates are announced properly + if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) + { + // Chrome doesn't need aria-live to work as intended; in fact it just gets more confused. + div.setAttribute('aria-live', 'off'); + } + else + { + div.setAttribute('aria-live', 'polite'); + } + + if (navigator.userAgent.match(/rv:.*Gecko\//)) + { + // FireFox needs this to announce only the new button name + div.setAttribute('aria-relevant', 'additions'); + } + else + { + // required by IE, other browsers don't much care + div.setAttribute('aria-relevant', 'text'); + } + + div.addEventListener('click', this._onClick.bind(this)); + div.addEventListener('focus', this._onFocus.bind(this)); + div.addEventListener('focusout', this._onFocusOut.bind(this)); + } + + // set pointer events + div.style.pointerEvents = displayObject.accessiblePointerEvents; + // set the type, this defaults to button! + div.type = displayObject.accessibleType; + + if (displayObject.accessibleTitle && displayObject.accessibleTitle !== null) + { + div.title = displayObject.accessibleTitle; + } + else if (!displayObject.accessibleHint + || displayObject.accessibleHint === null) + { + div.title = "displayObject " + (displayObject.tabIndex); + } + + if (displayObject.accessibleHint + && displayObject.accessibleHint !== null) + { + div.setAttribute('aria-label', displayObject.accessibleHint); + } + + if (this.debug) { this.updateDebugHTML(div); } + + displayObject._accessibleActive = true; + displayObject._accessibleDiv = div; + div.displayObject = displayObject; + + this.children.push(displayObject); + this.div.appendChild(displayObject._accessibleDiv); + displayObject._accessibleDiv.tabIndex = displayObject.tabIndex; + }; + + /** + * Maps the div button press to pixi's InteractionManager (click) + * + * @private + * @param {MouseEvent} e - The click event. + */ + AccessibilityManager.prototype._onClick = function _onClick (e) + { + var interactionManager = this.renderer.plugins.interaction; + + interactionManager.dispatchEvent(e.target.displayObject, 'click', interactionManager.eventData); + interactionManager.dispatchEvent(e.target.displayObject, 'pointertap', interactionManager.eventData); + interactionManager.dispatchEvent(e.target.displayObject, 'tap', interactionManager.eventData); + }; + + /** + * Maps the div focus events to pixi's InteractionManager (mouseover) + * + * @private + * @param {FocusEvent} e - The focus event. + */ + AccessibilityManager.prototype._onFocus = function _onFocus (e) + { + if (!e.target.getAttribute('aria-live', 'off')) + { + e.target.setAttribute('aria-live', 'assertive'); + } + var interactionManager = this.renderer.plugins.interaction; + + interactionManager.dispatchEvent(e.target.displayObject, 'mouseover', interactionManager.eventData); + }; + + /** + * Maps the div focus events to pixi's InteractionManager (mouseout) + * + * @private + * @param {FocusEvent} e - The focusout event. + */ + AccessibilityManager.prototype._onFocusOut = function _onFocusOut (e) + { + if (!e.target.getAttribute('aria-live', 'off')) + { + e.target.setAttribute('aria-live', 'polite'); + } + var interactionManager = this.renderer.plugins.interaction; + + interactionManager.dispatchEvent(e.target.displayObject, 'mouseout', interactionManager.eventData); + }; + + /** + * Is called when a key is pressed + * + * @private + * @param {KeyboardEvent} e - The keydown event. + */ + AccessibilityManager.prototype._onKeyDown = function _onKeyDown (e) + { + if (e.keyCode !== KEY_CODE_TAB) + { + return; + } + + this.activate(); + }; + + /** + * Is called when the mouse moves across the renderer element + * + * @private + * @param {MouseEvent} e - The mouse event. + */ + AccessibilityManager.prototype._onMouseMove = function _onMouseMove (e) + { + if (e.movementX === 0 && e.movementY === 0) + { + return; + } + + this.deactivate(); + }; + + /** + * Destroys the accessibility manager + * + */ + AccessibilityManager.prototype.destroy = function destroy () + { + this.destroyTouchHook(); + this.div = null; + + for (var i = 0; i < this.children.length; i++) + { + this.children[i].div = null; + } + + window.document.removeEventListener('mousemove', this._onMouseMove, true); + window.removeEventListener('keydown', this._onKeyDown); + + this.pool = null; + this.children = null; + this.renderer = null; + }; + + var accessibility_es = ({ + AccessibilityManager: AccessibilityManager, + accessibleTarget: accessibleTarget + }); + + /*! + * @pixi/ticker - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/ticker is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Target frames per millisecond. + * + * @static + * @name TARGET_FPMS + * @memberof PIXI.settings + * @type {number} + * @default 0.06 + */ + settings.TARGET_FPMS = 0.06; + + /** + * Represents the update priorities used by internal PIXI classes when registered with + * the {@link PIXI.Ticker} object. Higher priority items are updated first and lower + * priority items, such as render, should go later. + * + * @static + * @constant + * @name UPDATE_PRIORITY + * @memberof PIXI + * @enum {number} + * @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.interaction.InteractionManager} + * @property {number} HIGH=25 High priority updating, {@link PIXI.VideoBaseTexture} and {@link PIXI.AnimatedSprite} + * @property {number} NORMAL=0 Default priority for ticker events, see {@link PIXI.Ticker#add}. + * @property {number} LOW=-25 Low priority used for {@link PIXI.Application} rendering. + * @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.prepare.BasePrepare} utility. + */ + + (function (UPDATE_PRIORITY) { + UPDATE_PRIORITY[UPDATE_PRIORITY["INTERACTION"] = 50] = "INTERACTION"; + UPDATE_PRIORITY[UPDATE_PRIORITY["HIGH"] = 25] = "HIGH"; + UPDATE_PRIORITY[UPDATE_PRIORITY["NORMAL"] = 0] = "NORMAL"; + UPDATE_PRIORITY[UPDATE_PRIORITY["LOW"] = -25] = "LOW"; + UPDATE_PRIORITY[UPDATE_PRIORITY["UTILITY"] = -50] = "UTILITY"; + })(exports.UPDATE_PRIORITY || (exports.UPDATE_PRIORITY = {})); + + /** + * Internal class for handling the priority sorting of ticker handlers. + * + * @private + * @class + * @memberof PIXI + */ + var TickerListener = /** @class */ (function () { + /** + * Constructor + * @private + * @param {Function} fn - The listener function to be added for one update + * @param {*} [context=null] - The listener context + * @param {number} [priority=0] - The priority for emitting + * @param {boolean} [once=false] - If the handler should fire once + */ + function TickerListener(fn, context, priority, once) { + if (context === void 0) { context = null; } + if (priority === void 0) { priority = 0; } + if (once === void 0) { once = false; } + /** + * The handler function to execute. + * @private + * @member {Function} + */ + this.fn = fn; + /** + * The calling to execute. + * @private + * @member {*} + */ + this.context = context; + /** + * The current priority. + * @private + * @member {number} + */ + this.priority = priority; + /** + * If this should only execute once. + * @private + * @member {boolean} + */ + this.once = once; + /** + * The next item in chain. + * @private + * @member {TickerListener} + */ + this.next = null; + /** + * The previous item in chain. + * @private + * @member {TickerListener} + */ + this.previous = null; + /** + * `true` if this listener has been destroyed already. + * @member {boolean} + * @private + */ + this._destroyed = false; + } + /** + * Simple compare function to figure out if a function and context match. + * @private + * @param {Function} fn - The listener function to be added for one update + * @param {any} [context] - The listener context + * @return {boolean} `true` if the listener match the arguments + */ + TickerListener.prototype.match = function (fn, context) { + if (context === void 0) { context = null; } + return this.fn === fn && this.context === context; + }; + /** + * Emit by calling the current function. + * @private + * @param {number} deltaTime - time since the last emit. + * @return {TickerListener} Next ticker + */ + TickerListener.prototype.emit = function (deltaTime) { + if (this.fn) { + if (this.context) { + this.fn.call(this.context, deltaTime); + } + else { + this.fn(deltaTime); + } + } + var redirect = this.next; + if (this.once) { + this.destroy(true); + } + // Soft-destroying should remove + // the next reference + if (this._destroyed) { + this.next = null; + } + return redirect; + }; + /** + * Connect to the list. + * @private + * @param {TickerListener} previous - Input node, previous listener + */ + TickerListener.prototype.connect = function (previous) { + this.previous = previous; + if (previous.next) { + previous.next.previous = this; + } + this.next = previous.next; + previous.next = this; + }; + /** + * Destroy and don't use after this. + * @private + * @param {boolean} [hard = false] `true` to remove the `next` reference, this + * is considered a hard destroy. Soft destroy maintains the next reference. + * @return {TickerListener} The listener to redirect while emitting or removing. + */ + TickerListener.prototype.destroy = function (hard) { + if (hard === void 0) { hard = false; } + this._destroyed = true; + this.fn = null; + this.context = null; + // Disconnect, hook up next and previous + if (this.previous) { + this.previous.next = this.next; + } + if (this.next) { + this.next.previous = this.previous; + } + // Redirect to the next item + var redirect = this.next; + // Remove references + this.next = hard ? null : redirect; + this.previous = null; + return redirect; + }; + return TickerListener; + }()); + + /** + * A Ticker class that runs an update loop that other objects listen to. + * + * This class is composed around listeners meant for execution on the next requested animation frame. + * Animation frames are requested only when necessary, e.g. When the ticker is started and the emitter has listeners. + * + * @class + * @memberof PIXI + */ + var Ticker = /** @class */ (function () { + function Ticker() { + var _this = this; + /** + * The first listener. All new listeners added are chained on this. + * @private + * @type {TickerListener} + */ + this._head = new TickerListener(null, null, Infinity); + /** + * Internal current frame request ID + * @type {?number} + * @private + */ + this._requestId = null; + /** + * Internal value managed by minFPS property setter and getter. + * This is the maximum allowed milliseconds between updates. + * @type {number} + * @private + */ + this._maxElapsedMS = 100; + /** + * Internal value managed by maxFPS property setter and getter. + * This is the minimum allowed milliseconds between updates. + * @type {number} + * @private + */ + this._minElapsedMS = 0; + /** + * Whether or not this ticker should invoke the method + * {@link PIXI.Ticker#start} automatically + * when a listener is added. + * + * @member {boolean} + * @default false + */ + this.autoStart = false; + /** + * Scalar time value from last frame to this frame. + * This value is capped by setting {@link PIXI.Ticker#minFPS} + * and is scaled with {@link PIXI.Ticker#speed}. + * **Note:** The cap may be exceeded by scaling. + * + * @member {number} + * @default 1 + */ + this.deltaTime = 1; + /** + * Scaler time elapsed in milliseconds from last frame to this frame. + * This value is capped by setting {@link PIXI.Ticker#minFPS} + * and is scaled with {@link PIXI.Ticker#speed}. + * **Note:** The cap may be exceeded by scaling. + * If the platform supports DOMHighResTimeStamp, + * this value will have a precision of 1 µs. + * Defaults to target frame time + * + * @member {number} + * @default 16.66 + */ + this.deltaMS = 1 / settings.TARGET_FPMS; + /** + * Time elapsed in milliseconds from last frame to this frame. + * Opposed to what the scalar {@link PIXI.Ticker#deltaTime} + * is based, this value is neither capped nor scaled. + * If the platform supports DOMHighResTimeStamp, + * this value will have a precision of 1 µs. + * Defaults to target frame time + * + * @member {number} + * @default 16.66 + */ + this.elapsedMS = 1 / settings.TARGET_FPMS; + /** + * The last time {@link PIXI.Ticker#update} was invoked. + * This value is also reset internally outside of invoking + * update, but only when a new animation frame is requested. + * If the platform supports DOMHighResTimeStamp, + * this value will have a precision of 1 µs. + * + * @member {number} + * @default -1 + */ + this.lastTime = -1; + /** + * Factor of current {@link PIXI.Ticker#deltaTime}. + * @example + * // Scales ticker.deltaTime to what would be + * // the equivalent of approximately 120 FPS + * ticker.speed = 2; + * + * @member {number} + * @default 1 + */ + this.speed = 1; + /** + * Whether or not this ticker has been started. + * `true` if {@link PIXI.Ticker#start} has been called. + * `false` if {@link PIXI.Ticker#stop} has been called. + * While `false`, this value may change to `true` in the + * event of {@link PIXI.Ticker#autoStart} being `true` + * and a listener is added. + * + * @member {boolean} + * @default false + */ + this.started = false; + /** + * If enabled, deleting is disabled. + * @member {boolean} + * @default false + * @private + */ + this._protected = false; + /** + * The last time keyframe was executed. + * Maintains a relatively fixed interval with the previous value. + * @member {number} + * @default -1 + * @private + */ + this._lastFrame = -1; + /** + * Internal tick method bound to ticker instance. + * This is because in early 2015, Function.bind + * is still 60% slower in high performance scenarios. + * Also separating frame requests from update method + * so listeners may be called at any time and with + * any animation API, just invoke ticker.update(time). + * + * @private + * @param {number} time - Time since last tick. + */ + this._tick = function (time) { + _this._requestId = null; + if (_this.started) { + // Invoke listeners now + _this.update(time); + // Listener side effects may have modified ticker state. + if (_this.started && _this._requestId === null && _this._head.next) { + _this._requestId = requestAnimationFrame(_this._tick); + } + } + }; + } + /** + * Conditionally requests a new animation frame. + * If a frame has not already been requested, and if the internal + * emitter has listeners, a new frame is requested. + * + * @private + */ + Ticker.prototype._requestIfNeeded = function () { + if (this._requestId === null && this._head.next) { + // ensure callbacks get correct delta + this.lastTime = performance.now(); + this._lastFrame = this.lastTime; + this._requestId = requestAnimationFrame(this._tick); + } + }; + /** + * Conditionally cancels a pending animation frame. + * + * @private + */ + Ticker.prototype._cancelIfNeeded = function () { + if (this._requestId !== null) { + cancelAnimationFrame(this._requestId); + this._requestId = null; + } + }; + /** + * Conditionally requests a new animation frame. + * If the ticker has been started it checks if a frame has not already + * been requested, and if the internal emitter has listeners. If these + * conditions are met, a new frame is requested. If the ticker has not + * been started, but autoStart is `true`, then the ticker starts now, + * and continues with the previous conditions to request a new frame. + * + * @private + */ + Ticker.prototype._startIfPossible = function () { + if (this.started) { + this._requestIfNeeded(); + } + else if (this.autoStart) { + this.start(); + } + }; + /** + * Register a handler for tick events. Calls continuously unless + * it is removed or the ticker is stopped. + * + * @param {Function} fn - The listener function to be added for updates + * @param {*} [context] - The listener context + * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting + * @returns {PIXI.Ticker} This instance of a ticker + */ + Ticker.prototype.add = function (fn, context, priority) { + if (priority === void 0) { priority = exports.UPDATE_PRIORITY.NORMAL; } + return this._addListener(new TickerListener(fn, context, priority)); + }; + /** + * Add a handler for the tick event which is only execute once. + * + * @param {Function} fn - The listener function to be added for one update + * @param {*} [context] - The listener context + * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting + * @returns {PIXI.Ticker} This instance of a ticker + */ + Ticker.prototype.addOnce = function (fn, context, priority) { + if (priority === void 0) { priority = exports.UPDATE_PRIORITY.NORMAL; } + return this._addListener(new TickerListener(fn, context, priority, true)); + }; + /** + * Internally adds the event handler so that it can be sorted by priority. + * Priority allows certain handler (user, AnimatedSprite, Interaction) to be run + * before the rendering. + * + * @private + * @param {TickerListener} listener - Current listener being added. + * @returns {PIXI.Ticker} This instance of a ticker + */ + Ticker.prototype._addListener = function (listener) { + // For attaching to head + var current = this._head.next; + var previous = this._head; + // Add the first item + if (!current) { + listener.connect(previous); + } + else { + // Go from highest to lowest priority + while (current) { + if (listener.priority > current.priority) { + listener.connect(previous); + break; + } + previous = current; + current = current.next; + } + // Not yet connected + if (!listener.previous) { + listener.connect(previous); + } + } + this._startIfPossible(); + return this; + }; + /** + * Removes any handlers matching the function and context parameters. + * If no handlers are left after removing, then it cancels the animation frame. + * + * @param {Function} fn - The listener function to be removed + * @param {*} [context] - The listener context to be removed + * @returns {PIXI.Ticker} This instance of a ticker + */ + Ticker.prototype.remove = function (fn, context) { + var listener = this._head.next; + while (listener) { + // We found a match, lets remove it + // no break to delete all possible matches + // incase a listener was added 2+ times + if (listener.match(fn, context)) { + listener = listener.destroy(); + } + else { + listener = listener.next; + } + } + if (!this._head.next) { + this._cancelIfNeeded(); + } + return this; + }; + Object.defineProperty(Ticker.prototype, "count", { + /** + * Counts the number of listeners on this ticker. + * + * @returns {number} The number of listeners on this ticker + */ + get: function () { + if (!this._head) { + return 0; + } + var count = 0; + var current = this._head; + while ((current = current.next)) { + count++; + } + return count; + }, + enumerable: true, + configurable: true + }); + /** + * Starts the ticker. If the ticker has listeners + * a new animation frame is requested at this point. + */ + Ticker.prototype.start = function () { + if (!this.started) { + this.started = true; + this._requestIfNeeded(); + } + }; + /** + * Stops the ticker. If the ticker has requested + * an animation frame it is canceled at this point. + */ + Ticker.prototype.stop = function () { + if (this.started) { + this.started = false; + this._cancelIfNeeded(); + } + }; + /** + * Destroy the ticker and don't use after this. Calling + * this method removes all references to internal events. + */ + Ticker.prototype.destroy = function () { + if (!this._protected) { + this.stop(); + var listener = this._head.next; + while (listener) { + listener = listener.destroy(true); + } + this._head.destroy(); + this._head = null; + } + }; + /** + * Triggers an update. An update entails setting the + * current {@link PIXI.Ticker#elapsedMS}, + * the current {@link PIXI.Ticker#deltaTime}, + * invoking all listeners with current deltaTime, + * and then finally setting {@link PIXI.Ticker#lastTime} + * with the value of currentTime that was provided. + * This method will be called automatically by animation + * frame callbacks if the ticker instance has been started + * and listeners are added. + * + * @param {number} [currentTime=performance.now()] - the current time of execution + */ + Ticker.prototype.update = function (currentTime) { + if (currentTime === void 0) { currentTime = performance.now(); } + var elapsedMS; + // If the difference in time is zero or negative, we ignore most of the work done here. + // If there is no valid difference, then should be no reason to let anyone know about it. + // A zero delta, is exactly that, nothing should update. + // + // The difference in time can be negative, and no this does not mean time traveling. + // This can be the result of a race condition between when an animation frame is requested + // on the current JavaScript engine event loop, and when the ticker's start method is invoked + // (which invokes the internal _requestIfNeeded method). If a frame is requested before + // _requestIfNeeded is invoked, then the callback for the animation frame the ticker requests, + // can receive a time argument that can be less than the lastTime value that was set within + // _requestIfNeeded. This difference is in microseconds, but this is enough to cause problems. + // + // This check covers this browser engine timing issue, as well as if consumers pass an invalid + // currentTime value. This may happen if consumers opt-out of the autoStart, and update themselves. + if (currentTime > this.lastTime) { + // Save uncapped elapsedMS for measurement + elapsedMS = this.elapsedMS = currentTime - this.lastTime; + // cap the milliseconds elapsed used for deltaTime + if (elapsedMS > this._maxElapsedMS) { + elapsedMS = this._maxElapsedMS; + } + elapsedMS *= this.speed; + // If not enough time has passed, exit the function. + // Get ready for next frame by setting _lastFrame, but based on _minElapsedMS + // adjustment to ensure a relatively stable interval. + if (this._minElapsedMS) { + var delta = currentTime - this._lastFrame | 0; + if (delta < this._minElapsedMS) { + return; + } + this._lastFrame = currentTime - (delta % this._minElapsedMS); + } + this.deltaMS = elapsedMS; + this.deltaTime = this.deltaMS * settings.TARGET_FPMS; + // Cache a local reference, in-case ticker is destroyed + // during the emit, we can still check for head.next + var head = this._head; + // Invoke listeners added to internal emitter + var listener = head.next; + while (listener) { + listener = listener.emit(this.deltaTime); + } + if (!head.next) { + this._cancelIfNeeded(); + } + } + else { + this.deltaTime = this.deltaMS = this.elapsedMS = 0; + } + this.lastTime = currentTime; + }; + Object.defineProperty(Ticker.prototype, "FPS", { + /** + * The frames per second at which this ticker is running. + * The default is approximately 60 in most modern browsers. + * **Note:** This does not factor in the value of + * {@link PIXI.Ticker#speed}, which is specific + * to scaling {@link PIXI.Ticker#deltaTime}. + * + * @member {number} + * @readonly + */ + get: function () { + return 1000 / this.elapsedMS; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Ticker.prototype, "minFPS", { + /** + * Manages the maximum amount of milliseconds allowed to + * elapse between invoking {@link PIXI.Ticker#update}. + * This value is used to cap {@link PIXI.Ticker#deltaTime}, + * but does not effect the measured value of {@link PIXI.Ticker#FPS}. + * When setting this property it is clamped to a value between + * `0` and `PIXI.settings.TARGET_FPMS * 1000`. + * + * @member {number} + * @default 10 + */ + get: function () { + return 1000 / this._maxElapsedMS; + }, + set: function (fps) { + // Minimum must be below the maxFPS + var minFPS = Math.min(this.maxFPS, fps); + // Must be at least 0, but below 1 / settings.TARGET_FPMS + var minFPMS = Math.min(Math.max(0, minFPS) / 1000, settings.TARGET_FPMS); + this._maxElapsedMS = 1 / minFPMS; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Ticker.prototype, "maxFPS", { + /** + * Manages the minimum amount of milliseconds required to + * elapse between invoking {@link PIXI.Ticker#update}. + * This will effect the measured value of {@link PIXI.Ticker#FPS}. + * If it is set to `0`, then there is no limit; PixiJS will render as many frames as it can. + * Otherwise it will be at least `minFPS` + * + * @member {number} + * @default 0 + */ + get: function () { + if (this._minElapsedMS) { + return Math.round(1000 / this._minElapsedMS); + } + return 0; + }, + set: function (fps) { + if (fps === 0) { + this._minElapsedMS = 0; + } + else { + // Max must be at least the minFPS + var maxFPS = Math.max(this.minFPS, fps); + this._minElapsedMS = 1 / (maxFPS / 1000); + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Ticker, "shared", { + /** + * The shared ticker instance used by {@link PIXI.AnimatedSprite} and by + * {@link PIXI.VideoResource} to update animation frames / video textures. + * + * It may also be used by {@link PIXI.Application} if created with the `sharedTicker` option property set to true. + * + * The property {@link PIXI.Ticker#autoStart} is set to `true` for this instance. + * Please follow the examples for usage, including how to opt-out of auto-starting the shared ticker. + * + * @example + * let ticker = PIXI.Ticker.shared; + * // Set this to prevent starting this ticker when listeners are added. + * // By default this is true only for the PIXI.Ticker.shared instance. + * ticker.autoStart = false; + * // FYI, call this to ensure the ticker is stopped. It should be stopped + * // if you have not attempted to render anything yet. + * ticker.stop(); + * // Call this when you are ready for a running shared ticker. + * ticker.start(); + * + * @example + * // You may use the shared ticker to render... + * let renderer = PIXI.autoDetectRenderer(); + * let stage = new PIXI.Container(); + * document.body.appendChild(renderer.view); + * ticker.add(function (time) { + * renderer.render(stage); + * }); + * + * @example + * // Or you can just update it manually. + * ticker.autoStart = false; + * ticker.stop(); + * function animate(time) { + * ticker.update(time); + * renderer.render(stage); + * requestAnimationFrame(animate); + * } + * animate(performance.now()); + * + * @member {PIXI.Ticker} + * @static + */ + get: function () { + if (!Ticker._shared) { + var shared = Ticker._shared = new Ticker(); + shared.autoStart = true; + shared._protected = true; + } + return Ticker._shared; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Ticker, "system", { + /** + * The system ticker instance used by {@link PIXI.interaction.InteractionManager} and by + * {@link PIXI.BasePrepare} for core timing functionality that shouldn't usually need to be paused, + * unlike the `shared` ticker which drives visual animations and rendering which may want to be paused. + * + * The property {@link PIXI.Ticker#autoStart} is set to `true` for this instance. + * + * @member {PIXI.Ticker} + * @static + */ + get: function () { + if (!Ticker._system) { + var system = Ticker._system = new Ticker(); + system.autoStart = true; + system._protected = true; + } + return Ticker._system; + }, + enumerable: true, + configurable: true + }); + return Ticker; + }()); + + /** + * Middleware for for Application Ticker. + * + * @example + * import {TickerPlugin} from '@pixi/ticker'; + * import {Application} from '@pixi/app'; + * Application.registerPlugin(TickerPlugin); + * + * @class + * @memberof PIXI + */ + var TickerPlugin = /** @class */ (function () { + function TickerPlugin() { + } + /** + * Initialize the plugin with scope of application instance + * + * @static + * @private + * @param {object} [options] - See application options + */ + TickerPlugin.init = function (options) { + var _this = this; + // Set default + options = Object.assign({ + autoStart: true, + sharedTicker: false, + }, options); + // Create ticker setter + Object.defineProperty(this, 'ticker', { + set: function (ticker) { + if (this._ticker) { + this._ticker.remove(this.render, this); + } + this._ticker = ticker; + if (ticker) { + ticker.add(this.render, this, exports.UPDATE_PRIORITY.LOW); + } + }, + get: function () { + return this._ticker; + }, + }); + /** + * Convenience method for stopping the render. + * + * @method PIXI.Application#stop + */ + this.stop = function () { + _this._ticker.stop(); + }; + /** + * Convenience method for starting the render. + * + * @method PIXI.Application#start + */ + this.start = function () { + _this._ticker.start(); + }; + /** + * Internal reference to the ticker. + * + * @type {PIXI.Ticker} + * @name _ticker + * @memberof PIXI.Application# + * @private + */ + this._ticker = null; + /** + * Ticker for doing render updates. + * + * @type {PIXI.Ticker} + * @name ticker + * @memberof PIXI.Application# + * @default PIXI.Ticker.shared + */ + this.ticker = options.sharedTicker ? Ticker.shared : new Ticker(); + // Start the rendering + if (options.autoStart) { + this.start(); + } + }; + /** + * Clean up the ticker, scoped to application. + * + * @static + * @private + */ + TickerPlugin.destroy = function () { + if (this._ticker) { + var oldTicker = this._ticker; + this.ticker = null; + oldTicker.destroy(); + } + }; + return TickerPlugin; + }()); + + /*! + * @pixi/interaction - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/interaction is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Holds all information related to an Interaction event + * + * @class + * @memberof PIXI.interaction + */ + var InteractionData = function InteractionData() + { + /** + * This point stores the global coords of where the touch/mouse event happened + * + * @member {PIXI.Point} + */ + this.global = new Point(); + + /** + * The target Sprite that was interacted with + * + * @member {PIXI.Sprite} + */ + this.target = null; + + /** + * When passed to an event handler, this will be the original DOM Event that was captured + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent + * @see https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent + * @member {MouseEvent|TouchEvent|PointerEvent} + */ + this.originalEvent = null; + + /** + * Unique identifier for this interaction + * + * @member {number} + */ + this.identifier = null; + + /** + * Indicates whether or not the pointer device that created the event is the primary pointer. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary + * @type {Boolean} + */ + this.isPrimary = false; + + /** + * Indicates which button was pressed on the mouse or pointer device to trigger the event. + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button + * @type {number} + */ + this.button = 0; + + /** + * Indicates which buttons are pressed on the mouse or pointer device when the event is triggered. + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons + * @type {number} + */ + this.buttons = 0; + + /** + * The width of the pointer's contact along the x-axis, measured in CSS pixels. + * radiusX of TouchEvents will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width + * @type {number} + */ + this.width = 0; + + /** + * The height of the pointer's contact along the y-axis, measured in CSS pixels. + * radiusY of TouchEvents will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height + * @type {number} + */ + this.height = 0; + + /** + * The angle, in degrees, between the pointer device and the screen. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX + * @type {number} + */ + this.tiltX = 0; + + /** + * The angle, in degrees, between the pointer device and the screen. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY + * @type {number} + */ + this.tiltY = 0; + + /** + * The type of pointer that triggered the event. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType + * @type {string} + */ + this.pointerType = null; + + /** + * Pressure applied by the pointing device during the event. A Touch's force property + * will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure + * @type {number} + */ + this.pressure = 0; + + /** + * From TouchEvents (not PointerEvents triggered by touches), the rotationAngle of the Touch. + * @see https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle + * @type {number} + */ + this.rotationAngle = 0; + + /** + * Twist of a stylus pointer. + * @see https://w3c.github.io/pointerevents/#pointerevent-interface + * @type {number} + */ + this.twist = 0; + + /** + * Barrel pressure on a stylus pointer. + * @see https://w3c.github.io/pointerevents/#pointerevent-interface + * @type {number} + */ + this.tangentialPressure = 0; + }; + + var prototypeAccessors = { pointerId: { configurable: true } }; + + /** + * The unique identifier of the pointer. It will be the same as `identifier`. + * @readonly + * @member {number} + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId + */ + prototypeAccessors.pointerId.get = function () + { + return this.identifier; + }; + + /** + * This will return the local coordinates of the specified displayObject for this InteractionData + * + * @param {PIXI.DisplayObject} displayObject - The DisplayObject that you would like the local + * coords off + * @param {PIXI.Point} [point] - A Point object in which to store the value, optional (otherwise + * will create a new point) + * @param {PIXI.Point} [globalPos] - A Point object containing your custom global coords, optional + * (otherwise will use the current global coords) + * @return {PIXI.Point} A point containing the coordinates of the InteractionData position relative + * to the DisplayObject + */ + InteractionData.prototype.getLocalPosition = function getLocalPosition (displayObject, point, globalPos) + { + return displayObject.worldTransform.applyInverse(globalPos || this.global, point); + }; + + /** + * Copies properties from normalized event data. + * + * @param {Touch|MouseEvent|PointerEvent} event The normalized event data + */ + InteractionData.prototype.copyEvent = function copyEvent (event) + { + // isPrimary should only change on touchstart/pointerdown, so we don't want to overwrite + // it with "false" on later events when our shim for it on touch events might not be + // accurate + if (event.isPrimary) + { + this.isPrimary = true; + } + this.button = event.button; + // event.buttons is not available in all browsers (ie. Safari), but it does have a non-standard + // event.which property instead, which conveys the same information. + this.buttons = Number.isInteger(event.buttons) ? event.buttons : event.which; + this.width = event.width; + this.height = event.height; + this.tiltX = event.tiltX; + this.tiltY = event.tiltY; + this.pointerType = event.pointerType; + this.pressure = event.pressure; + this.rotationAngle = event.rotationAngle; + this.twist = event.twist || 0; + this.tangentialPressure = event.tangentialPressure || 0; + }; + + /** + * Resets the data for pooling. + */ + InteractionData.prototype.reset = function reset () + { + // isPrimary is the only property that we really need to reset - everything else is + // guaranteed to be overwritten + this.isPrimary = false; + }; + + Object.defineProperties( InteractionData.prototype, prototypeAccessors ); + + /** + * Event class that mimics native DOM events. + * + * @class + * @memberof PIXI.interaction + */ + var InteractionEvent = function InteractionEvent() + { + /** + * Whether this event will continue propagating in the tree. + * + * Remaining events for the {@link stopsPropagatingAt} object + * will still be dispatched. + * + * @member {boolean} + */ + this.stopped = false; + + /** + * At which object this event stops propagating. + * + * @private + * @member {PIXI.DisplayObject} + */ + this.stopsPropagatingAt = null; + + /** + * Whether we already reached the element we want to + * stop propagating at. This is important for delayed events, + * where we start over deeper in the tree again. + * + * @private + * @member {boolean} + */ + this.stopPropagationHint = false; + + /** + * The object which caused this event to be dispatched. + * For listener callback see {@link PIXI.interaction.InteractionEvent.currentTarget}. + * + * @member {PIXI.DisplayObject} + */ + this.target = null; + + /** + * The object whose event listener’s callback is currently being invoked. + * + * @member {PIXI.DisplayObject} + */ + this.currentTarget = null; + + /** + * Type of the event + * + * @member {string} + */ + this.type = null; + + /** + * InteractionData related to this event + * + * @member {PIXI.interaction.InteractionData} + */ + this.data = null; + }; + + /** + * Prevents event from reaching any objects other than the current object. + * + */ + InteractionEvent.prototype.stopPropagation = function stopPropagation () + { + this.stopped = true; + this.stopPropagationHint = true; + this.stopsPropagatingAt = this.currentTarget; + }; + + /** + * Resets the event. + */ + InteractionEvent.prototype.reset = function reset () + { + this.stopped = false; + this.stopsPropagatingAt = null; + this.stopPropagationHint = false; + this.currentTarget = null; + this.target = null; + }; + + /** + * DisplayObjects with the {@link PIXI.interaction.interactiveTarget} mixin use this class to track interactions + * + * @class + * @private + * @memberof PIXI.interaction + */ + var InteractionTrackingData = function InteractionTrackingData(pointerId) + { + this._pointerId = pointerId; + this._flags = InteractionTrackingData.FLAGS.NONE; + }; + + var prototypeAccessors$1 = { pointerId: { configurable: true },flags: { configurable: true },none: { configurable: true },over: { configurable: true },rightDown: { configurable: true },leftDown: { configurable: true } }; + + /** + * + * @private + * @param {number} flag - The interaction flag to set + * @param {boolean} yn - Should the flag be set or unset + */ + InteractionTrackingData.prototype._doSet = function _doSet (flag, yn) + { + if (yn) + { + this._flags = this._flags | flag; + } + else + { + this._flags = this._flags & (~flag); + } + }; + + /** + * Unique pointer id of the event + * + * @readonly + * @private + * @member {number} + */ + prototypeAccessors$1.pointerId.get = function () + { + return this._pointerId; + }; + + /** + * State of the tracking data, expressed as bit flags + * + * @private + * @member {number} + */ + prototypeAccessors$1.flags.get = function () + { + return this._flags; + }; + + prototypeAccessors$1.flags.set = function (flags) // eslint-disable-line require-jsdoc + { + this._flags = flags; + }; + + /** + * Is the tracked event inactive (not over or down)? + * + * @private + * @member {number} + */ + prototypeAccessors$1.none.get = function () + { + return this._flags === this.constructor.FLAGS.NONE; + }; + + /** + * Is the tracked event over the DisplayObject? + * + * @private + * @member {boolean} + */ + prototypeAccessors$1.over.get = function () + { + return (this._flags & this.constructor.FLAGS.OVER) !== 0; + }; + + prototypeAccessors$1.over.set = function (yn) // eslint-disable-line require-jsdoc + { + this._doSet(this.constructor.FLAGS.OVER, yn); + }; + + /** + * Did the right mouse button come down in the DisplayObject? + * + * @private + * @member {boolean} + */ + prototypeAccessors$1.rightDown.get = function () + { + return (this._flags & this.constructor.FLAGS.RIGHT_DOWN) !== 0; + }; + + prototypeAccessors$1.rightDown.set = function (yn) // eslint-disable-line require-jsdoc + { + this._doSet(this.constructor.FLAGS.RIGHT_DOWN, yn); + }; + + /** + * Did the left mouse button come down in the DisplayObject? + * + * @private + * @member {boolean} + */ + prototypeAccessors$1.leftDown.get = function () + { + return (this._flags & this.constructor.FLAGS.LEFT_DOWN) !== 0; + }; + + prototypeAccessors$1.leftDown.set = function (yn) // eslint-disable-line require-jsdoc + { + this._doSet(this.constructor.FLAGS.LEFT_DOWN, yn); + }; + + Object.defineProperties( InteractionTrackingData.prototype, prototypeAccessors$1 ); + + InteractionTrackingData.FLAGS = Object.freeze({ + NONE: 0, + OVER: 1 << 0, + LEFT_DOWN: 1 << 1, + RIGHT_DOWN: 1 << 2, + }); + + /** + * Strategy how to search through stage tree for interactive objects + * + * @private + * @class + * @memberof PIXI.interaction + */ + var TreeSearch = function TreeSearch() + { + this._tempPoint = new Point(); + }; + + /** + * Recursive implementation for findHit + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - event containing the point that + * is tested for collision + * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the displayObject + * that will be hit test (recursively crawls its children) + * @param {Function} [func] - the function that will be called on each interactive object. The + * interactionEvent, displayObject and hit will be passed to the function + * @param {boolean} [hitTest] - this indicates if the objects inside should be hit test against the point + * @param {boolean} [interactive] - Whether the displayObject is interactive + * @return {boolean} returns true if the displayObject hit the point + */ + TreeSearch.prototype.recursiveFindHit = function recursiveFindHit (interactionEvent, displayObject, func, hitTest, interactive) + { + if (!displayObject || !displayObject.visible) + { + return false; + } + + var point = interactionEvent.data.global; + + // Took a little while to rework this function correctly! But now it is done and nice and optimized! ^_^ + // + // This function will now loop through all objects and then only hit test the objects it HAS + // to, not all of them. MUCH faster.. + // An object will be hit test if the following is true: + // + // 1: It is interactive. + // 2: It belongs to a parent that is interactive AND one of the parents children have not already been hit. + // + // As another little optimization once an interactive object has been hit we can carry on + // through the scenegraph, but we know that there will be no more hits! So we can avoid extra hit tests + // A final optimization is that an object is not hit test directly if a child has already been hit. + + interactive = displayObject.interactive || interactive; + + var hit = false; + var interactiveParent = interactive; + + // Flag here can set to false if the event is outside the parents hitArea or mask + var hitTestChildren = true; + + // If there is a hitArea, no need to test against anything else if the pointer is not within the hitArea + // There is also no longer a need to hitTest children. + if (displayObject.hitArea) + { + if (hitTest) + { + displayObject.worldTransform.applyInverse(point, this._tempPoint); + if (!displayObject.hitArea.contains(this._tempPoint.x, this._tempPoint.y)) + { + hitTest = false; + hitTestChildren = false; + } + else + { + hit = true; + } + } + interactiveParent = false; + } + // If there is a mask, no need to hitTest against anything else if the pointer is not within the mask. + // We still want to hitTestChildren, however, to ensure a mouseout can still be generated. + // https://github.com/pixijs/pixi.js/issues/5135 + else if (displayObject._mask) + { + if (hitTest) + { + if (!(displayObject._mask.containsPoint && displayObject._mask.containsPoint(point))) + { + hitTest = false; + } + } + } + + // ** FREE TIP **! If an object is not interactive or has no buttons in it + // (such as a game scene!) set interactiveChildren to false for that displayObject. + // This will allow PixiJS to completely ignore and bypass checking the displayObjects children. + if (hitTestChildren && displayObject.interactiveChildren && displayObject.children) + { + var children = displayObject.children; + + for (var i = children.length - 1; i >= 0; i--) + { + var child = children[i]; + + // time to get recursive.. if this function will return if something is hit.. + var childHit = this.recursiveFindHit(interactionEvent, child, func, hitTest, interactiveParent); + + if (childHit) + { + // its a good idea to check if a child has lost its parent. + // this means it has been removed whilst looping so its best + if (!child.parent) + { + continue; + } + + // we no longer need to hit test any more objects in this container as we we + // now know the parent has been hit + interactiveParent = false; + + // If the child is interactive , that means that the object hit was actually + // interactive and not just the child of an interactive object. + // This means we no longer need to hit test anything else. We still need to run + // through all objects, but we don't need to perform any hit tests. + + if (childHit) + { + if (interactionEvent.target) + { + hitTest = false; + } + hit = true; + } + } + } + } + + // no point running this if the item is not interactive or does not have an interactive parent. + if (interactive) + { + // if we are hit testing (as in we have no hit any objects yet) + // We also don't need to worry about hit testing if once of the displayObjects children + // has already been hit - but only if it was interactive, otherwise we need to keep + // looking for an interactive child, just in case we hit one + if (hitTest && !interactionEvent.target) + { + // already tested against hitArea if it is defined + if (!displayObject.hitArea && displayObject.containsPoint) + { + if (displayObject.containsPoint(point)) + { + hit = true; + } + } + } + + if (displayObject.interactive) + { + if (hit && !interactionEvent.target) + { + interactionEvent.target = displayObject; + } + + if (func) + { + func(interactionEvent, displayObject, !!hit); + } + } + } + + return hit; + }; + + /** + * This function is provides a neat way of crawling through the scene graph and running a + * specified function on all interactive objects it finds. It will also take care of hit + * testing the interactive objects and passes the hit across in the function. + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - event containing the point that + * is tested for collision + * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the displayObject + * that will be hit test (recursively crawls its children) + * @param {Function} [func] - the function that will be called on each interactive object. The + * interactionEvent, displayObject and hit will be passed to the function + * @param {boolean} [hitTest] - this indicates if the objects inside should be hit test against the point + * @return {boolean} returns true if the displayObject hit the point + */ + TreeSearch.prototype.findHit = function findHit (interactionEvent, displayObject, func, hitTest) + { + this.recursiveFindHit(interactionEvent, displayObject, func, hitTest, false); + }; + + /** + * Interface for classes that represent a hit area. + * + * It is implemented by the following classes: + * - {@link PIXI.Circle} + * - {@link PIXI.Ellipse} + * - {@link PIXI.Polygon} + * - {@link PIXI.RoundedRectangle} + * + * @interface IHitArea + * @memberof PIXI + */ + + /** + * Checks whether the x and y coordinates given are contained within this area + * + * @method + * @name contains + * @memberof PIXI.IHitArea# + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coordinates are within this area + */ + + /** + * Default property values of interactive objects + * Used by {@link PIXI.interaction.InteractionManager} to automatically give all DisplayObjects these properties + * + * @private + * @name interactiveTarget + * @type {Object} + * @memberof PIXI.interaction + * @example + * function MyObject() {} + * + * Object.assign( + * DisplayObject.prototype, + * PIXI.interaction.interactiveTarget + * ); + */ + var interactiveTarget = { + + /** + * Enable interaction events for the DisplayObject. Touch, pointer and mouse + * events will not be emitted unless `interactive` is set to `true`. + * + * @example + * const sprite = new PIXI.Sprite(texture); + * sprite.interactive = true; + * sprite.on('tap', (event) => { + * //handle event + * }); + * @member {boolean} + * @memberof PIXI.DisplayObject# + */ + interactive: false, + + /** + * Determines if the children to the displayObject can be clicked/touched + * Setting this to false allows PixiJS to bypass a recursive `hitTest` function + * + * @member {boolean} + * @memberof PIXI.Container# + */ + interactiveChildren: true, + + /** + * Interaction shape. Children will be hit first, then this shape will be checked. + * Setting this will cause this shape to be checked in hit tests rather than the displayObject's bounds. + * + * @example + * const sprite = new PIXI.Sprite(texture); + * sprite.interactive = true; + * sprite.hitArea = new PIXI.Rectangle(0, 0, 100, 100); + * @member {PIXI.IHitArea} + * @memberof PIXI.DisplayObject# + */ + hitArea: null, + + /** + * If enabled, the mouse cursor use the pointer behavior when hovered over the displayObject if it is interactive + * Setting this changes the 'cursor' property to `'pointer'`. + * + * @example + * const sprite = new PIXI.Sprite(texture); + * sprite.interactive = true; + * sprite.buttonMode = true; + * @member {boolean} + * @memberof PIXI.DisplayObject# + */ + get buttonMode() + { + return this.cursor === 'pointer'; + }, + set buttonMode(value) + { + if (value) + { + this.cursor = 'pointer'; + } + else if (this.cursor === 'pointer') + { + this.cursor = null; + } + }, + + /** + * This defines what cursor mode is used when the mouse cursor + * is hovered over the displayObject. + * + * @example + * const sprite = new PIXI.Sprite(texture); + * sprite.interactive = true; + * sprite.cursor = 'wait'; + * @see https://developer.mozilla.org/en/docs/Web/CSS/cursor + * + * @member {string} + * @memberof PIXI.DisplayObject# + */ + cursor: null, + + /** + * Internal set of all active pointers, by identifier + * + * @member {Map} + * @memberof PIXI.DisplayObject# + * @private + */ + get trackedPointers() + { + if (this._trackedPointers === undefined) { this._trackedPointers = {}; } + + return this._trackedPointers; + }, + + /** + * Map of all tracked pointers, by identifier. Use trackedPointers to access. + * + * @private + * @type {Map} + */ + _trackedPointers: undefined, + }; + + // Mix interactiveTarget into DisplayObject.prototype, + // after deprecation has been handled + DisplayObject.mixin(interactiveTarget); + + var MOUSE_POINTER_ID = 1; + + // helpers for hitTest() - only used inside hitTest() + var hitTestEvent = { + target: null, + data: { + global: null, + }, + }; + + /** + * The interaction manager deals with mouse, touch and pointer events. + * + * Any DisplayObject can be interactive if its `interactive` property is set to true. + * + * This manager also supports multitouch. + * + * An instance of this class is automatically created by default, and can be found at `renderer.plugins.interaction` + * + * @class + * @extends PIXI.utils.EventEmitter + * @memberof PIXI.interaction + */ + var InteractionManager = /*@__PURE__*/(function (EventEmitter) { + function InteractionManager(renderer, options) + { + EventEmitter.call(this); + + options = options || {}; + + /** + * The renderer this interaction manager works for. + * + * @member {PIXI.AbstractRenderer} + */ + this.renderer = renderer; + + /** + * Should default browser actions automatically be prevented. + * Does not apply to pointer events for backwards compatibility + * preventDefault on pointer events stops mouse events from firing + * Thus, for every pointer event, there will always be either a mouse of touch event alongside it. + * + * @member {boolean} + * @default true + */ + this.autoPreventDefault = options.autoPreventDefault !== undefined ? options.autoPreventDefault : true; + + /** + * Maximum requency in milliseconds at which pointer over/out states will be checked by {@link tickerUpdate}. + * + * @member {number} + * @default 10 + */ + this.interactionFrequency = options.interactionFrequency || 10; + + /** + * The mouse data + * + * @member {PIXI.interaction.InteractionData} + */ + this.mouse = new InteractionData(); + this.mouse.identifier = MOUSE_POINTER_ID; + + // setting the mouse to start off far off screen will mean that mouse over does + // not get called before we even move the mouse. + this.mouse.global.set(-999999); + + /** + * Actively tracked InteractionData + * + * @private + * @member {Object.} + */ + this.activeInteractionData = {}; + this.activeInteractionData[MOUSE_POINTER_ID] = this.mouse; + + /** + * Pool of unused InteractionData + * + * @private + * @member {PIXI.interaction.InteractionData[]} + */ + this.interactionDataPool = []; + + /** + * An event data object to handle all the event tracking/dispatching + * + * @member {object} + */ + this.eventData = new InteractionEvent(); + + /** + * The DOM element to bind to. + * + * @protected + * @member {HTMLElement} + */ + this.interactionDOMElement = null; + + /** + * This property determines if mousemove and touchmove events are fired only when the cursor + * is over the object. + * Setting to true will make things work more in line with how the DOM version works. + * Setting to false can make things easier for things like dragging + * It is currently set to false as this is how PixiJS used to work. This will be set to true in + * future versions of pixi. + * + * @member {boolean} + * @default false + */ + this.moveWhenInside = false; + + /** + * Have events been attached to the dom element? + * + * @protected + * @member {boolean} + */ + this.eventsAdded = false; + + /** + * Has the system ticker been added? + * + * @protected + * @member {boolean} + */ + this.tickerAdded = false; + + /** + * Is the mouse hovering over the renderer? + * + * @protected + * @member {boolean} + */ + this.mouseOverRenderer = false; + + /** + * Does the device support touch events + * https://www.w3.org/TR/touch-events/ + * + * @readonly + * @member {boolean} + */ + this.supportsTouchEvents = 'ontouchstart' in window; + + /** + * Does the device support pointer events + * https://www.w3.org/Submission/pointer-events/ + * + * @readonly + * @member {boolean} + */ + this.supportsPointerEvents = !!window.PointerEvent; + + // this will make it so that you don't have to call bind all the time + + /** + * @private + * @member {Function} + */ + this.onPointerUp = this.onPointerUp.bind(this); + this.processPointerUp = this.processPointerUp.bind(this); + + /** + * @private + * @member {Function} + */ + this.onPointerCancel = this.onPointerCancel.bind(this); + this.processPointerCancel = this.processPointerCancel.bind(this); + + /** + * @private + * @member {Function} + */ + this.onPointerDown = this.onPointerDown.bind(this); + this.processPointerDown = this.processPointerDown.bind(this); + + /** + * @private + * @member {Function} + */ + this.onPointerMove = this.onPointerMove.bind(this); + this.processPointerMove = this.processPointerMove.bind(this); + + /** + * @private + * @member {Function} + */ + this.onPointerOut = this.onPointerOut.bind(this); + this.processPointerOverOut = this.processPointerOverOut.bind(this); + + /** + * @private + * @member {Function} + */ + this.onPointerOver = this.onPointerOver.bind(this); + + /** + * Dictionary of how different cursor modes are handled. Strings are handled as CSS cursor + * values, objects are handled as dictionaries of CSS values for interactionDOMElement, + * and functions are called instead of changing the CSS. + * Default CSS cursor values are provided for 'default' and 'pointer' modes. + * @member {Object.} + */ + this.cursorStyles = { + default: 'inherit', + pointer: 'pointer', + }; + + /** + * The mode of the cursor that is being used. + * The value of this is a key from the cursorStyles dictionary. + * + * @member {string} + */ + this.currentCursorMode = null; + + /** + * Internal cached let. + * + * @private + * @member {string} + */ + this.cursor = null; + + /** + * The current resolution / device pixel ratio. + * + * @member {number} + * @default 1 + */ + this.resolution = 1; + + /** + * Delayed pointer events. Used to guarantee correct ordering of over/out events. + * + * @private + * @member {Array} + */ + this.delayedEvents = []; + + /** + * TreeSearch component that is used to hitTest stage tree + * + * @private + * @member {PIXI.interaction.TreeSearch} + */ + this.search = new TreeSearch(); + + /** + * Fired when a pointer device button (usually a mouse left-button) is pressed on the display + * object. + * + * @event PIXI.interaction.InteractionManager#mousedown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is pressed + * on the display object. + * + * @event PIXI.interaction.InteractionManager#rightdown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is released over the display + * object. + * + * @event PIXI.interaction.InteractionManager#mouseup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is released + * over the display object. + * + * @event PIXI.interaction.InteractionManager#rightup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is pressed and released on + * the display object. + * + * @event PIXI.interaction.InteractionManager#click + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is pressed + * and released on the display object. + * + * @event PIXI.interaction.InteractionManager#rightclick + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is released outside the + * display object that initially registered a + * [mousedown]{@link PIXI.interaction.InteractionManager#event:mousedown}. + * + * @event PIXI.interaction.InteractionManager#mouseupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is released + * outside the display object that initially registered a + * [rightdown]{@link PIXI.interaction.InteractionManager#event:rightdown}. + * + * @event PIXI.interaction.InteractionManager#rightupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved while over the display object + * + * @event PIXI.interaction.InteractionManager#mousemove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved onto the display object + * + * @event PIXI.interaction.InteractionManager#mouseover + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved off the display object + * + * @event PIXI.interaction.InteractionManager#mouseout + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is pressed on the display object. + * + * @event PIXI.interaction.InteractionManager#pointerdown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is released over the display object. + * Not always fired when some buttons are held down while others are released. In those cases, + * use [mousedown]{@link PIXI.interaction.InteractionManager#event:mousedown} and + * [mouseup]{@link PIXI.interaction.InteractionManager#event:mouseup} instead. + * + * @event PIXI.interaction.InteractionManager#pointerup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when the operating system cancels a pointer event + * + * @event PIXI.interaction.InteractionManager#pointercancel + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is pressed and released on the display object. + * + * @event PIXI.interaction.InteractionManager#pointertap + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is released outside the display object that initially + * registered a [pointerdown]{@link PIXI.interaction.InteractionManager#event:pointerdown}. + * + * @event PIXI.interaction.InteractionManager#pointerupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved while over the display object + * + * @event PIXI.interaction.InteractionManager#pointermove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved onto the display object + * + * @event PIXI.interaction.InteractionManager#pointerover + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved off the display object + * + * @event PIXI.interaction.InteractionManager#pointerout + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is placed on the display object. + * + * @event PIXI.interaction.InteractionManager#touchstart + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is removed from the display object. + * + * @event PIXI.interaction.InteractionManager#touchend + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when the operating system cancels a touch + * + * @event PIXI.interaction.InteractionManager#touchcancel + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is placed and removed from the display object. + * + * @event PIXI.interaction.InteractionManager#tap + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is removed outside of the display object that initially + * registered a [touchstart]{@link PIXI.interaction.InteractionManager#event:touchstart}. + * + * @event PIXI.interaction.InteractionManager#touchendoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is moved along the display object. + * + * @event PIXI.interaction.InteractionManager#touchmove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is pressed on the display. + * object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mousedown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is pressed + * on the display object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#rightdown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is released over the display + * object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mouseup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is released + * over the display object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#rightup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is pressed and released on + * the display object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#click + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is pressed + * and released on the display object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#rightclick + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is released outside the + * display object that initially registered a + * [mousedown]{@link PIXI.DisplayObject#event:mousedown}. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mouseupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is released + * outside the display object that initially registered a + * [rightdown]{@link PIXI.DisplayObject#event:rightdown}. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#rightupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved while over the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mousemove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved onto the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mouseover + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved off the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mouseout + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is pressed on the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointerdown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is released over the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointerup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when the operating system cancels a pointer event. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointercancel + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is pressed and released on the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointertap + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is released outside the display object that initially + * registered a [pointerdown]{@link PIXI.DisplayObject#event:pointerdown}. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointerupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved while over the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointermove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved onto the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointerover + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved off the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointerout + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is placed on the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#touchstart + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is removed from the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#touchend + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when the operating system cancels a touch. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#touchcancel + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is placed and removed from the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#tap + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is removed outside of the display object that initially + * registered a [touchstart]{@link PIXI.DisplayObject#event:touchstart}. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#touchendoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is moved along the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#touchmove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + this._useSystemTicker = options.useSystemTicker !== undefined ? options.useSystemTicker : true; + + this.setTargetElement(this.renderer.view, this.renderer.resolution); + } + + if ( EventEmitter ) { InteractionManager.__proto__ = EventEmitter; } + InteractionManager.prototype = Object.create( EventEmitter && EventEmitter.prototype ); + InteractionManager.prototype.constructor = InteractionManager; + + var prototypeAccessors = { useSystemTicker: { configurable: true } }; + + /** + * Should the InteractionManager automatically add {@link tickerUpdate} to {@link PIXI.Ticker.system}. + * + * @member {boolean} + * @default true + */ + prototypeAccessors.useSystemTicker.get = function () + { + return this._useSystemTicker; + }; + prototypeAccessors.useSystemTicker.set = function (useSystemTicker) + { + this._useSystemTicker = useSystemTicker; + + if (useSystemTicker) + { + this.addTickerListener(); + } + else + { + this.removeTickerListener(); + } + }; + + /** + * Hit tests a point against the display tree, returning the first interactive object that is hit. + * + * @param {PIXI.Point} globalPoint - A point to hit test with, in global space. + * @param {PIXI.Container} [root] - The root display object to start from. If omitted, defaults + * to the last rendered root of the associated renderer. + * @return {PIXI.DisplayObject} The hit display object, if any. + */ + InteractionManager.prototype.hitTest = function hitTest (globalPoint, root) + { + // clear the target for our hit test + hitTestEvent.target = null; + // assign the global point + hitTestEvent.data.global = globalPoint; + // ensure safety of the root + if (!root) + { + root = this.renderer._lastObjectRendered; + } + // run the hit test + this.processInteractive(hitTestEvent, root, null, true); + // return our found object - it'll be null if we didn't hit anything + + return hitTestEvent.target; + }; + + /** + * Sets the DOM element which will receive mouse/touch events. This is useful for when you have + * other DOM elements on top of the renderers Canvas element. With this you'll be bale to delegate + * another DOM element to receive those events. + * + * @param {HTMLElement} element - the DOM element which will receive mouse and touch events. + * @param {number} [resolution=1] - The resolution / device pixel ratio of the new element (relative to the canvas). + */ + InteractionManager.prototype.setTargetElement = function setTargetElement (element, resolution) + { + if ( resolution === void 0 ) { resolution = 1; } + + this.removeTickerListener(); + + this.removeEvents(); + + this.interactionDOMElement = element; + + this.resolution = resolution; + + this.addEvents(); + + this.addTickerListener(); + }; + + /** + * Add the ticker listener + * + * @private + */ + InteractionManager.prototype.addTickerListener = function addTickerListener () + { + if (this.tickerAdded || !this.interactionDOMElement || !this._useSystemTicker) + { + return; + } + + Ticker.system.add(this.tickerUpdate, this, exports.UPDATE_PRIORITY.INTERACTION); + + this.tickerAdded = true; + }; + + /** + * Remove the ticker listener + * + * @private + */ + InteractionManager.prototype.removeTickerListener = function removeTickerListener () + { + if (!this.tickerAdded) + { + return; + } + + Ticker.system.remove(this.tickerUpdate, this); + + this.tickerAdded = false; + }; + + /** + * Registers all the DOM events + * + * @private + */ + InteractionManager.prototype.addEvents = function addEvents () + { + if (this.eventsAdded || !this.interactionDOMElement) + { + return; + } + + if (window.navigator.msPointerEnabled) + { + this.interactionDOMElement.style['-ms-content-zooming'] = 'none'; + this.interactionDOMElement.style['-ms-touch-action'] = 'none'; + } + else if (this.supportsPointerEvents) + { + this.interactionDOMElement.style['touch-action'] = 'none'; + } + + /** + * These events are added first, so that if pointer events are normalized, they are fired + * in the same order as non-normalized events. ie. pointer event 1st, mouse / touch 2nd + */ + if (this.supportsPointerEvents) + { + window.document.addEventListener('pointermove', this.onPointerMove, true); + this.interactionDOMElement.addEventListener('pointerdown', this.onPointerDown, true); + // pointerout is fired in addition to pointerup (for touch events) and pointercancel + // we already handle those, so for the purposes of what we do in onPointerOut, we only + // care about the pointerleave event + this.interactionDOMElement.addEventListener('pointerleave', this.onPointerOut, true); + this.interactionDOMElement.addEventListener('pointerover', this.onPointerOver, true); + window.addEventListener('pointercancel', this.onPointerCancel, true); + window.addEventListener('pointerup', this.onPointerUp, true); + } + else + { + window.document.addEventListener('mousemove', this.onPointerMove, true); + this.interactionDOMElement.addEventListener('mousedown', this.onPointerDown, true); + this.interactionDOMElement.addEventListener('mouseout', this.onPointerOut, true); + this.interactionDOMElement.addEventListener('mouseover', this.onPointerOver, true); + window.addEventListener('mouseup', this.onPointerUp, true); + } + + // always look directly for touch events so that we can provide original data + // In a future version we should change this to being just a fallback and rely solely on + // PointerEvents whenever available + if (this.supportsTouchEvents) + { + this.interactionDOMElement.addEventListener('touchstart', this.onPointerDown, true); + this.interactionDOMElement.addEventListener('touchcancel', this.onPointerCancel, true); + this.interactionDOMElement.addEventListener('touchend', this.onPointerUp, true); + this.interactionDOMElement.addEventListener('touchmove', this.onPointerMove, true); + } + + this.eventsAdded = true; + }; + + /** + * Removes all the DOM events that were previously registered + * + * @private + */ + InteractionManager.prototype.removeEvents = function removeEvents () + { + if (!this.eventsAdded || !this.interactionDOMElement) + { + return; + } + + if (window.navigator.msPointerEnabled) + { + this.interactionDOMElement.style['-ms-content-zooming'] = ''; + this.interactionDOMElement.style['-ms-touch-action'] = ''; + } + else if (this.supportsPointerEvents) + { + this.interactionDOMElement.style['touch-action'] = ''; + } + + if (this.supportsPointerEvents) + { + window.document.removeEventListener('pointermove', this.onPointerMove, true); + this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true); + this.interactionDOMElement.removeEventListener('pointerleave', this.onPointerOut, true); + this.interactionDOMElement.removeEventListener('pointerover', this.onPointerOver, true); + window.removeEventListener('pointercancel', this.onPointerCancel, true); + window.removeEventListener('pointerup', this.onPointerUp, true); + } + else + { + window.document.removeEventListener('mousemove', this.onPointerMove, true); + this.interactionDOMElement.removeEventListener('mousedown', this.onPointerDown, true); + this.interactionDOMElement.removeEventListener('mouseout', this.onPointerOut, true); + this.interactionDOMElement.removeEventListener('mouseover', this.onPointerOver, true); + window.removeEventListener('mouseup', this.onPointerUp, true); + } + + if (this.supportsTouchEvents) + { + this.interactionDOMElement.removeEventListener('touchstart', this.onPointerDown, true); + this.interactionDOMElement.removeEventListener('touchcancel', this.onPointerCancel, true); + this.interactionDOMElement.removeEventListener('touchend', this.onPointerUp, true); + this.interactionDOMElement.removeEventListener('touchmove', this.onPointerMove, true); + } + + this.interactionDOMElement = null; + + this.eventsAdded = false; + }; + + /** + * Updates the state of interactive objects if at least {@link interactionFrequency} + * milliseconds have passed since the last invocation. + * + * Invoked by a throttled ticker update from {@link PIXI.Ticker.system}. + * + * @param {number} deltaTime - time delta since the last call + */ + InteractionManager.prototype.tickerUpdate = function tickerUpdate (deltaTime) + { + this._deltaTime += deltaTime; + + if (this._deltaTime < this.interactionFrequency) + { + return; + } + + this._deltaTime = 0; + + this.update(); + }; + + /** + * Updates the state of interactive objects. + */ + InteractionManager.prototype.update = function update () + { + if (!this.interactionDOMElement) + { + return; + } + + // if the user move the mouse this check has already been done using the mouse move! + if (this.didMove) + { + this.didMove = false; + + return; + } + + this.cursor = null; + + // Resets the flag as set by a stopPropagation call. This flag is usually reset by a user interaction of any kind, + // but there was a scenario of a display object moving under a static mouse cursor. + // In this case, mouseover and mouseevents would not pass the flag test in dispatchEvent function + for (var k in this.activeInteractionData) + { + // eslint-disable-next-line no-prototype-builtins + if (this.activeInteractionData.hasOwnProperty(k)) + { + var interactionData = this.activeInteractionData[k]; + + if (interactionData.originalEvent && interactionData.pointerType !== 'touch') + { + var interactionEvent = this.configureInteractionEventForDOMEvent( + this.eventData, + interactionData.originalEvent, + interactionData + ); + + this.processInteractive( + interactionEvent, + this.renderer._lastObjectRendered, + this.processPointerOverOut, + true + ); + } + } + } + + this.setCursorMode(this.cursor); + }; + + /** + * Sets the current cursor mode, handling any callbacks or CSS style changes. + * + * @param {string} mode - cursor mode, a key from the cursorStyles dictionary + */ + InteractionManager.prototype.setCursorMode = function setCursorMode (mode) + { + mode = mode || 'default'; + // if the mode didn't actually change, bail early + if (this.currentCursorMode === mode) + { + return; + } + this.currentCursorMode = mode; + var style = this.cursorStyles[mode]; + + // only do things if there is a cursor style for it + if (style) + { + switch (typeof style) + { + case 'string': + // string styles are handled as cursor CSS + this.interactionDOMElement.style.cursor = style; + break; + case 'function': + // functions are just called, and passed the cursor mode + style(mode); + break; + case 'object': + // if it is an object, assume that it is a dictionary of CSS styles, + // apply it to the interactionDOMElement + Object.assign(this.interactionDOMElement.style, style); + break; + } + } + else if (typeof mode === 'string' && !Object.prototype.hasOwnProperty.call(this.cursorStyles, mode)) + { + // if it mode is a string (not a Symbol) and cursorStyles doesn't have any entry + // for the mode, then assume that the dev wants it to be CSS for the cursor. + this.interactionDOMElement.style.cursor = mode; + } + }; + + /** + * Dispatches an event on the display object that was interacted with + * + * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the display object in question + * @param {string} eventString - the name of the event (e.g, mousedown) + * @param {object} eventData - the event data object + * @private + */ + InteractionManager.prototype.dispatchEvent = function dispatchEvent (displayObject, eventString, eventData) + { + // Even if the event was stopped, at least dispatch any remaining events + // for the same display object. + if (!eventData.stopPropagationHint || displayObject === eventData.stopsPropagatingAt) + { + eventData.currentTarget = displayObject; + eventData.type = eventString; + + displayObject.emit(eventString, eventData); + + if (displayObject[eventString]) + { + displayObject[eventString](eventData); + } + } + }; + + /** + * Puts a event on a queue to be dispatched later. This is used to guarantee correct + * ordering of over/out events. + * + * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the display object in question + * @param {string} eventString - the name of the event (e.g, mousedown) + * @param {object} eventData - the event data object + * @private + */ + InteractionManager.prototype.delayDispatchEvent = function delayDispatchEvent (displayObject, eventString, eventData) + { + this.delayedEvents.push({ displayObject: displayObject, eventString: eventString, eventData: eventData }); + }; + + /** + * Maps x and y coords from a DOM object and maps them correctly to the PixiJS view. The + * resulting value is stored in the point. This takes into account the fact that the DOM + * element could be scaled and positioned anywhere on the screen. + * + * @param {PIXI.Point} point - the point that the result will be stored in + * @param {number} x - the x coord of the position to map + * @param {number} y - the y coord of the position to map + */ + InteractionManager.prototype.mapPositionToPoint = function mapPositionToPoint (point, x, y) + { + var rect; + + // IE 11 fix + if (!this.interactionDOMElement.parentElement) + { + rect = { x: 0, y: 0, width: 0, height: 0 }; + } + else + { + rect = this.interactionDOMElement.getBoundingClientRect(); + } + + var resolutionMultiplier = 1.0 / this.resolution; + + point.x = ((x - rect.left) * (this.interactionDOMElement.width / rect.width)) * resolutionMultiplier; + point.y = ((y - rect.top) * (this.interactionDOMElement.height / rect.height)) * resolutionMultiplier; + }; + + /** + * This function is provides a neat way of crawling through the scene graph and running a + * specified function on all interactive objects it finds. It will also take care of hit + * testing the interactive objects and passes the hit across in the function. + * + * @protected + * @param {PIXI.interaction.InteractionEvent} interactionEvent - event containing the point that + * is tested for collision + * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - the displayObject + * that will be hit test (recursively crawls its children) + * @param {Function} [func] - the function that will be called on each interactive object. The + * interactionEvent, displayObject and hit will be passed to the function + * @param {boolean} [hitTest] - indicates whether we want to calculate hits + * or just iterate through all interactive objects + */ + InteractionManager.prototype.processInteractive = function processInteractive (interactionEvent, displayObject, func, hitTest) + { + var hit = this.search.findHit(interactionEvent, displayObject, func, hitTest); + + var delayedEvents = this.delayedEvents; + + if (!delayedEvents.length) + { + return hit; + } + // Reset the propagation hint, because we start deeper in the tree again. + interactionEvent.stopPropagationHint = false; + + var delayedLen = delayedEvents.length; + + this.delayedEvents = []; + + for (var i = 0; i < delayedLen; i++) + { + var ref = delayedEvents[i]; + var displayObject$1 = ref.displayObject; + var eventString = ref.eventString; + var eventData = ref.eventData; + + // When we reach the object we wanted to stop propagating at, + // set the propagation hint. + if (eventData.stopsPropagatingAt === displayObject$1) + { + eventData.stopPropagationHint = true; + } + + this.dispatchEvent(displayObject$1, eventString, eventData); + } + + return hit; + }; + + /** + * Is called when the pointer button is pressed down on the renderer element + * + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer button being pressed down + */ + InteractionManager.prototype.onPointerDown = function onPointerDown (originalEvent) + { + // if we support touch events, then only use those for touch events, not pointer events + if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') { return; } + + var events = this.normalizeToPointerData(originalEvent); + + /** + * No need to prevent default on natural pointer events, as there are no side effects + * Normalized events, however, may have the double mousedown/touchstart issue on the native android browser, + * so still need to be prevented. + */ + + // Guaranteed that there will be at least one event in events, and all events must have the same pointer type + + if (this.autoPreventDefault && events[0].isNormalized) + { + var cancelable = originalEvent.cancelable || !('cancelable' in originalEvent); + + if (cancelable) + { + originalEvent.preventDefault(); + } + } + + var eventLen = events.length; + + for (var i = 0; i < eventLen; i++) + { + var event = events[i]; + + var interactionData = this.getInteractionDataForPointerId(event); + + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); + + interactionEvent.data.originalEvent = originalEvent; + + this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerDown, true); + + this.emit('pointerdown', interactionEvent); + if (event.pointerType === 'touch') + { + this.emit('touchstart', interactionEvent); + } + // emit a mouse event for "pen" pointers, the way a browser would emit a fallback event + else if (event.pointerType === 'mouse' || event.pointerType === 'pen') + { + var isRightButton = event.button === 2; + + this.emit(isRightButton ? 'rightdown' : 'mousedown', this.eventData); + } + } + }; + + /** + * Processes the result of the pointer down check and dispatches the event if need be + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event + * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested + * @param {boolean} hit - the result of the hit test on the display object + */ + InteractionManager.prototype.processPointerDown = function processPointerDown (interactionEvent, displayObject, hit) + { + var data = interactionEvent.data; + var id = interactionEvent.data.identifier; + + if (hit) + { + if (!displayObject.trackedPointers[id]) + { + displayObject.trackedPointers[id] = new InteractionTrackingData(id); + } + this.dispatchEvent(displayObject, 'pointerdown', interactionEvent); + + if (data.pointerType === 'touch') + { + this.dispatchEvent(displayObject, 'touchstart', interactionEvent); + } + else if (data.pointerType === 'mouse' || data.pointerType === 'pen') + { + var isRightButton = data.button === 2; + + if (isRightButton) + { + displayObject.trackedPointers[id].rightDown = true; + } + else + { + displayObject.trackedPointers[id].leftDown = true; + } + + this.dispatchEvent(displayObject, isRightButton ? 'rightdown' : 'mousedown', interactionEvent); + } + } + }; + + /** + * Is called when the pointer button is released on the renderer element + * + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer button being released + * @param {boolean} cancelled - true if the pointer is cancelled + * @param {Function} func - Function passed to {@link processInteractive} + */ + InteractionManager.prototype.onPointerComplete = function onPointerComplete (originalEvent, cancelled, func) + { + var events = this.normalizeToPointerData(originalEvent); + + var eventLen = events.length; + + // if the event wasn't targeting our canvas, then consider it to be pointerupoutside + // in all cases (unless it was a pointercancel) + var eventAppend = originalEvent.target !== this.interactionDOMElement ? 'outside' : ''; + + for (var i = 0; i < eventLen; i++) + { + var event = events[i]; + + var interactionData = this.getInteractionDataForPointerId(event); + + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); + + interactionEvent.data.originalEvent = originalEvent; + + // perform hit testing for events targeting our canvas or cancel events + this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, func, cancelled || !eventAppend); + + this.emit(cancelled ? 'pointercancel' : ("pointerup" + eventAppend), interactionEvent); + + if (event.pointerType === 'mouse' || event.pointerType === 'pen') + { + var isRightButton = event.button === 2; + + this.emit(isRightButton ? ("rightup" + eventAppend) : ("mouseup" + eventAppend), interactionEvent); + } + else if (event.pointerType === 'touch') + { + this.emit(cancelled ? 'touchcancel' : ("touchend" + eventAppend), interactionEvent); + this.releaseInteractionDataForPointerId(event.pointerId, interactionData); + } + } + }; + + /** + * Is called when the pointer button is cancelled + * + * @private + * @param {PointerEvent} event - The DOM event of a pointer button being released + */ + InteractionManager.prototype.onPointerCancel = function onPointerCancel (event) + { + // if we support touch events, then only use those for touch events, not pointer events + if (this.supportsTouchEvents && event.pointerType === 'touch') { return; } + + this.onPointerComplete(event, true, this.processPointerCancel); + }; + + /** + * Processes the result of the pointer cancel check and dispatches the event if need be + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event + * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested + */ + InteractionManager.prototype.processPointerCancel = function processPointerCancel (interactionEvent, displayObject) + { + var data = interactionEvent.data; + + var id = interactionEvent.data.identifier; + + if (displayObject.trackedPointers[id] !== undefined) + { + delete displayObject.trackedPointers[id]; + this.dispatchEvent(displayObject, 'pointercancel', interactionEvent); + + if (data.pointerType === 'touch') + { + this.dispatchEvent(displayObject, 'touchcancel', interactionEvent); + } + } + }; + + /** + * Is called when the pointer button is released on the renderer element + * + * @private + * @param {PointerEvent} event - The DOM event of a pointer button being released + */ + InteractionManager.prototype.onPointerUp = function onPointerUp (event) + { + // if we support touch events, then only use those for touch events, not pointer events + if (this.supportsTouchEvents && event.pointerType === 'touch') { return; } + + this.onPointerComplete(event, false, this.processPointerUp); + }; + + /** + * Processes the result of the pointer up check and dispatches the event if need be + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event + * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested + * @param {boolean} hit - the result of the hit test on the display object + */ + InteractionManager.prototype.processPointerUp = function processPointerUp (interactionEvent, displayObject, hit) + { + var data = interactionEvent.data; + + var id = interactionEvent.data.identifier; + + var trackingData = displayObject.trackedPointers[id]; + + var isTouch = data.pointerType === 'touch'; + + var isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen'); + // need to track mouse down status in the mouse block so that we can emit + // event in a later block + var isMouseTap = false; + + // Mouse only + if (isMouse) + { + var isRightButton = data.button === 2; + + var flags = InteractionTrackingData.FLAGS; + + var test = isRightButton ? flags.RIGHT_DOWN : flags.LEFT_DOWN; + + var isDown = trackingData !== undefined && (trackingData.flags & test); + + if (hit) + { + this.dispatchEvent(displayObject, isRightButton ? 'rightup' : 'mouseup', interactionEvent); + + if (isDown) + { + this.dispatchEvent(displayObject, isRightButton ? 'rightclick' : 'click', interactionEvent); + // because we can confirm that the mousedown happened on this object, flag for later emit of pointertap + isMouseTap = true; + } + } + else if (isDown) + { + this.dispatchEvent(displayObject, isRightButton ? 'rightupoutside' : 'mouseupoutside', interactionEvent); + } + // update the down state of the tracking data + if (trackingData) + { + if (isRightButton) + { + trackingData.rightDown = false; + } + else + { + trackingData.leftDown = false; + } + } + } + + // Pointers and Touches, and Mouse + if (hit) + { + this.dispatchEvent(displayObject, 'pointerup', interactionEvent); + if (isTouch) { this.dispatchEvent(displayObject, 'touchend', interactionEvent); } + + if (trackingData) + { + // emit pointertap if not a mouse, or if the mouse block decided it was a tap + if (!isMouse || isMouseTap) + { + this.dispatchEvent(displayObject, 'pointertap', interactionEvent); + } + if (isTouch) + { + this.dispatchEvent(displayObject, 'tap', interactionEvent); + // touches are no longer over (if they ever were) when we get the touchend + // so we should ensure that we don't keep pretending that they are + trackingData.over = false; + } + } + } + else if (trackingData) + { + this.dispatchEvent(displayObject, 'pointerupoutside', interactionEvent); + if (isTouch) { this.dispatchEvent(displayObject, 'touchendoutside', interactionEvent); } + } + // Only remove the tracking data if there is no over/down state still associated with it + if (trackingData && trackingData.none) + { + delete displayObject.trackedPointers[id]; + } + }; + + /** + * Is called when the pointer moves across the renderer element + * + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer moving + */ + InteractionManager.prototype.onPointerMove = function onPointerMove (originalEvent) + { + // if we support touch events, then only use those for touch events, not pointer events + if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') { return; } + + var events = this.normalizeToPointerData(originalEvent); + + if (events[0].pointerType === 'mouse' || events[0].pointerType === 'pen') + { + this.didMove = true; + + this.cursor = null; + } + + var eventLen = events.length; + + for (var i = 0; i < eventLen; i++) + { + var event = events[i]; + + var interactionData = this.getInteractionDataForPointerId(event); + + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); + + interactionEvent.data.originalEvent = originalEvent; + + this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerMove, true); + + this.emit('pointermove', interactionEvent); + if (event.pointerType === 'touch') { this.emit('touchmove', interactionEvent); } + if (event.pointerType === 'mouse' || event.pointerType === 'pen') { this.emit('mousemove', interactionEvent); } + } + + if (events[0].pointerType === 'mouse') + { + this.setCursorMode(this.cursor); + + // TODO BUG for parents interactive object (border order issue) + } + }; + + /** + * Processes the result of the pointer move check and dispatches the event if need be + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event + * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested + * @param {boolean} hit - the result of the hit test on the display object + */ + InteractionManager.prototype.processPointerMove = function processPointerMove (interactionEvent, displayObject, hit) + { + var data = interactionEvent.data; + + var isTouch = data.pointerType === 'touch'; + + var isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen'); + + if (isMouse) + { + this.processPointerOverOut(interactionEvent, displayObject, hit); + } + + if (!this.moveWhenInside || hit) + { + this.dispatchEvent(displayObject, 'pointermove', interactionEvent); + if (isTouch) { this.dispatchEvent(displayObject, 'touchmove', interactionEvent); } + if (isMouse) { this.dispatchEvent(displayObject, 'mousemove', interactionEvent); } + } + }; + + /** + * Is called when the pointer is moved out of the renderer element + * + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer being moved out + */ + InteractionManager.prototype.onPointerOut = function onPointerOut (originalEvent) + { + // if we support touch events, then only use those for touch events, not pointer events + if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') { return; } + + var events = this.normalizeToPointerData(originalEvent); + + // Only mouse and pointer can call onPointerOut, so events will always be length 1 + var event = events[0]; + + if (event.pointerType === 'mouse') + { + this.mouseOverRenderer = false; + this.setCursorMode(null); + } + + var interactionData = this.getInteractionDataForPointerId(event); + + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); + + interactionEvent.data.originalEvent = event; + + this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerOverOut, false); + + this.emit('pointerout', interactionEvent); + if (event.pointerType === 'mouse' || event.pointerType === 'pen') + { + this.emit('mouseout', interactionEvent); + } + else + { + // we can get touchleave events after touchend, so we want to make sure we don't + // introduce memory leaks + this.releaseInteractionDataForPointerId(interactionData.identifier); + } + }; + + /** + * Processes the result of the pointer over/out check and dispatches the event if need be + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event + * @param {PIXI.Container|PIXI.Sprite|PIXI.TilingSprite} displayObject - The display object that was tested + * @param {boolean} hit - the result of the hit test on the display object + */ + InteractionManager.prototype.processPointerOverOut = function processPointerOverOut (interactionEvent, displayObject, hit) + { + var data = interactionEvent.data; + + var id = interactionEvent.data.identifier; + + var isMouse = (data.pointerType === 'mouse' || data.pointerType === 'pen'); + + var trackingData = displayObject.trackedPointers[id]; + + // if we just moused over the display object, then we need to track that state + if (hit && !trackingData) + { + trackingData = displayObject.trackedPointers[id] = new InteractionTrackingData(id); + } + + if (trackingData === undefined) { return; } + + if (hit && this.mouseOverRenderer) + { + if (!trackingData.over) + { + trackingData.over = true; + this.delayDispatchEvent(displayObject, 'pointerover', interactionEvent); + if (isMouse) + { + this.delayDispatchEvent(displayObject, 'mouseover', interactionEvent); + } + } + + // only change the cursor if it has not already been changed (by something deeper in the + // display tree) + if (isMouse && this.cursor === null) + { + this.cursor = displayObject.cursor; + } + } + else if (trackingData.over) + { + trackingData.over = false; + this.dispatchEvent(displayObject, 'pointerout', this.eventData); + if (isMouse) + { + this.dispatchEvent(displayObject, 'mouseout', interactionEvent); + } + // if there is no mouse down information for the pointer, then it is safe to delete + if (trackingData.none) + { + delete displayObject.trackedPointers[id]; + } + } + }; + + /** + * Is called when the pointer is moved into the renderer element + * + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer button being moved into the renderer view + */ + InteractionManager.prototype.onPointerOver = function onPointerOver (originalEvent) + { + var events = this.normalizeToPointerData(originalEvent); + + // Only mouse and pointer can call onPointerOver, so events will always be length 1 + var event = events[0]; + + var interactionData = this.getInteractionDataForPointerId(event); + + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); + + interactionEvent.data.originalEvent = event; + + if (event.pointerType === 'mouse') + { + this.mouseOverRenderer = true; + } + + this.emit('pointerover', interactionEvent); + if (event.pointerType === 'mouse' || event.pointerType === 'pen') + { + this.emit('mouseover', interactionEvent); + } + }; + + /** + * Get InteractionData for a given pointerId. Store that data as well + * + * @private + * @param {PointerEvent} event - Normalized pointer event, output from normalizeToPointerData + * @return {PIXI.interaction.InteractionData} - Interaction data for the given pointer identifier + */ + InteractionManager.prototype.getInteractionDataForPointerId = function getInteractionDataForPointerId (event) + { + var pointerId = event.pointerId; + + var interactionData; + + if (pointerId === MOUSE_POINTER_ID || event.pointerType === 'mouse') + { + interactionData = this.mouse; + } + else if (this.activeInteractionData[pointerId]) + { + interactionData = this.activeInteractionData[pointerId]; + } + else + { + interactionData = this.interactionDataPool.pop() || new InteractionData(); + interactionData.identifier = pointerId; + this.activeInteractionData[pointerId] = interactionData; + } + // copy properties from the event, so that we can make sure that touch/pointer specific + // data is available + interactionData.copyEvent(event); + + return interactionData; + }; + + /** + * Return unused InteractionData to the pool, for a given pointerId + * + * @private + * @param {number} pointerId - Identifier from a pointer event + */ + InteractionManager.prototype.releaseInteractionDataForPointerId = function releaseInteractionDataForPointerId (pointerId) + { + var interactionData = this.activeInteractionData[pointerId]; + + if (interactionData) + { + delete this.activeInteractionData[pointerId]; + interactionData.reset(); + this.interactionDataPool.push(interactionData); + } + }; + + /** + * Configure an InteractionEvent to wrap a DOM PointerEvent and InteractionData + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The event to be configured + * @param {PointerEvent} pointerEvent - The DOM event that will be paired with the InteractionEvent + * @param {PIXI.interaction.InteractionData} interactionData - The InteractionData that will be paired + * with the InteractionEvent + * @return {PIXI.interaction.InteractionEvent} the interaction event that was passed in + */ + InteractionManager.prototype.configureInteractionEventForDOMEvent = function configureInteractionEventForDOMEvent (interactionEvent, pointerEvent, interactionData) + { + interactionEvent.data = interactionData; + + this.mapPositionToPoint(interactionData.global, pointerEvent.clientX, pointerEvent.clientY); + + // Not really sure why this is happening, but it's how a previous version handled things + if (pointerEvent.pointerType === 'touch') + { + pointerEvent.globalX = interactionData.global.x; + pointerEvent.globalY = interactionData.global.y; + } + + interactionData.originalEvent = pointerEvent; + interactionEvent.reset(); + + return interactionEvent; + }; + + /** + * Ensures that the original event object contains all data that a regular pointer event would have + * + * @private + * @param {TouchEvent|MouseEvent|PointerEvent} event - The original event data from a touch or mouse event + * @return {PointerEvent[]} An array containing a single normalized pointer event, in the case of a pointer + * or mouse event, or a multiple normalized pointer events if there are multiple changed touches + */ + InteractionManager.prototype.normalizeToPointerData = function normalizeToPointerData (event) + { + var normalizedEvents = []; + + if (this.supportsTouchEvents && event instanceof TouchEvent) + { + for (var i = 0, li = event.changedTouches.length; i < li; i++) + { + var touch = event.changedTouches[i]; + + if (typeof touch.button === 'undefined') { touch.button = event.touches.length ? 1 : 0; } + if (typeof touch.buttons === 'undefined') { touch.buttons = event.touches.length ? 1 : 0; } + if (typeof touch.isPrimary === 'undefined') + { + touch.isPrimary = event.touches.length === 1 && event.type === 'touchstart'; + } + if (typeof touch.width === 'undefined') { touch.width = touch.radiusX || 1; } + if (typeof touch.height === 'undefined') { touch.height = touch.radiusY || 1; } + if (typeof touch.tiltX === 'undefined') { touch.tiltX = 0; } + if (typeof touch.tiltY === 'undefined') { touch.tiltY = 0; } + if (typeof touch.pointerType === 'undefined') { touch.pointerType = 'touch'; } + if (typeof touch.pointerId === 'undefined') { touch.pointerId = touch.identifier || 0; } + if (typeof touch.pressure === 'undefined') { touch.pressure = touch.force || 0.5; } + if (typeof touch.twist === 'undefined') { touch.twist = 0; } + if (typeof touch.tangentialPressure === 'undefined') { touch.tangentialPressure = 0; } + // TODO: Remove these, as layerX/Y is not a standard, is deprecated, has uneven + // support, and the fill ins are not quite the same + // offsetX/Y might be okay, but is not the same as clientX/Y when the canvas's top + // left is not 0,0 on the page + if (typeof touch.layerX === 'undefined') { touch.layerX = touch.offsetX = touch.clientX; } + if (typeof touch.layerY === 'undefined') { touch.layerY = touch.offsetY = touch.clientY; } + + // mark the touch as normalized, just so that we know we did it + touch.isNormalized = true; + + normalizedEvents.push(touch); + } + } + // apparently PointerEvent subclasses MouseEvent, so yay + else if (event instanceof MouseEvent && (!this.supportsPointerEvents || !(event instanceof window.PointerEvent))) + { + if (typeof event.isPrimary === 'undefined') { event.isPrimary = true; } + if (typeof event.width === 'undefined') { event.width = 1; } + if (typeof event.height === 'undefined') { event.height = 1; } + if (typeof event.tiltX === 'undefined') { event.tiltX = 0; } + if (typeof event.tiltY === 'undefined') { event.tiltY = 0; } + if (typeof event.pointerType === 'undefined') { event.pointerType = 'mouse'; } + if (typeof event.pointerId === 'undefined') { event.pointerId = MOUSE_POINTER_ID; } + if (typeof event.pressure === 'undefined') { event.pressure = 0.5; } + if (typeof event.twist === 'undefined') { event.twist = 0; } + if (typeof event.tangentialPressure === 'undefined') { event.tangentialPressure = 0; } + + // mark the mouse event as normalized, just so that we know we did it + event.isNormalized = true; + + normalizedEvents.push(event); + } + else + { + normalizedEvents.push(event); + } + + return normalizedEvents; + }; + + /** + * Destroys the interaction manager + * + */ + InteractionManager.prototype.destroy = function destroy () + { + this.removeEvents(); + + this.removeTickerListener(); + + this.removeAllListeners(); + + this.renderer = null; + + this.mouse = null; + + this.eventData = null; + + this.interactionDOMElement = null; + + this.onPointerDown = null; + this.processPointerDown = null; + + this.onPointerUp = null; + this.processPointerUp = null; + + this.onPointerCancel = null; + this.processPointerCancel = null; + + this.onPointerMove = null; + this.processPointerMove = null; + + this.onPointerOut = null; + this.processPointerOverOut = null; + + this.onPointerOver = null; + + this.search = null; + }; + + Object.defineProperties( InteractionManager.prototype, prototypeAccessors ); + + return InteractionManager; + }(eventemitter3)); + + var interaction_es = ({ + InteractionData: InteractionData, + InteractionEvent: InteractionEvent, + InteractionManager: InteractionManager, + InteractionTrackingData: InteractionTrackingData, + interactiveTarget: interactiveTarget + }); + + /*! + * @pixi/runner - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/runner is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + /** + * A Runner is a highly performant and simple alternative to signals. Best used in situations + * where events are dispatched to many objects at high frequency (say every frame!) + * + * + * like a signal.. + * ``` + * import { Runner } from '@pixi/runner'; + * + * const myObject = { + * loaded: new Runner('loaded') + * } + * + * const listener = { + * loaded: function(){ + * // thin + * } + * } + * + * myObject.update.add(listener); + * + * myObject.loaded.emit(); + * ``` + * + * Or for handling calling the same function on many items + * ``` + * import { Runner } from '@pixi/runner'; + * + * const myGame = { + * update: new Runner('update') + * } + * + * const gameObject = { + * update: function(time){ + * // update my gamey state + * } + * } + * + * myGame.update.add(gameObject1); + * + * myGame.update.emit(time); + * ``` + * @class + * @memberof PIXI + */ + var Runner = /** @class */ (function () { + /** + * @param {string} name the function name that will be executed on the listeners added to this Runner. + */ + function Runner(name) { + this.items = []; + this._name = name; + this._aliasCount = 0; + } + /** + * Dispatch/Broadcast Runner to all listeners added to the queue. + * @param {...any} params - optional parameters to pass to each listener + * @return {PIXI.Runner} + */ + Runner.prototype.emit = function (a0, a1, a2, a3, a4, a5, a6, a7) { + if (arguments.length > 8) { + throw new Error('max arguments reached'); + } + var _a = this, name = _a.name, items = _a.items; + this._aliasCount++; + for (var i = 0, len = items.length; i < len; i++) { + items[i][name](a0, a1, a2, a3, a4, a5, a6, a7); + } + if (items === this.items) { + this._aliasCount--; + } + return this; + }; + Runner.prototype.ensureNonAliasedItems = function () { + if (this._aliasCount > 0 && this.items.length > 1) { + this._aliasCount = 0; + this.items = this.items.slice(0); + } + }; + /** + * Add a listener to the Runner + * + * Runners do not need to have scope or functions passed to them. + * All that is required is to pass the listening object and ensure that it has contains a function that has the same name + * as the name provided to the Runner when it was created. + * + * Eg A listener passed to this Runner will require a 'complete' function. + * + * ``` + * import { Runner } from '@pixi/runner'; + * + * const complete = new Runner('complete'); + * ``` + * + * The scope used will be the object itself. + * + * @param {any} item - The object that will be listening. + * @return {PIXI.Runner} + */ + Runner.prototype.add = function (item) { + if (item[this._name]) { + this.ensureNonAliasedItems(); + this.remove(item); + this.items.push(item); + } + return this; + }; + /** + * Remove a single listener from the dispatch queue. + * @param {any} item - The listenr that you would like to remove. + * @return {PIXI.Runner} + */ + Runner.prototype.remove = function (item) { + var index = this.items.indexOf(item); + if (index !== -1) { + this.ensureNonAliasedItems(); + this.items.splice(index, 1); + } + return this; + }; + /** + * Check to see if the listener is already in the Runner + * @param {any} item - The listener that you would like to check. + */ + Runner.prototype.contains = function (item) { + return this.items.indexOf(item) !== -1; + }; + /** + * Remove all listeners from the Runner + * @return {PIXI.Runner} + */ + Runner.prototype.removeAll = function () { + this.ensureNonAliasedItems(); + this.items.length = 0; + return this; + }; + /** + * Remove all references, don't use after this. + */ + Runner.prototype.destroy = function () { + this.removeAll(); + this.items = null; + this._name = null; + }; + Object.defineProperty(Runner.prototype, "empty", { + /** + * `true` if there are no this Runner contains no listeners + * + * @member {boolean} + * @readonly + */ + get: function () { + return this.items.length === 0; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Runner.prototype, "name", { + /** + * The name of the runner. + * + * @member {string} + * @readonly + */ + get: function () { + return this._name; + }, + enumerable: true, + configurable: true + }); + return Runner; + }()); + Object.defineProperties(Runner.prototype, { + /** + * Alias for `emit` + * @memberof PIXI.Runner# + * @method dispatch + * @see PIXI.Runner#emit + */ + dispatch: { value: Runner.prototype.emit }, + /** + * Alias for `emit` + * @memberof PIXI.Runner# + * @method run + * @see PIXI.Runner#emit + */ + run: { value: Runner.prototype.emit }, + }); + + /*! + * @pixi/core - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/core is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Base resource class for textures that manages validation and uploading, depending on its type. + * + * Uploading of a base texture to the GPU is required. + * + * @class + * @memberof PIXI.resources + */ + var Resource = function Resource(width, height) + { + if ( width === void 0 ) { width = 0; } + if ( height === void 0 ) { height = 0; } + + /** + * Internal width of the resource + * @member {number} + * @protected + */ + this._width = width; + + /** + * Internal height of the resource + * @member {number} + * @protected + */ + this._height = height; + + /** + * If resource has been destroyed + * @member {boolean} + * @readonly + * @default false + */ + this.destroyed = false; + + /** + * `true` if resource is created by BaseTexture + * useful for doing cleanup with BaseTexture destroy + * and not cleaning up resources that were created + * externally. + * @member {boolean} + * @protected + */ + this.internal = false; + + /** + * Mini-runner for handling resize events + * + * @member {Runner} + * @private + */ + this.onResize = new Runner('setRealSize', 2); + + /** + * Mini-runner for handling update events + * + * @member {Runner} + * @private + */ + this.onUpdate = new Runner('update'); + + /** + * Handle internal errors, such as loading errors + * + * @member {Runner} + * @private + */ + this.onError = new Runner('onError', 1); + }; + + var prototypeAccessors$2 = { valid: { configurable: true },width: { configurable: true },height: { configurable: true } }; + + /** + * Bind to a parent BaseTexture + * + * @param {PIXI.BaseTexture} baseTexture - Parent texture + */ + Resource.prototype.bind = function bind (baseTexture) + { + this.onResize.add(baseTexture); + this.onUpdate.add(baseTexture); + this.onError.add(baseTexture); + + // Call a resize immediate if we already + // have the width and height of the resource + if (this._width || this._height) + { + this.onResize.run(this._width, this._height); + } + }; + + /** + * Unbind to a parent BaseTexture + * + * @param {PIXI.BaseTexture} baseTexture - Parent texture + */ + Resource.prototype.unbind = function unbind (baseTexture) + { + this.onResize.remove(baseTexture); + this.onUpdate.remove(baseTexture); + this.onError.remove(baseTexture); + }; + + /** + * Trigger a resize event + * @param {number} width X dimension + * @param {number} height Y dimension + */ + Resource.prototype.resize = function resize (width, height) + { + if (width !== this._width || height !== this._height) + { + this._width = width; + this._height = height; + this.onResize.run(width, height); + } + }; + + /** + * Has been validated + * @readonly + * @member {boolean} + */ + prototypeAccessors$2.valid.get = function () + { + return !!this._width && !!this._height; + }; + + /** + * Has been updated trigger event + */ + Resource.prototype.update = function update () + { + if (!this.destroyed) + { + this.onUpdate.run(); + } + }; + + /** + * This can be overridden to start preloading a resource + * or do any other prepare step. + * @protected + * @return {Promise} Handle the validate event + */ + Resource.prototype.load = function load () + { + return Promise.resolve(); + }; + + /** + * The width of the resource. + * + * @member {number} + * @readonly + */ + prototypeAccessors$2.width.get = function () + { + return this._width; + }; + + /** + * The height of the resource. + * + * @member {number} + * @readonly + */ + prototypeAccessors$2.height.get = function () + { + return this._height; + }; + + /** + * Uploads the texture or returns false if it cant for some reason. Override this. + * + * @param {PIXI.Renderer} renderer - yeah, renderer! + * @param {PIXI.BaseTexture} baseTexture - the texture + * @param {PIXI.GLTexture} glTexture - texture instance for this webgl context + * @returns {boolean} true is success + */ + Resource.prototype.upload = function upload (renderer, baseTexture, glTexture) // eslint-disable-line no-unused-vars + { + return false; + }; + + /** + * Set the style, optional to override + * + * @param {PIXI.Renderer} renderer - yeah, renderer! + * @param {PIXI.BaseTexture} baseTexture - the texture + * @param {PIXI.GLTexture} glTexture - texture instance for this webgl context + * @returns {boolean} `true` is success + */ + Resource.prototype.style = function style (renderer, baseTexture, glTexture) // eslint-disable-line no-unused-vars + { + return false; + }; + + /** + * Clean up anything, this happens when destroying is ready. + * + * @protected + */ + Resource.prototype.dispose = function dispose () + { + // override + }; + + /** + * Call when destroying resource, unbind any BaseTexture object + * before calling this method, as reference counts are maintained + * internally. + */ + Resource.prototype.destroy = function destroy () + { + if (!this.destroyed) + { + this.destroyed = true; + this.dispose(); + this.onError.removeAll(); + this.onError = null; + this.onResize.removeAll(); + this.onResize = null; + this.onUpdate.removeAll(); + this.onUpdate = null; + } + }; + + Object.defineProperties( Resource.prototype, prototypeAccessors$2 ); + + /** + * Base for all the image/canvas resources + * @class + * @extends PIXI.resources.Resource + * @memberof PIXI.resources + */ + var BaseImageResource = /*@__PURE__*/(function (Resource) { + function BaseImageResource(source) + { + var width = source.naturalWidth || source.videoWidth || source.width; + var height = source.naturalHeight || source.videoHeight || source.height; + + Resource.call(this, width, height); + + /** + * The source element + * @member {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} + * @readonly + */ + this.source = source; + + /** + * If set to `true`, will force `texImage2D` over `texSubImage2D` for uploading. + * Certain types of media (e.g. video) using `texImage2D` is more performant. + * @member {boolean} + * @default false + * @private + */ + this.noSubImage = false; + } + + if ( Resource ) { BaseImageResource.__proto__ = Resource; } + BaseImageResource.prototype = Object.create( Resource && Resource.prototype ); + BaseImageResource.prototype.constructor = BaseImageResource; + + /** + * Set cross origin based detecting the url and the crossorigin + * @protected + * @param {HTMLElement} element - Element to apply crossOrigin + * @param {string} url - URL to check + * @param {boolean|string} [crossorigin=true] - Cross origin value to use + */ + BaseImageResource.crossOrigin = function crossOrigin (element, url, crossorigin) + { + if (crossorigin === undefined && url.indexOf('data:') !== 0) + { + element.crossOrigin = determineCrossOrigin(url); + } + else if (crossorigin !== false) + { + element.crossOrigin = typeof crossorigin === 'string' ? crossorigin : 'anonymous'; + } + }; + + /** + * Upload the texture to the GPU. + * @param {PIXI.Renderer} renderer Upload to the renderer + * @param {PIXI.BaseTexture} baseTexture Reference to parent texture + * @param {PIXI.GLTexture} glTexture + * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} [source] (optional) + * @returns {boolean} true is success + */ + BaseImageResource.prototype.upload = function upload (renderer, baseTexture, glTexture, source) + { + var gl = renderer.gl; + var width = baseTexture.realWidth; + var height = baseTexture.realHeight; + + source = source || this.source; + + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.alphaMode === exports.ALPHA_MODES.UNPACK); + + if (!this.noSubImage + && baseTexture.target === gl.TEXTURE_2D + && glTexture.width === width + && glTexture.height === height) + { + gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, baseTexture.format, baseTexture.type, source); + } + else + { + glTexture.width = width; + glTexture.height = height; + + gl.texImage2D(baseTexture.target, 0, baseTexture.format, baseTexture.format, baseTexture.type, source); + } + + return true; + }; + + /** + * Checks if source width/height was changed, resize can cause extra baseTexture update. + * Triggers one update in any case. + */ + BaseImageResource.prototype.update = function update () + { + if (this.destroyed) + { + return; + } + + var width = this.source.naturalWidth || this.source.videoWidth || this.source.width; + var height = this.source.naturalHeight || this.source.videoHeight || this.source.height; + + this.resize(width, height); + + Resource.prototype.update.call(this); + }; + + /** + * Destroy this BaseImageResource + * @override + * @param {PIXI.BaseTexture} [fromTexture] Optional base texture + * @return {boolean} Destroy was successful + */ + BaseImageResource.prototype.dispose = function dispose () + { + this.source = null; + }; + + return BaseImageResource; + }(Resource)); + + /** + * Resource type for HTMLImageElement. + * @class + * @extends PIXI.resources.BaseImageResource + * @memberof PIXI.resources + */ + var ImageResource = /*@__PURE__*/(function (BaseImageResource) { + function ImageResource(source, options) + { + options = options || {}; + + if (!(source instanceof HTMLImageElement)) + { + var imageElement = new Image(); + + BaseImageResource.crossOrigin(imageElement, source, options.crossorigin); + + imageElement.src = source; + source = imageElement; + } + + BaseImageResource.call(this, source); + + // FireFox 68, and possibly other versions, seems like setting the HTMLImageElement#width and #height + // to non-zero values before its loading completes if images are in a cache. + // Because of this, need to set the `_width` and the `_height` to zero to avoid uploading incomplete images. + // Please refer to the issue #5968 (https://github.com/pixijs/pixi.js/issues/5968). + if (!source.complete && !!this._width && !!this._height) + { + this._width = 0; + this._height = 0; + } + + /** + * URL of the image source + * @member {string} + */ + this.url = source.src; + + /** + * When process is completed + * @member {Promise} + * @private + */ + this._process = null; + + /** + * If the image should be disposed after upload + * @member {boolean} + * @default false + */ + this.preserveBitmap = false; + + /** + * If capable, convert the image using createImageBitmap API + * @member {boolean} + * @default PIXI.settings.CREATE_IMAGE_BITMAP + */ + this.createBitmap = (options.createBitmap !== undefined + ? options.createBitmap : settings.CREATE_IMAGE_BITMAP) && !!window.createImageBitmap; + + /** + * Controls texture alphaMode field + * Copies from options + * Default is `null`, copies option from baseTexture + * + * @member {PIXI.ALPHA_MODES|null} + * @readonly + */ + this.alphaMode = typeof options.alphaMode === 'number' ? options.alphaMode : null; + + if (options.premultiplyAlpha !== undefined) + { + // triggers deprecation + this.premultiplyAlpha = options.premultiplyAlpha; + } + + /** + * The ImageBitmap element created for HTMLImageElement + * @member {ImageBitmap} + * @default null + */ + this.bitmap = null; + + /** + * Promise when loading + * @member {Promise} + * @private + * @default null + */ + this._load = null; + + if (options.autoLoad !== false) + { + this.load(); + } + } + + if ( BaseImageResource ) { ImageResource.__proto__ = BaseImageResource; } + ImageResource.prototype = Object.create( BaseImageResource && BaseImageResource.prototype ); + ImageResource.prototype.constructor = ImageResource; + + /** + * returns a promise when image will be loaded and processed + * + * @param {boolean} [createBitmap=true] whether process image into bitmap + * @returns {Promise} + */ + ImageResource.prototype.load = function load (createBitmap) + { + var this$1 = this; + + if (this._load) + { + return this._load; + } + + if (createBitmap !== undefined) + { + this.createBitmap = createBitmap; + } + + this._load = new Promise(function (resolve, reject) { + this$1.url = this$1.source.src; + var ref = this$1; + var source = ref.source; + + var completed = function () { + if (this$1.destroyed) + { + return; + } + source.onload = null; + source.onerror = null; + + this$1.resize(source.width, source.height); + this$1._load = null; + + if (this$1.createBitmap) + { + resolve(this$1.process()); + } + else + { + resolve(this$1); + } + }; + + if (source.complete && source.src) + { + completed(); + } + else + { + source.onload = completed; + source.onerror = function (event) { + // Avoids Promise freezing when resource broken + reject(event); + this$1.onError.emit(event); + }; + } + }); + + return this._load; + }; + + /** + * Called when we need to convert image into BitmapImage. + * Can be called multiple times, real promise is cached inside. + * + * @returns {Promise} cached promise to fill that bitmap + */ + ImageResource.prototype.process = function process () + { + var this$1 = this; + + if (this._process !== null) + { + return this._process; + } + if (this.bitmap !== null || !window.createImageBitmap) + { + return Promise.resolve(this); + } + + this._process = window.createImageBitmap(this.source, + 0, 0, this.source.width, this.source.height, + { + premultiplyAlpha: this.premultiplyAlpha === exports.ALPHA_MODES.UNPACK ? 'premultiply' : 'none', + }) + .then(function (bitmap) { + if (this$1.destroyed) + { + return Promise.reject(); + } + this$1.bitmap = bitmap; + this$1.update(); + this$1._process = null; + + return Promise.resolve(this$1); + }); + + return this._process; + }; + + /** + * Upload the image resource to GPU. + * + * @param {PIXI.Renderer} renderer - Renderer to upload to + * @param {PIXI.BaseTexture} baseTexture - BaseTexture for this resource + * @param {PIXI.GLTexture} glTexture - GLTexture to use + * @returns {boolean} true is success + */ + ImageResource.prototype.upload = function upload (renderer, baseTexture, glTexture) + { + if (typeof this.alphaMode === 'number') + { + // bitmap stores unpack premultiply flag, we dont have to notify texImage2D about it + + baseTexture.alphaMode = this.alphaMode; + } + + if (!this.createBitmap) + { + return BaseImageResource.prototype.upload.call(this, renderer, baseTexture, glTexture); + } + if (!this.bitmap) + { + // yeah, ignore the output + this.process(); + if (!this.bitmap) + { + return false; + } + } + + BaseImageResource.prototype.upload.call(this, renderer, baseTexture, glTexture, this.bitmap); + + if (!this.preserveBitmap) + { + // checks if there are other renderers that possibly need this bitmap + + var flag = true; + + for (var key in baseTexture._glTextures) + { + var otherTex = baseTexture._glTextures[key]; + + if (otherTex !== glTexture && otherTex.dirtyId !== baseTexture.dirtyId) + { + flag = false; + break; + } + } + + if (flag) + { + if (this.bitmap.close) + { + this.bitmap.close(); + } + + this.bitmap = null; + } + } + + return true; + }; + + /** + * Destroys this texture + * @override + */ + ImageResource.prototype.dispose = function dispose () + { + this.source.onload = null; + this.source.onerror = null; + + BaseImageResource.prototype.dispose.call(this); + + if (this.bitmap) + { + this.bitmap.close(); + this.bitmap = null; + } + this._process = null; + this._load = null; + }; + + return ImageResource; + }(BaseImageResource)); + + /** + * Collection of installed resource types, class must extend {@link PIXI.resources.Resource}. + * @example + * class CustomResource extends PIXI.resources.Resource { + * // MUST have source, options constructor signature + * // for auto-detected resources to be created. + * constructor(source, options) { + * super(); + * } + * upload(renderer, baseTexture, glTexture) { + * // upload with GL + * return true; + * } + * // used to auto-detect resource + * static test(source, extension) { + * return extension === 'xyz'|| source instanceof SomeClass; + * } + * } + * // Install the new resource type + * PIXI.resources.INSTALLED.push(CustomResource); + * + * @name PIXI.resources.INSTALLED + * @type {Array<*>} + * @static + * @readonly + */ + var INSTALLED = []; + + /** + * Create a resource element from a single source element. This + * auto-detects which type of resource to create. All resources that + * are auto-detectable must have a static `test` method and a constructor + * with the arguments `(source, options?)`. Currently, the supported + * resources for auto-detection include: + * - {@link PIXI.resources.ImageResource} + * - {@link PIXI.resources.CanvasResource} + * - {@link PIXI.resources.VideoResource} + * - {@link PIXI.resources.SVGResource} + * - {@link PIXI.resources.BufferResource} + * @static + * @function PIXI.resources.autoDetectResource + * @param {string|*} source - Resource source, this can be the URL to the resource, + * a typed-array (for BufferResource), HTMLVideoElement, SVG data-uri + * or any other resource that can be auto-detected. If not resource is + * detected, it's assumed to be an ImageResource. + * @param {object} [options] - Pass-through options to use for Resource + * @param {number} [options.width] - Width of BufferResource or SVG rasterization + * @param {number} [options.height] - Height of BufferResource or SVG rasterization + * @param {boolean} [options.autoLoad=true] - Image, SVG and Video flag to start loading + * @param {number} [options.scale=1] - SVG source scale. Overridden by width, height + * @param {boolean} [options.createBitmap=PIXI.settings.CREATE_IMAGE_BITMAP] - Image option to create Bitmap object + * @param {boolean} [options.crossorigin=true] - Image and Video option to set crossOrigin + * @param {boolean} [options.autoPlay=true] - Video option to start playing video immediately + * @param {number} [options.updateFPS=0] - Video option to update how many times a second the + * texture should be updated from the video. Leave at 0 to update at every render + * @return {PIXI.resources.Resource} The created resource. + */ + function autoDetectResource(source, options) + { + if (!source) + { + return null; + } + + var extension = ''; + + if (typeof source === 'string') + { + // search for file extension: period, 3-4 chars, then ?, # or EOL + var result = (/\.(\w{3,4})(?:$|\?|#)/i).exec(source); + + if (result) + { + extension = result[1].toLowerCase(); + } + } + + for (var i = INSTALLED.length - 1; i >= 0; --i) + { + var ResourcePlugin = INSTALLED[i]; + + if (ResourcePlugin.test && ResourcePlugin.test(source, extension)) + { + return new ResourcePlugin(source, options); + } + } + + // When in doubt: probably an image + // might be appropriate to throw an error or return null + return new ImageResource(source, options); + } + + /** + * @interface SharedArrayBuffer + */ + + /** + * Buffer resource with data of typed array. + * @class + * @extends PIXI.resources.Resource + * @memberof PIXI.resources + */ + var BufferResource = /*@__PURE__*/(function (Resource) { + function BufferResource(source, options) + { + var ref = options || {}; + var width = ref.width; + var height = ref.height; + + if (!width || !height) + { + throw new Error('BufferResource width or height invalid'); + } + + Resource.call(this, width, height); + + /** + * Source array + * Cannot be ClampedUint8Array because it cant be uploaded to WebGL + * + * @member {Float32Array|Uint8Array|Uint32Array} + */ + this.data = source; + } + + if ( Resource ) { BufferResource.__proto__ = Resource; } + BufferResource.prototype = Object.create( Resource && Resource.prototype ); + BufferResource.prototype.constructor = BufferResource; + + /** + * Upload the texture to the GPU. + * @param {PIXI.Renderer} renderer Upload to the renderer + * @param {PIXI.BaseTexture} baseTexture Reference to parent texture + * @param {PIXI.GLTexture} glTexture glTexture + * @returns {boolean} true is success + */ + BufferResource.prototype.upload = function upload (renderer, baseTexture, glTexture) + { + var gl = renderer.gl; + + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.alphaMode === exports.ALPHA_MODES.UNPACK); + + if (glTexture.width === baseTexture.width && glTexture.height === baseTexture.height) + { + gl.texSubImage2D( + baseTexture.target, + 0, + 0, + 0, + baseTexture.width, + baseTexture.height, + baseTexture.format, + baseTexture.type, + this.data + ); + } + else + { + glTexture.width = baseTexture.width; + glTexture.height = baseTexture.height; + + gl.texImage2D( + baseTexture.target, + 0, + glTexture.internalFormat, + baseTexture.width, + baseTexture.height, + 0, + baseTexture.format, + glTexture.type, + this.data + ); + } + + return true; + }; + + /** + * Destroy and don't use after this + * @override + */ + BufferResource.prototype.dispose = function dispose () + { + this.data = null; + }; + + /** + * Used to auto-detect the type of resource. + * + * @static + * @param {*} source - The source object + * @return {boolean} `true` if + */ + BufferResource.test = function test (source) + { + return source instanceof Float32Array + || source instanceof Uint8Array + || source instanceof Uint32Array; + }; + + return BufferResource; + }(Resource)); + + var defaultBufferOptions = { + scaleMode: exports.SCALE_MODES.NEAREST, + format: exports.FORMATS.RGBA, + alphaMode: exports.ALPHA_MODES.NPM, + }; + + /** + * A Texture stores the information that represents an image. + * All textures have a base texture, which contains information about the source. + * Therefore you can have many textures all using a single BaseTexture + * + * @class + * @extends PIXI.utils.EventEmitter + * @memberof PIXI + * @param {PIXI.resources.Resource|string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} [resource=null] + * The current resource to use, for things that aren't Resource objects, will be converted + * into a Resource. + * @param {Object} [options] - Collection of options + * @param {PIXI.MIPMAP_MODES} [options.mipmap=PIXI.settings.MIPMAP_TEXTURES] - If mipmapping is enabled for texture + * @param {number} [options.anisotropicLevel=PIXI.settings.ANISOTROPIC_LEVEL] - Anisotropic filtering level of texture + * @param {PIXI.WRAP_MODES} [options.wrapMode=PIXI.settings.WRAP_MODE] - Wrap mode for textures + * @param {PIXI.SCALE_MODES} [options.scaleMode=PIXI.settings.SCALE_MODE] - Default scale mode, linear, nearest + * @param {PIXI.FORMATS} [options.format=PIXI.FORMATS.RGBA] - GL format type + * @param {PIXI.TYPES} [options.type=PIXI.TYPES.UNSIGNED_BYTE] - GL data type + * @param {PIXI.TARGETS} [options.target=PIXI.TARGETS.TEXTURE_2D] - GL texture target + * @param {PIXI.ALPHA_MODES} [options.alphaMode=PIXI.ALPHA_MODES.UNPACK] - Pre multiply the image alpha + * @param {number} [options.width=0] - Width of the texture + * @param {number} [options.height=0] - Height of the texture + * @param {number} [options.resolution] - Resolution of the base texture + * @param {object} [options.resourceOptions] - Optional resource options, + * see {@link PIXI.resources.autoDetectResource autoDetectResource} + */ + var BaseTexture = /*@__PURE__*/(function (EventEmitter) { + function BaseTexture(resource, options) + { + if ( resource === void 0 ) { resource = null; } + if ( options === void 0 ) { options = null; } + + EventEmitter.call(this); + + options = options || {}; + + var alphaMode = options.alphaMode; + var mipmap = options.mipmap; + var anisotropicLevel = options.anisotropicLevel; + var scaleMode = options.scaleMode; + var width = options.width; + var height = options.height; + var wrapMode = options.wrapMode; + var format = options.format; + var type = options.type; + var target = options.target; + var resolution = options.resolution; + var resourceOptions = options.resourceOptions; + + // Convert the resource to a Resource object + if (resource && !(resource instanceof Resource)) + { + resource = autoDetectResource(resource, resourceOptions); + resource.internal = true; + } + + /** + * The width of the base texture set when the image has loaded + * + * @readonly + * @member {number} + */ + this.width = width || 0; + + /** + * The height of the base texture set when the image has loaded + * + * @readonly + * @member {number} + */ + this.height = height || 0; + + /** + * The resolution / device pixel ratio of the texture + * + * @member {number} + * @default PIXI.settings.RESOLUTION + */ + this.resolution = resolution || settings.RESOLUTION; + + /** + * Mipmap mode of the texture, affects downscaled images + * + * @member {PIXI.MIPMAP_MODES} + * @default PIXI.settings.MIPMAP_TEXTURES + */ + this.mipmap = mipmap !== undefined ? mipmap : settings.MIPMAP_TEXTURES; + + /** + * Anisotropic filtering level of texture + * + * @member {number} + * @default PIXI.settings.ANISOTROPIC_LEVEL + */ + this.anisotropicLevel = anisotropicLevel !== undefined ? anisotropicLevel : settings.ANISOTROPIC_LEVEL; + + /** + * How the texture wraps + * @member {number} + */ + this.wrapMode = wrapMode || settings.WRAP_MODE; + + /** + * The scale mode to apply when scaling this texture + * + * @member {PIXI.SCALE_MODES} + * @default PIXI.settings.SCALE_MODE + */ + this.scaleMode = scaleMode !== undefined ? scaleMode : settings.SCALE_MODE; + + /** + * The pixel format of the texture + * + * @member {PIXI.FORMATS} + * @default PIXI.FORMATS.RGBA + */ + this.format = format || exports.FORMATS.RGBA; + + /** + * The type of resource data + * + * @member {PIXI.TYPES} + * @default PIXI.TYPES.UNSIGNED_BYTE + */ + this.type = type || exports.TYPES.UNSIGNED_BYTE; + + /** + * The target type + * + * @member {PIXI.TARGETS} + * @default PIXI.TARGETS.TEXTURE_2D + */ + this.target = target || exports.TARGETS.TEXTURE_2D; + + /** + * How to treat premultiplied alpha, see {@link PIXI.ALPHA_MODES}. + * + * @member {PIXI.ALPHA_MODES} + * @default PIXI.ALPHA_MODES.UNPACK + */ + this.alphaMode = alphaMode !== undefined ? alphaMode : exports.ALPHA_MODES.UNPACK; + + if (options.premultiplyAlpha !== undefined) + { + // triggers deprecation + this.premultiplyAlpha = options.premultiplyAlpha; + } + + /** + * Global unique identifier for this BaseTexture + * + * @member {string} + * @protected + */ + this.uid = uid(); + + /** + * Used by automatic texture Garbage Collection, stores last GC tick when it was bound + * + * @member {number} + * @protected + */ + this.touched = 0; + + /** + * Whether or not the texture is a power of two, try to use power of two textures as much + * as you can + * + * @readonly + * @member {boolean} + * @default false + */ + this.isPowerOfTwo = false; + this._refreshPOT(); + + /** + * The map of render context textures where this is bound + * + * @member {Object} + * @private + */ + this._glTextures = {}; + + /** + * Used by TextureSystem to only update texture to the GPU when needed. + * Please call `update()` to increment it. + * + * @readonly + * @member {number} + */ + this.dirtyId = 0; + + /** + * Used by TextureSystem to only update texture style when needed. + * + * @protected + * @member {number} + */ + this.dirtyStyleId = 0; + + /** + * Currently default cache ID. + * + * @member {string} + */ + this.cacheId = null; + + /** + * Generally speaking means when resource is loaded. + * @readonly + * @member {boolean} + */ + this.valid = width > 0 && height > 0; + + /** + * The collection of alternative cache ids, since some BaseTextures + * can have more than one ID, short name and longer full URL + * + * @member {Array} + * @readonly + */ + this.textureCacheIds = []; + + /** + * Flag if BaseTexture has been destroyed. + * + * @member {boolean} + * @readonly + */ + this.destroyed = false; + + /** + * The resource used by this BaseTexture, there can only + * be one resource per BaseTexture, but textures can share + * resources. + * + * @member {PIXI.resources.Resource} + * @readonly + */ + this.resource = null; + + /** + * Number of the texture batch, used by multi-texture renderers + * + * @member {number} + */ + this._batchEnabled = 0; + + /** + * Location inside texture batch, used by multi-texture renderers + * + * @member {number} + */ + this._batchLocation = 0; + + /** + * Fired when a not-immediately-available source finishes loading. + * + * @protected + * @event PIXI.BaseTexture#loaded + * @param {PIXI.BaseTexture} baseTexture - Resource loaded. + */ + + /** + * Fired when a not-immediately-available source fails to load. + * + * @protected + * @event PIXI.BaseTexture#error + * @param {PIXI.BaseTexture} baseTexture - Resource errored. + * @param {ErrorEvent} event - Load error event. + */ + + /** + * Fired when BaseTexture is updated. + * + * @protected + * @event PIXI.BaseTexture#loaded + * @param {PIXI.BaseTexture} baseTexture - Resource loaded. + */ + + /** + * Fired when BaseTexture is updated. + * + * @protected + * @event PIXI.BaseTexture#update + * @param {PIXI.BaseTexture} baseTexture - Instance of texture being updated. + */ + + /** + * Fired when BaseTexture is destroyed. + * + * @protected + * @event PIXI.BaseTexture#dispose + * @param {PIXI.BaseTexture} baseTexture - Instance of texture being destroyed. + */ + + // Set the resource + this.setResource(resource); + } + + if ( EventEmitter ) { BaseTexture.__proto__ = EventEmitter; } + BaseTexture.prototype = Object.create( EventEmitter && EventEmitter.prototype ); + BaseTexture.prototype.constructor = BaseTexture; + + var prototypeAccessors = { realWidth: { configurable: true },realHeight: { configurable: true } }; + + /** + * Pixel width of the source of this texture + * + * @readonly + * @member {number} + */ + prototypeAccessors.realWidth.get = function () + { + return Math.ceil((this.width * this.resolution) - 1e-4); + }; + + /** + * Pixel height of the source of this texture + * + * @readonly + * @member {number} + */ + prototypeAccessors.realHeight.get = function () + { + return Math.ceil((this.height * this.resolution) - 1e-4); + }; + + /** + * Changes style options of BaseTexture + * + * @param {PIXI.SCALE_MODES} [scaleMode] - Pixi scalemode + * @param {PIXI.MIPMAP_MODES} [mipmap] - enable mipmaps + * @returns {PIXI.BaseTexture} this + */ + BaseTexture.prototype.setStyle = function setStyle (scaleMode, mipmap) + { + var dirty; + + if (scaleMode !== undefined && scaleMode !== this.scaleMode) + { + this.scaleMode = scaleMode; + dirty = true; + } + + if (mipmap !== undefined && mipmap !== this.mipmap) + { + this.mipmap = mipmap; + dirty = true; + } + + if (dirty) + { + this.dirtyStyleId++; + } + + return this; + }; + + /** + * Changes w/h/resolution. Texture becomes valid if width and height are greater than zero. + * + * @param {number} width Visual width + * @param {number} height Visual height + * @param {number} [resolution] Optionally set resolution + * @returns {PIXI.BaseTexture} this + */ + BaseTexture.prototype.setSize = function setSize (width, height, resolution) + { + this.resolution = resolution || this.resolution; + this.width = width; + this.height = height; + this._refreshPOT(); + this.update(); + + return this; + }; + + /** + * Sets real size of baseTexture, preserves current resolution. + * + * @param {number} realWidth Full rendered width + * @param {number} realHeight Full rendered height + * @param {number} [resolution] Optionally set resolution + * @returns {PIXI.BaseTexture} this + */ + BaseTexture.prototype.setRealSize = function setRealSize (realWidth, realHeight, resolution) + { + this.resolution = resolution || this.resolution; + this.width = realWidth / this.resolution; + this.height = realHeight / this.resolution; + this._refreshPOT(); + this.update(); + + return this; + }; + + /** + * Refresh check for isPowerOfTwo texture based on size + * + * @private + */ + BaseTexture.prototype._refreshPOT = function _refreshPOT () + { + this.isPowerOfTwo = isPow2(this.realWidth) && isPow2(this.realHeight); + }; + + /** + * Changes resolution + * + * @param {number} [resolution] res + * @returns {PIXI.BaseTexture} this + */ + BaseTexture.prototype.setResolution = function setResolution (resolution) + { + var oldResolution = this.resolution; + + if (oldResolution === resolution) + { + return this; + } + + this.resolution = resolution; + + if (this.valid) + { + this.width = this.width * oldResolution / resolution; + this.height = this.height * oldResolution / resolution; + this.emit('update', this); + } + + this._refreshPOT(); + + return this; + }; + + /** + * Sets the resource if it wasn't set. Throws error if resource already present + * + * @param {PIXI.resources.Resource} resource - that is managing this BaseTexture + * @returns {PIXI.BaseTexture} this + */ + BaseTexture.prototype.setResource = function setResource (resource) + { + if (this.resource === resource) + { + return this; + } + + if (this.resource) + { + throw new Error('Resource can be set only once'); + } + + resource.bind(this); + + this.resource = resource; + + return this; + }; + + /** + * Invalidates the object. Texture becomes valid if width and height are greater than zero. + */ + BaseTexture.prototype.update = function update () + { + if (!this.valid) + { + if (this.width > 0 && this.height > 0) + { + this.valid = true; + this.emit('loaded', this); + this.emit('update', this); + } + } + else + { + this.dirtyId++; + this.dirtyStyleId++; + this.emit('update', this); + } + }; + + /** + * Handle errors with resources. + * @private + * @param {ErrorEvent} event - Error event emitted. + */ + BaseTexture.prototype.onError = function onError (event) + { + this.emit('error', this, event); + }; + + /** + * Destroys this base texture. + * The method stops if resource doesn't want this texture to be destroyed. + * Removes texture from all caches. + */ + BaseTexture.prototype.destroy = function destroy () + { + // remove and destroy the resource + if (this.resource) + { + this.resource.unbind(this); + // only destroy resourced created internally + if (this.resource.internal) + { + this.resource.destroy(); + } + this.resource = null; + } + + if (this.cacheId) + { + delete BaseTextureCache[this.cacheId]; + delete TextureCache[this.cacheId]; + + this.cacheId = null; + } + + // finally let the WebGL renderer know.. + this.dispose(); + + BaseTexture.removeFromCache(this); + this.textureCacheIds = null; + + this.destroyed = true; + }; + + /** + * Frees the texture from WebGL memory without destroying this texture object. + * This means you can still use the texture later which will upload it to GPU + * memory again. + * + * @fires PIXI.BaseTexture#dispose + */ + BaseTexture.prototype.dispose = function dispose () + { + this.emit('dispose', this); + }; + + /** + * Helper function that creates a base texture based on the source you provide. + * The source can be - image url, image element, canvas element. If the + * source is an image url or an image element and not in the base texture + * cache, it will be created and loaded. + * + * @static + * @param {string|HTMLImageElement|HTMLCanvasElement|SVGElement|HTMLVideoElement} source - The + * source to create base texture from. + * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options. + * @param {boolean} [strict] Enforce strict-mode, see {@link PIXI.settings.STRICT_TEXTURE_CACHE}. + * @returns {PIXI.BaseTexture} The new base texture. + */ + BaseTexture.from = function from (source, options, strict) + { + if ( strict === void 0 ) { strict = settings.STRICT_TEXTURE_CACHE; } + + var isFrame = typeof source === 'string'; + var cacheId = null; + + if (isFrame) + { + cacheId = source; + } + else + { + if (!source._pixiId) + { + source._pixiId = "pixiid_" + (uid()); + } + + cacheId = source._pixiId; + } + + var baseTexture = BaseTextureCache[cacheId]; + + // Strict-mode rejects invalid cacheIds + if (isFrame && strict && !baseTexture) + { + throw new Error(("The cacheId \"" + cacheId + "\" does not exist in BaseTextureCache.")); + } + + if (!baseTexture) + { + baseTexture = new BaseTexture(source, options); + baseTexture.cacheId = cacheId; + BaseTexture.addToCache(baseTexture, cacheId); + } + + return baseTexture; + }; + + /** + * Create a new BaseTexture with a BufferResource from a Float32Array. + * RGBA values are floats from 0 to 1. + * @static + * @param {Float32Array|Uint8Array} buffer The optional array to use, if no data + * is provided, a new Float32Array is created. + * @param {number} width - Width of the resource + * @param {number} height - Height of the resource + * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options. + * @return {PIXI.BaseTexture} The resulting new BaseTexture + */ + BaseTexture.fromBuffer = function fromBuffer (buffer, width, height, options) + { + buffer = buffer || new Float32Array(width * height * 4); + + var resource = new BufferResource(buffer, { width: width, height: height }); + var type = buffer instanceof Float32Array ? exports.TYPES.FLOAT : exports.TYPES.UNSIGNED_BYTE; + + return new BaseTexture(resource, Object.assign(defaultBufferOptions, options || { width: width, height: height, type: type })); + }; + + /** + * Adds a BaseTexture to the global BaseTextureCache. This cache is shared across the whole PIXI object. + * + * @static + * @param {PIXI.BaseTexture} baseTexture - The BaseTexture to add to the cache. + * @param {string} id - The id that the BaseTexture will be stored against. + */ + BaseTexture.addToCache = function addToCache (baseTexture, id) + { + if (id) + { + if (baseTexture.textureCacheIds.indexOf(id) === -1) + { + baseTexture.textureCacheIds.push(id); + } + + if (BaseTextureCache[id]) + { + // eslint-disable-next-line no-console + console.warn(("BaseTexture added to the cache with an id [" + id + "] that already had an entry")); + } + + BaseTextureCache[id] = baseTexture; + } + }; + + /** + * Remove a BaseTexture from the global BaseTextureCache. + * + * @static + * @param {string|PIXI.BaseTexture} baseTexture - id of a BaseTexture to be removed, or a BaseTexture instance itself. + * @return {PIXI.BaseTexture|null} The BaseTexture that was removed. + */ + BaseTexture.removeFromCache = function removeFromCache (baseTexture) + { + if (typeof baseTexture === 'string') + { + var baseTextureFromCache = BaseTextureCache[baseTexture]; + + if (baseTextureFromCache) + { + var index = baseTextureFromCache.textureCacheIds.indexOf(baseTexture); + + if (index > -1) + { + baseTextureFromCache.textureCacheIds.splice(index, 1); + } + + delete BaseTextureCache[baseTexture]; + + return baseTextureFromCache; + } + } + else if (baseTexture && baseTexture.textureCacheIds) + { + for (var i = 0; i < baseTexture.textureCacheIds.length; ++i) + { + delete BaseTextureCache[baseTexture.textureCacheIds[i]]; + } + + baseTexture.textureCacheIds.length = 0; + + return baseTexture; + } + + return null; + }; + + Object.defineProperties( BaseTexture.prototype, prototypeAccessors ); + + return BaseTexture; + }(eventemitter3)); + + /** + * Global number of the texture batch, used by multi-texture renderers + * + * @static + * @member {number} + */ + BaseTexture._globalBatch = 0; + + /** + * A resource that contains a number of sources. + * + * @class + * @extends PIXI.resources.Resource + * @memberof PIXI.resources + * @param {number|Array<*>} source - Number of items in array or the collection + * of image URLs to use. Can also be resources, image elements, canvas, etc. + * @param {object} [options] Options to apply to {@link PIXI.resources.autoDetectResource} + * @param {number} [options.width] - Width of the resource + * @param {number} [options.height] - Height of the resource + */ + var ArrayResource = /*@__PURE__*/(function (Resource) { + function ArrayResource(source, options) + { + options = options || {}; + + var urls; + var length = source; + + if (Array.isArray(source)) + { + urls = source; + length = source.length; + } + + Resource.call(this, options.width, options.height); + + /** + * Collection of resources. + * @member {Array} + * @readonly + */ + this.items = []; + + /** + * Dirty IDs for each part + * @member {Array} + * @readonly + */ + this.itemDirtyIds = []; + + for (var i = 0; i < length; i++) + { + var partTexture = new BaseTexture(); + + this.items.push(partTexture); + this.itemDirtyIds.push(-1); + } + + /** + * Number of elements in array + * + * @member {number} + * @readonly + */ + this.length = length; + + /** + * Promise when loading + * @member {Promise} + * @private + * @default null + */ + this._load = null; + + if (urls) + { + for (var i$1 = 0; i$1 < length; i$1++) + { + this.addResourceAt(autoDetectResource(urls[i$1], options), i$1); + } + } + } + + if ( Resource ) { ArrayResource.__proto__ = Resource; } + ArrayResource.prototype = Object.create( Resource && Resource.prototype ); + ArrayResource.prototype.constructor = ArrayResource; + + /** + * Destroy this BaseImageResource + * @override + */ + ArrayResource.prototype.dispose = function dispose () + { + for (var i = 0, len = this.length; i < len; i++) + { + this.items[i].destroy(); + } + this.items = null; + this.itemDirtyIds = null; + this._load = null; + }; + + /** + * Set a resource by ID + * + * @param {PIXI.resources.Resource} resource + * @param {number} index - Zero-based index of resource to set + * @return {PIXI.resources.ArrayResource} Instance for chaining + */ + ArrayResource.prototype.addResourceAt = function addResourceAt (resource, index) + { + var baseTexture = this.items[index]; + + if (!baseTexture) + { + throw new Error(("Index " + index + " is out of bounds")); + } + + // Inherit the first resource dimensions + if (resource.valid && !this.valid) + { + this.resize(resource.width, resource.height); + } + + this.items[index].setResource(resource); + + return this; + }; + + /** + * Set the parent base texture + * @member {PIXI.BaseTexture} + * @override + */ + ArrayResource.prototype.bind = function bind (baseTexture) + { + Resource.prototype.bind.call(this, baseTexture); + + baseTexture.target = exports.TARGETS.TEXTURE_2D_ARRAY; + + for (var i = 0; i < this.length; i++) + { + this.items[i].on('update', baseTexture.update, baseTexture); + } + }; + + /** + * Unset the parent base texture + * @member {PIXI.BaseTexture} + * @override + */ + ArrayResource.prototype.unbind = function unbind (baseTexture) + { + Resource.prototype.unbind.call(this, baseTexture); + + for (var i = 0; i < this.length; i++) + { + this.items[i].off('update', baseTexture.update, baseTexture); + } + }; + + /** + * Load all the resources simultaneously + * @override + * @return {Promise} When load is resolved + */ + ArrayResource.prototype.load = function load () + { + var this$1 = this; + + if (this._load) + { + return this._load; + } + + var resources = this.items.map(function (item) { return item.resource; }); + + // TODO: also implement load part-by-part strategy + var promises = resources.map(function (item) { return item.load(); }); + + this._load = Promise.all(promises) + .then(function () { + var ref = resources[0]; + var width = ref.width; + var height = ref.height; + + this$1.resize(width, height); + + return Promise.resolve(this$1); + } + ); + + return this._load; + }; + + /** + * Upload the resources to the GPU. + * @param {PIXI.Renderer} renderer + * @param {PIXI.BaseTexture} texture + * @param {PIXI.GLTexture} glTexture + * @returns {boolean} whether texture was uploaded + */ + ArrayResource.prototype.upload = function upload (renderer, texture, glTexture) + { + var ref = this; + var length = ref.length; + var itemDirtyIds = ref.itemDirtyIds; + var items = ref.items; + var gl = renderer.gl; + + if (glTexture.dirtyId < 0) + { + gl.texImage3D( + gl.TEXTURE_2D_ARRAY, + 0, + texture.format, + this._width, + this._height, + length, + 0, + texture.format, + texture.type, + null + ); + } + + for (var i = 0; i < length; i++) + { + var item = items[i]; + + if (itemDirtyIds[i] < item.dirtyId) + { + itemDirtyIds[i] = item.dirtyId; + if (item.valid) + { + gl.texSubImage3D( + gl.TEXTURE_2D_ARRAY, + 0, + 0, // xoffset + 0, // yoffset + i, // zoffset + item.resource.width, + item.resource.height, + 1, + texture.format, + texture.type, + item.resource.source + ); + } + } + } + + return true; + }; + + return ArrayResource; + }(Resource)); + + /** + * @interface OffscreenCanvas + */ + + /** + * Resource type for HTMLCanvasElement. + * @class + * @extends PIXI.resources.BaseImageResource + * @memberof PIXI.resources + * @param {HTMLCanvasElement} source - Canvas element to use + */ + var CanvasResource = /*@__PURE__*/(function (BaseImageResource) { + function CanvasResource () { + BaseImageResource.apply(this, arguments); + } + + if ( BaseImageResource ) { CanvasResource.__proto__ = BaseImageResource; } + CanvasResource.prototype = Object.create( BaseImageResource && BaseImageResource.prototype ); + CanvasResource.prototype.constructor = CanvasResource; + + CanvasResource.test = function test (source) + { + var OffscreenCanvas = window.OffscreenCanvas; + + // Check for browsers that don't yet support OffscreenCanvas + if (OffscreenCanvas && source instanceof OffscreenCanvas) + { + return true; + } + + return source instanceof HTMLCanvasElement; + }; + + return CanvasResource; + }(BaseImageResource)); + + /** + * Resource for a CubeTexture which contains six resources. + * + * @class + * @extends PIXI.resources.ArrayResource + * @memberof PIXI.resources + * @param {Array} [source] Collection of URLs or resources + * to use as the sides of the cube. + * @param {object} [options] - ImageResource options + * @param {number} [options.width] - Width of resource + * @param {number} [options.height] - Height of resource + */ + var CubeResource = /*@__PURE__*/(function (ArrayResource) { + function CubeResource(source, options) + { + options = options || {}; + + ArrayResource.call(this, source, options); + + if (this.length !== CubeResource.SIDES) + { + throw new Error(("Invalid length. Got " + (this.length) + ", expected 6")); + } + + for (var i = 0; i < CubeResource.SIDES; i++) + { + this.items[i].target = exports.TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X + i; + } + + if (options.autoLoad !== false) + { + this.load(); + } + } + + if ( ArrayResource ) { CubeResource.__proto__ = ArrayResource; } + CubeResource.prototype = Object.create( ArrayResource && ArrayResource.prototype ); + CubeResource.prototype.constructor = CubeResource; + + /** + * Add binding + * + * @override + * @param {PIXI.BaseTexture} baseTexture - parent base texture + */ + CubeResource.prototype.bind = function bind (baseTexture) + { + ArrayResource.prototype.bind.call(this, baseTexture); + + baseTexture.target = exports.TARGETS.TEXTURE_CUBE_MAP; + }; + + /** + * Upload the resource + * + * @returns {boolean} true is success + */ + CubeResource.prototype.upload = function upload (renderer, baseTexture, glTexture) + { + var dirty = this.itemDirtyIds; + + for (var i = 0; i < CubeResource.SIDES; i++) + { + var side = this.items[i]; + + if (dirty[i] < side.dirtyId) + { + dirty[i] = side.dirtyId; + if (side.valid) + { + side.resource.upload(renderer, side, glTexture); + } + } + } + + return true; + }; + + return CubeResource; + }(ArrayResource)); + + /** + * Number of texture sides to store for CubeResources + * + * @name PIXI.resources.CubeResource.SIDES + * @static + * @member {number} + * @default 6 + */ + CubeResource.SIDES = 6; + + /** + * Resource type for SVG elements and graphics. + * @class + * @extends PIXI.resources.BaseImageResource + * @memberof PIXI.resources + * @param {string} source - Base64 encoded SVG element or URL for SVG file. + * @param {object} [options] - Options to use + * @param {number} [options.scale=1] Scale to apply to SVG. Overridden by... + * @param {number} [options.width] Rasterize SVG this wide. Aspect ratio preserved if height not specified. + * @param {number} [options.height] Rasterize SVG this high. Aspect ratio preserved if width not specified. + * @param {boolean} [options.autoLoad=true] Start loading right away. + */ + var SVGResource = /*@__PURE__*/(function (BaseImageResource) { + function SVGResource(source, options) + { + options = options || {}; + + BaseImageResource.call(this, document.createElement('canvas')); + this._width = 0; + this._height = 0; + + /** + * Base64 encoded SVG element or URL for SVG file + * @readonly + * @member {string} + */ + this.svg = source; + + /** + * The source scale to apply when rasterizing on load + * @readonly + * @member {number} + */ + this.scale = options.scale || 1; + + /** + * A width override for rasterization on load + * @readonly + * @member {number} + */ + this._overrideWidth = options.width; + + /** + * A height override for rasterization on load + * @readonly + * @member {number} + */ + this._overrideHeight = options.height; + + /** + * Call when completely loaded + * @private + * @member {function} + */ + this._resolve = null; + + /** + * Cross origin value to use + * @private + * @member {boolean|string} + */ + this._crossorigin = options.crossorigin; + + /** + * Promise when loading + * @member {Promise} + * @private + * @default null + */ + this._load = null; + + if (options.autoLoad !== false) + { + this.load(); + } + } + + if ( BaseImageResource ) { SVGResource.__proto__ = BaseImageResource; } + SVGResource.prototype = Object.create( BaseImageResource && BaseImageResource.prototype ); + SVGResource.prototype.constructor = SVGResource; + + SVGResource.prototype.load = function load () + { + var this$1 = this; + + if (this._load) + { + return this._load; + } + + this._load = new Promise(function (resolve) { + // Save this until after load is finished + this$1._resolve = function () { + this$1.resize(this$1.source.width, this$1.source.height); + resolve(this$1); + }; + + // Convert SVG inline string to data-uri + if ((/^\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i; // eslint-disable-line max-len + + /** + * Resource type for HTMLVideoElement. + * @class + * @extends PIXI.resources.BaseImageResource + * @memberof PIXI.resources + * @param {HTMLVideoElement|object|string|Array} source - Video element to use. + * @param {object} [options] - Options to use + * @param {boolean} [options.autoLoad=true] - Start loading the video immediately + * @param {boolean} [options.autoPlay=true] - Start playing video immediately + * @param {number} [options.updateFPS=0] - How many times a second to update the texture from the video. + * Leave at 0 to update at every render. + * @param {boolean} [options.crossorigin=true] - Load image using cross origin + */ + var VideoResource = /*@__PURE__*/(function (BaseImageResource) { + function VideoResource(source, options) + { + options = options || {}; + + if (!(source instanceof HTMLVideoElement)) + { + var videoElement = document.createElement('video'); + + // workaround for https://github.com/pixijs/pixi.js/issues/5996 + videoElement.setAttribute('preload', 'auto'); + videoElement.setAttribute('webkit-playsinline', ''); + videoElement.setAttribute('playsinline', ''); + + if (typeof source === 'string') + { + source = [source]; + } + + BaseImageResource.crossOrigin(videoElement, (source[0].src || source[0]), options.crossorigin); + + // array of objects or strings + for (var i = 0; i < source.length; ++i) + { + var sourceElement = document.createElement('source'); + + var ref = source[i]; + var src = ref.src; + var mime = ref.mime; + + src = src || source[i]; + + var baseSrc = src.split('?').shift().toLowerCase(); + var ext = baseSrc.substr(baseSrc.lastIndexOf('.') + 1); + + mime = mime || ("video/" + ext); + + sourceElement.src = src; + sourceElement.type = mime; + + videoElement.appendChild(sourceElement); + } + + // Override the source + source = videoElement; + } + + BaseImageResource.call(this, source); + + this.noSubImage = true; + + /** + * `true` to use PIXI.Ticker.shared to auto update the base texture. + * + * @type {boolean} + * @default true + * @private + */ + this._autoUpdate = true; + + /** + * `true` if the instance is currently connected to PIXI.Ticker.shared to auto update the base texture. + * + * @type {boolean} + * @default false + * @private + */ + this._isConnectedToTicker = false; + + this._updateFPS = options.updateFPS || 0; + this._msToNextUpdate = 0; + + /** + * When set to true will automatically play videos used by this texture once + * they are loaded. If false, it will not modify the playing state. + * + * @member {boolean} + * @default true + */ + this.autoPlay = options.autoPlay !== false; + + /** + * Promise when loading + * @member {Promise} + * @private + * @default null + */ + this._load = null; + + /** + * Callback when completed with load. + * @member {function} + * @private + */ + this._resolve = null; + + // Bind for listeners + this._onCanPlay = this._onCanPlay.bind(this); + this._onError = this._onError.bind(this); + + if (options.autoLoad !== false) + { + this.load(); + } + } + + if ( BaseImageResource ) { VideoResource.__proto__ = BaseImageResource; } + VideoResource.prototype = Object.create( BaseImageResource && BaseImageResource.prototype ); + VideoResource.prototype.constructor = VideoResource; + + var prototypeAccessors = { autoUpdate: { configurable: true },updateFPS: { configurable: true } }; + + /** + * Trigger updating of the texture + * + * @param {number} [deltaTime=0] - time delta since last tick + */ + VideoResource.prototype.update = function update (deltaTime) + { + if ( deltaTime === void 0 ) { deltaTime = 0; } + + if (!this.destroyed) + { + // account for if video has had its playbackRate changed + var elapsedMS = Ticker.shared.elapsedMS * this.source.playbackRate; + + this._msToNextUpdate = Math.floor(this._msToNextUpdate - elapsedMS); + if (!this._updateFPS || this._msToNextUpdate <= 0) + { + BaseImageResource.prototype.update.call(this, deltaTime); + this._msToNextUpdate = this._updateFPS ? Math.floor(1000 / this._updateFPS) : 0; + } + } + }; + + /** + * Start preloading the video resource. + * + * @protected + * @return {Promise} Handle the validate event + */ + VideoResource.prototype.load = function load () + { + var this$1 = this; + + if (this._load) + { + return this._load; + } + + var source = this.source; + + if ((source.readyState === source.HAVE_ENOUGH_DATA || source.readyState === source.HAVE_FUTURE_DATA) + && source.width && source.height) + { + source.complete = true; + } + + source.addEventListener('play', this._onPlayStart.bind(this)); + source.addEventListener('pause', this._onPlayStop.bind(this)); + + if (!this._isSourceReady()) + { + source.addEventListener('canplay', this._onCanPlay); + source.addEventListener('canplaythrough', this._onCanPlay); + source.addEventListener('error', this._onError, true); + } + else + { + this._onCanPlay(); + } + + this._load = new Promise(function (resolve) { + if (this$1.valid) + { + resolve(this$1); + } + else + { + this$1._resolve = resolve; + + source.load(); + } + }); + + return this._load; + }; + + /** + * Handle video error events. + * + * @private + */ + VideoResource.prototype._onError = function _onError () + { + this.source.removeEventListener('error', this._onError, true); + this.onError.run(event); + }; + + /** + * Returns true if the underlying source is playing. + * + * @private + * @return {boolean} True if playing. + */ + VideoResource.prototype._isSourcePlaying = function _isSourcePlaying () + { + var source = this.source; + + return (source.currentTime > 0 && source.paused === false && source.ended === false && source.readyState > 2); + }; + + /** + * Returns true if the underlying source is ready for playing. + * + * @private + * @return {boolean} True if ready. + */ + VideoResource.prototype._isSourceReady = function _isSourceReady () + { + return this.source.readyState === 3 || this.source.readyState === 4; + }; + + /** + * Runs the update loop when the video is ready to play + * + * @private + */ + VideoResource.prototype._onPlayStart = function _onPlayStart () + { + // Just in case the video has not received its can play even yet.. + if (!this.valid) + { + this._onCanPlay(); + } + + if (this.autoUpdate && !this._isConnectedToTicker) + { + Ticker.shared.add(this.update, this); + this._isConnectedToTicker = true; + } + }; + + /** + * Fired when a pause event is triggered, stops the update loop + * + * @private + */ + VideoResource.prototype._onPlayStop = function _onPlayStop () + { + if (this._isConnectedToTicker) + { + Ticker.shared.remove(this.update, this); + this._isConnectedToTicker = false; + } + }; + + /** + * Fired when the video is loaded and ready to play + * + * @private + */ + VideoResource.prototype._onCanPlay = function _onCanPlay () + { + var ref = this; + var source = ref.source; + + source.removeEventListener('canplay', this._onCanPlay); + source.removeEventListener('canplaythrough', this._onCanPlay); + + var valid = this.valid; + + this.resize(source.videoWidth, source.videoHeight); + + // prevent multiple loaded dispatches.. + if (!valid && this._resolve) + { + this._resolve(this); + this._resolve = null; + } + + if (this._isSourcePlaying()) + { + this._onPlayStart(); + } + else if (this.autoPlay) + { + source.play(); + } + }; + + /** + * Destroys this texture + * @override + */ + VideoResource.prototype.dispose = function dispose () + { + if (this._isConnectedToTicker) + { + Ticker.shared.remove(this.update, this); + } + + if (this.source) + { + this.source.removeEventListener('error', this._onError, true); + this.source.pause(); + this.source.src = ''; + this.source.load(); + } + BaseImageResource.prototype.dispose.call(this); + }; + + /** + * Should the base texture automatically update itself, set to true by default + * + * @member {boolean} + */ + prototypeAccessors.autoUpdate.get = function () + { + return this._autoUpdate; + }; + + prototypeAccessors.autoUpdate.set = function (value) // eslint-disable-line require-jsdoc + { + if (value !== this._autoUpdate) + { + this._autoUpdate = value; + + if (!this._autoUpdate && this._isConnectedToTicker) + { + Ticker.shared.remove(this.update, this); + this._isConnectedToTicker = false; + } + else if (this._autoUpdate && !this._isConnectedToTicker && this._isSourcePlaying()) + { + Ticker.shared.add(this.update, this); + this._isConnectedToTicker = true; + } + } + }; + + /** + * How many times a second to update the texture from the video. Leave at 0 to update at every render. + * A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient. + * + * @member {number} + */ + prototypeAccessors.updateFPS.get = function () + { + return this._updateFPS; + }; + + prototypeAccessors.updateFPS.set = function (value) // eslint-disable-line require-jsdoc + { + if (value !== this._updateFPS) + { + this._updateFPS = value; + } + }; + + /** + * Used to auto-detect the type of resource. + * + * @static + * @param {*} source - The source object + * @param {string} extension - The extension of source, if set + * @return {boolean} `true` if video source + */ + VideoResource.test = function test (source, extension) + { + return (source instanceof HTMLVideoElement) + || VideoResource.TYPES.indexOf(extension) > -1; + }; + + Object.defineProperties( VideoResource.prototype, prototypeAccessors ); + + return VideoResource; + }(BaseImageResource)); + + /** + * List of common video file extensions supported by VideoResource. + * @constant + * @member {Array} + * @static + * @readonly + */ + VideoResource.TYPES = ['mp4', 'm4v', 'webm', 'ogg', 'ogv', 'h264', 'avi', 'mov']; + + /** + * Resource type for ImageBitmap. + * @class + * @extends PIXI.resources.BaseImageResource + * @memberof PIXI.resources + * @param {ImageBitmap} source - Image element to use + */ + var ImageBitmapResource = /*@__PURE__*/(function (BaseImageResource) { + function ImageBitmapResource () { + BaseImageResource.apply(this, arguments); + } + + if ( BaseImageResource ) { ImageBitmapResource.__proto__ = BaseImageResource; } + ImageBitmapResource.prototype = Object.create( BaseImageResource && BaseImageResource.prototype ); + ImageBitmapResource.prototype.constructor = ImageBitmapResource; + + ImageBitmapResource.test = function test (source) + { + return !!window.createImageBitmap && source instanceof ImageBitmap; + }; + + return ImageBitmapResource; + }(BaseImageResource)); + + INSTALLED.push( + ImageResource, + ImageBitmapResource, + CanvasResource, + VideoResource, + SVGResource, + BufferResource, + CubeResource, + ArrayResource + ); + + var index = ({ + INSTALLED: INSTALLED, + autoDetectResource: autoDetectResource, + ArrayResource: ArrayResource, + BufferResource: BufferResource, + CanvasResource: CanvasResource, + CubeResource: CubeResource, + ImageResource: ImageResource, + ImageBitmapResource: ImageBitmapResource, + SVGResource: SVGResource, + VideoResource: VideoResource, + Resource: Resource, + BaseImageResource: BaseImageResource + }); + + /** + * System is a base class used for extending systems used by the {@link PIXI.Renderer} + * + * @see PIXI.Renderer#addSystem + * @class + * @memberof PIXI + */ + var System = function System(renderer) + { + /** + * The renderer this manager works for. + * + * @member {PIXI.Renderer} + */ + this.renderer = renderer; + }; + + /** + * Generic destroy methods to be overridden by the subclass + */ + System.prototype.destroy = function destroy () + { + this.renderer = null; + }; + + /** + * Resource type for DepthTexture. + * @class + * @extends PIXI.resources.BufferResource + * @memberof PIXI.resources + */ + var DepthResource = /*@__PURE__*/(function (BufferResource) { + function DepthResource () { + BufferResource.apply(this, arguments); + } + + if ( BufferResource ) { DepthResource.__proto__ = BufferResource; } + DepthResource.prototype = Object.create( BufferResource && BufferResource.prototype ); + DepthResource.prototype.constructor = DepthResource; + + DepthResource.prototype.upload = function upload (renderer, baseTexture, glTexture) + { + var gl = renderer.gl; + + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.alphaMode === exports.ALPHA_MODES.UNPACK); + + if (glTexture.width === baseTexture.width && glTexture.height === baseTexture.height) + { + gl.texSubImage2D( + baseTexture.target, + 0, + 0, + 0, + baseTexture.width, + baseTexture.height, + baseTexture.format, + baseTexture.type, + this.data + ); + } + else + { + glTexture.width = baseTexture.width; + glTexture.height = baseTexture.height; + + gl.texImage2D( + baseTexture.target, + 0, + // gl.DEPTH_COMPONENT16 Needed for depth to render properly in webgl2.0 + renderer.context.webGLVersion === 1 ? gl.DEPTH_COMPONENT : gl.DEPTH_COMPONENT16, + baseTexture.width, + baseTexture.height, + 0, + baseTexture.format, + baseTexture.type, + this.data + ); + } + + return true; + }; + + return DepthResource; + }(BufferResource)); + + /** + * Frame buffer used by the BaseRenderTexture + * + * @class + * @memberof PIXI + */ + var Framebuffer = function Framebuffer(width, height) + { + this.width = Math.ceil(width || 100); + this.height = Math.ceil(height || 100); + + this.stencil = false; + this.depth = false; + + this.dirtyId = 0; + this.dirtyFormat = 0; + this.dirtySize = 0; + + this.depthTexture = null; + this.colorTextures = []; + + this.glFramebuffers = {}; + + this.disposeRunner = new Runner('disposeFramebuffer', 2); + }; + + var prototypeAccessors$1$1 = { colorTexture: { configurable: true } }; + + /** + * Reference to the colorTexture. + * + * @member {PIXI.Texture[]} + * @readonly + */ + prototypeAccessors$1$1.colorTexture.get = function () + { + return this.colorTextures[0]; + }; + + /** + * Add texture to the colorTexture array + * + * @param {number} [index=0] - Index of the array to add the texture to + * @param {PIXI.Texture} [texture] - Texture to add to the array + */ + Framebuffer.prototype.addColorTexture = function addColorTexture (index, texture) + { + if ( index === void 0 ) { index = 0; } + + // TODO add some validation to the texture - same width / height etc? + this.colorTextures[index] = texture || new BaseTexture(null, { + scaleMode: exports.SCALE_MODES.NEAREST, + resolution: 1, + mipmap: false, + width: this.width, + height: this.height, + }); + + this.dirtyId++; + this.dirtyFormat++; + + return this; + }; + + /** + * Add a depth texture to the frame buffer + * + * @param {PIXI.Texture} [texture] - Texture to add + */ + Framebuffer.prototype.addDepthTexture = function addDepthTexture (texture) + { + /* eslint-disable max-len */ + this.depthTexture = texture || new BaseTexture(new DepthResource(null, { width: this.width, height: this.height }), { + scaleMode: exports.SCALE_MODES.NEAREST, + resolution: 1, + width: this.width, + height: this.height, + mipmap: false, + format: exports.FORMATS.DEPTH_COMPONENT, + type: exports.TYPES.UNSIGNED_SHORT, + }); + + this.dirtyId++; + this.dirtyFormat++; + + return this; + }; + + /** + * Enable depth on the frame buffer + */ + Framebuffer.prototype.enableDepth = function enableDepth () + { + this.depth = true; + + this.dirtyId++; + this.dirtyFormat++; + + return this; + }; + + /** + * Enable stencil on the frame buffer + */ + Framebuffer.prototype.enableStencil = function enableStencil () + { + this.stencil = true; + + this.dirtyId++; + this.dirtyFormat++; + + return this; + }; + + /** + * Resize the frame buffer + * + * @param {number} width - Width of the frame buffer to resize to + * @param {number} height - Height of the frame buffer to resize to + */ + Framebuffer.prototype.resize = function resize (width, height) + { + width = Math.ceil(width); + height = Math.ceil(height); + + if (width === this.width && height === this.height) { return; } + + this.width = width; + this.height = height; + + this.dirtyId++; + this.dirtySize++; + + for (var i = 0; i < this.colorTextures.length; i++) + { + var texture = this.colorTextures[i]; + var resolution = texture.resolution; + + // take into acount the fact the texture may have a different resolution.. + texture.setSize(width / resolution, height / resolution); + } + + if (this.depthTexture) + { + var resolution$1 = this.depthTexture.resolution; + + this.depthTexture.setSize(width / resolution$1, height / resolution$1); + } + }; + + /** + * disposes WebGL resources that are connected to this geometry + */ + Framebuffer.prototype.dispose = function dispose () + { + this.disposeRunner.run(this, false); + }; + + Object.defineProperties( Framebuffer.prototype, prototypeAccessors$1$1 ); + + /** + * A BaseRenderTexture is a special texture that allows any PixiJS display object to be rendered to it. + * + * __Hint__: All DisplayObjects (i.e. Sprites) that render to a BaseRenderTexture should be preloaded + * otherwise black rectangles will be drawn instead. + * + * A BaseRenderTexture takes a snapshot of any Display Object given to its render method. The position + * and rotation of the given Display Objects is ignored. For example: + * + * ```js + * let renderer = PIXI.autoDetectRenderer(); + * let baseRenderTexture = new PIXI.BaseRenderTexture({ width: 800, height: 600 }); + * let renderTexture = new PIXI.RenderTexture(baseRenderTexture); + * let sprite = PIXI.Sprite.from("spinObj_01.png"); + * + * sprite.position.x = 800/2; + * sprite.position.y = 600/2; + * sprite.anchor.x = 0.5; + * sprite.anchor.y = 0.5; + * + * renderer.render(sprite, renderTexture); + * ``` + * + * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0 + * you can clear the transform + * + * ```js + * + * sprite.setTransform() + * + * let baseRenderTexture = new PIXI.BaseRenderTexture({ width: 100, height: 100 }); + * let renderTexture = new PIXI.RenderTexture(baseRenderTexture); + * + * renderer.render(sprite, renderTexture); // Renders to center of RenderTexture + * ``` + * + * @class + * @extends PIXI.BaseTexture + * @memberof PIXI + */ + var BaseRenderTexture = /*@__PURE__*/(function (BaseTexture) { + function BaseRenderTexture(options) + { + if (typeof options === 'number') + { + /* eslint-disable prefer-rest-params */ + // Backward compatibility of signature + var width$1 = arguments[0]; + var height$1 = arguments[1]; + var scaleMode = arguments[2]; + var resolution = arguments[3]; + + options = { width: width$1, height: height$1, scaleMode: scaleMode, resolution: resolution }; + /* eslint-enable prefer-rest-params */ + } + + BaseTexture.call(this, null, options); + + var ref = options || {}; + var width = ref.width; + var height = ref.height; + + // Set defaults + this.mipmap = false; + this.width = Math.ceil(width) || 100; + this.height = Math.ceil(height) || 100; + this.valid = true; + + /** + * A reference to the canvas render target (we only need one as this can be shared across renderers) + * + * @protected + * @member {object} + */ + this._canvasRenderTarget = null; + + this.clearColor = [0, 0, 0, 0]; + + this.framebuffer = new Framebuffer(this.width * this.resolution, this.height * this.resolution) + .addColorTexture(0, this); + + // TODO - could this be added the systems? + + /** + * The data structure for the stencil masks. + * + * @member {PIXI.MaskData[]} + */ + this.maskStack = []; + + /** + * The data structure for the filters. + * + * @member {Object[]} + */ + this.filterStack = [{}]; + } + + if ( BaseTexture ) { BaseRenderTexture.__proto__ = BaseTexture; } + BaseRenderTexture.prototype = Object.create( BaseTexture && BaseTexture.prototype ); + BaseRenderTexture.prototype.constructor = BaseRenderTexture; + + /** + * Resizes the BaseRenderTexture. + * + * @param {number} width - The width to resize to. + * @param {number} height - The height to resize to. + */ + BaseRenderTexture.prototype.resize = function resize (width, height) + { + width = Math.ceil(width); + height = Math.ceil(height); + this.framebuffer.resize(width * this.resolution, height * this.resolution); + }; + + /** + * Frees the texture and framebuffer from WebGL memory without destroying this texture object. + * This means you can still use the texture later which will upload it to GPU + * memory again. + * + * @fires PIXI.BaseTexture#dispose + */ + BaseRenderTexture.prototype.dispose = function dispose () + { + this.framebuffer.dispose(); + + BaseTexture.prototype.dispose.call(this); + }; + + /** + * Destroys this texture. + * + */ + BaseRenderTexture.prototype.destroy = function destroy () + { + BaseTexture.prototype.destroy.call(this, true); + + this.framebuffer = null; + }; + + return BaseRenderTexture; + }(BaseTexture)); + + /** + * Stores a texture's frame in UV coordinates, in + * which everything lies in the rectangle `[(0,0), (1,0), + * (1,1), (0,1)]`. + * + * | Corner | Coordinates | + * |--------------|-------------| + * | Top-Left | `(x0,y0)` | + * | Top-Right | `(x1,y1)` | + * | Bottom-Right | `(x2,y2)` | + * | Bottom-Left | `(x3,y3)` | + * + * @class + * @protected + * @memberof PIXI + */ + var TextureUvs = function TextureUvs() + { + /** + * X-component of top-left corner `(x0,y0)`. + * + * @member {number} + */ + this.x0 = 0; + + /** + * Y-component of top-left corner `(x0,y0)`. + * + * @member {number} + */ + this.y0 = 0; + + /** + * X-component of top-right corner `(x1,y1)`. + * + * @member {number} + */ + this.x1 = 1; + + /** + * Y-component of top-right corner `(x1,y1)`. + * + * @member {number} + */ + this.y1 = 0; + + /** + * X-component of bottom-right corner `(x2,y2)`. + * + * @member {number} + */ + this.x2 = 1; + + /** + * Y-component of bottom-right corner `(x2,y2)`. + * + * @member {number} + */ + this.y2 = 1; + + /** + * X-component of bottom-left corner `(x3,y3)`. + * + * @member {number} + */ + this.x3 = 0; + + /** + * Y-component of bottom-right corner `(x3,y3)`. + * + * @member {number} + */ + this.y3 = 1; + + this.uvsFloat32 = new Float32Array(8); + }; + + /** + * Sets the texture Uvs based on the given frame information. + * + * @protected + * @param {PIXI.Rectangle} frame - The frame of the texture + * @param {PIXI.Rectangle} baseFrame - The base frame of the texture + * @param {number} rotate - Rotation of frame, see {@link PIXI.groupD8} + */ + TextureUvs.prototype.set = function set (frame, baseFrame, rotate) + { + var tw = baseFrame.width; + var th = baseFrame.height; + + if (rotate) + { + // width and height div 2 div baseFrame size + var w2 = frame.width / 2 / tw; + var h2 = frame.height / 2 / th; + + // coordinates of center + var cX = (frame.x / tw) + w2; + var cY = (frame.y / th) + h2; + + rotate = groupD8.add(rotate, groupD8.NW); // NW is top-left corner + this.x0 = cX + (w2 * groupD8.uX(rotate)); + this.y0 = cY + (h2 * groupD8.uY(rotate)); + + rotate = groupD8.add(rotate, 2); // rotate 90 degrees clockwise + this.x1 = cX + (w2 * groupD8.uX(rotate)); + this.y1 = cY + (h2 * groupD8.uY(rotate)); + + rotate = groupD8.add(rotate, 2); + this.x2 = cX + (w2 * groupD8.uX(rotate)); + this.y2 = cY + (h2 * groupD8.uY(rotate)); + + rotate = groupD8.add(rotate, 2); + this.x3 = cX + (w2 * groupD8.uX(rotate)); + this.y3 = cY + (h2 * groupD8.uY(rotate)); + } + else + { + this.x0 = frame.x / tw; + this.y0 = frame.y / th; + + this.x1 = (frame.x + frame.width) / tw; + this.y1 = frame.y / th; + + this.x2 = (frame.x + frame.width) / tw; + this.y2 = (frame.y + frame.height) / th; + + this.x3 = frame.x / tw; + this.y3 = (frame.y + frame.height) / th; + } + + this.uvsFloat32[0] = this.x0; + this.uvsFloat32[1] = this.y0; + this.uvsFloat32[2] = this.x1; + this.uvsFloat32[3] = this.y1; + this.uvsFloat32[4] = this.x2; + this.uvsFloat32[5] = this.y2; + this.uvsFloat32[6] = this.x3; + this.uvsFloat32[7] = this.y3; + }; + + var DEFAULT_UVS = new TextureUvs(); + + /** + * A texture stores the information that represents an image or part of an image. + * + * It cannot be added to the display list directly; instead use it as the texture for a Sprite. + * If no frame is provided for a texture, then the whole image is used. + * + * You can directly create a texture from an image and then reuse it multiple times like this : + * + * ```js + * let texture = PIXI.Texture.from('assets/image.png'); + * let sprite1 = new PIXI.Sprite(texture); + * let sprite2 = new PIXI.Sprite(texture); + * ``` + * + * If you didnt pass the texture frame to constructor, it enables `noFrame` mode: + * it subscribes on baseTexture events, it automatically resizes at the same time as baseTexture. + * + * Textures made from SVGs, loaded or not, cannot be used before the file finishes processing. + * You can check for this by checking the sprite's _textureID property. + * ```js + * var texture = PIXI.Texture.from('assets/image.svg'); + * var sprite1 = new PIXI.Sprite(texture); + * //sprite1._textureID should not be undefined if the texture has finished processing the SVG file + * ``` + * You can use a ticker or rAF to ensure your sprites load the finished textures after processing. See issue #3068. + * + * @class + * @extends PIXI.utils.EventEmitter + * @memberof PIXI + */ + var Texture = /*@__PURE__*/(function (EventEmitter) { + function Texture(baseTexture, frame, orig, trim, rotate, anchor) + { + EventEmitter.call(this); + + /** + * Does this Texture have any frame data assigned to it? + * + * This mode is enabled automatically if no frame was passed inside constructor. + * + * In this mode texture is subscribed to baseTexture events, and fires `update` on any change. + * + * Beware, after loading or resize of baseTexture event can fired two times! + * If you want more control, subscribe on baseTexture itself. + * + * ```js + * texture.on('update', () => {}); + * ``` + * + * Any assignment of `frame` switches off `noFrame` mode. + * + * @member {boolean} + */ + this.noFrame = false; + + if (!frame) + { + this.noFrame = true; + frame = new Rectangle(0, 0, 1, 1); + } + + if (baseTexture instanceof Texture) + { + baseTexture = baseTexture.baseTexture; + } + + /** + * The base texture that this texture uses. + * + * @member {PIXI.BaseTexture} + */ + this.baseTexture = baseTexture; + + /** + * This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering, + * irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases) + * + * @member {PIXI.Rectangle} + */ + this._frame = frame; + + /** + * This is the trimmed area of original texture, before it was put in atlas + * Please call `updateUvs()` after you change coordinates of `trim` manually. + * + * @member {PIXI.Rectangle} + */ + this.trim = trim; + + /** + * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered. + * + * @member {boolean} + */ + this.valid = false; + + /** + * This will let a renderer know that a texture has been updated (used mainly for WebGL uv updates) + * + * @member {boolean} + */ + this.requiresUpdate = false; + + /** + * The WebGL UV data cache. Can be used as quad UV + * + * @member {PIXI.TextureUvs} + * @protected + */ + this._uvs = DEFAULT_UVS; + + /** + * Default TextureMatrix instance for this texture + * By default that object is not created because its heavy + * + * @member {PIXI.TextureMatrix} + */ + this.uvMatrix = null; + + /** + * This is the area of original texture, before it was put in atlas + * + * @member {PIXI.Rectangle} + */ + this.orig = orig || frame;// new Rectangle(0, 0, 1, 1); + + this._rotate = Number(rotate || 0); + + if (rotate === true) + { + // this is old texturepacker legacy, some games/libraries are passing "true" for rotated textures + this._rotate = 2; + } + else if (this._rotate % 2 !== 0) + { + throw new Error('attempt to use diamond-shaped UVs. If you are sure, set rotation manually'); + } + + /** + * Anchor point that is used as default if sprite is created with this texture. + * Changing the `defaultAnchor` at a later point of time will not update Sprite's anchor point. + * @member {PIXI.Point} + * @default {0,0} + */ + this.defaultAnchor = anchor ? new Point(anchor.x, anchor.y) : new Point(0, 0); + + /** + * Update ID is observed by sprites and TextureMatrix instances. + * Call updateUvs() to increment it. + * + * @member {number} + * @protected + */ + + this._updateID = 0; + + /** + * The ids under which this Texture has been added to the texture cache. This is + * automatically set as long as Texture.addToCache is used, but may not be set if a + * Texture is added directly to the TextureCache array. + * + * @member {string[]} + */ + this.textureCacheIds = []; + + if (!baseTexture.valid) + { + baseTexture.once('loaded', this.onBaseTextureUpdated, this); + } + else if (this.noFrame) + { + // if there is no frame we should monitor for any base texture changes.. + if (baseTexture.valid) + { + this.onBaseTextureUpdated(baseTexture); + } + } + else + { + this.frame = frame; + } + + if (this.noFrame) + { + baseTexture.on('update', this.onBaseTextureUpdated, this); + } + } + + if ( EventEmitter ) { Texture.__proto__ = EventEmitter; } + Texture.prototype = Object.create( EventEmitter && EventEmitter.prototype ); + Texture.prototype.constructor = Texture; + + var prototypeAccessors = { resolution: { configurable: true },frame: { configurable: true },rotate: { configurable: true },width: { configurable: true },height: { configurable: true } }; + + /** + * Updates this texture on the gpu. + * + * Calls the TextureResource update. + * + * If you adjusted `frame` manually, please call `updateUvs()` instead. + * + */ + Texture.prototype.update = function update () + { + if (this.baseTexture.resource) + { + this.baseTexture.resource.update(); + } + }; + + /** + * Called when the base texture is updated + * + * @protected + * @param {PIXI.BaseTexture} baseTexture - The base texture. + */ + Texture.prototype.onBaseTextureUpdated = function onBaseTextureUpdated (baseTexture) + { + if (this.noFrame) + { + if (!this.baseTexture.valid) + { + return; + } + + this._frame.width = baseTexture.width; + this._frame.height = baseTexture.height; + this.valid = true; + this.updateUvs(); + } + else + { + // TODO this code looks confusing.. boo to abusing getters and setters! + // if user gave us frame that has bigger size than resized texture it can be a problem + this.frame = this._frame; + } + + this.emit('update', this); + }; + + /** + * Destroys this texture + * + * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well + */ + Texture.prototype.destroy = function destroy (destroyBase) + { + if (this.baseTexture) + { + if (destroyBase) + { + var ref = this.baseTexture; + var resource = ref.resource; + + // delete the texture if it exists in the texture cache.. + // this only needs to be removed if the base texture is actually destroyed too.. + if (resource && TextureCache[resource.url]) + { + Texture.removeFromCache(resource.url); + } + + this.baseTexture.destroy(); + } + + this.baseTexture.off('loaded', this.onBaseTextureUpdated, this); + this.baseTexture.off('update', this.onBaseTextureUpdated, this); + + this.baseTexture = null; + } + + this._frame = null; + this._uvs = null; + this.trim = null; + this.orig = null; + + this.valid = false; + + Texture.removeFromCache(this); + this.textureCacheIds = null; + }; + + /** + * Creates a new texture object that acts the same as this one. + * + * @return {PIXI.Texture} The new texture + */ + Texture.prototype.clone = function clone () + { + return new Texture(this.baseTexture, + this.frame.clone(), + this.orig.clone(), + this.trim && this.trim.clone(), + this.rotate, + this.defaultAnchor + ); + }; + + /** + * Updates the internal WebGL UV cache. Use it after you change `frame` or `trim` of the texture. + * Call it after changing the frame + */ + Texture.prototype.updateUvs = function updateUvs () + { + if (this._uvs === DEFAULT_UVS) + { + this._uvs = new TextureUvs(); + } + + this._uvs.set(this._frame, this.baseTexture, this.rotate); + + this._updateID++; + }; + + /** + * Helper function that creates a new Texture based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * + * @static + * @param {string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|PIXI.BaseTexture} source + * Source to create texture from + * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options. + * @param {boolean} [strict] Enforce strict-mode, see {@link PIXI.settings.STRICT_TEXTURE_CACHE}. + * @return {PIXI.Texture} The newly created texture + */ + Texture.from = function from (source, options, strict) + { + if ( options === void 0 ) { options = {}; } + if ( strict === void 0 ) { strict = settings.STRICT_TEXTURE_CACHE; } + + var isFrame = typeof source === 'string'; + var cacheId = null; + + if (isFrame) + { + cacheId = source; + } + else + { + if (!source._pixiId) + { + source._pixiId = "pixiid_" + (uid()); + } + + cacheId = source._pixiId; + } + + var texture = TextureCache[cacheId]; + + // Strict-mode rejects invalid cacheIds + if (isFrame && strict && !texture) + { + throw new Error(("The cacheId \"" + cacheId + "\" does not exist in TextureCache.")); + } + + if (!texture) + { + if (!options.resolution) + { + options.resolution = getResolutionOfUrl(source); + } + + texture = new Texture(new BaseTexture(source, options)); + texture.baseTexture.cacheId = cacheId; + + BaseTexture.addToCache(texture.baseTexture, cacheId); + Texture.addToCache(texture, cacheId); + } + + // lets assume its a base texture! + return texture; + }; + + /** + * Create a new Texture with a BufferResource from a Float32Array. + * RGBA values are floats from 0 to 1. + * @static + * @param {Float32Array|Uint8Array} buffer The optional array to use, if no data + * is provided, a new Float32Array is created. + * @param {number} width - Width of the resource + * @param {number} height - Height of the resource + * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options. + * @return {PIXI.Texture} The resulting new BaseTexture + */ + Texture.fromBuffer = function fromBuffer (buffer, width, height, options) + { + return new Texture(BaseTexture.fromBuffer(buffer, width, height, options)); + }; + + /** + * Create a texture from a source and add to the cache. + * + * @static + * @param {HTMLImageElement|HTMLCanvasElement} source - The input source. + * @param {String} imageUrl - File name of texture, for cache and resolving resolution. + * @param {String} [name] - Human readable name for the texture cache. If no name is + * specified, only `imageUrl` will be used as the cache ID. + * @return {PIXI.Texture} Output texture + */ + Texture.fromLoader = function fromLoader (source, imageUrl, name) + { + var resource = new ImageResource(source); + + resource.url = imageUrl; + + var baseTexture = new BaseTexture(resource, { + scaleMode: settings.SCALE_MODE, + resolution: getResolutionOfUrl(imageUrl), + }); + + var texture = new Texture(baseTexture); + + // No name, use imageUrl instead + if (!name) + { + name = imageUrl; + } + + // lets also add the frame to pixi's global cache for 'fromLoader' function + BaseTexture.addToCache(texture.baseTexture, name); + Texture.addToCache(texture, name); + + // also add references by url if they are different. + if (name !== imageUrl) + { + BaseTexture.addToCache(texture.baseTexture, imageUrl); + Texture.addToCache(texture, imageUrl); + } + + return texture; + }; + + /** + * Adds a Texture to the global TextureCache. This cache is shared across the whole PIXI object. + * + * @static + * @param {PIXI.Texture} texture - The Texture to add to the cache. + * @param {string} id - The id that the Texture will be stored against. + */ + Texture.addToCache = function addToCache (texture, id) + { + if (id) + { + if (texture.textureCacheIds.indexOf(id) === -1) + { + texture.textureCacheIds.push(id); + } + + if (TextureCache[id]) + { + // eslint-disable-next-line no-console + console.warn(("Texture added to the cache with an id [" + id + "] that already had an entry")); + } + + TextureCache[id] = texture; + } + }; + + /** + * Remove a Texture from the global TextureCache. + * + * @static + * @param {string|PIXI.Texture} texture - id of a Texture to be removed, or a Texture instance itself + * @return {PIXI.Texture|null} The Texture that was removed + */ + Texture.removeFromCache = function removeFromCache (texture) + { + if (typeof texture === 'string') + { + var textureFromCache = TextureCache[texture]; + + if (textureFromCache) + { + var index = textureFromCache.textureCacheIds.indexOf(texture); + + if (index > -1) + { + textureFromCache.textureCacheIds.splice(index, 1); + } + + delete TextureCache[texture]; + + return textureFromCache; + } + } + else if (texture && texture.textureCacheIds) + { + for (var i = 0; i < texture.textureCacheIds.length; ++i) + { + // Check that texture matches the one being passed in before deleting it from the cache. + if (TextureCache[texture.textureCacheIds[i]] === texture) + { + delete TextureCache[texture.textureCacheIds[i]]; + } + } + + texture.textureCacheIds.length = 0; + + return texture; + } + + return null; + }; + + /** + * Returns resolution of baseTexture + * + * @member {number} + * @readonly + */ + prototypeAccessors.resolution.get = function () + { + return this.baseTexture.resolution; + }; + + /** + * The frame specifies the region of the base texture that this texture uses. + * Please call `updateUvs()` after you change coordinates of `frame` manually. + * + * @member {PIXI.Rectangle} + */ + prototypeAccessors.frame.get = function () + { + return this._frame; + }; + + prototypeAccessors.frame.set = function (frame) // eslint-disable-line require-jsdoc + { + this._frame = frame; + + this.noFrame = false; + + var x = frame.x; + var y = frame.y; + var width = frame.width; + var height = frame.height; + var xNotFit = x + width > this.baseTexture.width; + var yNotFit = y + height > this.baseTexture.height; + + if (xNotFit || yNotFit) + { + var relationship = xNotFit && yNotFit ? 'and' : 'or'; + var errorX = "X: " + x + " + " + width + " = " + (x + width) + " > " + (this.baseTexture.width); + var errorY = "Y: " + y + " + " + height + " = " + (y + height) + " > " + (this.baseTexture.height); + + throw new Error('Texture Error: frame does not fit inside the base Texture dimensions: ' + + errorX + " " + relationship + " " + errorY); + } + + this.valid = width && height && this.baseTexture.valid; + + if (!this.trim && !this.rotate) + { + this.orig = frame; + } + + if (this.valid) + { + this.updateUvs(); + } + }; + + /** + * Indicates whether the texture is rotated inside the atlas + * set to 2 to compensate for texture packer rotation + * set to 6 to compensate for spine packer rotation + * can be used to rotate or mirror sprites + * See {@link PIXI.groupD8} for explanation + * + * @member {number} + */ + prototypeAccessors.rotate.get = function () + { + return this._rotate; + }; + + prototypeAccessors.rotate.set = function (rotate) // eslint-disable-line require-jsdoc + { + this._rotate = rotate; + if (this.valid) + { + this.updateUvs(); + } + }; + + /** + * The width of the Texture in pixels. + * + * @member {number} + */ + prototypeAccessors.width.get = function () + { + return this.orig.width; + }; + + /** + * The height of the Texture in pixels. + * + * @member {number} + */ + prototypeAccessors.height.get = function () + { + return this.orig.height; + }; + + Object.defineProperties( Texture.prototype, prototypeAccessors ); + + return Texture; + }(eventemitter3)); + + function createWhiteTexture() + { + var canvas = document.createElement('canvas'); + + canvas.width = 16; + canvas.height = 16; + + var context = canvas.getContext('2d'); + + context.fillStyle = 'white'; + context.fillRect(0, 0, 16, 16); + + return new Texture(new BaseTexture(new CanvasResource(canvas))); + } + + function removeAllHandlers(tex) + { + tex.destroy = function _emptyDestroy() { /* empty */ }; + tex.on = function _emptyOn() { /* empty */ }; + tex.once = function _emptyOnce() { /* empty */ }; + tex.emit = function _emptyEmit() { /* empty */ }; + } + + /** + * An empty texture, used often to not have to create multiple empty textures. + * Can not be destroyed. + * + * @static + * @constant + * @member {PIXI.Texture} + */ + Texture.EMPTY = new Texture(new BaseTexture()); + removeAllHandlers(Texture.EMPTY); + removeAllHandlers(Texture.EMPTY.baseTexture); + + /** + * A white texture of 16x16 size, used for graphics and other things + * Can not be destroyed. + * + * @static + * @constant + * @member {PIXI.Texture} + */ + Texture.WHITE = createWhiteTexture(); + removeAllHandlers(Texture.WHITE); + removeAllHandlers(Texture.WHITE.baseTexture); + + /** + * A RenderTexture is a special texture that allows any PixiJS display object to be rendered to it. + * + * __Hint__: All DisplayObjects (i.e. Sprites) that render to a RenderTexture should be preloaded + * otherwise black rectangles will be drawn instead. + * + * __Hint-2__: The actual memory allocation will happen on first render. + * You shouldn't create renderTextures each frame just to delete them after, try to reuse them. + * + * A RenderTexture takes a snapshot of any Display Object given to its render method. For example: + * + * ```js + * let renderer = PIXI.autoDetectRenderer(); + * let renderTexture = PIXI.RenderTexture.create({ width: 800, height: 600 }); + * let sprite = PIXI.Sprite.from("spinObj_01.png"); + * + * sprite.position.x = 800/2; + * sprite.position.y = 600/2; + * sprite.anchor.x = 0.5; + * sprite.anchor.y = 0.5; + * + * renderer.render(sprite, renderTexture); + * ``` + * + * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0 + * you can clear the transform + * + * ```js + * + * sprite.setTransform() + * + * let renderTexture = new PIXI.RenderTexture.create(100, 100); + * + * renderer.render(sprite, renderTexture); // Renders to center of RenderTexture + * ``` + * + * @class + * @extends PIXI.Texture + * @memberof PIXI + */ + var RenderTexture = /*@__PURE__*/(function (Texture) { + function RenderTexture(baseRenderTexture, frame) + { + // support for legacy.. + var _legacyRenderer = null; + + if (!(baseRenderTexture instanceof BaseRenderTexture)) + { + /* eslint-disable prefer-rest-params, no-console */ + var width = arguments[1]; + var height = arguments[2]; + var scaleMode = arguments[3]; + var resolution = arguments[4]; + + // we have an old render texture.. + console.warn(("Please use RenderTexture.create(" + width + ", " + height + ") instead of the ctor directly.")); + _legacyRenderer = arguments[0]; + /* eslint-enable prefer-rest-params, no-console */ + + frame = null; + baseRenderTexture = new BaseRenderTexture({ + width: width, + height: height, + scaleMode: scaleMode, + resolution: resolution, + }); + } + + /** + * The base texture object that this texture uses + * + * @member {PIXI.BaseTexture} + */ + Texture.call(this, baseRenderTexture, frame); + + this.legacyRenderer = _legacyRenderer; + + /** + * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered. + * + * @member {boolean} + */ + this.valid = true; + + /** + * Stores `sourceFrame` when this texture is inside current filter stack. + * You can read it inside filters. + * + * @readonly + * @member {PIXI.Rectangle} + */ + this.filterFrame = null; + + /** + * The key for pooled texture of FilterSystem + * @protected + * @member {string} + */ + this.filterPoolKey = null; + + this.updateUvs(); + } + + if ( Texture ) { RenderTexture.__proto__ = Texture; } + RenderTexture.prototype = Object.create( Texture && Texture.prototype ); + RenderTexture.prototype.constructor = RenderTexture; + + /** + * Resizes the RenderTexture. + * + * @param {number} width - The width to resize to. + * @param {number} height - The height to resize to. + * @param {boolean} [resizeBaseTexture=true] - Should the baseTexture.width and height values be resized as well? + */ + RenderTexture.prototype.resize = function resize (width, height, resizeBaseTexture) + { + if ( resizeBaseTexture === void 0 ) { resizeBaseTexture = true; } + + width = Math.ceil(width); + height = Math.ceil(height); + + // TODO - could be not required.. + this.valid = (width > 0 && height > 0); + + this._frame.width = this.orig.width = width; + this._frame.height = this.orig.height = height; + + if (resizeBaseTexture) + { + this.baseTexture.resize(width, height); + } + + this.updateUvs(); + }; + + /** + * Changes the resolution of baseTexture, but does not change framebuffer size. + * + * @param {number} resolution - The new resolution to apply to RenderTexture + */ + RenderTexture.prototype.setResolution = function setResolution (resolution) + { + var ref = this; + var baseTexture = ref.baseTexture; + + if (baseTexture.resolution === resolution) + { + return; + } + + baseTexture.setResolution(resolution); + this.resize(baseTexture.width, baseTexture.height, false); + }; + + /** + * A short hand way of creating a render texture. + * + * @param {object} [options] - Options + * @param {number} [options.width=100] - The width of the render texture + * @param {number} [options.height=100] - The height of the render texture + * @param {number} [options.scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the texture being generated + * @return {PIXI.RenderTexture} The new render texture + */ + RenderTexture.create = function create (options) + { + // fallback, old-style: create(width, height, scaleMode, resolution) + if (typeof options === 'number') + { + /* eslint-disable prefer-rest-params */ + options = { + width: options, + height: arguments[1], + scaleMode: arguments[2], + resolution: arguments[3], + }; + /* eslint-enable prefer-rest-params */ + } + + return new RenderTexture(new BaseRenderTexture(options)); + }; + + return RenderTexture; + }(Texture)); + + /** + * Experimental! + * + * Texture pool, used by FilterSystem and plugins + * Stores collection of temporary pow2 or screen-sized renderTextures + * + * If you use custom RenderTexturePool for your filters, you can use methods + * `getFilterTexture` and `returnFilterTexture` same as in + * + * @class + * @memberof PIXI + */ + var RenderTexturePool = function RenderTexturePool(textureOptions) + { + this.texturePool = {}; + this.textureOptions = textureOptions || {}; + /** + * Allow renderTextures of the same size as screen, not just pow2 + * + * Automatically sets to true after `setScreenSize` + * + * @member {boolean} + * @default false + */ + this.enableFullScreen = false; + + this._pixelsWidth = 0; + this._pixelsHeight = 0; + }; + + /** + * creates of texture with params that were specified in pool constructor + * + * @param {number} realWidth width of texture in pixels + * @param {number} realHeight height of texture in pixels + * @returns {RenderTexture} + */ + RenderTexturePool.prototype.createTexture = function createTexture (realWidth, realHeight) + { + var baseRenderTexture = new BaseRenderTexture(Object.assign({ + width: realWidth, + height: realHeight, + resolution: 1, + }, this.textureOptions)); + + return new RenderTexture(baseRenderTexture); + }; + + /** + * Gets a Power-of-Two render texture or fullScreen texture + * + * @protected + * @param {number} minWidth - The minimum width of the render texture in real pixels. + * @param {number} minHeight - The minimum height of the render texture in real pixels. + * @param {number} [resolution=1] - The resolution of the render texture. + * @return {PIXI.RenderTexture} The new render texture. + */ + RenderTexturePool.prototype.getOptimalTexture = function getOptimalTexture (minWidth, minHeight, resolution) + { + if ( resolution === void 0 ) { resolution = 1; } + + var key = RenderTexturePool.SCREEN_KEY; + + minWidth *= resolution; + minHeight *= resolution; + + if (!this.enableFullScreen || minWidth !== this._pixelsWidth || minHeight !== this._pixelsHeight) + { + minWidth = nextPow2(minWidth); + minHeight = nextPow2(minHeight); + key = ((minWidth & 0xFFFF) << 16) | (minHeight & 0xFFFF); + } + + if (!this.texturePool[key]) + { + this.texturePool[key] = []; + } + + var renderTexture = this.texturePool[key].pop(); + + if (!renderTexture) + { + renderTexture = this.createTexture(minWidth, minHeight); + } + + renderTexture.filterPoolKey = key; + renderTexture.setResolution(resolution); + + return renderTexture; + }; + + /** + * Gets extra texture of the same size as input renderTexture + * + * `getFilterTexture(input, 0.5)` or `getFilterTexture(0.5, input)` + * + * @param {PIXI.RenderTexture} input renderTexture from which size and resolution will be copied + * @param {number} [resolution] override resolution of the renderTexture + * It overrides, it does not multiply + * @returns {PIXI.RenderTexture} + */ + RenderTexturePool.prototype.getFilterTexture = function getFilterTexture (input, resolution) + { + var filterTexture = this.getOptimalTexture(input.width, input.height, resolution || input.resolution); + + filterTexture.filterFrame = input.filterFrame; + + return filterTexture; + }; + + /** + * Place a render texture back into the pool. + * @param {PIXI.RenderTexture} renderTexture - The renderTexture to free + */ + RenderTexturePool.prototype.returnTexture = function returnTexture (renderTexture) + { + var key = renderTexture.filterPoolKey; + + renderTexture.filterFrame = null; + this.texturePool[key].push(renderTexture); + }; + + /** + * Alias for returnTexture, to be compliant with FilterSystem interface + * @param {PIXI.RenderTexture} renderTexture - The renderTexture to free + */ + RenderTexturePool.prototype.returnFilterTexture = function returnFilterTexture (renderTexture) + { + this.returnTexture(renderTexture); + }; + + /** + * Clears the pool + * + * @param {boolean} [destroyTextures=true] destroy all stored textures + */ + RenderTexturePool.prototype.clear = function clear (destroyTextures) + { + destroyTextures = destroyTextures !== false; + if (destroyTextures) + { + for (var i in this.texturePool) + { + var textures = this.texturePool[i]; + + if (textures) + { + for (var j = 0; j < textures.length; j++) + { + textures[j].destroy(true); + } + } + } + } + + this.texturePool = {}; + }; + + /** + * If screen size was changed, drops all screen-sized textures, + * sets new screen size, sets `enableFullScreen` to true + * + * Size is measured in pixels, `renderer.view` can be passed here, not `renderer.screen` + * + * @param {PIXI.ISize} size - Initial size of screen + */ + RenderTexturePool.prototype.setScreenSize = function setScreenSize (size) + { + if (size.width === this._pixelsWidth + && size.height === this._pixelsHeight) + { + return; + } + + var screenKey = RenderTexturePool.SCREEN_KEY; + var textures = this.texturePool[screenKey]; + + this.enableFullScreen = size.width > 0 && size.height > 0; + + if (textures) + { + for (var j = 0; j < textures.length; j++) + { + textures[j].destroy(true); + } + } + this.texturePool[screenKey] = []; + + this._pixelsWidth = size.width; + this._pixelsHeight = size.height; + }; + + /** + * Key that is used to store fullscreen renderTextures in a pool + * + * @static + * @const {string} + */ + RenderTexturePool.SCREEN_KEY = 'screen'; + + /* eslint-disable max-len */ + + /** + * Holds the information for a single attribute structure required to render geometry. + * + * This does not contain the actual data, but instead has a buffer id that maps to a {@link PIXI.Buffer} + * This can include anything from positions, uvs, normals, colors etc. + * + * @class + * @memberof PIXI + */ + var Attribute = function Attribute(buffer, size, normalized, type, stride, start, instance) + { + if ( normalized === void 0 ) { normalized = false; } + if ( type === void 0 ) { type = 5126; } + + this.buffer = buffer; + this.size = size; + this.normalized = normalized; + this.type = type; + this.stride = stride; + this.start = start; + this.instance = instance; + }; + + /** + * Destroys the Attribute. + */ + Attribute.prototype.destroy = function destroy () + { + this.buffer = null; + }; + + /** + * Helper function that creates an Attribute based on the information provided + * + * @static + * @param {string} buffer the id of the buffer that this attribute will look for + * @param {Number} [size=0] the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2 + * @param {Boolean} [normalized=false] should the data be normalized. + * @param {Number} [start=0] How far into the array to start reading values (used for interleaving data) + * @param {Number} [type=PIXI.TYPES.FLOAT] what type of number is the attribute. Check {@link PIXI.TYPES} to see the ones available + * @param {Number} [stride=0] How far apart (in floats) the start of each value is. (used for interleaving data) + * + * @returns {PIXI.Attribute} A new {@link PIXI.Attribute} based on the information provided + */ + Attribute.from = function from (buffer, size, normalized, type, stride) + { + return new Attribute(buffer, size, normalized, type, stride); + }; + + var UID = 0; + /* eslint-disable max-len */ + + /** + * A wrapper for data so that it can be used and uploaded by WebGL + * + * @class + * @memberof PIXI + */ + var Buffer = function Buffer(data, _static, index) + { + if ( _static === void 0 ) { _static = true; } + if ( index === void 0 ) { index = false; } + + /** + * The data in the buffer, as a typed array + * + * @member {ArrayBuffer| SharedArrayBuffer|ArrayBufferView} + */ + this.data = data || new Float32Array(1); + + /** + * A map of renderer IDs to webgl buffer + * + * @private + * @member {object} + */ + this._glBuffers = {}; + + this._updateID = 0; + + this.index = index; + + this.static = _static; + + this.id = UID++; + + this.disposeRunner = new Runner('disposeBuffer', 2); + }; + + // TODO could explore flagging only a partial upload? + /** + * flags this buffer as requiring an upload to the GPU + * @param {ArrayBuffer|SharedArrayBuffer|ArrayBufferView} [data] the data to update in the buffer. + */ + Buffer.prototype.update = function update (data) + { + this.data = data || this.data; + this._updateID++; + }; + + /** + * disposes WebGL resources that are connected to this geometry + */ + Buffer.prototype.dispose = function dispose () + { + this.disposeRunner.run(this, false); + }; + + /** + * Destroys the buffer + */ + Buffer.prototype.destroy = function destroy () + { + this.dispose(); + + this.data = null; + }; + + /** + * Helper function that creates a buffer based on an array or TypedArray + * + * @static + * @param {ArrayBufferView | number[]} data the TypedArray that the buffer will store. If this is a regular Array it will be converted to a Float32Array. + * @return {PIXI.Buffer} A new Buffer based on the data provided. + */ + Buffer.from = function from (data) + { + if (data instanceof Array) + { + data = new Float32Array(data); + } + + return new Buffer(data); + }; + + function getBufferType$1(array) + { + if (array.BYTES_PER_ELEMENT === 4) + { + if (array instanceof Float32Array) + { + return 'Float32Array'; + } + else if (array instanceof Uint32Array) + { + return 'Uint32Array'; + } + + return 'Int32Array'; + } + else if (array.BYTES_PER_ELEMENT === 2) + { + if (array instanceof Uint16Array) + { + return 'Uint16Array'; + } + } + else if (array.BYTES_PER_ELEMENT === 1) + { + if (array instanceof Uint8Array) + { + return 'Uint8Array'; + } + } + + // TODO map out the rest of the array elements! + return null; + } + + /* eslint-disable object-shorthand */ + var map$1 = { + Float32Array: Float32Array, + Uint32Array: Uint32Array, + Int32Array: Int32Array, + Uint8Array: Uint8Array, + }; + + function interleaveTypedArrays$1(arrays, sizes) + { + var outSize = 0; + var stride = 0; + var views = {}; + + for (var i = 0; i < arrays.length; i++) + { + stride += sizes[i]; + outSize += arrays[i].length; + } + + var buffer = new ArrayBuffer(outSize * 4); + + var out = null; + var littleOffset = 0; + + for (var i$1 = 0; i$1 < arrays.length; i$1++) + { + var size = sizes[i$1]; + var array = arrays[i$1]; + + var type = getBufferType$1(array); + + if (!views[type]) + { + views[type] = new map$1[type](buffer); + } + + out = views[type]; + + for (var j = 0; j < array.length; j++) + { + var indexStart = ((j / size | 0) * stride) + littleOffset; + var index = j % size; + + out[indexStart + index] = array[j]; + } + + littleOffset += size; + } + + return new Float32Array(buffer); + } + + var byteSizeMap = { 5126: 4, 5123: 2, 5121: 1 }; + var UID$1 = 0; + + /* eslint-disable object-shorthand */ + var map$1$1 = { + Float32Array: Float32Array, + Uint32Array: Uint32Array, + Int32Array: Int32Array, + Uint8Array: Uint8Array, + Uint16Array: Uint16Array, + }; + + /* eslint-disable max-len */ + + /** + * The Geometry represents a model. It consists of two components: + * - GeometryStyle - The structure of the model such as the attributes layout + * - GeometryData - the data of the model - this consists of buffers. + * This can include anything from positions, uvs, normals, colors etc. + * + * Geometry can be defined without passing in a style or data if required (thats how I prefer!) + * + * ```js + * let geometry = new PIXI.Geometry(); + * + * geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2); + * geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1],2) + * geometry.addIndex([0,1,2,1,3,2]) + * + * ``` + * @class + * @memberof PIXI + */ + var Geometry = function Geometry(buffers, attributes) + { + if ( buffers === void 0 ) { buffers = []; } + if ( attributes === void 0 ) { attributes = {}; } + + this.buffers = buffers; + + this.indexBuffer = null; + + this.attributes = attributes; + + /** + * A map of renderer IDs to webgl VAOs + * + * @protected + * @type {object} + */ + this.glVertexArrayObjects = {}; + + this.id = UID$1++; + + this.instanced = false; + + /** + * Number of instances in this geometry, pass it to `GeometrySystem.draw()` + * @member {number} + * @default 1 + */ + this.instanceCount = 1; + + this.disposeRunner = new Runner('disposeGeometry', 2); + + /** + * Count of existing (not destroyed) meshes that reference this geometry + * @member {number} + */ + this.refCount = 0; + }; + + /** + * + * Adds an attribute to the geometry + * + * @param {String} id - the name of the attribute (matching up to a shader) + * @param {PIXI.Buffer|number[]} [buffer] the buffer that holds the data of the attribute . You can also provide an Array and a buffer will be created from it. + * @param {Number} [size=0] the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2 + * @param {Boolean} [normalized=false] should the data be normalized. + * @param {Number} [type=PIXI.TYPES.FLOAT] what type of number is the attribute. Check {PIXI.TYPES} to see the ones available + * @param {Number} [stride=0] How far apart (in floats) the start of each value is. (used for interleaving data) + * @param {Number} [start=0] How far into the array to start reading values (used for interleaving data) + * + * @return {PIXI.Geometry} returns self, useful for chaining. + */ + Geometry.prototype.addAttribute = function addAttribute (id, buffer, size, normalized, type, stride, start, instance) + { + if ( normalized === void 0 ) { normalized = false; } + if ( instance === void 0 ) { instance = false; } + + if (!buffer) + { + throw new Error('You must pass a buffer when creating an attribute'); + } + + // check if this is a buffer! + if (!buffer.data) + { + // its an array! + if (buffer instanceof Array) + { + buffer = new Float32Array(buffer); + } + + buffer = new Buffer(buffer); + } + + var ids = id.split('|'); + + if (ids.length > 1) + { + for (var i = 0; i < ids.length; i++) + { + this.addAttribute(ids[i], buffer, size, normalized, type); + } + + return this; + } + + var bufferIndex = this.buffers.indexOf(buffer); + + if (bufferIndex === -1) + { + this.buffers.push(buffer); + bufferIndex = this.buffers.length - 1; + } + + this.attributes[id] = new Attribute(bufferIndex, size, normalized, type, stride, start, instance); + + // assuming that if there is instanced data then this will be drawn with instancing! + this.instanced = this.instanced || instance; + + return this; + }; + + /** + * returns the requested attribute + * + * @param {String} id the name of the attribute required + * @return {PIXI.Attribute} the attribute requested. + */ + Geometry.prototype.getAttribute = function getAttribute (id) + { + return this.attributes[id]; + }; + + /** + * returns the requested buffer + * + * @param {String} id the name of the buffer required + * @return {PIXI.Buffer} the buffer requested. + */ + Geometry.prototype.getBuffer = function getBuffer (id) + { + return this.buffers[this.getAttribute(id).buffer]; + }; + + /** + * + * Adds an index buffer to the geometry + * The index buffer contains integers, three for each triangle in the geometry, which reference the various attribute buffers (position, colour, UV coordinates, other UV coordinates, normal, …). There is only ONE index buffer. + * + * @param {PIXI.Buffer|number[]} [buffer] the buffer that holds the data of the index buffer. You can also provide an Array and a buffer will be created from it. + * @return {PIXI.Geometry} returns self, useful for chaining. + */ + Geometry.prototype.addIndex = function addIndex (buffer) + { + if (!buffer.data) + { + // its an array! + if (buffer instanceof Array) + { + buffer = new Uint16Array(buffer); + } + + buffer = new Buffer(buffer); + } + + buffer.index = true; + this.indexBuffer = buffer; + + if (this.buffers.indexOf(buffer) === -1) + { + this.buffers.push(buffer); + } + + return this; + }; + + /** + * returns the index buffer + * + * @return {PIXI.Buffer} the index buffer. + */ + Geometry.prototype.getIndex = function getIndex () + { + return this.indexBuffer; + }; + + /** + * this function modifies the structure so that all current attributes become interleaved into a single buffer + * This can be useful if your model remains static as it offers a little performance boost + * + * @return {PIXI.Geometry} returns self, useful for chaining. + */ + Geometry.prototype.interleave = function interleave () + { + // a simple check to see if buffers are already interleaved.. + if (this.buffers.length === 1 || (this.buffers.length === 2 && this.indexBuffer)) { return this; } + + // assume already that no buffers are interleaved + var arrays = []; + var sizes = []; + var interleavedBuffer = new Buffer(); + var i; + + for (i in this.attributes) + { + var attribute = this.attributes[i]; + + var buffer = this.buffers[attribute.buffer]; + + arrays.push(buffer.data); + + sizes.push((attribute.size * byteSizeMap[attribute.type]) / 4); + + attribute.buffer = 0; + } + + interleavedBuffer.data = interleaveTypedArrays$1(arrays, sizes); + + for (i = 0; i < this.buffers.length; i++) + { + if (this.buffers[i] !== this.indexBuffer) + { + this.buffers[i].destroy(); + } + } + + this.buffers = [interleavedBuffer]; + + if (this.indexBuffer) + { + this.buffers.push(this.indexBuffer); + } + + return this; + }; + + Geometry.prototype.getSize = function getSize () + { + for (var i in this.attributes) + { + var attribute = this.attributes[i]; + var buffer = this.buffers[attribute.buffer]; + + return buffer.data.length / ((attribute.stride / 4) || attribute.size); + } + + return 0; + }; + + /** + * disposes WebGL resources that are connected to this geometry + */ + Geometry.prototype.dispose = function dispose () + { + this.disposeRunner.run(this, false); + }; + + /** + * Destroys the geometry. + */ + Geometry.prototype.destroy = function destroy () + { + this.dispose(); + + this.buffers = null; + this.indexBuffer = null; + this.attributes = null; + }; + + /** + * returns a clone of the geometry + * + * @returns {PIXI.Geometry} a new clone of this geometry + */ + Geometry.prototype.clone = function clone () + { + var geometry = new Geometry(); + + for (var i = 0; i < this.buffers.length; i++) + { + geometry.buffers[i] = new Buffer(this.buffers[i].data.slice()); + } + + for (var i$1 in this.attributes) + { + var attrib = this.attributes[i$1]; + + geometry.attributes[i$1] = new Attribute( + attrib.buffer, + attrib.size, + attrib.normalized, + attrib.type, + attrib.stride, + attrib.start, + attrib.instance + ); + } + + if (this.indexBuffer) + { + geometry.indexBuffer = geometry.buffers[this.buffers.indexOf(this.indexBuffer)]; + geometry.indexBuffer.index = true; + } + + return geometry; + }; + + /** + * merges an array of geometries into a new single one + * geometry attribute styles must match for this operation to work + * + * @param {PIXI.Geometry[]} geometries array of geometries to merge + * @returns {PIXI.Geometry} shiny new geometry! + */ + Geometry.merge = function merge (geometries) + { + // todo add a geometry check! + // also a size check.. cant be too big!] + + var geometryOut = new Geometry(); + + var arrays = []; + var sizes = []; + var offsets = []; + + var geometry; + + // pass one.. get sizes.. + for (var i = 0; i < geometries.length; i++) + { + geometry = geometries[i]; + + for (var j = 0; j < geometry.buffers.length; j++) + { + sizes[j] = sizes[j] || 0; + sizes[j] += geometry.buffers[j].data.length; + offsets[j] = 0; + } + } + + // build the correct size arrays.. + for (var i$1 = 0; i$1 < geometry.buffers.length; i$1++) + { + // TODO types! + arrays[i$1] = new map$1$1[getBufferType$1(geometry.buffers[i$1].data)](sizes[i$1]); + geometryOut.buffers[i$1] = new Buffer(arrays[i$1]); + } + + // pass to set data.. + for (var i$2 = 0; i$2 < geometries.length; i$2++) + { + geometry = geometries[i$2]; + + for (var j$1 = 0; j$1 < geometry.buffers.length; j$1++) + { + arrays[j$1].set(geometry.buffers[j$1].data, offsets[j$1]); + offsets[j$1] += geometry.buffers[j$1].data.length; + } + } + + geometryOut.attributes = geometry.attributes; + + if (geometry.indexBuffer) + { + geometryOut.indexBuffer = geometryOut.buffers[geometry.buffers.indexOf(geometry.indexBuffer)]; + geometryOut.indexBuffer.index = true; + + var offset = 0; + var stride = 0; + var offset2 = 0; + var bufferIndexToCount = 0; + + // get a buffer + for (var i$3 = 0; i$3 < geometry.buffers.length; i$3++) + { + if (geometry.buffers[i$3] !== geometry.indexBuffer) + { + bufferIndexToCount = i$3; + break; + } + } + + // figure out the stride of one buffer.. + for (var i$4 in geometry.attributes) + { + var attribute = geometry.attributes[i$4]; + + if ((attribute.buffer | 0) === bufferIndexToCount) + { + stride += ((attribute.size * byteSizeMap[attribute.type]) / 4); + } + } + + // time to off set all indexes.. + for (var i$5 = 0; i$5 < geometries.length; i$5++) + { + var indexBufferData = geometries[i$5].indexBuffer.data; + + for (var j$2 = 0; j$2 < indexBufferData.length; j$2++) + { + geometryOut.indexBuffer.data[j$2 + offset2] += offset; + } + + offset += geometry.buffers[bufferIndexToCount].data.length / (stride); + offset2 += indexBufferData.length; + } + } + + return geometryOut; + }; + + /** + * Helper class to create a quad + * + * @class + * @memberof PIXI + */ + var Quad = /*@__PURE__*/(function (Geometry) { + function Quad() + { + Geometry.call(this); + + this.addAttribute('aVertexPosition', [ + 0, 0, + 1, 0, + 1, 1, + 0, 1 ]) + .addIndex([0, 1, 3, 2]); + } + + if ( Geometry ) { Quad.__proto__ = Geometry; } + Quad.prototype = Object.create( Geometry && Geometry.prototype ); + Quad.prototype.constructor = Quad; + + return Quad; + }(Geometry)); + + /** + * Helper class to create a quad with uvs like in v4 + * + * @class + * @memberof PIXI + * @extends PIXI.Geometry + */ + var QuadUv = /*@__PURE__*/(function (Geometry) { + function QuadUv() + { + Geometry.call(this); + + /** + * An array of vertices + * + * @member {Float32Array} + */ + this.vertices = new Float32Array([ + -1, -1, + 1, -1, + 1, 1, + -1, 1 ]); + + /** + * The Uvs of the quad + * + * @member {Float32Array} + */ + this.uvs = new Float32Array([ + 0, 0, + 1, 0, + 1, 1, + 0, 1 ]); + + this.vertexBuffer = new Buffer(this.vertices); + this.uvBuffer = new Buffer(this.uvs); + + this.addAttribute('aVertexPosition', this.vertexBuffer) + .addAttribute('aTextureCoord', this.uvBuffer) + .addIndex([0, 1, 2, 0, 2, 3]); + } + + if ( Geometry ) { QuadUv.__proto__ = Geometry; } + QuadUv.prototype = Object.create( Geometry && Geometry.prototype ); + QuadUv.prototype.constructor = QuadUv; + + /** + * Maps two Rectangle to the quad. + * + * @param {PIXI.Rectangle} targetTextureFrame - the first rectangle + * @param {PIXI.Rectangle} destinationFrame - the second rectangle + * @return {PIXI.Quad} Returns itself. + */ + QuadUv.prototype.map = function map (targetTextureFrame, destinationFrame) + { + var x = 0; // destinationFrame.x / targetTextureFrame.width; + var y = 0; // destinationFrame.y / targetTextureFrame.height; + + this.uvs[0] = x; + this.uvs[1] = y; + + this.uvs[2] = x + (destinationFrame.width / targetTextureFrame.width); + this.uvs[3] = y; + + this.uvs[4] = x + (destinationFrame.width / targetTextureFrame.width); + this.uvs[5] = y + (destinationFrame.height / targetTextureFrame.height); + + this.uvs[6] = x; + this.uvs[7] = y + (destinationFrame.height / targetTextureFrame.height); + + x = destinationFrame.x; + y = destinationFrame.y; + + this.vertices[0] = x; + this.vertices[1] = y; + + this.vertices[2] = x + destinationFrame.width; + this.vertices[3] = y; + + this.vertices[4] = x + destinationFrame.width; + this.vertices[5] = y + destinationFrame.height; + + this.vertices[6] = x; + this.vertices[7] = y + destinationFrame.height; + + this.invalidate(); + + return this; + }; + + /** + * legacy upload method, just marks buffers dirty + * @returns {PIXI.QuadUv} Returns itself. + */ + QuadUv.prototype.invalidate = function invalidate () + { + this.vertexBuffer._updateID++; + this.uvBuffer._updateID++; + + return this; + }; + + return QuadUv; + }(Geometry)); + + var UID$2 = 0; + + /** + * Uniform group holds uniform map and some ID's for work + * + * @class + * @memberof PIXI + */ + var UniformGroup = function UniformGroup(uniforms, _static) + { + /** + * uniform values + * @member {object} + * @readonly + */ + this.uniforms = uniforms; + + /** + * Its a group and not a single uniforms + * @member {boolean} + * @readonly + * @default true + */ + this.group = true; + + // lets generate this when the shader ? + this.syncUniforms = {}; + + /** + * dirty version + * @protected + * @member {number} + */ + this.dirtyId = 0; + + /** + * unique id + * @protected + * @member {number} + */ + this.id = UID$2++; + + /** + * Uniforms wont be changed after creation + * @member {boolean} + */ + this.static = !!_static; + }; + + UniformGroup.prototype.update = function update () + { + this.dirtyId++; + }; + + UniformGroup.prototype.add = function add (name, uniforms, _static) + { + this.uniforms[name] = new UniformGroup(uniforms, _static); + }; + + UniformGroup.from = function from (uniforms, _static) + { + return new UniformGroup(uniforms, _static); + }; + + /** + * System plugin to the renderer to manage filter states. + * + * @class + * @private + */ + var FilterState = function FilterState() + { + this.renderTexture = null; + + /** + * Target of the filters + * We store for case when custom filter wants to know the element it was applied on + * @member {PIXI.DisplayObject} + * @private + */ + this.target = null; + + /** + * Compatibility with PixiJS v4 filters + * @member {boolean} + * @default false + * @private + */ + this.legacy = false; + + /** + * Resolution of filters + * @member {number} + * @default 1 + * @private + */ + this.resolution = 1; + + // next three fields are created only for root + // re-assigned for everything else + + /** + * Source frame + * @member {PIXI.Rectangle} + * @private + */ + this.sourceFrame = new Rectangle(); + + /** + * Destination frame + * @member {PIXI.Rectangle} + * @private + */ + this.destinationFrame = new Rectangle(); + + /** + * Collection of filters + * @member {PIXI.Filter[]} + * @private + */ + this.filters = []; + }; + + /** + * clears the state + * @private + */ + FilterState.prototype.clear = function clear () + { + this.target = null; + this.filters = null; + this.renderTexture = null; + }; + + /** + * System plugin to the renderer to manage the filters. + * + * @class + * @memberof PIXI.systems + * @extends PIXI.System + */ + var FilterSystem = /*@__PURE__*/(function (System) { + function FilterSystem(renderer) + { + System.call(this, renderer); + + /** + * List of filters for the FilterSystem + * @member {Object[]} + * @readonly + */ + this.defaultFilterStack = [{}]; + + /** + * stores a bunch of PO2 textures used for filtering + * @member {Object} + */ + this.texturePool = new RenderTexturePool(); + + this.texturePool.setScreenSize(renderer.view); + + /** + * a pool for storing filter states, save us creating new ones each tick + * @member {Object[]} + */ + this.statePool = []; + + /** + * A very simple geometry used when drawing a filter effect to the screen + * @member {PIXI.Quad} + */ + this.quad = new Quad(); + + /** + * Quad UVs + * @member {PIXI.QuadUv} + */ + this.quadUv = new QuadUv(); + + /** + * Temporary rect for maths + * @type {PIXI.Rectangle} + */ + this.tempRect = new Rectangle(); + + /** + * Active state + * @member {object} + */ + this.activeState = {}; + + /** + * This uniform group is attached to filter uniforms when used + * @member {PIXI.UniformGroup} + * @property {PIXI.Rectangle} outputFrame + * @property {Float32Array} inputSize + * @property {Float32Array} inputPixel + * @property {Float32Array} inputClamp + * @property {Number} resolution + * @property {Float32Array} filterArea + * @property {Fload32Array} filterClamp + */ + this.globalUniforms = new UniformGroup({ + outputFrame: this.tempRect, + inputSize: new Float32Array(4), + inputPixel: new Float32Array(4), + inputClamp: new Float32Array(4), + resolution: 1, + + // legacy variables + filterArea: new Float32Array(4), + filterClamp: new Float32Array(4), + }, true); + + /** + * Whether to clear output renderTexture in AUTO/BLIT mode. See {@link PIXI.CLEAR_MODES} + * @member {boolean} + */ + this.forceClear = false; + + /** + * Old padding behavior is to use the max amount instead of sum padding. + * Use this flag if you need the old behavior. + * @member {boolean} + * @default false + */ + this.useMaxPadding = false; + } + + if ( System ) { FilterSystem.__proto__ = System; } + FilterSystem.prototype = Object.create( System && System.prototype ); + FilterSystem.prototype.constructor = FilterSystem; + + /** + * Adds a new filter to the System. + * + * @param {PIXI.DisplayObject} target - The target of the filter to render. + * @param {PIXI.Filter[]} filters - The filters to apply. + */ + FilterSystem.prototype.push = function push (target, filters) + { + var renderer = this.renderer; + var filterStack = this.defaultFilterStack; + var state = this.statePool.pop() || new FilterState(); + + var resolution = filters[0].resolution; + var padding = filters[0].padding; + var autoFit = filters[0].autoFit; + var legacy = filters[0].legacy; + + for (var i = 1; i < filters.length; i++) + { + var filter = filters[i]; + + // lets use the lowest resolution.. + resolution = Math.min(resolution, filter.resolution); + // figure out the padding required for filters + padding = this.useMaxPadding + // old behavior: use largest amount of padding! + ? Math.max(padding, filter.padding) + // new behavior: sum the padding + : padding + filter.padding; + // only auto fit if all filters are autofit + autoFit = autoFit || filter.autoFit; + + legacy = legacy || filter.legacy; + } + + if (filterStack.length === 1) + { + this.defaultFilterStack[0].renderTexture = renderer.renderTexture.current; + } + + filterStack.push(state); + + state.resolution = resolution; + + state.legacy = legacy; + + state.target = target; + + state.sourceFrame.copyFrom(target.filterArea || target.getBounds(true)); + + state.sourceFrame.pad(padding); + if (autoFit) + { + state.sourceFrame.fit(this.renderer.renderTexture.sourceFrame); + } + + // round to whole number based on resolution + state.sourceFrame.ceil(resolution); + + state.renderTexture = this.getOptimalFilterTexture(state.sourceFrame.width, state.sourceFrame.height, resolution); + state.filters = filters; + + state.destinationFrame.width = state.renderTexture.width; + state.destinationFrame.height = state.renderTexture.height; + + state.renderTexture.filterFrame = state.sourceFrame; + + renderer.renderTexture.bind(state.renderTexture, state.sourceFrame);// /, state.destinationFrame); + renderer.renderTexture.clear(); + }; + + /** + * Pops off the filter and applies it. + * + */ + FilterSystem.prototype.pop = function pop () + { + var filterStack = this.defaultFilterStack; + var state = filterStack.pop(); + var filters = state.filters; + + this.activeState = state; + + var globalUniforms = this.globalUniforms.uniforms; + + globalUniforms.outputFrame = state.sourceFrame; + globalUniforms.resolution = state.resolution; + + var inputSize = globalUniforms.inputSize; + var inputPixel = globalUniforms.inputPixel; + var inputClamp = globalUniforms.inputClamp; + + inputSize[0] = state.destinationFrame.width; + inputSize[1] = state.destinationFrame.height; + inputSize[2] = 1.0 / inputSize[0]; + inputSize[3] = 1.0 / inputSize[1]; + + inputPixel[0] = inputSize[0] * state.resolution; + inputPixel[1] = inputSize[1] * state.resolution; + inputPixel[2] = 1.0 / inputPixel[0]; + inputPixel[3] = 1.0 / inputPixel[1]; + + inputClamp[0] = 0.5 * inputPixel[2]; + inputClamp[1] = 0.5 * inputPixel[3]; + inputClamp[2] = (state.sourceFrame.width * inputSize[2]) - (0.5 * inputPixel[2]); + inputClamp[3] = (state.sourceFrame.height * inputSize[3]) - (0.5 * inputPixel[3]); + + // only update the rect if its legacy.. + if (state.legacy) + { + var filterArea = globalUniforms.filterArea; + + filterArea[0] = state.destinationFrame.width; + filterArea[1] = state.destinationFrame.height; + filterArea[2] = state.sourceFrame.x; + filterArea[3] = state.sourceFrame.y; + + globalUniforms.filterClamp = globalUniforms.inputClamp; + } + + this.globalUniforms.update(); + + var lastState = filterStack[filterStack.length - 1]; + + if (filters.length === 1) + { + filters[0].apply(this, state.renderTexture, lastState.renderTexture, false, state); + + this.returnFilterTexture(state.renderTexture); + } + else + { + var flip = state.renderTexture; + var flop = this.getOptimalFilterTexture( + flip.width, + flip.height, + state.resolution + ); + + flop.filterFrame = flip.filterFrame; + + var i = 0; + + for (i = 0; i < filters.length - 1; ++i) + { + filters[i].apply(this, flip, flop, true, state); + + var t = flip; + + flip = flop; + flop = t; + } + + filters[i].apply(this, flip, lastState.renderTexture, false, state); + + this.returnFilterTexture(flip); + this.returnFilterTexture(flop); + } + + state.clear(); + this.statePool.push(state); + }; + + /** + * Draws a filter. + * + * @param {PIXI.Filter} filter - The filter to draw. + * @param {PIXI.RenderTexture} input - The input render target. + * @param {PIXI.RenderTexture} output - The target to output to. + * @param {boolean} clear - Should the output be cleared before rendering to it + */ + FilterSystem.prototype.applyFilter = function applyFilter (filter, input, output, clear) + { + var renderer = this.renderer; + + renderer.renderTexture.bind(output, output ? output.filterFrame : null); + + if (clear) + { + // gl.disable(gl.SCISSOR_TEST); + renderer.renderTexture.clear(); + // gl.enable(gl.SCISSOR_TEST); + } + + // set the uniforms.. + filter.uniforms.uSampler = input; + filter.uniforms.filterGlobals = this.globalUniforms; + + // TODO make it so that the order of this does not matter.. + // because it does at the moment cos of global uniforms. + // they need to get resynced + + renderer.state.set(filter.state); + renderer.shader.bind(filter); + + if (filter.legacy) + { + this.quadUv.map(input._frame, input.filterFrame); + + renderer.geometry.bind(this.quadUv); + renderer.geometry.draw(exports.DRAW_MODES.TRIANGLES); + } + else + { + renderer.geometry.bind(this.quad); + renderer.geometry.draw(exports.DRAW_MODES.TRIANGLE_STRIP); + } + }; + + /** + * Multiply _input normalized coordinates_ to this matrix to get _sprite texture normalized coordinates_. + * + * Use `outputMatrix * vTextureCoord` in the shader. + * + * @param {PIXI.Matrix} outputMatrix - The matrix to output to. + * @param {PIXI.Sprite} sprite - The sprite to map to. + * @return {PIXI.Matrix} The mapped matrix. + */ + FilterSystem.prototype.calculateSpriteMatrix = function calculateSpriteMatrix (outputMatrix, sprite) + { + var ref = this.activeState; + var sourceFrame = ref.sourceFrame; + var destinationFrame = ref.destinationFrame; + var ref$1 = sprite._texture; + var orig = ref$1.orig; + var mappedMatrix = outputMatrix.set(destinationFrame.width, 0, 0, + destinationFrame.height, sourceFrame.x, sourceFrame.y); + var worldTransform = sprite.worldTransform.copyTo(Matrix.TEMP_MATRIX); + + worldTransform.invert(); + mappedMatrix.prepend(worldTransform); + mappedMatrix.scale(1.0 / orig.width, 1.0 / orig.height); + mappedMatrix.translate(sprite.anchor.x, sprite.anchor.y); + + return mappedMatrix; + }; + + /** + * Destroys this Filter System. + */ + FilterSystem.prototype.destroy = function destroy () + { + // Those textures has to be destroyed by RenderTextureSystem or FramebufferSystem + this.texturePool.clear(false); + }; + + /** + * Gets a Power-of-Two render texture or fullScreen texture + * + * @protected + * @param {number} minWidth - The minimum width of the render texture in real pixels. + * @param {number} minHeight - The minimum height of the render texture in real pixels. + * @param {number} [resolution=1] - The resolution of the render texture. + * @return {PIXI.RenderTexture} The new render texture. + */ + FilterSystem.prototype.getOptimalFilterTexture = function getOptimalFilterTexture (minWidth, minHeight, resolution) + { + if ( resolution === void 0 ) { resolution = 1; } + + return this.texturePool.getOptimalTexture(minWidth, minHeight, resolution); + }; + + /** + * Gets extra render texture to use inside current filter + * To be compliant with older filters, you can use params in any order + * + * @param {PIXI.RenderTexture} [input] renderTexture from which size and resolution will be copied + * @param {number} [resolution] override resolution of the renderTexture + * @returns {PIXI.RenderTexture} + */ + FilterSystem.prototype.getFilterTexture = function getFilterTexture (input, resolution) + { + if (typeof input === 'number') + { + var swap = input; + + input = resolution; + resolution = swap; + } + + input = input || this.activeState.renderTexture; + + var filterTexture = this.texturePool.getOptimalTexture(input.width, input.height, resolution || input.resolution); + + filterTexture.filterFrame = input.filterFrame; + + return filterTexture; + }; + + /** + * Frees a render texture back into the pool. + * + * @param {PIXI.RenderTexture} renderTexture - The renderTarget to free + */ + FilterSystem.prototype.returnFilterTexture = function returnFilterTexture (renderTexture) + { + this.texturePool.returnTexture(renderTexture); + }; + + /** + * Empties the texture pool. + */ + FilterSystem.prototype.emptyPool = function emptyPool () + { + this.texturePool.clear(true); + }; + + /** + * calls `texturePool.resize()`, affects fullScreen renderTextures + */ + FilterSystem.prototype.resize = function resize () + { + this.texturePool.setScreenSize(this.renderer.view); + }; + + return FilterSystem; + }(System)); + + /** + * Base for a common object renderer that can be used as a + * system renderer plugin. + * + * @class + * @extends PIXI.System + * @memberof PIXI + */ + var ObjectRenderer = function ObjectRenderer(renderer) + { + /** + * The renderer this manager works for. + * + * @member {PIXI.Renderer} + */ + this.renderer = renderer; + }; + + /** + * Stub method that should be used to empty the current + * batch by rendering objects now. + */ + ObjectRenderer.prototype.flush = function flush () + { + // flush! + }; + + /** + * Generic destruction method that frees all resources. This + * should be called by subclasses. + */ + ObjectRenderer.prototype.destroy = function destroy () + { + this.renderer = null; + }; + + /** + * Stub method that initializes any state required before + * rendering starts. It is different from the `prerender` + * signal, which occurs every frame, in that it is called + * whenever an object requests _this_ renderer specifically. + */ + ObjectRenderer.prototype.start = function start () + { + // set the shader.. + }; + + /** + * Stops the renderer. It should free up any state and + * become dormant. + */ + ObjectRenderer.prototype.stop = function stop () + { + this.flush(); + }; + + /** + * Keeps the object to render. It doesn't have to be + * rendered immediately. + * + * @param {PIXI.DisplayObject} object - The object to render. + */ + ObjectRenderer.prototype.render = function render (object) // eslint-disable-line no-unused-vars + { + // render the object + }; + + /** + * System plugin to the renderer to manage batching. + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + var BatchSystem = /*@__PURE__*/(function (System) { + function BatchSystem(renderer) + { + System.call(this, renderer); + + /** + * An empty renderer. + * + * @member {PIXI.ObjectRenderer} + */ + this.emptyRenderer = new ObjectRenderer(renderer); + + /** + * The currently active ObjectRenderer. + * + * @member {PIXI.ObjectRenderer} + */ + this.currentRenderer = this.emptyRenderer; + } + + if ( System ) { BatchSystem.__proto__ = System; } + BatchSystem.prototype = Object.create( System && System.prototype ); + BatchSystem.prototype.constructor = BatchSystem; + + /** + * Changes the current renderer to the one given in parameter + * + * @param {PIXI.ObjectRenderer} objectRenderer - The object renderer to use. + */ + BatchSystem.prototype.setObjectRenderer = function setObjectRenderer (objectRenderer) + { + if (this.currentRenderer === objectRenderer) + { + return; + } + + this.currentRenderer.stop(); + this.currentRenderer = objectRenderer; + + this.currentRenderer.start(); + }; + + /** + * This should be called if you wish to do some custom rendering + * It will basically render anything that may be batched up such as sprites + */ + BatchSystem.prototype.flush = function flush () + { + this.setObjectRenderer(this.emptyRenderer); + }; + + /** + * Reset the system to an empty renderer + */ + BatchSystem.prototype.reset = function reset () + { + this.setObjectRenderer(this.emptyRenderer); + }; + + /** + * Handy function for batch renderers: copies bound textures in first maxTextures locations to array + * sets actual _batchLocation for them + * + * @param arr + * @param maxTextures + */ + BatchSystem.prototype.copyBoundTextures = function copyBoundTextures (arr, maxTextures) + { + var ref = this.renderer.texture; + var boundTextures = ref.boundTextures; + + for (var i = maxTextures - 1; i >= 0; --i) + { + arr[i] = boundTextures[i] || null; + if (arr[i]) + { + arr[i]._batchLocation = i; + } + } + }; + + /** + * Assigns batch locations to textures in array based on boundTextures state. + * All textures in texArray should have `_batchEnabled = _batchId`, + * and their count should be less than `maxTextures`. + * + * @param {PIXI.BatchTextureArray} texArray textures to bound + * @param {PIXI.BaseTexture[]} boundTextures current state of bound textures + * @param {number} batchId marker for _batchEnabled param of textures in texArray + * @param {number} maxTextures number of texture locations to manipulate + */ + BatchSystem.prototype.boundArray = function boundArray (texArray, boundTextures, batchId, maxTextures) + { + var elements = texArray.elements; + var ids = texArray.ids; + var count = texArray.count; + var j = 0; + + for (var i = 0; i < count; i++) + { + var tex = elements[i]; + var loc = tex._batchLocation; + + if (loc >= 0 && loc < maxTextures + && boundTextures[loc] === tex) + { + ids[i] = loc; + continue; + } + + while (j < maxTextures) + { + var bound = boundTextures[j]; + + if (bound && bound._batchEnabled === batchId + && bound._batchLocation === j) + { + j++; + continue; + } + + ids[i] = j; + tex._batchLocation = j; + boundTextures[j] = tex; + break; + } + } + }; + + return BatchSystem; + }(System)); + + /** + * The maximum support for using WebGL. If a device does not + * support WebGL version, for instance WebGL 2, it will still + * attempt to fallback support to WebGL 1. If you want to + * explicitly remove feature support to target a more stable + * baseline, prefer a lower environment. + * + * Due to {@link https://bugs.chromium.org/p/chromium/issues/detail?id=934823|bug in chromium} + * we disable webgl2 by default for all non-apple mobile devices. + * + * @static + * @name PREFER_ENV + * @memberof PIXI.settings + * @type {number} + * @default PIXI.ENV.WEBGL2 + */ + settings.PREFER_ENV = isMobile$1.any ? exports.ENV.WEBGL : exports.ENV.WEBGL2; + + /** + * If set to `true`, Textures and BaseTexture objects stored + * in the caches ({@link PIXI.utils.TextureCache TextureCache} and + * {@link PIXI.utils.BaseTextureCache BaseTextureCache}) can *only* be + * used when calling {@link PIXI.Texture.from Texture.from} or + * {@link PIXI.BaseTexture.from BaseTexture.from}. + * Otherwise, these `from` calls throw an exception. Using this property + * can be useful if you want to enforce preloading all assets with + * {@link PIXI.Loader Loader}. + * + * @static + * @name STRICT_TEXTURE_CACHE + * @memberof PIXI.settings + * @type {boolean} + * @default false + */ + settings.STRICT_TEXTURE_CACHE = false; + + var CONTEXT_UID = 0; + + /** + * System plugin to the renderer to manage the context. + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + var ContextSystem = /*@__PURE__*/(function (System) { + function ContextSystem(renderer) + { + System.call(this, renderer); + + /** + * Either 1 or 2 to reflect the WebGL version being used + * @member {number} + * @readonly + */ + this.webGLVersion = 1; + + /** + * Extensions being used + * @member {object} + * @readonly + * @property {WEBGL_draw_buffers} drawBuffers - WebGL v1 extension + * @property {WEBGL_depth_texture} depthTexture - WebGL v1 extension + * @property {OES_texture_float} floatTexture - WebGL v1 extension + * @property {WEBGL_lose_context} loseContext - WebGL v1 extension + * @property {OES_vertex_array_object} vertexArrayObject - WebGL v1 extension + * @property {EXT_texture_filter_anisotropic} anisotropicFiltering - WebGL v1 and v2 extension + */ + this.extensions = {}; + + // Bind functions + this.handleContextLost = this.handleContextLost.bind(this); + this.handleContextRestored = this.handleContextRestored.bind(this); + + renderer.view.addEventListener('webglcontextlost', this.handleContextLost, false); + renderer.view.addEventListener('webglcontextrestored', this.handleContextRestored, false); + } + + if ( System ) { ContextSystem.__proto__ = System; } + ContextSystem.prototype = Object.create( System && System.prototype ); + ContextSystem.prototype.constructor = ContextSystem; + + var prototypeAccessors = { isLost: { configurable: true } }; + + /** + * `true` if the context is lost + * @member {boolean} + * @readonly + */ + prototypeAccessors.isLost.get = function () + { + return (!this.gl || this.gl.isContextLost()); + }; + + /** + * Handle the context change event + * @param {WebGLRenderingContext} gl new webgl context + */ + ContextSystem.prototype.contextChange = function contextChange (gl) + { + this.gl = gl; + this.renderer.gl = gl; + this.renderer.CONTEXT_UID = CONTEXT_UID++; + + // restore a context if it was previously lost + if (gl.isContextLost() && gl.getExtension('WEBGL_lose_context')) + { + gl.getExtension('WEBGL_lose_context').restoreContext(); + } + }; + + /** + * Initialize the context + * + * @protected + * @param {WebGLRenderingContext} gl - WebGL context + */ + ContextSystem.prototype.initFromContext = function initFromContext (gl) + { + this.gl = gl; + this.validateContext(gl); + this.renderer.gl = gl; + this.renderer.CONTEXT_UID = CONTEXT_UID++; + this.renderer.runners.contextChange.run(gl); + }; + + /** + * Initialize from context options + * + * @protected + * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext + * @param {object} options - context attributes + */ + ContextSystem.prototype.initFromOptions = function initFromOptions (options) + { + var gl = this.createContext(this.renderer.view, options); + + this.initFromContext(gl); + }; + + /** + * Helper class to create a WebGL Context + * + * @param canvas {HTMLCanvasElement} the canvas element that we will get the context from + * @param options {object} An options object that gets passed in to the canvas element containing the context attributes + * @see https://developer.mozilla.org/en/docs/Web/API/HTMLCanvasElement/getContext + * @return {WebGLRenderingContext} the WebGL context + */ + ContextSystem.prototype.createContext = function createContext (canvas, options) + { + var gl; + + if (settings.PREFER_ENV >= exports.ENV.WEBGL2) + { + gl = canvas.getContext('webgl2', options); + } + + if (gl) + { + this.webGLVersion = 2; + } + else + { + this.webGLVersion = 1; + + gl = canvas.getContext('webgl', options) + || canvas.getContext('experimental-webgl', options); + + if (!gl) + { + // fail, not able to get a context + throw new Error('This browser does not support WebGL. Try using the canvas renderer'); + } + } + + this.gl = gl; + + this.getExtensions(); + + return gl; + }; + + /** + * Auto-populate the extensions + * + * @protected + */ + ContextSystem.prototype.getExtensions = function getExtensions () + { + // time to set up default extensions that Pixi uses. + var ref = this; + var gl = ref.gl; + + if (this.webGLVersion === 1) + { + Object.assign(this.extensions, { + drawBuffers: gl.getExtension('WEBGL_draw_buffers'), + depthTexture: gl.getExtension('WEBGL_depth_texture'), + loseContext: gl.getExtension('WEBGL_lose_context'), + vertexArrayObject: gl.getExtension('OES_vertex_array_object') + || gl.getExtension('MOZ_OES_vertex_array_object') + || gl.getExtension('WEBKIT_OES_vertex_array_object'), + anisotropicFiltering: gl.getExtension('EXT_texture_filter_anisotropic'), + uint32ElementIndex: gl.getExtension('OES_element_index_uint'), + // Floats and half-floats + floatTexture: gl.getExtension('OES_texture_float'), + floatTextureLinear: gl.getExtension('OES_texture_float_linear'), + textureHalfFloat: gl.getExtension('OES_texture_half_float'), + textureHalfFloatLinear: gl.getExtension('OES_texture_half_float_linear'), + }); + } + else if (this.webGLVersion === 2) + { + Object.assign(this.extensions, { + anisotropicFiltering: gl.getExtension('EXT_texture_filter_anisotropic'), + // Floats and half-floats + colorBufferFloat: gl.getExtension('EXT_color_buffer_float'), + floatTextureLinear: gl.getExtension('OES_texture_float_linear'), + }); + } + }; + + /** + * Handles a lost webgl context + * + * @protected + * @param {WebGLContextEvent} event - The context lost event. + */ + ContextSystem.prototype.handleContextLost = function handleContextLost (event) + { + event.preventDefault(); + }; + + /** + * Handles a restored webgl context + * + * @protected + */ + ContextSystem.prototype.handleContextRestored = function handleContextRestored () + { + this.renderer.runners.contextChange.run(this.gl); + }; + + ContextSystem.prototype.destroy = function destroy () + { + var view = this.renderer.view; + + // remove listeners + view.removeEventListener('webglcontextlost', this.handleContextLost); + view.removeEventListener('webglcontextrestored', this.handleContextRestored); + + this.gl.useProgram(null); + + if (this.extensions.loseContext) + { + this.extensions.loseContext.loseContext(); + } + }; + + /** + * Handle the post-render runner event + * + * @protected + */ + ContextSystem.prototype.postrender = function postrender () + { + if (this.renderer.renderingToScreen) + { + this.gl.flush(); + } + }; + + /** + * Validate context + * + * @protected + * @param {WebGLRenderingContext} gl - Render context + */ + ContextSystem.prototype.validateContext = function validateContext (gl) + { + var attributes = gl.getContextAttributes(); + + // this is going to be fairly simple for now.. but at least we have room to grow! + if (!attributes.stencil) + { + /* eslint-disable max-len */ + + /* eslint-disable no-console */ + console.warn('Provided WebGL context does not have a stencil buffer, masks may not render correctly'); + /* eslint-enable no-console */ + + /* eslint-enable max-len */ + } + }; + + Object.defineProperties( ContextSystem.prototype, prototypeAccessors ); + + return ContextSystem; + }(System)); + + /** + * System plugin to the renderer to manage framebuffers. + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + var FramebufferSystem = /*@__PURE__*/(function (System) { + function FramebufferSystem(renderer) + { + System.call(this, renderer); + + /** + * A list of managed framebuffers + * @member {PIXI.Framebuffer[]} + * @readonly + */ + this.managedFramebuffers = []; + + /** + * Framebuffer value that shows that we don't know what is bound + * @member {Framebuffer} + * @readonly + */ + this.unknownFramebuffer = new Framebuffer(10, 10); + } + + if ( System ) { FramebufferSystem.__proto__ = System; } + FramebufferSystem.prototype = Object.create( System && System.prototype ); + FramebufferSystem.prototype.constructor = FramebufferSystem; + + var prototypeAccessors = { size: { configurable: true } }; + + /** + * Sets up the renderer context and necessary buffers. + */ + FramebufferSystem.prototype.contextChange = function contextChange () + { + var gl = this.gl = this.renderer.gl; + + this.CONTEXT_UID = this.renderer.CONTEXT_UID; + this.current = this.unknownFramebuffer; + this.viewport = new Rectangle(); + this.hasMRT = true; + this.writeDepthTexture = true; + + this.disposeAll(true); + + // webgl2 + if (this.renderer.context.webGLVersion === 1) + { + // webgl 1! + var nativeDrawBuffersExtension = this.renderer.context.extensions.drawBuffers; + var nativeDepthTextureExtension = this.renderer.context.extensions.depthTexture; + + if (settings.PREFER_ENV === exports.ENV.WEBGL_LEGACY) + { + nativeDrawBuffersExtension = null; + nativeDepthTextureExtension = null; + } + + if (nativeDrawBuffersExtension) + { + gl.drawBuffers = function (activeTextures) { return nativeDrawBuffersExtension.drawBuffersWEBGL(activeTextures); }; + } + else + { + this.hasMRT = false; + gl.drawBuffers = function () { + // empty + }; + } + + if (!nativeDepthTextureExtension) + { + this.writeDepthTexture = false; + } + } + }; + + /** + * Bind a framebuffer + * + * @param {PIXI.Framebuffer} framebuffer + * @param {PIXI.Rectangle} [frame] frame, default is framebuffer size + */ + FramebufferSystem.prototype.bind = function bind (framebuffer, frame) + { + var ref = this; + var gl = ref.gl; + + if (framebuffer) + { + // TODO caching layer! + + var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID] || this.initFramebuffer(framebuffer); + + if (this.current !== framebuffer) + { + this.current = framebuffer; + gl.bindFramebuffer(gl.FRAMEBUFFER, fbo.framebuffer); + } + // make sure all textures are unbound.. + + // now check for updates... + if (fbo.dirtyId !== framebuffer.dirtyId) + { + fbo.dirtyId = framebuffer.dirtyId; + + if (fbo.dirtyFormat !== framebuffer.dirtyFormat) + { + fbo.dirtyFormat = framebuffer.dirtyFormat; + this.updateFramebuffer(framebuffer); + } + else if (fbo.dirtySize !== framebuffer.dirtySize) + { + fbo.dirtySize = framebuffer.dirtySize; + this.resizeFramebuffer(framebuffer); + } + } + + for (var i = 0; i < framebuffer.colorTextures.length; i++) + { + if (framebuffer.colorTextures[i].texturePart) + { + this.renderer.texture.unbind(framebuffer.colorTextures[i].texture); + } + else + { + this.renderer.texture.unbind(framebuffer.colorTextures[i]); + } + } + + if (framebuffer.depthTexture) + { + this.renderer.texture.unbind(framebuffer.depthTexture); + } + + if (frame) + { + this.setViewport(frame.x, frame.y, frame.width, frame.height); + } + else + { + this.setViewport(0, 0, framebuffer.width, framebuffer.height); + } + } + else + { + if (this.current) + { + this.current = null; + gl.bindFramebuffer(gl.FRAMEBUFFER, null); + } + + if (frame) + { + this.setViewport(frame.x, frame.y, frame.width, frame.height); + } + else + { + this.setViewport(0, 0, this.renderer.width, this.renderer.height); + } + } + }; + + /** + * Set the WebGLRenderingContext's viewport. + * + * @param {Number} x - X position of viewport + * @param {Number} y - Y position of viewport + * @param {Number} width - Width of viewport + * @param {Number} height - Height of viewport + */ + FramebufferSystem.prototype.setViewport = function setViewport (x, y, width, height) + { + var v = this.viewport; + + if (v.width !== width || v.height !== height || v.x !== x || v.y !== y) + { + v.x = x; + v.y = y; + v.width = width; + v.height = height; + + this.gl.viewport(x, y, width, height); + } + }; + + /** + * Get the size of the current width and height. Returns object with `width` and `height` values. + * + * @member {object} + * @readonly + */ + prototypeAccessors.size.get = function () + { + if (this.current) + { + // TODO store temp + return { x: 0, y: 0, width: this.current.width, height: this.current.height }; + } + + return { x: 0, y: 0, width: this.renderer.width, height: this.renderer.height }; + }; + + /** + * Clear the color of the context + * + * @param {Number} r - Red value from 0 to 1 + * @param {Number} g - Green value from 0 to 1 + * @param {Number} b - Blue value from 0 to 1 + * @param {Number} a - Alpha value from 0 to 1 + */ + FramebufferSystem.prototype.clear = function clear (r, g, b, a) + { + var ref = this; + var gl = ref.gl; + + // TODO clear color can be set only one right? + gl.clearColor(r, g, b, a); + gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); + }; + + /** + * Initialize framebuffer + * + * @protected + * @param {PIXI.Framebuffer} framebuffer + */ + FramebufferSystem.prototype.initFramebuffer = function initFramebuffer (framebuffer) + { + var ref = this; + var gl = ref.gl; + + // TODO - make this a class? + var fbo = { + framebuffer: gl.createFramebuffer(), + stencil: null, + dirtyId: 0, + dirtyFormat: 0, + dirtySize: 0, + }; + + framebuffer.glFramebuffers[this.CONTEXT_UID] = fbo; + + this.managedFramebuffers.push(framebuffer); + framebuffer.disposeRunner.add(this); + + return fbo; + }; + + /** + * Resize the framebuffer + * + * @protected + * @param {PIXI.Framebuffer} framebuffer + */ + FramebufferSystem.prototype.resizeFramebuffer = function resizeFramebuffer (framebuffer) + { + var ref = this; + var gl = ref.gl; + + var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID]; + + if (fbo.stencil) + { + gl.bindRenderbuffer(gl.RENDERBUFFER, fbo.stencil); + gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, framebuffer.width, framebuffer.height); + } + + var colorTextures = framebuffer.colorTextures; + + for (var i = 0; i < colorTextures.length; i++) + { + this.renderer.texture.bind(colorTextures[i], 0); + } + + if (framebuffer.depthTexture) + { + this.renderer.texture.bind(framebuffer.depthTexture, 0); + } + }; + + /** + * Update the framebuffer + * + * @protected + * @param {PIXI.Framebuffer} framebuffer + */ + FramebufferSystem.prototype.updateFramebuffer = function updateFramebuffer (framebuffer) + { + var ref = this; + var gl = ref.gl; + + var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID]; + + // bind the color texture + var colorTextures = framebuffer.colorTextures; + + var count = colorTextures.length; + + if (!gl.drawBuffers) + { + count = Math.min(count, 1); + } + + var activeTextures = []; + + for (var i = 0; i < count; i++) + { + var texture = framebuffer.colorTextures[i]; + + if (texture.texturePart) + { + this.renderer.texture.bind(texture.texture, 0); + + gl.framebufferTexture2D(gl.FRAMEBUFFER, + gl.COLOR_ATTACHMENT0 + i, + gl.TEXTURE_CUBE_MAP_NEGATIVE_X + texture.side, + texture.texture._glTextures[this.CONTEXT_UID].texture, + 0); + } + else + { + this.renderer.texture.bind(texture, 0); + + gl.framebufferTexture2D(gl.FRAMEBUFFER, + gl.COLOR_ATTACHMENT0 + i, + gl.TEXTURE_2D, + texture._glTextures[this.CONTEXT_UID].texture, + 0); + } + + activeTextures.push(gl.COLOR_ATTACHMENT0 + i); + } + + if (activeTextures.length > 1) + { + gl.drawBuffers(activeTextures); + } + + if (framebuffer.depthTexture) + { + var writeDepthTexture = this.writeDepthTexture; + + if (writeDepthTexture) + { + var depthTexture = framebuffer.depthTexture; + + this.renderer.texture.bind(depthTexture, 0); + + gl.framebufferTexture2D(gl.FRAMEBUFFER, + gl.DEPTH_ATTACHMENT, + gl.TEXTURE_2D, + depthTexture._glTextures[this.CONTEXT_UID].texture, + 0); + } + } + + if (!fbo.stencil && (framebuffer.stencil || framebuffer.depth)) + { + fbo.stencil = gl.createRenderbuffer(); + + gl.bindRenderbuffer(gl.RENDERBUFFER, fbo.stencil); + + gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, framebuffer.width, framebuffer.height); + // TODO.. this is depth AND stencil? + if (!framebuffer.depthTexture) + { // you can't have both, so one should take priority if enabled + gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, fbo.stencil); + } + } + }; + + /** + * Disposes framebuffer + * @param {PIXI.Framebuffer} framebuffer framebuffer that has to be disposed of + * @param {boolean} [contextLost=false] If context was lost, we suppress all delete function calls + */ + FramebufferSystem.prototype.disposeFramebuffer = function disposeFramebuffer (framebuffer, contextLost) + { + var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID]; + var gl = this.gl; + + if (!fbo) + { + return; + } + + delete framebuffer.glFramebuffers[this.CONTEXT_UID]; + + var index = this.managedFramebuffers.indexOf(framebuffer); + + if (index >= 0) + { + this.managedFramebuffers.splice(index, 1); + } + + framebuffer.disposeRunner.remove(this); + + if (!contextLost) + { + gl.deleteFramebuffer(fbo.framebuffer); + if (fbo.stencil) + { + gl.deleteRenderbuffer(fbo.stencil); + } + } + }; + + /** + * Disposes all framebuffers, but not textures bound to them + * @param {boolean} [contextLost=false] If context was lost, we suppress all delete function calls + */ + FramebufferSystem.prototype.disposeAll = function disposeAll (contextLost) + { + var list = this.managedFramebuffers; + + this.managedFramebuffers = []; + + for (var i = 0; i < list.length; i++) + { + this.disposeFramebuffer(list[i], contextLost); + } + }; + + /** + * Forcing creation of stencil buffer for current framebuffer, if it wasn't done before. + * Used by MaskSystem, when its time to use stencil mask for Graphics element. + * + * Its an alternative for public lazy `framebuffer.enableStencil`, in case we need stencil without rebind. + * + * @private + */ + FramebufferSystem.prototype.forceStencil = function forceStencil () + { + var framebuffer = this.current; + + if (!framebuffer) + { + return; + } + + var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID]; + + if (!fbo || fbo.stencil) + { + return; + } + framebuffer.enableStencil(); + + var w = framebuffer.width; + var h = framebuffer.height; + var gl = this.gl; + var stencil = gl.createRenderbuffer(); + + gl.bindRenderbuffer(gl.RENDERBUFFER, stencil); + gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, w, h); + + fbo.stencil = stencil; + gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, stencil); + }; + + /** + * resets framebuffer stored state, binds screen framebuffer + * + * should be called before renderTexture reset() + */ + FramebufferSystem.prototype.reset = function reset () + { + this.current = this.unknownFramebuffer; + this.viewport = new Rectangle(); + }; + + Object.defineProperties( FramebufferSystem.prototype, prototypeAccessors ); + + return FramebufferSystem; + }(System)); + + var GLBuffer = function GLBuffer(buffer) + { + this.buffer = buffer; + this.updateID = -1; + this.byteLength = -1; + this.refCount = 0; + }; + + var byteSizeMap$1 = { 5126: 4, 5123: 2, 5121: 1 }; + + /** + * System plugin to the renderer to manage geometry. + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + var GeometrySystem = /*@__PURE__*/(function (System) { + function GeometrySystem(renderer) + { + System.call(this, renderer); + + this._activeGeometry = null; + this._activeVao = null; + + /** + * `true` if we has `*_vertex_array_object` extension + * @member {boolean} + * @readonly + */ + this.hasVao = true; + + /** + * `true` if has `ANGLE_instanced_arrays` extension + * @member {boolean} + * @readonly + */ + this.hasInstance = true; + + /** + * `true` if support `gl.UNSIGNED_INT` in `gl.drawElements` or `gl.drawElementsInstanced` + * @member {boolean} + * @readonly + */ + this.canUseUInt32ElementIndex = false; + + /** + * A cache of currently bound buffer, + * contains only two members with keys ARRAY_BUFFER and ELEMENT_ARRAY_BUFFER + * @member {Object.} + * @readonly + */ + this.boundBuffers = {}; + + /** + * Cache for all geometries by id, used in case renderer gets destroyed or for profiling + * @member {object} + * @readonly + */ + this.managedGeometries = {}; + + /** + * Cache for all buffers by id, used in case renderer gets destroyed or for profiling + * @member {object} + * @readonly + */ + this.managedBuffers = {}; + } + + if ( System ) { GeometrySystem.__proto__ = System; } + GeometrySystem.prototype = Object.create( System && System.prototype ); + GeometrySystem.prototype.constructor = GeometrySystem; + + /** + * Sets up the renderer context and necessary buffers. + */ + GeometrySystem.prototype.contextChange = function contextChange () + { + this.disposeAll(true); + + var gl = this.gl = this.renderer.gl; + var context = this.renderer.context; + + this.CONTEXT_UID = this.renderer.CONTEXT_UID; + + // webgl2 + if (!gl.createVertexArray) + { + // webgl 1! + var nativeVaoExtension = this.renderer.context.extensions.vertexArrayObject; + + if (settings.PREFER_ENV === exports.ENV.WEBGL_LEGACY) + { + nativeVaoExtension = null; + } + + if (nativeVaoExtension) + { + gl.createVertexArray = function () { return nativeVaoExtension.createVertexArrayOES(); }; + + gl.bindVertexArray = function (vao) { return nativeVaoExtension.bindVertexArrayOES(vao); }; + + gl.deleteVertexArray = function (vao) { return nativeVaoExtension.deleteVertexArrayOES(vao); }; + } + else + { + this.hasVao = false; + gl.createVertexArray = function () { + // empty + }; + + gl.bindVertexArray = function () { + // empty + }; + + gl.deleteVertexArray = function () { + // empty + }; + } + } + + if (!gl.vertexAttribDivisor) + { + var instanceExt = gl.getExtension('ANGLE_instanced_arrays'); + + if (instanceExt) + { + gl.vertexAttribDivisor = function (a, b) { return instanceExt.vertexAttribDivisorANGLE(a, b); }; + + gl.drawElementsInstanced = function (a, b, c, d, e) { return instanceExt.drawElementsInstancedANGLE(a, b, c, d, e); }; + + gl.drawArraysInstanced = function (a, b, c, d) { return instanceExt.drawArraysInstancedANGLE(a, b, c, d); }; + } + else + { + this.hasInstance = false; + } + } + + this.canUseUInt32ElementIndex = context.webGLVersion === 2 || !!context.extensions.uint32ElementIndex; + }; + + /** + * Binds geometry so that is can be drawn. Creating a Vao if required + * + * @param {PIXI.Geometry} geometry instance of geometry to bind + * @param {PIXI.Shader} [shader] instance of shader to use vao for + */ + GeometrySystem.prototype.bind = function bind (geometry, shader) + { + shader = shader || this.renderer.shader.shader; + + var ref = this; + var gl = ref.gl; + + // not sure the best way to address this.. + // currently different shaders require different VAOs for the same geometry + // Still mulling over the best way to solve this one.. + // will likely need to modify the shader attribute locations at run time! + var vaos = geometry.glVertexArrayObjects[this.CONTEXT_UID]; + + if (!vaos) + { + this.managedGeometries[geometry.id] = geometry; + geometry.disposeRunner.add(this); + geometry.glVertexArrayObjects[this.CONTEXT_UID] = vaos = {}; + } + + var vao = vaos[shader.program.id] || this.initGeometryVao(geometry, shader.program); + + this._activeGeometry = geometry; + + if (this._activeVao !== vao) + { + this._activeVao = vao; + + if (this.hasVao) + { + gl.bindVertexArray(vao); + } + else + { + this.activateVao(geometry, shader.program); + } + } + + // TODO - optimise later! + // don't need to loop through if nothing changed! + // maybe look to add an 'autoupdate' to geometry? + this.updateBuffers(); + }; + + /** + * Reset and unbind any active VAO and geometry + */ + GeometrySystem.prototype.reset = function reset () + { + this.unbind(); + }; + + /** + * Update buffers + * @protected + */ + GeometrySystem.prototype.updateBuffers = function updateBuffers () + { + var geometry = this._activeGeometry; + var ref = this; + var gl = ref.gl; + + for (var i = 0; i < geometry.buffers.length; i++) + { + var buffer = geometry.buffers[i]; + + var glBuffer = buffer._glBuffers[this.CONTEXT_UID]; + + if (buffer._updateID !== glBuffer.updateID) + { + glBuffer.updateID = buffer._updateID; + + // TODO can cache this on buffer! maybe added a getter / setter? + var type = buffer.index ? gl.ELEMENT_ARRAY_BUFFER : gl.ARRAY_BUFFER; + + // TODO this could change if the VAO changes... + // need to come up with a better way to cache.. + // if (this.boundBuffers[type] !== glBuffer) + // { + // this.boundBuffers[type] = glBuffer; + gl.bindBuffer(type, glBuffer.buffer); + // } + + this._boundBuffer = glBuffer; + + if (glBuffer.byteLength >= buffer.data.byteLength) + { + // offset is always zero for now! + gl.bufferSubData(type, 0, buffer.data); + } + else + { + var drawType = buffer.static ? gl.STATIC_DRAW : gl.DYNAMIC_DRAW; + + glBuffer.byteLength = buffer.data.byteLength; + gl.bufferData(type, buffer.data, drawType); + } + } + } + }; + + /** + * Check compability between a geometry and a program + * @protected + * @param {PIXI.Geometry} geometry - Geometry instance + * @param {PIXI.Program} program - Program instance + */ + GeometrySystem.prototype.checkCompatibility = function checkCompatibility (geometry, program) + { + // geometry must have at least all the attributes that the shader requires. + var geometryAttributes = geometry.attributes; + var shaderAttributes = program.attributeData; + + for (var j in shaderAttributes) + { + if (!geometryAttributes[j]) + { + throw new Error(("shader and geometry incompatible, geometry missing the \"" + j + "\" attribute")); + } + } + }; + + /** + * Takes a geometry and program and generates a unique signature for them. + * + * @param {PIXI.Geometry} geometry to get signature from + * @param {PIXI.Program} program to test geometry against + * @returns {String} Unique signature of the geometry and program + * @protected + */ + GeometrySystem.prototype.getSignature = function getSignature (geometry, program) + { + var attribs = geometry.attributes; + var shaderAttributes = program.attributeData; + + var strings = ['g', geometry.id]; + + for (var i in attribs) + { + if (shaderAttributes[i]) + { + strings.push(i); + } + } + + return strings.join('-'); + }; + + /** + * Creates or gets Vao with the same structure as the geometry and stores it on the geometry. + * If vao is created, it is bound automatically. + * + * @protected + * @param {PIXI.Geometry} geometry - Instance of geometry to to generate Vao for + * @param {PIXI.Program} program - Instance of program + */ + GeometrySystem.prototype.initGeometryVao = function initGeometryVao (geometry, program) + { + this.checkCompatibility(geometry, program); + + var gl = this.gl; + var CONTEXT_UID = this.CONTEXT_UID; + + var signature = this.getSignature(geometry, program); + + var vaoObjectHash = geometry.glVertexArrayObjects[this.CONTEXT_UID]; + + var vao = vaoObjectHash[signature]; + + if (vao) + { + // this will give us easy access to the vao + vaoObjectHash[program.id] = vao; + + return vao; + } + + var buffers = geometry.buffers; + var attributes = geometry.attributes; + var tempStride = {}; + var tempStart = {}; + + for (var j in buffers) + { + tempStride[j] = 0; + tempStart[j] = 0; + } + + for (var j$1 in attributes) + { + if (!attributes[j$1].size && program.attributeData[j$1]) + { + attributes[j$1].size = program.attributeData[j$1].size; + } + else if (!attributes[j$1].size) + { + console.warn(("PIXI Geometry attribute '" + j$1 + "' size cannot be determined (likely the bound shader does not have the attribute)")); // eslint-disable-line + } + + tempStride[attributes[j$1].buffer] += attributes[j$1].size * byteSizeMap$1[attributes[j$1].type]; + } + + for (var j$2 in attributes) + { + var attribute = attributes[j$2]; + var attribSize = attribute.size; + + if (attribute.stride === undefined) + { + if (tempStride[attribute.buffer] === attribSize * byteSizeMap$1[attribute.type]) + { + attribute.stride = 0; + } + else + { + attribute.stride = tempStride[attribute.buffer]; + } + } + + if (attribute.start === undefined) + { + attribute.start = tempStart[attribute.buffer]; + + tempStart[attribute.buffer] += attribSize * byteSizeMap$1[attribute.type]; + } + } + + vao = gl.createVertexArray(); + + gl.bindVertexArray(vao); + + // first update - and create the buffers! + // only create a gl buffer if it actually gets + for (var i = 0; i < buffers.length; i++) + { + var buffer = buffers[i]; + + if (!buffer._glBuffers[CONTEXT_UID]) + { + buffer._glBuffers[CONTEXT_UID] = new GLBuffer(gl.createBuffer()); + this.managedBuffers[buffer.id] = buffer; + buffer.disposeRunner.add(this); + } + + buffer._glBuffers[CONTEXT_UID].refCount++; + } + + // TODO - maybe make this a data object? + // lets wait to see if we need to first! + + this.activateVao(geometry, program); + + this._activeVao = vao; + + // add it to the cache! + vaoObjectHash[program.id] = vao; + vaoObjectHash[signature] = vao; + + return vao; + }; + + /** + * Disposes buffer + * @param {PIXI.Buffer} buffer buffer with data + * @param {boolean} [contextLost=false] If context was lost, we suppress deleteVertexArray + */ + GeometrySystem.prototype.disposeBuffer = function disposeBuffer (buffer, contextLost) + { + if (!this.managedBuffers[buffer.id]) + { + return; + } + + delete this.managedBuffers[buffer.id]; + + var glBuffer = buffer._glBuffers[this.CONTEXT_UID]; + var gl = this.gl; + + buffer.disposeRunner.remove(this); + + if (!glBuffer) + { + return; + } + + if (!contextLost) + { + gl.deleteBuffer(glBuffer.buffer); + } + + delete buffer._glBuffers[this.CONTEXT_UID]; + }; + + /** + * Disposes geometry + * @param {PIXI.Geometry} geometry Geometry with buffers. Only VAO will be disposed + * @param {boolean} [contextLost=false] If context was lost, we suppress deleteVertexArray + */ + GeometrySystem.prototype.disposeGeometry = function disposeGeometry (geometry, contextLost) + { + if (!this.managedGeometries[geometry.id]) + { + return; + } + + delete this.managedGeometries[geometry.id]; + + var vaos = geometry.glVertexArrayObjects[this.CONTEXT_UID]; + var gl = this.gl; + var buffers = geometry.buffers; + + geometry.disposeRunner.remove(this); + + if (!vaos) + { + return; + } + + for (var i = 0; i < buffers.length; i++) + { + var buf = buffers[i]._glBuffers[this.CONTEXT_UID]; + + buf.refCount--; + if (buf.refCount === 0 && !contextLost) + { + this.disposeBuffer(buffers[i], contextLost); + } + } + + if (!contextLost) + { + for (var vaoId in vaos) + { + // delete only signatures, everything else are copies + if (vaoId[0] === 'g') + { + var vao = vaos[vaoId]; + + if (this._activeVao === vao) + { + this.unbind(); + } + gl.deleteVertexArray(vao); + } + } + } + + delete geometry.glVertexArrayObjects[this.CONTEXT_UID]; + }; + + /** + * dispose all WebGL resources of all managed geometries and buffers + * @param {boolean} [contextLost=false] If context was lost, we suppress `gl.delete` calls + */ + GeometrySystem.prototype.disposeAll = function disposeAll (contextLost) + { + var all = Object.keys(this.managedGeometries); + + for (var i = 0; i < all.length; i++) + { + this.disposeGeometry(this.managedGeometries[all[i]], contextLost); + } + all = Object.keys(this.managedBuffers); + for (var i$1 = 0; i$1 < all.length; i$1++) + { + this.disposeBuffer(this.managedBuffers[all[i$1]], contextLost); + } + }; + + /** + * Activate vertex array object + * + * @protected + * @param {PIXI.Geometry} geometry - Geometry instance + * @param {PIXI.Program} program - Shader program instance + */ + GeometrySystem.prototype.activateVao = function activateVao (geometry, program) + { + var gl = this.gl; + var CONTEXT_UID = this.CONTEXT_UID; + var buffers = geometry.buffers; + var attributes = geometry.attributes; + + if (geometry.indexBuffer) + { + // first update the index buffer if we have one.. + gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, geometry.indexBuffer._glBuffers[CONTEXT_UID].buffer); + } + + var lastBuffer = null; + + // add a new one! + for (var j in attributes) + { + var attribute = attributes[j]; + var buffer = buffers[attribute.buffer]; + var glBuffer = buffer._glBuffers[CONTEXT_UID]; + + if (program.attributeData[j]) + { + if (lastBuffer !== glBuffer) + { + gl.bindBuffer(gl.ARRAY_BUFFER, glBuffer.buffer); + + lastBuffer = glBuffer; + } + + var location = program.attributeData[j].location; + + // TODO introduce state again + // we can optimise this for older devices that have no VAOs + gl.enableVertexAttribArray(location); + + gl.vertexAttribPointer(location, + attribute.size, + attribute.type || gl.FLOAT, + attribute.normalized, + attribute.stride, + attribute.start); + + if (attribute.instance) + { + // TODO calculate instance count based of this... + if (this.hasInstance) + { + gl.vertexAttribDivisor(location, 1); + } + else + { + throw new Error('geometry error, GPU Instancing is not supported on this device'); + } + } + } + } + }; + + /** + * Draw the geometry + * + * @param {Number} type - the type primitive to render + * @param {Number} [size] - the number of elements to be rendered + * @param {Number} [start] - Starting index + * @param {Number} [instanceCount] - the number of instances of the set of elements to execute + */ + GeometrySystem.prototype.draw = function draw (type, size, start, instanceCount) + { + var ref = this; + var gl = ref.gl; + var geometry = this._activeGeometry; + + // TODO.. this should not change so maybe cache the function? + + if (geometry.indexBuffer) + { + var byteSize = geometry.indexBuffer.data.BYTES_PER_ELEMENT; + var glType = byteSize === 2 ? gl.UNSIGNED_SHORT : gl.UNSIGNED_INT; + + if (byteSize === 2 || (byteSize === 4 && this.canUseUInt32ElementIndex)) + { + if (geometry.instanced) + { + /* eslint-disable max-len */ + gl.drawElementsInstanced(type, size || geometry.indexBuffer.data.length, glType, (start || 0) * byteSize, instanceCount || 1); + /* eslint-enable max-len */ + } + else + { + /* eslint-disable max-len */ + gl.drawElements(type, size || geometry.indexBuffer.data.length, glType, (start || 0) * byteSize); + /* eslint-enable max-len */ + } + } + else + { + console.warn('unsupported index buffer type: uint32'); + } + } + else if (geometry.instanced) + { + // TODO need a better way to calculate size.. + gl.drawArraysInstanced(type, start, size || geometry.getSize(), instanceCount || 1); + } + else + { + gl.drawArrays(type, start, size || geometry.getSize()); + } + + return this; + }; + + /** + * Unbind/reset everything + * @protected + */ + GeometrySystem.prototype.unbind = function unbind () + { + this.gl.bindVertexArray(null); + this._activeVao = null; + this._activeGeometry = null; + }; + + return GeometrySystem; + }(System)); + + /** + * Component for masked elements + * + * Holds mask mode and temporary data about current mask + * + * @class + * @memberof PIXI + */ + var MaskData = function MaskData(maskObject) + { + /** + * Mask type + * @member {PIXI.MASK_TYPES} + */ + this.type = exports.MASK_TYPES.NONE; + + /** + * Whether we know the mask type beforehand + * @member {boolean} + * @default true + */ + this.autoDetect = true; + + /** + * Which element we use to mask + * @member {PIXI.DisplayObject} + */ + this.maskObject = maskObject || null; + + /** + * Whether it belongs to MaskSystem pool + * @member {boolean} + */ + this.pooled = false; + + /** + * Indicator of the type + * @member {boolean} + */ + this.isMaskData = true; + + /** + * Stencil counter above the mask in stack + * @member {number} + * @private + */ + this._stencilCounter = 0; + /** + * Scissor counter above the mask in stack + * @member {number} + * @private + */ + this._scissorCounter = 0; + + /** + * Scissor operation above the mask in stack. + * Null if _scissorCounter is zero, rectangle instance if positive. + * @member {PIXI.Rectangle} + */ + this._scissorRect = null; + + /** + * Targeted element. Temporary variable set by MaskSystem + * @member {PIXI.DisplayObject} + * @private + */ + this._target = null; + }; + + /** + * resets the mask data after popMask() + */ + MaskData.prototype.reset = function reset () + { + if (this.pooled) + { + this.maskObject = null; + + this.type = exports.MASK_TYPES.NONE; + + this.autoDetect = true; + } + + this._target = null; + }; + + /** + * copies counters from maskData above, called from pushMask() + * @param {PIXI.MaskData|null} maskAbove + */ + MaskData.prototype.copyCountersOrReset = function copyCountersOrReset (maskAbove) + { + if (maskAbove) + { + this._stencilCounter = maskAbove._stencilCounter; + this._scissorCounter = maskAbove._scissorCounter; + this._scissorRect = maskAbove._scissorRect; + } + else + { + this._stencilCounter = 0; + this._scissorCounter = 0; + this._scissorRect = null; + } + }; + + /** + * @method compileProgram + * @private + * @memberof PIXI.glCore.shader + * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram} + * @param vertexSrc {string|string[]} The vertex shader source as an array of strings. + * @param fragmentSrc {string|string[]} The fragment shader source as an array of strings. + * @param attributeLocations {Object} An attribute location map that lets you manually set the attribute locations + * @return {WebGLProgram} the shader program + */ + function compileProgram(gl, vertexSrc, fragmentSrc, attributeLocations) + { + var glVertShader = compileShader(gl, gl.VERTEX_SHADER, vertexSrc); + var glFragShader = compileShader(gl, gl.FRAGMENT_SHADER, fragmentSrc); + + var program = gl.createProgram(); + + gl.attachShader(program, glVertShader); + gl.attachShader(program, glFragShader); + + // optionally, set the attributes manually for the program rather than letting WebGL decide.. + if (attributeLocations) + { + for (var i in attributeLocations) + { + gl.bindAttribLocation(program, attributeLocations[i], i); + } + } + + gl.linkProgram(program); + + // if linking fails, then log and cleanup + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) + { + if (!gl.getShaderParameter(glVertShader, gl.COMPILE_STATUS)) + { + console.warn(vertexSrc); + console.error(gl.getShaderInfoLog(glVertShader)); + } + + if (!gl.getShaderParameter(glFragShader, gl.COMPILE_STATUS)) + { + console.warn(fragmentSrc); + console.error(gl.getShaderInfoLog(glFragShader)); + } + + console.error('Pixi.js Error: Could not initialize shader.'); + console.error('gl.VALIDATE_STATUS', gl.getProgramParameter(program, gl.VALIDATE_STATUS)); + console.error('gl.getError()', gl.getError()); + + // if there is a program info log, log it + if (gl.getProgramInfoLog(program) !== '') + { + console.warn('Pixi.js Warning: gl.getProgramInfoLog()', gl.getProgramInfoLog(program)); + } + + gl.deleteProgram(program); + program = null; + } + + // clean up some shaders + gl.deleteShader(glVertShader); + gl.deleteShader(glFragShader); + + return program; + } + + /** + * @private + * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram} + * @param type {Number} the type, can be either VERTEX_SHADER or FRAGMENT_SHADER + * @param vertexSrc {string|string[]} The vertex shader source as an array of strings. + * @return {WebGLShader} the shader + */ + function compileShader(gl, type, src) + { + var shader = gl.createShader(type); + + gl.shaderSource(shader, src); + gl.compileShader(shader); + + return shader; + } + + /** + * @method defaultValue + * @memberof PIXI.glCore.shader + * @param type {String} Type of value + * @param size {Number} + * @private + */ + function defaultValue(type, size) + { + switch (type) + { + case 'float': + return 0; + + case 'vec2': + return new Float32Array(2 * size); + + case 'vec3': + return new Float32Array(3 * size); + + case 'vec4': + return new Float32Array(4 * size); + + case 'int': + case 'sampler2D': + case 'sampler2DArray': + return 0; + + case 'ivec2': + return new Int32Array(2 * size); + + case 'ivec3': + return new Int32Array(3 * size); + + case 'ivec4': + return new Int32Array(4 * size); + + case 'bool': + return false; + + case 'bvec2': + + return booleanArray(2 * size); + + case 'bvec3': + return booleanArray(3 * size); + + case 'bvec4': + return booleanArray(4 * size); + + case 'mat2': + return new Float32Array([1, 0, + 0, 1]); + + case 'mat3': + return new Float32Array([1, 0, 0, + 0, 1, 0, + 0, 0, 1]); + + case 'mat4': + return new Float32Array([1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1]); + } + + return null; + } + + function booleanArray(size) + { + var array = new Array(size); + + for (var i = 0; i < array.length; i++) + { + array[i] = false; + } + + return array; + } + + var unknownContext = {}; + var context = unknownContext; + + /** + * returns a little WebGL context to use for program inspection. + * + * @static + * @private + * @returns {WebGLRenderingContext} a gl context to test with + */ + function getTestContext() + { + if (context === unknownContext || (context && context.isContextLost())) + { + var canvas = document.createElement('canvas'); + + var gl; + + if (settings.PREFER_ENV >= exports.ENV.WEBGL2) + { + gl = canvas.getContext('webgl2', {}); + } + + if (!gl) + { + gl = canvas.getContext('webgl', {}) + || canvas.getContext('experimental-webgl', {}); + + if (!gl) + { + // fail, not able to get a context + gl = null; + } + else + { + // for shader testing.. + gl.getExtension('WEBGL_draw_buffers'); + } + } + + context = gl; + } + + return context; + } + + var maxFragmentPrecision; + + function getMaxFragmentPrecision() + { + if (!maxFragmentPrecision) + { + maxFragmentPrecision = exports.PRECISION.MEDIUM; + var gl = getTestContext(); + + if (gl) + { + if (gl.getShaderPrecisionFormat) + { + var shaderFragment = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT); + + maxFragmentPrecision = shaderFragment.precision ? exports.PRECISION.HIGH : exports.PRECISION.MEDIUM; + } + } + } + + return maxFragmentPrecision; + } + + /** + * Sets the float precision on the shader, ensuring the device supports the request precision. + * If the precision is already present, it just ensures that the device is able to handle it. + * + * @private + * @param {string} src - The shader source + * @param {string} requestedPrecision - The request float precision of the shader. Options are 'lowp', 'mediump' or 'highp'. + * @param {string} maxSupportedPrecision - The maximum precision the shader supports. + * + * @return {string} modified shader source + */ + function setPrecision(src, requestedPrecision, maxSupportedPrecision) + { + if (src.substring(0, 9) !== 'precision') + { + // no precision supplied, so PixiJS will add the requested level. + var precision = requestedPrecision; + + // If highp is requested but not supported, downgrade precision to a level all devices support. + if (requestedPrecision === exports.PRECISION.HIGH && maxSupportedPrecision !== exports.PRECISION.HIGH) + { + precision = exports.PRECISION.MEDIUM; + } + + return ("precision " + precision + " float;\n" + src); + } + else if (maxSupportedPrecision !== exports.PRECISION.HIGH && src.substring(0, 15) === 'precision highp') + { + // precision was supplied, but at a level this device does not support, so downgrading to mediump. + return src.replace('precision highp', 'precision mediump'); + } + + return src; + } + + var GLSL_TO_SIZE = { + float: 1, + vec2: 2, + vec3: 3, + vec4: 4, + + int: 1, + ivec2: 2, + ivec3: 3, + ivec4: 4, + + bool: 1, + bvec2: 2, + bvec3: 3, + bvec4: 4, + + mat2: 4, + mat3: 9, + mat4: 16, + + sampler2D: 1, + }; + + /** + * @private + * @method mapSize + * @memberof PIXI.glCore.shader + * @param type {String} + * @return {Number} + */ + function mapSize(type) + { + return GLSL_TO_SIZE[type]; + } + + var GL_TABLE = null; + + var GL_TO_GLSL_TYPES = { + FLOAT: 'float', + FLOAT_VEC2: 'vec2', + FLOAT_VEC3: 'vec3', + FLOAT_VEC4: 'vec4', + + INT: 'int', + INT_VEC2: 'ivec2', + INT_VEC3: 'ivec3', + INT_VEC4: 'ivec4', + + BOOL: 'bool', + BOOL_VEC2: 'bvec2', + BOOL_VEC3: 'bvec3', + BOOL_VEC4: 'bvec4', + + FLOAT_MAT2: 'mat2', + FLOAT_MAT3: 'mat3', + FLOAT_MAT4: 'mat4', + + SAMPLER_2D: 'sampler2D', + SAMPLER_CUBE: 'samplerCube', + SAMPLER_2D_ARRAY: 'sampler2DArray', + }; + + function mapType(gl, type) + { + if (!GL_TABLE) + { + var typeNames = Object.keys(GL_TO_GLSL_TYPES); + + GL_TABLE = {}; + + for (var i = 0; i < typeNames.length; ++i) + { + var tn = typeNames[i]; + + GL_TABLE[gl[tn]] = GL_TO_GLSL_TYPES[tn]; + } + } + + return GL_TABLE[type]; + } + + // cv = CachedValue + // v = value + // ud = uniformData + // uv = uniformValue + // l = location + var GLSL_TO_SINGLE_SETTERS_CACHED = { + + float: "\n if(cv !== v)\n {\n cv.v = v;\n gl.uniform1f(location, v)\n }", + + vec2: "\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(location, v[0], v[1])\n }", + + vec3: "\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }", + + vec4: 'gl.uniform4f(location, v[0], v[1], v[2], v[3])', + + int: 'gl.uniform1i(location, v)', + ivec2: 'gl.uniform2i(location, v[0], v[1])', + ivec3: 'gl.uniform3i(location, v[0], v[1], v[2])', + ivec4: 'gl.uniform4i(location, v[0], v[1], v[2], v[3])', + + bool: 'gl.uniform1i(location, v)', + bvec2: 'gl.uniform2i(location, v[0], v[1])', + bvec3: 'gl.uniform3i(location, v[0], v[1], v[2])', + bvec4: 'gl.uniform4i(location, v[0], v[1], v[2], v[3])', + + mat2: 'gl.uniformMatrix2fv(location, false, v)', + mat3: 'gl.uniformMatrix3fv(location, false, v)', + mat4: 'gl.uniformMatrix4fv(location, false, v)', + + sampler2D: 'gl.uniform1i(location, v)', + samplerCube: 'gl.uniform1i(location, v)', + sampler2DArray: 'gl.uniform1i(location, v)', + }; + + var GLSL_TO_ARRAY_SETTERS = { + + float: "gl.uniform1fv(location, v)", + + vec2: "gl.uniform2fv(location, v)", + vec3: "gl.uniform3fv(location, v)", + vec4: 'gl.uniform4fv(location, v)', + + mat4: 'gl.uniformMatrix4fv(location, false, v)', + mat3: 'gl.uniformMatrix3fv(location, false, v)', + mat2: 'gl.uniformMatrix2fv(location, false, v)', + + int: 'gl.uniform1iv(location, v)', + ivec2: 'gl.uniform2iv(location, v)', + ivec3: 'gl.uniform3iv(location, v)', + ivec4: 'gl.uniform4iv(location, v)', + + bool: 'gl.uniform1iv(location, v)', + bvec2: 'gl.uniform2iv(location, v)', + bvec3: 'gl.uniform3iv(location, v)', + bvec4: 'gl.uniform4iv(location, v)', + + sampler2D: 'gl.uniform1iv(location, v)', + samplerCube: 'gl.uniform1iv(location, v)', + sampler2DArray: 'gl.uniform1iv(location, v)', + }; + + function generateUniformsSync(group, uniformData) + { + var func = "var v = null;\n var cv = null\n var t = 0;\n var gl = renderer.gl\n "; + + for (var i in group.uniforms) + { + var data = uniformData[i]; + + if (!data) + { + if (group.uniforms[i].group) + { + func += "\n renderer.shader.syncUniformGroup(uv." + i + ", syncData);\n "; + } + + continue; + } + + // TODO && uniformData[i].value !== 0 <-- do we still need this? + if (data.type === 'float' && data.size === 1) + { + func += "\n if(uv." + i + " !== ud." + i + ".value)\n {\n ud." + i + ".value = uv." + i + "\n gl.uniform1f(ud." + i + ".location, uv." + i + ")\n }\n"; + } + /* eslint-disable max-len */ + else if ((data.type === 'sampler2D' || data.type === 'samplerCube' || data.type === 'sampler2DArray') && data.size === 1 && !data.isArray) + /* eslint-disable max-len */ + { + func += "\n\n t = syncData.textureCount++;\n\n renderer.texture.bind(uv." + i + ", t);\n \n if(ud." + i + ".value !== t)\n {\n ud." + i + ".value = t;\n gl.uniform1i(ud." + i + ".location, t);\n; // eslint-disable-line max-len\n }\n"; + } + else if (data.type === 'mat3' && data.size === 1) + { + if (group.uniforms[i].a !== undefined) + { + // TODO and some smart caching dirty ids here! + func += "\n gl.uniformMatrix3fv(ud." + i + ".location, false, uv." + i + ".toArray(true));\n \n"; + } + else + { + func += "\n gl.uniformMatrix3fv(ud." + i + ".location, false, uv." + i + ");\n \n"; + } + } + else if (data.type === 'vec2' && data.size === 1) + { + // TODO - do we need both here? + // maybe we can get away with only using points? + if (group.uniforms[i].x !== undefined) + { + func += "\n cv = ud." + i + ".value;\n v = uv." + i + ";\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud." + i + ".location, v.x, v.y);\n }\n"; + } + else + { + func += "\n cv = ud." + i + ".value;\n v = uv." + i + ";\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud." + i + ".location, v[0], v[1]);\n }\n \n"; + } + } + else if (data.type === 'vec4' && data.size === 1) + { + // TODO - do we need both here? + // maybe we can get away with only using points? + if (group.uniforms[i].width !== undefined) + { + func += "\n cv = ud." + i + ".value;\n v = uv." + i + ";\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud." + i + ".location, v.x, v.y, v.width, v.height)\n }\n"; + } + else + { + func += "\n cv = ud." + i + ".value;\n v = uv." + i + ";\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud." + i + ".location, v[0], v[1], v[2], v[3])\n }\n \n"; + } + } + else + { + var templateType = (data.size === 1) ? GLSL_TO_SINGLE_SETTERS_CACHED : GLSL_TO_ARRAY_SETTERS; + + var template = templateType[data.type].replace('location', ("ud." + i + ".location")); + + func += "\n cv = ud." + i + ".value;\n v = uv." + i + ";\n " + template + ";\n"; + } + } + + /** + * the introduction of syncData is to solve an issue where textures in uniform groups are not set correctly + * the texture count was always starting from 0 in each group. This needs to increment each time a texture is used + * no matter which group is being used + * + */ + return new Function('ud', 'uv', 'renderer', 'syncData', func); // eslint-disable-line no-new-func + } + + var fragTemplate = [ + 'precision mediump float;', + 'void main(void){', + 'float test = 0.1;', + '%forloop%', + 'gl_FragColor = vec4(0.0);', + '}' ].join('\n'); + + function checkMaxIfStatementsInShader(maxIfs, gl) + { + if (maxIfs === 0) + { + throw new Error('Invalid value of `0` passed to `checkMaxIfStatementsInShader`'); + } + + var shader = gl.createShader(gl.FRAGMENT_SHADER); + + while (true) // eslint-disable-line no-constant-condition + { + var fragmentSrc = fragTemplate.replace(/%forloop%/gi, generateIfTestSrc(maxIfs)); + + gl.shaderSource(shader, fragmentSrc); + gl.compileShader(shader); + + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) + { + maxIfs = (maxIfs / 2) | 0; + } + else + { + // valid! + break; + } + } + + return maxIfs; + } + + function generateIfTestSrc(maxIfs) + { + var src = ''; + + for (var i = 0; i < maxIfs; ++i) + { + if (i > 0) + { + src += '\nelse '; + } + + if (i < maxIfs - 1) + { + src += "if(test == " + i + ".0){}"; + } + } + + return src; + } + + // Cache the result to prevent running this over and over + var unsafeEval; + + /** + * Not all platforms allow to generate function code (e.g., `new Function`). + * this provides the platform-level detection. + * + * @private + * @returns {boolean} + */ + function unsafeEvalSupported() + { + if (typeof unsafeEval === 'boolean') + { + return unsafeEval; + } + + try + { + /* eslint-disable no-new-func */ + var func = new Function('param1', 'param2', 'param3', 'return param1[param2] === param3;'); + /* eslint-enable no-new-func */ + + unsafeEval = func({ a: 'b' }, 'a', 'b') === true; + } + catch (e) + { + unsafeEval = false; + } + + return unsafeEval; + } + + var defaultFragment = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}"; + + var defaultVertex = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n"; + + // import * as from '../systems/shader/shader'; + + var UID$3 = 0; + + var nameCache = {}; + + /** + * Helper class to create a shader program. + * + * @class + * @memberof PIXI + */ + var Program = function Program(vertexSrc, fragmentSrc, name) + { + if ( name === void 0 ) { name = 'pixi-shader'; } + + this.id = UID$3++; + + /** + * The vertex shader. + * + * @member {string} + */ + this.vertexSrc = vertexSrc || Program.defaultVertexSrc; + + /** + * The fragment shader. + * + * @member {string} + */ + this.fragmentSrc = fragmentSrc || Program.defaultFragmentSrc; + + this.vertexSrc = this.vertexSrc.trim(); + this.fragmentSrc = this.fragmentSrc.trim(); + + if (this.vertexSrc.substring(0, 8) !== '#version') + { + name = name.replace(/\s+/g, '-'); + + if (nameCache[name]) + { + nameCache[name]++; + name += "-" + (nameCache[name]); + } + else + { + nameCache[name] = 1; + } + + this.vertexSrc = "#define SHADER_NAME " + name + "\n" + (this.vertexSrc); + this.fragmentSrc = "#define SHADER_NAME " + name + "\n" + (this.fragmentSrc); + + this.vertexSrc = setPrecision(this.vertexSrc, settings.PRECISION_VERTEX, exports.PRECISION.HIGH); + this.fragmentSrc = setPrecision(this.fragmentSrc, settings.PRECISION_FRAGMENT, getMaxFragmentPrecision()); + } + + // currently this does not extract structs only default types + this.extractData(this.vertexSrc, this.fragmentSrc); + + // this is where we store shader references.. + this.glPrograms = {}; + + this.syncUniforms = null; + }; + + var staticAccessors = { defaultVertexSrc: { configurable: true },defaultFragmentSrc: { configurable: true } }; + + /** + * Extracts the data for a buy creating a small test program + * or reading the src directly. + * @protected + * + * @param {string} [vertexSrc] - The source of the vertex shader. + * @param {string} [fragmentSrc] - The source of the fragment shader. + */ + Program.prototype.extractData = function extractData (vertexSrc, fragmentSrc) + { + var gl = getTestContext(); + + if (gl) + { + var program = compileProgram(gl, vertexSrc, fragmentSrc); + + this.attributeData = this.getAttributeData(program, gl); + this.uniformData = this.getUniformData(program, gl); + + gl.deleteProgram(program); + } + else + { + this.uniformData = {}; + this.attributeData = {}; + } + }; + + /** + * returns the attribute data from the program + * @private + * + * @param {WebGLProgram} [program] - the WebGL program + * @param {WebGLRenderingContext} [gl] - the WebGL context + * + * @returns {object} the attribute data for this program + */ + Program.prototype.getAttributeData = function getAttributeData (program, gl) + { + var attributes = {}; + var attributesArray = []; + + var totalAttributes = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES); + + for (var i = 0; i < totalAttributes; i++) + { + var attribData = gl.getActiveAttrib(program, i); + var type = mapType(gl, attribData.type); + + /*eslint-disable */ + var data = { + type: type, + name: attribData.name, + size: mapSize(type), + location: 0, + }; + /* eslint-enable */ + + attributes[attribData.name] = data; + attributesArray.push(data); + } + + attributesArray.sort(function (a, b) { return (a.name > b.name) ? 1 : -1; }); // eslint-disable-line no-confusing-arrow + + for (var i$1 = 0; i$1 < attributesArray.length; i$1++) + { + attributesArray[i$1].location = i$1; + } + + return attributes; + }; + + /** + * returns the uniform data from the program + * @private + * + * @param {webGL-program} [program] - the webgl program + * @param {context} [gl] - the WebGL context + * + * @returns {object} the uniform data for this program + */ + Program.prototype.getUniformData = function getUniformData (program, gl) + { + var uniforms = {}; + + var totalUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS); + + // TODO expose this as a prop? + // const maskRegex = new RegExp('^(projectionMatrix|uSampler|translationMatrix)$'); + // const maskRegex = new RegExp('^(projectionMatrix|uSampler|translationMatrix)$'); + + for (var i = 0; i < totalUniforms; i++) + { + var uniformData = gl.getActiveUniform(program, i); + var name = uniformData.name.replace(/\[.*?\]/, ''); + + var isArray = uniformData.name.match(/\[.*?\]/, ''); + var type = mapType(gl, uniformData.type); + + /*eslint-disable */ + uniforms[name] = { + type: type, + size: uniformData.size, + isArray:isArray, + value: defaultValue(type, uniformData.size), + }; + /* eslint-enable */ + } + + return uniforms; + }; + + /** + * The default vertex shader source + * + * @static + * @constant + * @member {string} + */ + staticAccessors.defaultVertexSrc.get = function () + { + return defaultVertex; + }; + + /** + * The default fragment shader source + * + * @static + * @constant + * @member {string} + */ + staticAccessors.defaultFragmentSrc.get = function () + { + return defaultFragment; + }; + + /** + * A short hand function to create a program based of a vertex and fragment shader + * this method will also check to see if there is a cached program. + * + * @param {string} [vertexSrc] - The source of the vertex shader. + * @param {string} [fragmentSrc] - The source of the fragment shader. + * @param {string} [name=pixi-shader] - Name for shader + * + * @returns {PIXI.Program} an shiny new Pixi shader! + */ + Program.from = function from (vertexSrc, fragmentSrc, name) + { + var key = vertexSrc + fragmentSrc; + + var program = ProgramCache[key]; + + if (!program) + { + ProgramCache[key] = program = new Program(vertexSrc, fragmentSrc, name); + } + + return program; + }; + + Object.defineProperties( Program, staticAccessors ); + + /** + * A helper class for shaders + * + * @class + * @memberof PIXI + */ + var Shader = function Shader(program, uniforms) + { + /** + * Program that the shader uses + * + * @member {PIXI.Program} + */ + this.program = program; + + // lets see whats been passed in + // uniforms should be converted to a uniform group + if (uniforms) + { + if (uniforms instanceof UniformGroup) + { + this.uniformGroup = uniforms; + } + else + { + this.uniformGroup = new UniformGroup(uniforms); + } + } + else + { + this.uniformGroup = new UniformGroup({}); + } + + // time to build some getters and setters! + // I guess down the line this could sort of generate an instruction list rather than use dirty ids? + // does the trick for now though! + for (var i in program.uniformData) + { + if (this.uniformGroup.uniforms[i] instanceof Array) + { + this.uniformGroup.uniforms[i] = new Float32Array(this.uniformGroup.uniforms[i]); + } + } + }; + + var prototypeAccessors$2$1 = { uniforms: { configurable: true } }; + + // TODO move to shader system.. + Shader.prototype.checkUniformExists = function checkUniformExists (name, group) + { + if (group.uniforms[name]) + { + return true; + } + + for (var i in group.uniforms) + { + var uniform = group.uniforms[i]; + + if (uniform.group) + { + if (this.checkUniformExists(name, uniform)) + { + return true; + } + } + } + + return false; + }; + + Shader.prototype.destroy = function destroy () + { + // usage count on programs? + // remove if not used! + this.uniformGroup = null; + }; + + /** + * Shader uniform values, shortcut for `uniformGroup.uniforms` + * @readonly + * @member {object} + */ + prototypeAccessors$2$1.uniforms.get = function () + { + return this.uniformGroup.uniforms; + }; + + /** + * A short hand function to create a shader based of a vertex and fragment shader + * + * @param {string} [vertexSrc] - The source of the vertex shader. + * @param {string} [fragmentSrc] - The source of the fragment shader. + * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones. + * + * @returns {PIXI.Shader} an shiny new Pixi shader! + */ + Shader.from = function from (vertexSrc, fragmentSrc, uniforms) + { + var program = Program.from(vertexSrc, fragmentSrc); + + return new Shader(program, uniforms); + }; + + Object.defineProperties( Shader.prototype, prototypeAccessors$2$1 ); + + /* eslint-disable max-len */ + + var BLEND = 0; + var OFFSET = 1; + var CULLING = 2; + var DEPTH_TEST = 3; + var WINDING = 4; + + /** + * This is a WebGL state, and is is passed The WebGL StateManager. + * + * Each mesh rendered may require WebGL to be in a different state. + * For example you may want different blend mode or to enable polygon offsets + * + * @class + * @memberof PIXI + */ + var State = function State() + { + this.data = 0; + + this.blendMode = exports.BLEND_MODES.NORMAL; + this.polygonOffset = 0; + + this.blend = true; + // this.depthTest = true; + }; + + var prototypeAccessors$3 = { blend: { configurable: true },offsets: { configurable: true },culling: { configurable: true },depthTest: { configurable: true },clockwiseFrontFace: { configurable: true },blendMode: { configurable: true },polygonOffset: { configurable: true } }; + + /** + * Activates blending of the computed fragment color values + * + * @member {boolean} + */ + prototypeAccessors$3.blend.get = function () + { + return !!(this.data & (1 << BLEND)); + }; + + prototypeAccessors$3.blend.set = function (value) // eslint-disable-line require-jsdoc + { + if (!!(this.data & (1 << BLEND)) !== value) + { + this.data ^= (1 << BLEND); + } + }; + + /** + * Activates adding an offset to depth values of polygon's fragments + * + * @member {boolean} + * @default false + */ + prototypeAccessors$3.offsets.get = function () + { + return !!(this.data & (1 << OFFSET)); + }; + + prototypeAccessors$3.offsets.set = function (value) // eslint-disable-line require-jsdoc + { + if (!!(this.data & (1 << OFFSET)) !== value) + { + this.data ^= (1 << OFFSET); + } + }; + + /** + * Activates culling of polygons. + * + * @member {boolean} + * @default false + */ + prototypeAccessors$3.culling.get = function () + { + return !!(this.data & (1 << CULLING)); + }; + + prototypeAccessors$3.culling.set = function (value) // eslint-disable-line require-jsdoc + { + if (!!(this.data & (1 << CULLING)) !== value) + { + this.data ^= (1 << CULLING); + } + }; + + /** + * Activates depth comparisons and updates to the depth buffer. + * + * @member {boolean} + * @default false + */ + prototypeAccessors$3.depthTest.get = function () + { + return !!(this.data & (1 << DEPTH_TEST)); + }; + + prototypeAccessors$3.depthTest.set = function (value) // eslint-disable-line require-jsdoc + { + if (!!(this.data & (1 << DEPTH_TEST)) !== value) + { + this.data ^= (1 << DEPTH_TEST); + } + }; + + /** + * Specifies whether or not front or back-facing polygons can be culled. + * @member {boolean} + * @default false + */ + prototypeAccessors$3.clockwiseFrontFace.get = function () + { + return !!(this.data & (1 << WINDING)); + }; + + prototypeAccessors$3.clockwiseFrontFace.set = function (value) // eslint-disable-line require-jsdoc + { + if (!!(this.data & (1 << WINDING)) !== value) + { + this.data ^= (1 << WINDING); + } + }; + + /** + * The blend mode to be applied when this state is set. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode. + * Setting this mode to anything other than NO_BLEND will automatically switch blending on. + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL + * @see PIXI.BLEND_MODES + */ + prototypeAccessors$3.blendMode.get = function () + { + return this._blendMode; + }; + + prototypeAccessors$3.blendMode.set = function (value) // eslint-disable-line require-jsdoc + { + this.blend = (value !== exports.BLEND_MODES.NONE); + this._blendMode = value; + }; + + /** + * The polygon offset. Setting this property to anything other than 0 will automatically enable polygon offset fill. + * + * @member {number} + * @default 0 + */ + prototypeAccessors$3.polygonOffset.get = function () + { + return this._polygonOffset; + }; + + prototypeAccessors$3.polygonOffset.set = function (value) // eslint-disable-line require-jsdoc + { + this.offsets = !!value; + this._polygonOffset = value; + }; + + State.for2d = function for2d () + { + var state = new State(); + + state.depthTest = false; + state.blend = true; + + return state; + }; + + Object.defineProperties( State.prototype, prototypeAccessors$3 ); + + var defaultVertex$1 = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n"; + + var defaultFragment$1 = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"; + + /** + * Filter is a special type of WebGL shader that is applied to the screen. + * + * {@link http://pixijs.io/examples/#/filters/blur-filter.js Example} of the + * {@link PIXI.filters.BlurFilter BlurFilter}. + * + * ### Usage + * Filters can be applied to any DisplayObject or Container. + * PixiJS' `FilterSystem` renders the container into temporary Framebuffer, + * then filter renders it to the screen. + * Multiple filters can be added to the `filters` array property and stacked on each other. + * + * ``` + * const filter = new PIXI.Filter(myShaderVert, myShaderFrag, { myUniform: 0.5 }); + * const container = new PIXI.Container(); + * container.filters = [filter]; + * ``` + * + * ### Previous Version Differences + * + * In PixiJS **v3**, a filter was always applied to _whole screen_. + * + * In PixiJS **v4**, a filter can be applied _only part of the screen_. + * Developers had to create a set of uniforms to deal with coordinates. + * + * In PixiJS **v5** combines _both approaches_. + * Developers can use normal coordinates of v3 and then allow filter to use partial Framebuffers, + * bringing those extra uniforms into account. + * + * Also be aware that we have changed default vertex shader, please consult + * {@link https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters Wiki}. + * + * ### Built-in Uniforms + * + * PixiJS viewport uses screen (CSS) coordinates, `(0, 0, renderer.screen.width, renderer.screen.height)`, + * and `projectionMatrix` uniform maps it to the gl viewport. + * + * **uSampler** + * + * The most important uniform is the input texture that container was rendered into. + * _Important note: as with all Framebuffers in PixiJS, both input and output are + * premultiplied by alpha._ + * + * By default, input normalized coordinates are passed to fragment shader with `vTextureCoord`. + * Use it to sample the input. + * + * ``` + * const fragment = ` + * varying vec2 vTextureCoord; + * uniform sampler2D uSampler; + * void main(void) + * { + * gl_FragColor = texture2D(uSampler, vTextureCoord); + * } + * `; + * + * const myFilter = new PIXI.Filter(null, fragment); + * ``` + * + * This filter is just one uniform less than {@link PIXI.filters.AlphaFilter AlphaFilter}. + * + * **outputFrame** + * + * The `outputFrame` holds the rectangle where filter is applied in screen (CSS) coordinates. + * It's the same as `renderer.screen` for a fullscreen filter. + * Only a part of `outputFrame.zw` size of temporary Framebuffer is used, + * `(0, 0, outputFrame.width, outputFrame.height)`, + * + * Filters uses this quad to normalized (0-1) space, its passed into `aVertexPosition` attribute. + * To calculate vertex position in screen space using normalized (0-1) space: + * + * ``` + * vec4 filterVertexPosition( void ) + * { + * vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy; + * return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0); + * } + * ``` + * + * **inputSize** + * + * Temporary framebuffer is different, it can be either the size of screen, either power-of-two. + * The `inputSize.xy` are size of temporary framebuffer that holds input. + * The `inputSize.zw` is inverted, it's a shortcut to evade division inside the shader. + * + * Set `inputSize.xy = outputFrame.zw` for a fullscreen filter. + * + * To calculate input normalized coordinate, you have to map it to filter normalized space. + * Multiply by `outputFrame.zw` to get input coordinate. + * Divide by `inputSize.xy` to get input normalized coordinate. + * + * ``` + * vec2 filterTextureCoord( void ) + * { + * return aVertexPosition * (outputFrame.zw * inputSize.zw); // same as /inputSize.xy + * } + * ``` + * **resolution** + * + * The `resolution` is the ratio of screen (CSS) pixels to real pixels. + * + * **inputPixel** + * + * `inputPixel.xy` is the size of framebuffer in real pixels, same as `inputSize.xy * resolution` + * `inputPixel.zw` is inverted `inputPixel.xy`. + * + * It's handy for filters that use neighbour pixels, like {@link PIXI.filters.FXAAFilter FXAAFilter}. + * + * **inputClamp** + * + * If you try to get info from outside of used part of Framebuffer - you'll get undefined behaviour. + * For displacements, coordinates has to be clamped. + * + * The `inputClamp.xy` is left-top pixel center, you may ignore it, because we use left-top part of Framebuffer + * `inputClamp.zw` is bottom-right pixel center. + * + * ``` + * vec4 color = texture2D(uSampler, clamp(modifigedTextureCoord, inputClamp.xy, inputClamp.zw)) + * ``` + * OR + * ``` + * vec4 color = texture2D(uSampler, min(modifigedTextureCoord, inputClamp.zw)) + * ``` + * + * ### Additional Information + * + * Complete documentation on Filter usage is located in the + * {@link https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters Wiki}. + * + * Since PixiJS only had a handful of built-in filters, additional filters can be downloaded + * {@link https://github.com/pixijs/pixi-filters here} from the PixiJS Filters repository. + * + * @class + * @memberof PIXI + * @extends PIXI.Shader + */ + var Filter = /*@__PURE__*/(function (Shader) { + function Filter(vertexSrc, fragmentSrc, uniforms) + { + var program = Program.from(vertexSrc || Filter.defaultVertexSrc, + fragmentSrc || Filter.defaultFragmentSrc); + + Shader.call(this, program, uniforms); + + /** + * The padding of the filter. Some filters require extra space to breath such as a blur. + * Increasing this will add extra width and height to the bounds of the object that the + * filter is applied to. + * + * @member {number} + */ + this.padding = 0; + + /** + * The resolution of the filter. Setting this to be lower will lower the quality but + * increase the performance of the filter. + * + * @member {number} + */ + this.resolution = settings.FILTER_RESOLUTION; + + /** + * If enabled is true the filter is applied, if false it will not. + * + * @member {boolean} + */ + this.enabled = true; + + /** + * If enabled, PixiJS will fit the filter area into boundaries for better performance. + * Switch it off if it does not work for specific shader. + * + * @member {boolean} + */ + this.autoFit = true; + + /** + * Legacy filters use position and uvs from attributes + * @member {boolean} + * @readonly + */ + this.legacy = !!this.program.attributeData.aTextureCoord; + + /** + * The WebGL state the filter requires to render + * @member {PIXI.State} + */ + this.state = new State(); + } + + if ( Shader ) { Filter.__proto__ = Shader; } + Filter.prototype = Object.create( Shader && Shader.prototype ); + Filter.prototype.constructor = Filter; + + var prototypeAccessors = { blendMode: { configurable: true } }; + var staticAccessors = { defaultVertexSrc: { configurable: true },defaultFragmentSrc: { configurable: true } }; + + /** + * Applies the filter + * + * @param {PIXI.systems.FilterSystem} filterManager - The renderer to retrieve the filter from + * @param {PIXI.RenderTexture} input - The input render target. + * @param {PIXI.RenderTexture} output - The target to output to. + * @param {boolean} clear - Should the output be cleared before rendering to it + * @param {object} [currentState] - It's current state of filter. + * There are some useful properties in the currentState : + * target, filters, sourceFrame, destinationFrame, renderTarget, resolution + */ + Filter.prototype.apply = function apply (filterManager, input, output, clear, currentState) + { + // do as you please! + + filterManager.applyFilter(this, input, output, clear, currentState); + + // or just do a regular render.. + }; + + /** + * Sets the blendmode of the filter + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL + */ + prototypeAccessors.blendMode.get = function () + { + return this.state.blendMode; + }; + + prototypeAccessors.blendMode.set = function (value) // eslint-disable-line require-jsdoc + { + this.state.blendMode = value; + }; + + /** + * The default vertex shader source + * + * @static + * @type {string} + * @constant + */ + staticAccessors.defaultVertexSrc.get = function () + { + return defaultVertex$1; + }; + + /** + * The default fragment shader source + * + * @static + * @type {string} + * @constant + */ + staticAccessors.defaultFragmentSrc.get = function () + { + return defaultFragment$1; + }; + + Object.defineProperties( Filter.prototype, prototypeAccessors ); + Object.defineProperties( Filter, staticAccessors ); + + return Filter; + }(Shader)); + + /** + * Used for caching shader IDs + * + * @static + * @type {object} + * @protected + */ + Filter.SOURCE_KEY_MAP = {}; + + var vertex = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n"; + + var fragment = "varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n original *= (alphaMul * masky.r * alpha * clip);\n\n gl_FragColor = original;\n}\n"; + + var tempMat = new Matrix(); + + /** + * Class controls uv mapping from Texture normal space to BaseTexture normal space. + * + * Takes `trim` and `rotate` into account. May contain clamp settings for Meshes and TilingSprite. + * + * Can be used in Texture `uvMatrix` field, or separately, you can use different clamp settings on the same texture. + * If you want to add support for texture region of certain feature or filter, that's what you're looking for. + * + * Takes track of Texture changes through `_lastTextureID` private field. + * Use `update()` method call to track it from outside. + * + * @see PIXI.Texture + * @see PIXI.Mesh + * @see PIXI.TilingSprite + * @class + * @memberof PIXI + */ + var TextureMatrix = function TextureMatrix(texture, clampMargin) + { + this._texture = texture; + + /** + * Matrix operation that converts texture region coords to texture coords + * @member {PIXI.Matrix} + * @readonly + */ + this.mapCoord = new Matrix(); + + /** + * Clamp region for normalized coords, left-top pixel center in xy , bottom-right in zw. + * Calculated based on clampOffset. + * @member {Float32Array} + * @readonly + */ + this.uClampFrame = new Float32Array(4); + + /** + * Normalized clamp offset. + * Calculated based on clampOffset. + * @member {Float32Array} + * @readonly + */ + this.uClampOffset = new Float32Array(2); + + /** + * Tracks Texture frame changes + * @member {number} + * @protected + */ + this._updateID = -1; + + /** + * Changes frame clamping + * Works with TilingSprite and Mesh + * Change to 1.5 if you texture has repeated right and bottom lines, that leads to smoother borders + * + * @default 0 + * @member {number} + */ + this.clampOffset = 0; + + /** + * Changes frame clamping + * Works with TilingSprite and Mesh + * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas + * + * @default 0.5 + * @member {number} + */ + this.clampMargin = (typeof clampMargin === 'undefined') ? 0.5 : clampMargin; + + /** + * If texture size is the same as baseTexture + * @member {boolean} + * @default false + * @readonly + */ + this.isSimple = false; + }; + + var prototypeAccessors$4 = { texture: { configurable: true } }; + + /** + * texture property + * @member {PIXI.Texture} + */ + prototypeAccessors$4.texture.get = function () + { + return this._texture; + }; + + prototypeAccessors$4.texture.set = function (value) // eslint-disable-line require-jsdoc + { + this._texture = value; + this._updateID = -1; + }; + + /** + * Multiplies uvs array to transform + * @param {Float32Array} uvs mesh uvs + * @param {Float32Array} [out=uvs] output + * @returns {Float32Array} output + */ + TextureMatrix.prototype.multiplyUvs = function multiplyUvs (uvs, out) + { + if (out === undefined) + { + out = uvs; + } + + var mat = this.mapCoord; + + for (var i = 0; i < uvs.length; i += 2) + { + var x = uvs[i]; + var y = uvs[i + 1]; + + out[i] = (x * mat.a) + (y * mat.c) + mat.tx; + out[i + 1] = (x * mat.b) + (y * mat.d) + mat.ty; + } + + return out; + }; + + /** + * updates matrices if texture was changed + * @param {boolean} [forceUpdate=false] if true, matrices will be updated any case + * @returns {boolean} whether or not it was updated + */ + TextureMatrix.prototype.update = function update (forceUpdate) + { + var tex = this._texture; + + if (!tex || !tex.valid) + { + return false; + } + + if (!forceUpdate + && this._updateID === tex._updateID) + { + return false; + } + + this._updateID = tex._updateID; + + var uvs = tex._uvs; + + this.mapCoord.set(uvs.x1 - uvs.x0, uvs.y1 - uvs.y0, uvs.x3 - uvs.x0, uvs.y3 - uvs.y0, uvs.x0, uvs.y0); + + var orig = tex.orig; + var trim = tex.trim; + + if (trim) + { + tempMat.set(orig.width / trim.width, 0, 0, orig.height / trim.height, + -trim.x / trim.width, -trim.y / trim.height); + this.mapCoord.append(tempMat); + } + + var texBase = tex.baseTexture; + var frame = this.uClampFrame; + var margin = this.clampMargin / texBase.resolution; + var offset = this.clampOffset; + + frame[0] = (tex._frame.x + margin + offset) / texBase.width; + frame[1] = (tex._frame.y + margin + offset) / texBase.height; + frame[2] = (tex._frame.x + tex._frame.width - margin + offset) / texBase.width; + frame[3] = (tex._frame.y + tex._frame.height - margin + offset) / texBase.height; + this.uClampOffset[0] = offset / texBase.realWidth; + this.uClampOffset[1] = offset / texBase.realHeight; + + this.isSimple = tex._frame.width === texBase.width + && tex._frame.height === texBase.height + && tex.rotate === 0; + + return true; + }; + + Object.defineProperties( TextureMatrix.prototype, prototypeAccessors$4 ); + + /** + * This handles a Sprite acting as a mask, as opposed to a Graphic. + * + * WebGL only. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI + */ + var SpriteMaskFilter = /*@__PURE__*/(function (Filter) { + function SpriteMaskFilter(sprite) + { + var maskMatrix = new Matrix(); + + Filter.call(this, vertex, fragment); + + sprite.renderable = false; + + /** + * Sprite mask + * @member {PIXI.Sprite} + */ + this.maskSprite = sprite; + + /** + * Mask matrix + * @member {PIXI.Matrix} + */ + this.maskMatrix = maskMatrix; + } + + if ( Filter ) { SpriteMaskFilter.__proto__ = Filter; } + SpriteMaskFilter.prototype = Object.create( Filter && Filter.prototype ); + SpriteMaskFilter.prototype.constructor = SpriteMaskFilter; + + /** + * Applies the filter + * + * @param {PIXI.systems.FilterSystem} filterManager - The renderer to retrieve the filter from + * @param {PIXI.RenderTexture} input - The input render target. + * @param {PIXI.RenderTexture} output - The target to output to. + * @param {boolean} clear - Should the output be cleared before rendering to it. + */ + SpriteMaskFilter.prototype.apply = function apply (filterManager, input, output, clear) + { + var maskSprite = this.maskSprite; + var tex = this.maskSprite.texture; + + if (!tex.valid) + { + return; + } + if (!tex.transform) + { + // margin = 0.0, let it bleed a bit, shader code becomes easier + // assuming that atlas textures were made with 1-pixel padding + tex.transform = new TextureMatrix(tex, 0.0); + } + tex.transform.update(); + + this.uniforms.npmAlpha = tex.baseTexture.alphaMode ? 0.0 : 1.0; + this.uniforms.mask = tex; + // get _normalized sprite texture coords_ and convert them to _normalized atlas texture coords_ with `prepend` + this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite) + .prepend(tex.transform.mapCoord); + this.uniforms.alpha = maskSprite.worldAlpha; + this.uniforms.maskClamp = tex.transform.uClampFrame; + + filterManager.applyFilter(this, input, output, clear); + }; + + return SpriteMaskFilter; + }(Filter)); + + /** + * System plugin to the renderer to manage masks. + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + var MaskSystem = /*@__PURE__*/(function (System) { + function MaskSystem(renderer) + { + System.call(this, renderer); + + /** + * Target to mask + * @member {PIXI.DisplayObject} + * @readonly + */ + this.scissorRenderTarget = null; + + /** + * Enable scissor + * @member {boolean} + * @readonly + */ + this.enableScissor = false; + + /** + * Pool of used sprite mask filters + * @member {PIXI.SpriteMaskFilter[]} + * @readonly + */ + this.alphaMaskPool = []; + + /** + * Pool of mask data + * @member {PIXI.MaskData[]} + * @readonly + */ + this.maskDataPool = []; + + this.maskStack = []; + + /** + * Current index of alpha mask pool + * @member {number} + * @default 0 + * @readonly + */ + this.alphaMaskIndex = 0; + } + + if ( System ) { MaskSystem.__proto__ = System; } + MaskSystem.prototype = Object.create( System && System.prototype ); + MaskSystem.prototype.constructor = MaskSystem; + + /** + * Changes the mask stack that is used by this System. + * + * @param {PIXI.MaskData[]} maskStack - The mask stack + */ + MaskSystem.prototype.setMaskStack = function setMaskStack (maskStack) + { + this.maskStack = maskStack; + this.renderer.scissor.setMaskStack(maskStack); + this.renderer.stencil.setMaskStack(maskStack); + }; + + /** + * Applies the Mask and adds it to the current filter stack. + * Renderer batch must be flushed beforehand. + * + * @param {PIXI.DisplayObject} target - Display Object to push the mask to + * @param {PIXI.MaskData|PIXI.Sprite|PIXI.Graphics|PIXI.DisplayObject} maskData - The masking data. + */ + MaskSystem.prototype.push = function push (target, maskData) + { + if (!maskData.isMaskData) + { + var d = this.maskDataPool.pop() || new MaskData(); + + d.pooled = true; + d.maskObject = maskData; + maskData = d; + } + + if (maskData.autoDetect) + { + this.detect(maskData); + } + + maskData.copyCountersOrReset(this.maskStack[this.maskStack.length - 1]); + maskData._target = target; + + switch (maskData.type) + { + case exports.MASK_TYPES.SCISSOR: + this.maskStack.push(maskData); + this.renderer.scissor.push(maskData); + break; + case exports.MASK_TYPES.STENCIL: + this.maskStack.push(maskData); + this.renderer.stencil.push(maskData); + break; + case exports.MASK_TYPES.SPRITE: + maskData.copyCountersOrReset(null); + this.pushSpriteMask(maskData); + this.maskStack.push(maskData); + break; + default: + break; + } + }; + + /** + * Removes the last mask from the mask stack and doesn't return it. + * Renderer batch must be flushed beforehand. + * + * @param {PIXI.DisplayObject} target - Display Object to pop the mask from + */ + MaskSystem.prototype.pop = function pop (target) + { + var maskData = this.maskStack.pop(); + + if (!maskData || maskData._target !== target) + { + // TODO: add an assert when we have it + + return; + } + + switch (maskData.type) + { + case exports.MASK_TYPES.SCISSOR: + this.renderer.scissor.pop(); + break; + case exports.MASK_TYPES.STENCIL: + this.renderer.stencil.pop(maskData.maskObject); + break; + case exports.MASK_TYPES.SPRITE: + this.popSpriteMask(); + break; + default: + break; + } + + maskData.reset(); + + if (maskData.pooled) + { + this.maskDataPool.push(maskData); + } + }; + + /** + * Sets type of MaskData based on its maskObject + * @param {PIXI.MaskData} maskData + */ + MaskSystem.prototype.detect = function detect (maskData) + { + var maskObject = maskData.maskObject; + + if (maskObject.isSprite) + { + maskData.type = exports.MASK_TYPES.SPRITE; + + return; + } + maskData.type = exports.MASK_TYPES.STENCIL; + // detect scissor in graphics + if (this.enableScissor + && maskObject.isFastRect + && maskObject.isFastRect()) + { + var matrix = maskObject.worldTransform; + + // TODO: move the check to the matrix itself + // we are checking that its orthogonal and x rotation is 0 90 180 or 270 + + var rotX = Math.atan2(matrix.b, matrix.a); + var rotXY = Math.atan2(matrix.d, matrix.c); + + // use the nearest degree to 0.01 + rotX = Math.round(rotX * (180 / Math.PI) * 100); + rotXY = Math.round(rotXY * (180 / Math.PI) * 100) - rotX; + + rotX = ((rotX % 9000) + 9000) % 9000; + rotXY = ((rotXY % 18000) + 18000) % 18000; + + if (rotX === 0 && rotXY === 9000) + { + maskData.type = exports.MASK_TYPES.SCISSOR; + } + } + }; + + /** + * Applies the Mask and adds it to the current filter stack. + * + * @param {PIXI.MaskData} maskData - Sprite to be used as the mask + */ + MaskSystem.prototype.pushSpriteMask = function pushSpriteMask (maskData) + { + var maskObject = maskData.maskObject; + var target = maskData._target; + var alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex]; + + if (!alphaMaskFilter) + { + alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex] = [new SpriteMaskFilter(maskObject)]; + } + + alphaMaskFilter[0].resolution = this.renderer.resolution; + alphaMaskFilter[0].maskSprite = maskObject; + + var stashFilterArea = target.filterArea; + + target.filterArea = maskObject.getBounds(true); + this.renderer.filter.push(target, alphaMaskFilter); + target.filterArea = stashFilterArea; + + this.alphaMaskIndex++; + }; + + /** + * Removes the last filter from the filter stack and doesn't return it. + */ + MaskSystem.prototype.popSpriteMask = function popSpriteMask () + { + this.renderer.filter.pop(); + this.alphaMaskIndex--; + }; + + return MaskSystem; + }(System)); + + /** + * System plugin to the renderer to manage masks of certain type + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + var AbstractMaskSystem = /*@__PURE__*/(function (System) { + function AbstractMaskSystem(renderer) + { + System.call(this, renderer); + + /** + * The mask stack + * @member {PIXI.MaskData[]} + */ + this.maskStack = []; + + /** + * Constant for gl.enable + * @member {number} + * @private + */ + this.glConst = 0; + } + + if ( System ) { AbstractMaskSystem.__proto__ = System; } + AbstractMaskSystem.prototype = Object.create( System && System.prototype ); + AbstractMaskSystem.prototype.constructor = AbstractMaskSystem; + + /** + * gets count of masks of certain type + * @returns {number} + */ + AbstractMaskSystem.prototype.getStackLength = function getStackLength () + { + return this.maskStack.length; + }; + + /** + * Changes the mask stack that is used by this System. + * + * @param {PIXI.MaskData[]} maskStack - The mask stack + */ + AbstractMaskSystem.prototype.setMaskStack = function setMaskStack (maskStack) + { + var ref = this.renderer; + var gl = ref.gl; + var curStackLen = this.getStackLength(); + + this.maskStack = maskStack; + + var newStackLen = this.getStackLength(); + + if (newStackLen !== curStackLen) + { + if (newStackLen === 0) + { + gl.disable(this.glConst); + } + else + { + gl.enable(this.glConst); + this._useCurrent(); + } + } + }; + + /** + * Setup renderer to use the current mask data. + * @private + */ + AbstractMaskSystem.prototype._useCurrent = function _useCurrent () + { + // OVERWRITE; + }; + + /** + * Destroys the mask stack. + * + */ + AbstractMaskSystem.prototype.destroy = function destroy () + { + System.prototype.destroy.call(this, this); + + this.maskStack = null; + }; + + return AbstractMaskSystem; + }(System)); + + /** + * System plugin to the renderer to manage scissor rects (used for masks). + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + var ScissorSystem = /*@__PURE__*/(function (AbstractMaskSystem) { + function ScissorSystem(renderer) + { + AbstractMaskSystem.call(this, renderer); + + this.glConst = WebGLRenderingContext.SCISSOR_TEST; + } + + if ( AbstractMaskSystem ) { ScissorSystem.__proto__ = AbstractMaskSystem; } + ScissorSystem.prototype = Object.create( AbstractMaskSystem && AbstractMaskSystem.prototype ); + ScissorSystem.prototype.constructor = ScissorSystem; + + ScissorSystem.prototype.getStackLength = function getStackLength () + { + var maskData = this.maskStack[this.maskStack.length - 1]; + + if (maskData) + { + return maskData._scissorCounter; + } + + return 0; + }; + + /** + * Applies the Mask and adds it to the current stencil stack. @alvin + * + * @param {PIXI.MaskData} maskData - The mask data + */ + ScissorSystem.prototype.push = function push (maskData) + { + var maskObject = maskData.maskObject; + + maskObject.renderable = true; + + var prevData = maskData._scissorRect; + var bounds = maskObject.getBounds(true); + var ref = this.renderer; + var gl = ref.gl; + + maskObject.renderable = false; + + if (prevData) + { + bounds.fit(prevData); + } + else + { + gl.enable(gl.SCISSOR_TEST); + } + + maskData._scissorCounter++; + maskData._scissorRect = bounds; + this._useCurrent(); + }; + + /** + * Pops scissor mask. MaskData is already removed from stack + */ + ScissorSystem.prototype.pop = function pop () + { + var ref = this.renderer; + var gl = ref.gl; + + if (this.getStackLength() > 0) + { + this._useCurrent(); + } + else + { + gl.disable(gl.SCISSOR_TEST); + } + }; + + /** + * Setup renderer to use the current scissor data. + * @private + */ + ScissorSystem.prototype._useCurrent = function _useCurrent () + { + var rect = this.maskStack[this.maskStack.length - 1]._scissorRect; + var rt = this.renderer.renderTexture.current; + var ref = this.renderer.projection; + var transform = ref.transform; + var sourceFrame = ref.sourceFrame; + var destinationFrame = ref.destinationFrame; + var resolution = rt ? rt.resolution : this.renderer.resolution; + var x = ((rect.x - sourceFrame.x) * resolution) + destinationFrame.x; + var y = ((rect.y - sourceFrame.y) * resolution) + destinationFrame.y; + var width = rect.width * resolution; + var height = rect.height * resolution; + + if (transform) + { + x += transform.tx * resolution; + y += transform.ty * resolution; + } + if (!rt) + { + // flipY. In future we'll have it over renderTextures as an option + y = this.renderer.height - height - y; + } + + this.renderer.gl.scissor(x, y, width, height); + }; + + return ScissorSystem; + }(AbstractMaskSystem)); + + /** + * System plugin to the renderer to manage stencils (used for masks). + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + var StencilSystem = /*@__PURE__*/(function (AbstractMaskSystem) { + function StencilSystem(renderer) + { + AbstractMaskSystem.call(this, renderer); + + this.glConst = WebGLRenderingContext.STENCIL_TEST; + } + + if ( AbstractMaskSystem ) { StencilSystem.__proto__ = AbstractMaskSystem; } + StencilSystem.prototype = Object.create( AbstractMaskSystem && AbstractMaskSystem.prototype ); + StencilSystem.prototype.constructor = StencilSystem; + + StencilSystem.prototype.getStackLength = function getStackLength () + { + var maskData = this.maskStack[this.maskStack.length - 1]; + + if (maskData) + { + return maskData._stencilCounter; + } + + return 0; + }; + + /** + * Applies the Mask and adds it to the current stencil stack. + * + * @param {PIXI.MaskData} maskData - The mask data + */ + StencilSystem.prototype.push = function push (maskData) + { + var maskObject = maskData.maskObject; + var ref = this.renderer; + var gl = ref.gl; + var prevMaskCount = maskData._stencilCounter; + + if (prevMaskCount === 0) + { + // force use stencil texture in current framebuffer + this.renderer.framebuffer.forceStencil(); + gl.enable(gl.STENCIL_TEST); + } + + maskData._stencilCounter++; + + // Increment the reference stencil value where the new mask overlaps with the old ones. + gl.colorMask(false, false, false, false); + gl.stencilFunc(gl.EQUAL, prevMaskCount, this._getBitwiseMask()); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR); + + maskObject.renderable = true; + maskObject.render(this.renderer); + this.renderer.batch.flush(); + maskObject.renderable = false; + + this._useCurrent(); + }; + + /** + * Pops stencil mask. MaskData is already removed from stack + * + * @param {PIXI.DisplayObject} maskObject - object of popped mask data + */ + StencilSystem.prototype.pop = function pop (maskObject) + { + var gl = this.renderer.gl; + + if (this.getStackLength() === 0) + { + // the stack is empty! + gl.disable(gl.STENCIL_TEST); + gl.clear(gl.STENCIL_BUFFER_BIT); + gl.clearStencil(0); + } + else + { + // Decrement the reference stencil value where the popped mask overlaps with the other ones + gl.colorMask(false, false, false, false); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR); + + maskObject.renderable = true; + maskObject.render(this.renderer); + this.renderer.batch.flush(); + maskObject.renderable = false; + + this._useCurrent(); + } + }; + + /** + * Setup renderer to use the current stencil data. + * @private + */ + StencilSystem.prototype._useCurrent = function _useCurrent () + { + var gl = this.renderer.gl; + + gl.colorMask(true, true, true, true); + gl.stencilFunc(gl.EQUAL, this.getStackLength(), this._getBitwiseMask()); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); + }; + + /** + * Fill 1s equal to the number of acitve stencil masks. + * @private + * @return {number} The bitwise mask. + */ + StencilSystem.prototype._getBitwiseMask = function _getBitwiseMask () + { + return (1 << this.getStackLength()) - 1; + }; + + return StencilSystem; + }(AbstractMaskSystem)); + + /** + * System plugin to the renderer to manage the projection matrix. + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + + var ProjectionSystem = /*@__PURE__*/(function (System) { + function ProjectionSystem(renderer) + { + System.call(this, renderer); + + /** + * Destination frame + * @member {PIXI.Rectangle} + * @readonly + */ + this.destinationFrame = null; + + /** + * Source frame + * @member {PIXI.Rectangle} + * @readonly + */ + this.sourceFrame = null; + + /** + * Default destination frame + * @member {PIXI.Rectangle} + * @readonly + */ + this.defaultFrame = null; + + /** + * Project matrix + * @member {PIXI.Matrix} + * @readonly + */ + this.projectionMatrix = new Matrix(); + + /** + * A transform that will be appended to the projection matrix + * if null, nothing will be applied + * @member {PIXI.Matrix} + */ + this.transform = null; + } + + if ( System ) { ProjectionSystem.__proto__ = System; } + ProjectionSystem.prototype = Object.create( System && System.prototype ); + ProjectionSystem.prototype.constructor = ProjectionSystem; + + /** + * Updates the projection matrix based on a projection frame (which is a rectangle) + * + * @param {PIXI.Rectangle} destinationFrame - The destination frame. + * @param {PIXI.Rectangle} sourceFrame - The source frame. + * @param {Number} resolution - Resolution + * @param {boolean} root - If is root + */ + ProjectionSystem.prototype.update = function update (destinationFrame, sourceFrame, resolution, root) + { + this.destinationFrame = destinationFrame || this.destinationFrame || this.defaultFrame; + this.sourceFrame = sourceFrame || this.sourceFrame || destinationFrame; + + this.calculateProjection(this.destinationFrame, this.sourceFrame, resolution, root); + + if (this.transform) + { + this.projectionMatrix.append(this.transform); + } + + var renderer = this.renderer; + + renderer.globalUniforms.uniforms.projectionMatrix = this.projectionMatrix; + renderer.globalUniforms.update(); + + // this will work for now + // but would be sweet to stick and even on the global uniforms.. + if (renderer.shader.shader) + { + renderer.shader.syncUniformGroup(renderer.shader.shader.uniforms.globals); + } + }; + + /** + * Updates the projection matrix based on a projection frame (which is a rectangle) + * + * @param {PIXI.Rectangle} destinationFrame - The destination frame. + * @param {PIXI.Rectangle} sourceFrame - The source frame. + * @param {Number} resolution - Resolution + * @param {boolean} root - If is root + */ + ProjectionSystem.prototype.calculateProjection = function calculateProjection (destinationFrame, sourceFrame, resolution, root) + { + var pm = this.projectionMatrix; + + // I don't think we will need this line.. + // pm.identity(); + + if (!root) + { + pm.a = (1 / destinationFrame.width * 2) * resolution; + pm.d = (1 / destinationFrame.height * 2) * resolution; + + pm.tx = -1 - (sourceFrame.x * pm.a); + pm.ty = -1 - (sourceFrame.y * pm.d); + } + else + { + pm.a = (1 / destinationFrame.width * 2) * resolution; + pm.d = (-1 / destinationFrame.height * 2) * resolution; + + pm.tx = -1 - (sourceFrame.x * pm.a); + pm.ty = 1 - (sourceFrame.y * pm.d); + } + }; + + /** + * Sets the transform of the active render target to the given matrix + * + * @param {PIXI.Matrix} matrix - The transformation matrix + */ + ProjectionSystem.prototype.setTransform = function setTransform ()// matrix) + { + // this._activeRenderTarget.transform = matrix; + }; + + return ProjectionSystem; + }(System)); + + var tempRect = new Rectangle(); + + /** + * System plugin to the renderer to manage render textures. + * + * Should be added after FramebufferSystem + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + + var RenderTextureSystem = /*@__PURE__*/(function (System) { + function RenderTextureSystem(renderer) + { + System.call(this, renderer); + + /** + * The clear background color as rgba + * @member {number[]} + */ + this.clearColor = renderer._backgroundColorRgba; + + // TODO move this property somewhere else! + /** + * List of masks for the StencilSystem + * @member {PIXI.Graphics[]} + * @readonly + */ + this.defaultMaskStack = []; + + // empty render texture? + /** + * Render texture + * @member {PIXI.RenderTexture} + * @readonly + */ + this.current = null; + + /** + * Source frame + * @member {PIXI.Rectangle} + * @readonly + */ + this.sourceFrame = new Rectangle(); + + /** + * Destination frame + * @member {PIXI.Rectangle} + * @readonly + */ + this.destinationFrame = new Rectangle(); + } + + if ( System ) { RenderTextureSystem.__proto__ = System; } + RenderTextureSystem.prototype = Object.create( System && System.prototype ); + RenderTextureSystem.prototype.constructor = RenderTextureSystem; + + /** + * Bind the current render texture + * @param {PIXI.RenderTexture} [renderTexture] - RenderTexture to bind, by default its `null`, the screen + * @param {PIXI.Rectangle} [sourceFrame] - part of screen that is mapped to the renderTexture + * @param {PIXI.Rectangle} [destinationFrame] - part of renderTexture, by default it has the same size as sourceFrame + */ + RenderTextureSystem.prototype.bind = function bind (renderTexture, sourceFrame, destinationFrame) + { + if ( renderTexture === void 0 ) { renderTexture = null; } + + this.current = renderTexture; + + var renderer = this.renderer; + + var resolution; + + if (renderTexture) + { + var baseTexture = renderTexture.baseTexture; + + resolution = baseTexture.resolution; + + if (!destinationFrame) + { + tempRect.width = baseTexture.realWidth; + tempRect.height = baseTexture.realHeight; + + destinationFrame = tempRect; + } + + if (!sourceFrame) + { + sourceFrame = destinationFrame; + } + + this.renderer.framebuffer.bind(baseTexture.framebuffer, destinationFrame); + + this.renderer.projection.update(destinationFrame, sourceFrame, resolution, false); + this.renderer.mask.setMaskStack(baseTexture.maskStack); + } + else + { + resolution = this.renderer.resolution; + + // TODO these validation checks happen deeper down.. + // thing they can be avoided.. + if (!destinationFrame) + { + tempRect.width = renderer.width; + tempRect.height = renderer.height; + + destinationFrame = tempRect; + } + + if (!sourceFrame) + { + sourceFrame = destinationFrame; + } + + renderer.framebuffer.bind(null, destinationFrame); + + // TODO store this.. + this.renderer.projection.update(destinationFrame, sourceFrame, resolution, true); + this.renderer.mask.setMaskStack(this.defaultMaskStack); + } + + this.sourceFrame.copyFrom(sourceFrame); + + this.destinationFrame.x = destinationFrame.x / resolution; + this.destinationFrame.y = destinationFrame.y / resolution; + + this.destinationFrame.width = destinationFrame.width / resolution; + this.destinationFrame.height = destinationFrame.height / resolution; + + if (sourceFrame === destinationFrame) + { + this.sourceFrame.copyFrom(this.destinationFrame); + } + }; + + /** + * Erases the render texture and fills the drawing area with a colour + * + * @param {number[]} [clearColor] - The color as rgba, default to use the renderer backgroundColor + * @return {PIXI.Renderer} Returns itself. + */ + RenderTextureSystem.prototype.clear = function clear (clearColor) + { + if (this.current) + { + clearColor = clearColor || this.current.baseTexture.clearColor; + } + else + { + clearColor = clearColor || this.clearColor; + } + + this.renderer.framebuffer.clear(clearColor[0], clearColor[1], clearColor[2], clearColor[3]); + }; + + RenderTextureSystem.prototype.resize = function resize ()// screenWidth, screenHeight) + { + // resize the root only! + this.bind(null); + }; + + /** + * Resets renderTexture state + */ + RenderTextureSystem.prototype.reset = function reset () + { + this.bind(null); + }; + + return RenderTextureSystem; + }(System)); + + /** + * Helper class to create a WebGL Program + * + * @class + * @memberof PIXI + */ + var GLProgram = function GLProgram(program, uniformData) + { + /** + * The shader program + * + * @member {WebGLProgram} + */ + this.program = program; + + /** + * holds the uniform data which contains uniform locations + * and current uniform values used for caching and preventing unneeded GPU commands + * @member {Object} + */ + this.uniformData = uniformData; + + /** + * uniformGroups holds the various upload functions for the shader. Each uniform group + * and program have a unique upload function generated. + * @member {Object} + */ + this.uniformGroups = {}; + }; + + /** + * Destroys this program + */ + GLProgram.prototype.destroy = function destroy () + { + this.uniformData = null; + this.uniformGroups = null; + this.program = null; + }; + + var UID$4 = 0; + // defualt sync data so we don't create a new one each time! + var defaultSyncData = { textureCount: 0 }; + + /** + * System plugin to the renderer to manage shaders. + * + * @class + * @memberof PIXI.systems + * @extends PIXI.System + */ + var ShaderSystem = /*@__PURE__*/(function (System) { + function ShaderSystem(renderer) + { + System.call(this, renderer); + + // Validation check that this environment support `new Function` + this.systemCheck(); + + /** + * The current WebGL rendering context + * + * @member {WebGLRenderingContext} + */ + this.gl = null; + + this.shader = null; + this.program = null; + + /** + * Cache to holds the generated functions. Stored against UniformObjects unique signature + * @type {Object} + * @private + */ + this.cache = {}; + + this.id = UID$4++; + } + + if ( System ) { ShaderSystem.__proto__ = System; } + ShaderSystem.prototype = Object.create( System && System.prototype ); + ShaderSystem.prototype.constructor = ShaderSystem; + + /** + * Overrideable function by `@pixi/unsafe-eval` to silence + * throwing an error if platform doesn't support unsafe-evals. + * + * @private + */ + ShaderSystem.prototype.systemCheck = function systemCheck () + { + if (!unsafeEvalSupported()) + { + throw new Error('Current environment does not allow unsafe-eval, ' + + 'please use @pixi/unsafe-eval module to enable support.'); + } + }; + + ShaderSystem.prototype.contextChange = function contextChange (gl) + { + this.gl = gl; + this.reset(); + }; + + /** + * Changes the current shader to the one given in parameter + * + * @param {PIXI.Shader} shader - the new shader + * @param {boolean} dontSync - false if the shader should automatically sync its uniforms. + * @returns {PIXI.GLProgram} the glProgram that belongs to the shader. + */ + ShaderSystem.prototype.bind = function bind (shader, dontSync) + { + shader.uniforms.globals = this.renderer.globalUniforms; + + var program = shader.program; + var glProgram = program.glPrograms[this.renderer.CONTEXT_UID] || this.generateShader(shader); + + this.shader = shader; + + // TODO - some current Pixi plugins bypass this.. so it not safe to use yet.. + if (this.program !== program) + { + this.program = program; + this.gl.useProgram(glProgram.program); + } + + if (!dontSync) + { + defaultSyncData.textureCount = 0; + + this.syncUniformGroup(shader.uniformGroup, defaultSyncData); + } + + return glProgram; + }; + + /** + * Uploads the uniforms values to the currently bound shader. + * + * @param {object} uniforms - the uniforms values that be applied to the current shader + */ + ShaderSystem.prototype.setUniforms = function setUniforms (uniforms) + { + var shader = this.shader.program; + var glProgram = shader.glPrograms[this.renderer.CONTEXT_UID]; + + shader.syncUniforms(glProgram.uniformData, uniforms, this.renderer); + }; + + /** + * + * syncs uniforms on the group + * @param {*} group the uniform group to sync + * @param {*} syncData this is data that is passed to the sync function and any nested sync functions + */ + ShaderSystem.prototype.syncUniformGroup = function syncUniformGroup (group, syncData) + { + var glProgram = this.getglProgram(); + + if (!group.static || group.dirtyId !== glProgram.uniformGroups[group.id]) + { + glProgram.uniformGroups[group.id] = group.dirtyId; + + this.syncUniforms(group, glProgram, syncData); + } + }; + + /** + * Overrideable by the @pixi/unsafe-eval package to use static + * syncUnforms instead. + * + * @private + */ + ShaderSystem.prototype.syncUniforms = function syncUniforms (group, glProgram, syncData) + { + var syncFunc = group.syncUniforms[this.shader.program.id] || this.createSyncGroups(group); + + syncFunc(glProgram.uniformData, group.uniforms, this.renderer, syncData); + }; + + ShaderSystem.prototype.createSyncGroups = function createSyncGroups (group) + { + var id = this.getSignature(group, this.shader.program.uniformData); + + if (!this.cache[id]) + { + this.cache[id] = generateUniformsSync(group, this.shader.program.uniformData); + } + + group.syncUniforms[this.shader.program.id] = this.cache[id]; + + return group.syncUniforms[this.shader.program.id]; + }; + + /** + * Takes a uniform group and data and generates a unique signature for them. + * + * @param {PIXI.UniformGroup} group the uniform group to get signature of + * @param {Object} uniformData uniform information generated by the shader + * @returns {String} Unique signature of the uniform group + * @private + */ + ShaderSystem.prototype.getSignature = function getSignature (group, uniformData) + { + var uniforms = group.uniforms; + + var strings = []; + + for (var i in uniforms) + { + strings.push(i); + + if (uniformData[i]) + { + strings.push(uniformData[i].type); + } + } + + return strings.join('-'); + }; + + /** + * Returns the underlying GLShade rof the currently bound shader. + * This can be handy for when you to have a little more control over the setting of your uniforms. + * + * @return {PIXI.GLProgram} the glProgram for the currently bound Shader for this context + */ + ShaderSystem.prototype.getglProgram = function getglProgram () + { + if (this.shader) + { + return this.shader.program.glPrograms[this.renderer.CONTEXT_UID]; + } + + return null; + }; + + /** + * Generates a glProgram version of the Shader provided. + * + * @private + * @param {PIXI.Shader} shader the shader that the glProgram will be based on. + * @return {PIXI.GLProgram} A shiny new glProgram! + */ + ShaderSystem.prototype.generateShader = function generateShader (shader) + { + var gl = this.gl; + + var program = shader.program; + + var attribMap = {}; + + for (var i in program.attributeData) + { + attribMap[i] = program.attributeData[i].location; + } + + var shaderProgram = compileProgram(gl, program.vertexSrc, program.fragmentSrc, attribMap); + var uniformData = {}; + + for (var i$1 in program.uniformData) + { + var data = program.uniformData[i$1]; + + uniformData[i$1] = { + location: gl.getUniformLocation(shaderProgram, i$1), + value: defaultValue(data.type, data.size), + }; + } + + var glProgram = new GLProgram(shaderProgram, uniformData); + + program.glPrograms[this.renderer.CONTEXT_UID] = glProgram; + + return glProgram; + }; + + /** + * Resets ShaderSystem state, does not affect WebGL state + */ + ShaderSystem.prototype.reset = function reset () + { + this.program = null; + this.shader = null; + }; + + /** + * Destroys this System and removes all its textures + */ + ShaderSystem.prototype.destroy = function destroy () + { + // TODO implement destroy method for ShaderSystem + this.destroyed = true; + }; + + return ShaderSystem; + }(System)); + + /** + * Maps gl blend combinations to WebGL. + * + * @memberof PIXI + * @function mapWebGLBlendModesToPixi + * @private + * @param {WebGLRenderingContext} gl - The rendering context. + * @param {number[][]} [array=[]] - The array to output into. + * @return {number[][]} Mapped modes. + */ + function mapWebGLBlendModesToPixi(gl, array) + { + if ( array === void 0 ) { array = []; } + + // TODO - premultiply alpha would be different. + // add a boolean for that! + array[exports.BLEND_MODES.NORMAL] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.ADD] = [gl.ONE, gl.ONE]; + array[exports.BLEND_MODES.MULTIPLY] = [gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.SCREEN] = [gl.ONE, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.OVERLAY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.DARKEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.LIGHTEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.COLOR_DODGE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.COLOR_BURN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.HARD_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.SOFT_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.DIFFERENCE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.EXCLUSION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.HUE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.SATURATION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.COLOR] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.LUMINOSITY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.NONE] = [0, 0]; + + // not-premultiplied blend modes + array[exports.BLEND_MODES.NORMAL_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.ADD_NPM] = [gl.SRC_ALPHA, gl.ONE, gl.ONE, gl.ONE]; + array[exports.BLEND_MODES.SCREEN_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + + // composite operations + array[exports.BLEND_MODES.SRC_IN] = [gl.DST_ALPHA, gl.ZERO]; + array[exports.BLEND_MODES.SRC_OUT] = [gl.ONE_MINUS_DST_ALPHA, gl.ZERO]; + array[exports.BLEND_MODES.SRC_ATOP] = [gl.DST_ALPHA, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.DST_OVER] = [gl.ONE_MINUS_DST_ALPHA, gl.ONE]; + array[exports.BLEND_MODES.DST_IN] = [gl.ZERO, gl.SRC_ALPHA]; + array[exports.BLEND_MODES.DST_OUT] = [gl.ZERO, gl.ONE_MINUS_SRC_ALPHA]; + array[exports.BLEND_MODES.DST_ATOP] = [gl.ONE_MINUS_DST_ALPHA, gl.SRC_ALPHA]; + array[exports.BLEND_MODES.XOR] = [gl.ONE_MINUS_DST_ALPHA, gl.ONE_MINUS_SRC_ALPHA]; + + // SUBTRACT from flash + array[exports.BLEND_MODES.SUBTRACT] = [gl.ONE, gl.ONE, gl.ONE, gl.ONE, gl.FUNC_REVERSE_SUBTRACT, gl.FUNC_ADD]; + + return array; + } + + var BLEND$1 = 0; + var OFFSET$1 = 1; + var CULLING$1 = 2; + var DEPTH_TEST$1 = 3; + var WINDING$1 = 4; + + /** + * System plugin to the renderer to manage WebGL state machines. + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + var StateSystem = /*@__PURE__*/(function (System) { + function StateSystem(renderer) + { + System.call(this, renderer); + + /** + * GL context + * @member {WebGLRenderingContext} + * @readonly + */ + this.gl = null; + + /** + * State ID + * @member {number} + * @readonly + */ + this.stateId = 0; + + /** + * Polygon offset + * @member {number} + * @readonly + */ + this.polygonOffset = 0; + + /** + * Blend mode + * @member {number} + * @default PIXI.BLEND_MODES.NONE + * @readonly + */ + this.blendMode = exports.BLEND_MODES.NONE; + + /** + * Whether current blend equation is different + * @member {boolean} + * @protected + */ + this._blendEq = false; + + /** + * Collection of calls + * @member {function[]} + * @readonly + */ + this.map = []; + + // map functions for when we set state.. + this.map[BLEND$1] = this.setBlend; + this.map[OFFSET$1] = this.setOffset; + this.map[CULLING$1] = this.setCullFace; + this.map[DEPTH_TEST$1] = this.setDepthTest; + this.map[WINDING$1] = this.setFrontFace; + + /** + * Collection of check calls + * @member {function[]} + * @readonly + */ + this.checks = []; + + /** + * Default WebGL State + * @member {PIXI.State} + * @readonly + */ + this.defaultState = new State(); + this.defaultState.blend = true; + this.defaultState.depth = true; + } + + if ( System ) { StateSystem.__proto__ = System; } + StateSystem.prototype = Object.create( System && System.prototype ); + StateSystem.prototype.constructor = StateSystem; + + StateSystem.prototype.contextChange = function contextChange (gl) + { + this.gl = gl; + + this.blendModes = mapWebGLBlendModesToPixi(gl); + + this.set(this.defaultState); + + this.reset(); + }; + + /** + * Sets the current state + * + * @param {*} state - The state to set. + */ + StateSystem.prototype.set = function set (state) + { + state = state || this.defaultState; + + // TODO maybe to an object check? ( this.state === state )? + if (this.stateId !== state.data) + { + var diff = this.stateId ^ state.data; + var i = 0; + + // order from least to most common + while (diff) + { + if (diff & 1) + { + // state change! + this.map[i].call(this, !!(state.data & (1 << i))); + } + + diff = diff >> 1; + i++; + } + + this.stateId = state.data; + } + + // based on the above settings we check for specific modes.. + // for example if blend is active we check and set the blend modes + // or of polygon offset is active we check the poly depth. + for (var i$1 = 0; i$1 < this.checks.length; i$1++) + { + this.checks[i$1](this, state); + } + }; + + /** + * Sets the state, when previous state is unknown + * + * @param {*} state - The state to set + */ + StateSystem.prototype.forceState = function forceState (state) + { + state = state || this.defaultState; + for (var i = 0; i < this.map.length; i++) + { + this.map[i].call(this, !!(state.data & (1 << i))); + } + for (var i$1 = 0; i$1 < this.checks.length; i$1++) + { + this.checks[i$1](this, state); + } + + this.stateId = state.data; + }; + + /** + * Enables or disabled blending. + * + * @param {boolean} value - Turn on or off webgl blending. + */ + StateSystem.prototype.setBlend = function setBlend (value) + { + this.updateCheck(StateSystem.checkBlendMode, value); + + this.gl[value ? 'enable' : 'disable'](this.gl.BLEND); + }; + + /** + * Enables or disable polygon offset fill + * + * @param {boolean} value - Turn on or off webgl polygon offset testing. + */ + StateSystem.prototype.setOffset = function setOffset (value) + { + this.updateCheck(StateSystem.checkPolygonOffset, value); + + this.gl[value ? 'enable' : 'disable'](this.gl.POLYGON_OFFSET_FILL); + }; + + /** + * Sets whether to enable or disable depth test. + * + * @param {boolean} value - Turn on or off webgl depth testing. + */ + StateSystem.prototype.setDepthTest = function setDepthTest (value) + { + this.gl[value ? 'enable' : 'disable'](this.gl.DEPTH_TEST); + }; + + /** + * Sets whether to enable or disable cull face. + * + * @param {boolean} value - Turn on or off webgl cull face. + */ + StateSystem.prototype.setCullFace = function setCullFace (value) + { + this.gl[value ? 'enable' : 'disable'](this.gl.CULL_FACE); + }; + + /** + * Sets the gl front face. + * + * @param {boolean} value - true is clockwise and false is counter-clockwise + */ + StateSystem.prototype.setFrontFace = function setFrontFace (value) + { + this.gl.frontFace(this.gl[value ? 'CW' : 'CCW']); + }; + + /** + * Sets the blend mode. + * + * @param {number} value - The blend mode to set to. + */ + StateSystem.prototype.setBlendMode = function setBlendMode (value) + { + if (value === this.blendMode) + { + return; + } + + this.blendMode = value; + + var mode = this.blendModes[value]; + var gl = this.gl; + + if (mode.length === 2) + { + gl.blendFunc(mode[0], mode[1]); + } + else + { + gl.blendFuncSeparate(mode[0], mode[1], mode[2], mode[3]); + } + if (mode.length === 6) + { + this._blendEq = true; + gl.blendEquationSeparate(mode[4], mode[5]); + } + else if (this._blendEq) + { + this._blendEq = false; + gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD); + } + }; + + /** + * Sets the polygon offset. + * + * @param {number} value - the polygon offset + * @param {number} scale - the polygon offset scale + */ + StateSystem.prototype.setPolygonOffset = function setPolygonOffset (value, scale) + { + this.gl.polygonOffset(value, scale); + }; + + // used + /** + * Resets all the logic and disables the vaos + */ + StateSystem.prototype.reset = function reset () + { + this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false); + + this.forceState(0); + + this._blendEq = true; + this.blendMode = -1; + this.setBlendMode(0); + }; + + /** + * checks to see which updates should be checked based on which settings have been activated. + * For example, if blend is enabled then we should check the blend modes each time the state is changed + * or if polygon fill is activated then we need to check if the polygon offset changes. + * The idea is that we only check what we have too. + * + * @param {Function} func the checking function to add or remove + * @param {boolean} value should the check function be added or removed. + */ + StateSystem.prototype.updateCheck = function updateCheck (func, value) + { + var index = this.checks.indexOf(func); + + if (value && index === -1) + { + this.checks.push(func); + } + else if (!value && index !== -1) + { + this.checks.splice(index, 1); + } + }; + + /** + * A private little wrapper function that we call to check the blend mode. + * + * @static + * @private + * @param {PIXI.StateSystem} System the System to perform the state check on + * @param {PIXI.State} state the state that the blendMode will pulled from + */ + StateSystem.checkBlendMode = function checkBlendMode (system, state) + { + system.setBlendMode(state.blendMode); + }; + + /** + * A private little wrapper function that we call to check the polygon offset. + * + * @static + * @private + * @param {PIXI.StateSystem} System the System to perform the state check on + * @param {PIXI.State} state the state that the blendMode will pulled from + */ + StateSystem.checkPolygonOffset = function checkPolygonOffset (system, state) + { + system.setPolygonOffset(state.polygonOffset, 0); + }; + + return StateSystem; + }(System)); + + /** + * System plugin to the renderer to manage texture garbage collection on the GPU, + * ensuring that it does not get clogged up with textures that are no longer being used. + * + * @class + * @memberof PIXI.systems + * @extends PIXI.System + */ + var TextureGCSystem = /*@__PURE__*/(function (System) { + function TextureGCSystem(renderer) + { + System.call(this, renderer); + + /** + * Count + * @member {number} + * @readonly + */ + this.count = 0; + + /** + * Check count + * @member {number} + * @readonly + */ + this.checkCount = 0; + + /** + * Maximum idle time, in seconds + * @member {number} + * @see PIXI.settings.GC_MAX_IDLE + */ + this.maxIdle = settings.GC_MAX_IDLE; + + /** + * Maximum number of item to check + * @member {number} + * @see PIXI.settings.GC_MAX_CHECK_COUNT + */ + this.checkCountMax = settings.GC_MAX_CHECK_COUNT; + + /** + * Current garabage collection mode + * @member {PIXI.GC_MODES} + * @see PIXI.settings.GC_MODE + */ + this.mode = settings.GC_MODE; + } + + if ( System ) { TextureGCSystem.__proto__ = System; } + TextureGCSystem.prototype = Object.create( System && System.prototype ); + TextureGCSystem.prototype.constructor = TextureGCSystem; + + /** + * Checks to see when the last time a texture was used + * if the texture has not been used for a specified amount of time it will be removed from the GPU + */ + TextureGCSystem.prototype.postrender = function postrender () + { + if (!this.renderer.renderingToScreen) + { + return; + } + + this.count++; + + if (this.mode === exports.GC_MODES.MANUAL) + { + return; + } + + this.checkCount++; + + if (this.checkCount > this.checkCountMax) + { + this.checkCount = 0; + + this.run(); + } + }; + + /** + * Checks to see when the last time a texture was used + * if the texture has not been used for a specified amount of time it will be removed from the GPU + */ + TextureGCSystem.prototype.run = function run () + { + var tm = this.renderer.texture; + var managedTextures = tm.managedTextures; + var wasRemoved = false; + + for (var i = 0; i < managedTextures.length; i++) + { + var texture = managedTextures[i]; + + // only supports non generated textures at the moment! + if (!texture.framebuffer && this.count - texture.touched > this.maxIdle) + { + tm.destroyTexture(texture, true); + managedTextures[i] = null; + wasRemoved = true; + } + } + + if (wasRemoved) + { + var j = 0; + + for (var i$1 = 0; i$1 < managedTextures.length; i$1++) + { + if (managedTextures[i$1] !== null) + { + managedTextures[j++] = managedTextures[i$1]; + } + } + + managedTextures.length = j; + } + }; + + /** + * Removes all the textures within the specified displayObject and its children from the GPU + * + * @param {PIXI.DisplayObject} displayObject - the displayObject to remove the textures from. + */ + TextureGCSystem.prototype.unload = function unload (displayObject) + { + var tm = this.renderer.textureSystem; + + // only destroy non generated textures + if (displayObject._texture && displayObject._texture._glRenderTargets) + { + tm.destroyTexture(displayObject._texture); + } + + for (var i = displayObject.children.length - 1; i >= 0; i--) + { + this.unload(displayObject.children[i]); + } + }; + + return TextureGCSystem; + }(System)); + + /** + * Internal texture for WebGL context + * @class + * @memberof PIXI + */ + var GLTexture = function GLTexture(texture) + { + /** + * The WebGL texture + * @member {WebGLTexture} + */ + this.texture = texture; + + /** + * Width of texture that was used in texImage2D + * @member {number} + */ + this.width = -1; + + /** + * Height of texture that was used in texImage2D + * @member {number} + */ + this.height = -1; + + /** + * Texture contents dirty flag + * @member {number} + */ + this.dirtyId = -1; + + /** + * Texture style dirty flag + * @member {number} + */ + this.dirtyStyleId = -1; + + /** + * Whether mip levels has to be generated + * @member {boolean} + */ + this.mipmap = false; + + /** + * WrapMode copied from baseTexture + * @member {number} + */ + this.wrapMode = 33071; + + /** + * Type copied from baseTexture + * @member {number} + */ + this.type = 6408; + + /** + * Type copied from baseTexture + * @member {number} + */ + this.internalFormat = 5121; + }; + + /** + * System plugin to the renderer to manage textures. + * + * @class + * @extends PIXI.System + * @memberof PIXI.systems + */ + var TextureSystem = /*@__PURE__*/(function (System) { + function TextureSystem(renderer) + { + System.call(this, renderer); + + // TODO set to max textures... + /** + * Bound textures + * @member {PIXI.BaseTexture[]} + * @readonly + */ + this.boundTextures = []; + /** + * Current location + * @member {number} + * @readonly + */ + this.currentLocation = -1; + + /** + * List of managed textures + * @member {PIXI.BaseTexture[]} + * @readonly + */ + this.managedTextures = []; + + /** + * Did someone temper with textures state? We'll overwrite them when we need to unbind something. + * @member {boolean} + * @private + */ + this._unknownBoundTextures = false; + + /** + * BaseTexture value that shows that we don't know what is bound + * @member {PIXI.BaseTexture} + * @readonly + */ + this.unknownTexture = new BaseTexture(); + } + + if ( System ) { TextureSystem.__proto__ = System; } + TextureSystem.prototype = Object.create( System && System.prototype ); + TextureSystem.prototype.constructor = TextureSystem; + + /** + * Sets up the renderer context and necessary buffers. + */ + TextureSystem.prototype.contextChange = function contextChange () + { + var gl = this.gl = this.renderer.gl; + + this.CONTEXT_UID = this.renderer.CONTEXT_UID; + + this.webGLVersion = this.renderer.context.webGLVersion; + + var maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS); + + this.boundTextures.length = maxTextures; + + for (var i = 0; i < maxTextures; i++) + { + this.boundTextures[i] = null; + } + + // TODO move this.. to a nice make empty textures class.. + this.emptyTextures = {}; + + var emptyTexture2D = new GLTexture(gl.createTexture()); + + gl.bindTexture(gl.TEXTURE_2D, emptyTexture2D.texture); + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4)); + + this.emptyTextures[gl.TEXTURE_2D] = emptyTexture2D; + this.emptyTextures[gl.TEXTURE_CUBE_MAP] = new GLTexture(gl.createTexture()); + + gl.bindTexture(gl.TEXTURE_CUBE_MAP, this.emptyTextures[gl.TEXTURE_CUBE_MAP].texture); + + for (var i$1 = 0; i$1 < 6; i$1++) + { + gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + i$1, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null); + } + + gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR); + gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.LINEAR); + + for (var i$2 = 0; i$2 < this.boundTextures.length; i$2++) + { + this.bind(null, i$2); + } + }; + + /** + * Bind a texture to a specific location + * + * If you want to unbind something, please use `unbind(texture)` instead of `bind(null, textureLocation)` + * + * @param {PIXI.Texture|PIXI.BaseTexture} texture - Texture to bind + * @param {number} [location=0] - Location to bind at + */ + TextureSystem.prototype.bind = function bind (texture, location) + { + if ( location === void 0 ) { location = 0; } + + var ref = this; + var gl = ref.gl; + + if (texture) + { + texture = texture.baseTexture || texture; + + if (texture.valid) + { + texture.touched = this.renderer.textureGC.count; + + var glTexture = texture._glTextures[this.CONTEXT_UID] || this.initTexture(texture); + + if (this.boundTextures[location] !== texture) + { + if (this.currentLocation !== location) + { + this.currentLocation = location; + gl.activeTexture(gl.TEXTURE0 + location); + } + gl.bindTexture(texture.target, glTexture.texture); + } + + if (glTexture.dirtyId !== texture.dirtyId) + { + if (this.currentLocation !== location) + { + this.currentLocation = location; + gl.activeTexture(gl.TEXTURE0 + location); + } + this.updateTexture(texture); + } + + this.boundTextures[location] = texture; + } + } + else + { + if (this.currentLocation !== location) + { + this.currentLocation = location; + gl.activeTexture(gl.TEXTURE0 + location); + } + + gl.bindTexture(gl.TEXTURE_2D, this.emptyTextures[gl.TEXTURE_2D].texture); + this.boundTextures[location] = null; + } + }; + + /** + * Resets texture location and bound textures + * + * Actual `bind(null, i)` calls will be performed at next `unbind()` call + */ + TextureSystem.prototype.reset = function reset () + { + this._unknownBoundTextures = true; + this.currentLocation = -1; + + for (var i = 0; i < this.boundTextures.length; i++) + { + this.boundTextures[i] = this.unknownTexture; + } + }; + + /** + * Unbind a texture + * @param {PIXI.Texture|PIXI.BaseTexture} texture - Texture to bind + */ + TextureSystem.prototype.unbind = function unbind (texture) + { + var ref = this; + var gl = ref.gl; + var boundTextures = ref.boundTextures; + + if (this._unknownBoundTextures) + { + this._unknownBoundTextures = false; + // someone changed webGL state, + // we have to be sure that our texture does not appear in multi-texture renderer samplers + for (var i = 0; i < boundTextures.length; i++) + { + if (boundTextures[i] === this.unknownTexture) + { + this.bind(null, i); + } + } + } + + for (var i$1 = 0; i$1 < boundTextures.length; i$1++) + { + if (boundTextures[i$1] === texture) + { + if (this.currentLocation !== i$1) + { + gl.activeTexture(gl.TEXTURE0 + i$1); + this.currentLocation = i$1; + } + + gl.bindTexture(gl.TEXTURE_2D, this.emptyTextures[texture.target].texture); + boundTextures[i$1] = null; + } + } + }; + + /** + * Initialize a texture + * + * @private + * @param {PIXI.BaseTexture} texture - Texture to initialize + */ + TextureSystem.prototype.initTexture = function initTexture (texture) + { + var glTexture = new GLTexture(this.gl.createTexture()); + + // guarantee an update.. + glTexture.dirtyId = -1; + + texture._glTextures[this.CONTEXT_UID] = glTexture; + + this.managedTextures.push(texture); + texture.on('dispose', this.destroyTexture, this); + + return glTexture; + }; + + TextureSystem.prototype.initTextureType = function initTextureType (texture, glTexture) + { + glTexture.internalFormat = texture.format; + glTexture.type = texture.type; + if (this.webGLVersion !== 2) + { + return; + } + var gl = this.renderer.gl; + + if (texture.type === gl.FLOAT + && texture.format === gl.RGBA) + { + glTexture.internalFormat = gl.RGBA32F; + } + // that's WebGL1 HALF_FLOAT_OES + // we have to convert it to WebGL HALF_FLOAT + if (texture.type === exports.TYPES.HALF_FLOAT) + { + glTexture.type = gl.HALF_FLOAT; + } + if (glTexture.type === gl.HALF_FLOAT + && texture.format === gl.RGBA) + { + glTexture.internalFormat = gl.RGBA16F; + } + }; + + /** + * Update a texture + * + * @private + * @param {PIXI.BaseTexture} texture - Texture to initialize + */ + TextureSystem.prototype.updateTexture = function updateTexture (texture) + { + var glTexture = texture._glTextures[this.CONTEXT_UID]; + + if (!glTexture) + { + return; + } + + var renderer = this.renderer; + + this.initTextureType(texture, glTexture); + + if (texture.resource && texture.resource.upload(renderer, texture, glTexture)) + { ; } + else + { + // default, renderTexture-like logic + var width = texture.realWidth; + var height = texture.realHeight; + var gl = renderer.gl; + + if (glTexture.width !== width + || glTexture.height !== height + || glTexture.dirtyId < 0) + { + glTexture.width = width; + glTexture.height = height; + + gl.texImage2D(texture.target, 0, + glTexture.internalFormat, + width, + height, + 0, + texture.format, + glTexture.type, + null); + } + } + + // lets only update what changes.. + if (texture.dirtyStyleId !== glTexture.dirtyStyleId) + { + this.updateTextureStyle(texture); + } + glTexture.dirtyId = texture.dirtyId; + }; + + /** + * Deletes the texture from WebGL + * + * @private + * @param {PIXI.BaseTexture|PIXI.Texture} texture - the texture to destroy + * @param {boolean} [skipRemove=false] - Whether to skip removing the texture from the TextureManager. + */ + TextureSystem.prototype.destroyTexture = function destroyTexture (texture, skipRemove) + { + var ref = this; + var gl = ref.gl; + + texture = texture.baseTexture || texture; + + if (texture._glTextures[this.CONTEXT_UID]) + { + this.unbind(texture); + + gl.deleteTexture(texture._glTextures[this.CONTEXT_UID].texture); + texture.off('dispose', this.destroyTexture, this); + + delete texture._glTextures[this.CONTEXT_UID]; + + if (!skipRemove) + { + var i = this.managedTextures.indexOf(texture); + + if (i !== -1) + { + removeItems(this.managedTextures, i, 1); + } + } + } + }; + + /** + * Update texture style such as mipmap flag + * + * @private + * @param {PIXI.BaseTexture} texture - Texture to update + */ + TextureSystem.prototype.updateTextureStyle = function updateTextureStyle (texture) + { + var glTexture = texture._glTextures[this.CONTEXT_UID]; + + if (!glTexture) + { + return; + } + + if ((texture.mipmap === exports.MIPMAP_MODES.POW2 || this.webGLVersion !== 2) && !texture.isPowerOfTwo) + { + glTexture.mipmap = 0; + } + else + { + glTexture.mipmap = texture.mipmap >= 1; + } + + if (this.webGLVersion !== 2 && !texture.isPowerOfTwo) + { + glTexture.wrapMode = exports.WRAP_MODES.CLAMP; + } + else + { + glTexture.wrapMode = texture.wrapMode; + } + + if (texture.resource && texture.resource.style(this.renderer, texture, glTexture)) + { ; } + else + { + this.setStyle(texture, glTexture); + } + + glTexture.dirtyStyleId = texture.dirtyStyleId; + }; + + /** + * Set style for texture + * + * @private + * @param {PIXI.BaseTexture} texture - Texture to update + * @param {PIXI.GLTexture} glTexture + */ + TextureSystem.prototype.setStyle = function setStyle (texture, glTexture) + { + var gl = this.gl; + + if (glTexture.mipmap) + { + gl.generateMipmap(texture.target); + } + + gl.texParameteri(texture.target, gl.TEXTURE_WRAP_S, glTexture.wrapMode); + gl.texParameteri(texture.target, gl.TEXTURE_WRAP_T, glTexture.wrapMode); + + if (glTexture.mipmap) + { + /* eslint-disable max-len */ + gl.texParameteri(texture.target, gl.TEXTURE_MIN_FILTER, texture.scaleMode === exports.SCALE_MODES.LINEAR ? gl.LINEAR_MIPMAP_LINEAR : gl.NEAREST_MIPMAP_NEAREST); + /* eslint-disable max-len */ + + var anisotropicExt = this.renderer.context.extensions.anisotropicFiltering; + + if (anisotropicExt && texture.anisotropicLevel > 0 && texture.scaleMode === exports.SCALE_MODES.LINEAR) + { + var level = Math.min(texture.anisotropicLevel, gl.getParameter(anisotropicExt.MAX_TEXTURE_MAX_ANISOTROPY_EXT)); + + gl.texParameterf(texture.target, anisotropicExt.TEXTURE_MAX_ANISOTROPY_EXT, level); + } + } + else + { + gl.texParameteri(texture.target, gl.TEXTURE_MIN_FILTER, texture.scaleMode === exports.SCALE_MODES.LINEAR ? gl.LINEAR : gl.NEAREST); + } + + gl.texParameteri(texture.target, gl.TEXTURE_MAG_FILTER, texture.scaleMode === exports.SCALE_MODES.LINEAR ? gl.LINEAR : gl.NEAREST); + }; + + return TextureSystem; + }(System)); + + /** + * Systems are individual components to the Renderer pipeline. + * @namespace PIXI.systems + */ + + var systems = ({ + FilterSystem: FilterSystem, + BatchSystem: BatchSystem, + ContextSystem: ContextSystem, + FramebufferSystem: FramebufferSystem, + GeometrySystem: GeometrySystem, + MaskSystem: MaskSystem, + ScissorSystem: ScissorSystem, + StencilSystem: StencilSystem, + ProjectionSystem: ProjectionSystem, + RenderTextureSystem: RenderTextureSystem, + ShaderSystem: ShaderSystem, + StateSystem: StateSystem, + TextureGCSystem: TextureGCSystem, + TextureSystem: TextureSystem + }); + + var tempMatrix = new Matrix(); + + /** + * The AbstractRenderer is the base for a PixiJS Renderer. It is extended by the {@link PIXI.CanvasRenderer} + * and {@link PIXI.Renderer} which can be used for rendering a PixiJS scene. + * + * @abstract + * @class + * @extends PIXI.utils.EventEmitter + * @memberof PIXI + */ + var AbstractRenderer = /*@__PURE__*/(function (EventEmitter) { + function AbstractRenderer(system, options) + { + EventEmitter.call(this); + + // Add the default render options + options = Object.assign({}, settings.RENDER_OPTIONS, options); + + // Deprecation notice for renderer roundPixels option + if (options.roundPixels) + { + settings.ROUND_PIXELS = options.roundPixels; + deprecation('5.0.0', 'Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS', 2); + } + + /** + * The supplied constructor options. + * + * @member {Object} + * @readOnly + */ + this.options = options; + + /** + * The type of the renderer. + * + * @member {number} + * @default PIXI.RENDERER_TYPE.UNKNOWN + * @see PIXI.RENDERER_TYPE + */ + this.type = exports.RENDERER_TYPE.UNKNOWN; + + /** + * Measurements of the screen. (0, 0, screenWidth, screenHeight). + * + * Its safe to use as filterArea or hitArea for the whole stage. + * + * @member {PIXI.Rectangle} + */ + this.screen = new Rectangle(0, 0, options.width, options.height); + + /** + * The canvas element that everything is drawn to. + * + * @member {HTMLCanvasElement} + */ + this.view = options.view || document.createElement('canvas'); + + /** + * The resolution / device pixel ratio of the renderer. + * + * @member {number} + * @default 1 + */ + this.resolution = options.resolution || settings.RESOLUTION; + + /** + * Whether the render view is transparent. + * + * @member {boolean} + */ + this.transparent = options.transparent; + + /** + * Whether CSS dimensions of canvas view should be resized to screen dimensions automatically. + * + * @member {boolean} + */ + this.autoDensity = options.autoDensity || options.autoResize || false; + // autoResize is deprecated, provides fallback support + + /** + * The value of the preserveDrawingBuffer flag affects whether or not the contents of + * the stencil buffer is retained after rendering. + * + * @member {boolean} + */ + this.preserveDrawingBuffer = options.preserveDrawingBuffer; + + /** + * This sets if the CanvasRenderer will clear the canvas or not before the new render pass. + * If the scene is NOT transparent PixiJS will use a canvas sized fillRect operation every + * frame to set the canvas background color. If the scene is transparent PixiJS will use clearRect + * to clear the canvas every frame. Disable this by setting this to false. For example, if + * your game has a canvas filling background image you often don't need this set. + * + * @member {boolean} + * @default + */ + this.clearBeforeRender = options.clearBeforeRender; + + /** + * The background color as a number. + * + * @member {number} + * @protected + */ + this._backgroundColor = 0x000000; + + /** + * The background color as an [R, G, B] array. + * + * @member {number[]} + * @protected + */ + this._backgroundColorRgba = [0, 0, 0, 0]; + + /** + * The background color as a string. + * + * @member {string} + * @protected + */ + this._backgroundColorString = '#000000'; + + this.backgroundColor = options.backgroundColor || this._backgroundColor; // run bg color setter + + /** + * This temporary display object used as the parent of the currently being rendered item. + * + * @member {PIXI.DisplayObject} + * @protected + */ + this._tempDisplayObjectParent = new Container(); + + /** + * The last root object that the renderer tried to render. + * + * @member {PIXI.DisplayObject} + * @protected + */ + this._lastObjectRendered = this._tempDisplayObjectParent; + + /** + * Collection of plugins. + * @readonly + * @member {object} + */ + this.plugins = {}; + } + + if ( EventEmitter ) { AbstractRenderer.__proto__ = EventEmitter; } + AbstractRenderer.prototype = Object.create( EventEmitter && EventEmitter.prototype ); + AbstractRenderer.prototype.constructor = AbstractRenderer; + + var prototypeAccessors = { width: { configurable: true },height: { configurable: true },backgroundColor: { configurable: true } }; + + /** + * Initialize the plugins. + * + * @protected + * @param {object} staticMap - The dictionary of statically saved plugins. + */ + AbstractRenderer.prototype.initPlugins = function initPlugins (staticMap) + { + for (var o in staticMap) + { + this.plugins[o] = new (staticMap[o])(this); + } + }; + + /** + * Same as view.width, actual number of pixels in the canvas by horizontal. + * + * @member {number} + * @readonly + * @default 800 + */ + prototypeAccessors.width.get = function () + { + return this.view.width; + }; + + /** + * Same as view.height, actual number of pixels in the canvas by vertical. + * + * @member {number} + * @readonly + * @default 600 + */ + prototypeAccessors.height.get = function () + { + return this.view.height; + }; + + /** + * Resizes the screen and canvas to the specified width and height. + * Canvas dimensions are multiplied by resolution. + * + * @param {number} screenWidth - The new width of the screen. + * @param {number} screenHeight - The new height of the screen. + */ + AbstractRenderer.prototype.resize = function resize (screenWidth, screenHeight) + { + this.screen.width = screenWidth; + this.screen.height = screenHeight; + + this.view.width = screenWidth * this.resolution; + this.view.height = screenHeight * this.resolution; + + if (this.autoDensity) + { + this.view.style.width = screenWidth + "px"; + this.view.style.height = screenHeight + "px"; + } + }; + + /** + * Useful function that returns a texture of the display object that can then be used to create sprites + * This can be quite useful if your displayObject is complicated and needs to be reused multiple times. + * + * @param {PIXI.DisplayObject} displayObject - The displayObject the object will be generated from. + * @param {PIXI.SCALE_MODES} scaleMode - The scale mode of the texture. + * @param {number} resolution - The resolution / device pixel ratio of the texture being generated. + * @param {PIXI.Rectangle} [region] - The region of the displayObject, that shall be rendered, + * if no region is specified, defaults to the local bounds of the displayObject. + * @return {PIXI.RenderTexture} A texture of the graphics object. + */ + AbstractRenderer.prototype.generateTexture = function generateTexture (displayObject, scaleMode, resolution, region) + { + region = region || displayObject.getLocalBounds(); + + // minimum texture size is 1x1, 0x0 will throw an error + if (region.width === 0) { region.width = 1; } + if (region.height === 0) { region.height = 1; } + + var renderTexture = RenderTexture.create( + { + width: region.width | 0, + height: region.height | 0, + scaleMode: scaleMode, + resolution: resolution, + }); + + tempMatrix.tx = -region.x; + tempMatrix.ty = -region.y; + + this.render(displayObject, renderTexture, false, tempMatrix, !!displayObject.parent); + + return renderTexture; + }; + + /** + * Removes everything from the renderer and optionally removes the Canvas DOM element. + * + * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM. + */ + AbstractRenderer.prototype.destroy = function destroy (removeView) + { + for (var o in this.plugins) + { + this.plugins[o].destroy(); + this.plugins[o] = null; + } + + if (removeView && this.view.parentNode) + { + this.view.parentNode.removeChild(this.view); + } + + this.plugins = null; + + this.type = exports.RENDERER_TYPE.UNKNOWN; + + this.view = null; + + this.screen = null; + + this.resolution = 0; + + this.transparent = false; + + this.autoDensity = false; + + this.blendModes = null; + + this.options = null; + + this.preserveDrawingBuffer = false; + this.clearBeforeRender = false; + + this._backgroundColor = 0; + this._backgroundColorRgba = null; + this._backgroundColorString = null; + + this._tempDisplayObjectParent = null; + this._lastObjectRendered = null; + }; + + /** + * The background color to fill if not transparent + * + * @member {number} + */ + prototypeAccessors.backgroundColor.get = function () + { + return this._backgroundColor; + }; + + prototypeAccessors.backgroundColor.set = function (value) // eslint-disable-line require-jsdoc + { + this._backgroundColor = value; + this._backgroundColorString = hex2string(value); + hex2rgb(value, this._backgroundColorRgba); + }; + + Object.defineProperties( AbstractRenderer.prototype, prototypeAccessors ); + + return AbstractRenderer; + }(eventemitter3)); + + /** + * The Renderer draws the scene and all its content onto a WebGL enabled canvas. + * + * This renderer should be used for browsers that support WebGL. + * + * This renderer works by automatically managing WebGLBatchesm, so no need for Sprite Batches or Sprite Clouds. + * Don't forget to add the view to your DOM or you will not see anything! + * + * @class + * @memberof PIXI + * @extends PIXI.AbstractRenderer + */ + var Renderer = /*@__PURE__*/(function (AbstractRenderer) { + function Renderer(options) + { + if ( options === void 0 ) { options = {}; } + + AbstractRenderer.call(this, 'WebGL', options); + + // the options will have been modified here in the super constructor with pixi's default settings.. + options = this.options; + + /** + * The type of this renderer as a standardized const + * + * @member {number} + * @see PIXI.RENDERER_TYPE + */ + this.type = exports.RENDERER_TYPE.WEBGL; + + /** + * WebGL context, set by the contextSystem (this.context) + * + * @readonly + * @member {WebGLRenderingContext} + */ + this.gl = null; + + this.CONTEXT_UID = 0; + + // TODO legacy! + + /** + * Internal signal instances of **runner**, these + * are assigned to each system created. + * @see PIXI.Runner + * @name PIXI.Renderer#runners + * @private + * @type {object} + * @readonly + * @property {PIXI.Runner} destroy - Destroy runner + * @property {PIXI.Runner} contextChange - Context change runner + * @property {PIXI.Runner} reset - Reset runner + * @property {PIXI.Runner} update - Update runner + * @property {PIXI.Runner} postrender - Post-render runner + * @property {PIXI.Runner} prerender - Pre-render runner + * @property {PIXI.Runner} resize - Resize runner + */ + this.runners = { + destroy: new Runner('destroy'), + contextChange: new Runner('contextChange', 1), + reset: new Runner('reset'), + update: new Runner('update'), + postrender: new Runner('postrender'), + prerender: new Runner('prerender'), + resize: new Runner('resize', 2), + }; + + /** + * Global uniforms + * @member {PIXI.UniformGroup} + */ + this.globalUniforms = new UniformGroup({ + projectionMatrix: new Matrix(), + }, true); + + /** + * Mask system instance + * @member {PIXI.systems.MaskSystem} mask + * @memberof PIXI.Renderer# + * @readonly + */ + this.addSystem(MaskSystem, 'mask') + /** + * Context system instance + * @member {PIXI.systems.ContextSystem} context + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(ContextSystem, 'context') + /** + * State system instance + * @member {PIXI.systems.StateSystem} state + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(StateSystem, 'state') + /** + * Shader system instance + * @member {PIXI.systems.ShaderSystem} shader + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(ShaderSystem, 'shader') + /** + * Texture system instance + * @member {PIXI.systems.TextureSystem} texture + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(TextureSystem, 'texture') + /** + * Geometry system instance + * @member {PIXI.systems.GeometrySystem} geometry + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(GeometrySystem, 'geometry') + /** + * Framebuffer system instance + * @member {PIXI.systems.FramebufferSystem} framebuffer + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(FramebufferSystem, 'framebuffer') + /** + * Scissor system instance + * @member {PIXI.systems.ScissorSystem} scissor + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(ScissorSystem, 'scissor') + /** + * Stencil system instance + * @member {PIXI.systems.StencilSystem} stencil + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(StencilSystem, 'stencil') + /** + * Projection system instance + * @member {PIXI.systems.ProjectionSystem} projection + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(ProjectionSystem, 'projection') + /** + * Texture garbage collector system instance + * @member {PIXI.systems.TextureGCSystem} textureGC + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(TextureGCSystem, 'textureGC') + /** + * Filter system instance + * @member {PIXI.systems.FilterSystem} filter + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(FilterSystem, 'filter') + /** + * RenderTexture system instance + * @member {PIXI.systems.RenderTextureSystem} renderTexture + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(RenderTextureSystem, 'renderTexture') + + /** + * Batch system instance + * @member {PIXI.systems.BatchSystem} batch + * @memberof PIXI.Renderer# + * @readonly + */ + .addSystem(BatchSystem, 'batch'); + + this.initPlugins(Renderer.__plugins); + + /** + * The options passed in to create a new WebGL context. + */ + if (options.context) + { + this.context.initFromContext(options.context); + } + else + { + this.context.initFromOptions({ + alpha: this.transparent, + antialias: options.antialias, + premultipliedAlpha: this.transparent && this.transparent !== 'notMultiplied', + stencil: true, + preserveDrawingBuffer: options.preserveDrawingBuffer, + powerPreference: this.options.powerPreference, + }); + } + + /** + * Flag if we are rendering to the screen vs renderTexture + * @member {boolean} + * @readonly + * @default true + */ + this.renderingToScreen = true; + + sayHello(this.context.webGLVersion === 2 ? 'WebGL 2' : 'WebGL 1'); + + this.resize(this.options.width, this.options.height); + } + + if ( AbstractRenderer ) { Renderer.__proto__ = AbstractRenderer; } + Renderer.prototype = Object.create( AbstractRenderer && AbstractRenderer.prototype ); + Renderer.prototype.constructor = Renderer; + + /** + * Add a new system to the renderer. + * @param {Function} ClassRef - Class reference + * @param {string} [name] - Property name for system, if not specified + * will use a static `name` property on the class itself. This + * name will be assigned as s property on the Renderer so make + * sure it doesn't collide with properties on Renderer. + * @return {PIXI.Renderer} Return instance of renderer + */ + Renderer.create = function create (options) + { + if (isWebGLSupported()) + { + return new Renderer(options); + } + + throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.'); + }; + + Renderer.prototype.addSystem = function addSystem (ClassRef, name) + { + if (!name) + { + name = ClassRef.name; + } + + var system = new ClassRef(this); + + if (this[name]) + { + throw new Error(("Whoops! The name \"" + name + "\" is already in use")); + } + + this[name] = system; + + for (var i in this.runners) + { + this.runners[i].add(system); + } + + /** + * Fired after rendering finishes. + * + * @event PIXI.Renderer#postrender + */ + + /** + * Fired before rendering starts. + * + * @event PIXI.Renderer#prerender + */ + + /** + * Fired when the WebGL context is set. + * + * @event PIXI.Renderer#context + * @param {WebGLRenderingContext} gl - WebGL context. + */ + + return this; + }; + + /** + * Renders the object to its WebGL view + * + * @param {PIXI.DisplayObject} displayObject - The object to be rendered. + * @param {PIXI.RenderTexture} [renderTexture] - The render texture to render to. + * @param {boolean} [clear=true] - Should the canvas be cleared before the new render. + * @param {PIXI.Matrix} [transform] - A transform to apply to the render texture before rendering. + * @param {boolean} [skipUpdateTransform=false] - Should we skip the update transform pass? + */ + Renderer.prototype.render = function render (displayObject, renderTexture, clear, transform, skipUpdateTransform) + { + // can be handy to know! + this.renderingToScreen = !renderTexture; + + this.runners.prerender.run(); + this.emit('prerender'); + + // apply a transform at a GPU level + this.projection.transform = transform; + + // no point rendering if our context has been blown up! + if (this.context.isLost) + { + return; + } + + if (!renderTexture) + { + this._lastObjectRendered = displayObject; + } + + if (!skipUpdateTransform) + { + // update the scene graph + var cacheParent = displayObject.parent; + + displayObject.parent = this._tempDisplayObjectParent; + displayObject.updateTransform(); + displayObject.parent = cacheParent; + // displayObject.hitArea = //TODO add a temp hit area + } + + this.renderTexture.bind(renderTexture); + this.batch.currentRenderer.start(); + + if (clear !== undefined ? clear : this.clearBeforeRender) + { + this.renderTexture.clear(); + } + + displayObject.render(this); + + // apply transform.. + this.batch.currentRenderer.flush(); + + if (renderTexture) + { + renderTexture.baseTexture.update(); + } + + this.runners.postrender.run(); + + // reset transform after render + this.projection.transform = null; + + this.emit('postrender'); + }; + + /** + * Resizes the WebGL view to the specified width and height. + * + * @param {number} screenWidth - The new width of the screen. + * @param {number} screenHeight - The new height of the screen. + */ + Renderer.prototype.resize = function resize (screenWidth, screenHeight) + { + AbstractRenderer.prototype.resize.call(this, screenWidth, screenHeight); + + this.runners.resize.run(screenWidth, screenHeight); + }; + + /** + * Resets the WebGL state so you can render things however you fancy! + * + * @return {PIXI.Renderer} Returns itself. + */ + Renderer.prototype.reset = function reset () + { + this.runners.reset.run(); + + return this; + }; + + /** + * Clear the frame buffer + */ + Renderer.prototype.clear = function clear () + { + this.framebuffer.bind(); + this.framebuffer.clear(); + }; + + /** + * Removes everything from the renderer (event listeners, spritebatch, etc...) + * + * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM. + * See: https://github.com/pixijs/pixi.js/issues/2233 + */ + Renderer.prototype.destroy = function destroy (removeView) + { + this.runners.destroy.run(); + + for (var r in this.runners) + { + this.runners[r].destroy(); + } + + // call base destroy + AbstractRenderer.prototype.destroy.call(this, removeView); + + // TODO nullify all the managers.. + this.gl = null; + }; + + /** + * Collection of installed plugins. These are included by default in PIXI, but can be excluded + * by creating a custom build. Consult the README for more information about creating custom + * builds and excluding plugins. + * @name PIXI.Renderer#plugins + * @type {object} + * @readonly + * @property {PIXI.accessibility.AccessibilityManager} accessibility Support tabbing interactive elements. + * @property {PIXI.Extract} extract Extract image data from renderer. + * @property {PIXI.interaction.InteractionManager} interaction Handles mouse, touch and pointer events. + * @property {PIXI.Prepare} prepare Pre-render display objects. + */ + + /** + * Adds a plugin to the renderer. + * + * @method + * @param {string} pluginName - The name of the plugin. + * @param {Function} ctor - The constructor function or class for the plugin. + */ + Renderer.registerPlugin = function registerPlugin (pluginName, ctor) + { + Renderer.__plugins = Renderer.__plugins || {}; + Renderer.__plugins[pluginName] = ctor; + }; + + return Renderer; + }(AbstractRenderer)); + + /** + * This helper function will automatically detect which renderer you should be using. + * WebGL is the preferred renderer as it is a lot faster. If WebGL is not supported by + * the browser then this function will return a canvas renderer + * + * @memberof PIXI + * @function autoDetectRenderer + * @param {object} [options] - The optional renderer parameters + * @param {number} [options.width=800] - the width of the renderers view + * @param {number} [options.height=600] - the height of the renderers view + * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional + * @param {boolean} [options.transparent=false] - If the render view is transparent, default false + * @param {boolean} [options.autoDensity=false] - Resizes renderer view in CSS pixels to allow for + * resolutions other than 1 + * @param {boolean} [options.antialias=false] - sets antialias + * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, enable this if you + * need to call toDataUrl on the webgl context + * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area + * (shown if not transparent). + * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or + * not before the new render pass. + * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer, retina would be 2 + * @param {boolean} [options.forceCanvas=false] - prevents selection of WebGL renderer, even if such is present, this + * option only is available when using **pixi.js-legacy** or **@pixi/canvas-renderer** modules, otherwise + * it is ignored. + * @param {boolean} [options.forceFXAA=false] - forces FXAA antialiasing to be used over native. + * FXAA is faster, but may not always look as great **webgl only** + * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to "high-performance" + * for devices with dual graphics card **webgl only** + * @return {PIXI.Renderer|PIXI.CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer + */ + function autoDetectRenderer(options) + { + return Renderer.create(options); + } + + var _default = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}"; + + var defaultFilter = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n"; + + /** + * A Texture that depends on six other resources. + * + * @class + * @extends PIXI.BaseTexture + * @memberof PIXI + */ + var CubeTexture = /*@__PURE__*/(function (BaseTexture) { + function CubeTexture () { + BaseTexture.apply(this, arguments); + } + + if ( BaseTexture ) { CubeTexture.__proto__ = BaseTexture; } + CubeTexture.prototype = Object.create( BaseTexture && BaseTexture.prototype ); + CubeTexture.prototype.constructor = CubeTexture; + + CubeTexture.from = function from (resources, options) + { + return new CubeTexture(new CubeResource(resources, options)); + }; + + return CubeTexture; + }(BaseTexture)); + + /** + * Used by the batcher to draw batches. + * Each one of these contains all information required to draw a bound geometry. + * + * @class + * @memberof PIXI + */ + var BatchDrawCall = function BatchDrawCall() + { + this.texArray = null; + this.blend = 0; + this.type = exports.DRAW_MODES.TRIANGLES; + + this.start = 0; + this.size = 0; + + /** + * data for uniforms or custom webgl state + * @member {object} + */ + this.data = null; + }; + + /** + * Used by the batcher to build texture batches. + * Holds list of textures and their respective locations. + * + * @class + * @memberof PIXI + */ + var BatchTextureArray = function BatchTextureArray() + { + /** + * inside textures array + * @member {PIXI.BaseTexture[]} + */ + this.elements = []; + /** + * Respective locations for textures + * @member {number[]} + */ + this.ids = []; + /** + * number of filled elements + * @member {number} + */ + this.count = 0; + }; + + BatchTextureArray.prototype.clear = function clear () + { + for (var i = 0; i < this.count; i++) + { + this.elements[i] = null; + } + this.count = 0; + }; + + /** + * Flexible wrapper around `ArrayBuffer` that also provides + * typed array views on demand. + * + * @class + * @memberof PIXI + */ + var ViewableBuffer = function ViewableBuffer(size) + { + /** + * Underlying `ArrayBuffer` that holds all the data + * and is of capacity `size`. + * + * @member {ArrayBuffer} + */ + this.rawBinaryData = new ArrayBuffer(size); + + /** + * View on the raw binary data as a `Uint32Array`. + * + * @member {Uint32Array} + */ + this.uint32View = new Uint32Array(this.rawBinaryData); + + /** + * View on the raw binary data as a `Float32Array`. + * + * @member {Float32Array} + */ + this.float32View = new Float32Array(this.rawBinaryData); + }; + + var prototypeAccessors$5 = { int8View: { configurable: true },uint8View: { configurable: true },int16View: { configurable: true },uint16View: { configurable: true },int32View: { configurable: true } }; + + /** + * View on the raw binary data as a `Int8Array`. + * + * @member {Int8Array} + */ + prototypeAccessors$5.int8View.get = function () + { + if (!this._int8View) + { + this._int8View = new Int8Array(this.rawBinaryData); + } + + return this._int8View; + }; + + /** + * View on the raw binary data as a `Uint8Array`. + * + * @member {Uint8Array} + */ + prototypeAccessors$5.uint8View.get = function () + { + if (!this._uint8View) + { + this._uint8View = new Uint8Array(this.rawBinaryData); + } + + return this._uint8View; + }; + + /** + * View on the raw binary data as a `Int16Array`. + * + * @member {Int16Array} + */ + prototypeAccessors$5.int16View.get = function () + { + if (!this._int16View) + { + this._int16View = new Int16Array(this.rawBinaryData); + } + + return this._int16View; + }; + + /** + * View on the raw binary data as a `Uint16Array`. + * + * @member {Uint16Array} + */ + prototypeAccessors$5.uint16View.get = function () + { + if (!this._uint16View) + { + this._uint16View = new Uint16Array(this.rawBinaryData); + } + + return this._uint16View; + }; + + /** + * View on the raw binary data as a `Int32Array`. + * + * @member {Int32Array} + */ + prototypeAccessors$5.int32View.get = function () + { + if (!this._int32View) + { + this._int32View = new Int32Array(this.rawBinaryData); + } + + return this._int32View; + }; + + /** + * Returns the view of the given type. + * + * @param {string} type - One of `int8`, `uint8`, `int16`, + *`uint16`, `int32`, `uint32`, and `float32`. + * @return {object} typed array of given type + */ + ViewableBuffer.prototype.view = function view (type) + { + return this[(type + "View")]; + }; + + /** + * Destroys all buffer references. Do not use after calling + * this. + */ + ViewableBuffer.prototype.destroy = function destroy () + { + this.rawBinaryData = null; + this._int8View = null; + this._uint8View = null; + this._int16View = null; + this._uint16View = null; + this._int32View = null; + this.uint32View = null; + this.float32View = null; + }; + + ViewableBuffer.sizeOf = function sizeOf (type) + { + switch (type) + { + case 'int8': + case 'uint8': + return 1; + case 'int16': + case 'uint16': + return 2; + case 'int32': + case 'uint32': + case 'float32': + return 4; + default: + throw new Error((type + " isn't a valid view type")); + } + }; + + Object.defineProperties( ViewableBuffer.prototype, prototypeAccessors$5 ); + + /** + * Renderer dedicated to drawing and batching sprites. + * + * This is the default batch renderer. It buffers objects + * with texture-based geometries and renders them in + * batches. It uploads multiple textures to the GPU to + * reduce to the number of draw calls. + * + * @class + * @protected + * @memberof PIXI + * @extends PIXI.ObjectRenderer + */ + var AbstractBatchRenderer = /*@__PURE__*/(function (ObjectRenderer) { + function AbstractBatchRenderer(renderer) + { + ObjectRenderer.call(this, renderer); + + /** + * This is used to generate a shader that can + * color each vertex based on a `aTextureId` + * attribute that points to an texture in `uSampler`. + * + * This enables the objects with different textures + * to be drawn in the same draw call. + * + * You can customize your shader by creating your + * custom shader generator. + * + * @member {PIXI.BatchShaderGenerator} + * @protected + */ + this.shaderGenerator = null; + + /** + * The class that represents the geometry of objects + * that are going to be batched with this. + * + * @member {object} + * @default PIXI.BatchGeometry + * @protected + */ + this.geometryClass = null; + + /** + * Size of data being buffered per vertex in the + * attribute buffers (in floats). By default, the + * batch-renderer plugin uses 6: + * + * | aVertexPosition | 2 | + * |-----------------|---| + * | aTextureCoords | 2 | + * | aColor | 1 | + * | aTextureId | 1 | + * + * @member {number} + * @readonly + */ + this.vertexSize = null; + + /** + * The WebGL state in which this renderer will work. + * + * @member {PIXI.State} + * @readonly + */ + this.state = State.for2d(); + + /** + * The number of bufferable objects before a flush + * occurs automatically. + * + * @member {number} + * @default settings.SPRITE_BATCH_SIZE * 4 + */ + this.size = settings.SPRITE_BATCH_SIZE * 4; + + /** + * Total count of all vertices used by the currently + * buffered objects. + * + * @member {number} + * @private + */ + this._vertexCount = 0; + + /** + * Total count of all indices used by the currently + * buffered objects. + * + * @member {number} + * @private + */ + this._indexCount = 0; + + /** + * Buffer of objects that are yet to be rendered. + * + * @member {PIXI.DisplayObject[]} + * @private + */ + this._bufferedElements = []; + + /** + * Data for texture batch builder, helps to save a bit of CPU on a pass + * @type {PIXI.BaseTexture[]} + * @private + */ + this._bufferedTextures = []; + + /** + * Number of elements that are buffered and are + * waiting to be flushed. + * + * @member {number} + * @private + */ + this._bufferSize = 0; + + /** + * This shader is generated by `this.shaderGenerator`. + * + * It is generated specifically to handle the required + * number of textures being batched together. + * + * @member {PIXI.Shader} + * @protected + */ + this._shader = null; + + /** + * Pool of `this.geometryClass` geometry objects + * that store buffers. They are used to pass data + * to the shader on each draw call. + * + * These are never re-allocated again, unless a + * context change occurs; however, the pool may + * be expanded if required. + * + * @member {PIXI.Geometry[]} + * @private + * @see PIXI.AbstractBatchRenderer.contextChange + */ + this._packedGeometries = []; + + /** + * Size of `this._packedGeometries`. It can be expanded + * if more than `this._packedGeometryPoolSize` flushes + * occur in a single frame. + * + * @member {number} + * @private + */ + this._packedGeometryPoolSize = 2; + + /** + * A flush may occur multiple times in a single + * frame. On iOS devices or when + * `settings.CAN_UPLOAD_SAME_BUFFER` is false, the + * batch renderer does not upload data to the same + * `WebGLBuffer` for performance reasons. + * + * This is the index into `packedGeometries` that points to + * geometry holding the most recent buffers. + * + * @member {number} + * @private + */ + this._flushId = 0; + + /** + * Pool of `ViewableBuffer` objects that are sorted in + * order of increasing size. The flush method uses + * the buffer with the least size above the amount + * it requires. These are used for passing attributes. + * + * The first buffer has a size of 8; each subsequent + * buffer has double capacity of its previous. + * + * @member {PIXI.ViewableBuffer[]} + * @private + * @see PIXI.AbstractBatchRenderer#getAttributeBuffer + */ + this._aBuffers = {}; + + /** + * Pool of `Uint16Array` objects that are sorted in + * order of increasing size. The flush method uses + * the buffer with the least size above the amount + * it requires. These are used for passing indices. + * + * The first buffer has a size of 12; each subsequent + * buffer has double capacity of its previous. + * + * @member {Uint16Array[]} + * @private + * @see PIXI.AbstractBatchRenderer#getIndexBuffer + */ + this._iBuffers = {}; + + /** + * Maximum number of textures that can be uploaded to + * the GPU under the current context. It is initialized + * properly in `this.contextChange`. + * + * @member {number} + * @see PIXI.AbstractBatchRenderer#contextChange + * @readonly + */ + this.MAX_TEXTURES = 1; + + this.renderer.on('prerender', this.onPrerender, this); + renderer.runners.contextChange.add(this); + + this._dcIndex = 0; + this._aIndex = 0; + this._iIndex = 0; + this._attributeBuffer = null; + this._indexBuffer = null; + this._tempBoundTextures = []; + } + + if ( ObjectRenderer ) { AbstractBatchRenderer.__proto__ = ObjectRenderer; } + AbstractBatchRenderer.prototype = Object.create( ObjectRenderer && ObjectRenderer.prototype ); + AbstractBatchRenderer.prototype.constructor = AbstractBatchRenderer; + + /** + * Handles the `contextChange` signal. + * + * It calculates `this.MAX_TEXTURES` and allocating the + * packed-geometry object pool. + */ + AbstractBatchRenderer.prototype.contextChange = function contextChange () + { + var gl = this.renderer.gl; + + if (settings.PREFER_ENV === exports.ENV.WEBGL_LEGACY) + { + this.MAX_TEXTURES = 1; + } + else + { + // step 1: first check max textures the GPU can handle. + this.MAX_TEXTURES = Math.min( + gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS), + settings.SPRITE_MAX_TEXTURES); + + // step 2: check the maximum number of if statements the shader can have too.. + this.MAX_TEXTURES = checkMaxIfStatementsInShader( + this.MAX_TEXTURES, gl); + } + + this._shader = this.shaderGenerator.generateShader(this.MAX_TEXTURES); + + // we use the second shader as the first one depending on your browser + // may omit aTextureId as it is not used by the shader so is optimized out. + for (var i = 0; i < this._packedGeometryPoolSize; i++) + { + /* eslint-disable max-len */ + this._packedGeometries[i] = new (this.geometryClass)(); + } + + this.initFlushBuffers(); + }; + + /** + * Makes sure that static and dynamic flush pooled objects have correct dimensions + */ + AbstractBatchRenderer.prototype.initFlushBuffers = function initFlushBuffers () + { + var _drawCallPool = AbstractBatchRenderer._drawCallPool; + var _textureArrayPool = AbstractBatchRenderer._textureArrayPool; + // max draw calls + var MAX_SPRITES = this.size / 4; + // max texture arrays + var MAX_TA = Math.floor(MAX_SPRITES / this.MAX_TEXTURES) + 1; + + while (_drawCallPool.length < MAX_SPRITES) + { + _drawCallPool.push(new BatchDrawCall()); + } + while (_textureArrayPool.length < MAX_TA) + { + _textureArrayPool.push(new BatchTextureArray()); + } + for (var i = 0; i < this.MAX_TEXTURES; i++) + { + this._tempBoundTextures[i] = null; + } + }; + + /** + * Handles the `prerender` signal. + * + * It ensures that flushes start from the first geometry + * object again. + */ + AbstractBatchRenderer.prototype.onPrerender = function onPrerender () + { + this._flushId = 0; + }; + + /** + * Buffers the "batchable" object. It need not be rendered + * immediately. + * + * @param {PIXI.DisplayObject} element - the element to render when + * using this renderer + */ + AbstractBatchRenderer.prototype.render = function render (element) + { + if (!element._texture.valid) + { + return; + } + + if (this._vertexCount + (element.vertexData.length / 2) > this.size) + { + this.flush(); + } + + this._vertexCount += element.vertexData.length / 2; + this._indexCount += element.indices.length; + this._bufferedTextures[this._bufferSize] = element._texture.baseTexture; + this._bufferedElements[this._bufferSize++] = element; + }; + + AbstractBatchRenderer.prototype.buildTexturesAndDrawCalls = function buildTexturesAndDrawCalls () + { + var ref = this; + var textures = ref._bufferedTextures; + var MAX_TEXTURES = ref.MAX_TEXTURES; + var textureArrays = AbstractBatchRenderer._textureArrayPool; + var batch = this.renderer.batch; + var boundTextures = this._tempBoundTextures; + var touch = this.renderer.textureGC.count; + + var TICK = ++BaseTexture._globalBatch; + var countTexArrays = 0; + var texArray = textureArrays[0]; + var start = 0; + + batch.copyBoundTextures(boundTextures, MAX_TEXTURES); + + for (var i = 0; i < this._bufferSize; ++i) + { + var tex = textures[i]; + + textures[i] = null; + if (tex._batchEnabled === TICK) + { + continue; + } + + if (texArray.count >= MAX_TEXTURES) + { + batch.boundArray(texArray, boundTextures, TICK, MAX_TEXTURES); + this.buildDrawCalls(texArray, start, i); + start = i; + texArray = textureArrays[++countTexArrays]; + ++TICK; + } + + tex._batchEnabled = TICK; + tex.touched = touch; + texArray.elements[texArray.count++] = tex; + } + + if (texArray.count > 0) + { + batch.boundArray(texArray, boundTextures, TICK, MAX_TEXTURES); + this.buildDrawCalls(texArray, start, this._bufferSize); + ++countTexArrays; + ++TICK; + } + + // Clean-up + + for (var i$1 = 0; i$1 < boundTextures.length; i$1++) + { + boundTextures[i$1] = null; + } + BaseTexture._globalBatch = TICK; + }; + + /** + * Populating drawcalls for rendering + * + * @param {PIXI.BatchTextureArray} texArray + * @param {number} start + * @param {number} finish + */ + AbstractBatchRenderer.prototype.buildDrawCalls = function buildDrawCalls (texArray, start, finish) + { + var ref = this; + var elements = ref._bufferedElements; + var _attributeBuffer = ref._attributeBuffer; + var _indexBuffer = ref._indexBuffer; + var vertexSize = ref.vertexSize; + var drawCalls = AbstractBatchRenderer._drawCallPool; + + var dcIndex = this._dcIndex; + var aIndex = this._aIndex; + var iIndex = this._iIndex; + + var drawCall = drawCalls[dcIndex]; + + drawCall.start = this._iIndex; + drawCall.texArray = texArray; + + for (var i = start; i < finish; ++i) + { + var sprite = elements[i]; + var tex = sprite._texture.baseTexture; + var spriteBlendMode = premultiplyBlendMode[ + tex.alphaMode ? 1 : 0][sprite.blendMode]; + + elements[i] = null; + + if (start < i && drawCall.blend !== spriteBlendMode) + { + drawCall.size = iIndex - drawCall.start; + start = i; + drawCall = drawCalls[++dcIndex]; + drawCall.texArray = texArray; + drawCall.start = iIndex; + } + + this.packInterleavedGeometry(sprite, _attributeBuffer, _indexBuffer, aIndex, iIndex); + aIndex += sprite.vertexData.length / 2 * vertexSize; + iIndex += sprite.indices.length; + + drawCall.blend = spriteBlendMode; + } + + if (start < finish) + { + drawCall.size = iIndex - drawCall.start; + ++dcIndex; + } + + this._dcIndex = dcIndex; + this._aIndex = aIndex; + this._iIndex = iIndex; + }; + + /** + * Bind textures for current rendering + * + * @param {PIXI.BatchTextureArray} texArray + */ + AbstractBatchRenderer.prototype.bindAndClearTexArray = function bindAndClearTexArray (texArray) + { + var textureSystem = this.renderer.texture; + + for (var j = 0; j < texArray.count; j++) + { + textureSystem.bind(texArray.elements[j], texArray.ids[j]); + texArray.elements[j] = null; + } + texArray.count = 0; + }; + + AbstractBatchRenderer.prototype.updateGeometry = function updateGeometry () + { + var ref = this; + var packedGeometries = ref._packedGeometries; + var attributeBuffer = ref._attributeBuffer; + var indexBuffer = ref._indexBuffer; + + if (!settings.CAN_UPLOAD_SAME_BUFFER) + { /* Usually on iOS devices, where the browser doesn't + like uploads to the same buffer in a single frame. */ + if (this._packedGeometryPoolSize <= this._flushId) + { + this._packedGeometryPoolSize++; + packedGeometries[this._flushId] = new (this.geometryClass)(); + } + + packedGeometries[this._flushId]._buffer.update(attributeBuffer.rawBinaryData); + packedGeometries[this._flushId]._indexBuffer.update(indexBuffer); + + this.renderer.geometry.bind(packedGeometries[this._flushId]); + this.renderer.geometry.updateBuffers(); + this._flushId++; + } + else + { + // lets use the faster option, always use buffer number 0 + packedGeometries[this._flushId]._buffer.update(attributeBuffer.rawBinaryData); + packedGeometries[this._flushId]._indexBuffer.update(indexBuffer); + + this.renderer.geometry.updateBuffers(); + } + }; + + AbstractBatchRenderer.prototype.drawBatches = function drawBatches () + { + var dcCount = this._dcIndex; + var ref = this.renderer; + var gl = ref.gl; + var stateSystem = ref.state; + var drawCalls = AbstractBatchRenderer._drawCallPool; + + var curTexArray = null; + + // Upload textures and do the draw calls + for (var i = 0; i < dcCount; i++) + { + var ref$1 = drawCalls[i]; + var texArray = ref$1.texArray; + var type = ref$1.type; + var size = ref$1.size; + var start = ref$1.start; + var blend = ref$1.blend; + + if (curTexArray !== texArray) + { + curTexArray = texArray; + this.bindAndClearTexArray(texArray); + } + + this.state.blendMode = blend; + stateSystem.set(this.state); + gl.drawElements(type, size, gl.UNSIGNED_SHORT, start * 2); + } + }; + + /** + * Renders the content _now_ and empties the current batch. + */ + AbstractBatchRenderer.prototype.flush = function flush () + { + if (this._vertexCount === 0) + { + return; + } + + this._attributeBuffer = this.getAttributeBuffer(this._vertexCount); + this._indexBuffer = this.getIndexBuffer(this._indexCount); + this._aIndex = 0; + this._iIndex = 0; + this._dcIndex = 0; + + this.buildTexturesAndDrawCalls(); + this.updateGeometry(); + this.drawBatches(); + + // reset elements buffer for the next flush + this._bufferSize = 0; + this._vertexCount = 0; + this._indexCount = 0; + }; + + /** + * Starts a new sprite batch. + */ + AbstractBatchRenderer.prototype.start = function start () + { + this.renderer.state.set(this.state); + + this.renderer.shader.bind(this._shader); + + if (settings.CAN_UPLOAD_SAME_BUFFER) + { + // bind buffer #0, we don't need others + this.renderer.geometry.bind(this._packedGeometries[this._flushId]); + } + }; + + /** + * Stops and flushes the current batch. + */ + AbstractBatchRenderer.prototype.stop = function stop () + { + this.flush(); + }; + + /** + * Destroys this `AbstractBatchRenderer`. It cannot be used again. + */ + AbstractBatchRenderer.prototype.destroy = function destroy () + { + for (var i = 0; i < this._packedGeometryPoolSize; i++) + { + if (this._packedGeometries[i]) + { + this._packedGeometries[i].destroy(); + } + } + + this.renderer.off('prerender', this.onPrerender, this); + + this._aBuffers = null; + this._iBuffers = null; + this._packedGeometries = null; + this._attributeBuffer = null; + this._indexBuffer = null; + + if (this._shader) + { + this._shader.destroy(); + this._shader = null; + } + + ObjectRenderer.prototype.destroy.call(this); + }; + + /** + * Fetches an attribute buffer from `this._aBuffers` that + * can hold atleast `size` floats. + * + * @param {number} size - minimum capacity required + * @return {ViewableBuffer} - buffer than can hold atleast `size` floats + * @private + */ + AbstractBatchRenderer.prototype.getAttributeBuffer = function getAttributeBuffer (size) + { + // 8 vertices is enough for 2 quads + var roundedP2 = nextPow2(Math.ceil(size / 8)); + var roundedSizeIndex = log2(roundedP2); + var roundedSize = roundedP2 * 8; + + if (this._aBuffers.length <= roundedSizeIndex) + { + this._iBuffers.length = roundedSizeIndex + 1; + } + + var buffer = this._aBuffers[roundedSize]; + + if (!buffer) + { + this._aBuffers[roundedSize] = buffer = new ViewableBuffer(roundedSize * this.vertexSize * 4); + } + + return buffer; + }; + + /** + * Fetches an index buffer from `this._iBuffers` that can + * has atleast `size` capacity. + * + * @param {number} size - minimum required capacity + * @return {Uint16Array} - buffer that can fit `size` + * indices. + * @private + */ + AbstractBatchRenderer.prototype.getIndexBuffer = function getIndexBuffer (size) + { + // 12 indices is enough for 2 quads + var roundedP2 = nextPow2(Math.ceil(size / 12)); + var roundedSizeIndex = log2(roundedP2); + var roundedSize = roundedP2 * 12; + + if (this._iBuffers.length <= roundedSizeIndex) + { + this._iBuffers.length = roundedSizeIndex + 1; + } + + var buffer = this._iBuffers[roundedSizeIndex]; + + if (!buffer) + { + this._iBuffers[roundedSizeIndex] = buffer = new Uint16Array(roundedSize); + } + + return buffer; + }; + + /** + * Takes the four batching parameters of `element`, interleaves + * and pushes them into the batching attribute/index buffers given. + * + * It uses these properties: `vertexData` `uvs`, `textureId` and + * `indicies`. It also uses the "tint" of the base-texture, if + * present. + * + * @param {PIXI.Sprite} element - element being rendered + * @param {PIXI.ViewableBuffer} attributeBuffer - attribute buffer. + * @param {Uint16Array} indexBuffer - index buffer + * @param {number} aIndex - number of floats already in the attribute buffer + * @param {number} iIndex - number of indices already in `indexBuffer` + */ + AbstractBatchRenderer.prototype.packInterleavedGeometry = function packInterleavedGeometry (element, attributeBuffer, indexBuffer, aIndex, iIndex) + { + var uint32View = attributeBuffer.uint32View; + var float32View = attributeBuffer.float32View; + + var packedVertices = aIndex / this.vertexSize; + var uvs = element.uvs; + var indicies = element.indices; + var vertexData = element.vertexData; + var textureId = element._texture.baseTexture._batchLocation; + + var alpha = Math.min(element.worldAlpha, 1.0); + var argb = (alpha < 1.0 + && element._texture.baseTexture.alphaMode) + ? premultiplyTint(element._tintRGB, alpha) + : element._tintRGB + (alpha * 255 << 24); + + // lets not worry about tint! for now.. + for (var i = 0; i < vertexData.length; i += 2) + { + float32View[aIndex++] = vertexData[i]; + float32View[aIndex++] = vertexData[i + 1]; + float32View[aIndex++] = uvs[i]; + float32View[aIndex++] = uvs[i + 1]; + uint32View[aIndex++] = argb; + float32View[aIndex++] = textureId; + } + + for (var i$1 = 0; i$1 < indicies.length; i$1++) + { + indexBuffer[iIndex++] = packedVertices + indicies[i$1]; + } + }; + + return AbstractBatchRenderer; + }(ObjectRenderer)); + + /** + * Pool of `BatchDrawCall` objects that `flush` used + * to create "batches" of the objects being rendered. + * + * These are never re-allocated again. + * Shared between all batch renderers because it can be only one "flush" working at the moment. + * + * @static + * @member {PIXI.BatchDrawCall[]} + */ + AbstractBatchRenderer._drawCallPool = []; + + /** + * Pool of `BatchDrawCall` objects that `flush` used + * to create "batches" of the objects being rendered. + * + * These are never re-allocated again. + * Shared between all batch renderers because it can be only one "flush" working at the moment. + * + * @static + * @member {PIXI.BatchTextureArray[]} + */ + AbstractBatchRenderer._textureArrayPool = []; + + /** + * Helper that generates batching multi-texture shader. Use it with your new BatchRenderer + * + * @class + * @memberof PIXI + */ + var BatchShaderGenerator = function BatchShaderGenerator(vertexSrc, fragTemplate) + { + /** + * Reference to the vertex shader source. + * + * @member {string} + */ + this.vertexSrc = vertexSrc; + + /** + * Reference to the fragement shader template. Must contain "%count%" and "%forloop%". + * + * @member {string} + */ + this.fragTemplate = fragTemplate; + + this.programCache = {}; + this.defaultGroupCache = {}; + + if (fragTemplate.indexOf('%count%') < 0) + { + throw new Error('Fragment template must contain "%count%".'); + } + + if (fragTemplate.indexOf('%forloop%') < 0) + { + throw new Error('Fragment template must contain "%forloop%".'); + } + }; + + BatchShaderGenerator.prototype.generateShader = function generateShader (maxTextures) + { + if (!this.programCache[maxTextures]) + { + var sampleValues = new Int32Array(maxTextures); + + for (var i = 0; i < maxTextures; i++) + { + sampleValues[i] = i; + } + + this.defaultGroupCache[maxTextures] = UniformGroup.from({ uSamplers: sampleValues }, true); + + var fragmentSrc = this.fragTemplate; + + fragmentSrc = fragmentSrc.replace(/%count%/gi, ("" + maxTextures)); + fragmentSrc = fragmentSrc.replace(/%forloop%/gi, this.generateSampleSrc(maxTextures)); + + this.programCache[maxTextures] = new Program(this.vertexSrc, fragmentSrc); + } + + var uniforms = { + tint: new Float32Array([1, 1, 1, 1]), + translationMatrix: new Matrix(), + default: this.defaultGroupCache[maxTextures], + }; + + return new Shader(this.programCache[maxTextures], uniforms); + }; + + BatchShaderGenerator.prototype.generateSampleSrc = function generateSampleSrc (maxTextures) + { + var src = ''; + + src += '\n'; + src += '\n'; + + for (var i = 0; i < maxTextures; i++) + { + if (i > 0) + { + src += '\nelse '; + } + + if (i < maxTextures - 1) + { + src += "if(vTextureId < " + i + ".5)"; + } + + src += '\n{'; + src += "\n\tcolor = texture2D(uSamplers[" + i + "], vTextureCoord);"; + src += '\n}'; + } + + src += '\n'; + src += '\n'; + + return src; + }; + + /** + * Geometry used to batch standard PIXI content (e.g. Mesh, Sprite, Graphics objects). + * + * @class + * @memberof PIXI + */ + var BatchGeometry = /*@__PURE__*/(function (Geometry) { + function BatchGeometry(_static) + { + if ( _static === void 0 ) { _static = false; } + + Geometry.call(this); + + /** + * Buffer used for position, color, texture IDs + * + * @member {PIXI.Buffer} + * @protected + */ + this._buffer = new Buffer(null, _static, false); + + /** + * Index buffer data + * + * @member {PIXI.Buffer} + * @protected + */ + this._indexBuffer = new Buffer(null, _static, true); + + this.addAttribute('aVertexPosition', this._buffer, 2, false, exports.TYPES.FLOAT) + .addAttribute('aTextureCoord', this._buffer, 2, false, exports.TYPES.FLOAT) + .addAttribute('aColor', this._buffer, 4, true, exports.TYPES.UNSIGNED_BYTE) + .addAttribute('aTextureId', this._buffer, 1, true, exports.TYPES.FLOAT) + .addIndex(this._indexBuffer); + } + + if ( Geometry ) { BatchGeometry.__proto__ = Geometry; } + BatchGeometry.prototype = Object.create( Geometry && Geometry.prototype ); + BatchGeometry.prototype.constructor = BatchGeometry; + + return BatchGeometry; + }(Geometry)); + + var defaultVertex$2 = "precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor * tint;\n}\n"; + + var defaultFragment$2 = "varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n vec4 color;\n %forloop%\n gl_FragColor = color * vColor;\n}\n"; + + /** + * @class + * @memberof PIXI + * @hideconstructor + */ + var BatchPluginFactory = function BatchPluginFactory () {}; + + var staticAccessors$1 = { defaultVertexSrc: { configurable: true },defaultFragmentTemplate: { configurable: true } }; + + BatchPluginFactory.create = function create (options) + { + var ref = Object.assign({ + vertex: defaultVertex$2, + fragment: defaultFragment$2, + geometryClass: BatchGeometry, + vertexSize: 6, + }, options); + var vertex = ref.vertex; + var fragment = ref.fragment; + var vertexSize = ref.vertexSize; + var geometryClass = ref.geometryClass; + + return /*@__PURE__*/(function (AbstractBatchRenderer) { + function BatchPlugin(renderer) + { + AbstractBatchRenderer.call(this, renderer); + + this.shaderGenerator = new BatchShaderGenerator(vertex, fragment); + this.geometryClass = geometryClass; + this.vertexSize = vertexSize; + } + + if ( AbstractBatchRenderer ) { BatchPlugin.__proto__ = AbstractBatchRenderer; } + BatchPlugin.prototype = Object.create( AbstractBatchRenderer && AbstractBatchRenderer.prototype ); + BatchPlugin.prototype.constructor = BatchPlugin; + + return BatchPlugin; + }(AbstractBatchRenderer)); + }; + + /** + * The default vertex shader source + * + * @static + * @type {string} + * @constant + */ + staticAccessors$1.defaultVertexSrc.get = function () + { + return defaultVertex$2; + }; + + /** + * The default fragment shader source + * + * @static + * @type {string} + * @constant + */ + staticAccessors$1.defaultFragmentTemplate.get = function () + { + return defaultFragment$2; + }; + + Object.defineProperties( BatchPluginFactory, staticAccessors$1 ); + + // Setup the default BatchRenderer plugin, this is what + // we'll actually export at the root level + var BatchRenderer = BatchPluginFactory.create(); + + /*! + * @pixi/app - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/app is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Convenience class to create a new PIXI application. + * + * This class automatically creates the renderer, ticker and root container. + * + * @example + * // Create the application + * const app = new PIXI.Application(); + * + * // Add the view to the DOM + * document.body.appendChild(app.view); + * + * // ex, add display objects + * app.stage.addChild(PIXI.Sprite.from('something.png')); + * + * @class + * @memberof PIXI + */ + var Application = function Application(options) + { + var this$1 = this; + + // The default options + options = Object.assign({ + forceCanvas: false, + }, options); + + /** + * WebGL renderer if available, otherwise CanvasRenderer. + * @member {PIXI.Renderer|PIXI.CanvasRenderer} + */ + this.renderer = autoDetectRenderer(options); + + /** + * The root display container that's rendered. + * @member {PIXI.Container} + */ + this.stage = new Container(); + + // install plugins here + Application._plugins.forEach(function (plugin) { + plugin.init.call(this$1, options); + }); + }; + + var prototypeAccessors$6 = { view: { configurable: true },screen: { configurable: true } }; + + /** + * Register a middleware plugin for the application + * @static + * @param {PIXI.Application.Plugin} plugin - Plugin being installed + */ + Application.registerPlugin = function registerPlugin (plugin) + { + Application._plugins.push(plugin); + }; + + /** + * Render the current stage. + */ + Application.prototype.render = function render () + { + this.renderer.render(this.stage); + }; + + /** + * Reference to the renderer's canvas element. + * @member {HTMLCanvasElement} + * @readonly + */ + prototypeAccessors$6.view.get = function () + { + return this.renderer.view; + }; + + /** + * Reference to the renderer's screen rectangle. Its safe to use as `filterArea` or `hitArea` for the whole screen. + * @member {PIXI.Rectangle} + * @readonly + */ + prototypeAccessors$6.screen.get = function () + { + return this.renderer.screen; + }; + + /** + * Destroy and don't use after this. + * @param {Boolean} [removeView=false] Automatically remove canvas from DOM. + * @param {object|boolean} [stageOptions] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [stageOptions.children=false] - if set to true, all the children will have their destroy + * method called as well. 'stageOptions' will be passed on to those calls. + * @param {boolean} [stageOptions.texture=false] - Only used for child Sprites if stageOptions.children is set + * to true. Should it destroy the texture of the child sprite + * @param {boolean} [stageOptions.baseTexture=false] - Only used for child Sprites if stageOptions.children is set + * to true. Should it destroy the base texture of the child sprite + */ + Application.prototype.destroy = function destroy (removeView, stageOptions) + { + var this$1 = this; + + // Destroy plugins in the opposite order + // which they were constructed + var plugins = Application._plugins.slice(0); + + plugins.reverse(); + plugins.forEach(function (plugin) { + plugin.destroy.call(this$1); + }); + + this.stage.destroy(stageOptions); + this.stage = null; + + this.renderer.destroy(removeView); + this.renderer = null; + + this._options = null; + }; + + Object.defineProperties( Application.prototype, prototypeAccessors$6 ); + + /** + * @memberof PIXI.Application + * @typedef {object} Plugin + * @property {function} init - Called when Application is constructed, scoped to Application instance. + * Passes in `options` as the only argument, which are Application constructor options. + * @property {function} destroy - Called when destroying Application, scoped to Application instance + */ + + /** + * Collection of installed plugins. + * @static + * @private + * @type {PIXI.Application.Plugin[]} + */ + Application._plugins = []; + + /** + * Middleware for for Application's resize functionality + * @private + * @class + */ + var ResizePlugin = function ResizePlugin () {}; + + ResizePlugin.init = function init (options) + { + var this$1 = this; + + /** + * The element or window to resize the application to. + * @type {Window|HTMLElement} + * @name resizeTo + * @memberof PIXI.Application# + */ + Object.defineProperty(this, 'resizeTo', + { + set: function set(dom) + { + window.removeEventListener('resize', this.resize); + this._resizeTo = dom; + if (dom) + { + window.addEventListener('resize', this.resize); + this.resize(); + } + }, + get: function get() + { + return this._resizeTo; + }, + }); + + /** + * If `resizeTo` is set, calling this function + * will resize to the width and height of that element. + * @method PIXI.Application#resize + */ + this.resize = function () { + if (this$1._resizeTo) + { + // Resize to the window + if (this$1._resizeTo === window) + { + this$1.renderer.resize( + window.innerWidth, + window.innerHeight + ); + } + // Resize to other HTML entities + else + { + this$1.renderer.resize( + this$1._resizeTo.clientWidth, + this$1._resizeTo.clientHeight + ); + } + } + }; + + // On resize + this._resizeTo = null; + this.resizeTo = options.resizeTo || null; + }; + + /** + * Clean up the ticker, scoped to application + * @static + * @private + */ + ResizePlugin.destroy = function destroy () + { + this.resizeTo = null; + this.resize = null; + }; + + Application.registerPlugin(ResizePlugin); + + /*! + * @pixi/extract - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/extract is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var TEMP_RECT = new Rectangle(); + var BYTES_PER_PIXEL = 4; + + /** + * This class provides renderer-specific plugins for exporting content from a renderer. + * For instance, these plugins can be used for saving an Image, Canvas element or for exporting the raw image data (pixels). + * + * Do not instantiate these plugins directly. It is available from the `renderer.plugins` property. + * See {@link PIXI.CanvasRenderer#plugins} or {@link PIXI.Renderer#plugins}. + * @example + * // Create a new app (will auto-add extract plugin to renderer) + * const app = new PIXI.Application(); + * + * // Draw a red circle + * const graphics = new PIXI.Graphics() + * .beginFill(0xFF0000) + * .drawCircle(0, 0, 50); + * + * // Render the graphics as an HTMLImageElement + * const image = app.renderer.plugins.extract.image(graphics); + * document.body.appendChild(image); + * @class + * @memberof PIXI + */ + var Extract = function Extract(renderer) + { + this.renderer = renderer; + /** + * Collection of methods for extracting data (image, pixels, etc.) from a display object or render texture + * + * @member {PIXI.Extract} extract + * @memberof PIXI.Renderer# + * @see PIXI.Extract + */ + renderer.extract = this; + }; + + /** + * Will return a HTML Image of the target + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @param {string} [format] - Image format, e.g. "image/jpeg" or "image/webp". + * @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92. + * @return {HTMLImageElement} HTML Image of the target + */ + Extract.prototype.image = function image (target, format, quality) + { + var image = new Image(); + + image.src = this.base64(target, format, quality); + + return image; + }; + + /** + * Will return a a base64 encoded string of this target. It works by calling + * `Extract.getCanvas` and then running toDataURL on that. + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @param {string} [format] - Image format, e.g. "image/jpeg" or "image/webp". + * @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92. + * @return {string} A base64 encoded string of the texture. + */ + Extract.prototype.base64 = function base64 (target, format, quality) + { + return this.canvas(target).toDataURL(format, quality); + }; + + /** + * Creates a Canvas element, renders this target to it and then returns it. + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @return {HTMLCanvasElement} A Canvas element with the texture rendered on. + */ + Extract.prototype.canvas = function canvas (target) + { + var renderer = this.renderer; + var resolution; + var frame; + var flipY = false; + var renderTexture; + var generated = false; + + if (target) + { + if (target instanceof RenderTexture) + { + renderTexture = target; + } + else + { + renderTexture = this.renderer.generateTexture(target); + generated = true; + } + } + + if (renderTexture) + { + resolution = renderTexture.baseTexture.resolution; + frame = renderTexture.frame; + flipY = false; + renderer.renderTexture.bind(renderTexture); + } + else + { + resolution = this.renderer.resolution; + + flipY = true; + + frame = TEMP_RECT; + frame.width = this.renderer.width; + frame.height = this.renderer.height; + + renderer.renderTexture.bind(null); + } + + var width = Math.floor((frame.width * resolution) + 1e-4); + var height = Math.floor((frame.height * resolution) + 1e-4); + + var canvasBuffer = new CanvasRenderTarget(width, height, 1); + + var webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height); + + // read pixels to the array + var gl = renderer.gl; + + gl.readPixels( + frame.x * resolution, + frame.y * resolution, + width, + height, + gl.RGBA, + gl.UNSIGNED_BYTE, + webglPixels + ); + + // add the pixels to the canvas + var canvasData = canvasBuffer.context.getImageData(0, 0, width, height); + + Extract.arrayPostDivide(webglPixels, canvasData.data); + + canvasBuffer.context.putImageData(canvasData, 0, 0); + + // pulling pixels + if (flipY) + { + var target$1 = new CanvasRenderTarget(canvasBuffer.width, canvasBuffer.height, 1); + + target$1.context.scale(1, -1); + + // we can't render to itself because we should be empty before render. + target$1.context.drawImage(canvasBuffer.canvas, 0, -height); + + canvasBuffer.destroy(); + canvasBuffer = target$1; + } + + if (generated) + { + renderTexture.destroy(true); + } + + // send the canvas back.. + return canvasBuffer.canvas; + }; + + /** + * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA + * order, with integer values between 0 and 255 (included). + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use the main renderer + * @return {Uint8Array} One-dimensional array containing the pixel data of the entire texture + */ + Extract.prototype.pixels = function pixels (target) + { + var renderer = this.renderer; + var resolution; + var frame; + var renderTexture; + var generated = false; + + if (target) + { + if (target instanceof RenderTexture) + { + renderTexture = target; + } + else + { + renderTexture = this.renderer.generateTexture(target); + generated = true; + } + } + + if (renderTexture) + { + resolution = renderTexture.baseTexture.resolution; + frame = renderTexture.frame; + + // bind the buffer + renderer.renderTexture.bind(renderTexture); + } + else + { + resolution = renderer.resolution; + + frame = TEMP_RECT; + frame.width = renderer.width; + frame.height = renderer.height; + + renderer.renderTexture.bind(null); + } + + var width = frame.width * resolution; + var height = frame.height * resolution; + + var webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height); + + // read pixels to the array + var gl = renderer.gl; + + gl.readPixels( + frame.x * resolution, + frame.y * resolution, + width, + height, + gl.RGBA, + gl.UNSIGNED_BYTE, + webglPixels + ); + + if (generated) + { + renderTexture.destroy(true); + } + + Extract.arrayPostDivide(webglPixels, webglPixels); + + return webglPixels; + }; + + /** + * Destroys the extract + * + */ + Extract.prototype.destroy = function destroy () + { + this.renderer.extract = null; + this.renderer = null; + }; + + /** + * Takes premultiplied pixel data and produces regular pixel data + * + * @private + * @param pixels {number[] | Uint8Array | Uint8ClampedArray} array of pixel data + * @param out {number[] | Uint8Array | Uint8ClampedArray} output array + */ + Extract.arrayPostDivide = function arrayPostDivide (pixels, out) + { + for (var i = 0; i < pixels.length; i += 4) + { + var alpha = out[i + 3] = pixels[i + 3]; + + if (alpha !== 0) + { + out[i] = Math.round(Math.min(pixels[i] * 255.0 / alpha, 255.0)); + out[i + 1] = Math.round(Math.min(pixels[i + 1] * 255.0 / alpha, 255.0)); + out[i + 2] = Math.round(Math.min(pixels[i + 2] * 255.0 / alpha, 255.0)); + } + else + { + out[i] = pixels[i]; + out[i + 1] = pixels[i + 1]; + out[i + 2] = pixels[i + 2]; + } + } + }; + + 'use strict'; + + var parseUri = function parseURI (str, opts) { + opts = opts || {}; + + var o = { + key: ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'], + q: { + name: 'queryKey', + parser: /(?:^|&)([^&=]*)=?([^&]*)/g + }, + parser: { + strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, + loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ + } + }; + + var m = o.parser[opts.strictMode ? 'strict' : 'loose'].exec(str); + var uri = {}; + var i = 14; + + while (i--) { uri[o.key[i]] = m[i] || ''; } + + uri[o.q.name] = {}; + uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) { + if ($1) { uri[o.q.name][$1] = $2; } + }); + + return uri + }; + + var miniSignals = createCommonjsModule(function (module, exports) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) { descriptor.writable = true; } Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) { defineProperties(Constructor.prototype, protoProps); } if (staticProps) { defineProperties(Constructor, staticProps); } return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var MiniSignalBinding = (function () { + function MiniSignalBinding(fn, once, thisArg) { + if (once === undefined) { once = false; } + + _classCallCheck(this, MiniSignalBinding); + + this._fn = fn; + this._once = once; + this._thisArg = thisArg; + this._next = this._prev = this._owner = null; + } + + _createClass(MiniSignalBinding, [{ + key: 'detach', + value: function detach() { + if (this._owner === null) { return false; } + this._owner.detach(this); + return true; + } + }]); + + return MiniSignalBinding; + })(); + + function _addMiniSignalBinding(self, node) { + if (!self._head) { + self._head = node; + self._tail = node; + } else { + self._tail._next = node; + node._prev = self._tail; + self._tail = node; + } + + node._owner = self; + + return node; + } + + var MiniSignal = (function () { + function MiniSignal() { + _classCallCheck(this, MiniSignal); + + this._head = this._tail = undefined; + } + + _createClass(MiniSignal, [{ + key: 'handlers', + value: function handlers() { + var exists = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0]; + + var node = this._head; + + if (exists) { return !!node; } + + var ee = []; + + while (node) { + ee.push(node); + node = node._next; + } + + return ee; + } + }, { + key: 'has', + value: function has(node) { + if (!(node instanceof MiniSignalBinding)) { + throw new Error('MiniSignal#has(): First arg must be a MiniSignalBinding object.'); + } + + return node._owner === this; + } + }, { + key: 'dispatch', + value: function dispatch() { + var arguments$1 = arguments; + + var node = this._head; + + if (!node) { return false; } + + while (node) { + if (node._once) { this.detach(node); } + node._fn.apply(node._thisArg, arguments$1); + node = node._next; + } + + return true; + } + }, { + key: 'add', + value: function add(fn) { + var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; + + if (typeof fn !== 'function') { + throw new Error('MiniSignal#add(): First arg must be a Function.'); + } + return _addMiniSignalBinding(this, new MiniSignalBinding(fn, false, thisArg)); + } + }, { + key: 'once', + value: function once(fn) { + var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; + + if (typeof fn !== 'function') { + throw new Error('MiniSignal#once(): First arg must be a Function.'); + } + return _addMiniSignalBinding(this, new MiniSignalBinding(fn, true, thisArg)); + } + }, { + key: 'detach', + value: function detach(node) { + if (!(node instanceof MiniSignalBinding)) { + throw new Error('MiniSignal#detach(): First arg must be a MiniSignalBinding object.'); + } + if (node._owner !== this) { return this; } + + if (node._prev) { node._prev._next = node._next; } + if (node._next) { node._next._prev = node._prev; } + + if (node === this._head) { + this._head = node._next; + if (node._next === null) { + this._tail = null; + } + } else if (node === this._tail) { + this._tail = node._prev; + this._tail._next = null; + } + + node._owner = null; + return this; + } + }, { + key: 'detachAll', + value: function detachAll() { + var node = this._head; + if (!node) { return this; } + + this._head = this._tail = null; + + while (node) { + node._owner = null; + node = node._next; + } + return this; + } + }]); + + return MiniSignal; + })(); + + MiniSignal.MiniSignalBinding = MiniSignalBinding; + + exports['default'] = MiniSignal; + module.exports = exports['default']; + }); + + var Signal = unwrapExports(miniSignals); + + /*! + * resource-loader - v3.0.1 + * https://github.com/pixijs/pixi-sound + * Compiled Tue, 02 Jul 2019 14:06:18 UTC + * + * resource-loader is licensed under the MIT license. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Smaller version of the async library constructs. + * + * @namespace async + */ + + /** + * Noop function + * + * @ignore + * @function + * @memberof async + */ + function _noop() {} + /* empty */ + + /** + * Iterates an array in series. + * + * @memberof async + * @function eachSeries + * @param {Array.<*>} array - Array to iterate. + * @param {function} iterator - Function to call for each element. + * @param {function} callback - Function to call when done, or on error. + * @param {boolean} [deferNext=false] - Break synchronous each loop by calling next with a setTimeout of 1. + */ + + + function eachSeries(array, iterator, callback, deferNext) { + var i = 0; + var len = array.length; + + (function next(err) { + if (err || i === len) { + if (callback) { + callback(err); + } + + return; + } + + if (deferNext) { + setTimeout(function () { + iterator(array[i++], next); + }, 1); + } else { + iterator(array[i++], next); + } + })(); + } + /** + * Ensures a function is only called once. + * + * @ignore + * @memberof async + * @param {function} fn - The function to wrap. + * @return {function} The wrapping function. + */ + + function onlyOnce(fn) { + return function onceWrapper() { + if (fn === null) { + throw new Error('Callback was already called.'); + } + + var callFn = fn; + fn = null; + callFn.apply(this, arguments); + }; + } + /** + * Async queue implementation, + * + * @memberof async + * @function queue + * @param {function} worker - The worker function to call for each task. + * @param {number} concurrency - How many workers to run in parrallel. + * @return {*} The async queue object. + */ + + + function queue(worker, concurrency) { + if (concurrency == null) { + // eslint-disable-line no-eq-null,eqeqeq + concurrency = 1; + } else if (concurrency === 0) { + throw new Error('Concurrency must not be zero'); + } + + var workers = 0; + var q = { + _tasks: [], + concurrency: concurrency, + saturated: _noop, + unsaturated: _noop, + buffer: concurrency / 4, + empty: _noop, + drain: _noop, + error: _noop, + started: false, + paused: false, + push: function push(data, callback) { + _insert(data, false, callback); + }, + kill: function kill() { + workers = 0; + q.drain = _noop; + q.started = false; + q._tasks = []; + }, + unshift: function unshift(data, callback) { + _insert(data, true, callback); + }, + process: function process() { + while (!q.paused && workers < q.concurrency && q._tasks.length) { + var task = q._tasks.shift(); + + if (q._tasks.length === 0) { + q.empty(); + } + + workers += 1; + + if (workers === q.concurrency) { + q.saturated(); + } + + worker(task.data, onlyOnce(_next(task))); + } + }, + length: function length() { + return q._tasks.length; + }, + running: function running() { + return workers; + }, + idle: function idle() { + return q._tasks.length + workers === 0; + }, + pause: function pause() { + if (q.paused === true) { + return; + } + + q.paused = true; + }, + resume: function resume() { + if (q.paused === false) { + return; + } + + q.paused = false; // Need to call q.process once per concurrent + // worker to preserve full concurrency after pause + + for (var w = 1; w <= q.concurrency; w++) { + q.process(); + } + } + }; + + function _insert(data, insertAtFront, callback) { + if (callback != null && typeof callback !== 'function') { + // eslint-disable-line no-eq-null,eqeqeq + throw new Error('task callback must be a function'); + } + + q.started = true; + + if (data == null && q.idle()) { + // eslint-disable-line no-eq-null,eqeqeq + // call drain immediately if there are no tasks + setTimeout(function () { + return q.drain(); + }, 1); + return; + } + + var item = { + data: data, + callback: typeof callback === 'function' ? callback : _noop + }; + + if (insertAtFront) { + q._tasks.unshift(item); + } else { + q._tasks.push(item); + } + + setTimeout(function () { + return q.process(); + }, 1); + } + + function _next(task) { + return function next() { + workers -= 1; + task.callback.apply(task, arguments); + + if (arguments[0] != null) { + // eslint-disable-line no-eq-null,eqeqeq + q.error(arguments[0], task.data); + } + + if (workers <= q.concurrency - q.buffer) { + q.unsaturated(); + } + + if (q.idle()) { + q.drain(); + } + + q.process(); + }; + } + + return q; + } + + var async = ({ + eachSeries: eachSeries, + queue: queue + }); + + // a simple in-memory cache for resources + var cache = {}; + /** + * A simple in-memory cache for resource. + * + * @memberof middleware + * @function caching + * @example + * import { Loader, middleware } from 'resource-loader'; + * const loader = new Loader(); + * loader.use(middleware.caching); + * @param {Resource} resource - Current Resource + * @param {function} next - Callback when complete + */ + + function caching(resource, next) { + var _this = this; + + // if cached, then set data and complete the resource + if (cache[resource.url]) { + resource.data = cache[resource.url]; + resource.complete(); // marks resource load complete and stops processing before middlewares + } // if not cached, wait for complete and store it in the cache. + else { + resource.onComplete.once(function () { + return cache[_this.url] = _this.data; + }); + } + + next(); + } + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) { descriptor.writable = true; } + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) { _defineProperties(Constructor.prototype, protoProps); } + if (staticProps) { _defineProperties(Constructor, staticProps); } + return Constructor; + } + + var useXdr = !!(window.XDomainRequest && !('withCredentials' in new XMLHttpRequest())); + var tempAnchor$1 = null; // some status constants + + var STATUS_NONE = 0; + var STATUS_OK = 200; + var STATUS_EMPTY = 204; + var STATUS_IE_BUG_EMPTY = 1223; + var STATUS_TYPE_OK = 2; // noop + + function _noop$1() {} + /* empty */ + + /** + * Manages the state and loading of a resource and all child resources. + * + * @class + */ + + + var Resource$1 = + /*#__PURE__*/ + function () { + /** + * Sets the load type to be used for a specific extension. + * + * @static + * @param {string} extname - The extension to set the type for, e.g. "png" or "fnt" + * @param {Resource.LOAD_TYPE} loadType - The load type to set it to. + */ + Resource.setExtensionLoadType = function setExtensionLoadType(extname, loadType) { + setExtMap(Resource._loadTypeMap, extname, loadType); + } + /** + * Sets the load type to be used for a specific extension. + * + * @static + * @param {string} extname - The extension to set the type for, e.g. "png" or "fnt" + * @param {Resource.XHR_RESPONSE_TYPE} xhrType - The xhr type to set it to. + */ + ; + + Resource.setExtensionXhrType = function setExtensionXhrType(extname, xhrType) { + setExtMap(Resource._xhrTypeMap, extname, xhrType); + } + /** + * @param {string} name - The name of the resource to load. + * @param {string|string[]} url - The url for this resource, for audio/video loads you can pass + * an array of sources. + * @param {object} [options] - The options for the load. + * @param {string|boolean} [options.crossOrigin] - Is this request cross-origin? Default is to + * determine automatically. + * @param {number} [options.timeout=0] - A timeout in milliseconds for the load. If the load takes + * longer than this time it is cancelled and the load is considered a failure. If this value is + * set to `0` then there is no explicit timeout. + * @param {Resource.LOAD_TYPE} [options.loadType=Resource.LOAD_TYPE.XHR] - How should this resource + * be loaded? + * @param {Resource.XHR_RESPONSE_TYPE} [options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How + * should the data being loaded be interpreted when using XHR? + * @param {Resource.IMetadata} [options.metadata] - Extra configuration for middleware and the Resource object. + */ + ; + + function Resource(name, url, options) { + if (typeof name !== 'string' || typeof url !== 'string') { + throw new Error('Both name and url are required for constructing a resource.'); + } + + options = options || {}; + /** + * The state flags of this resource. + * + * @private + * @member {number} + */ + + this._flags = 0; // set data url flag, needs to be set early for some _determineX checks to work. + + this._setFlag(Resource.STATUS_FLAGS.DATA_URL, url.indexOf('data:') === 0); + /** + * The name of this resource. + * + * @readonly + * @member {string} + */ + + + this.name = name; + /** + * The url used to load this resource. + * + * @readonly + * @member {string} + */ + + this.url = url; + /** + * The extension used to load this resource. + * + * @readonly + * @member {string} + */ + + this.extension = this._getExtension(); + /** + * The data that was loaded by the resource. + * + * @member {any} + */ + + this.data = null; + /** + * Is this request cross-origin? If unset, determined automatically. + * + * @member {string} + */ + + this.crossOrigin = options.crossOrigin === true ? 'anonymous' : options.crossOrigin; + /** + * A timeout in milliseconds for the load. If the load takes longer than this time + * it is cancelled and the load is considered a failure. If this value is set to `0` + * then there is no explicit timeout. + * + * @member {number} + */ + + this.timeout = options.timeout || 0; + /** + * The method of loading to use for this resource. + * + * @member {Resource.LOAD_TYPE} + */ + + this.loadType = options.loadType || this._determineLoadType(); + /** + * The type used to load the resource via XHR. If unset, determined automatically. + * + * @member {string} + */ + + this.xhrType = options.xhrType; + /** + * Extra info for middleware, and controlling specifics about how the resource loads. + * + * Note that if you pass in a `loadElement`, the Resource class takes ownership of it. + * Meaning it will modify it as it sees fit. + * + * @member {Resource.IMetadata} + */ + + this.metadata = options.metadata || {}; + /** + * The error that occurred while loading (if any). + * + * @readonly + * @member {Error} + */ + + this.error = null; + /** + * The XHR object that was used to load this resource. This is only set + * when `loadType` is `Resource.LOAD_TYPE.XHR`. + * + * @readonly + * @member {XMLHttpRequest} + */ + + this.xhr = null; + /** + * The child resources this resource owns. + * + * @readonly + * @member {Resource[]} + */ + + this.children = []; + /** + * The resource type. + * + * @readonly + * @member {Resource.TYPE} + */ + + this.type = Resource.TYPE.UNKNOWN; + /** + * The progress chunk owned by this resource. + * + * @readonly + * @member {number} + */ + + this.progressChunk = 0; + /** + * The `dequeue` method that will be used a storage place for the async queue dequeue method + * used privately by the loader. + * + * @private + * @member {function} + */ + + this._dequeue = _noop$1; + /** + * Used a storage place for the on load binding used privately by the loader. + * + * @private + * @member {function} + */ + + this._onLoadBinding = null; + /** + * The timer for element loads to check if they timeout. + * + * @private + * @member {number} + */ + + this._elementTimer = 0; + /** + * The `complete` function bound to this resource's context. + * + * @private + * @member {function} + */ + + this._boundComplete = this.complete.bind(this); + /** + * The `_onError` function bound to this resource's context. + * + * @private + * @member {function} + */ + + this._boundOnError = this._onError.bind(this); + /** + * The `_onProgress` function bound to this resource's context. + * + * @private + * @member {function} + */ + + this._boundOnProgress = this._onProgress.bind(this); + /** + * The `_onTimeout` function bound to this resource's context. + * + * @private + * @member {function} + */ + + this._boundOnTimeout = this._onTimeout.bind(this); // xhr callbacks + + this._boundXhrOnError = this._xhrOnError.bind(this); + this._boundXhrOnTimeout = this._xhrOnTimeout.bind(this); + this._boundXhrOnAbort = this._xhrOnAbort.bind(this); + this._boundXhrOnLoad = this._xhrOnLoad.bind(this); + /** + * Dispatched when the resource beings to load. + * + * The callback looks like {@link Resource.OnStartSignal}. + * + * @member {Signal} + */ + + this.onStart = new Signal(); + /** + * Dispatched each time progress of this resource load updates. + * Not all resources types and loader systems can support this event + * so sometimes it may not be available. If the resource + * is being loaded on a modern browser, using XHR, and the remote server + * properly sets Content-Length headers, then this will be available. + * + * The callback looks like {@link Resource.OnProgressSignal}. + * + * @member {Signal} + */ + + this.onProgress = new Signal(); + /** + * Dispatched once this resource has loaded, if there was an error it will + * be in the `error` property. + * + * The callback looks like {@link Resource.OnCompleteSignal}. + * + * @member {Signal} + */ + + this.onComplete = new Signal(); + /** + * Dispatched after this resource has had all the *after* middleware run on it. + * + * The callback looks like {@link Resource.OnCompleteSignal}. + * + * @member {Signal} + */ + + this.onAfterMiddleware = new Signal(); + } + /** + * When the resource starts to load. + * + * @memberof Resource + * @callback OnStartSignal + * @param {Resource} resource - The resource that the event happened on. + */ + + /** + * When the resource reports loading progress. + * + * @memberof Resource + * @callback OnProgressSignal + * @param {Resource} resource - The resource that the event happened on. + * @param {number} percentage - The progress of the load in the range [0, 1]. + */ + + /** + * When the resource finishes loading. + * + * @memberof Resource + * @callback OnCompleteSignal + * @param {Resource} resource - The resource that the event happened on. + */ + + /** + * @memberof Resource + * @typedef {object} IMetadata + * @property {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [loadElement=null] - The + * element to use for loading, instead of creating one. + * @property {boolean} [skipSource=false] - Skips adding source(s) to the load element. This + * is useful if you want to pass in a `loadElement` that you already added load sources to. + * @property {string|string[]} [mimeType] - The mime type to use for the source element + * of a video/audio elment. If the urls are an array, you can pass this as an array as well + * where each index is the mime type to use for the corresponding url index. + */ + + /** + * Stores whether or not this url is a data url. + * + * @readonly + * @member {boolean} + */ + + + var _proto = Resource.prototype; + + /** + * Marks the resource as complete. + * + */ + _proto.complete = function complete() { + this._clearEvents(); + + this._finish(); + } + /** + * Aborts the loading of this resource, with an optional message. + * + * @param {string} message - The message to use for the error + */ + ; + + _proto.abort = function abort(message) { + // abort can be called multiple times, ignore subsequent calls. + if (this.error) { + return; + } // store error + + + this.error = new Error(message); // clear events before calling aborts + + this._clearEvents(); // abort the actual loading + + + if (this.xhr) { + this.xhr.abort(); + } else if (this.xdr) { + this.xdr.abort(); + } else if (this.data) { + // single source + if (this.data.src) { + this.data.src = Resource.EMPTY_GIF; + } // multi-source + else { + while (this.data.firstChild) { + this.data.removeChild(this.data.firstChild); + } + } + } // done now. + + + this._finish(); + } + /** + * Kicks off loading of this resource. This method is asynchronous. + * + * @param {Resource.OnCompleteSignal} [cb] - Optional callback to call once the resource is loaded. + */ + ; + + _proto.load = function load(cb) { + var _this = this; + + if (this.isLoading) { + return; + } + + if (this.isComplete) { + if (cb) { + setTimeout(function () { + return cb(_this); + }, 1); + } + + return; + } else if (cb) { + this.onComplete.once(cb); + } + + this._setFlag(Resource.STATUS_FLAGS.LOADING, true); + + this.onStart.dispatch(this); // if unset, determine the value + + if (this.crossOrigin === false || typeof this.crossOrigin !== 'string') { + this.crossOrigin = this._determineCrossOrigin(this.url); + } + + switch (this.loadType) { + case Resource.LOAD_TYPE.IMAGE: + this.type = Resource.TYPE.IMAGE; + + this._loadElement('image'); + + break; + + case Resource.LOAD_TYPE.AUDIO: + this.type = Resource.TYPE.AUDIO; + + this._loadSourceElement('audio'); + + break; + + case Resource.LOAD_TYPE.VIDEO: + this.type = Resource.TYPE.VIDEO; + + this._loadSourceElement('video'); + + break; + + case Resource.LOAD_TYPE.XHR: + /* falls through */ + + default: + if (useXdr && this.crossOrigin) { + this._loadXdr(); + } else { + this._loadXhr(); + } + + break; + } + } + /** + * Checks if the flag is set. + * + * @private + * @param {number} flag - The flag to check. + * @return {boolean} True if the flag is set. + */ + ; + + _proto._hasFlag = function _hasFlag(flag) { + return (this._flags & flag) !== 0; + } + /** + * (Un)Sets the flag. + * + * @private + * @param {number} flag - The flag to (un)set. + * @param {boolean} value - Whether to set or (un)set the flag. + */ + ; + + _proto._setFlag = function _setFlag(flag, value) { + this._flags = value ? this._flags | flag : this._flags & ~flag; + } + /** + * Clears all the events from the underlying loading source. + * + * @private + */ + ; + + _proto._clearEvents = function _clearEvents() { + clearTimeout(this._elementTimer); + + if (this.data && this.data.removeEventListener) { + this.data.removeEventListener('error', this._boundOnError, false); + this.data.removeEventListener('load', this._boundComplete, false); + this.data.removeEventListener('progress', this._boundOnProgress, false); + this.data.removeEventListener('canplaythrough', this._boundComplete, false); + } + + if (this.xhr) { + if (this.xhr.removeEventListener) { + this.xhr.removeEventListener('error', this._boundXhrOnError, false); + this.xhr.removeEventListener('timeout', this._boundXhrOnTimeout, false); + this.xhr.removeEventListener('abort', this._boundXhrOnAbort, false); + this.xhr.removeEventListener('progress', this._boundOnProgress, false); + this.xhr.removeEventListener('load', this._boundXhrOnLoad, false); + } else { + this.xhr.onerror = null; + this.xhr.ontimeout = null; + this.xhr.onprogress = null; + this.xhr.onload = null; + } + } + } + /** + * Finalizes the load. + * + * @private + */ + ; + + _proto._finish = function _finish() { + if (this.isComplete) { + throw new Error('Complete called again for an already completed resource.'); + } + + this._setFlag(Resource.STATUS_FLAGS.COMPLETE, true); + + this._setFlag(Resource.STATUS_FLAGS.LOADING, false); + + this.onComplete.dispatch(this); + } + /** + * Loads this resources using an element that has a single source, + * like an HTMLImageElement. + * + * @private + * @param {string} type - The type of element to use. + */ + ; + + _proto._loadElement = function _loadElement(type) { + if (this.metadata.loadElement) { + this.data = this.metadata.loadElement; + } else if (type === 'image' && typeof window.Image !== 'undefined') { + this.data = new Image(); + } else { + this.data = document.createElement(type); + } + + if (this.crossOrigin) { + this.data.crossOrigin = this.crossOrigin; + } + + if (!this.metadata.skipSource) { + this.data.src = this.url; + } + + this.data.addEventListener('error', this._boundOnError, false); + this.data.addEventListener('load', this._boundComplete, false); + this.data.addEventListener('progress', this._boundOnProgress, false); + + if (this.timeout) { + this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout); + } + } + /** + * Loads this resources using an element that has multiple sources, + * like an HTMLAudioElement or HTMLVideoElement. + * + * @private + * @param {string} type - The type of element to use. + */ + ; + + _proto._loadSourceElement = function _loadSourceElement(type) { + if (this.metadata.loadElement) { + this.data = this.metadata.loadElement; + } else if (type === 'audio' && typeof window.Audio !== 'undefined') { + this.data = new Audio(); + } else { + this.data = document.createElement(type); + } + + if (this.data === null) { + this.abort("Unsupported element: " + type); + return; + } + + if (this.crossOrigin) { + this.data.crossOrigin = this.crossOrigin; + } + + if (!this.metadata.skipSource) { + // support for CocoonJS Canvas+ runtime, lacks document.createElement('source') + if (navigator.isCocoonJS) { + this.data.src = Array.isArray(this.url) ? this.url[0] : this.url; + } else if (Array.isArray(this.url)) { + var mimeTypes = this.metadata.mimeType; + + for (var i = 0; i < this.url.length; ++i) { + this.data.appendChild(this._createSource(type, this.url[i], Array.isArray(mimeTypes) ? mimeTypes[i] : mimeTypes)); + } + } else { + var _mimeTypes = this.metadata.mimeType; + this.data.appendChild(this._createSource(type, this.url, Array.isArray(_mimeTypes) ? _mimeTypes[0] : _mimeTypes)); + } + } + + this.data.addEventListener('error', this._boundOnError, false); + this.data.addEventListener('load', this._boundComplete, false); + this.data.addEventListener('progress', this._boundOnProgress, false); + this.data.addEventListener('canplaythrough', this._boundComplete, false); + this.data.load(); + + if (this.timeout) { + this._elementTimer = setTimeout(this._boundOnTimeout, this.timeout); + } + } + /** + * Loads this resources using an XMLHttpRequest. + * + * @private + */ + ; + + _proto._loadXhr = function _loadXhr() { + // if unset, determine the value + if (typeof this.xhrType !== 'string') { + this.xhrType = this._determineXhrType(); + } + + var xhr = this.xhr = new XMLHttpRequest(); // set the request type and url + + xhr.open('GET', this.url, true); + xhr.timeout = this.timeout; // load json as text and parse it ourselves. We do this because some browsers + // *cough* safari *cough* can't deal with it. + + if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON || this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) { + xhr.responseType = Resource.XHR_RESPONSE_TYPE.TEXT; + } else { + xhr.responseType = this.xhrType; + } + + xhr.addEventListener('error', this._boundXhrOnError, false); + xhr.addEventListener('timeout', this._boundXhrOnTimeout, false); + xhr.addEventListener('abort', this._boundXhrOnAbort, false); + xhr.addEventListener('progress', this._boundOnProgress, false); + xhr.addEventListener('load', this._boundXhrOnLoad, false); + xhr.send(); + } + /** + * Loads this resources using an XDomainRequest. This is here because we need to support IE9 (gross). + * + * @private + */ + ; + + _proto._loadXdr = function _loadXdr() { + // if unset, determine the value + if (typeof this.xhrType !== 'string') { + this.xhrType = this._determineXhrType(); + } + + var xdr = this.xhr = new XDomainRequest(); // eslint-disable-line no-undef + // XDomainRequest has a few quirks. Occasionally it will abort requests + // A way to avoid this is to make sure ALL callbacks are set even if not used + // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9 + + xdr.timeout = this.timeout || 5000; // XDR needs a timeout value or it breaks in IE9 + + xdr.onerror = this._boundXhrOnError; + xdr.ontimeout = this._boundXhrOnTimeout; + xdr.onprogress = this._boundOnProgress; + xdr.onload = this._boundXhrOnLoad; + xdr.open('GET', this.url, true); // Note: The xdr.send() call is wrapped in a timeout to prevent an + // issue with the interface where some requests are lost if multiple + // XDomainRequests are being sent at the same time. + // Some info here: https://github.com/photonstorm/phaser/issues/1248 + + setTimeout(function () { + return xdr.send(); + }, 1); + } + /** + * Creates a source used in loading via an element. + * + * @private + * @param {string} type - The element type (video or audio). + * @param {string} url - The source URL to load from. + * @param {string} [mime] - The mime type of the video + * @return {HTMLSourceElement} The source element. + */ + ; + + _proto._createSource = function _createSource(type, url, mime) { + if (!mime) { + mime = type + "/" + this._getExtension(url); + } + + var source = document.createElement('source'); + source.src = url; + source.type = mime; + return source; + } + /** + * Called if a load errors out. + * + * @param {Event} event - The error event from the element that emits it. + * @private + */ + ; + + _proto._onError = function _onError(event) { + this.abort("Failed to load element using: " + event.target.nodeName); + } + /** + * Called if a load progress event fires for an element or xhr/xdr. + * + * @private + * @param {XMLHttpRequestProgressEvent|Event} event - Progress event. + */ + ; + + _proto._onProgress = function _onProgress(event) { + if (event && event.lengthComputable) { + this.onProgress.dispatch(this, event.loaded / event.total); + } + } + /** + * Called if a timeout event fires for an element. + * + * @private + */ + ; + + _proto._onTimeout = function _onTimeout() { + this.abort("Load timed out."); + } + /** + * Called if an error event fires for xhr/xdr. + * + * @private + */ + ; + + _proto._xhrOnError = function _xhrOnError() { + var xhr = this.xhr; + this.abort(reqType(xhr) + " Request failed. Status: " + xhr.status + ", text: \"" + xhr.statusText + "\""); + } + /** + * Called if an error event fires for xhr/xdr. + * + * @private + */ + ; + + _proto._xhrOnTimeout = function _xhrOnTimeout() { + var xhr = this.xhr; + this.abort(reqType(xhr) + " Request timed out."); + } + /** + * Called if an abort event fires for xhr/xdr. + * + * @private + */ + ; + + _proto._xhrOnAbort = function _xhrOnAbort() { + var xhr = this.xhr; + this.abort(reqType(xhr) + " Request was aborted by the user."); + } + /** + * Called when data successfully loads from an xhr/xdr request. + * + * @private + * @param {XMLHttpRequestLoadEvent|Event} event - Load event + */ + ; + + _proto._xhrOnLoad = function _xhrOnLoad() { + var xhr = this.xhr; + var text = ''; + var status = typeof xhr.status === 'undefined' ? STATUS_OK : xhr.status; // XDR has no `.status`, assume 200. + // responseText is accessible only if responseType is '' or 'text' and on older browsers + + if (xhr.responseType === '' || xhr.responseType === 'text' || typeof xhr.responseType === 'undefined') { + text = xhr.responseText; + } // status can be 0 when using the `file://` protocol so we also check if a response is set. + // If it has a response, we assume 200; otherwise a 0 status code with no contents is an aborted request. + + + if (status === STATUS_NONE && (text.length > 0 || xhr.responseType === Resource.XHR_RESPONSE_TYPE.BUFFER)) { + status = STATUS_OK; + } // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request + else if (status === STATUS_IE_BUG_EMPTY) { + status = STATUS_EMPTY; + } + + var statusType = status / 100 | 0; + + if (statusType === STATUS_TYPE_OK) { + // if text, just return it + if (this.xhrType === Resource.XHR_RESPONSE_TYPE.TEXT) { + this.data = text; + this.type = Resource.TYPE.TEXT; + } // if json, parse into json object + else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON) { + try { + this.data = JSON.parse(text); + this.type = Resource.TYPE.JSON; + } catch (e) { + this.abort("Error trying to parse loaded json: " + e); + return; + } + } // if xml, parse into an xml document or div element + else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) { + try { + if (window.DOMParser) { + var domparser = new DOMParser(); + this.data = domparser.parseFromString(text, 'text/xml'); + } else { + var div = document.createElement('div'); + div.innerHTML = text; + this.data = div; + } + + this.type = Resource.TYPE.XML; + } catch (e) { + this.abort("Error trying to parse loaded xml: " + e); + return; + } + } // other types just return the response + else { + this.data = xhr.response || text; + } + } else { + this.abort("[" + xhr.status + "] " + xhr.statusText + ": " + xhr.responseURL); + return; + } + + this.complete(); + } + /** + * Sets the `crossOrigin` property for this resource based on if the url + * for this resource is cross-origin. If crossOrigin was manually set, this + * function does nothing. + * + * @private + * @param {string} url - The url to test. + * @param {object} [loc=window.location] - The location object to test against. + * @return {string} The crossOrigin value to use (or empty string for none). + */ + ; + + _proto._determineCrossOrigin = function _determineCrossOrigin(url, loc) { + // data: and javascript: urls are considered same-origin + if (url.indexOf('data:') === 0) { + return ''; + } // A sandboxed iframe without the 'allow-same-origin' attribute will have a special + // origin designed not to match window.location.origin, and will always require + // crossOrigin requests regardless of whether the location matches. + + + if (window.origin !== window.location.origin) { + return 'anonymous'; + } // default is window.location + + + loc = loc || window.location; + + if (!tempAnchor$1) { + tempAnchor$1 = document.createElement('a'); + } // let the browser determine the full href for the url of this resource and then + // parse with the node url lib, we can't use the properties of the anchor element + // because they don't work in IE9 :( + + + tempAnchor$1.href = url; + url = parseUri(tempAnchor$1.href, { + strictMode: true + }); + var samePort = !url.port && loc.port === '' || url.port === loc.port; + var protocol = url.protocol ? url.protocol + ":" : ''; // if cross origin + + if (url.host !== loc.hostname || !samePort || protocol !== loc.protocol) { + return 'anonymous'; + } + + return ''; + } + /** + * Determines the responseType of an XHR request based on the extension of the + * resource being loaded. + * + * @private + * @return {Resource.XHR_RESPONSE_TYPE} The responseType to use. + */ + ; + + _proto._determineXhrType = function _determineXhrType() { + return Resource._xhrTypeMap[this.extension] || Resource.XHR_RESPONSE_TYPE.TEXT; + } + /** + * Determines the loadType of a resource based on the extension of the + * resource being loaded. + * + * @private + * @return {Resource.LOAD_TYPE} The loadType to use. + */ + ; + + _proto._determineLoadType = function _determineLoadType() { + return Resource._loadTypeMap[this.extension] || Resource.LOAD_TYPE.XHR; + } + /** + * Extracts the extension (sans '.') of the file being loaded by the resource. + * + * @private + * @return {string} The extension. + */ + ; + + _proto._getExtension = function _getExtension() { + var url = this.url; + var ext = ''; + + if (this.isDataUrl) { + var slashIndex = url.indexOf('/'); + ext = url.substring(slashIndex + 1, url.indexOf(';', slashIndex)); + } else { + var queryStart = url.indexOf('?'); + var hashStart = url.indexOf('#'); + var index = Math.min(queryStart > -1 ? queryStart : url.length, hashStart > -1 ? hashStart : url.length); + url = url.substring(0, index); + ext = url.substring(url.lastIndexOf('.') + 1); + } + + return ext.toLowerCase(); + } + /** + * Determines the mime type of an XHR request based on the responseType of + * resource being loaded. + * + * @private + * @param {Resource.XHR_RESPONSE_TYPE} type - The type to get a mime type for. + * @return {string} The mime type to use. + */ + ; + + _proto._getMimeFromXhrType = function _getMimeFromXhrType(type) { + switch (type) { + case Resource.XHR_RESPONSE_TYPE.BUFFER: + return 'application/octet-binary'; + + case Resource.XHR_RESPONSE_TYPE.BLOB: + return 'application/blob'; + + case Resource.XHR_RESPONSE_TYPE.DOCUMENT: + return 'application/xml'; + + case Resource.XHR_RESPONSE_TYPE.JSON: + return 'application/json'; + + case Resource.XHR_RESPONSE_TYPE.DEFAULT: + case Resource.XHR_RESPONSE_TYPE.TEXT: + /* falls through */ + + default: + return 'text/plain'; + } + }; + + _createClass(Resource, [{ + key: "isDataUrl", + get: function get() { + return this._hasFlag(Resource.STATUS_FLAGS.DATA_URL); + } + /** + * Describes if this resource has finished loading. Is true when the resource has completely + * loaded. + * + * @readonly + * @member {boolean} + */ + + }, { + key: "isComplete", + get: function get() { + return this._hasFlag(Resource.STATUS_FLAGS.COMPLETE); + } + /** + * Describes if this resource is currently loading. Is true when the resource starts loading, + * and is false again when complete. + * + * @readonly + * @member {boolean} + */ + + }, { + key: "isLoading", + get: function get() { + return this._hasFlag(Resource.STATUS_FLAGS.LOADING); + } + }]); + + return Resource; + }(); + /** + * The types of resources a resource could represent. + * + * @static + * @readonly + * @enum {number} + */ + + + Resource$1.STATUS_FLAGS = { + NONE: 0, + DATA_URL: 1 << 0, + COMPLETE: 1 << 1, + LOADING: 1 << 2 + }; + /** + * The types of resources a resource could represent. + * + * @static + * @readonly + * @enum {number} + */ + + Resource$1.TYPE = { + UNKNOWN: 0, + JSON: 1, + XML: 2, + IMAGE: 3, + AUDIO: 4, + VIDEO: 5, + TEXT: 6 + }; + /** + * The types of loading a resource can use. + * + * @static + * @readonly + * @enum {number} + */ + + Resource$1.LOAD_TYPE = { + /** Uses XMLHttpRequest to load the resource. */ + XHR: 1, + + /** Uses an `Image` object to load the resource. */ + IMAGE: 2, + + /** Uses an `Audio` object to load the resource. */ + AUDIO: 3, + + /** Uses a `Video` object to load the resource. */ + VIDEO: 4 + }; + /** + * The XHR ready states, used internally. + * + * @static + * @readonly + * @enum {string} + */ + + Resource$1.XHR_RESPONSE_TYPE = { + /** string */ + DEFAULT: 'text', + + /** ArrayBuffer */ + BUFFER: 'arraybuffer', + + /** Blob */ + BLOB: 'blob', + + /** Document */ + DOCUMENT: 'document', + + /** Object */ + JSON: 'json', + + /** String */ + TEXT: 'text' + }; + Resource$1._loadTypeMap = { + // images + gif: Resource$1.LOAD_TYPE.IMAGE, + png: Resource$1.LOAD_TYPE.IMAGE, + bmp: Resource$1.LOAD_TYPE.IMAGE, + jpg: Resource$1.LOAD_TYPE.IMAGE, + jpeg: Resource$1.LOAD_TYPE.IMAGE, + tif: Resource$1.LOAD_TYPE.IMAGE, + tiff: Resource$1.LOAD_TYPE.IMAGE, + webp: Resource$1.LOAD_TYPE.IMAGE, + tga: Resource$1.LOAD_TYPE.IMAGE, + svg: Resource$1.LOAD_TYPE.IMAGE, + 'svg+xml': Resource$1.LOAD_TYPE.IMAGE, + // for SVG data urls + // audio + mp3: Resource$1.LOAD_TYPE.AUDIO, + ogg: Resource$1.LOAD_TYPE.AUDIO, + wav: Resource$1.LOAD_TYPE.AUDIO, + // videos + mp4: Resource$1.LOAD_TYPE.VIDEO, + webm: Resource$1.LOAD_TYPE.VIDEO + }; + Resource$1._xhrTypeMap = { + // xml + xhtml: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT, + html: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT, + htm: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT, + xml: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT, + tmx: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT, + svg: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT, + // This was added to handle Tiled Tileset XML, but .tsx is also a TypeScript React Component. + // Since it is way less likely for people to be loading TypeScript files instead of Tiled files, + // this should probably be fine. + tsx: Resource$1.XHR_RESPONSE_TYPE.DOCUMENT, + // images + gif: Resource$1.XHR_RESPONSE_TYPE.BLOB, + png: Resource$1.XHR_RESPONSE_TYPE.BLOB, + bmp: Resource$1.XHR_RESPONSE_TYPE.BLOB, + jpg: Resource$1.XHR_RESPONSE_TYPE.BLOB, + jpeg: Resource$1.XHR_RESPONSE_TYPE.BLOB, + tif: Resource$1.XHR_RESPONSE_TYPE.BLOB, + tiff: Resource$1.XHR_RESPONSE_TYPE.BLOB, + webp: Resource$1.XHR_RESPONSE_TYPE.BLOB, + tga: Resource$1.XHR_RESPONSE_TYPE.BLOB, + // json + json: Resource$1.XHR_RESPONSE_TYPE.JSON, + // text + text: Resource$1.XHR_RESPONSE_TYPE.TEXT, + txt: Resource$1.XHR_RESPONSE_TYPE.TEXT, + // fonts + ttf: Resource$1.XHR_RESPONSE_TYPE.BUFFER, + otf: Resource$1.XHR_RESPONSE_TYPE.BUFFER + }; // We can't set the `src` attribute to empty string, so on abort we set it to this 1px transparent gif + + Resource$1.EMPTY_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='; + /** + * Quick helper to set a value on one of the extension maps. Ensures there is no + * dot at the start of the extension. + * + * @ignore + * @param {object} map - The map to set on. + * @param {string} extname - The extension (or key) to set. + * @param {number} val - The value to set. + */ + + function setExtMap(map, extname, val) { + if (extname && extname.indexOf('.') === 0) { + extname = extname.substring(1); + } + + if (!extname) { + return; + } + + map[extname] = val; + } + /** + * Quick helper to get string xhr type. + * + * @ignore + * @param {XMLHttpRequest|XDomainRequest} xhr - The request to check. + * @return {string} The type. + */ + + + function reqType(xhr) { + return xhr.toString().replace('object ', ''); + } + + var _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + /** + * Encodes binary into base64. + * + * @function encodeBinary + * @param {string} input The input data to encode. + * @returns {string} The encoded base64 string + */ + + function encodeBinary(input) { + var output = ''; + var inx = 0; + + while (inx < input.length) { + // Fill byte buffer array + var bytebuffer = [0, 0, 0]; + var encodedCharIndexes = [0, 0, 0, 0]; + + for (var jnx = 0; jnx < bytebuffer.length; ++jnx) { + if (inx < input.length) { + // throw away high-order byte, as documented at: + // https://developer.mozilla.org/En/Using_XMLHttpRequest#Handling_binary_data + bytebuffer[jnx] = input.charCodeAt(inx++) & 0xff; + } else { + bytebuffer[jnx] = 0; + } + } // Get each encoded character, 6 bits at a time + // index 1: first 6 bits + + + encodedCharIndexes[0] = bytebuffer[0] >> 2; // index 2: second 6 bits (2 least significant bits from input byte 1 + 4 most significant bits from byte 2) + + encodedCharIndexes[1] = (bytebuffer[0] & 0x3) << 4 | bytebuffer[1] >> 4; // index 3: third 6 bits (4 least significant bits from input byte 2 + 2 most significant bits from byte 3) + + encodedCharIndexes[2] = (bytebuffer[1] & 0x0f) << 2 | bytebuffer[2] >> 6; // index 3: forth 6 bits (6 least significant bits from input byte 3) + + encodedCharIndexes[3] = bytebuffer[2] & 0x3f; // Determine whether padding happened, and adjust accordingly + + var paddingBytes = inx - (input.length - 1); + + switch (paddingBytes) { + case 2: + // Set last 2 characters to padding char + encodedCharIndexes[3] = 64; + encodedCharIndexes[2] = 64; + break; + + case 1: + // Set last character to padding char + encodedCharIndexes[3] = 64; + break; + + default: + break; + // No padding - proceed + } // Now we will grab each appropriate character out of our keystring + // based on our index array and append it to the output string + + + for (var _jnx = 0; _jnx < encodedCharIndexes.length; ++_jnx) { + output += _keyStr.charAt(encodedCharIndexes[_jnx]); + } + } + + return output; + } + + var Url$1 = window.URL || window.webkitURL; + /** + * A middleware for transforming XHR loaded Blobs into more useful objects + * + * @memberof middleware + * @function parsing + * @example + * import { Loader, middleware } from 'resource-loader'; + * const loader = new Loader(); + * loader.use(middleware.parsing); + * @param {Resource} resource - Current Resource + * @param {function} next - Callback when complete + */ + + function parsing(resource, next) { + if (!resource.data) { + next(); + return; + } // if this was an XHR load of a blob + + + if (resource.xhr && resource.xhrType === Resource$1.XHR_RESPONSE_TYPE.BLOB) { + // if there is no blob support we probably got a binary string back + if (!window.Blob || typeof resource.data === 'string') { + var type = resource.xhr.getResponseHeader('content-type'); // this is an image, convert the binary string into a data url + + if (type && type.indexOf('image') === 0) { + resource.data = new Image(); + resource.data.src = "data:" + type + ";base64," + encodeBinary(resource.xhr.responseText); + resource.type = Resource$1.TYPE.IMAGE; // wait until the image loads and then callback + + resource.data.onload = function () { + resource.data.onload = null; + next(); + }; // next will be called on load + + + return; + } + } // if content type says this is an image, then we should transform the blob into an Image object + else if (resource.data.type.indexOf('image') === 0) { + var src = Url$1.createObjectURL(resource.data); + resource.blob = resource.data; + resource.data = new Image(); + resource.data.src = src; + resource.type = Resource$1.TYPE.IMAGE; // cleanup the no longer used blob after the image loads + // TODO: Is this correct? Will the image be invalid after revoking? + + resource.data.onload = function () { + Url$1.revokeObjectURL(src); + resource.data.onload = null; + next(); + }; // next will be called on load. + + + return; + } + } + + next(); + } + + /** + * @namespace middleware + */ + + var index$1 = ({ + caching: caching, + parsing: parsing + }); + + var MAX_PROGRESS = 100; + var rgxExtractUrlHash = /(#[\w-]+)?$/; + /** + * Manages the state and loading of multiple resources to load. + * + * @class + */ + + var Loader = + /*#__PURE__*/ + function () { + /** + * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader. + * @param {number} [concurrency=10] - The number of resources to load concurrently. + */ + function Loader(baseUrl, concurrency) { + var _this = this; + + if (baseUrl === void 0) { + baseUrl = ''; + } + + if (concurrency === void 0) { + concurrency = 10; + } + + /** + * The base url for all resources loaded by this loader. + * + * @member {string} + */ + this.baseUrl = baseUrl; + /** + * The progress percent of the loader going through the queue. + * + * @member {number} + * @default 0 + */ + + this.progress = 0; + /** + * Loading state of the loader, true if it is currently loading resources. + * + * @member {boolean} + * @default false + */ + + this.loading = false; + /** + * A querystring to append to every URL added to the loader. + * + * This should be a valid query string *without* the question-mark (`?`). The loader will + * also *not* escape values for you. Make sure to escape your parameters with + * [`encodeURIComponent`](https://mdn.io/encodeURIComponent) before assigning this property. + * + * @example + * const loader = new Loader(); + * + * loader.defaultQueryString = 'user=me&password=secret'; + * + * // This will request 'image.png?user=me&password=secret' + * loader.add('image.png').load(); + * + * loader.reset(); + * + * // This will request 'image.png?v=1&user=me&password=secret' + * loader.add('iamge.png?v=1').load(); + * + * @member {string} + * @default '' + */ + + this.defaultQueryString = ''; + /** + * The middleware to run before loading each resource. + * + * @private + * @member {function[]} + */ + + this._beforeMiddleware = []; + /** + * The middleware to run after loading each resource. + * + * @private + * @member {function[]} + */ + + this._afterMiddleware = []; + /** + * The tracks the resources we are currently completing parsing for. + * + * @private + * @member {Resource[]} + */ + + this._resourcesParsing = []; + /** + * The `_loadResource` function bound with this object context. + * + * @private + * @member {function} + * @param {Resource} r - The resource to load + * @param {Function} d - The dequeue function + * @return {undefined} + */ + + this._boundLoadResource = function (r, d) { + return _this._loadResource(r, d); + }; + /** + * The resources waiting to be loaded. + * + * @private + * @member {Resource[]} + */ + + + this._queue = queue(this._boundLoadResource, concurrency); + + this._queue.pause(); + /** + * All the resources for this loader keyed by name. + * + * @member {object} + */ + + + this.resources = {}; + /** + * Dispatched once per loaded or errored resource. + * + * The callback looks like {@link Loader.OnProgressSignal}. + * + * @member {Signal} + */ + + this.onProgress = new Signal(); + /** + * Dispatched once per errored resource. + * + * The callback looks like {@link Loader.OnErrorSignal}. + * + * @member {Signal} + */ + + this.onError = new Signal(); + /** + * Dispatched once per loaded resource. + * + * The callback looks like {@link Loader.OnLoadSignal}. + * + * @member {Signal} + */ + + this.onLoad = new Signal(); + /** + * Dispatched when the loader begins to process the queue. + * + * The callback looks like {@link Loader.OnStartSignal}. + * + * @member {Signal} + */ + + this.onStart = new Signal(); + /** + * Dispatched when the queued resources all load. + * + * The callback looks like {@link Loader.OnCompleteSignal}. + * + * @member {Signal} + */ + + this.onComplete = new Signal(); // Add default before middleware + + for (var i = 0; i < Loader._defaultBeforeMiddleware.length; ++i) { + this.pre(Loader._defaultBeforeMiddleware[i]); + } // Add default after middleware + + + for (var _i = 0; _i < Loader._defaultAfterMiddleware.length; ++_i) { + this.use(Loader._defaultAfterMiddleware[_i]); + } + } + /** + * When the progress changes the loader and resource are disaptched. + * + * @memberof Loader + * @callback OnProgressSignal + * @param {Loader} loader - The loader the progress is advancing on. + * @param {Resource} resource - The resource that has completed or failed to cause the progress to advance. + */ + + /** + * When an error occurrs the loader and resource are disaptched. + * + * @memberof Loader + * @callback OnErrorSignal + * @param {Loader} loader - The loader the error happened in. + * @param {Resource} resource - The resource that caused the error. + */ + + /** + * When a load completes the loader and resource are disaptched. + * + * @memberof Loader + * @callback OnLoadSignal + * @param {Loader} loader - The loader that laoded the resource. + * @param {Resource} resource - The resource that has completed loading. + */ + + /** + * When the loader starts loading resources it dispatches this callback. + * + * @memberof Loader + * @callback OnStartSignal + * @param {Loader} loader - The loader that has started loading resources. + */ + + /** + * When the loader completes loading resources it dispatches this callback. + * + * @memberof Loader + * @callback OnCompleteSignal + * @param {Loader} loader - The loader that has finished loading resources. + */ + + /** + * Options for a call to `.add()`. + * + * @see Loader#add + * + * @typedef {object} IAddOptions + * @property {string} [name] - The name of the resource to load, if not passed the url is used. + * @property {string} [key] - Alias for `name`. + * @property {string} [url] - The url for this resource, relative to the baseUrl of this loader. + * @property {string|boolean} [crossOrigin] - Is this request cross-origin? Default is to + * determine automatically. + * @property {number} [timeout=0] - A timeout in milliseconds for the load. If the load takes + * longer than this time it is cancelled and the load is considered a failure. If this value is + * set to `0` then there is no explicit timeout. + * @property {Resource.LOAD_TYPE} [loadType=Resource.LOAD_TYPE.XHR] - How should this resource + * be loaded? + * @property {Resource.XHR_RESPONSE_TYPE} [xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How + * should the data being loaded be interpreted when using XHR? + * @property {Resource.OnCompleteSignal} [onComplete] - Callback to add an an onComplete signal istener. + * @property {Resource.OnCompleteSignal} [callback] - Alias for `onComplete`. + * @property {Resource.IMetadata} [metadata] - Extra configuration for middleware and the Resource object. + */ + + /* eslint-disable require-jsdoc,valid-jsdoc */ + + /** + * Adds a resource (or multiple resources) to the loader queue. + * + * This function can take a wide variety of different parameters. The only thing that is always + * required the url to load. All the following will work: + * + * ```js + * loader + * // normal param syntax + * .add('key', 'http://...', function () {}) + * .add('http://...', function () {}) + * .add('http://...') + * + * // object syntax + * .add({ + * name: 'key2', + * url: 'http://...' + * }, function () {}) + * .add({ + * url: 'http://...' + * }, function () {}) + * .add({ + * name: 'key3', + * url: 'http://...' + * onComplete: function () {} + * }) + * .add({ + * url: 'https://...', + * onComplete: function () {}, + * crossOrigin: true + * }) + * + * // you can also pass an array of objects or urls or both + * .add([ + * { name: 'key4', url: 'http://...', onComplete: function () {} }, + * { url: 'http://...', onComplete: function () {} }, + * 'http://...' + * ]) + * + * // and you can use both params and options + * .add('key', 'http://...', { crossOrigin: true }, function () {}) + * .add('http://...', { crossOrigin: true }, function () {}); + * ``` + * + * @function + * @variation 1 + * @param {string} name - The name of the resource to load. + * @param {string} url - The url for this resource, relative to the baseUrl of this loader. + * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading. + * @return {this} Returns itself. + */ + + /** + * @function + * @variation 2 + * @param {string} name - The name of the resource to load. + * @param {string} url - The url for this resource, relative to the baseUrl of this loader. + * @param {IAddOptions} [options] - The options for the load. + * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading. + * @return {this} Returns itself. + */ + + /** + * @function + * @variation 3 + * @param {string} url - The url for this resource, relative to the baseUrl of this loader. + * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading. + * @return {this} Returns itself. + */ + + /** + * @function + * @variation 4 + * @param {string} url - The url for this resource, relative to the baseUrl of this loader. + * @param {IAddOptions} [options] - The options for the load. + * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading. + * @return {this} Returns itself. + */ + + /** + * @function + * @variation 5 + * @param {IAddOptions} options - The options for the load. This object must contain a `url` property. + * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading. + * @return {this} Returns itself. + */ + + /** + * @function + * @variation 6 + * @param {Array} resources - An array of resources to load, where each is + * either an object with the options or a string url. If you pass an object, it must contain a `url` property. + * @param {Resource.OnCompleteSignal} [callback] - Function to call when this specific resource completes loading. + * @return {this} Returns itself. + */ + + + var _proto = Loader.prototype; + + _proto.add = function add(name, url, options, cb) { + // special case of an array of objects or urls + if (Array.isArray(name)) { + for (var i = 0; i < name.length; ++i) { + this.add(name[i]); + } + + return this; + } // if an object is passed instead of params + + + if (typeof name === 'object') { + cb = url || name.callback || name.onComplete; + options = name; + url = name.url; + name = name.name || name.key || name.url; + } // case where no name is passed shift all args over by one. + + + if (typeof url !== 'string') { + cb = options; + options = url; + url = name; + } // now that we shifted make sure we have a proper url. + + + if (typeof url !== 'string') { + throw new Error('No url passed to add resource to loader.'); + } // options are optional so people might pass a function and no options + + + if (typeof options === 'function') { + cb = options; + options = null; + } // if loading already you can only add resources that have a parent. + + + if (this.loading && (!options || !options.parentResource)) { + throw new Error('Cannot add resources while the loader is running.'); + } // check if resource already exists. + + + if (this.resources[name]) { + throw new Error("Resource named \"" + name + "\" already exists."); + } // add base url if this isn't an absolute url + + + url = this._prepareUrl(url); // create the store the resource + + this.resources[name] = new Resource$1(name, url, options); + + if (typeof cb === 'function') { + this.resources[name].onAfterMiddleware.once(cb); + } // if actively loading, make sure to adjust progress chunks for that parent and its children + + + if (this.loading) { + var parent = options.parentResource; + var incompleteChildren = []; + + for (var _i2 = 0; _i2 < parent.children.length; ++_i2) { + if (!parent.children[_i2].isComplete) { + incompleteChildren.push(parent.children[_i2]); + } + } + + var fullChunk = parent.progressChunk * (incompleteChildren.length + 1); // +1 for parent + + var eachChunk = fullChunk / (incompleteChildren.length + 2); // +2 for parent & new child + + parent.children.push(this.resources[name]); + parent.progressChunk = eachChunk; + + for (var _i3 = 0; _i3 < incompleteChildren.length; ++_i3) { + incompleteChildren[_i3].progressChunk = eachChunk; + } + + this.resources[name].progressChunk = eachChunk; + } // add the resource to the queue + + + this._queue.push(this.resources[name]); + + return this; + } + /* eslint-enable require-jsdoc,valid-jsdoc */ + + /** + * Sets up a middleware function that will run *before* the + * resource is loaded. + * + * @param {function} fn - The middleware function to register. + * @return {this} Returns itself. + */ + ; + + _proto.pre = function pre(fn) { + this._beforeMiddleware.push(fn); + + return this; + } + /** + * Sets up a middleware function that will run *after* the + * resource is loaded. + * + * @param {function} fn - The middleware function to register. + * @return {this} Returns itself. + */ + ; + + _proto.use = function use(fn) { + this._afterMiddleware.push(fn); + + return this; + } + /** + * Resets the queue of the loader to prepare for a new load. + * + * @return {this} Returns itself. + */ + ; + + _proto.reset = function reset() { + this.progress = 0; + this.loading = false; + + this._queue.kill(); + + this._queue.pause(); // abort all resource loads + + + for (var k in this.resources) { + var res = this.resources[k]; + + if (res._onLoadBinding) { + res._onLoadBinding.detach(); + } + + if (res.isLoading) { + res.abort(); + } + } + + this.resources = {}; + return this; + } + /** + * Starts loading the queued resources. + * + * @param {function} [cb] - Optional callback that will be bound to the `complete` event. + * @return {this} Returns itself. + */ + ; + + _proto.load = function load(cb) { + // register complete callback if they pass one + if (typeof cb === 'function') { + this.onComplete.once(cb); + } // if the queue has already started we are done here + + + if (this.loading) { + return this; + } + + if (this._queue.idle()) { + this._onStart(); + + this._onComplete(); + } else { + // distribute progress chunks + var numTasks = this._queue._tasks.length; + var chunk = MAX_PROGRESS / numTasks; + + for (var i = 0; i < this._queue._tasks.length; ++i) { + this._queue._tasks[i].data.progressChunk = chunk; + } // notify we are starting + + + this._onStart(); // start loading + + + this._queue.resume(); + } + + return this; + } + /** + * The number of resources to load concurrently. + * + * @member {number} + * @default 10 + */ + ; + + /** + * Prepares a url for usage based on the configuration of this object + * + * @private + * @param {string} url - The url to prepare. + * @return {string} The prepared url. + */ + _proto._prepareUrl = function _prepareUrl(url) { + var parsedUrl = parseUri(url, { + strictMode: true + }); + var result; // absolute url, just use it as is. + + if (parsedUrl.protocol || !parsedUrl.path || url.indexOf('//') === 0) { + result = url; + } // if baseUrl doesn't end in slash and url doesn't start with slash, then add a slash inbetween + else if (this.baseUrl.length && this.baseUrl.lastIndexOf('/') !== this.baseUrl.length - 1 && url.charAt(0) !== '/') { + result = this.baseUrl + "/" + url; + } else { + result = this.baseUrl + url; + } // if we need to add a default querystring, there is a bit more work + + + if (this.defaultQueryString) { + var hash = rgxExtractUrlHash.exec(result)[0]; + result = result.substr(0, result.length - hash.length); + + if (result.indexOf('?') !== -1) { + result += "&" + this.defaultQueryString; + } else { + result += "?" + this.defaultQueryString; + } + + result += hash; + } + + return result; + } + /** + * Loads a single resource. + * + * @private + * @param {Resource} resource - The resource to load. + * @param {function} dequeue - The function to call when we need to dequeue this item. + */ + ; + + _proto._loadResource = function _loadResource(resource, dequeue) { + var _this2 = this; + + resource._dequeue = dequeue; // run before middleware + + eachSeries(this._beforeMiddleware, function (fn, next) { + fn.call(_this2, resource, function () { + // if the before middleware marks the resource as complete, + // break and don't process any more before middleware + next(resource.isComplete ? {} : null); + }); + }, function () { + if (resource.isComplete) { + _this2._onLoad(resource); + } else { + resource._onLoadBinding = resource.onComplete.once(_this2._onLoad, _this2); + resource.load(); + } + }, true); + } + /** + * Called once loading has started. + * + * @private + */ + ; + + _proto._onStart = function _onStart() { + this.progress = 0; + this.loading = true; + this.onStart.dispatch(this); + } + /** + * Called once each resource has loaded. + * + * @private + */ + ; + + _proto._onComplete = function _onComplete() { + this.progress = MAX_PROGRESS; + this.loading = false; + this.onComplete.dispatch(this, this.resources); + } + /** + * Called each time a resources is loaded. + * + * @private + * @param {Resource} resource - The resource that was loaded + */ + ; + + _proto._onLoad = function _onLoad(resource) { + var _this3 = this; + + resource._onLoadBinding = null; // remove this resource from the async queue, and add it to our list of resources that are being parsed + + this._resourcesParsing.push(resource); + + resource._dequeue(); // run all the after middleware for this resource + + + eachSeries(this._afterMiddleware, function (fn, next) { + fn.call(_this3, resource, next); + }, function () { + resource.onAfterMiddleware.dispatch(resource); + _this3.progress = Math.min(MAX_PROGRESS, _this3.progress + resource.progressChunk); + + _this3.onProgress.dispatch(_this3, resource); + + if (resource.error) { + _this3.onError.dispatch(resource.error, _this3, resource); + } else { + _this3.onLoad.dispatch(_this3, resource); + } + + _this3._resourcesParsing.splice(_this3._resourcesParsing.indexOf(resource), 1); // do completion check + + + if (_this3._queue.idle() && _this3._resourcesParsing.length === 0) { + _this3._onComplete(); + } + }, true); + }; + + _createClass(Loader, [{ + key: "concurrency", + get: function get() { + return this._queue.concurrency; + } // eslint-disable-next-line require-jsdoc + , + set: function set(concurrency) { + this._queue.concurrency = concurrency; + } + }]); + + return Loader; + }(); + /** + * A default array of middleware to run before loading each resource. + * Each of these middlewares are added to any new Loader instances when they are created. + * + * @private + * @member {function[]} + */ + + + Loader._defaultBeforeMiddleware = []; + /** + * A default array of middleware to run after loading each resource. + * Each of these middlewares are added to any new Loader instances when they are created. + * + * @private + * @member {function[]} + */ + + Loader._defaultAfterMiddleware = []; + /** + * Sets up a middleware function that will run *before* the + * resource is loaded. + * + * @static + * @param {function} fn - The middleware function to register. + * @return {Loader} Returns itself. + */ + + Loader.pre = function LoaderPreStatic(fn) { + Loader._defaultBeforeMiddleware.push(fn); + + return Loader; + }; + /** + * Sets up a middleware function that will run *after* the + * resource is loaded. + * + * @static + * @param {function} fn - The middleware function to register. + * @return {Loader} Returns itself. + */ + + + Loader.use = function LoaderUseStatic(fn) { + Loader._defaultAfterMiddleware.push(fn); + + return Loader; + }; + + /*! + * @pixi/loaders - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/loaders is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Loader plugin for handling Texture resources. + * @class + * @memberof PIXI + * @implements PIXI.ILoaderPlugin + */ + var TextureLoader = function TextureLoader () {}; + + TextureLoader.use = function use (resource, next) + { + // create a new texture if the data is an Image object + if (resource.data && resource.type === Resource$1.TYPE.IMAGE) + { + resource.texture = Texture.fromLoader( + resource.data, + resource.url, + resource.name + ); + } + next(); + }; + + /** + * The new loader, extends Resource Loader by Chad Engler: https://github.com/englercj/resource-loader + * + * ```js + * const loader = PIXI.Loader.shared; // PixiJS exposes a premade instance for you to use. + * //or + * const loader = new PIXI.Loader(); // you can also create your own if you want + * + * const sprites = {}; + * + * // Chainable `add` to enqueue a resource + * loader.add('bunny', 'data/bunny.png') + * .add('spaceship', 'assets/spritesheet.json'); + * loader.add('scoreFont', 'assets/score.fnt'); + * + * // Chainable `pre` to add a middleware that runs for each resource, *before* loading that resource. + * // This is useful to implement custom caching modules (using filesystem, indexeddb, memory, etc). + * loader.pre(cachingMiddleware); + * + * // Chainable `use` to add a middleware that runs for each resource, *after* loading that resource. + * // This is useful to implement custom parsing modules (like spritesheet parsers, spine parser, etc). + * loader.use(parsingMiddleware); + * + * // The `load` method loads the queue of resources, and calls the passed in callback called once all + * // resources have loaded. + * loader.load((loader, resources) => { + * // resources is an object where the key is the name of the resource loaded and the value is the resource object. + * // They have a couple default properties: + * // - `url`: The URL that the resource was loaded from + * // - `error`: The error that happened when trying to load (if any) + * // - `data`: The raw data that was loaded + * // also may contain other properties based on the middleware that runs. + * sprites.bunny = new PIXI.TilingSprite(resources.bunny.texture); + * sprites.spaceship = new PIXI.TilingSprite(resources.spaceship.texture); + * sprites.scoreFont = new PIXI.TilingSprite(resources.scoreFont.texture); + * }); + * + * // throughout the process multiple signals can be dispatched. + * loader.onProgress.add(() => {}); // called once per loaded/errored file + * loader.onError.add(() => {}); // called once per errored file + * loader.onLoad.add(() => {}); // called once per loaded file + * loader.onComplete.add(() => {}); // called once when the queued resources all load. + * ``` + * + * @see https://github.com/englercj/resource-loader + * + * @class Loader + * @memberof PIXI + * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader. + * @param {number} [concurrency=10] - The number of resources to load concurrently. + */ + var Loader$1 = /*@__PURE__*/(function (ResourceLoader) { + function Loader(baseUrl, concurrency) + { + var this$1 = this; + + ResourceLoader.call(this, baseUrl, concurrency); + eventemitter3.call(this); + + for (var i = 0; i < Loader._plugins.length; ++i) + { + var plugin = Loader._plugins[i]; + var pre = plugin.pre; + var use = plugin.use; + + if (pre) + { + this.pre(pre); + } + + if (use) + { + this.use(use); + } + } + + // Compat layer, translate the new v2 signals into old v1 events. + this.onStart.add(function (l) { return this$1.emit('start', l); }); + this.onProgress.add(function (l, r) { return this$1.emit('progress', l, r); }); + this.onError.add(function (e, l, r) { return this$1.emit('error', e, l, r); }); + this.onLoad.add(function (l, r) { return this$1.emit('load', l, r); }); + this.onComplete.add(function (l, r) { return this$1.emit('complete', l, r); }); + + /** + * If this loader cannot be destroyed. + * @member {boolean} + * @default false + * @private + */ + this._protected = false; + } + + if ( ResourceLoader ) { Loader.__proto__ = ResourceLoader; } + Loader.prototype = Object.create( ResourceLoader && ResourceLoader.prototype ); + Loader.prototype.constructor = Loader; + + var staticAccessors = { shared: { configurable: true } }; + + /** + * Destroy the loader, removes references. + * @private + */ + Loader.prototype.destroy = function destroy () + { + if (!this._protected) + { + this.removeAllListeners(); + this.reset(); + } + }; + + /** + * A premade instance of the loader that can be used to load resources. + * @name shared + * @type {PIXI.Loader} + * @static + * @memberof PIXI.Loader + */ + staticAccessors.shared.get = function () + { + var shared = Loader._shared; + + if (!shared) + { + shared = new Loader(); + shared._protected = true; + Loader._shared = shared; + } + + return shared; + }; + + Object.defineProperties( Loader, staticAccessors ); + + return Loader; + }(Loader)); + + // Copy EE3 prototype (mixin) + Object.assign(Loader$1.prototype, eventemitter3.prototype); + + /** + * Collection of all installed `use` middleware for Loader. + * + * @static + * @member {Array} _plugins + * @memberof PIXI.Loader + * @private + */ + Loader$1._plugins = []; + + /** + * Adds a Loader plugin for the global shared loader and all + * new Loader instances created. + * + * @static + * @method registerPlugin + * @memberof PIXI.Loader + * @param {PIXI.ILoaderPlugin} plugin - The plugin to add + * @return {PIXI.Loader} Reference to PIXI.Loader for chaining + */ + Loader$1.registerPlugin = function registerPlugin(plugin) + { + Loader$1._plugins.push(plugin); + + if (plugin.add) + { + plugin.add(); + } + + return Loader$1; + }; + + // parse any blob into more usable objects (e.g. Image) + Loader$1.registerPlugin({ use: index$1.parsing }); + + // parse any Image objects into textures + Loader$1.registerPlugin(TextureLoader); + + /** + * Plugin to be installed for handling specific Loader resources. + * + * @memberof PIXI + * @typedef ILoaderPlugin + * @property {function} [add] - Function to call immediate after registering plugin. + * @property {PIXI.Loader.loaderMiddleware} [pre] - Middleware function to run before load, the + * arguments for this are `(resource, next)` + * @property {PIXI.Loader.loaderMiddleware} [use] - Middleware function to run after load, the + * arguments for this are `(resource, next)` + */ + + /** + * @memberof PIXI.Loader + * @callback loaderMiddleware + * @param {PIXI.LoaderResource} resource + * @param {function} next + */ + + /** + * @memberof PIXI.Loader# + * @member {object} onStart + */ + + /** + * @memberof PIXI.Loader# + * @member {object} onProgress + */ + + /** + * @memberof PIXI.Loader# + * @member {object} onError + */ + + /** + * @memberof PIXI.Loader# + * @member {object} onLoad + */ + + /** + * @memberof PIXI.Loader# + * @member {object} onComplete + */ + + /** + * Application plugin for supporting loader option. Installing the LoaderPlugin + * is not necessary if using **pixi.js** or **pixi.js-legacy**. + * @example + * import {AppLoaderPlugin} from '@pixi/loaders'; + * import {Application} from '@pixi/app'; + * Application.registerPlugin(AppLoaderPlugin); + * @class + * @memberof PIXI + */ + var AppLoaderPlugin = function AppLoaderPlugin () {}; + + AppLoaderPlugin.init = function init (options) + { + options = Object.assign({ + sharedLoader: false, + }, options); + + /** + * Loader instance to help with asset loading. + * @name PIXI.Application#loader + * @type {PIXI.Loader} + * @readonly + */ + this.loader = options.sharedLoader ? Loader$1.shared : new Loader$1(); + }; + + /** + * Called when application destroyed + * @private + */ + AppLoaderPlugin.destroy = function destroy () + { + if (this.loader) + { + this.loader.destroy(); + this.loader = null; + } + }; + + /** + * Reference to **{@link https://github.com/englercj/resource-loader + * resource-loader}**'s Resource class. + * @see http://englercj.github.io/resource-loader/Resource.html + * @class LoaderResource + * @memberof PIXI + */ + var LoaderResource = Resource$1; + + /*! + * @pixi/particles - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/particles is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * The ParticleContainer class is a really fast version of the Container built solely for speed, + * so use when you need a lot of sprites or particles. + * + * The tradeoff of the ParticleContainer is that most advanced functionality will not work. + * ParticleContainer implements the basic object transform (position, scale, rotation) + * and some advanced functionality like tint (as of v4.5.6). + * + * Other more advanced functionality like masking, children, filters, etc will not work on sprites in this batch. + * + * It's extremely easy to use: + * ```js + * let container = new ParticleContainer(); + * + * for (let i = 0; i < 100; ++i) + * { + * let sprite = PIXI.Sprite.from("myImage.png"); + * container.addChild(sprite); + * } + * ``` + * + * And here you have a hundred sprites that will be rendered at the speed of light. + * + * @class + * @extends PIXI.Container + * @memberof PIXI + */ + var ParticleContainer = /*@__PURE__*/(function (Container) { + function ParticleContainer(maxSize, properties, batchSize, autoResize) + { + if ( maxSize === void 0 ) { maxSize = 1500; } + if ( batchSize === void 0 ) { batchSize = 16384; } + if ( autoResize === void 0 ) { autoResize = false; } + + Container.call(this); + + // Making sure the batch size is valid + // 65535 is max vertex index in the index buffer (see ParticleRenderer) + // so max number of particles is 65536 / 4 = 16384 + var maxBatchSize = 16384; + + if (batchSize > maxBatchSize) + { + batchSize = maxBatchSize; + } + + /** + * Set properties to be dynamic (true) / static (false) + * + * @member {boolean[]} + * @private + */ + this._properties = [false, true, false, false, false]; + + /** + * @member {number} + * @private + */ + this._maxSize = maxSize; + + /** + * @member {number} + * @private + */ + this._batchSize = batchSize; + + /** + * @member {Array} + * @private + */ + this._buffers = null; + + /** + * for every batch stores _updateID corresponding to the last change in that batch + * @member {number[]} + * @private + */ + this._bufferUpdateIDs = []; + + /** + * when child inserted, removed or changes position this number goes up + * @member {number[]} + * @private + */ + this._updateID = 0; + + /** + * @member {boolean} + * + */ + this.interactiveChildren = false; + + /** + * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL` + * to reset the blend mode. + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL + * @see PIXI.BLEND_MODES + */ + this.blendMode = exports.BLEND_MODES.NORMAL; + + /** + * If true, container allocates more batches in case there are more than `maxSize` particles. + * @member {boolean} + * @default false + */ + this.autoResize = autoResize; + + /** + * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. + * Advantages can include sharper image quality (like text) and faster rendering on canvas. + * The main disadvantage is movement of objects may appear less smooth. + * Default to true here as performance is usually the priority for particles. + * + * @member {boolean} + * @default true + */ + this.roundPixels = true; + + /** + * The texture used to render the children. + * + * @readonly + * @member {PIXI.BaseTexture} + */ + this.baseTexture = null; + + this.setProperties(properties); + + /** + * The tint applied to the container. + * This is a hex value. A value of 0xFFFFFF will remove any tint effect. + * + * @private + * @member {number} + * @default 0xFFFFFF + */ + this._tint = 0; + this.tintRgb = new Float32Array(4); + this.tint = 0xFFFFFF; + } + + if ( Container ) { ParticleContainer.__proto__ = Container; } + ParticleContainer.prototype = Object.create( Container && Container.prototype ); + ParticleContainer.prototype.constructor = ParticleContainer; + + var prototypeAccessors = { tint: { configurable: true } }; + + /** + * Sets the private properties array to dynamic / static based on the passed properties object + * + * @param {object} properties - The properties to be uploaded + */ + ParticleContainer.prototype.setProperties = function setProperties (properties) + { + if (properties) + { + this._properties[0] = 'vertices' in properties || 'scale' in properties + ? !!properties.vertices || !!properties.scale : this._properties[0]; + this._properties[1] = 'position' in properties ? !!properties.position : this._properties[1]; + this._properties[2] = 'rotation' in properties ? !!properties.rotation : this._properties[2]; + this._properties[3] = 'uvs' in properties ? !!properties.uvs : this._properties[3]; + this._properties[4] = 'tint' in properties || 'alpha' in properties + ? !!properties.tint || !!properties.alpha : this._properties[4]; + } + }; + + /** + * Updates the object transform for rendering + * + * @private + */ + ParticleContainer.prototype.updateTransform = function updateTransform () + { + // TODO don't need to! + this.displayObjectUpdateTransform(); + // PIXI.Container.prototype.updateTransform.call( this ); + }; + + /** + * The tint applied to the container. This is a hex value. + * A value of 0xFFFFFF will remove any tint effect. + ** IMPORTANT: This is a WebGL only feature and will be ignored by the canvas renderer. + * @member {number} + * @default 0xFFFFFF + */ + prototypeAccessors.tint.get = function () + { + return this._tint; + }; + + prototypeAccessors.tint.set = function (value) // eslint-disable-line require-jsdoc + { + this._tint = value; + hex2rgb(value, this.tintRgb); + }; + + /** + * Renders the container using the WebGL renderer + * + * @private + * @param {PIXI.Renderer} renderer - The webgl renderer + */ + ParticleContainer.prototype.render = function render (renderer) + { + var this$1 = this; + + if (!this.visible || this.worldAlpha <= 0 || !this.children.length || !this.renderable) + { + return; + } + + if (!this.baseTexture) + { + this.baseTexture = this.children[0]._texture.baseTexture; + if (!this.baseTexture.valid) + { + this.baseTexture.once('update', function () { return this$1.onChildrenChange(0); }); + } + } + + renderer.batch.setObjectRenderer(renderer.plugins.particle); + renderer.plugins.particle.render(this); + }; + + /** + * Set the flag that static data should be updated to true + * + * @private + * @param {number} smallestChildIndex - The smallest child index + */ + ParticleContainer.prototype.onChildrenChange = function onChildrenChange (smallestChildIndex) + { + var bufferIndex = Math.floor(smallestChildIndex / this._batchSize); + + while (this._bufferUpdateIDs.length < bufferIndex) + { + this._bufferUpdateIDs.push(0); + } + this._bufferUpdateIDs[bufferIndex] = ++this._updateID; + }; + + ParticleContainer.prototype.dispose = function dispose () + { + if (this._buffers) + { + for (var i = 0; i < this._buffers.length; ++i) + { + this._buffers[i].destroy(); + } + + this._buffers = null; + } + }; + + /** + * Destroys the container + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their + * destroy method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + ParticleContainer.prototype.destroy = function destroy (options) + { + Container.prototype.destroy.call(this, options); + + this.dispose(); + + this._properties = null; + this._buffers = null; + this._bufferUpdateIDs = null; + }; + + Object.defineProperties( ParticleContainer.prototype, prototypeAccessors ); + + return ParticleContainer; + }(Container)); + + /** + * @author Mat Groves + * + * Big thanks to the very clever Matt DesLauriers https://github.com/mattdesl/ + * for creating the original PixiJS version! + * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that + * they now share 4 bytes on the vertex buffer + * + * Heavily inspired by LibGDX's ParticleBuffer: + * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleBuffer.java + */ + + /** + * The particle buffer manages the static and dynamic buffers for a particle container. + * + * @class + * @private + * @memberof PIXI + */ + var ParticleBuffer = function ParticleBuffer(properties, dynamicPropertyFlags, size) + { + this.geometry = new Geometry(); + + this.indexBuffer = null; + + /** + * The number of particles the buffer can hold + * + * @private + * @member {number} + */ + this.size = size; + + /** + * A list of the properties that are dynamic. + * + * @private + * @member {object[]} + */ + this.dynamicProperties = []; + + /** + * A list of the properties that are static. + * + * @private + * @member {object[]} + */ + this.staticProperties = []; + + for (var i = 0; i < properties.length; ++i) + { + var property = properties[i]; + + // Make copy of properties object so that when we edit the offset it doesn't + // change all other instances of the object literal + property = { + attributeName: property.attributeName, + size: property.size, + uploadFunction: property.uploadFunction, + type: property.type || exports.TYPES.FLOAT, + offset: property.offset, + }; + + if (dynamicPropertyFlags[i]) + { + this.dynamicProperties.push(property); + } + else + { + this.staticProperties.push(property); + } + } + + this.staticStride = 0; + this.staticBuffer = null; + this.staticData = null; + this.staticDataUint32 = null; + + this.dynamicStride = 0; + this.dynamicBuffer = null; + this.dynamicData = null; + this.dynamicDataUint32 = null; + + this._updateID = 0; + + this.initBuffers(); + }; + + /** + * Sets up the renderer context and necessary buffers. + * + * @private + */ + ParticleBuffer.prototype.initBuffers = function initBuffers () + { + var geometry = this.geometry; + + var dynamicOffset = 0; + + /** + * Holds the indices of the geometry (quads) to draw + * + * @member {Uint16Array} + * @private + */ + this.indexBuffer = new Buffer(createIndicesForQuads(this.size), true, true); + geometry.addIndex(this.indexBuffer); + + this.dynamicStride = 0; + + for (var i = 0; i < this.dynamicProperties.length; ++i) + { + var property = this.dynamicProperties[i]; + + property.offset = dynamicOffset; + dynamicOffset += property.size; + this.dynamicStride += property.size; + } + + var dynBuffer = new ArrayBuffer(this.size * this.dynamicStride * 4 * 4); + + this.dynamicData = new Float32Array(dynBuffer); + this.dynamicDataUint32 = new Uint32Array(dynBuffer); + this.dynamicBuffer = new Buffer(this.dynamicData, false, false); + + // static // + var staticOffset = 0; + + this.staticStride = 0; + + for (var i$1 = 0; i$1 < this.staticProperties.length; ++i$1) + { + var property$1 = this.staticProperties[i$1]; + + property$1.offset = staticOffset; + staticOffset += property$1.size; + this.staticStride += property$1.size; + } + + var statBuffer = new ArrayBuffer(this.size * this.staticStride * 4 * 4); + + this.staticData = new Float32Array(statBuffer); + this.staticDataUint32 = new Uint32Array(statBuffer); + this.staticBuffer = new Buffer(this.staticData, true, false); + + for (var i$2 = 0; i$2 < this.dynamicProperties.length; ++i$2) + { + var property$2 = this.dynamicProperties[i$2]; + + geometry.addAttribute( + property$2.attributeName, + this.dynamicBuffer, + 0, + property$2.type === exports.TYPES.UNSIGNED_BYTE, + property$2.type, + this.dynamicStride * 4, + property$2.offset * 4 + ); + } + + for (var i$3 = 0; i$3 < this.staticProperties.length; ++i$3) + { + var property$3 = this.staticProperties[i$3]; + + geometry.addAttribute( + property$3.attributeName, + this.staticBuffer, + 0, + property$3.type === exports.TYPES.UNSIGNED_BYTE, + property$3.type, + this.staticStride * 4, + property$3.offset * 4 + ); + } + }; + + /** + * Uploads the dynamic properties. + * + * @private + * @param {PIXI.DisplayObject[]} children - The children to upload. + * @param {number} startIndex - The index to start at. + * @param {number} amount - The number to upload. + */ + ParticleBuffer.prototype.uploadDynamic = function uploadDynamic (children, startIndex, amount) + { + for (var i = 0; i < this.dynamicProperties.length; i++) + { + var property = this.dynamicProperties[i]; + + property.uploadFunction(children, startIndex, amount, + property.type === exports.TYPES.UNSIGNED_BYTE ? this.dynamicDataUint32 : this.dynamicData, + this.dynamicStride, property.offset); + } + + this.dynamicBuffer._updateID++; + }; + + /** + * Uploads the static properties. + * + * @private + * @param {PIXI.DisplayObject[]} children - The children to upload. + * @param {number} startIndex - The index to start at. + * @param {number} amount - The number to upload. + */ + ParticleBuffer.prototype.uploadStatic = function uploadStatic (children, startIndex, amount) + { + for (var i = 0; i < this.staticProperties.length; i++) + { + var property = this.staticProperties[i]; + + property.uploadFunction(children, startIndex, amount, + property.type === exports.TYPES.UNSIGNED_BYTE ? this.staticDataUint32 : this.staticData, + this.staticStride, property.offset); + } + + this.staticBuffer._updateID++; + }; + + /** + * Destroys the ParticleBuffer. + * + * @private + */ + ParticleBuffer.prototype.destroy = function destroy () + { + this.indexBuffer = null; + + this.dynamicProperties = null; + // this.dynamicBuffer.destroy(); + this.dynamicBuffer = null; + this.dynamicData = null; + this.dynamicDataUint32 = null; + + this.staticProperties = null; + // this.staticBuffer.destroy(); + this.staticBuffer = null; + this.staticData = null; + this.staticDataUint32 = null; + // all buffers are destroyed inside geometry + this.geometry.destroy(); + }; + + var vertex$1 = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n vec2 v = vec2(x, y);\n v = v + aPositionCoord;\n\n gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vColor = aColor * uColor;\n}\n"; + + var fragment$1 = "varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n gl_FragColor = color;\n}"; + + /** + * @author Mat Groves + * + * Big thanks to the very clever Matt DesLauriers https://github.com/mattdesl/ + * for creating the original PixiJS version! + * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they now + * share 4 bytes on the vertex buffer + * + * Heavily inspired by LibGDX's ParticleRenderer: + * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleRenderer.java + */ + + /** + * Renderer for Particles that is designer for speed over feature set. + * + * @class + * @memberof PIXI + */ + var ParticleRenderer = /*@__PURE__*/(function (ObjectRenderer) { + function ParticleRenderer(renderer) + { + ObjectRenderer.call(this, renderer); + + // 65535 is max vertex index in the index buffer (see ParticleRenderer) + // so max number of particles is 65536 / 4 = 16384 + // and max number of element in the index buffer is 16384 * 6 = 98304 + // Creating a full index buffer, overhead is 98304 * 2 = 196Ko + // let numIndices = 98304; + + /** + * The default shader that is used if a sprite doesn't have a more specific one. + * + * @member {PIXI.Shader} + */ + this.shader = null; + + this.properties = null; + + this.tempMatrix = new Matrix(); + + this.properties = [ + // verticesData + { + attributeName: 'aVertexPosition', + size: 2, + uploadFunction: this.uploadVertices, + offset: 0, + }, + // positionData + { + attributeName: 'aPositionCoord', + size: 2, + uploadFunction: this.uploadPosition, + offset: 0, + }, + // rotationData + { + attributeName: 'aRotation', + size: 1, + uploadFunction: this.uploadRotation, + offset: 0, + }, + // uvsData + { + attributeName: 'aTextureCoord', + size: 2, + uploadFunction: this.uploadUvs, + offset: 0, + }, + // tintData + { + attributeName: 'aColor', + size: 1, + type: exports.TYPES.UNSIGNED_BYTE, + uploadFunction: this.uploadTint, + offset: 0, + } ]; + + this.shader = Shader.from(vertex$1, fragment$1, {}); + + /** + * The WebGL state in which this renderer will work. + * + * @member {PIXI.State} + * @readonly + */ + this.state = State.for2d(); + } + + if ( ObjectRenderer ) { ParticleRenderer.__proto__ = ObjectRenderer; } + ParticleRenderer.prototype = Object.create( ObjectRenderer && ObjectRenderer.prototype ); + ParticleRenderer.prototype.constructor = ParticleRenderer; + + /** + * Renders the particle container object. + * + * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer + */ + ParticleRenderer.prototype.render = function render (container) + { + var children = container.children; + var maxSize = container._maxSize; + var batchSize = container._batchSize; + var renderer = this.renderer; + var totalChildren = children.length; + + if (totalChildren === 0) + { + return; + } + else if (totalChildren > maxSize && !container.autoResize) + { + totalChildren = maxSize; + } + + var buffers = container._buffers; + + if (!buffers) + { + buffers = container._buffers = this.generateBuffers(container); + } + + var baseTexture = children[0]._texture.baseTexture; + + // if the uvs have not updated then no point rendering just yet! + this.state.blendMode = correctBlendMode(container.blendMode, baseTexture.alphaMode); + renderer.state.set(this.state); + + var gl = renderer.gl; + + var m = container.worldTransform.copyTo(this.tempMatrix); + + m.prepend(renderer.globalUniforms.uniforms.projectionMatrix); + + this.shader.uniforms.translationMatrix = m.toArray(true); + + this.shader.uniforms.uColor = premultiplyRgba(container.tintRgb, + container.worldAlpha, this.shader.uniforms.uColor, baseTexture.alphaMode); + + this.shader.uniforms.uSampler = baseTexture; + + this.renderer.shader.bind(this.shader); + + var updateStatic = false; + + // now lets upload and render the buffers.. + for (var i = 0, j = 0; i < totalChildren; i += batchSize, j += 1) + { + var amount = (totalChildren - i); + + if (amount > batchSize) + { + amount = batchSize; + } + + if (j >= buffers.length) + { + buffers.push(this._generateOneMoreBuffer(container)); + } + + var buffer = buffers[j]; + + // we always upload the dynamic + buffer.uploadDynamic(children, i, amount); + + var bid = container._bufferUpdateIDs[j] || 0; + + updateStatic = updateStatic || (buffer._updateID < bid); + // we only upload the static content when we have to! + if (updateStatic) + { + buffer._updateID = container._updateID; + buffer.uploadStatic(children, i, amount); + } + + // bind the buffer + renderer.geometry.bind(buffer.geometry); + gl.drawElements(gl.TRIANGLES, amount * 6, gl.UNSIGNED_SHORT, 0); + } + }; + + /** + * Creates one particle buffer for each child in the container we want to render and updates internal properties + * + * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer + * @return {PIXI.ParticleBuffer[]} The buffers + * @private + */ + ParticleRenderer.prototype.generateBuffers = function generateBuffers (container) + { + var buffers = []; + var size = container._maxSize; + var batchSize = container._batchSize; + var dynamicPropertyFlags = container._properties; + + for (var i = 0; i < size; i += batchSize) + { + buffers.push(new ParticleBuffer(this.properties, dynamicPropertyFlags, batchSize)); + } + + return buffers; + }; + + /** + * Creates one more particle buffer, because container has autoResize feature + * + * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer + * @return {PIXI.ParticleBuffer} generated buffer + * @private + */ + ParticleRenderer.prototype._generateOneMoreBuffer = function _generateOneMoreBuffer (container) + { + var batchSize = container._batchSize; + var dynamicPropertyFlags = container._properties; + + return new ParticleBuffer(this.properties, dynamicPropertyFlags, batchSize); + }; + + /** + * Uploads the vertices. + * + * @param {PIXI.DisplayObject[]} children - the array of display objects to render + * @param {number} startIndex - the index to start from in the children array + * @param {number} amount - the amount of children that will have their vertices uploaded + * @param {number[]} array - The vertices to upload. + * @param {number} stride - Stride to use for iteration. + * @param {number} offset - Offset to start at. + */ + ParticleRenderer.prototype.uploadVertices = function uploadVertices (children, startIndex, amount, array, stride, offset) + { + var w0 = 0; + var w1 = 0; + var h0 = 0; + var h1 = 0; + + for (var i = 0; i < amount; ++i) + { + var sprite = children[startIndex + i]; + var texture = sprite._texture; + var sx = sprite.scale.x; + var sy = sprite.scale.y; + var trim = texture.trim; + var orig = texture.orig; + + if (trim) + { + // if the sprite is trimmed and is not a tilingsprite then we need to add the + // extra space before transforming the sprite coords.. + w1 = trim.x - (sprite.anchor.x * orig.width); + w0 = w1 + trim.width; + + h1 = trim.y - (sprite.anchor.y * orig.height); + h0 = h1 + trim.height; + } + else + { + w0 = (orig.width) * (1 - sprite.anchor.x); + w1 = (orig.width) * -sprite.anchor.x; + + h0 = orig.height * (1 - sprite.anchor.y); + h1 = orig.height * -sprite.anchor.y; + } + + array[offset] = w1 * sx; + array[offset + 1] = h1 * sy; + + array[offset + stride] = w0 * sx; + array[offset + stride + 1] = h1 * sy; + + array[offset + (stride * 2)] = w0 * sx; + array[offset + (stride * 2) + 1] = h0 * sy; + + array[offset + (stride * 3)] = w1 * sx; + array[offset + (stride * 3) + 1] = h0 * sy; + + offset += stride * 4; + } + }; + + /** + * Uploads the position. + * + * @param {PIXI.DisplayObject[]} children - the array of display objects to render + * @param {number} startIndex - the index to start from in the children array + * @param {number} amount - the amount of children that will have their positions uploaded + * @param {number[]} array - The vertices to upload. + * @param {number} stride - Stride to use for iteration. + * @param {number} offset - Offset to start at. + */ + ParticleRenderer.prototype.uploadPosition = function uploadPosition (children, startIndex, amount, array, stride, offset) + { + for (var i = 0; i < amount; i++) + { + var spritePosition = children[startIndex + i].position; + + array[offset] = spritePosition.x; + array[offset + 1] = spritePosition.y; + + array[offset + stride] = spritePosition.x; + array[offset + stride + 1] = spritePosition.y; + + array[offset + (stride * 2)] = spritePosition.x; + array[offset + (stride * 2) + 1] = spritePosition.y; + + array[offset + (stride * 3)] = spritePosition.x; + array[offset + (stride * 3) + 1] = spritePosition.y; + + offset += stride * 4; + } + }; + + /** + * Uploads the rotiation. + * + * @param {PIXI.DisplayObject[]} children - the array of display objects to render + * @param {number} startIndex - the index to start from in the children array + * @param {number} amount - the amount of children that will have their rotation uploaded + * @param {number[]} array - The vertices to upload. + * @param {number} stride - Stride to use for iteration. + * @param {number} offset - Offset to start at. + */ + ParticleRenderer.prototype.uploadRotation = function uploadRotation (children, startIndex, amount, array, stride, offset) + { + for (var i = 0; i < amount; i++) + { + var spriteRotation = children[startIndex + i].rotation; + + array[offset] = spriteRotation; + array[offset + stride] = spriteRotation; + array[offset + (stride * 2)] = spriteRotation; + array[offset + (stride * 3)] = spriteRotation; + + offset += stride * 4; + } + }; + + /** + * Uploads the Uvs + * + * @param {PIXI.DisplayObject[]} children - the array of display objects to render + * @param {number} startIndex - the index to start from in the children array + * @param {number} amount - the amount of children that will have their rotation uploaded + * @param {number[]} array - The vertices to upload. + * @param {number} stride - Stride to use for iteration. + * @param {number} offset - Offset to start at. + */ + ParticleRenderer.prototype.uploadUvs = function uploadUvs (children, startIndex, amount, array, stride, offset) + { + for (var i = 0; i < amount; ++i) + { + var textureUvs = children[startIndex + i]._texture._uvs; + + if (textureUvs) + { + array[offset] = textureUvs.x0; + array[offset + 1] = textureUvs.y0; + + array[offset + stride] = textureUvs.x1; + array[offset + stride + 1] = textureUvs.y1; + + array[offset + (stride * 2)] = textureUvs.x2; + array[offset + (stride * 2) + 1] = textureUvs.y2; + + array[offset + (stride * 3)] = textureUvs.x3; + array[offset + (stride * 3) + 1] = textureUvs.y3; + + offset += stride * 4; + } + else + { + // TODO you know this can be easier! + array[offset] = 0; + array[offset + 1] = 0; + + array[offset + stride] = 0; + array[offset + stride + 1] = 0; + + array[offset + (stride * 2)] = 0; + array[offset + (stride * 2) + 1] = 0; + + array[offset + (stride * 3)] = 0; + array[offset + (stride * 3) + 1] = 0; + + offset += stride * 4; + } + } + }; + + /** + * Uploads the tint. + * + * @param {PIXI.DisplayObject[]} children - the array of display objects to render + * @param {number} startIndex - the index to start from in the children array + * @param {number} amount - the amount of children that will have their rotation uploaded + * @param {number[]} array - The vertices to upload. + * @param {number} stride - Stride to use for iteration. + * @param {number} offset - Offset to start at. + */ + ParticleRenderer.prototype.uploadTint = function uploadTint (children, startIndex, amount, array, stride, offset) + { + for (var i = 0; i < amount; ++i) + { + var sprite = children[startIndex + i]; + var premultiplied = sprite._texture.baseTexture.alphaMode > 0; + var alpha = sprite.alpha; + // we dont call extra function if alpha is 1.0, that's faster + var argb = alpha < 1.0 && premultiplied ? premultiplyTint(sprite._tintRGB, alpha) + : sprite._tintRGB + (alpha * 255 << 24); + + array[offset] = argb; + array[offset + stride] = argb; + array[offset + (stride * 2)] = argb; + array[offset + (stride * 3)] = argb; + + offset += stride * 4; + } + }; + + /** + * Destroys the ParticleRenderer. + */ + ParticleRenderer.prototype.destroy = function destroy () + { + ObjectRenderer.prototype.destroy.call(this); + + if (this.shader) + { + this.shader.destroy(); + this.shader = null; + } + + this.tempMatrix = null; + }; + + return ParticleRenderer; + }(ObjectRenderer)); + + /*! + * @pixi/graphics - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/graphics is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Graphics curves resolution settings. If `adaptive` flag is set to `true`, + * the resolution is calculated based on the curve's length to ensure better visual quality. + * Adaptive draw works with `bezierCurveTo` and `quadraticCurveTo`. + * + * @static + * @constant + * @memberof PIXI + * @name GRAPHICS_CURVES + * @type {object} + * @property {boolean} adaptive=false - flag indicating if the resolution should be adaptive + * @property {number} maxLength=10 - maximal length of a single segment of the curve (if adaptive = false, ignored) + * @property {number} minSegments=8 - minimal number of segments in the curve (if adaptive = false, ignored) + * @property {number} maxSegments=2048 - maximal number of segments in the curve (if adaptive = false, ignored) + */ + var GRAPHICS_CURVES = { + adaptive: true, + maxLength: 10, + minSegments: 8, + maxSegments: 2048, + _segmentsCount: function _segmentsCount(length, defaultSegments) + { + if ( defaultSegments === void 0 ) { defaultSegments = 20; } + + if (!this.adaptive || !length || isNaN(length)) + { + return defaultSegments; + } + + var result = Math.ceil(length / this.maxLength); + + if (result < this.minSegments) + { + result = this.minSegments; + } + else if (result > this.maxSegments) + { + result = this.maxSegments; + } + + return result; + }, + }; + + /** + * Fill style object for Graphics. + * + * @class + * @memberof PIXI + */ + var FillStyle = function FillStyle() + { + this.reset(); + }; + + /** + * Clones the object + * + * @return {PIXI.FillStyle} + */ + FillStyle.prototype.clone = function clone () + { + var obj = new FillStyle(); + + obj.color = this.color; + obj.alpha = this.alpha; + obj.texture = this.texture; + obj.matrix = this.matrix; + obj.visible = this.visible; + + return obj; + }; + + /** + * Reset + */ + FillStyle.prototype.reset = function reset () + { + /** + * The hex color value used when coloring the Graphics object. + * + * @member {number} + * @default 1 + */ + this.color = 0xFFFFFF; + + /** + * The alpha value used when filling the Graphics object. + * + * @member {number} + * @default 1 + */ + this.alpha = 1; + + /** + * The texture to be used for the fill. + * + * @member {string} + * @default 0 + */ + this.texture = Texture.WHITE; + + /** + * The transform aplpied to the texture. + * + * @member {string} + * @default 0 + */ + this.matrix = null; + + /** + * If the current fill is visible. + * + * @member {boolean} + * @default false + */ + this.visible = false; + }; + + /** + * Destroy and don't use after this + */ + FillStyle.prototype.destroy = function destroy () + { + this.texture = null; + this.matrix = null; + }; + + /** + * Builds a polygon to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape + * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines + */ + var buildPoly = { + + build: function build(graphicsData) + { + graphicsData.points = graphicsData.shape.points.slice(); + }, + + triangulate: function triangulate(graphicsData, graphicsGeometry) + { + var points = graphicsData.points; + var holes = graphicsData.holes; + var verts = graphicsGeometry.points; + var indices = graphicsGeometry.indices; + + if (points.length >= 6) + { + var holeArray = []; + // Process holes.. + + for (var i = 0; i < holes.length; i++) + { + var hole = holes[i]; + + holeArray.push(points.length / 2); + points = points.concat(hole.points); + } + + // sort color + var triangles = earcut_1(points, holeArray, 2); + + if (!triangles) + { + return; + } + + var vertPos = verts.length / 2; + + for (var i$1 = 0; i$1 < triangles.length; i$1 += 3) + { + indices.push(triangles[i$1] + vertPos); + indices.push(triangles[i$1 + 1] + vertPos); + indices.push(triangles[i$1 + 2] + vertPos); + } + + for (var i$2 = 0; i$2 < points.length; i$2++) + { + verts.push(points[i$2]); + } + } + }, + }; + + /** + * Builds a circle to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object to draw + * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape + * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines + */ + var buildCircle = { + + build: function build(graphicsData) + { + // need to convert points to a nice regular data + var circleData = graphicsData.shape; + var points = graphicsData.points; + var x = circleData.x; + var y = circleData.y; + var width; + var height; + + points.length = 0; + + // TODO - bit hacky?? + if (graphicsData.type === exports.SHAPES.CIRC) + { + width = circleData.radius; + height = circleData.radius; + } + else + { + width = circleData.width; + height = circleData.height; + } + + if (width === 0 || height === 0) + { + return; + } + + var totalSegs = Math.floor(30 * Math.sqrt(circleData.radius)) + || Math.floor(15 * Math.sqrt(circleData.width + circleData.height)); + + totalSegs /= 2.3; + + var seg = (Math.PI * 2) / totalSegs; + + for (var i = 0; i < totalSegs - 0.5; i++) + { + points.push( + x + (Math.sin(-seg * i) * width), + y + (Math.cos(-seg * i) * height) + ); + } + + points.push(points[0], points[1]); + }, + + triangulate: function triangulate(graphicsData, graphicsGeometry) + { + var points = graphicsData.points; + var verts = graphicsGeometry.points; + var indices = graphicsGeometry.indices; + + var vertPos = verts.length / 2; + var center = vertPos; + + var circle = graphicsData.shape; + var matrix = graphicsData.matrix; + var x = circle.x; + var y = circle.y; + + // Push center (special point) + verts.push( + graphicsData.matrix ? (matrix.a * x) + (matrix.c * y) + matrix.tx : x, + graphicsData.matrix ? (matrix.b * x) + (matrix.d * y) + matrix.ty : y); + + for (var i = 0; i < points.length; i += 2) + { + verts.push(points[i], points[i + 1]); + + // add some uvs + indices.push(vertPos++, center, vertPos); + } + }, + }; + + /** + * Builds a rectangle to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape + * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines + */ + var buildRectangle = { + + build: function build(graphicsData) + { + // --- // + // need to convert points to a nice regular data + // + var rectData = graphicsData.shape; + var x = rectData.x; + var y = rectData.y; + var width = rectData.width; + var height = rectData.height; + + var points = graphicsData.points; + + points.length = 0; + + points.push(x, y, + x + width, y, + x + width, y + height, + x, y + height); + }, + + triangulate: function triangulate(graphicsData, graphicsGeometry) + { + var points = graphicsData.points; + var verts = graphicsGeometry.points; + + var vertPos = verts.length / 2; + + verts.push(points[0], points[1], + points[2], points[3], + points[6], points[7], + points[4], points[5]); + + graphicsGeometry.indices.push(vertPos, vertPos + 1, vertPos + 2, + vertPos + 1, vertPos + 2, vertPos + 3); + }, + }; + + /** + * Builds a rounded rectangle to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape + * @param {object} webGLDataNativeLines - an object containing all the WebGL-specific information to create nativeLines + */ + var buildRoundedRectangle = { + + build: function build(graphicsData) + { + var rrectData = graphicsData.shape; + var points = graphicsData.points; + var x = rrectData.x; + var y = rrectData.y; + var width = rrectData.width; + var height = rrectData.height; + + // Don't allow negative radius or greater than half the smallest width + var radius = Math.max(0, Math.min(rrectData.radius, Math.min(width, height) / 2)); + + points.length = 0; + + // No radius, do a simple rectangle + if (!radius) + { + points.push(x, y, + x + width, y, + x + width, y + height, + x, y + height); + } + else + { + quadraticBezierCurve(x, y + radius, + x, y, + x + radius, y, + points); + quadraticBezierCurve(x + width - radius, + y, x + width, y, + x + width, y + radius, + points); + quadraticBezierCurve(x + width, y + height - radius, + x + width, y + height, + x + width - radius, y + height, + points); + quadraticBezierCurve(x + radius, y + height, + x, y + height, + x, y + height - radius, + points); + } + + // this tiny number deals with the issue that occurs when points overlap and earcut fails to triangulate the item. + // TODO - fix this properly, this is not very elegant.. but it works for now. + }, + + triangulate: function triangulate(graphicsData, graphicsGeometry) + { + var points = graphicsData.points; + + var verts = graphicsGeometry.points; + var indices = graphicsGeometry.indices; + + var vecPos = verts.length / 2; + + var triangles = earcut_1(points, null, 2); + + for (var i = 0, j = triangles.length; i < j; i += 3) + { + indices.push(triangles[i] + vecPos); + // indices.push(triangles[i] + vecPos); + indices.push(triangles[i + 1] + vecPos); + // indices.push(triangles[i + 2] + vecPos); + indices.push(triangles[i + 2] + vecPos); + } + + for (var i$1 = 0, j$1 = points.length; i$1 < j$1; i$1++) + { + verts.push(points[i$1], points[++i$1]); + } + }, + }; + + /** + * Calculate a single point for a quadratic bezier curve. + * Utility function used by quadraticBezierCurve. + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {number} n1 - first number + * @param {number} n2 - second number + * @param {number} perc - percentage + * @return {number} the result + * + */ + function getPt(n1, n2, perc) + { + var diff = n2 - n1; + + return n1 + (diff * perc); + } + + /** + * Calculate the points for a quadratic bezier curve. (helper function..) + * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {number} fromX - Origin point x + * @param {number} fromY - Origin point x + * @param {number} cpX - Control point x + * @param {number} cpY - Control point y + * @param {number} toX - Destination point x + * @param {number} toY - Destination point y + * @param {number[]} [out=[]] - The output array to add points into. If not passed, a new array is created. + * @return {number[]} an array of points + */ + function quadraticBezierCurve(fromX, fromY, cpX, cpY, toX, toY, out) + { + if ( out === void 0 ) { out = []; } + + var n = 20; + var points = out; + + var xa = 0; + var ya = 0; + var xb = 0; + var yb = 0; + var x = 0; + var y = 0; + + for (var i = 0, j = 0; i <= n; ++i) + { + j = i / n; + + // The Green Line + xa = getPt(fromX, cpX, j); + ya = getPt(fromY, cpY, j); + xb = getPt(cpX, toX, j); + yb = getPt(cpY, toY, j); + + // The Black Dot + x = getPt(xa, xb, j); + y = getPt(ya, yb, j); + + points.push(x, y); + } + + return points; + } + + /** + * Builds a line to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output + */ + function buildLine(graphicsData, graphicsGeometry) + { + if (graphicsData.lineStyle.native) + { + buildNativeLine(graphicsData, graphicsGeometry); + } + else + { + buildNonNativeLine(graphicsData, graphicsGeometry); + } + } + + /** + * Builds a line to draw using the polygon method. + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output + */ + function buildNonNativeLine(graphicsData, graphicsGeometry) + { + var shape = graphicsData.shape; + var points = graphicsData.points || shape.points.slice(); + var eps = graphicsGeometry.closePointEps; + + if (points.length === 0) + { + return; + } + // if the line width is an odd number add 0.5 to align to a whole pixel + // commenting this out fixes #711 and #1620 + // if (graphicsData.lineWidth%2) + // { + // for (i = 0; i < points.length; i++) + // { + // points[i] += 0.5; + // } + // } + + var style = graphicsData.lineStyle; + + // get first and last point.. figure out the middle! + var firstPoint = new Point(points[0], points[1]); + var lastPoint = new Point(points[points.length - 2], points[points.length - 1]); + var closedShape = shape.type !== exports.SHAPES.POLY || shape.closeStroke; + var closedPath = Math.abs(firstPoint.x - lastPoint.x) < eps + && Math.abs(firstPoint.y - lastPoint.y) < eps; + + // if the first point is the last point - gonna have issues :) + if (closedShape) + { + // need to clone as we are going to slightly modify the shape.. + points = points.slice(); + + if (closedPath) + { + points.pop(); + points.pop(); + lastPoint.set(points[points.length - 2], points[points.length - 1]); + } + + var midPointX = lastPoint.x + ((firstPoint.x - lastPoint.x) * 0.5); + var midPointY = lastPoint.y + ((firstPoint.y - lastPoint.y) * 0.5); + + points.unshift(midPointX, midPointY); + points.push(midPointX, midPointY); + } + + var verts = graphicsGeometry.points; + var length = points.length / 2; + var indexCount = points.length; + var indexStart = verts.length / 2; + + // DRAW the Line + var width = style.width / 2; + + // sort color + var p1x = points[0]; + var p1y = points[1]; + var p2x = points[2]; + var p2y = points[3]; + var p3x = 0; + var p3y = 0; + + var perpx = -(p1y - p2y); + var perpy = p1x - p2x; + var perp2x = 0; + var perp2y = 0; + var perp3x = 0; + var perp3y = 0; + + var dist = Math.sqrt((perpx * perpx) + (perpy * perpy)); + + perpx /= dist; + perpy /= dist; + perpx *= width; + perpy *= width; + + var ratio = style.alignment;// 0.5; + var r1 = (1 - ratio) * 2; + var r2 = ratio * 2; + + // start + verts.push( + p1x - (perpx * r1), + p1y - (perpy * r1)); + + verts.push( + p1x + (perpx * r2), + p1y + (perpy * r2)); + + for (var i = 1; i < length - 1; ++i) + { + p1x = points[(i - 1) * 2]; + p1y = points[((i - 1) * 2) + 1]; + + p2x = points[i * 2]; + p2y = points[(i * 2) + 1]; + + p3x = points[(i + 1) * 2]; + p3y = points[((i + 1) * 2) + 1]; + + perpx = -(p1y - p2y); + perpy = p1x - p2x; + + dist = Math.sqrt((perpx * perpx) + (perpy * perpy)); + perpx /= dist; + perpy /= dist; + perpx *= width; + perpy *= width; + + perp2x = -(p2y - p3y); + perp2y = p2x - p3x; + + dist = Math.sqrt((perp2x * perp2x) + (perp2y * perp2y)); + perp2x /= dist; + perp2y /= dist; + perp2x *= width; + perp2y *= width; + + var a1 = (-perpy + p1y) - (-perpy + p2y); + var b1 = (-perpx + p2x) - (-perpx + p1x); + var c1 = ((-perpx + p1x) * (-perpy + p2y)) - ((-perpx + p2x) * (-perpy + p1y)); + var a2 = (-perp2y + p3y) - (-perp2y + p2y); + var b2 = (-perp2x + p2x) - (-perp2x + p3x); + var c2 = ((-perp2x + p3x) * (-perp2y + p2y)) - ((-perp2x + p2x) * (-perp2y + p3y)); + + var denom = (a1 * b2) - (a2 * b1); + + if (Math.abs(denom) < 0.1) + { + denom += 10.1; + verts.push( + p2x - (perpx * r1), + p2y - (perpy * r1)); + + verts.push( + p2x + (perpx * r2), + p2y + (perpy * r2)); + + continue; + } + + var px = ((b1 * c2) - (b2 * c1)) / denom; + var py = ((a2 * c1) - (a1 * c2)) / denom; + var pdist = ((px - p2x) * (px - p2x)) + ((py - p2y) * (py - p2y)); + + if (pdist > (196 * width * width)) + { + perp3x = perpx - perp2x; + perp3y = perpy - perp2y; + + dist = Math.sqrt((perp3x * perp3x) + (perp3y * perp3y)); + perp3x /= dist; + perp3y /= dist; + perp3x *= width; + perp3y *= width; + + verts.push(p2x - (perp3x * r1), p2y - (perp3y * r1)); + + verts.push(p2x + (perp3x * r2), p2y + (perp3y * r2)); + + verts.push(p2x - (perp3x * r2 * r1), p2y - (perp3y * r1)); + + indexCount++; + } + else + { + verts.push(p2x + ((px - p2x) * r1), p2y + ((py - p2y) * r1)); + + verts.push(p2x - ((px - p2x) * r2), p2y - ((py - p2y) * r2)); + } + } + + p1x = points[(length - 2) * 2]; + p1y = points[((length - 2) * 2) + 1]; + + p2x = points[(length - 1) * 2]; + p2y = points[((length - 1) * 2) + 1]; + + perpx = -(p1y - p2y); + perpy = p1x - p2x; + + dist = Math.sqrt((perpx * perpx) + (perpy * perpy)); + perpx /= dist; + perpy /= dist; + perpx *= width; + perpy *= width; + + verts.push(p2x - (perpx * r1), p2y - (perpy * r1)); + + verts.push(p2x + (perpx * r2), p2y + (perpy * r2)); + + var indices = graphicsGeometry.indices; + + // indices.push(indexStart); + + for (var i$1 = 0; i$1 < indexCount - 2; ++i$1) + { + indices.push(indexStart, indexStart + 1, indexStart + 2); + + indexStart++; + } + } + + /** + * Builds a line to draw using the gl.drawArrays(gl.LINES) method + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.GraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {PIXI.GraphicsGeometry} graphicsGeometry - Geometry where to append output + */ + function buildNativeLine(graphicsData, graphicsGeometry) + { + var i = 0; + + var shape = graphicsData.shape; + var points = graphicsData.points || shape.points; + var closedShape = shape.type !== exports.SHAPES.POLY || shape.closeStroke; + + if (points.length === 0) { return; } + + var verts = graphicsGeometry.points; + var indices = graphicsGeometry.indices; + var length = points.length / 2; + + var startIndex = verts.length / 2; + var currentIndex = startIndex; + + verts.push(points[0], points[1]); + + for (i = 1; i < length; i++) + { + verts.push(points[i * 2], points[(i * 2) + 1]); + indices.push(currentIndex, currentIndex + 1); + + currentIndex++; + } + + if (closedShape) + { + indices.push(currentIndex, startIndex); + } + } + + /** + * Builds a complex polygon to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.Graphics} graphicsData - The graphics object containing all the necessary properties + * @param {object} webGLData - an object containing all the WebGL-specific information to create this shape + */ + function buildComplexPoly(graphicsData, webGLData) + { + // TODO - no need to copy this as it gets turned into a Float32Array anyways.. + var points = graphicsData.points.slice(); + + if (points.length < 6) + { + return; + } + + // get first and last point.. figure out the middle! + var indices = webGLData.indices; + + webGLData.points = points; + webGLData.alpha = graphicsData.fillAlpha; + webGLData.color = hex2rgb(graphicsData.fillColor); + + // calculate the bounds.. + var minX = Infinity; + var maxX = -Infinity; + + var minY = Infinity; + var maxY = -Infinity; + + var x = 0; + var y = 0; + + // get size.. + for (var i = 0; i < points.length; i += 2) + { + x = points[i]; + y = points[i + 1]; + + minX = x < minX ? x : minX; + maxX = x > maxX ? x : maxX; + + minY = y < minY ? y : minY; + maxY = y > maxY ? y : maxY; + } + + // add a quad to the end cos there is no point making another buffer! + points.push(minX, minY, + maxX, minY, + maxX, maxY, + minX, maxY); + + // push a quad onto the end.. + + // TODO - this ain't needed! + var length = points.length / 2; + + for (var i$1 = 0; i$1 < length; i$1++) + { + indices.push(i$1); + } + } + + /** + * Calculate the points for a bezier curve and then draws it. + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @param {number} fromX - Starting point x + * @param {number} fromY - Starting point y + * @param {number} cpX - Control point x + * @param {number} cpY - Control point y + * @param {number} cpX2 - Second Control point x + * @param {number} cpY2 - Second Control point y + * @param {number} toX - Destination point x + * @param {number} toY - Destination point y + * @param {number} n - Number of segments approximating the bezier curve + * @param {number[]} [path=[]] - Path array to push points into + * @return {number[]} Array of points of the curve + */ + function bezierCurveTo(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, n, path) + { + if ( path === void 0 ) { path = []; } + + var dt = 0; + var dt2 = 0; + var dt3 = 0; + var t2 = 0; + var t3 = 0; + + path.push(fromX, fromY); + + for (var i = 1, j = 0; i <= n; ++i) + { + j = i / n; + + dt = (1 - j); + dt2 = dt * dt; + dt3 = dt2 * dt; + + t2 = j * j; + t3 = t2 * j; + + path.push( + (dt3 * fromX) + (3 * dt2 * j * cpX) + (3 * dt * t2 * cpX2) + (t3 * toX), + (dt3 * fromY) + (3 * dt2 * j * cpY) + (3 * dt * t2 * cpY2) + (t3 * toY) + ); + } + + return path; + } + + /** + * Draw a star shape with an arbitrary number of points. + * + * @class + * @extends PIXI.Polygon + * @memberof PIXI + * @param {number} x - Center X position of the star + * @param {number} y - Center Y position of the star + * @param {number} points - The number of points of the star, must be > 1 + * @param {number} radius - The outer radius of the star + * @param {number} [innerRadius] - The inner radius between points, default half `radius` + * @param {number} [rotation=0] - The rotation of the star in radians, where 0 is vertical + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + var Star = /*@__PURE__*/(function (Polygon) { + function Star(x, y, points, radius, innerRadius, rotation) + { + innerRadius = innerRadius || radius / 2; + + var startAngle = (-1 * Math.PI / 2) + rotation; + var len = points * 2; + var delta = PI_2 / len; + var polygon = []; + + for (var i = 0; i < len; i++) + { + var r = i % 2 ? innerRadius : radius; + var angle = (i * delta) + startAngle; + + polygon.push( + x + (r * Math.cos(angle)), + y + (r * Math.sin(angle)) + ); + } + + Polygon.call(this, polygon); + } + + if ( Polygon ) { Star.__proto__ = Polygon; } + Star.prototype = Object.create( Polygon && Polygon.prototype ); + Star.prototype.constructor = Star; + + return Star; + }(Polygon)); + + /** + * Utilities for arc curves + * @class + * @private + */ + var ArcUtils = function ArcUtils () {}; + + ArcUtils.curveTo = function curveTo (x1, y1, x2, y2, radius, points) + { + var fromX = points[points.length - 2]; + var fromY = points[points.length - 1]; + + var a1 = fromY - y1; + var b1 = fromX - x1; + var a2 = y2 - y1; + var b2 = x2 - x1; + var mm = Math.abs((a1 * b2) - (b1 * a2)); + + if (mm < 1.0e-8 || radius === 0) + { + if (points[points.length - 2] !== x1 || points[points.length - 1] !== y1) + { + points.push(x1, y1); + } + + return null; + } + + var dd = (a1 * a1) + (b1 * b1); + var cc = (a2 * a2) + (b2 * b2); + var tt = (a1 * a2) + (b1 * b2); + var k1 = radius * Math.sqrt(dd) / mm; + var k2 = radius * Math.sqrt(cc) / mm; + var j1 = k1 * tt / dd; + var j2 = k2 * tt / cc; + var cx = (k1 * b2) + (k2 * b1); + var cy = (k1 * a2) + (k2 * a1); + var px = b1 * (k2 + j1); + var py = a1 * (k2 + j1); + var qx = b2 * (k1 + j2); + var qy = a2 * (k1 + j2); + var startAngle = Math.atan2(py - cy, px - cx); + var endAngle = Math.atan2(qy - cy, qx - cx); + + return { + cx: (cx + x1), + cy: (cy + y1), + radius: radius, + startAngle: startAngle, + endAngle: endAngle, + anticlockwise: (b1 * a2 > b2 * a1), + }; + }; + + /** + * The arc method creates an arc/curve (used to create circles, or parts of circles). + * + * @private + * @param {number} startX - Start x location of arc + * @param {number} startY - Start y location of arc + * @param {number} cx - The x-coordinate of the center of the circle + * @param {number} cy - The y-coordinate of the center of the circle + * @param {number} radius - The radius of the circle + * @param {number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position + * of the arc's circle) + * @param {number} endAngle - The ending angle, in radians + * @param {boolean} anticlockwise - Specifies whether the drawing should be + * counter-clockwise or clockwise. False is default, and indicates clockwise, while true + * indicates counter-clockwise. + * @param {number} n - Number of segments + * @param {number[]} points - Collection of points to add to + */ + ArcUtils.arc = function arc (startX, startY, cx, cy, radius, startAngle, endAngle, anticlockwise, points) + { + var sweep = endAngle - startAngle; + var n = GRAPHICS_CURVES._segmentsCount( + Math.abs(sweep) * radius, + Math.ceil(Math.abs(sweep) / PI_2) * 40 + ); + + var theta = (sweep) / (n * 2); + var theta2 = theta * 2; + var cTheta = Math.cos(theta); + var sTheta = Math.sin(theta); + var segMinus = n - 1; + var remainder = (segMinus % 1) / segMinus; + + for (var i = 0; i <= segMinus; ++i) + { + var real = i + (remainder * i); + var angle = ((theta) + startAngle + (theta2 * real)); + var c = Math.cos(angle); + var s = -Math.sin(angle); + + points.push( + (((cTheta * c) + (sTheta * s)) * radius) + cx, + (((cTheta * -s) + (sTheta * c)) * radius) + cy + ); + } + }; + + /** + * Utilities for bezier curves + * @class + * @private + */ + var BezierUtils = function BezierUtils () {}; + + BezierUtils.curveLength = function curveLength (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY) + { + var n = 10; + var result = 0.0; + var t = 0.0; + var t2 = 0.0; + var t3 = 0.0; + var nt = 0.0; + var nt2 = 0.0; + var nt3 = 0.0; + var x = 0.0; + var y = 0.0; + var dx = 0.0; + var dy = 0.0; + var prevX = fromX; + var prevY = fromY; + + for (var i = 1; i <= n; ++i) + { + t = i / n; + t2 = t * t; + t3 = t2 * t; + nt = (1.0 - t); + nt2 = nt * nt; + nt3 = nt2 * nt; + + x = (nt3 * fromX) + (3.0 * nt2 * t * cpX) + (3.0 * nt * t2 * cpX2) + (t3 * toX); + y = (nt3 * fromY) + (3.0 * nt2 * t * cpY) + (3 * nt * t2 * cpY2) + (t3 * toY); + dx = prevX - x; + dy = prevY - y; + prevX = x; + prevY = y; + + result += Math.sqrt((dx * dx) + (dy * dy)); + } + + return result; + }; + + /** + * Calculate the points for a bezier curve and then draws it. + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @param {number} cpX - Control point x + * @param {number} cpY - Control point y + * @param {number} cpX2 - Second Control point x + * @param {number} cpY2 - Second Control point y + * @param {number} toX - Destination point x + * @param {number} toY - Destination point y + * @param {number[]} points - Path array to push points into + */ + BezierUtils.curveTo = function curveTo (cpX, cpY, cpX2, cpY2, toX, toY, points) + { + var fromX = points[points.length - 2]; + var fromY = points[points.length - 1]; + + points.length -= 2; + + var n = GRAPHICS_CURVES._segmentsCount( + BezierUtils.curveLength(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY) + ); + + var dt = 0; + var dt2 = 0; + var dt3 = 0; + var t2 = 0; + var t3 = 0; + + points.push(fromX, fromY); + + for (var i = 1, j = 0; i <= n; ++i) + { + j = i / n; + + dt = (1 - j); + dt2 = dt * dt; + dt3 = dt2 * dt; + + t2 = j * j; + t3 = t2 * j; + + points.push( + (dt3 * fromX) + (3 * dt2 * j * cpX) + (3 * dt * t2 * cpX2) + (t3 * toX), + (dt3 * fromY) + (3 * dt2 * j * cpY) + (3 * dt * t2 * cpY2) + (t3 * toY) + ); + } + }; + + /** + * Utilities for quadratic curves + * @class + * @private + */ + var QuadraticUtils = function QuadraticUtils () {}; + + QuadraticUtils.curveLength = function curveLength (fromX, fromY, cpX, cpY, toX, toY) + { + var ax = fromX - (2.0 * cpX) + toX; + var ay = fromY - (2.0 * cpY) + toY; + var bx = (2.0 * cpX) - (2.0 * fromX); + var by = (2.0 * cpY) - (2.0 * fromY); + var a = 4.0 * ((ax * ax) + (ay * ay)); + var b = 4.0 * ((ax * bx) + (ay * by)); + var c = (bx * bx) + (by * by); + + var s = 2.0 * Math.sqrt(a + b + c); + var a2 = Math.sqrt(a); + var a32 = 2.0 * a * a2; + var c2 = 2.0 * Math.sqrt(c); + var ba = b / a2; + + return ( + (a32 * s) + + (a2 * b * (s - c2)) + + ( + ((4.0 * c * a) - (b * b)) + * Math.log(((2.0 * a2) + ba + s) / (ba + c2)) + ) + ) / (4.0 * a32); + }; + + /** + * Calculate the points for a quadratic bezier curve and then draws it. + * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c + * + * @private + * @param {number} cpX - Control point x + * @param {number} cpY - Control point y + * @param {number} toX - Destination point x + * @param {number} toY - Destination point y + * @param {number[]} points - Points to add segments to. + */ + QuadraticUtils.curveTo = function curveTo (cpX, cpY, toX, toY, points) + { + var fromX = points[points.length - 2]; + var fromY = points[points.length - 1]; + + var n = GRAPHICS_CURVES._segmentsCount( + QuadraticUtils.curveLength(fromX, fromY, cpX, cpY, toX, toY) + ); + + var xa = 0; + var ya = 0; + + for (var i = 1; i <= n; ++i) + { + var j = i / n; + + xa = fromX + ((cpX - fromX) * j); + ya = fromY + ((cpY - fromY) * j); + + points.push(xa + (((cpX + ((toX - cpX) * j)) - xa) * j), + ya + (((cpY + ((toY - cpY) * j)) - ya) * j)); + } + }; + + /** + * A structure to hold interim batch objects for Graphics. + * @class + * @memberof PIXI.graphicsUtils + */ + var BatchPart = function BatchPart() + { + this.reset(); + }; + + /** + * Begin batch part + * + * @param {PIXI.FillStyle | PIXI.LineStyle} style + * @param {number} startIndex + * @param {number} attribStart + */ + BatchPart.prototype.begin = function begin (style, startIndex, attribStart) + { + this.reset(); + this.style = style; + this.start = startIndex; + this.attribStart = attribStart; + }; + + /** + * End batch part + * + * @param {number} endIndex + * @param {number} endAttrib + */ + BatchPart.prototype.end = function end (endIndex, endAttrib) + { + this.attribSize = endAttrib - this.attribStart; + this.size = endIndex - this.start; + }; + + BatchPart.prototype.reset = function reset () + { + this.style = null; + this.size = 0; + this.start = 0; + this.attribStart = 0; + this.attribSize = 0; + }; + + /** + * Generalized convenience utilities for Graphics. + * + * @namespace PIXI.graphicsUtils + */ + + /** + * Map of fill commands for each shape type. + * + * @memberof PIXI.graphicsUtils + * @member {Object} + */ + var FILL_COMMANDS = {}; + FILL_COMMANDS[exports.SHAPES.POLY] = buildPoly; + FILL_COMMANDS[exports.SHAPES.CIRC] = buildCircle; + FILL_COMMANDS[exports.SHAPES.ELIP] = buildCircle; + FILL_COMMANDS[exports.SHAPES.RECT] = buildRectangle; + FILL_COMMANDS[exports.SHAPES.RREC] = buildRoundedRectangle; + + /** + * Batch pool, stores unused batches for preventing allocations. + * + * @memberof PIXI.graphicsUtils + * @type {Array} + */ + var BATCH_POOL = []; + + /** + * Draw call pool, stores unused draw calls for preventing allocations. + * + * @memberof PIXI.graphicsUtils + * @type {Array} + */ + var DRAW_CALL_POOL = []; + + var index$2 = ({ + buildPoly: buildPoly, + buildCircle: buildCircle, + buildRectangle: buildRectangle, + buildRoundedRectangle: buildRoundedRectangle, + FILL_COMMANDS: FILL_COMMANDS, + BATCH_POOL: BATCH_POOL, + DRAW_CALL_POOL: DRAW_CALL_POOL, + buildLine: buildLine, + buildComplexPoly: buildComplexPoly, + bezierCurveTo: bezierCurveTo, + Star: Star, + ArcUtils: ArcUtils, + BezierUtils: BezierUtils, + QuadraticUtils: QuadraticUtils, + BatchPart: BatchPart + }); + + /** + * A class to contain data useful for Graphics objects + * + * @class + * @memberof PIXI + */ + var GraphicsData = function GraphicsData(shape, fillStyle, lineStyle, matrix) + { + if ( fillStyle === void 0 ) { fillStyle = null; } + if ( lineStyle === void 0 ) { lineStyle = null; } + if ( matrix === void 0 ) { matrix = null; } + + /** + * The shape object to draw. + * @member {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} + */ + this.shape = shape; + + /** + * The style of the line. + * @member {PIXI.LineStyle} + */ + this.lineStyle = lineStyle; + + /** + * The style of the fill. + * @member {PIXI.FillStyle} + */ + this.fillStyle = fillStyle; + + /** + * The transform matrix. + * @member {PIXI.Matrix} + */ + this.matrix = matrix; + + /** + * The type of the shape, see the Const.Shapes file for all the existing types, + * @member {number} + */ + this.type = shape.type; + + /** + * The collection of points. + * @member {number[]} + */ + this.points = []; + + /** + * The collection of holes. + * @member {PIXI.GraphicsData[]} + */ + this.holes = []; + }; + + /** + * Creates a new GraphicsData object with the same values as this one. + * + * @return {PIXI.GraphicsData} Cloned GraphicsData object + */ + GraphicsData.prototype.clone = function clone () + { + return new GraphicsData( + this.shape, + this.fillStyle, + this.lineStyle, + this.matrix + ); + }; + + /** + * Destroys the Graphics data. + */ + GraphicsData.prototype.destroy = function destroy () + { + this.shape = null; + this.holes.length = 0; + this.holes = null; + this.points.length = 0; + this.points = null; + this.lineStyle = null; + this.fillStyle = null; + }; + + var tmpPoint = new Point(); + var tmpBounds = new Bounds(); + + /** + * The Graphics class contains methods used to draw primitive shapes such as lines, circles and + * rectangles to the display, and to color and fill them. + * + * GraphicsGeometry is designed to not be continually updating the geometry since it's expensive + * to re-tesselate using **earcut**. Consider using {@link PIXI.Mesh} for this use-case, it's much faster. + * + * @class + * @extends PIXI.BatchGeometry + * @memberof PIXI + */ + var GraphicsGeometry = /*@__PURE__*/(function (BatchGeometry) { + function GraphicsGeometry() + { + BatchGeometry.call(this); + + /** + * An array of points to draw, 2 numbers per point + * + * @member {number[]} + * @protected + */ + this.points = []; + + /** + * The collection of colors + * + * @member {number[]} + * @protected + */ + this.colors = []; + + /** + * The UVs collection + * + * @member {number[]} + * @protected + */ + this.uvs = []; + + /** + * The indices of the vertices + * + * @member {number[]} + * @protected + */ + this.indices = []; + + /** + * Reference to the texture IDs. + * + * @member {number[]} + * @protected + */ + this.textureIds = []; + + /** + * The collection of drawn shapes. + * + * @member {PIXI.GraphicsData[]} + * @protected + */ + this.graphicsData = []; + + /** + * Used to detect if the graphics object has changed. + * + * @member {number} + * @protected + */ + this.dirty = 0; + + /** + * Batches need to regenerated if the geometry is updated. + * + * @member {number} + * @protected + */ + this.batchDirty = -1; + + /** + * Used to check if the cache is dirty. + * + * @member {number} + * @protected + */ + this.cacheDirty = -1; + + /** + * Used to detect if we cleared the graphicsData. + * + * @member {number} + * @default 0 + * @protected + */ + this.clearDirty = 0; + + /** + * List of current draw calls drived from the batches. + * + * @member {object[]} + * @protected + */ + this.drawCalls = []; + + /** + * Intermediate abstract format sent to batch system. + * Can be converted to drawCalls or to batchable objects. + * + * @member {PIXI.graphicsUtils.BatchPart[]} + * @protected + */ + this.batches = []; + + /** + * Index of the last batched shape in the stack of calls. + * + * @member {number} + * @protected + */ + this.shapeIndex = 0; + + /** + * Cached bounds. + * + * @member {PIXI.Bounds} + * @protected + */ + this._bounds = new Bounds(); + + /** + * The bounds dirty flag. + * + * @member {number} + * @protected + */ + this.boundsDirty = -1; + + /** + * Padding to add to the bounds. + * + * @member {number} + * @default 0 + */ + this.boundsPadding = 0; + + this.batchable = false; + + this.indicesUint16 = null; + + this.uvsFloat32 = null; + + /** + * Minimal distance between points that are considered different. + * Affects line tesselation. + * + * @member {number} + */ + this.closePointEps = 1e-4; + } + + if ( BatchGeometry ) { GraphicsGeometry.__proto__ = BatchGeometry; } + GraphicsGeometry.prototype = Object.create( BatchGeometry && BatchGeometry.prototype ); + GraphicsGeometry.prototype.constructor = GraphicsGeometry; + + var prototypeAccessors = { bounds: { configurable: true } }; + + /** + * Get the current bounds of the graphic geometry. + * + * @member {PIXI.Bounds} + * @readonly + */ + prototypeAccessors.bounds.get = function () + { + if (this.boundsDirty !== this.dirty) + { + this.boundsDirty = this.dirty; + this.calculateBounds(); + } + + return this._bounds; + }; + + /** + * Call if you changed graphicsData manually. + * Empties all batch buffers. + */ + GraphicsGeometry.prototype.invalidate = function invalidate () + { + this.boundsDirty = -1; + this.dirty++; + this.batchDirty++; + this.shapeIndex = 0; + + this.points.length = 0; + this.colors.length = 0; + this.uvs.length = 0; + this.indices.length = 0; + this.textureIds.length = 0; + + for (var i = 0; i < this.drawCalls.length; i++) + { + this.drawCalls[i].textures.length = 0; + DRAW_CALL_POOL.push(this.drawCalls[i]); + } + + this.drawCalls.length = 0; + + for (var i$1 = 0; i$1 < this.batches.length; i$1++) + { + var batchPart = this.batches[i$1]; + + batchPart.reset(); + BATCH_POOL.push(batchPart); + } + + this.batches.length = 0; + }; + + /** + * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings. + * + * @return {PIXI.GraphicsGeometry} This GraphicsGeometry object. Good for chaining method calls + */ + GraphicsGeometry.prototype.clear = function clear () + { + if (this.graphicsData.length > 0) + { + this.invalidate(); + this.clearDirty++; + this.graphicsData.length = 0; + } + + return this; + }; + + /** + * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. + * + * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw. + * @param {PIXI.FillStyle} fillStyle - Defines style of the fill. + * @param {PIXI.LineStyle} lineStyle - Defines style of the lines. + * @param {PIXI.Matrix} matrix - Transform applied to the points of the shape. + * @return {PIXI.GraphicsGeometry} Returns geometry for chaining. + */ + GraphicsGeometry.prototype.drawShape = function drawShape (shape, fillStyle, lineStyle, matrix) + { + var data = new GraphicsData(shape, fillStyle, lineStyle, matrix); + + this.graphicsData.push(data); + this.dirty++; + + return this; + }; + + /** + * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. + * + * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw. + * @param {PIXI.Matrix} matrix - Transform applied to the points of the shape. + * @return {PIXI.GraphicsGeometry} Returns geometry for chaining. + */ + GraphicsGeometry.prototype.drawHole = function drawHole (shape, matrix) + { + if (!this.graphicsData.length) + { + return null; + } + + var data = new GraphicsData(shape, null, null, matrix); + + var lastShape = this.graphicsData[this.graphicsData.length - 1]; + + data.lineStyle = lastShape.lineStyle; + + lastShape.holes.push(data); + + this.dirty++; + + return this; + }; + + /** + * Destroys the Graphics object. + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all + * options have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have + * their destroy method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + GraphicsGeometry.prototype.destroy = function destroy (options) + { + BatchGeometry.prototype.destroy.call(this, options); + + // destroy each of the GraphicsData objects + for (var i = 0; i < this.graphicsData.length; ++i) + { + this.graphicsData[i].destroy(); + } + + this.points.length = 0; + this.points = null; + this.colors.length = 0; + this.colors = null; + this.uvs.length = 0; + this.uvs = null; + this.indices.length = 0; + this.indices = null; + this.indexBuffer.destroy(); + this.indexBuffer = null; + this.graphicsData.length = 0; + this.graphicsData = null; + this.drawCalls.length = 0; + this.drawCalls = null; + this.batches.length = 0; + this.batches = null; + this._bounds = null; + }; + + /** + * Check to see if a point is contained within this geometry. + * + * @param {PIXI.Point} point - Point to check if it's contained. + * @return {Boolean} `true` if the point is contained within geometry. + */ + GraphicsGeometry.prototype.containsPoint = function containsPoint (point) + { + var graphicsData = this.graphicsData; + + for (var i = 0; i < graphicsData.length; ++i) + { + var data = graphicsData[i]; + + if (!data.fillStyle.visible) + { + continue; + } + + // only deal with fills.. + if (data.shape) + { + if (data.matrix) + { + data.matrix.applyInverse(point, tmpPoint); + } + else + { + tmpPoint.copyFrom(point); + } + + if (data.shape.contains(tmpPoint.x, tmpPoint.y)) + { + var hitHole = false; + + if (data.holes) + { + for (var i$1 = 0; i$1 < data.holes.length; i$1++) + { + var hole = data.holes[i$1]; + + if (hole.shape.contains(tmpPoint.x, tmpPoint.y)) + { + hitHole = true; + break; + } + } + } + + if (!hitHole) + { + return true; + } + } + } + } + + return false; + }; + + /** + * Generates intermediate batch data. Either gets converted to drawCalls + * or used to convert to batch objects directly by the Graphics object. + */ + GraphicsGeometry.prototype.updateBatches = function updateBatches () + { + if (!this.graphicsData.length) + { + this.batchable = true; + + return; + } + + if (!this.validateBatching()) + { + return; + } + + this.cacheDirty = this.dirty; + + var uvs = this.uvs; + var graphicsData = this.graphicsData; + + var batchPart = null; + + var currentStyle = null; + + if (this.batches.length > 0) + { + batchPart = this.batches[this.batches.length - 1]; + currentStyle = batchPart.style; + } + + for (var i = this.shapeIndex; i < graphicsData.length; i++) + { + this.shapeIndex++; + + var data = graphicsData[i]; + var fillStyle = data.fillStyle; + var lineStyle = data.lineStyle; + var command = FILL_COMMANDS[data.type]; + + // build out the shapes points.. + command.build(data); + + if (data.matrix) + { + this.transformPoints(data.points, data.matrix); + } + + for (var j = 0; j < 2; j++) + { + var style = (j === 0) ? fillStyle : lineStyle; + + if (!style.visible) { continue; } + + var nextTexture = style.texture.baseTexture; + var index = this.indices.length; + var attribIndex = this.points.length / 2; + + nextTexture.wrapMode = exports.WRAP_MODES.REPEAT; + + if (j === 0) + { + this.processFill(data); + } + else + { + this.processLine(data); + } + + var size = (this.points.length / 2) - attribIndex; + + if (size === 0) { continue; } + // close batch if style is different + if (batchPart && !this._compareStyles(currentStyle, style)) + { + batchPart.end(index, attribIndex); + batchPart = null; + } + // spawn new batch if its first batch or previous was closed + if (!batchPart) + { + batchPart = BATCH_POOL.pop() || new BatchPart(); + batchPart.begin(style, index, attribIndex); + this.batches.push(batchPart); + currentStyle = style; + } + + this.addUvs(this.points, uvs, style.texture, attribIndex, size, style.matrix); + } + } + + if (batchPart) + { + var index$1 = this.indices.length; + var attrib = this.points.length / 2; + + batchPart.end(index$1, attrib); + } + + if (this.batches.length === 0) + { + // there are no visible styles in GraphicsData + // its possible that someone wants Graphics just for the bounds + this.batchable = true; + + return; + } + + this.indicesUint16 = new Uint16Array(this.indices); + + // TODO make this a const.. + this.batchable = this.isBatchable(); + + if (this.batchable) + { + this.packBatches(); + } + else + { + this.buildDrawCalls(); + } + }; + + /** + * Affinity check + * + * @param {PIXI.FillStyle | PIXI.LineStyle} styleA + * @param {PIXI.FillStyle | PIXI.LineStyle} styleB + */ + GraphicsGeometry.prototype._compareStyles = function _compareStyles (styleA, styleB) + { + if (!styleA || !styleB) + { + return false; + } + + if (styleA.texture.baseTexture !== styleB.texture.baseTexture) + { + return false; + } + + if (styleA.color + styleA.alpha !== styleB.color + styleB.alpha) + { + return false; + } + + if (!!styleA.native !== !!styleB.native) + { + return false; + } + + return true; + }; + + /** + * Test geometry for batching process. + * + * @protected + */ + GraphicsGeometry.prototype.validateBatching = function validateBatching () + { + if (this.dirty === this.cacheDirty || !this.graphicsData.length) + { + return false; + } + + for (var i = 0, l = this.graphicsData.length; i < l; i++) + { + var data = this.graphicsData[i]; + var fill = data.fillStyle; + var line = data.lineStyle; + + if (fill && !fill.texture.baseTexture.valid) { return false; } + if (line && !line.texture.baseTexture.valid) { return false; } + } + + return true; + }; + + /** + * Offset the indices so that it works with the batcher. + * + * @protected + */ + GraphicsGeometry.prototype.packBatches = function packBatches () + { + this.batchDirty++; + this.uvsFloat32 = new Float32Array(this.uvs); + + var batches = this.batches; + + for (var i = 0, l = batches.length; i < l; i++) + { + var batch = batches[i]; + + for (var j = 0; j < batch.size; j++) + { + var index = batch.start + j; + + this.indicesUint16[index] = this.indicesUint16[index] - batch.attribStart; + } + } + }; + + /** + * Checks to see if this graphics geometry can be batched. + * Currently it needs to be small enough and not contain any native lines. + * + * @protected + */ + GraphicsGeometry.prototype.isBatchable = function isBatchable () + { + var batches = this.batches; + + for (var i = 0; i < batches.length; i++) + { + if (batches[i].style.native) + { + return false; + } + } + + return (this.points.length < GraphicsGeometry.BATCHABLE_SIZE * 2); + }; + + /** + * Converts intermediate batches data to drawCalls. + * + * @protected + */ + GraphicsGeometry.prototype.buildDrawCalls = function buildDrawCalls () + { + var TICK = ++BaseTexture._globalBatch; + + for (var i = 0; i < this.drawCalls.length; i++) + { + this.drawCalls[i].textures.length = 0; + DRAW_CALL_POOL.push(this.drawCalls[i]); + } + + this.drawCalls.length = 0; + + var colors = this.colors; + var textureIds = this.textureIds; + + var currentGroup = DRAW_CALL_POOL.pop(); + + if (!currentGroup) + { + currentGroup = new BatchDrawCall(); + currentGroup.textures = new BatchTextureArray(); + } + currentGroup.textures.count = 0; + currentGroup.start = 0; + currentGroup.size = 0; + currentGroup.type = exports.DRAW_MODES.TRIANGLES; + + var textureCount = 0; + var currentTexture = null; + var textureId = 0; + var native = false; + var drawMode = exports.DRAW_MODES.TRIANGLES; + + var index = 0; + + this.drawCalls.push(currentGroup); + + // TODO - this can be simplified + for (var i$1 = 0; i$1 < this.batches.length; i$1++) + { + var data = this.batches[i$1]; + + // TODO add some full on MAX_TEXTURE CODE.. + var MAX_TEXTURES = 8; + + var style = data.style; + + var nextTexture = style.texture.baseTexture; + + if (native !== !!style.native) + { + native = !!style.native; + drawMode = native ? exports.DRAW_MODES.LINES : exports.DRAW_MODES.TRIANGLES; + + // force the batch to break! + currentTexture = null; + textureCount = MAX_TEXTURES; + TICK++; + } + + if (currentTexture !== nextTexture) + { + currentTexture = nextTexture; + + if (nextTexture._batchEnabled !== TICK) + { + if (textureCount === MAX_TEXTURES) + { + TICK++; + + textureCount = 0; + + if (currentGroup.size > 0) + { + currentGroup = DRAW_CALL_POOL.pop(); + if (!currentGroup) + { + currentGroup = new BatchDrawCall(); + currentGroup.textures = new BatchTextureArray(); + } + this.drawCalls.push(currentGroup); + } + + currentGroup.start = index; + currentGroup.size = 0; + currentGroup.textures.count = 0; + currentGroup.type = drawMode; + } + + // TODO add this to the render part.. + nextTexture.touched = 1;// touch; + nextTexture._batchEnabled = TICK; + nextTexture._batchLocation = textureCount; + nextTexture.wrapMode = 10497; + + currentGroup.textures.elements[currentGroup.textures.count++] = nextTexture; + textureCount++; + } + } + + currentGroup.size += data.size; + index += data.size; + + textureId = nextTexture._batchLocation; + + this.addColors(colors, style.color, style.alpha, data.attribSize); + this.addTextureIds(textureIds, textureId, data.attribSize); + } + + BaseTexture._globalBatch = TICK; + + // upload.. + // merge for now! + this.packAttributes(); + }; + + /** + * Packs attributes to single buffer. + * + * @protected + */ + GraphicsGeometry.prototype.packAttributes = function packAttributes () + { + var verts = this.points; + var uvs = this.uvs; + var colors = this.colors; + var textureIds = this.textureIds; + + // verts are 2 positions.. so we * by 3 as there are 6 properties.. then 4 cos its bytes + var glPoints = new ArrayBuffer(verts.length * 3 * 4); + var f32 = new Float32Array(glPoints); + var u32 = new Uint32Array(glPoints); + + var p = 0; + + for (var i = 0; i < verts.length / 2; i++) + { + f32[p++] = verts[i * 2]; + f32[p++] = verts[(i * 2) + 1]; + + f32[p++] = uvs[i * 2]; + f32[p++] = uvs[(i * 2) + 1]; + + u32[p++] = colors[i]; + + f32[p++] = textureIds[i]; + } + + this._buffer.update(glPoints); + this._indexBuffer.update(this.indicesUint16); + }; + + /** + * Process fill part of Graphics. + * + * @param {PIXI.GraphicsData} data + * @protected + */ + GraphicsGeometry.prototype.processFill = function processFill (data) + { + if (data.holes.length) + { + this.processHoles(data.holes); + + buildPoly.triangulate(data, this); + } + else + { + var command = FILL_COMMANDS[data.type]; + + command.triangulate(data, this); + } + }; + + /** + * Process line part of Graphics. + * + * @param {PIXI.GraphicsData} data + * @protected + */ + GraphicsGeometry.prototype.processLine = function processLine (data) + { + buildLine(data, this); + + for (var i = 0; i < data.holes.length; i++) + { + buildLine(data.holes[i], this); + } + }; + + /** + * Process the holes data. + * + * @param {PIXI.GraphicsData[]} holes - Holes to render + * @protected + */ + GraphicsGeometry.prototype.processHoles = function processHoles (holes) + { + for (var i = 0; i < holes.length; i++) + { + var hole = holes[i]; + var command = FILL_COMMANDS[hole.type]; + + command.build(hole); + + if (hole.matrix) + { + this.transformPoints(hole.points, hole.matrix); + } + } + }; + + /** + * Update the local bounds of the object. Expensive to use performance-wise. + * + * @protected + */ + GraphicsGeometry.prototype.calculateBounds = function calculateBounds () + { + var bounds = this._bounds; + var sequenceBounds = tmpBounds; + var curMatrix = Matrix.IDENTITY; + + this._bounds.clear(); + sequenceBounds.clear(); + + for (var i = 0; i < this.graphicsData.length; i++) + { + var data = this.graphicsData[i]; + var shape = data.shape; + var type = data.type; + var lineStyle = data.lineStyle; + var nextMatrix = data.matrix || Matrix.IDENTITY; + var lineWidth = 0.0; + + if (lineStyle && lineStyle.visible) + { + var alignment = lineStyle.alignment; + + lineWidth = lineStyle.width; + + if (type === exports.SHAPES.POLY) + { + lineWidth = lineWidth * (0.5 + Math.abs(0.5 - alignment)); + } + else + { + lineWidth = lineWidth * Math.max(0, alignment); + } + } + + if (curMatrix !== nextMatrix) + { + if (!sequenceBounds.isEmpty()) + { + bounds.addBoundsMatrix(sequenceBounds, curMatrix); + sequenceBounds.clear(); + } + curMatrix = nextMatrix; + } + + if (type === exports.SHAPES.RECT || type === exports.SHAPES.RREC) + { + sequenceBounds.addFramePad(shape.x, shape.y, shape.x + shape.width, shape.y + shape.height, + lineWidth, lineWidth); + } + else if (type === exports.SHAPES.CIRC) + { + sequenceBounds.addFramePad(shape.x, shape.y, shape.x, shape.y, + shape.radius + lineWidth, shape.radius + lineWidth); + } + else if (type === exports.SHAPES.ELIP) + { + sequenceBounds.addFramePad(shape.x, shape.y, shape.x, shape.y, + shape.width + lineWidth, shape.height + lineWidth); + } + else + { + // adding directly to the bounds + bounds.addVerticesMatrix(curMatrix, shape.points, 0, shape.points.length, lineWidth, lineWidth); + } + } + + if (!sequenceBounds.isEmpty()) + { + bounds.addBoundsMatrix(sequenceBounds, curMatrix); + } + + bounds.pad(this.boundsPadding, this.boundsPadding); + }; + + /** + * Transform points using matrix. + * + * @protected + * @param {number[]} points - Points to transform + * @param {PIXI.Matrix} matrix - Transform matrix + */ + GraphicsGeometry.prototype.transformPoints = function transformPoints (points, matrix) + { + for (var i = 0; i < points.length / 2; i++) + { + var x = points[(i * 2)]; + var y = points[(i * 2) + 1]; + + points[(i * 2)] = (matrix.a * x) + (matrix.c * y) + matrix.tx; + points[(i * 2) + 1] = (matrix.b * x) + (matrix.d * y) + matrix.ty; + } + }; + + /** + * Add colors. + * + * @protected + * @param {number[]} colors - List of colors to add to + * @param {number} color - Color to add + * @param {number} alpha - Alpha to use + * @param {number} size - Number of colors to add + */ + GraphicsGeometry.prototype.addColors = function addColors (colors, color, alpha, size) + { + // TODO use the premultiply bits Ivan added + var rgb = (color >> 16) + (color & 0xff00) + ((color & 0xff) << 16); + + var rgba = premultiplyTint(rgb, alpha); + + while (size-- > 0) + { + colors.push(rgba); + } + }; + + /** + * Add texture id that the shader/fragment wants to use. + * + * @protected + * @param {number[]} textureIds + * @param {number} id + * @param {number} size + */ + GraphicsGeometry.prototype.addTextureIds = function addTextureIds (textureIds, id, size) + { + while (size-- > 0) + { + textureIds.push(id); + } + }; + + /** + * Generates the UVs for a shape. + * + * @protected + * @param {number[]} verts - Vertices + * @param {number[]} uvs - UVs + * @param {PIXI.Texture} texture - Reference to Texture + * @param {number} start - Index buffer start index. + * @param {number} size - The size/length for index buffer. + * @param {PIXI.Matrix} [matrix] - Optional transform for all points. + */ + GraphicsGeometry.prototype.addUvs = function addUvs (verts, uvs, texture, start, size, matrix) + { + var index = 0; + var uvsStart = uvs.length; + var frame = texture.frame; + + while (index < size) + { + var x = verts[(start + index) * 2]; + var y = verts[((start + index) * 2) + 1]; + + if (matrix) + { + var nx = (matrix.a * x) + (matrix.c * y) + matrix.tx; + + y = (matrix.b * x) + (matrix.d * y) + matrix.ty; + x = nx; + } + + index++; + + uvs.push(x / frame.width, y / frame.height); + } + + var baseTexture = texture.baseTexture; + + if (frame.width < baseTexture.width + || frame.height < baseTexture.height) + { + this.adjustUvs(uvs, texture, uvsStart, size); + } + }; + + /** + * Modify uvs array according to position of texture region + * Does not work with rotated or trimmed textures + * + * @param {number[]} uvs array + * @param {PIXI.Texture} texture region + * @param {number} start starting index for uvs + * @param {number} size how many points to adjust + */ + GraphicsGeometry.prototype.adjustUvs = function adjustUvs (uvs, texture, start, size) + { + var baseTexture = texture.baseTexture; + var eps = 1e-6; + var finish = start + (size * 2); + var frame = texture.frame; + var scaleX = frame.width / baseTexture.width; + var scaleY = frame.height / baseTexture.height; + var offsetX = frame.x / frame.width; + var offsetY = frame.y / frame.height; + var minX = Math.floor(uvs[start] + eps); + var minY = Math.floor(uvs[start + 1] + eps); + + for (var i = start + 2; i < finish; i += 2) + { + minX = Math.min(minX, Math.floor(uvs[i] + eps)); + minY = Math.min(minY, Math.floor(uvs[i + 1] + eps)); + } + offsetX -= minX; + offsetY -= minY; + for (var i$1 = start; i$1 < finish; i$1 += 2) + { + uvs[i$1] = (uvs[i$1] + offsetX) * scaleX; + uvs[i$1 + 1] = (uvs[i$1 + 1] + offsetY) * scaleY; + } + }; + + Object.defineProperties( GraphicsGeometry.prototype, prototypeAccessors ); + + return GraphicsGeometry; + }(BatchGeometry)); + + /** + * The maximum number of points to consider an object "batchable", + * able to be batched by the renderer's batch system. + * + * @memberof PIXI.GraphicsGeometry + * @static + * @member {number} BATCHABLE_SIZE + * @default 100 + */ + GraphicsGeometry.BATCHABLE_SIZE = 100; + + /** + * Represents the line style for Graphics. + * @memberof PIXI + * @class + * @extends PIXI.FillStyle + */ + var LineStyle = /*@__PURE__*/(function (FillStyle) { + function LineStyle () { + FillStyle.apply(this, arguments); + } + + if ( FillStyle ) { LineStyle.__proto__ = FillStyle; } + LineStyle.prototype = Object.create( FillStyle && FillStyle.prototype ); + LineStyle.prototype.constructor = LineStyle; + + LineStyle.prototype.clone = function clone () + { + var obj = new LineStyle(); + + obj.color = this.color; + obj.alpha = this.alpha; + obj.texture = this.texture; + obj.matrix = this.matrix; + obj.visible = this.visible; + obj.width = this.width; + obj.alignment = this.alignment; + obj.native = this.native; + + return obj; + }; + /** + * Reset the line style to default. + */ + LineStyle.prototype.reset = function reset () + { + FillStyle.prototype.reset.call(this); + + // Override default line style color + this.color = 0x0; + + /** + * The width (thickness) of any lines drawn. + * + * @member {number} + * @default 0 + */ + this.width = 0; + + /** + * The alignment of any lines drawn (0.5 = middle, 1 = outer, 0 = inner). + * + * @member {number} + * @default 0.5 + */ + this.alignment = 0.5; + + /** + * If true the lines will be draw using LINES instead of TRIANGLE_STRIP + * + * @member {boolean} + * @default false + */ + this.native = false; + }; + + return LineStyle; + }(FillStyle)); + + var temp = new Float32Array(3); + + // a default shaders map used by graphics.. + var DEFAULT_SHADERS = {}; + + /** + * The Graphics class contains methods used to draw primitive shapes such as lines, circles and + * rectangles to the display, and to color and fill them. + * + * Note that because Graphics can share a GraphicsGeometry with other instances, + * it is necessary to call `destroy()` to properly dereference the underlying + * GraphicsGeometry and avoid a memory leak. Alternatively, keep using the same + * Graphics instance and call `clear()` between redraws. + * + * @class + * @extends PIXI.Container + * @memberof PIXI + */ + var Graphics = /*@__PURE__*/(function (Container) { + function Graphics(geometry) + { + if ( geometry === void 0 ) { geometry = null; } + + Container.call(this); + /** + * Includes vertex positions, face indices, normals, colors, UVs, and + * custom attributes within buffers, reducing the cost of passing all + * this data to the GPU. Can be shared between multiple Mesh or Graphics objects. + * @member {PIXI.GraphicsGeometry} + * @readonly + */ + this.geometry = geometry || new GraphicsGeometry(); + + this.geometry.refCount++; + + /** + * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU. + * Can be shared between multiple Graphics objects. + * @member {PIXI.Shader} + */ + this.shader = null; + + /** + * Represents the WebGL state the Graphics required to render, excludes shader and geometry. E.g., + * blend mode, culling, depth testing, direction of rendering triangles, backface, etc. + * @member {PIXI.State} + */ + this.state = State.for2d(); + + /** + * Current fill style + * + * @member {PIXI.FillStyle} + * @protected + */ + this._fillStyle = new FillStyle(); + + /** + * Current line style + * + * @member {PIXI.LineStyle} + * @protected + */ + this._lineStyle = new LineStyle(); + + /** + * Current shape transform matrix. + * + * @member {PIXI.Matrix} + * @protected + */ + this._matrix = null; + + /** + * Current hole mode is enabled. + * + * @member {boolean} + * @default false + * @protected + */ + this._holeMode = false; + + /** + * Current path + * + * @member {PIXI.Polygon} + * @protected + */ + this.currentPath = null; + + /** + * When cacheAsBitmap is set to true the graphics object will be rendered as if it was a sprite. + * This is useful if your graphics element does not change often, as it will speed up the rendering + * of the object in exchange for taking up texture memory. It is also useful if you need the graphics + * object to be anti-aliased, because it will be rendered using canvas. This is not recommended if + * you are constantly redrawing the graphics element. + * + * @name cacheAsBitmap + * @member {boolean} + * @memberof PIXI.Graphics# + * @default false + */ + + /** + * A collections of batches! These can be drawn by the renderer batch system. + * + * @protected + * @member {object[]} + */ + this.batches = []; + + /** + * Update dirty for limiting calculating tints for batches. + * + * @protected + * @member {number} + * @default -1 + */ + this.batchTint = -1; + + /** + * Copy of the object vertex data. + * + * @protected + * @member {Float32Array} + */ + this.vertexData = null; + + this._transformID = -1; + this.batchDirty = -1; + + /** + * Renderer plugin for batching + * + * @member {string} + * @default 'batch' + */ + this.pluginName = 'batch'; + + // Set default + this.tint = 0xFFFFFF; + this.blendMode = exports.BLEND_MODES.NORMAL; + } + + if ( Container ) { Graphics.__proto__ = Container; } + Graphics.prototype = Object.create( Container && Container.prototype ); + Graphics.prototype.constructor = Graphics; + + var prototypeAccessors = { blendMode: { configurable: true },tint: { configurable: true },fill: { configurable: true },line: { configurable: true } }; + + /** + * Creates a new Graphics object with the same values as this one. + * Note that the only the properties of the object are cloned, not its transform (position,scale,etc) + * + * @return {PIXI.Graphics} A clone of the graphics object + */ + Graphics.prototype.clone = function clone () + { + this.finishPoly(); + + return new Graphics(this.geometry); + }; + + /** + * The blend mode to be applied to the graphic shape. Apply a value of + * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode. + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL; + * @see PIXI.BLEND_MODES + */ + prototypeAccessors.blendMode.set = function (value) + { + this.state.blendMode = value; + }; + + prototypeAccessors.blendMode.get = function () + { + return this.state.blendMode; + }; + + /** + * The tint applied to the graphic shape. This is a hex value. A value of + * 0xFFFFFF will remove any tint effect. + * + * @member {number} + * @default 0xFFFFFF + */ + prototypeAccessors.tint.get = function () + { + return this._tint; + }; + prototypeAccessors.tint.set = function (value) + { + this._tint = value; + }; + + /** + * The current fill style. + * + * @member {PIXI.FillStyle} + * @readonly + */ + prototypeAccessors.fill.get = function () + { + return this._fillStyle; + }; + + /** + * The current line style. + * + * @member {PIXI.LineStyle} + * @readonly + */ + prototypeAccessors.line.get = function () + { + return this._lineStyle; + }; + + /** + * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() + * method or the drawCircle() method. + * + * @method PIXI.Graphics#lineStyle + * @param {number} [width=0] - width of the line to draw, will update the objects stored style + * @param {number} [color=0x0] - color of the line to draw, will update the objects stored style + * @param {number} [alpha=1] - alpha of the line to draw, will update the objects stored style + * @param {number} [alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter) + * @param {boolean} [native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + /** + * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() + * method or the drawCircle() method. + * + * @param {object} [options] - Line style options + * @param {number} [options.width=0] - width of the line to draw, will update the objects stored style + * @param {number} [options.color=0x0] - color of the line to draw, will update the objects stored style + * @param {number} [options.alpha=1] - alpha of the line to draw, will update the objects stored style + * @param {number} [options.alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter) + * @param {boolean} [options.native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.lineStyle = function lineStyle (options) + { + // Support non-object params: (width, color, alpha, alignment, native) + if (typeof options === 'number') + { + var args = arguments; + + options = { + width: args[0] || 0, + color: args[1] || 0x0, + alpha: args[2] !== undefined ? args[2] : 1, + alignment: args[3] !== undefined ? args[3] : 0.5, + native: !!args[4], + }; + } + + return this.lineTextureStyle(options); + }; + + /** + * Like line style but support texture for line fill. + * + * @param {object} [options] - Collection of options for setting line style. + * @param {number} [options.width=0] - width of the line to draw, will update the objects stored style + * @param {PIXI.Texture} [options.texture=PIXI.Texture.WHITE] - Texture to use + * @param {number} [options.color=0x0] - color of the line to draw, will update the objects stored style. + * Default 0xFFFFFF if texture present. + * @param {number} [options.alpha=1] - alpha of the line to draw, will update the objects stored style + * @param {PIXI.Matrix} [options.matrix=null] Texture matrix to transform texture + * @param {number} [options.alignment=0.5] - alignment of the line to draw, (0 = inner, 0.5 = middle, 1 = outter) + * @param {boolean} [options.native=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.lineTextureStyle = function lineTextureStyle (options) + { + // backward compatibility with params: (width, texture, + // color, alpha, matrix, alignment, native) + if (typeof options === 'number') + { + deprecation('v5.2.0', 'Please use object-based options for Graphics#lineTextureStyle'); + + var width = arguments[0]; + var texture = arguments[1]; + var color = arguments[2]; + var alpha = arguments[3]; + var matrix = arguments[4]; + var alignment = arguments[5]; + var native = arguments[6]; + + options = { width: width, texture: texture, color: color, alpha: alpha, matrix: matrix, alignment: alignment, native: native }; + + // Remove undefined keys + Object.keys(options).forEach(function (key) { return options[key] === undefined && delete options[key]; }); + } + + // Apply defaults + options = Object.assign({ + width: 0, + texture: Texture.WHITE, + color: (options && options.texture) ? 0xFFFFFF : 0x0, + alpha: 1, + matrix: null, + alignment: 0.5, + native: false, + }, options); + + if (this.currentPath) + { + this.startPoly(); + } + + var visible = options.width > 0 && options.alpha > 0; + + if (!visible) + { + this._lineStyle.reset(); + } + else + { + if (options.matrix) + { + options.matrix = options.matrix.clone(); + options.matrix.invert(); + } + + Object.assign(this._lineStyle, { visible: visible }, options); + } + + return this; + }; + + /** + * Start a polygon object internally + * @protected + */ + Graphics.prototype.startPoly = function startPoly () + { + if (this.currentPath) + { + var points = this.currentPath.points; + var len = this.currentPath.points.length; + + if (len > 2) + { + this.drawShape(this.currentPath); + this.currentPath = new Polygon(); + this.currentPath.closeStroke = false; + this.currentPath.points.push(points[len - 2], points[len - 1]); + } + } + else + { + this.currentPath = new Polygon(); + this.currentPath.closeStroke = false; + } + }; + + /** + * Finish the polygon object. + * @protected + */ + Graphics.prototype.finishPoly = function finishPoly () + { + if (this.currentPath) + { + if (this.currentPath.points.length > 2) + { + this.drawShape(this.currentPath); + this.currentPath = null; + } + else + { + this.currentPath.points.length = 0; + } + } + }; + + /** + * Moves the current drawing position to x, y. + * + * @param {number} x - the X coordinate to move to + * @param {number} y - the Y coordinate to move to + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.moveTo = function moveTo (x, y) + { + this.startPoly(); + this.currentPath.points[0] = x; + this.currentPath.points[1] = y; + + return this; + }; + + /** + * Draws a line using the current line style from the current drawing position to (x, y); + * The current drawing position is then set to (x, y). + * + * @param {number} x - the X coordinate to draw to + * @param {number} y - the Y coordinate to draw to + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.lineTo = function lineTo (x, y) + { + if (!this.currentPath) + { + this.moveTo(0, 0); + } + + // remove duplicates.. + var points = this.currentPath.points; + var fromX = points[points.length - 2]; + var fromY = points[points.length - 1]; + + if (fromX !== x || fromY !== y) + { + points.push(x, y); + } + + return this; + }; + + /** + * Initialize the curve + * + * @protected + * @param {number} [x=0] + * @param {number} [y=0] + */ + Graphics.prototype._initCurve = function _initCurve (x, y) + { + if ( x === void 0 ) { x = 0; } + if ( y === void 0 ) { y = 0; } + + if (this.currentPath) + { + if (this.currentPath.points.length === 0) + { + this.currentPath.points = [x, y]; + } + } + else + { + this.moveTo(x, y); + } + }; + + /** + * Calculate the points for a quadratic bezier curve and then draws it. + * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c + * + * @param {number} cpX - Control point x + * @param {number} cpY - Control point y + * @param {number} toX - Destination point x + * @param {number} toY - Destination point y + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.quadraticCurveTo = function quadraticCurveTo (cpX, cpY, toX, toY) + { + this._initCurve(); + + var points = this.currentPath.points; + + if (points.length === 0) + { + this.moveTo(0, 0); + } + + QuadraticUtils.curveTo(cpX, cpY, toX, toY, points); + + return this; + }; + + /** + * Calculate the points for a bezier curve and then draws it. + * + * @param {number} cpX - Control point x + * @param {number} cpY - Control point y + * @param {number} cpX2 - Second Control point x + * @param {number} cpY2 - Second Control point y + * @param {number} toX - Destination point x + * @param {number} toY - Destination point y + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.bezierCurveTo = function bezierCurveTo (cpX, cpY, cpX2, cpY2, toX, toY) + { + this._initCurve(); + + BezierUtils.curveTo(cpX, cpY, cpX2, cpY2, toX, toY, this.currentPath.points); + + return this; + }; + + /** + * The arcTo() method creates an arc/curve between two tangents on the canvas. + * + * "borrowed" from https://code.google.com/p/fxcanvas/ - thanks google! + * + * @param {number} x1 - The x-coordinate of the first tangent point of the arc + * @param {number} y1 - The y-coordinate of the first tangent point of the arc + * @param {number} x2 - The x-coordinate of the end of the arc + * @param {number} y2 - The y-coordinate of the end of the arc + * @param {number} radius - The radius of the arc + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.arcTo = function arcTo (x1, y1, x2, y2, radius) + { + this._initCurve(x1, y1); + + var points = this.currentPath.points; + + var result = ArcUtils.curveTo(x1, y1, x2, y2, radius, points); + + if (result) + { + var cx = result.cx; + var cy = result.cy; + var radius$1 = result.radius; + var startAngle = result.startAngle; + var endAngle = result.endAngle; + var anticlockwise = result.anticlockwise; + + this.arc(cx, cy, radius$1, startAngle, endAngle, anticlockwise); + } + + return this; + }; + + /** + * The arc method creates an arc/curve (used to create circles, or parts of circles). + * + * @param {number} cx - The x-coordinate of the center of the circle + * @param {number} cy - The y-coordinate of the center of the circle + * @param {number} radius - The radius of the circle + * @param {number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position + * of the arc's circle) + * @param {number} endAngle - The ending angle, in radians + * @param {boolean} [anticlockwise=false] - Specifies whether the drawing should be + * counter-clockwise or clockwise. False is default, and indicates clockwise, while true + * indicates counter-clockwise. + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.arc = function arc (cx, cy, radius, startAngle, endAngle, anticlockwise) + { + if ( anticlockwise === void 0 ) { anticlockwise = false; } + + if (startAngle === endAngle) + { + return this; + } + + if (!anticlockwise && endAngle <= startAngle) + { + endAngle += PI_2; + } + else if (anticlockwise && startAngle <= endAngle) + { + startAngle += PI_2; + } + + var sweep = endAngle - startAngle; + + if (sweep === 0) + { + return this; + } + + var startX = cx + (Math.cos(startAngle) * radius); + var startY = cy + (Math.sin(startAngle) * radius); + var eps = this.geometry.closePointEps; + + // If the currentPath exists, take its points. Otherwise call `moveTo` to start a path. + var points = this.currentPath ? this.currentPath.points : null; + + if (points) + { + // TODO: make a better fix. + + // We check how far our start is from the last existing point + var xDiff = Math.abs(points[points.length - 2] - startX); + var yDiff = Math.abs(points[points.length - 1] - startY); + + if (xDiff < eps && yDiff < eps) + { ; } + else + { + points.push(startX, startY); + } + } + else + { + this.moveTo(startX, startY); + points = this.currentPath.points; + } + + ArcUtils.arc(startX, startY, cx, cy, radius, startAngle, endAngle, anticlockwise, points); + + return this; + }; + + /** + * Specifies a simple one-color fill that subsequent calls to other Graphics methods + * (such as lineTo() or drawCircle()) use when drawing. + * + * @param {number} [color=0] - the color of the fill + * @param {number} [alpha=1] - the alpha of the fill + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.beginFill = function beginFill (color, alpha) + { + if ( color === void 0 ) { color = 0; } + if ( alpha === void 0 ) { alpha = 1; } + + return this.beginTextureFill({ texture: Texture.WHITE, color: color, alpha: alpha }); + }; + + /** + * Begin the texture fill + * + * @param {object} [options] - Object object. + * @param {PIXI.Texture} [options.texture=PIXI.Texture.WHITE] - Texture to fill + * @param {number} [options.color=0xffffff] - Background to fill behind texture + * @param {number} [options.alpha=1] - Alpha of fill + * @param {PIXI.Matrix} [options.matrix=null] - Transform matrix + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.beginTextureFill = function beginTextureFill (options) + { + // backward compatibility with params: (texture, color, alpha, matrix) + if (options instanceof Texture) + { + deprecation('v5.2.0', 'Please use object-based options for Graphics#beginTextureFill'); + + var texture = arguments[0]; + var color = arguments[1]; + var alpha = arguments[2]; + var matrix = arguments[3]; + + options = { texture: texture, color: color, alpha: alpha, matrix: matrix }; + + // Remove undefined keys + Object.keys(options).forEach(function (key) { return options[key] === undefined && delete options[key]; }); + } + + // Apply defaults + options = Object.assign({ + texture: Texture.WHITE, + color: 0xFFFFFF, + alpha: 1, + matrix: null, + }, options); + + if (this.currentPath) + { + this.startPoly(); + } + + var visible = options.alpha > 0; + + if (!visible) + { + this._fillStyle.reset(); + } + else + { + if (options.matrix) + { + options.matrix = options.matrix.clone(); + options.matrix.invert(); + } + + Object.assign(this._fillStyle, { visible: visible }, options); + } + + return this; + }; + + /** + * Applies a fill to the lines and shapes that were added since the last call to the beginFill() method. + * + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.endFill = function endFill () + { + this.finishPoly(); + + this._fillStyle.reset(); + + return this; + }; + + /** + * Draws a rectangle shape. + * + * @param {number} x - The X coord of the top-left of the rectangle + * @param {number} y - The Y coord of the top-left of the rectangle + * @param {number} width - The width of the rectangle + * @param {number} height - The height of the rectangle + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.drawRect = function drawRect (x, y, width, height) + { + return this.drawShape(new Rectangle(x, y, width, height)); + }; + + /** + * Draw a rectangle shape with rounded/beveled corners. + * + * @param {number} x - The X coord of the top-left of the rectangle + * @param {number} y - The Y coord of the top-left of the rectangle + * @param {number} width - The width of the rectangle + * @param {number} height - The height of the rectangle + * @param {number} radius - Radius of the rectangle corners + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.drawRoundedRect = function drawRoundedRect (x, y, width, height, radius) + { + return this.drawShape(new RoundedRectangle(x, y, width, height, radius)); + }; + + /** + * Draws a circle. + * + * @param {number} x - The X coordinate of the center of the circle + * @param {number} y - The Y coordinate of the center of the circle + * @param {number} radius - The radius of the circle + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.drawCircle = function drawCircle (x, y, radius) + { + return this.drawShape(new Circle(x, y, radius)); + }; + + /** + * Draws an ellipse. + * + * @param {number} x - The X coordinate of the center of the ellipse + * @param {number} y - The Y coordinate of the center of the ellipse + * @param {number} width - The half width of the ellipse + * @param {number} height - The half height of the ellipse + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.drawEllipse = function drawEllipse (x, y, width, height) + { + return this.drawShape(new Ellipse(x, y, width, height)); + }; + + /** + * Draws a polygon using the given path. + * + * @param {number[]|PIXI.Point[]|PIXI.Polygon} path - The path data used to construct the polygon. + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.drawPolygon = function drawPolygon (path) + { + var arguments$1 = arguments; + + // prevents an argument assignment deopt + // see section 3.1: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments + var points = path; + + var closeStroke = true;// !!this._fillStyle; + + // check if data has points.. + if (points.points) + { + closeStroke = points.closeStroke; + points = points.points; + } + + if (!Array.isArray(points)) + { + // prevents an argument leak deopt + // see section 3.2: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments + points = new Array(arguments.length); + + for (var i = 0; i < points.length; ++i) + { + points[i] = arguments$1[i]; // eslint-disable-line prefer-rest-params + } + } + + var shape = new Polygon(points); + + shape.closeStroke = closeStroke; + + this.drawShape(shape); + + return this; + }; + + /** + * Draw any shape. + * + * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - Shape to draw + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.drawShape = function drawShape (shape) + { + if (!this._holeMode) + { + this.geometry.drawShape( + shape, + this._fillStyle.clone(), + this._lineStyle.clone(), + this._matrix + ); + } + else + { + this.geometry.drawHole(shape, this._matrix); + } + + return this; + }; + + /** + * Draw a star shape with an arbitrary number of points. + * + * @param {number} x - Center X position of the star + * @param {number} y - Center Y position of the star + * @param {number} points - The number of points of the star, must be > 1 + * @param {number} radius - The outer radius of the star + * @param {number} [innerRadius] - The inner radius between points, default half `radius` + * @param {number} [rotation=0] - The rotation of the star in radians, where 0 is vertical + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.drawStar = function drawStar (x, y, points, radius, innerRadius, rotation) + { + if ( rotation === void 0 ) { rotation = 0; } + + return this.drawPolygon(new Star(x, y, points, radius, innerRadius, rotation)); + }; + + /** + * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings. + * + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + Graphics.prototype.clear = function clear () + { + this.geometry.clear(); + this._lineStyle.reset(); + this._fillStyle.reset(); + + this._matrix = null; + this._holeMode = false; + this.currentPath = null; + + return this; + }; + + /** + * True if graphics consists of one rectangle, and thus, can be drawn like a Sprite and + * masked with gl.scissor. + * + * @returns {boolean} True if only 1 rect. + */ + Graphics.prototype.isFastRect = function isFastRect () + { + return this.geometry.graphicsData.length === 1 + && this.geometry.graphicsData[0].shape.type === exports.SHAPES.RECT + && !this.geometry.graphicsData[0].lineWidth; + }; + + /** + * Renders the object using the WebGL renderer + * + * @protected + * @param {PIXI.Renderer} renderer - The renderer + */ + Graphics.prototype._render = function _render (renderer) + { + this.finishPoly(); + + var geometry = this.geometry; + + // batch part.. + // batch it! + geometry.updateBatches(); + + if (geometry.batchable) + { + if (this.batchDirty !== geometry.batchDirty) + { + this._populateBatches(); + } + + this._renderBatched(renderer); + } + else + { + // no batching... + renderer.batch.flush(); + + this._renderDirect(renderer); + } + }; + + /** + * Populating batches for rendering + * + * @protected + */ + Graphics.prototype._populateBatches = function _populateBatches () + { + var geometry = this.geometry; + var blendMode = this.blendMode; + + this.batches = []; + this.batchTint = -1; + this._transformID = -1; + this.batchDirty = geometry.batchDirty; + + this.vertexData = new Float32Array(geometry.points); + + for (var i = 0, l = geometry.batches.length; i < l; i++) + { + var gI = geometry.batches[i]; + var color = gI.style.color; + var vertexData = new Float32Array(this.vertexData.buffer, + gI.attribStart * 4 * 2, + gI.attribSize * 2); + + var uvs = new Float32Array(geometry.uvsFloat32.buffer, + gI.attribStart * 4 * 2, + gI.attribSize * 2); + + var indices = new Uint16Array(geometry.indicesUint16.buffer, + gI.start * 2, + gI.size); + + var batch = { + vertexData: vertexData, + blendMode: blendMode, + indices: indices, + uvs: uvs, + _batchRGB: hex2rgb(color), + _tintRGB: color, + _texture: gI.style.texture, + alpha: gI.style.alpha, + worldAlpha: 1 }; + + this.batches[i] = batch; + } + }; + + /** + * Renders the batches using the BathedRenderer plugin + * + * @protected + * @param {PIXI.Renderer} renderer - The renderer + */ + Graphics.prototype._renderBatched = function _renderBatched (renderer) + { + if (!this.batches.length) + { + return; + } + + renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]); + + this.calculateVertices(); + this.calculateTints(); + + for (var i = 0, l = this.batches.length; i < l; i++) + { + var batch = this.batches[i]; + + batch.worldAlpha = this.worldAlpha * batch.alpha; + + renderer.plugins[this.pluginName].render(batch); + } + }; + + /** + * Renders the graphics direct + * + * @protected + * @param {PIXI.Renderer} renderer - The renderer + */ + Graphics.prototype._renderDirect = function _renderDirect (renderer) + { + var shader = this._resolveDirectShader(renderer); + + var geometry = this.geometry; + var tint = this.tint; + var worldAlpha = this.worldAlpha; + var uniforms = shader.uniforms; + var drawCalls = geometry.drawCalls; + + // lets set the transfomr + uniforms.translationMatrix = this.transform.worldTransform; + + // and then lets set the tint.. + uniforms.tint[0] = (((tint >> 16) & 0xFF) / 255) * worldAlpha; + uniforms.tint[1] = (((tint >> 8) & 0xFF) / 255) * worldAlpha; + uniforms.tint[2] = ((tint & 0xFF) / 255) * worldAlpha; + uniforms.tint[3] = worldAlpha; + + // the first draw call, we can set the uniforms of the shader directly here. + + // this means that we can tack advantage of the sync function of pixi! + // bind and sync uniforms.. + // there is a way to optimise this.. + renderer.shader.bind(shader); + renderer.geometry.bind(geometry, shader); + + // set state.. + renderer.state.set(this.state); + + // then render the rest of them... + for (var i = 0, l = drawCalls.length; i < l; i++) + { + this._renderDrawCallDirect(renderer, geometry.drawCalls[i]); + } + }; + + /** + * Renders specific DrawCall + * + * @param {PIXI.Renderer} renderer + * @param {PIXI.BatchDrawCall} drawCall + */ + Graphics.prototype._renderDrawCallDirect = function _renderDrawCallDirect (renderer, drawCall) + { + var textures = drawCall.textures; + var type = drawCall.type; + var size = drawCall.size; + var start = drawCall.start; + var groupTextureCount = textures.count; + + for (var j = 0; j < groupTextureCount; j++) + { + renderer.texture.bind(textures.elements[j], j); + } + + renderer.geometry.draw(type, size, start); + }; + + /** + * Resolves shader for direct rendering + * + * @protected + * @param {PIXI.Renderer} renderer - The renderer + */ + Graphics.prototype._resolveDirectShader = function _resolveDirectShader (renderer) + { + var shader = this.shader; + + var pluginName = this.pluginName; + + if (!shader) + { + // if there is no shader here, we can use the default shader. + // and that only gets created if we actually need it.. + // but may be more than one plugins for graphics + if (!DEFAULT_SHADERS[pluginName]) + { + var sampleValues = new Int32Array(16); + + for (var i = 0; i < 16; i++) + { + sampleValues[i] = i; + } + + var uniforms = { + tint: new Float32Array([1, 1, 1, 1]), + translationMatrix: new Matrix(), + default: UniformGroup.from({ uSamplers: sampleValues }, true), + }; + + var program = renderer.plugins[pluginName]._shader.program; + + DEFAULT_SHADERS[pluginName] = new Shader(program, uniforms); + } + + shader = DEFAULT_SHADERS[pluginName]; + } + + return shader; + }; + + /** + * Retrieves the bounds of the graphic shape as a rectangle object + * + * @protected + */ + Graphics.prototype._calculateBounds = function _calculateBounds () + { + this.finishPoly(); + + var geometry = this.geometry; + + // skipping when graphics is empty, like a container + if (!geometry.graphicsData.length) + { + return; + } + + var ref = geometry.bounds; + var minX = ref.minX; + var minY = ref.minY; + var maxX = ref.maxX; + var maxY = ref.maxY; + + this._bounds.addFrame(this.transform, minX, minY, maxX, maxY); + }; + + /** + * Tests if a point is inside this graphics object + * + * @param {PIXI.Point} point - the point to test + * @return {boolean} the result of the test + */ + Graphics.prototype.containsPoint = function containsPoint (point) + { + this.worldTransform.applyInverse(point, Graphics._TEMP_POINT); + + return this.geometry.containsPoint(Graphics._TEMP_POINT); + }; + + /** + * Recalcuate the tint by applying tin to batches using Graphics tint. + * @protected + */ + Graphics.prototype.calculateTints = function calculateTints () + { + if (this.batchTint !== this.tint) + { + this.batchTint = this.tint; + + var tintRGB = hex2rgb(this.tint, temp); + + for (var i = 0; i < this.batches.length; i++) + { + var batch = this.batches[i]; + + var batchTint = batch._batchRGB; + + var r = (tintRGB[0] * batchTint[0]) * 255; + var g = (tintRGB[1] * batchTint[1]) * 255; + var b = (tintRGB[2] * batchTint[2]) * 255; + + // TODO Ivan, can this be done in one go? + var color = (r << 16) + (g << 8) + (b | 0); + + batch._tintRGB = (color >> 16) + + (color & 0xff00) + + ((color & 0xff) << 16); + } + } + }; + + /** + * If there's a transform update or a change to the shape of the + * geometry, recaculate the vertices. + * @protected + */ + Graphics.prototype.calculateVertices = function calculateVertices () + { + if (this._transformID === this.transform._worldID) + { + return; + } + + this._transformID = this.transform._worldID; + + var wt = this.transform.worldTransform; + var a = wt.a; + var b = wt.b; + var c = wt.c; + var d = wt.d; + var tx = wt.tx; + var ty = wt.ty; + + var data = this.geometry.points;// batch.vertexDataOriginal; + var vertexData = this.vertexData; + + var count = 0; + + for (var i = 0; i < data.length; i += 2) + { + var x = data[i]; + var y = data[i + 1]; + + vertexData[count++] = (a * x) + (c * y) + tx; + vertexData[count++] = (d * y) + (b * x) + ty; + } + }; + + /** + * Closes the current path. + * + * @return {PIXI.Graphics} Returns itself. + */ + Graphics.prototype.closePath = function closePath () + { + var currentPath = this.currentPath; + + if (currentPath) + { + // we don't need to add extra point in the end because buildLine will take care of that + currentPath.closeStroke = true; + } + + return this; + }; + + /** + * Apply a matrix to the positional data. + * + * @param {PIXI.Matrix} matrix - Matrix to use for transform current shape. + * @return {PIXI.Graphics} Returns itself. + */ + Graphics.prototype.setMatrix = function setMatrix (matrix) + { + this._matrix = matrix; + + return this; + }; + + /** + * Begin adding holes to the last draw shape + * IMPORTANT: holes must be fully inside a shape to work + * Also weirdness ensues if holes overlap! + * Ellipses, Circles, Rectangles and Rounded Rectangles cannot be holes or host for holes in CanvasRenderer, + * please use `moveTo` `lineTo`, `quadraticCurveTo` if you rely on pixi-legacy bundle. + * @return {PIXI.Graphics} Returns itself. + */ + Graphics.prototype.beginHole = function beginHole () + { + this.finishPoly(); + this._holeMode = true; + + return this; + }; + + /** + * End adding holes to the last draw shape + * @return {PIXI.Graphics} Returns itself. + */ + Graphics.prototype.endHole = function endHole () + { + this.finishPoly(); + this._holeMode = false; + + return this; + }; + + /** + * Destroys the Graphics object. + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all + * options have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have + * their destroy method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + Graphics.prototype.destroy = function destroy (options) + { + Container.prototype.destroy.call(this, options); + + this.geometry.refCount--; + if (this.geometry.refCount === 0) + { + this.geometry.dispose(); + } + + this._matrix = null; + this.currentPath = null; + this._lineStyle.destroy(); + this._lineStyle = null; + this._fillStyle.destroy(); + this._fillStyle = null; + this.geometry = null; + this.shader = null; + this.vertexData = null; + this.batches.length = 0; + this.batches = null; + + Container.prototype.destroy.call(this, options); + }; + + Object.defineProperties( Graphics.prototype, prototypeAccessors ); + + return Graphics; + }(Container)); + + /** + * Temporary point to use for containsPoint + * + * @static + * @private + * @member {PIXI.Point} + */ + Graphics._TEMP_POINT = new Point(); + + /*! + * @pixi/sprite - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/sprite is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var tempPoint = new Point(); + var indices = new Uint16Array([0, 1, 2, 0, 2, 3]); + + /** + * The Sprite object is the base for all textured objects that are rendered to the screen + * + * A sprite can be created directly from an image like this: + * + * ```js + * let sprite = PIXI.Sprite.from('assets/image.png'); + * ``` + * + * The more efficient way to create sprites is using a {@link PIXI.Spritesheet}, + * as swapping base textures when rendering to the screen is inefficient. + * + * ```js + * PIXI.Loader.shared.add("assets/spritesheet.json").load(setup); + * + * function setup() { + * let sheet = PIXI.Loader.shared.resources["assets/spritesheet.json"].spritesheet; + * let sprite = new PIXI.Sprite(sheet.textures["image.png"]); + * ... + * } + * ``` + * + * @class + * @extends PIXI.Container + * @memberof PIXI + */ + var Sprite = /*@__PURE__*/(function (Container) { + function Sprite(texture) + { + Container.call(this); + + /** + * The anchor point defines the normalized coordinates + * in the texture that map to the position of this + * sprite. + * + * By default, this is `(0,0)` (or `texture.defaultAnchor` + * if you have modified that), which means the position + * `(x,y)` of this `Sprite` will be the top-left corner. + * + * Note: Updating `texture.defaultAnchor` after + * constructing a `Sprite` does _not_ update its anchor. + * + * {@link https://docs.cocos2d-x.org/cocos2d-x/en/sprites/manipulation.html} + * + * @default `texture.defaultAnchor` + * @member {PIXI.ObservablePoint} + * @private + */ + this._anchor = new ObservablePoint( + this._onAnchorUpdate, + this, + (texture ? texture.defaultAnchor.x : 0), + (texture ? texture.defaultAnchor.y : 0) + ); + + /** + * The texture that the sprite is using + * + * @private + * @member {PIXI.Texture} + */ + this._texture = null; + + /** + * The width of the sprite (this is initially set by the texture) + * + * @private + * @member {number} + */ + this._width = 0; + + /** + * The height of the sprite (this is initially set by the texture) + * + * @private + * @member {number} + */ + this._height = 0; + + /** + * The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect. + * + * @private + * @member {number} + * @default 0xFFFFFF + */ + this._tint = null; + this._tintRGB = null; + this.tint = 0xFFFFFF; + + /** + * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode. + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL + * @see PIXI.BLEND_MODES + */ + this.blendMode = exports.BLEND_MODES.NORMAL; + + /** + * The shader that will be used to render the sprite. Set to null to remove a current shader. + * + * @member {PIXI.Filter|PIXI.Shader} + */ + this.shader = null; + + /** + * Cached tint value so we can tell when the tint is changed. + * Value is used for 2d CanvasRenderer. + * + * @protected + * @member {number} + * @default 0xFFFFFF + */ + this._cachedTint = 0xFFFFFF; + + /** + * this is used to store the uvs data of the sprite, assigned at the same time + * as the vertexData in calculateVertices() + * + * @private + * @member {Float32Array} + */ + this.uvs = null; + + // call texture setter + this.texture = texture || Texture.EMPTY; + + /** + * this is used to store the vertex data of the sprite (basically a quad) + * + * @private + * @member {Float32Array} + */ + this.vertexData = new Float32Array(8); + + /** + * This is used to calculate the bounds of the object IF it is a trimmed sprite + * + * @private + * @member {Float32Array} + */ + this.vertexTrimmedData = null; + + this._transformID = -1; + this._textureID = -1; + + this._transformTrimmedID = -1; + this._textureTrimmedID = -1; + + // Batchable stuff.. + // TODO could make this a mixin? + this.indices = indices; + + /** + * Plugin that is responsible for rendering this element. + * Allows to customize the rendering process without overriding '_render' & '_renderCanvas' methods. + * + * @member {string} + * @default 'batch' + */ + this.pluginName = 'batch'; + + /** + * used to fast check if a sprite is.. a sprite! + * @member {boolean} + */ + this.isSprite = true; + + /** + * Internal roundPixels field + * + * @member {boolean} + * @private + */ + this._roundPixels = settings.ROUND_PIXELS; + } + + if ( Container ) { Sprite.__proto__ = Container; } + Sprite.prototype = Object.create( Container && Container.prototype ); + Sprite.prototype.constructor = Sprite; + + var prototypeAccessors = { roundPixels: { configurable: true },width: { configurable: true },height: { configurable: true },anchor: { configurable: true },tint: { configurable: true },texture: { configurable: true } }; + + /** + * When the texture is updated, this event will fire to update the scale and frame + * + * @private + */ + Sprite.prototype._onTextureUpdate = function _onTextureUpdate () + { + this._textureID = -1; + this._textureTrimmedID = -1; + this._cachedTint = 0xFFFFFF; + + // so if _width is 0 then width was not set.. + if (this._width) + { + this.scale.x = sign$1(this.scale.x) * this._width / this._texture.orig.width; + } + + if (this._height) + { + this.scale.y = sign$1(this.scale.y) * this._height / this._texture.orig.height; + } + }; + + /** + * Called when the anchor position updates. + * + * @private + */ + Sprite.prototype._onAnchorUpdate = function _onAnchorUpdate () + { + this._transformID = -1; + this._transformTrimmedID = -1; + }; + + /** + * calculates worldTransform * vertices, store it in vertexData + */ + Sprite.prototype.calculateVertices = function calculateVertices () + { + var texture = this._texture; + + if (this._transformID === this.transform._worldID && this._textureID === texture._updateID) + { + return; + } + + // update texture UV here, because base texture can be changed without calling `_onTextureUpdate` + if (this._textureID !== texture._updateID) + { + this.uvs = this._texture._uvs.uvsFloat32; + } + + this._transformID = this.transform._worldID; + this._textureID = texture._updateID; + + // set the vertex data + + var wt = this.transform.worldTransform; + var a = wt.a; + var b = wt.b; + var c = wt.c; + var d = wt.d; + var tx = wt.tx; + var ty = wt.ty; + var vertexData = this.vertexData; + var trim = texture.trim; + var orig = texture.orig; + var anchor = this._anchor; + + var w0 = 0; + var w1 = 0; + var h0 = 0; + var h1 = 0; + + if (trim) + { + // if the sprite is trimmed and is not a tilingsprite then we need to add the extra + // space before transforming the sprite coords. + w1 = trim.x - (anchor._x * orig.width); + w0 = w1 + trim.width; + + h1 = trim.y - (anchor._y * orig.height); + h0 = h1 + trim.height; + } + else + { + w1 = -anchor._x * orig.width; + w0 = w1 + orig.width; + + h1 = -anchor._y * orig.height; + h0 = h1 + orig.height; + } + + // xy + vertexData[0] = (a * w1) + (c * h1) + tx; + vertexData[1] = (d * h1) + (b * w1) + ty; + + // xy + vertexData[2] = (a * w0) + (c * h1) + tx; + vertexData[3] = (d * h1) + (b * w0) + ty; + + // xy + vertexData[4] = (a * w0) + (c * h0) + tx; + vertexData[5] = (d * h0) + (b * w0) + ty; + + // xy + vertexData[6] = (a * w1) + (c * h0) + tx; + vertexData[7] = (d * h0) + (b * w1) + ty; + + if (this._roundPixels) + { + var resolution = settings.RESOLUTION; + + for (var i = 0; i < vertexData.length; ++i) + { + vertexData[i] = Math.round((vertexData[i] * resolution | 0) / resolution); + } + } + }; + + /** + * calculates worldTransform * vertices for a non texture with a trim. store it in vertexTrimmedData + * This is used to ensure that the true width and height of a trimmed texture is respected + */ + Sprite.prototype.calculateTrimmedVertices = function calculateTrimmedVertices () + { + if (!this.vertexTrimmedData) + { + this.vertexTrimmedData = new Float32Array(8); + } + else if (this._transformTrimmedID === this.transform._worldID && this._textureTrimmedID === this._texture._updateID) + { + return; + } + + this._transformTrimmedID = this.transform._worldID; + this._textureTrimmedID = this._texture._updateID; + + // lets do some special trim code! + var texture = this._texture; + var vertexData = this.vertexTrimmedData; + var orig = texture.orig; + var anchor = this._anchor; + + // lets calculate the new untrimmed bounds.. + var wt = this.transform.worldTransform; + var a = wt.a; + var b = wt.b; + var c = wt.c; + var d = wt.d; + var tx = wt.tx; + var ty = wt.ty; + + var w1 = -anchor._x * orig.width; + var w0 = w1 + orig.width; + + var h1 = -anchor._y * orig.height; + var h0 = h1 + orig.height; + + // xy + vertexData[0] = (a * w1) + (c * h1) + tx; + vertexData[1] = (d * h1) + (b * w1) + ty; + + // xy + vertexData[2] = (a * w0) + (c * h1) + tx; + vertexData[3] = (d * h1) + (b * w0) + ty; + + // xy + vertexData[4] = (a * w0) + (c * h0) + tx; + vertexData[5] = (d * h0) + (b * w0) + ty; + + // xy + vertexData[6] = (a * w1) + (c * h0) + tx; + vertexData[7] = (d * h0) + (b * w1) + ty; + }; + + /** + * + * Renders the object using the WebGL renderer + * + * @protected + * @param {PIXI.Renderer} renderer - The webgl renderer to use. + */ + Sprite.prototype._render = function _render (renderer) + { + this.calculateVertices(); + + renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]); + renderer.plugins[this.pluginName].render(this); + }; + + /** + * Updates the bounds of the sprite. + * + * @protected + */ + Sprite.prototype._calculateBounds = function _calculateBounds () + { + var trim = this._texture.trim; + var orig = this._texture.orig; + + // First lets check to see if the current texture has a trim.. + if (!trim || (trim.width === orig.width && trim.height === orig.height)) + { + // no trim! lets use the usual calculations.. + this.calculateVertices(); + this._bounds.addQuad(this.vertexData); + } + else + { + // lets calculate a special trimmed bounds... + this.calculateTrimmedVertices(); + this._bounds.addQuad(this.vertexTrimmedData); + } + }; + + /** + * Gets the local bounds of the sprite object. + * + * @param {PIXI.Rectangle} [rect] - The output rectangle. + * @return {PIXI.Rectangle} The bounds. + */ + Sprite.prototype.getLocalBounds = function getLocalBounds (rect) + { + // we can do a fast local bounds if the sprite has no children! + if (this.children.length === 0) + { + this._bounds.minX = this._texture.orig.width * -this._anchor._x; + this._bounds.minY = this._texture.orig.height * -this._anchor._y; + this._bounds.maxX = this._texture.orig.width * (1 - this._anchor._x); + this._bounds.maxY = this._texture.orig.height * (1 - this._anchor._y); + + if (!rect) + { + if (!this._localBoundsRect) + { + this._localBoundsRect = new Rectangle(); + } + + rect = this._localBoundsRect; + } + + return this._bounds.getRectangle(rect); + } + + return Container.prototype.getLocalBounds.call(this, rect); + }; + + /** + * Tests if a point is inside this sprite + * + * @param {PIXI.Point} point - the point to test + * @return {boolean} the result of the test + */ + Sprite.prototype.containsPoint = function containsPoint (point) + { + this.worldTransform.applyInverse(point, tempPoint); + + var width = this._texture.orig.width; + var height = this._texture.orig.height; + var x1 = -width * this.anchor.x; + var y1 = 0; + + if (tempPoint.x >= x1 && tempPoint.x < x1 + width) + { + y1 = -height * this.anchor.y; + + if (tempPoint.y >= y1 && tempPoint.y < y1 + height) + { + return true; + } + } + + return false; + }; + + /** + * Destroys this sprite and optionally its texture and children + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well + * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well + */ + Sprite.prototype.destroy = function destroy (options) + { + Container.prototype.destroy.call(this, options); + + this._texture.off('update', this._onTextureUpdate, this); + + this._anchor = null; + + var destroyTexture = typeof options === 'boolean' ? options : options && options.texture; + + if (destroyTexture) + { + var destroyBaseTexture = typeof options === 'boolean' ? options : options && options.baseTexture; + + this._texture.destroy(!!destroyBaseTexture); + } + + this._texture = null; + this.shader = null; + }; + + // some helper functions.. + + /** + * Helper function that creates a new sprite based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * + * @static + * @param {string|PIXI.Texture|HTMLCanvasElement|HTMLVideoElement} source Source to create texture from + * @param {object} [options] See {@link PIXI.BaseTexture}'s constructor for options. + * @return {PIXI.Sprite} The newly created sprite + */ + Sprite.from = function from (source, options) + { + var texture = (source instanceof Texture) + ? source + : Texture.from(source, options); + + return new Sprite(texture); + }; + + /** + * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. + * Advantages can include sharper image quality (like text) and faster rendering on canvas. + * The main disadvantage is movement of objects may appear less smooth. + * To set the global default, change {@link PIXI.settings.ROUND_PIXELS} + * + * @member {boolean} + * @default false + */ + prototypeAccessors.roundPixels.set = function (value) + { + if (this._roundPixels !== value) + { + this._transformID = -1; + } + this._roundPixels = value; + }; + + prototypeAccessors.roundPixels.get = function () + { + return this._roundPixels; + }; + + /** + * The width of the sprite, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + prototypeAccessors.width.get = function () + { + return Math.abs(this.scale.x) * this._texture.orig.width; + }; + + prototypeAccessors.width.set = function (value) // eslint-disable-line require-jsdoc + { + var s = sign$1(this.scale.x) || 1; + + this.scale.x = s * value / this._texture.orig.width; + this._width = value; + }; + + /** + * The height of the sprite, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + prototypeAccessors.height.get = function () + { + return Math.abs(this.scale.y) * this._texture.orig.height; + }; + + prototypeAccessors.height.set = function (value) // eslint-disable-line require-jsdoc + { + var s = sign$1(this.scale.y) || 1; + + this.scale.y = s * value / this._texture.orig.height; + this._height = value; + }; + + /** + * The anchor sets the origin point of the text. The default value is taken from the {@link PIXI.Texture|Texture} + * and passed to the constructor. + * + * The default is `(0,0)`, this means the text's origin is the top left. + * + * Setting the anchor to `(0.5,0.5)` means the text's origin is centered. + * + * Setting the anchor to `(1,1)` would mean the text's origin point will be the bottom right corner. + * + * If you pass only single parameter, it will set both x and y to the same value as shown in the example below. + * + * @example + * const sprite = new PIXI.Sprite(texture); + * sprite.anchor.set(0.5); // This will set the origin to center. (0.5) is same as (0.5, 0.5). + * + * @member {PIXI.ObservablePoint} + */ + prototypeAccessors.anchor.get = function () + { + return this._anchor; + }; + + prototypeAccessors.anchor.set = function (value) // eslint-disable-line require-jsdoc + { + this._anchor.copyFrom(value); + }; + + /** + * The tint applied to the sprite. This is a hex value. + * A value of 0xFFFFFF will remove any tint effect. + * + * @member {number} + * @default 0xFFFFFF + */ + prototypeAccessors.tint.get = function () + { + return this._tint; + }; + + prototypeAccessors.tint.set = function (value) // eslint-disable-line require-jsdoc + { + this._tint = value; + this._tintRGB = (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16); + }; + + /** + * The texture that the sprite is using + * + * @member {PIXI.Texture} + */ + prototypeAccessors.texture.get = function () + { + return this._texture; + }; + + prototypeAccessors.texture.set = function (value) // eslint-disable-line require-jsdoc + { + if (this._texture === value) + { + return; + } + + if (this._texture) + { + this._texture.off('update', this._onTextureUpdate, this); + } + + this._texture = value || Texture.EMPTY; + this._cachedTint = 0xFFFFFF; + + this._textureID = -1; + this._textureTrimmedID = -1; + + if (value) + { + // wait for the texture to load + if (value.baseTexture.valid) + { + this._onTextureUpdate(); + } + else + { + value.once('update', this._onTextureUpdate, this); + } + } + }; + + Object.defineProperties( Sprite.prototype, prototypeAccessors ); + + return Sprite; + }(Container)); + + /*! + * @pixi/text - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/text is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Constants that define the type of gradient on text. + * + * @static + * @constant + * @name TEXT_GRADIENT + * @memberof PIXI + * @type {object} + * @property {number} LINEAR_VERTICAL Vertical gradient + * @property {number} LINEAR_HORIZONTAL Linear gradient + */ + var TEXT_GRADIENT = { + LINEAR_VERTICAL: 0, + LINEAR_HORIZONTAL: 1, + }; + + // disabling eslint for now, going to rewrite this in v5 + + var defaultStyle = { + align: 'left', + breakWords: false, + dropShadow: false, + dropShadowAlpha: 1, + dropShadowAngle: Math.PI / 6, + dropShadowBlur: 0, + dropShadowColor: 'black', + dropShadowDistance: 5, + fill: 'black', + fillGradientType: TEXT_GRADIENT.LINEAR_VERTICAL, + fillGradientStops: [], + fontFamily: 'Arial', + fontSize: 26, + fontStyle: 'normal', + fontVariant: 'normal', + fontWeight: 'normal', + letterSpacing: 0, + lineHeight: 0, + lineJoin: 'miter', + miterLimit: 10, + padding: 0, + stroke: 'black', + strokeThickness: 0, + textBaseline: 'alphabetic', + trim: false, + whiteSpace: 'pre', + wordWrap: false, + wordWrapWidth: 100, + leading: 0, + }; + + var genericFontFamilies = [ + 'serif', + 'sans-serif', + 'monospace', + 'cursive', + 'fantasy', + 'system-ui' ]; + + /** + * A TextStyle Object contains information to decorate a Text objects. + * + * An instance can be shared between multiple Text objects; then changing the style will update all text objects using it. + * + * A tool can be used to generate a text style [here](https://pixijs.io/pixi-text-style). + * + * @class + * @memberof PIXI + */ + var TextStyle = function TextStyle(style) + { + this.styleID = 0; + + this.reset(); + + deepCopyProperties(this, style, style); + }; + + var prototypeAccessors$7 = { align: { configurable: true },breakWords: { configurable: true },dropShadow: { configurable: true },dropShadowAlpha: { configurable: true },dropShadowAngle: { configurable: true },dropShadowBlur: { configurable: true },dropShadowColor: { configurable: true },dropShadowDistance: { configurable: true },fill: { configurable: true },fillGradientType: { configurable: true },fillGradientStops: { configurable: true },fontFamily: { configurable: true },fontSize: { configurable: true },fontStyle: { configurable: true },fontVariant: { configurable: true },fontWeight: { configurable: true },letterSpacing: { configurable: true },lineHeight: { configurable: true },leading: { configurable: true },lineJoin: { configurable: true },miterLimit: { configurable: true },padding: { configurable: true },stroke: { configurable: true },strokeThickness: { configurable: true },textBaseline: { configurable: true },trim: { configurable: true },whiteSpace: { configurable: true },wordWrap: { configurable: true },wordWrapWidth: { configurable: true } }; + + /** + * Creates a new TextStyle object with the same values as this one. + * Note that the only the properties of the object are cloned. + * + * @return {PIXI.TextStyle} New cloned TextStyle object + */ + TextStyle.prototype.clone = function clone () + { + var clonedProperties = {}; + + deepCopyProperties(clonedProperties, this, defaultStyle); + + return new TextStyle(clonedProperties); + }; + + /** + * Resets all properties to the defaults specified in TextStyle.prototype._default + */ + TextStyle.prototype.reset = function reset () + { + deepCopyProperties(this, defaultStyle, defaultStyle); + }; + + /** + * Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text + * + * @member {string} + */ + prototypeAccessors$7.align.get = function () + { + return this._align; + }; + prototypeAccessors$7.align.set = function (align) // eslint-disable-line require-jsdoc + { + if (this._align !== align) + { + this._align = align; + this.styleID++; + } + }; + + /** + * Indicates if lines can be wrapped within words, it needs wordWrap to be set to true + * + * @member {boolean} + */ + prototypeAccessors$7.breakWords.get = function () + { + return this._breakWords; + }; + prototypeAccessors$7.breakWords.set = function (breakWords) // eslint-disable-line require-jsdoc + { + if (this._breakWords !== breakWords) + { + this._breakWords = breakWords; + this.styleID++; + } + }; + + /** + * Set a drop shadow for the text + * + * @member {boolean} + */ + prototypeAccessors$7.dropShadow.get = function () + { + return this._dropShadow; + }; + prototypeAccessors$7.dropShadow.set = function (dropShadow) // eslint-disable-line require-jsdoc + { + if (this._dropShadow !== dropShadow) + { + this._dropShadow = dropShadow; + this.styleID++; + } + }; + + /** + * Set alpha for the drop shadow + * + * @member {number} + */ + prototypeAccessors$7.dropShadowAlpha.get = function () + { + return this._dropShadowAlpha; + }; + prototypeAccessors$7.dropShadowAlpha.set = function (dropShadowAlpha) // eslint-disable-line require-jsdoc + { + if (this._dropShadowAlpha !== dropShadowAlpha) + { + this._dropShadowAlpha = dropShadowAlpha; + this.styleID++; + } + }; + + /** + * Set a angle of the drop shadow + * + * @member {number} + */ + prototypeAccessors$7.dropShadowAngle.get = function () + { + return this._dropShadowAngle; + }; + prototypeAccessors$7.dropShadowAngle.set = function (dropShadowAngle) // eslint-disable-line require-jsdoc + { + if (this._dropShadowAngle !== dropShadowAngle) + { + this._dropShadowAngle = dropShadowAngle; + this.styleID++; + } + }; + + /** + * Set a shadow blur radius + * + * @member {number} + */ + prototypeAccessors$7.dropShadowBlur.get = function () + { + return this._dropShadowBlur; + }; + prototypeAccessors$7.dropShadowBlur.set = function (dropShadowBlur) // eslint-disable-line require-jsdoc + { + if (this._dropShadowBlur !== dropShadowBlur) + { + this._dropShadowBlur = dropShadowBlur; + this.styleID++; + } + }; + + /** + * A fill style to be used on the dropshadow e.g 'red', '#00FF00' + * + * @member {string|number} + */ + prototypeAccessors$7.dropShadowColor.get = function () + { + return this._dropShadowColor; + }; + prototypeAccessors$7.dropShadowColor.set = function (dropShadowColor) // eslint-disable-line require-jsdoc + { + var outputColor = getColor(dropShadowColor); + if (this._dropShadowColor !== outputColor) + { + this._dropShadowColor = outputColor; + this.styleID++; + } + }; + + /** + * Set a distance of the drop shadow + * + * @member {number} + */ + prototypeAccessors$7.dropShadowDistance.get = function () + { + return this._dropShadowDistance; + }; + prototypeAccessors$7.dropShadowDistance.set = function (dropShadowDistance) // eslint-disable-line require-jsdoc + { + if (this._dropShadowDistance !== dropShadowDistance) + { + this._dropShadowDistance = dropShadowDistance; + this.styleID++; + } + }; + + /** + * A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'. + * Can be an array to create a gradient eg ['#000000','#FFFFFF'] + * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN} + * + * @member {string|string[]|number|number[]|CanvasGradient|CanvasPattern} + */ + prototypeAccessors$7.fill.get = function () + { + return this._fill; + }; + prototypeAccessors$7.fill.set = function (fill) // eslint-disable-line require-jsdoc + { + var outputColor = getColor(fill); + if (this._fill !== outputColor) + { + this._fill = outputColor; + this.styleID++; + } + }; + + /** + * If fill is an array of colours to create a gradient, this can change the type/direction of the gradient. + * See {@link PIXI.TEXT_GRADIENT} + * + * @member {number} + */ + prototypeAccessors$7.fillGradientType.get = function () + { + return this._fillGradientType; + }; + prototypeAccessors$7.fillGradientType.set = function (fillGradientType) // eslint-disable-line require-jsdoc + { + if (this._fillGradientType !== fillGradientType) + { + this._fillGradientType = fillGradientType; + this.styleID++; + } + }; + + /** + * If fill is an array of colours to create a gradient, this array can set the stop points + * (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them. + * + * @member {number[]} + */ + prototypeAccessors$7.fillGradientStops.get = function () + { + return this._fillGradientStops; + }; + prototypeAccessors$7.fillGradientStops.set = function (fillGradientStops) // eslint-disable-line require-jsdoc + { + if (!areArraysEqual(this._fillGradientStops,fillGradientStops)) + { + this._fillGradientStops = fillGradientStops; + this.styleID++; + } + }; + + /** + * The font family + * + * @member {string|string[]} + */ + prototypeAccessors$7.fontFamily.get = function () + { + return this._fontFamily; + }; + prototypeAccessors$7.fontFamily.set = function (fontFamily) // eslint-disable-line require-jsdoc + { + if (this.fontFamily !== fontFamily) + { + this._fontFamily = fontFamily; + this.styleID++; + } + }; + + /** + * The font size + * (as a number it converts to px, but as a string, equivalents are '26px','20pt','160%' or '1.6em') + * + * @member {number|string} + */ + prototypeAccessors$7.fontSize.get = function () + { + return this._fontSize; + }; + prototypeAccessors$7.fontSize.set = function (fontSize) // eslint-disable-line require-jsdoc + { + if (this._fontSize !== fontSize) + { + this._fontSize = fontSize; + this.styleID++; + } + }; + + /** + * The font style + * ('normal', 'italic' or 'oblique') + * + * @member {string} + */ + prototypeAccessors$7.fontStyle.get = function () + { + return this._fontStyle; + }; + prototypeAccessors$7.fontStyle.set = function (fontStyle) // eslint-disable-line require-jsdoc + { + if (this._fontStyle !== fontStyle) + { + this._fontStyle = fontStyle; + this.styleID++; + } + }; + + /** + * The font variant + * ('normal' or 'small-caps') + * + * @member {string} + */ + prototypeAccessors$7.fontVariant.get = function () + { + return this._fontVariant; + }; + prototypeAccessors$7.fontVariant.set = function (fontVariant) // eslint-disable-line require-jsdoc + { + if (this._fontVariant !== fontVariant) + { + this._fontVariant = fontVariant; + this.styleID++; + } + }; + + /** + * The font weight + * ('normal', 'bold', 'bolder', 'lighter' and '100', '200', '300', '400', '500', '600', '700', 800' or '900') + * + * @member {string} + */ + prototypeAccessors$7.fontWeight.get = function () + { + return this._fontWeight; + }; + prototypeAccessors$7.fontWeight.set = function (fontWeight) // eslint-disable-line require-jsdoc + { + if (this._fontWeight !== fontWeight) + { + this._fontWeight = fontWeight; + this.styleID++; + } + }; + + /** + * The amount of spacing between letters, default is 0 + * + * @member {number} + */ + prototypeAccessors$7.letterSpacing.get = function () + { + return this._letterSpacing; + }; + prototypeAccessors$7.letterSpacing.set = function (letterSpacing) // eslint-disable-line require-jsdoc + { + if (this._letterSpacing !== letterSpacing) + { + this._letterSpacing = letterSpacing; + this.styleID++; + } + }; + + /** + * The line height, a number that represents the vertical space that a letter uses + * + * @member {number} + */ + prototypeAccessors$7.lineHeight.get = function () + { + return this._lineHeight; + }; + prototypeAccessors$7.lineHeight.set = function (lineHeight) // eslint-disable-line require-jsdoc + { + if (this._lineHeight !== lineHeight) + { + this._lineHeight = lineHeight; + this.styleID++; + } + }; + + /** + * The space between lines + * + * @member {number} + */ + prototypeAccessors$7.leading.get = function () + { + return this._leading; + }; + prototypeAccessors$7.leading.set = function (leading) // eslint-disable-line require-jsdoc + { + if (this._leading !== leading) + { + this._leading = leading; + this.styleID++; + } + }; + + /** + * The lineJoin property sets the type of corner created, it can resolve spiked text issues. + * Default is 'miter' (creates a sharp corner). + * + * @member {string} + */ + prototypeAccessors$7.lineJoin.get = function () + { + return this._lineJoin; + }; + prototypeAccessors$7.lineJoin.set = function (lineJoin) // eslint-disable-line require-jsdoc + { + if (this._lineJoin !== lineJoin) + { + this._lineJoin = lineJoin; + this.styleID++; + } + }; + + /** + * The miter limit to use when using the 'miter' lineJoin mode + * This can reduce or increase the spikiness of rendered text. + * + * @member {number} + */ + prototypeAccessors$7.miterLimit.get = function () + { + return this._miterLimit; + }; + prototypeAccessors$7.miterLimit.set = function (miterLimit) // eslint-disable-line require-jsdoc + { + if (this._miterLimit !== miterLimit) + { + this._miterLimit = miterLimit; + this.styleID++; + } + }; + + /** + * Occasionally some fonts are cropped. Adding some padding will prevent this from happening + * by adding padding to all sides of the text. + * + * @member {number} + */ + prototypeAccessors$7.padding.get = function () + { + return this._padding; + }; + prototypeAccessors$7.padding.set = function (padding) // eslint-disable-line require-jsdoc + { + if (this._padding !== padding) + { + this._padding = padding; + this.styleID++; + } + }; + + /** + * A canvas fillstyle that will be used on the text stroke + * e.g 'blue', '#FCFF00' + * + * @member {string|number} + */ + prototypeAccessors$7.stroke.get = function () + { + return this._stroke; + }; + prototypeAccessors$7.stroke.set = function (stroke) // eslint-disable-line require-jsdoc + { + var outputColor = getColor(stroke); + if (this._stroke !== outputColor) + { + this._stroke = outputColor; + this.styleID++; + } + }; + + /** + * A number that represents the thickness of the stroke. + * Default is 0 (no stroke) + * + * @member {number} + */ + prototypeAccessors$7.strokeThickness.get = function () + { + return this._strokeThickness; + }; + prototypeAccessors$7.strokeThickness.set = function (strokeThickness) // eslint-disable-line require-jsdoc + { + if (this._strokeThickness !== strokeThickness) + { + this._strokeThickness = strokeThickness; + this.styleID++; + } + }; + + /** + * The baseline of the text that is rendered. + * + * @member {string} + */ + prototypeAccessors$7.textBaseline.get = function () + { + return this._textBaseline; + }; + prototypeAccessors$7.textBaseline.set = function (textBaseline) // eslint-disable-line require-jsdoc + { + if (this._textBaseline !== textBaseline) + { + this._textBaseline = textBaseline; + this.styleID++; + } + }; + + /** + * Trim transparent borders + * + * @member {boolean} + */ + prototypeAccessors$7.trim.get = function () + { + return this._trim; + }; + prototypeAccessors$7.trim.set = function (trim) // eslint-disable-line require-jsdoc + { + if (this._trim !== trim) + { + this._trim = trim; + this.styleID++; + } + }; + + /** + * How newlines and spaces should be handled. + * Default is 'pre' (preserve, preserve). + * + * value | New lines | Spaces + * --- | --- | --- + * 'normal' | Collapse | Collapse + * 'pre' | Preserve | Preserve + * 'pre-line' | Preserve | Collapse + * + * @member {string} + */ + prototypeAccessors$7.whiteSpace.get = function () + { + return this._whiteSpace; + }; + prototypeAccessors$7.whiteSpace.set = function (whiteSpace) // eslint-disable-line require-jsdoc + { + if (this._whiteSpace !== whiteSpace) + { + this._whiteSpace = whiteSpace; + this.styleID++; + } + }; + + /** + * Indicates if word wrap should be used + * + * @member {boolean} + */ + prototypeAccessors$7.wordWrap.get = function () + { + return this._wordWrap; + }; + prototypeAccessors$7.wordWrap.set = function (wordWrap) // eslint-disable-line require-jsdoc + { + if (this._wordWrap !== wordWrap) + { + this._wordWrap = wordWrap; + this.styleID++; + } + }; + + /** + * The width at which text will wrap, it needs wordWrap to be set to true + * + * @member {number} + */ + prototypeAccessors$7.wordWrapWidth.get = function () + { + return this._wordWrapWidth; + }; + prototypeAccessors$7.wordWrapWidth.set = function (wordWrapWidth) // eslint-disable-line require-jsdoc + { + if (this._wordWrapWidth !== wordWrapWidth) + { + this._wordWrapWidth = wordWrapWidth; + this.styleID++; + } + }; + + /** + * Generates a font style string to use for `TextMetrics.measureFont()`. + * + * @return {string} Font style string, for passing to `TextMetrics.measureFont()` + */ + TextStyle.prototype.toFontString = function toFontString () + { + // build canvas api font setting from individual components. Convert a numeric this.fontSize to px + var fontSizeString = (typeof this.fontSize === 'number') ? ((this.fontSize) + "px") : this.fontSize; + + // Clean-up fontFamily property by quoting each font name + // this will support font names with spaces + var fontFamilies = this.fontFamily; + + if (!Array.isArray(this.fontFamily)) + { + fontFamilies = this.fontFamily.split(','); + } + + for (var i = fontFamilies.length - 1; i >= 0; i--) + { + // Trim any extra white-space + var fontFamily = fontFamilies[i].trim(); + + // Check if font already contains strings + if (!(/([\"\'])[^\'\"]+\1/).test(fontFamily) && genericFontFamilies.indexOf(fontFamily) < 0) + { + fontFamily = "\"" + fontFamily + "\""; + } + fontFamilies[i] = fontFamily; + } + + return ((this.fontStyle) + " " + (this.fontVariant) + " " + (this.fontWeight) + " " + fontSizeString + " " + (fontFamilies.join(','))); + }; + + Object.defineProperties( TextStyle.prototype, prototypeAccessors$7 ); + + /** + * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string. + * @private + * @param {number|number[]} color + * @return {string} The color as a string. + */ + function getSingleColor(color) + { + if (typeof color === 'number') + { + return hex2string(color); + } + else if ( typeof color === 'string' ) + { + if ( color.indexOf('0x') === 0 ) + { + color = color.replace('0x', '#'); + } + } + + return color; + } + + /** + * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string. + * This version can also convert array of colors + * @private + * @param {number|number[]} color + * @return {string} The color as a string. + */ + function getColor(color) + { + if (!Array.isArray(color)) + { + return getSingleColor(color); + } + else + { + for (var i = 0; i < color.length; ++i) + { + color[i] = getSingleColor(color[i]); + } + + return color; + } + } + + /** + * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string. + * This version can also convert array of colors + * @private + * @param {Array} array1 First array to compare + * @param {Array} array2 Second array to compare + * @return {boolean} Do the arrays contain the same values in the same order + */ + function areArraysEqual(array1, array2) + { + if (!Array.isArray(array1) || !Array.isArray(array2)) + { + return false; + } + + if (array1.length !== array2.length) + { + return false; + } + + for (var i = 0; i < array1.length; ++i) + { + if (array1[i] !== array2[i]) + { + return false; + } + } + + return true; + } + + /** + * Utility function to ensure that object properties are copied by value, and not by reference + * @private + * @param {Object} target Target object to copy properties into + * @param {Object} source Source object for the properties to copy + * @param {string} propertyObj Object containing properties names we want to loop over + */ + function deepCopyProperties(target, source, propertyObj) { + for (var prop in propertyObj) { + if (Array.isArray(source[prop])) { + target[prop] = source[prop].slice(); + } else { + target[prop] = source[prop]; + } + } + } + + /** + * The TextMetrics object represents the measurement of a block of text with a specified style. + * + * ```js + * let style = new PIXI.TextStyle({fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'}) + * let textMetrics = PIXI.TextMetrics.measureText('Your text', style) + * ``` + * + * @class + * @memberof PIXI + */ + var TextMetrics = function TextMetrics(text, style, width, height, lines, lineWidths, lineHeight, maxLineWidth, fontProperties) + { + /** + * The text that was measured + * + * @member {string} + */ + this.text = text; + + /** + * The style that was measured + * + * @member {PIXI.TextStyle} + */ + this.style = style; + + /** + * The measured width of the text + * + * @member {number} + */ + this.width = width; + + /** + * The measured height of the text + * + * @member {number} + */ + this.height = height; + + /** + * An array of lines of the text broken by new lines and wrapping is specified in style + * + * @member {string[]} + */ + this.lines = lines; + + /** + * An array of the line widths for each line matched to `lines` + * + * @member {number[]} + */ + this.lineWidths = lineWidths; + + /** + * The measured line height for this style + * + * @member {number} + */ + this.lineHeight = lineHeight; + + /** + * The maximum line width for all measured lines + * + * @member {number} + */ + this.maxLineWidth = maxLineWidth; + + /** + * The font properties object from TextMetrics.measureFont + * + * @member {PIXI.IFontMetrics} + */ + this.fontProperties = fontProperties; + }; + + /** + * Measures the supplied string of text and returns a Rectangle. + * + * @param {string} text - the text to measure. + * @param {PIXI.TextStyle} style - the text style to use for measuring + * @param {boolean} [wordWrap] - optional override for if word-wrap should be applied to the text. + * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring. + * @return {PIXI.TextMetrics} measured width and height of the text. + */ + TextMetrics.measureText = function measureText (text, style, wordWrap, canvas) + { + if ( canvas === void 0 ) { canvas = TextMetrics._canvas; } + + wordWrap = (wordWrap === undefined || wordWrap === null) ? style.wordWrap : wordWrap; + var font = style.toFontString(); + var fontProperties = TextMetrics.measureFont(font); + + // fallback in case UA disallow canvas data extraction + // (toDataURI, getImageData functions) + if (fontProperties.fontSize === 0) + { + fontProperties.fontSize = style.fontSize; + fontProperties.ascent = style.fontSize; + } + + var context = canvas.getContext('2d'); + + context.font = font; + + var outputText = wordWrap ? TextMetrics.wordWrap(text, style, canvas) : text; + var lines = outputText.split(/(?:\r\n|\r|\n)/); + var lineWidths = new Array(lines.length); + var maxLineWidth = 0; + + for (var i = 0; i < lines.length; i++) + { + var lineWidth = context.measureText(lines[i]).width + ((lines[i].length - 1) * style.letterSpacing); + + lineWidths[i] = lineWidth; + maxLineWidth = Math.max(maxLineWidth, lineWidth); + } + var width = maxLineWidth + style.strokeThickness; + + if (style.dropShadow) + { + width += style.dropShadowDistance; + } + + var lineHeight = style.lineHeight || fontProperties.fontSize + style.strokeThickness; + var height = Math.max(lineHeight, fontProperties.fontSize + style.strokeThickness) + + ((lines.length - 1) * (lineHeight + style.leading)); + + if (style.dropShadow) + { + height += style.dropShadowDistance; + } + + return new TextMetrics( + text, + style, + width, + height, + lines, + lineWidths, + lineHeight + style.leading, + maxLineWidth, + fontProperties + ); + }; + + /** + * Applies newlines to a string to have it optimally fit into the horizontal + * bounds set by the Text object's wordWrapWidth property. + * + * @private + * @param {string} text - String to apply word wrapping to + * @param {PIXI.TextStyle} style - the style to use when wrapping + * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring. + * @return {string} New string with new lines applied where required + */ + TextMetrics.wordWrap = function wordWrap (text, style, canvas) + { + if ( canvas === void 0 ) { canvas = TextMetrics._canvas; } + + var context = canvas.getContext('2d'); + + var width = 0; + var line = ''; + var lines = ''; + + var cache = {}; + var letterSpacing = style.letterSpacing; + var whiteSpace = style.whiteSpace; + + // How to handle whitespaces + var collapseSpaces = TextMetrics.collapseSpaces(whiteSpace); + var collapseNewlines = TextMetrics.collapseNewlines(whiteSpace); + + // whether or not spaces may be added to the beginning of lines + var canPrependSpaces = !collapseSpaces; + + // There is letterSpacing after every char except the last one + // t_h_i_s_' '_i_s_' '_a_n_' '_e_x_a_m_p_l_e_' '_! + // so for convenience the above needs to be compared to width + 1 extra letterSpace + // t_h_i_s_' '_i_s_' '_a_n_' '_e_x_a_m_p_l_e_' '_!_ + // ________________________________________________ + // And then the final space is simply no appended to each line + var wordWrapWidth = style.wordWrapWidth + letterSpacing; + + // break text into words, spaces and newline chars + var tokens = TextMetrics.tokenize(text); + + for (var i = 0; i < tokens.length; i++) + { + // get the word, space or newlineChar + var token = tokens[i]; + + // if word is a new line + if (TextMetrics.isNewline(token)) + { + // keep the new line + if (!collapseNewlines) + { + lines += TextMetrics.addLine(line); + canPrependSpaces = !collapseSpaces; + line = ''; + width = 0; + continue; + } + + // if we should collapse new lines + // we simply convert it into a space + token = ' '; + } + + // if we should collapse repeated whitespaces + if (collapseSpaces) + { + // check both this and the last tokens for spaces + var currIsBreakingSpace = TextMetrics.isBreakingSpace(token); + var lastIsBreakingSpace = TextMetrics.isBreakingSpace(line[line.length - 1]); + + if (currIsBreakingSpace && lastIsBreakingSpace) + { + continue; + } + } + + // get word width from cache if possible + var tokenWidth = TextMetrics.getFromCache(token, letterSpacing, cache, context); + + // word is longer than desired bounds + if (tokenWidth > wordWrapWidth) + { + // if we are not already at the beginning of a line + if (line !== '') + { + // start newlines for overflow words + lines += TextMetrics.addLine(line); + line = ''; + width = 0; + } + + // break large word over multiple lines + if (TextMetrics.canBreakWords(token, style.breakWords)) + { + // break word into characters + var characters = TextMetrics.wordWrapSplit(token); + + // loop the characters + for (var j = 0; j < characters.length; j++) + { + var char = characters[j]; + + var k = 1; + // we are not at the end of the token + + while (characters[j + k]) + { + var nextChar = characters[j + k]; + var lastChar = char[char.length - 1]; + + // should not split chars + if (!TextMetrics.canBreakChars(lastChar, nextChar, token, j, style.breakWords)) + { + // combine chars & move forward one + char += nextChar; + } + else + { + break; + } + + k++; + } + + j += char.length - 1; + + var characterWidth = TextMetrics.getFromCache(char, letterSpacing, cache, context); + + if (characterWidth + width > wordWrapWidth) + { + lines += TextMetrics.addLine(line); + canPrependSpaces = false; + line = ''; + width = 0; + } + + line += char; + width += characterWidth; + } + } + + // run word out of the bounds + else + { + // if there are words in this line already + // finish that line and start a new one + if (line.length > 0) + { + lines += TextMetrics.addLine(line); + line = ''; + width = 0; + } + + var isLastToken = i === tokens.length - 1; + + // give it its own line if it's not the end + lines += TextMetrics.addLine(token, !isLastToken); + canPrependSpaces = false; + line = ''; + width = 0; + } + } + + // word could fit + else + { + // word won't fit because of existing words + // start a new line + if (tokenWidth + width > wordWrapWidth) + { + // if its a space we don't want it + canPrependSpaces = false; + + // add a new line + lines += TextMetrics.addLine(line); + + // start a new line + line = ''; + width = 0; + } + + // don't add spaces to the beginning of lines + if (line.length > 0 || !TextMetrics.isBreakingSpace(token) || canPrependSpaces) + { + // add the word to the current line + line += token; + + // update width counter + width += tokenWidth; + } + } + } + + lines += TextMetrics.addLine(line, false); + + return lines; + }; + + /** + * Convienience function for logging each line added during the wordWrap + * method + * + * @private + * @param {string} line - The line of text to add + * @param {boolean} newLine - Add new line character to end + * @return {string} A formatted line + */ + TextMetrics.addLine = function addLine (line, newLine) + { + if ( newLine === void 0 ) { newLine = true; } + + line = TextMetrics.trimRight(line); + + line = (newLine) ? (line + "\n") : line; + + return line; + }; + + /** + * Gets & sets the widths of calculated characters in a cache object + * + * @private + * @param {string} key The key + * @param {number} letterSpacing The letter spacing + * @param {object} cache The cache + * @param {CanvasRenderingContext2D} context The canvas context + * @return {number} The from cache. + */ + TextMetrics.getFromCache = function getFromCache (key, letterSpacing, cache, context) + { + var width = cache[key]; + + if (width === undefined) + { + var spacing = ((key.length) * letterSpacing); + + width = context.measureText(key).width + spacing; + cache[key] = width; + } + + return width; + }; + + /** + * Determines whether we should collapse breaking spaces + * + * @private + * @param {string} whiteSpace The TextStyle property whiteSpace + * @return {boolean} should collapse + */ + TextMetrics.collapseSpaces = function collapseSpaces (whiteSpace) + { + return (whiteSpace === 'normal' || whiteSpace === 'pre-line'); + }; + + /** + * Determines whether we should collapse newLine chars + * + * @private + * @param {string} whiteSpace The white space + * @return {boolean} should collapse + */ + TextMetrics.collapseNewlines = function collapseNewlines (whiteSpace) + { + return (whiteSpace === 'normal'); + }; + + /** + * trims breaking whitespaces from string + * + * @private + * @param {string} text The text + * @return {string} trimmed string + */ + TextMetrics.trimRight = function trimRight (text) + { + if (typeof text !== 'string') + { + return ''; + } + + for (var i = text.length - 1; i >= 0; i--) + { + var char = text[i]; + + if (!TextMetrics.isBreakingSpace(char)) + { + break; + } + + text = text.slice(0, -1); + } + + return text; + }; + + /** + * Determines if char is a newline. + * + * @private + * @param {string} char The character + * @return {boolean} True if newline, False otherwise. + */ + TextMetrics.isNewline = function isNewline (char) + { + if (typeof char !== 'string') + { + return false; + } + + return (TextMetrics._newlines.indexOf(char.charCodeAt(0)) >= 0); + }; + + /** + * Determines if char is a breaking whitespace. + * + * @private + * @param {string} char The character + * @return {boolean} True if whitespace, False otherwise. + */ + TextMetrics.isBreakingSpace = function isBreakingSpace (char) + { + if (typeof char !== 'string') + { + return false; + } + + return (TextMetrics._breakingSpaces.indexOf(char.charCodeAt(0)) >= 0); + }; + + /** + * Splits a string into words, breaking-spaces and newLine characters + * + * @private + * @param {string} text The text + * @return {string[]} A tokenized array + */ + TextMetrics.tokenize = function tokenize (text) + { + var tokens = []; + var token = ''; + + if (typeof text !== 'string') + { + return tokens; + } + + for (var i = 0; i < text.length; i++) + { + var char = text[i]; + + if (TextMetrics.isBreakingSpace(char) || TextMetrics.isNewline(char)) + { + if (token !== '') + { + tokens.push(token); + token = ''; + } + + tokens.push(char); + + continue; + } + + token += char; + } + + if (token !== '') + { + tokens.push(token); + } + + return tokens; + }; + + /** + * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior. + * + * It allows one to customise which words should break + * Examples are if the token is CJK or numbers. + * It must return a boolean. + * + * @param {string} token The token + * @param {boolean} breakWords The style attr break words + * @return {boolean} whether to break word or not + */ + TextMetrics.canBreakWords = function canBreakWords (token, breakWords) + { + return breakWords; + }; + + /** + * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior. + * + * It allows one to determine whether a pair of characters + * should be broken by newlines + * For example certain characters in CJK langs or numbers. + * It must return a boolean. + * + * @param {string} char The character + * @param {string} nextChar The next character + * @param {string} token The token/word the characters are from + * @param {number} index The index in the token of the char + * @param {boolean} breakWords The style attr break words + * @return {boolean} whether to break word or not + */ + TextMetrics.canBreakChars = function canBreakChars (char, nextChar, token, index, breakWords) // eslint-disable-line no-unused-vars + { + return true; + }; + + /** + * Overridable helper method used internally by TextMetrics, exposed to allow customizing the class's behavior. + * + * It is called when a token (usually a word) has to be split into separate pieces + * in order to determine the point to break a word. + * It must return an array of characters. + * + * @example + * // Correctly splits emojis, eg "🤪🤪" will result in two element array, each with one emoji. + * TextMetrics.wordWrapSplit = (token) => [...token]; + * + * @param {string} token The token to split + * @return {string[]} The characters of the token + */ + TextMetrics.wordWrapSplit = function wordWrapSplit (token) + { + return token.split(''); + }; + + /** + * Calculates the ascent, descent and fontSize of a given font-style + * + * @static + * @param {string} font - String representing the style of the font + * @return {PIXI.IFontMetrics} Font properties object + */ + TextMetrics.measureFont = function measureFont (font) + { + // as this method is used for preparing assets, don't recalculate things if we don't need to + if (TextMetrics._fonts[font]) + { + return TextMetrics._fonts[font]; + } + + var properties = {}; + + var canvas = TextMetrics._canvas; + var context = TextMetrics._context; + + context.font = font; + + var metricsString = TextMetrics.METRICS_STRING + TextMetrics.BASELINE_SYMBOL; + var width = Math.ceil(context.measureText(metricsString).width); + var baseline = Math.ceil(context.measureText(TextMetrics.BASELINE_SYMBOL).width); + var height = 2 * baseline; + + baseline = baseline * TextMetrics.BASELINE_MULTIPLIER | 0; + + canvas.width = width; + canvas.height = height; + + context.fillStyle = '#f00'; + context.fillRect(0, 0, width, height); + + context.font = font; + + context.textBaseline = 'alphabetic'; + context.fillStyle = '#000'; + context.fillText(metricsString, 0, baseline); + + var imagedata = context.getImageData(0, 0, width, height).data; + var pixels = imagedata.length; + var line = width * 4; + + var i = 0; + var idx = 0; + var stop = false; + + // ascent. scan from top to bottom until we find a non red pixel + for (i = 0; i < baseline; ++i) + { + for (var j = 0; j < line; j += 4) + { + if (imagedata[idx + j] !== 255) + { + stop = true; + break; + } + } + if (!stop) + { + idx += line; + } + else + { + break; + } + } + + properties.ascent = baseline - i; + + idx = pixels - line; + stop = false; + + // descent. scan from bottom to top until we find a non red pixel + for (i = height; i > baseline; --i) + { + for (var j$1 = 0; j$1 < line; j$1 += 4) + { + if (imagedata[idx + j$1] !== 255) + { + stop = true; + break; + } + } + + if (!stop) + { + idx -= line; + } + else + { + break; + } + } + + properties.descent = i - baseline; + properties.fontSize = properties.ascent + properties.descent; + + TextMetrics._fonts[font] = properties; + + return properties; + }; + + /** + * Clear font metrics in metrics cache. + * + * @static + * @param {string} [font] - font name. If font name not set then clear cache for all fonts. + */ + TextMetrics.clearMetrics = function clearMetrics (font) + { + if ( font === void 0 ) { font = ''; } + + if (font) + { + delete TextMetrics._fonts[font]; + } + else + { + TextMetrics._fonts = {}; + } + }; + + /** + * Internal return object for {@link PIXI.TextMetrics.measureFont `TextMetrics.measureFont`}. + * + * @typedef {object} FontMetrics + * @property {number} ascent - The ascent distance + * @property {number} descent - The descent distance + * @property {number} fontSize - Font size from ascent to descent + * @memberof PIXI.TextMetrics + * @private + */ + + var canvas = (function () { + try + { + // OffscreenCanvas2D measureText can be up to 40% faster. + var c = new OffscreenCanvas(0, 0); + var context = c.getContext('2d'); + + if (context && context.measureText) + { + return c; + } + + return document.createElement('canvas'); + } + catch (ex) + { + return document.createElement('canvas'); + } + })(); + + canvas.width = canvas.height = 10; + + /** + * Cached canvas element for measuring text + * + * @memberof PIXI.TextMetrics + * @type {HTMLCanvasElement} + * @private + */ + TextMetrics._canvas = canvas; + + /** + * Cache for context to use. + * + * @memberof PIXI.TextMetrics + * @type {CanvasRenderingContext2D} + * @private + */ + TextMetrics._context = canvas.getContext('2d'); + + /** + * Cache of {@see PIXI.TextMetrics.FontMetrics} objects. + * + * @memberof PIXI.TextMetrics + * @type {Object} + * @private + */ + TextMetrics._fonts = {}; + + /** + * String used for calculate font metrics. + * These characters are all tall to help calculate the height required for text. + * + * @static + * @memberof PIXI.TextMetrics + * @name METRICS_STRING + * @type {string} + * @default |ÉqÅ + */ + TextMetrics.METRICS_STRING = '|ÉqÅ'; + + /** + * Baseline symbol for calculate font metrics. + * + * @static + * @memberof PIXI.TextMetrics + * @name BASELINE_SYMBOL + * @type {string} + * @default M + */ + TextMetrics.BASELINE_SYMBOL = 'M'; + + /** + * Baseline multiplier for calculate font metrics. + * + * @static + * @memberof PIXI.TextMetrics + * @name BASELINE_MULTIPLIER + * @type {number} + * @default 1.4 + */ + TextMetrics.BASELINE_MULTIPLIER = 1.4; + + /** + * Cache of new line chars. + * + * @memberof PIXI.TextMetrics + * @type {number[]} + * @private + */ + TextMetrics._newlines = [ + 0x000A, // line feed + 0x000D ]; + + /** + * Cache of breaking spaces. + * + * @memberof PIXI.TextMetrics + * @type {number[]} + * @private + */ + TextMetrics._breakingSpaces = [ + 0x0009, // character tabulation + 0x0020, // space + 0x2000, // en quad + 0x2001, // em quad + 0x2002, // en space + 0x2003, // em space + 0x2004, // three-per-em space + 0x2005, // four-per-em space + 0x2006, // six-per-em space + 0x2008, // punctuation space + 0x2009, // thin space + 0x200A, // hair space + 0x205F, // medium mathematical space + 0x3000 ]; + + /** + * A number, or a string containing a number. + * + * @memberof PIXI + * @typedef IFontMetrics + * @property {number} ascent - Font ascent + * @property {number} descent - Font descent + * @property {number} fontSize - Font size + */ + + /* eslint max-depth: [2, 8] */ + + var defaultDestroyOptions = { + texture: true, + children: false, + baseTexture: true, + }; + + /** + * A Text Object will create a line or multiple lines of text. + * + * The text is created using the [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API). + * + * The primary advantage of this class over BitmapText is that you have great control over the style of the next, + * which you can change at runtime. + * + * The primary disadvantages is that each piece of text has it's own texture, which can use more memory. + * When text changes, this texture has to be re-generated and re-uploaded to the GPU, taking up time. + * + * To split a line you can use '\n' in your text string, or, on the `style` object, + * change its `wordWrap` property to true and and give the `wordWrapWidth` property a value. + * + * A Text can be created directly from a string and a style object, + * which can be generated [here](https://pixijs.io/pixi-text-style). + * + * ```js + * let text = new PIXI.Text('This is a PixiJS text',{fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'}); + * ``` + * + * @class + * @extends PIXI.Sprite + * @memberof PIXI + */ + var Text = /*@__PURE__*/(function (Sprite) { + function Text(text, style, canvas) + { + var ownCanvas = false; + + if (!canvas) + { + canvas = document.createElement('canvas'); + ownCanvas = true; + } + + canvas.width = 3; + canvas.height = 3; + + var texture = Texture.from(canvas); + + texture.orig = new Rectangle(); + texture.trim = new Rectangle(); + + Sprite.call(this, texture); + + /** + * Keep track if this Text object created it's own canvas + * element (`true`) or uses the constructor argument (`false`). + * Used to workaround a GC issues with Safari < 13 when + * destroying Text. See `destroy` for more info. + * + * @member {boolean} + * @private + */ + this._ownCanvas = ownCanvas; + + /** + * The canvas element that everything is drawn to + * + * @member {HTMLCanvasElement} + */ + this.canvas = canvas; + + /** + * The canvas 2d context that everything is drawn with + * @member {CanvasRenderingContext2D} + */ + this.context = this.canvas.getContext('2d'); + + /** + * The resolution / device pixel ratio of the canvas. + * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually. + * @member {number} + * @default 1 + */ + this._resolution = settings.RESOLUTION; + this._autoResolution = true; + + /** + * Private tracker for the current text. + * + * @member {string} + * @private + */ + this._text = null; + + /** + * Private tracker for the current style. + * + * @member {object} + * @private + */ + this._style = null; + /** + * Private listener to track style changes. + * + * @member {Function} + * @private + */ + this._styleListener = null; + + /** + * Private tracker for the current font. + * + * @member {string} + * @private + */ + this._font = ''; + + this.text = text; + this.style = style; + + this.localStyleID = -1; + } + + if ( Sprite ) { Text.__proto__ = Sprite; } + Text.prototype = Object.create( Sprite && Sprite.prototype ); + Text.prototype.constructor = Text; + + var prototypeAccessors = { width: { configurable: true },height: { configurable: true },style: { configurable: true },text: { configurable: true },resolution: { configurable: true } }; + + /** + * Renders text and updates it when needed. + * + * @private + * @param {boolean} respectDirty - Whether to abort updating the text if the Text isn't dirty and the function is called. + */ + Text.prototype.updateText = function updateText (respectDirty) + { + var style = this._style; + + // check if style has changed.. + if (this.localStyleID !== style.styleID) + { + this.dirty = true; + this.localStyleID = style.styleID; + } + + if (!this.dirty && respectDirty) + { + return; + } + + this._font = this._style.toFontString(); + + var context = this.context; + var measured = TextMetrics.measureText(this._text || ' ', this._style, this._style.wordWrap, this.canvas); + var width = measured.width; + var height = measured.height; + var lines = measured.lines; + var lineHeight = measured.lineHeight; + var lineWidths = measured.lineWidths; + var maxLineWidth = measured.maxLineWidth; + var fontProperties = measured.fontProperties; + + this.canvas.width = Math.ceil((Math.max(1, width) + (style.padding * 2)) * this._resolution); + this.canvas.height = Math.ceil((Math.max(1, height) + (style.padding * 2)) * this._resolution); + + context.scale(this._resolution, this._resolution); + + context.clearRect(0, 0, this.canvas.width, this.canvas.height); + + context.font = this._font; + context.lineWidth = style.strokeThickness; + context.textBaseline = style.textBaseline; + context.lineJoin = style.lineJoin; + context.miterLimit = style.miterLimit; + + var linePositionX; + var linePositionY; + + // require 2 passes if a shadow; the first to draw the drop shadow, the second to draw the text + var passesCount = style.dropShadow ? 2 : 1; + + // For v4, we drew text at the colours of the drop shadow underneath the normal text. This gave the correct zIndex, + // but features such as alpha and shadowblur did not look right at all, since we were using actual text as a shadow. + // + // For v5.0.0, we moved over to just use the canvas API for drop shadows, which made them look much nicer and more + // visually please, but now because the stroke is drawn and then the fill, drop shadows would appear on both the fill + // and the stroke; and fill drop shadows would appear over the top of the stroke. + // + // For v5.1.1, the new route is to revert to v4 style of drawing text first to get the drop shadows underneath normal + // text, but instead drawing text in the correct location, we'll draw it off screen (-paddingY), and then adjust the + // drop shadow so only that appears on screen (+paddingY). Now we'll have the correct draw order of the shadow + // beneath the text, whilst also having the proper text shadow styling. + for (var i = 0; i < passesCount; ++i) + { + var isShadowPass = style.dropShadow && i === 0; + var dsOffsetText = isShadowPass ? height * 2 : 0; // we only want the drop shadow, so put text way off-screen + var dsOffsetShadow = dsOffsetText * this.resolution; + + if (isShadowPass) + { + // On Safari, text with gradient and drop shadows together do not position correctly + // if the scale of the canvas is not 1: https://bugs.webkit.org/show_bug.cgi?id=197689 + // Therefore we'll set the styles to be a plain black whilst generating this drop shadow + context.fillStyle = 'black'; + context.strokeStyle = 'black'; + + var dropShadowColor = style.dropShadowColor; + var rgb = hex2rgb(typeof dropShadowColor === 'number' ? dropShadowColor : string2hex(dropShadowColor)); + + context.shadowColor = "rgba(" + (rgb[0] * 255) + "," + (rgb[1] * 255) + "," + (rgb[2] * 255) + "," + (style.dropShadowAlpha) + ")"; + context.shadowBlur = style.dropShadowBlur; + context.shadowOffsetX = Math.cos(style.dropShadowAngle) * style.dropShadowDistance; + context.shadowOffsetY = (Math.sin(style.dropShadowAngle) * style.dropShadowDistance) + dsOffsetShadow; + } + else + { + // set canvas text styles + context.fillStyle = this._generateFillStyle(style, lines, measured); + // TODO: Can't have different types for getter and setter. The getter shouldn't have the number type as + // the setter converts to string. See this thread for more details: + // https://github.com/microsoft/TypeScript/issues/2521 + context.strokeStyle = style.stroke; + + context.shadowColor = 0; + context.shadowBlur = 0; + context.shadowOffsetX = 0; + context.shadowOffsetY = 0; + } + + // draw lines line by line + for (var i$1 = 0; i$1 < lines.length; i$1++) + { + linePositionX = style.strokeThickness / 2; + linePositionY = ((style.strokeThickness / 2) + (i$1 * lineHeight)) + fontProperties.ascent; + + if (style.align === 'right') + { + linePositionX += maxLineWidth - lineWidths[i$1]; + } + else if (style.align === 'center') + { + linePositionX += (maxLineWidth - lineWidths[i$1]) / 2; + } + + if (style.stroke && style.strokeThickness) + { + this.drawLetterSpacing( + lines[i$1], + linePositionX + style.padding, + linePositionY + style.padding - dsOffsetText, + true + ); + } + + if (style.fill) + { + this.drawLetterSpacing( + lines[i$1], + linePositionX + style.padding, + linePositionY + style.padding - dsOffsetText + ); + } + } + } + + this.updateTexture(); + }; + + /** + * Render the text with letter-spacing. + * @param {string} text - The text to draw + * @param {number} x - Horizontal position to draw the text + * @param {number} y - Vertical position to draw the text + * @param {boolean} [isStroke=false] - Is this drawing for the outside stroke of the + * text? If not, it's for the inside fill + * @private + */ + Text.prototype.drawLetterSpacing = function drawLetterSpacing (text, x, y, isStroke) + { + if ( isStroke === void 0 ) { isStroke = false; } + + var style = this._style; + + // letterSpacing of 0 means normal + var letterSpacing = style.letterSpacing; + + if (letterSpacing === 0) + { + if (isStroke) + { + this.context.strokeText(text, x, y); + } + else + { + this.context.fillText(text, x, y); + } + + return; + } + + var currentPosition = x; + + // Using Array.from correctly splits characters whilst keeping emoji together. + // This is not supported on IE as it requires ES6, so regular text splitting occurs. + // This also doesn't account for emoji that are multiple emoji put together to make something else. + // Handling all of this would require a big library itself. + // https://medium.com/@giltayar/iterating-over-emoji-characters-the-es6-way-f06e4589516 + // https://github.com/orling/grapheme-splitter + var stringArray = Array.from ? Array.from(text) : text.split(''); + var previousWidth = this.context.measureText(text).width; + var currentWidth = 0; + + for (var i = 0; i < stringArray.length; ++i) + { + var currentChar = stringArray[i]; + + if (isStroke) + { + this.context.strokeText(currentChar, currentPosition, y); + } + else + { + this.context.fillText(currentChar, currentPosition, y); + } + currentWidth = this.context.measureText(text.substring(i + 1)).width; + currentPosition += previousWidth - currentWidth + letterSpacing; + previousWidth = currentWidth; + } + }; + + /** + * Updates texture size based on canvas size + * + * @private + */ + Text.prototype.updateTexture = function updateTexture () + { + var canvas = this.canvas; + + if (this._style.trim) + { + var trimmed = trimCanvas(canvas); + + if (trimmed.data) + { + canvas.width = trimmed.width; + canvas.height = trimmed.height; + this.context.putImageData(trimmed.data, 0, 0); + } + } + + var texture = this._texture; + var style = this._style; + var padding = style.trim ? 0 : style.padding; + var baseTexture = texture.baseTexture; + + texture.trim.width = texture._frame.width = Math.ceil(canvas.width / this._resolution); + texture.trim.height = texture._frame.height = Math.ceil(canvas.height / this._resolution); + texture.trim.x = -padding; + texture.trim.y = -padding; + + texture.orig.width = texture._frame.width - (padding * 2); + texture.orig.height = texture._frame.height - (padding * 2); + + // call sprite onTextureUpdate to update scale if _width or _height were set + this._onTextureUpdate(); + + baseTexture.setRealSize(canvas.width, canvas.height, this._resolution); + + this.dirty = false; + }; + + /** + * Renders the object using the WebGL renderer + * + * @private + * @param {PIXI.Renderer} renderer - The renderer + */ + Text.prototype._render = function _render (renderer) + { + if (this._autoResolution && this._resolution !== renderer.resolution) + { + this._resolution = renderer.resolution; + this.dirty = true; + } + + this.updateText(true); + + Sprite.prototype._render.call(this, renderer); + }; + + /** + * Gets the local bounds of the text object. + * + * @param {PIXI.Rectangle} rect - The output rectangle. + * @return {PIXI.Rectangle} The bounds. + */ + Text.prototype.getLocalBounds = function getLocalBounds (rect) + { + this.updateText(true); + + return Sprite.prototype.getLocalBounds.call(this, rect); + }; + + /** + * calculates the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account. + * @protected + */ + Text.prototype._calculateBounds = function _calculateBounds () + { + this.updateText(true); + this.calculateVertices(); + // if we have already done this on THIS frame. + this._bounds.addQuad(this.vertexData); + }; + + /** + * Method to be called upon a TextStyle change. + * @private + */ + Text.prototype._onStyleChange = function _onStyleChange () + { + this.dirty = true; + }; + + /** + * Generates the fill style. Can automatically generate a gradient based on the fill style being an array + * + * @private + * @param {object} style - The style. + * @param {string[]} lines - The lines of text. + * @return {string|number|CanvasGradient} The fill style + */ + Text.prototype._generateFillStyle = function _generateFillStyle (style, lines, metrics) + { + if (!Array.isArray(style.fill)) + { + return style.fill; + } + else if (style.fill.length === 1) + { + return style.fill[0]; + } + + // the gradient will be evenly spaced out according to how large the array is. + // ['#FF0000', '#00FF00', '#0000FF'] would created stops at 0.25, 0.5 and 0.75 + var gradient; + + // a dropshadow will enlarge the canvas and result in the gradient being + // generated with the incorrect dimensions + var dropShadowCorrection = (style.dropShadow) ? style.dropShadowDistance : 0; + + // should also take padding into account, padding can offset the gradient + var padding = style.padding || 0; + + var width = Math.ceil(this.canvas.width / this._resolution) - dropShadowCorrection - (padding * 2); + var height = Math.ceil(this.canvas.height / this._resolution) - dropShadowCorrection - (padding * 2); + + // make a copy of the style settings, so we can manipulate them later + var fill = style.fill.slice(); + var fillGradientStops = style.fillGradientStops.slice(); + + // wanting to evenly distribute the fills. So an array of 4 colours should give fills of 0.25, 0.5 and 0.75 + if (!fillGradientStops.length) + { + var lengthPlus1 = fill.length + 1; + + for (var i = 1; i < lengthPlus1; ++i) + { + fillGradientStops.push(i / lengthPlus1); + } + } + + // stop the bleeding of the last gradient on the line above to the top gradient of the this line + // by hard defining the first gradient colour at point 0, and last gradient colour at point 1 + fill.unshift(style.fill[0]); + fillGradientStops.unshift(0); + + fill.push(style.fill[style.fill.length - 1]); + fillGradientStops.push(1); + + if (style.fillGradientType === TEXT_GRADIENT.LINEAR_VERTICAL) + { + // start the gradient at the top center of the canvas, and end at the bottom middle of the canvas + gradient = this.context.createLinearGradient(width / 2, padding, width / 2, height + padding); + + // we need to repeat the gradient so that each individual line of text has the same vertical gradient effect + // ['#FF0000', '#00FF00', '#0000FF'] over 2 lines would create stops at 0.125, 0.25, 0.375, 0.625, 0.75, 0.875 + + // There's potential for floating point precision issues at the seams between gradient repeats. + // The loop below generates the stops in order, so track the last generated one to prevent + // floating point precision from making us go the teeniest bit backwards, resulting in + // the first and last colors getting swapped. + var lastIterationStop = 0; + + // Actual height of the text itself, not counting spacing for lineHeight/leading/dropShadow etc + var textHeight = metrics.fontProperties.fontSize + style.strokeThickness; + + // textHeight, but as a 0-1 size in global gradient stop space + var gradStopLineHeight = textHeight / height; + + for (var i$1 = 0; i$1 < lines.length; i$1++) + { + var thisLineTop = metrics.lineHeight * i$1; + + for (var j = 0; j < fill.length; j++) + { + // 0-1 stop point for the current line, multiplied to global space afterwards + var lineStop = 0; + + if (typeof fillGradientStops[j] === 'number') + { + lineStop = fillGradientStops[j]; + } + else + { + lineStop = j / fill.length; + } + + var globalStop = (thisLineTop / height) + (lineStop * gradStopLineHeight); + + // Prevent color stop generation going backwards from floating point imprecision + var clampedStop = Math.max(lastIterationStop, globalStop); + + clampedStop = Math.min(clampedStop, 1); // Cap at 1 as well for safety's sake to avoid a possible throw. + gradient.addColorStop(clampedStop, fill[j]); + lastIterationStop = clampedStop; + } + } + } + else + { + // start the gradient at the center left of the canvas, and end at the center right of the canvas + gradient = this.context.createLinearGradient(padding, height / 2, width + padding, height / 2); + + // can just evenly space out the gradients in this case, as multiple lines makes no difference + // to an even left to right gradient + var totalIterations = fill.length + 1; + var currentIteration = 1; + + for (var i$2 = 0; i$2 < fill.length; i$2++) + { + var stop = (void 0); + + if (typeof fillGradientStops[i$2] === 'number') + { + stop = fillGradientStops[i$2]; + } + else + { + stop = currentIteration / totalIterations; + } + gradient.addColorStop(stop, fill[i$2]); + currentIteration++; + } + } + + return gradient; + }; + + /** + * Destroys this text object. + * Note* Unlike a Sprite, a Text object will automatically destroy its baseTexture and texture as + * the majority of the time the texture will not be shared with any other Sprites. + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their + * destroy method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=true] - Should it destroy the current texture of the sprite as well + * @param {boolean} [options.baseTexture=true] - Should it destroy the base texture of the sprite as well + */ + Text.prototype.destroy = function destroy (options) + { + if (typeof options === 'boolean') + { + options = { children: options }; + } + + options = Object.assign({}, defaultDestroyOptions, options); + + Sprite.prototype.destroy.call(this, options); + + // set canvas width and height to 0 to workaround memory leak in Safari < 13 + // https://stackoverflow.com/questions/52532614/total-canvas-memory-use-exceeds-the-maximum-limit-safari-12 + if (this._ownCanvas) + { + this.canvas.height = this.canvas.width = 0; + } + + // make sure to reset the the context and canvas.. dont want this hanging around in memory! + this.context = null; + this.canvas = null; + + this._style = null; + }; + + /** + * The width of the Text, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + prototypeAccessors.width.get = function () + { + this.updateText(true); + + return Math.abs(this.scale.x) * this._texture.orig.width; + }; + + prototypeAccessors.width.set = function (value) // eslint-disable-line require-jsdoc + { + this.updateText(true); + + var s = sign$1(this.scale.x) || 1; + + this.scale.x = s * value / this._texture.orig.width; + this._width = value; + }; + + /** + * The height of the Text, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + prototypeAccessors.height.get = function () + { + this.updateText(true); + + return Math.abs(this.scale.y) * this._texture.orig.height; + }; + + prototypeAccessors.height.set = function (value) // eslint-disable-line require-jsdoc + { + this.updateText(true); + + var s = sign$1(this.scale.y) || 1; + + this.scale.y = s * value / this._texture.orig.height; + this._height = value; + }; + + /** + * Set the style of the text. Set up an event listener to listen for changes on the style + * object and mark the text as dirty. + * + * @member {object|PIXI.TextStyle} + */ + prototypeAccessors.style.get = function () + { + return this._style; + }; + + prototypeAccessors.style.set = function (style) // eslint-disable-line require-jsdoc + { + style = style || {}; + + if (style instanceof TextStyle) + { + this._style = style; + } + else + { + this._style = new TextStyle(style); + } + + this.localStyleID = -1; + this.dirty = true; + }; + + /** + * Set the copy for the text object. To split a line you can use '\n'. + * + * @member {string} + */ + prototypeAccessors.text.get = function () + { + return this._text; + }; + + prototypeAccessors.text.set = function (text) // eslint-disable-line require-jsdoc + { + text = String(text === null || text === undefined ? '' : text); + + if (this._text === text) + { + return; + } + this._text = text; + this.dirty = true; + }; + + /** + * The resolution / device pixel ratio of the canvas. + * This is set to automatically match the renderer resolution by default, but can be overridden by setting manually. + * @member {number} + * @default 1 + */ + prototypeAccessors.resolution.get = function () + { + return this._resolution; + }; + + prototypeAccessors.resolution.set = function (value) // eslint-disable-line require-jsdoc + { + this._autoResolution = false; + + if (this._resolution === value) + { + return; + } + + this._resolution = value; + this.dirty = true; + }; + + Object.defineProperties( Text.prototype, prototypeAccessors ); + + return Text; + }(Sprite)); + + /*! + * @pixi/prepare - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/prepare is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Default number of uploads per frame using prepare plugin. + * + * @static + * @memberof PIXI.settings + * @name UPLOADS_PER_FRAME + * @type {number} + * @default 4 + */ + settings.UPLOADS_PER_FRAME = 4; + + /** + * CountLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified + * number of items per frame. + * + * @class + * @memberof PIXI + */ + var CountLimiter = function CountLimiter(maxItemsPerFrame) + { + /** + * The maximum number of items that can be prepared each frame. + * @type {number} + * @private + */ + this.maxItemsPerFrame = maxItemsPerFrame; + /** + * The number of items that can be prepared in the current frame. + * @type {number} + * @private + */ + this.itemsLeft = 0; + }; + + /** + * Resets any counting properties to start fresh on a new frame. + */ + CountLimiter.prototype.beginFrame = function beginFrame () + { + this.itemsLeft = this.maxItemsPerFrame; + }; + + /** + * Checks to see if another item can be uploaded. This should only be called once per item. + * @return {boolean} If the item is allowed to be uploaded. + */ + CountLimiter.prototype.allowedToUpload = function allowedToUpload () + { + return this.itemsLeft-- > 0; + }; + + /** + * The prepare manager provides functionality to upload content to the GPU. + * + * BasePrepare handles basic queuing functionality and is extended by + * {@link PIXI.Prepare} and {@link PIXI.CanvasPrepare} + * to provide preparation capabilities specific to their respective renderers. + * + * @example + * // Create a sprite + * const sprite = PIXI.Sprite.from('something.png'); + * + * // Load object into GPU + * app.renderer.plugins.prepare.upload(sprite, () => { + * + * //Texture(s) has been uploaded to GPU + * app.stage.addChild(sprite); + * + * }) + * + * @abstract + * @class + * @memberof PIXI + */ + var BasePrepare = function BasePrepare(renderer) + { + var this$1 = this; + + /** + * The limiter to be used to control how quickly items are prepared. + * @type {PIXI.CountLimiter|PIXI.TimeLimiter} + */ + this.limiter = new CountLimiter(settings.UPLOADS_PER_FRAME); + + /** + * Reference to the renderer. + * @type {PIXI.AbstractRenderer} + * @protected + */ + this.renderer = renderer; + + /** + * The only real difference between CanvasPrepare and Prepare is what they pass + * to upload hooks. That different parameter is stored here. + * @type {object} + * @protected + */ + this.uploadHookHelper = null; + + /** + * Collection of items to uploads at once. + * @type {Array<*>} + * @private + */ + this.queue = []; + + /** + * Collection of additional hooks for finding assets. + * @type {Array} + * @private + */ + this.addHooks = []; + + /** + * Collection of additional hooks for processing assets. + * @type {Array} + * @private + */ + this.uploadHooks = []; + + /** + * Callback to call after completed. + * @type {Array} + * @private + */ + this.completes = []; + + /** + * If prepare is ticking (running). + * @type {boolean} + * @private + */ + this.ticking = false; + + /** + * 'bound' call for prepareItems(). + * @type {Function} + * @private + */ + this.delayedTick = function () { + // unlikely, but in case we were destroyed between tick() and delayedTick() + if (!this$1.queue) + { + return; + } + this$1.prepareItems(); + }; + + // hooks to find the correct texture + this.registerFindHook(findText); + this.registerFindHook(findTextStyle); + this.registerFindHook(findMultipleBaseTextures); + this.registerFindHook(findBaseTexture); + this.registerFindHook(findTexture); + + // upload hooks + this.registerUploadHook(drawText); + this.registerUploadHook(calculateTextStyle); + }; + + /** + * Upload all the textures and graphics to the GPU. + * + * @param {Function|PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} item - + * Either the container or display object to search for items to upload, the items to upload themselves, + * or the callback function, if items have been added using `prepare.add`. + * @param {Function} [done] - Optional callback when all queued uploads have completed + */ + BasePrepare.prototype.upload = function upload (item, done) + { + if (typeof item === 'function') + { + done = item; + item = null; + } + + // If a display object, search for items + // that we could upload + if (item) + { + this.add(item); + } + + // Get the items for upload from the display + if (this.queue.length) + { + if (done) + { + this.completes.push(done); + } + + if (!this.ticking) + { + this.ticking = true; + Ticker.system.addOnce(this.tick, this, exports.UPDATE_PRIORITY.UTILITY); + } + } + else if (done) + { + done(); + } + }; + + /** + * Handle tick update + * + * @private + */ + BasePrepare.prototype.tick = function tick () + { + setTimeout(this.delayedTick, 0); + }; + + /** + * Actually prepare items. This is handled outside of the tick because it will take a while + * and we do NOT want to block the current animation frame from rendering. + * + * @private + */ + BasePrepare.prototype.prepareItems = function prepareItems () + { + this.limiter.beginFrame(); + // Upload the graphics + while (this.queue.length && this.limiter.allowedToUpload()) + { + var item = this.queue[0]; + var uploaded = false; + + if (item && !item._destroyed) + { + for (var i = 0, len = this.uploadHooks.length; i < len; i++) + { + if (this.uploadHooks[i](this.uploadHookHelper, item)) + { + this.queue.shift(); + uploaded = true; + break; + } + } + } + + if (!uploaded) + { + this.queue.shift(); + } + } + + // We're finished + if (!this.queue.length) + { + this.ticking = false; + + var completes = this.completes.slice(0); + + this.completes.length = 0; + + for (var i$1 = 0, len$1 = completes.length; i$1 < len$1; i$1++) + { + completes[i$1](); + } + } + else + { + // if we are not finished, on the next rAF do this again + Ticker.system.addOnce(this.tick, this, exports.UPDATE_PRIORITY.UTILITY); + } + }; + + /** + * Adds hooks for finding items. + * + * @param {Function} addHook - Function call that takes two parameters: `item:*, queue:Array` + * function must return `true` if it was able to add item to the queue. + * @return {this} Instance of plugin for chaining. + */ + BasePrepare.prototype.registerFindHook = function registerFindHook (addHook) + { + if (addHook) + { + this.addHooks.push(addHook); + } + + return this; + }; + + /** + * Adds hooks for uploading items. + * + * @param {Function} uploadHook - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and + * function must return `true` if it was able to handle upload of item. + * @return {this} Instance of plugin for chaining. + */ + BasePrepare.prototype.registerUploadHook = function registerUploadHook (uploadHook) + { + if (uploadHook) + { + this.uploadHooks.push(uploadHook); + } + + return this; + }; + + /** + * Manually add an item to the uploading queue. + * + * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text|*} item - Object to + * add to the queue + * @return {this} Instance of plugin for chaining. + */ + BasePrepare.prototype.add = function add (item) + { + // Add additional hooks for finding elements on special + // types of objects that + for (var i = 0, len = this.addHooks.length; i < len; i++) + { + if (this.addHooks[i](item, this.queue)) + { + break; + } + } + + // Get children recursively + if (item instanceof Container) + { + for (var i$1 = item.children.length - 1; i$1 >= 0; i$1--) + { + this.add(item.children[i$1]); + } + } + + return this; + }; + + /** + * Destroys the plugin, don't use after this. + * + */ + BasePrepare.prototype.destroy = function destroy () + { + if (this.ticking) + { + Ticker.system.remove(this.tick, this); + } + this.ticking = false; + this.addHooks = null; + this.uploadHooks = null; + this.renderer = null; + this.completes = null; + this.queue = null; + this.limiter = null; + this.uploadHookHelper = null; + }; + + /** + * Built-in hook to find multiple textures from objects like AnimatedSprites. + * + * @private + * @param {PIXI.DisplayObject} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.Texture object was found. + */ + function findMultipleBaseTextures(item, queue) + { + var result = false; + + // Objects with multiple textures + if (item && item._textures && item._textures.length) + { + for (var i = 0; i < item._textures.length; i++) + { + if (item._textures[i] instanceof Texture) + { + var baseTexture = item._textures[i].baseTexture; + + if (queue.indexOf(baseTexture) === -1) + { + queue.push(baseTexture); + result = true; + } + } + } + } + + return result; + } + + /** + * Built-in hook to find BaseTextures from Texture. + * + * @private + * @param {PIXI.Texture} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.Texture object was found. + */ + function findBaseTexture(item, queue) + { + if (item.baseTexture instanceof BaseTexture) + { + var texture = item.baseTexture; + + if (queue.indexOf(texture) === -1) + { + queue.push(texture); + } + + return true; + } + + return false; + } + + /** + * Built-in hook to find textures from objects. + * + * @private + * @param {PIXI.DisplayObject} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.Texture object was found. + */ + function findTexture(item, queue) + { + if (item._texture && item._texture instanceof Texture) + { + var texture = item._texture.baseTexture; + + if (queue.indexOf(texture) === -1) + { + queue.push(texture); + } + + return true; + } + + return false; + } + + /** + * Built-in hook to draw PIXI.Text to its texture. + * + * @private + * @param {PIXI.Renderer|PIXI.CanvasPrepare} helper - Not used by this upload handler + * @param {PIXI.DisplayObject} item - Item to check + * @return {boolean} If item was uploaded. + */ + function drawText(helper, item) + { + if (item instanceof Text) + { + // updating text will return early if it is not dirty + item.updateText(true); + + return true; + } + + return false; + } + + /** + * Built-in hook to calculate a text style for a PIXI.Text object. + * + * @private + * @param {PIXI.Renderer|PIXI.CanvasPrepare} helper - Not used by this upload handler + * @param {PIXI.DisplayObject} item - Item to check + * @return {boolean} If item was uploaded. + */ + function calculateTextStyle(helper, item) + { + if (item instanceof TextStyle) + { + var font = item.toFontString(); + + TextMetrics.measureFont(font); + + return true; + } + + return false; + } + + /** + * Built-in hook to find Text objects. + * + * @private + * @param {PIXI.DisplayObject} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.Text object was found. + */ + function findText(item, queue) + { + if (item instanceof Text) + { + // push the text style to prepare it - this can be really expensive + if (queue.indexOf(item.style) === -1) + { + queue.push(item.style); + } + // also push the text object so that we can render it (to canvas/texture) if needed + if (queue.indexOf(item) === -1) + { + queue.push(item); + } + // also push the Text's texture for upload to GPU + var texture = item._texture.baseTexture; + + if (queue.indexOf(texture) === -1) + { + queue.push(texture); + } + + return true; + } + + return false; + } + + /** + * Built-in hook to find TextStyle objects. + * + * @private + * @param {PIXI.TextStyle} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.TextStyle object was found. + */ + function findTextStyle(item, queue) + { + if (item instanceof TextStyle) + { + if (queue.indexOf(item) === -1) + { + queue.push(item); + } + + return true; + } + + return false; + } + + /** + * The prepare plugin provides renderer-specific plugins for pre-rendering DisplayObjects. These plugins are useful for + * asynchronously preparing and uploading to the GPU assets, textures, graphics waiting to be displayed. + * + * Do not instantiate this plugin directly. It is available from the `renderer.plugins` property. + * See {@link PIXI.CanvasRenderer#plugins} or {@link PIXI.Renderer#plugins}. + * @example + * // Create a new application + * const app = new PIXI.Application(); + * document.body.appendChild(app.view); + * + * // Don't start rendering right away + * app.stop(); + * + * // create a display object + * const rect = new PIXI.Graphics() + * .beginFill(0x00ff00) + * .drawRect(40, 40, 200, 200); + * + * // Add to the stage + * app.stage.addChild(rect); + * + * // Don't start rendering until the graphic is uploaded to the GPU + * app.renderer.plugins.prepare.upload(app.stage, () => { + * app.start(); + * }); + * + * @class + * @extends PIXI.BasePrepare + * @memberof PIXI + */ + var Prepare = /*@__PURE__*/(function (BasePrepare) { + function Prepare(renderer) + { + BasePrepare.call(this, renderer); + + this.uploadHookHelper = this.renderer; + + // Add textures and graphics to upload + this.registerFindHook(findGraphics); + this.registerUploadHook(uploadBaseTextures); + this.registerUploadHook(uploadGraphics); + } + + if ( BasePrepare ) { Prepare.__proto__ = BasePrepare; } + Prepare.prototype = Object.create( BasePrepare && BasePrepare.prototype ); + Prepare.prototype.constructor = Prepare; + + return Prepare; + }(BasePrepare)); + /** + * Built-in hook to upload PIXI.Texture objects to the GPU. + * + * @private + * @param {PIXI.Renderer} renderer - instance of the webgl renderer + * @param {PIXI.BaseTexture} item - Item to check + * @return {boolean} If item was uploaded. + */ + function uploadBaseTextures(renderer, item) + { + if (item instanceof BaseTexture) + { + // if the texture already has a GL texture, then the texture has been prepared or rendered + // before now. If the texture changed, then the changer should be calling texture.update() which + // reuploads the texture without need for preparing it again + if (!item._glTextures[renderer.CONTEXT_UID]) + { + renderer.texture.bind(item); + } + + return true; + } + + return false; + } + + /** + * Built-in hook to upload PIXI.Graphics to the GPU. + * + * @private + * @param {PIXI.Renderer} renderer - instance of the webgl renderer + * @param {PIXI.DisplayObject} item - Item to check + * @return {boolean} If item was uploaded. + */ + function uploadGraphics(renderer, item) + { + if (!(item instanceof Graphics)) + { + return false; + } + + var geometry = item.geometry; + + // update dirty graphics to get batches + item.finishPoly(); + geometry.updateBatches(); + + var batches = geometry.batches; + + // upload all textures found in styles + for (var i = 0; i < batches.length; i++) + { + var ref = batches[i].style; + var texture = ref.texture; + + if (texture) + { + uploadBaseTextures(renderer, texture.baseTexture); + } + } + + // if its not batchable - update vao for particular shader + if (!geometry.batchable) + { + renderer.geometry.bind(geometry, item._resolveDirectShader(renderer)); + } + + return true; + } + + /** + * Built-in hook to find graphics. + * + * @private + * @param {PIXI.DisplayObject} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.Graphics object was found. + */ + function findGraphics(item, queue) + { + if (item instanceof Graphics) + { + queue.push(item); + + return true; + } + + return false; + } + + /** + * TimeLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified + * number of milliseconds per frame. + * + * @class + * @memberof PIXI + */ + var TimeLimiter = function TimeLimiter(maxMilliseconds) + { + /** + * The maximum milliseconds that can be spent preparing items each frame. + * @type {number} + * @private + */ + this.maxMilliseconds = maxMilliseconds; + /** + * The start time of the current frame. + * @type {number} + * @private + */ + this.frameStart = 0; + }; + + /** + * Resets any counting properties to start fresh on a new frame. + */ + TimeLimiter.prototype.beginFrame = function beginFrame () + { + this.frameStart = Date.now(); + }; + + /** + * Checks to see if another item can be uploaded. This should only be called once per item. + * @return {boolean} If the item is allowed to be uploaded. + */ + TimeLimiter.prototype.allowedToUpload = function allowedToUpload () + { + return Date.now() - this.frameStart < this.maxMilliseconds; + }; + + /*! + * @pixi/spritesheet - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/spritesheet is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Utility class for maintaining reference to a collection + * of Textures on a single Spritesheet. + * + * To access a sprite sheet from your code pass its JSON data file to Pixi's loader: + * + * ```js + * PIXI.Loader.shared.add("images/spritesheet.json").load(setup); + * + * function setup() { + * let sheet = PIXI.Loader.shared.resources["images/spritesheet.json"].spritesheet; + * ... + * } + * ``` + * With the `sheet.textures` you can create Sprite objects,`sheet.animations` can be used to create an AnimatedSprite. + * + * Sprite sheets can be packed using tools like {@link https://codeandweb.com/texturepacker|TexturePacker}, + * {@link https://renderhjs.net/shoebox/|Shoebox} or {@link https://github.com/krzysztof-o/spritesheet.js|Spritesheet.js}. + * Default anchor points (see {@link PIXI.Texture#defaultAnchor}) and grouping of animation sprites are currently only + * supported by TexturePacker. + * + * @class + * @memberof PIXI + */ + var Spritesheet = function Spritesheet(texture, data, resolutionFilename) + { + if ( resolutionFilename === void 0 ) { resolutionFilename = null; } + + /** + * Reference to original source image from the Loader. This reference is retained so we + * can destroy the Texture later on. It is never used internally. + * @type {PIXI.Texture} + * @private + */ + this._texture = texture instanceof Texture ? texture : null; + + /** + * Reference to ths source texture. + * @type {PIXI.BaseTexture} + */ + this.baseTexture = texture instanceof BaseTexture ? texture : this._texture.baseTexture; + + /** + * A map containing all textures of the sprite sheet. + * Can be used to create a {@link PIXI.Sprite|Sprite}: + * ```js + * new PIXI.Sprite(sheet.textures["image.png"]); + * ``` + * @member {Object} + */ + this.textures = {}; + + /** + * A map containing the textures for each animation. + * Can be used to create an {@link PIXI.AnimatedSprite|AnimatedSprite}: + * ```js + * new PIXI.AnimatedSprite(sheet.animations["anim_name"]) + * ``` + * @member {Object} + */ + this.animations = {}; + + /** + * Reference to the original JSON data. + * @type {Object} + */ + this.data = data; + + /** + * The resolution of the spritesheet. + * @type {number} + */ + this.resolution = this._updateResolution( + resolutionFilename + || (this.baseTexture.resource ? this.baseTexture.resource.url : null) + ); + + /** + * Map of spritesheet frames. + * @type {Object} + * @private + */ + this._frames = this.data.frames; + + /** + * Collection of frame names. + * @type {string[]} + * @private + */ + this._frameKeys = Object.keys(this._frames); + + /** + * Current batch index being processed. + * @type {number} + * @private + */ + this._batchIndex = 0; + + /** + * Callback when parse is completed. + * @type {Function} + * @private + */ + this._callback = null; + }; + + var staticAccessors$2 = { BATCH_SIZE: { configurable: true } }; + + /** + * Generate the resolution from the filename or fallback + * to the meta.scale field of the JSON data. + * + * @private + * @param {string} resolutionFilename - The filename to use for resolving + * the default resolution. + * @return {number} Resolution to use for spritesheet. + */ + staticAccessors$2.BATCH_SIZE.get = function () + { + return 1000; + }; + + Spritesheet.prototype._updateResolution = function _updateResolution (resolutionFilename) + { + var scale = this.data.meta.scale; + + // Use a defaultValue of `null` to check if a url-based resolution is set + var resolution = getResolutionOfUrl(resolutionFilename, null); + + // No resolution found via URL + if (resolution === null) + { + // Use the scale value or default to 1 + resolution = scale !== undefined ? parseFloat(scale) : 1; + } + + // For non-1 resolutions, update baseTexture + if (resolution !== 1) + { + this.baseTexture.setResolution(resolution); + } + + return resolution; + }; + + /** + * Parser spritesheet from loaded data. This is done asynchronously + * to prevent creating too many Texture within a single process. + * + * @param {Function} callback - Callback when complete returns + * a map of the Textures for this spritesheet. + */ + Spritesheet.prototype.parse = function parse (callback) + { + this._batchIndex = 0; + this._callback = callback; + + if (this._frameKeys.length <= Spritesheet.BATCH_SIZE) + { + this._processFrames(0); + this._processAnimations(); + this._parseComplete(); + } + else + { + this._nextBatch(); + } + }; + + /** + * Process a batch of frames + * + * @private + * @param {number} initialFrameIndex - The index of frame to start. + */ + Spritesheet.prototype._processFrames = function _processFrames (initialFrameIndex) + { + var frameIndex = initialFrameIndex; + var maxFrames = Spritesheet.BATCH_SIZE; + + while (frameIndex - initialFrameIndex < maxFrames && frameIndex < this._frameKeys.length) + { + var i = this._frameKeys[frameIndex]; + var data = this._frames[i]; + var rect = data.frame; + + if (rect) + { + var frame = null; + var trim = null; + var sourceSize = data.trimmed !== false && data.sourceSize + ? data.sourceSize : data.frame; + + var orig = new Rectangle( + 0, + 0, + Math.floor(sourceSize.w) / this.resolution, + Math.floor(sourceSize.h) / this.resolution + ); + + if (data.rotated) + { + frame = new Rectangle( + Math.floor(rect.x) / this.resolution, + Math.floor(rect.y) / this.resolution, + Math.floor(rect.h) / this.resolution, + Math.floor(rect.w) / this.resolution + ); + } + else + { + frame = new Rectangle( + Math.floor(rect.x) / this.resolution, + Math.floor(rect.y) / this.resolution, + Math.floor(rect.w) / this.resolution, + Math.floor(rect.h) / this.resolution + ); + } + + // Check to see if the sprite is trimmed + if (data.trimmed !== false && data.spriteSourceSize) + { + trim = new Rectangle( + Math.floor(data.spriteSourceSize.x) / this.resolution, + Math.floor(data.spriteSourceSize.y) / this.resolution, + Math.floor(rect.w) / this.resolution, + Math.floor(rect.h) / this.resolution + ); + } + + this.textures[i] = new Texture( + this.baseTexture, + frame, + orig, + trim, + data.rotated ? 2 : 0, + data.anchor + ); + + // lets also add the frame to pixi's global cache for 'from' and 'fromLoader' functions + Texture.addToCache(this.textures[i], i); + } + + frameIndex++; + } + }; + + /** + * Parse animations config + * + * @private + */ + Spritesheet.prototype._processAnimations = function _processAnimations () + { + var animations = this.data.animations || {}; + + for (var animName in animations) + { + this.animations[animName] = []; + for (var i = 0; i < animations[animName].length; i++) + { + var frameName = animations[animName][i]; + + this.animations[animName].push(this.textures[frameName]); + } + } + }; + + /** + * The parse has completed. + * + * @private + */ + Spritesheet.prototype._parseComplete = function _parseComplete () + { + var callback = this._callback; + + this._callback = null; + this._batchIndex = 0; + callback.call(this, this.textures); + }; + + /** + * Begin the next batch of textures. + * + * @private + */ + Spritesheet.prototype._nextBatch = function _nextBatch () + { + var this$1 = this; + + this._processFrames(this._batchIndex * Spritesheet.BATCH_SIZE); + this._batchIndex++; + setTimeout(function () { + if (this$1._batchIndex * Spritesheet.BATCH_SIZE < this$1._frameKeys.length) + { + this$1._nextBatch(); + } + else + { + this$1._processAnimations(); + this$1._parseComplete(); + } + }, 0); + }; + + /** + * Destroy Spritesheet and don't use after this. + * + * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well + */ + Spritesheet.prototype.destroy = function destroy (destroyBase) + { + if ( destroyBase === void 0 ) { destroyBase = false; } + + for (var i in this.textures) + { + this.textures[i].destroy(); + } + this._frames = null; + this._frameKeys = null; + this.data = null; + this.textures = null; + if (destroyBase) + { + if (this._texture) + { + this._texture.destroy(); + } + this.baseTexture.destroy(); + } + this._texture = null; + this.baseTexture = null; + }; + + Object.defineProperties( Spritesheet, staticAccessors$2 ); + + /** + * {@link PIXI.Loader Loader} middleware for loading texture atlases that have been created with + * TexturePacker or similar JSON-based spritesheet. + * + * This middleware automatically generates Texture resources. + * + * @class + * @memberof PIXI + * @implements PIXI.ILoaderPlugin + */ + var SpritesheetLoader = function SpritesheetLoader () {}; + + SpritesheetLoader.use = function use (resource, next) + { + var imageResourceName = (resource.name) + "_image"; + + // skip if no data, its not json, it isn't spritesheet data, or the image resource already exists + if (!resource.data + || resource.type !== LoaderResource.TYPE.JSON + || !resource.data.frames + || this.resources[imageResourceName] + ) + { + next(); + + return; + } + + var loadOptions = { + crossOrigin: resource.crossOrigin, + metadata: resource.metadata.imageMetadata, + parentResource: resource, + }; + + var resourcePath = SpritesheetLoader.getResourcePath(resource, this.baseUrl); + + // load the image for this sheet + this.add(imageResourceName, resourcePath, loadOptions, function onImageLoad(res) + { + if (res.error) + { + next(res.error); + + return; + } + + var spritesheet = new Spritesheet( + res.texture, + resource.data, + resource.url + ); + + spritesheet.parse(function () { + resource.spritesheet = spritesheet; + resource.textures = spritesheet.textures; + next(); + }); + }); + }; + + /** + * Get the spritesheets root path + * @param {PIXI.LoaderResource} resource - Resource to check path + * @param {string} baseUrl - Base root url + */ + SpritesheetLoader.getResourcePath = function getResourcePath (resource, baseUrl) + { + // Prepend url path unless the resource image is a data url + if (resource.isDataUrl) + { + return resource.data.meta.image; + } + + return url.resolve(resource.url.replace(baseUrl, ''), resource.data.meta.image); + }; + + /*! + * @pixi/sprite-tiling - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/sprite-tiling is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var tempPoint$1 = new Point(); + + /** + * A tiling sprite is a fast way of rendering a tiling image + * + * @class + * @extends PIXI.Sprite + * @memberof PIXI + */ + var TilingSprite = /*@__PURE__*/(function (Sprite) { + function TilingSprite(texture, width, height) + { + if ( width === void 0 ) { width = 100; } + if ( height === void 0 ) { height = 100; } + + Sprite.call(this, texture); + + /** + * Tile transform + * + * @member {PIXI.Transform} + */ + this.tileTransform = new Transform(); + + // /// private + + /** + * The with of the tiling sprite + * + * @member {number} + * @private + */ + this._width = width; + + /** + * The height of the tiling sprite + * + * @member {number} + * @private + */ + this._height = height; + + /** + * Canvas pattern + * + * @type {CanvasPattern} + * @private + */ + this._canvasPattern = null; + + /** + * matrix that is applied to UV to get the coords in Texture normalized space to coords in BaseTexture space + * + * @member {PIXI.TextureMatrix} + */ + this.uvMatrix = texture.uvMatrix || new TextureMatrix(texture); + + /** + * Plugin that is responsible for rendering this element. + * Allows to customize the rendering process without overriding '_render' method. + * + * @member {string} + * @default 'tilingSprite' + */ + this.pluginName = 'tilingSprite'; + + /** + * Whether or not anchor affects uvs + * + * @member {boolean} + * @default false + */ + this.uvRespectAnchor = false; + } + + if ( Sprite ) { TilingSprite.__proto__ = Sprite; } + TilingSprite.prototype = Object.create( Sprite && Sprite.prototype ); + TilingSprite.prototype.constructor = TilingSprite; + + var prototypeAccessors = { clampMargin: { configurable: true },tileScale: { configurable: true },tilePosition: { configurable: true },width: { configurable: true },height: { configurable: true } }; + /** + * Changes frame clamping in corresponding textureTransform, shortcut + * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas + * + * @default 0.5 + * @member {number} + */ + prototypeAccessors.clampMargin.get = function () + { + return this.uvMatrix.clampMargin; + }; + + prototypeAccessors.clampMargin.set = function (value) // eslint-disable-line require-jsdoc + { + this.uvMatrix.clampMargin = value; + this.uvMatrix.update(true); + }; + + /** + * The scaling of the image that is being tiled + * + * @member {PIXI.ObservablePoint} + */ + prototypeAccessors.tileScale.get = function () + { + return this.tileTransform.scale; + }; + + prototypeAccessors.tileScale.set = function (value) // eslint-disable-line require-jsdoc + { + this.tileTransform.scale.copyFrom(value); + }; + + /** + * The offset of the image that is being tiled + * + * @member {PIXI.ObservablePoint} + */ + prototypeAccessors.tilePosition.get = function () + { + return this.tileTransform.position; + }; + + prototypeAccessors.tilePosition.set = function (value) // eslint-disable-line require-jsdoc + { + this.tileTransform.position.copyFrom(value); + }; + + /** + * @private + */ + TilingSprite.prototype._onTextureUpdate = function _onTextureUpdate () + { + if (this.uvMatrix) + { + this.uvMatrix.texture = this._texture; + } + this._cachedTint = 0xFFFFFF; + }; + + /** + * Renders the object using the WebGL renderer + * + * @protected + * @param {PIXI.Renderer} renderer - The renderer + */ + TilingSprite.prototype._render = function _render (renderer) + { + // tweak our texture temporarily.. + var texture = this._texture; + + if (!texture || !texture.valid) + { + return; + } + + this.tileTransform.updateLocalTransform(); + this.uvMatrix.update(); + + renderer.batch.setObjectRenderer(renderer.plugins[this.pluginName]); + renderer.plugins[this.pluginName].render(this); + }; + + /** + * Updates the bounds of the tiling sprite. + * + * @protected + */ + TilingSprite.prototype._calculateBounds = function _calculateBounds () + { + var minX = this._width * -this._anchor._x; + var minY = this._height * -this._anchor._y; + var maxX = this._width * (1 - this._anchor._x); + var maxY = this._height * (1 - this._anchor._y); + + this._bounds.addFrame(this.transform, minX, minY, maxX, maxY); + }; + + /** + * Gets the local bounds of the sprite object. + * + * @param {PIXI.Rectangle} rect - The output rectangle. + * @return {PIXI.Rectangle} The bounds. + */ + TilingSprite.prototype.getLocalBounds = function getLocalBounds (rect) + { + // we can do a fast local bounds if the sprite has no children! + if (this.children.length === 0) + { + this._bounds.minX = this._width * -this._anchor._x; + this._bounds.minY = this._height * -this._anchor._y; + this._bounds.maxX = this._width * (1 - this._anchor._x); + this._bounds.maxY = this._height * (1 - this._anchor._y); + + if (!rect) + { + if (!this._localBoundsRect) + { + this._localBoundsRect = new Rectangle(); + } + + rect = this._localBoundsRect; + } + + return this._bounds.getRectangle(rect); + } + + return Sprite.prototype.getLocalBounds.call(this, rect); + }; + + /** + * Checks if a point is inside this tiling sprite. + * + * @param {PIXI.Point} point - the point to check + * @return {boolean} Whether or not the sprite contains the point. + */ + TilingSprite.prototype.containsPoint = function containsPoint (point) + { + this.worldTransform.applyInverse(point, tempPoint$1); + + var width = this._width; + var height = this._height; + var x1 = -width * this.anchor._x; + + if (tempPoint$1.x >= x1 && tempPoint$1.x < x1 + width) + { + var y1 = -height * this.anchor._y; + + if (tempPoint$1.y >= y1 && tempPoint$1.y < y1 + height) + { + return true; + } + } + + return false; + }; + + /** + * Destroys this sprite and optionally its texture and children + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well + * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well + */ + TilingSprite.prototype.destroy = function destroy (options) + { + Sprite.prototype.destroy.call(this, options); + + this.tileTransform = null; + this.uvMatrix = null; + }; + + /** + * Helper function that creates a new tiling sprite based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * + * @static + * @param {string|PIXI.Texture|HTMLCanvasElement|HTMLVideoElement} source - Source to create texture from + * @param {number} width - the width of the tiling sprite + * @param {number} height - the height of the tiling sprite + * @return {PIXI.TilingSprite} The newly created texture + */ + TilingSprite.from = function from (source, width, height) + { + return new TilingSprite(Texture.from(source), width, height); + }; + + /** + * Helper function that creates a tiling sprite that will use a texture from the TextureCache based on the frameId + * The frame ids are created when a Texture packer file has been loaded + * + * @static + * @param {string} frameId - The frame Id of the texture in the cache + * @param {number} width - the width of the tiling sprite + * @param {number} height - the height of the tiling sprite + * @return {PIXI.TilingSprite} A new TilingSprite using a texture from the texture cache matching the frameId + */ + TilingSprite.fromFrame = function fromFrame (frameId, width, height) + { + var texture = TextureCache[frameId]; + + if (!texture) + { + throw new Error(("The frameId \"" + frameId + "\" does not exist in the texture cache " + (this))); + } + + return new TilingSprite(texture, width, height); + }; + + /** + * Helper function that creates a sprite that will contain a texture based on an image url + * If the image is not in the texture cache it will be loaded + * + * @static + * @param {string} imageId - The image url of the texture + * @param {number} width - the width of the tiling sprite + * @param {number} height - the height of the tiling sprite + * @param {Object} [options] - See {@link PIXI.BaseTexture}'s constructor for options. + * @return {PIXI.TilingSprite} A new TilingSprite using a texture from the texture cache matching the image id + */ + TilingSprite.fromImage = function fromImage (imageId, width, height, options) + { + // Fallback support for crossorigin, scaleMode parameters + if (options && typeof options !== 'object') + { + options = { + scaleMode: arguments[4], + resourceOptions: { + crossorigin: arguments[3], + }, + }; + } + + return new TilingSprite(Texture.from(imageId, options), width, height); + }; + + /** + * The width of the sprite, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + prototypeAccessors.width.get = function () + { + return this._width; + }; + + prototypeAccessors.width.set = function (value) // eslint-disable-line require-jsdoc + { + this._width = value; + }; + + /** + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + prototypeAccessors.height.get = function () + { + return this._height; + }; + + prototypeAccessors.height.set = function (value) // eslint-disable-line require-jsdoc + { + this._height = value; + }; + + Object.defineProperties( TilingSprite.prototype, prototypeAccessors ); + + return TilingSprite; + }(Sprite)); + + var vertex$2 = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n"; + + var fragment$2 = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = vTextureCoord - floor(vTextureCoord - uClampOffset);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture2D(uSampler, coord);\n gl_FragColor = texSample * uColor;\n}\n"; + + var fragmentSimple = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = sample * uColor;\n}\n"; + + var tempMat$1 = new Matrix(); + + /** + * WebGL renderer plugin for tiling sprites + * + * @class + * @memberof PIXI + * @extends PIXI.ObjectRenderer + */ + var TilingSpriteRenderer = /*@__PURE__*/(function (ObjectRenderer) { + function TilingSpriteRenderer(renderer) + { + ObjectRenderer.call(this, renderer); + + var uniforms = { globals: this.renderer.globalUniforms }; + + this.shader = Shader.from(vertex$2, fragment$2, uniforms); + + this.simpleShader = Shader.from(vertex$2, fragmentSimple, uniforms); + + this.quad = new QuadUv(); + + /** + * The WebGL state in which this renderer will work. + * + * @member {PIXI.State} + * @readonly + */ + this.state = State.for2d(); + } + + if ( ObjectRenderer ) { TilingSpriteRenderer.__proto__ = ObjectRenderer; } + TilingSpriteRenderer.prototype = Object.create( ObjectRenderer && ObjectRenderer.prototype ); + TilingSpriteRenderer.prototype.constructor = TilingSpriteRenderer; + + /** + * + * @param {PIXI.TilingSprite} ts tilingSprite to be rendered + */ + TilingSpriteRenderer.prototype.render = function render (ts) + { + var renderer = this.renderer; + var quad = this.quad; + + var vertices = quad.vertices; + + vertices[0] = vertices[6] = (ts._width) * -ts.anchor.x; + vertices[1] = vertices[3] = ts._height * -ts.anchor.y; + + vertices[2] = vertices[4] = (ts._width) * (1.0 - ts.anchor.x); + vertices[5] = vertices[7] = ts._height * (1.0 - ts.anchor.y); + + if (ts.uvRespectAnchor) + { + vertices = quad.uvs; + + vertices[0] = vertices[6] = -ts.anchor.x; + vertices[1] = vertices[3] = -ts.anchor.y; + + vertices[2] = vertices[4] = 1.0 - ts.anchor.x; + vertices[5] = vertices[7] = 1.0 - ts.anchor.y; + } + + quad.invalidate(); + + var tex = ts._texture; + var baseTex = tex.baseTexture; + var lt = ts.tileTransform.localTransform; + var uv = ts.uvMatrix; + var isSimple = baseTex.isPowerOfTwo + && tex.frame.width === baseTex.width && tex.frame.height === baseTex.height; + + // auto, force repeat wrapMode for big tiling textures + if (isSimple) + { + if (!baseTex._glTextures[renderer.CONTEXT_UID]) + { + if (baseTex.wrapMode === exports.WRAP_MODES.CLAMP) + { + baseTex.wrapMode = exports.WRAP_MODES.REPEAT; + } + } + else + { + isSimple = baseTex.wrapMode !== exports.WRAP_MODES.CLAMP; + } + } + + var shader = isSimple ? this.simpleShader : this.shader; + + var w = tex.width; + var h = tex.height; + var W = ts._width; + var H = ts._height; + + tempMat$1.set(lt.a * w / W, + lt.b * w / H, + lt.c * h / W, + lt.d * h / H, + lt.tx / W, + lt.ty / H); + + // that part is the same as above: + // tempMat.identity(); + // tempMat.scale(tex.width, tex.height); + // tempMat.prepend(lt); + // tempMat.scale(1.0 / ts._width, 1.0 / ts._height); + + tempMat$1.invert(); + if (isSimple) + { + tempMat$1.prepend(uv.mapCoord); + } + else + { + shader.uniforms.uMapCoord = uv.mapCoord.toArray(true); + shader.uniforms.uClampFrame = uv.uClampFrame; + shader.uniforms.uClampOffset = uv.uClampOffset; + } + + shader.uniforms.uTransform = tempMat$1.toArray(true); + shader.uniforms.uColor = premultiplyTintToRgba(ts.tint, ts.worldAlpha, + shader.uniforms.uColor, baseTex.alphaMode); + shader.uniforms.translationMatrix = ts.transform.worldTransform.toArray(true); + shader.uniforms.uSampler = tex; + + renderer.shader.bind(shader); + renderer.geometry.bind(quad);// , renderer.shader.getGLShader()); + + this.state.blendMode = correctBlendMode(ts.blendMode, baseTex.alphaMode); + renderer.state.set(this.state); + renderer.geometry.draw(this.renderer.gl.TRIANGLES, 6, 0); + }; + + return TilingSpriteRenderer; + }(ObjectRenderer)); + + /*! + * @pixi/text-bitmap - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/text-bitmap is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * A BitmapText object will create a line or multiple lines of text using bitmap font. + * + * The primary advantage of this class over Text is that all of your textures are pre-generated and loading, + * meaning that rendering is fast, and changing text has no performance implications. + * + * The primary disadvantage is that you need to preload the bitmap font assets, and thus the styling is set in stone. + * Supporting character sets other than latin, such as CJK languages, may be impractical due to the number of characters. + * + * To split a line you can use '\n', '\r' or '\r\n' in your string. + * + * You can generate the fnt files using + * http://www.angelcode.com/products/bmfont/ for Windows or + * http://www.bmglyph.com/ for Mac. + * + * A BitmapText can only be created when the font is loaded. + * + * ```js + * // in this case the font is in a file called 'desyrel.fnt' + * let bitmapText = new PIXI.BitmapText("text using a fancy font!", {font: "35px Desyrel", align: "right"}); + * ``` + * + * @class + * @extends PIXI.Container + * @memberof PIXI + */ + var BitmapText = /*@__PURE__*/(function (Container) { + function BitmapText(text, style) + { + var this$1 = this; + if ( style === void 0 ) { style = {}; } + + Container.call(this); + + /** + * Private tracker for the width of the overall text + * + * @member {number} + * @private + */ + this._textWidth = 0; + + /** + * Private tracker for the height of the overall text + * + * @member {number} + * @private + */ + this._textHeight = 0; + + /** + * Private tracker for the letter sprite pool. + * + * @member {PIXI.Sprite[]} + * @private + */ + this._glyphs = []; + + /** + * Private tracker for the current style. + * + * @member {object} + * @private + */ + this._font = { + tint: style.tint !== undefined ? style.tint : 0xFFFFFF, + align: style.align || 'left', + name: null, + size: 0, + }; + + /** + * Private tracker for the current font. + * + * @member {object} + * @private + */ + this.font = style.font; // run font setter + + /** + * Private tracker for the current text. + * + * @member {string} + * @private + */ + this._text = text; + + /** + * The max width of this bitmap text in pixels. If the text provided is longer than the + * value provided, line breaks will be automatically inserted in the last whitespace. + * Disable by setting value to 0 + * + * @member {number} + * @private + */ + this._maxWidth = 0; + + /** + * The max line height. This is useful when trying to use the total height of the Text, + * ie: when trying to vertically align. + * + * @member {number} + * @private + */ + this._maxLineHeight = 0; + + /** + * Letter spacing. This is useful for setting the space between characters. + * @member {number} + * @private + */ + this._letterSpacing = 0; + + /** + * Text anchor. read-only + * + * @member {PIXI.ObservablePoint} + * @private + */ + this._anchor = new ObservablePoint(function () { this$1.dirty = true; }, this, 0, 0); + + /** + * The dirty state of this object. + * + * @member {boolean} + */ + this.dirty = false; + + /** + * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. + * Advantages can include sharper image quality (like text) and faster rendering on canvas. + * The main disadvantage is movement of objects may appear less smooth. + * To set the global default, change {@link PIXI.settings.ROUND_PIXELS} + * + * @member {boolean} + * @default false + */ + this.roundPixels = settings.ROUND_PIXELS; + + this.updateText(); + } + + if ( Container ) { BitmapText.__proto__ = Container; } + BitmapText.prototype = Object.create( Container && Container.prototype ); + BitmapText.prototype.constructor = BitmapText; + + var prototypeAccessors = { tint: { configurable: true },align: { configurable: true },anchor: { configurable: true },font: { configurable: true },text: { configurable: true },maxWidth: { configurable: true },maxLineHeight: { configurable: true },textWidth: { configurable: true },letterSpacing: { configurable: true },textHeight: { configurable: true } }; + + /** + * Renders text and updates it when needed + * + * @private + */ + BitmapText.prototype.updateText = function updateText () + { + var data = BitmapText.fonts[this._font.name]; + var scale = this._font.size / data.size; + var pos = new Point(); + var chars = []; + var lineWidths = []; + var text = this._text.replace(/(?:\r\n|\r)/g, '\n') || ' '; + var textLength = text.length; + var maxWidth = this._maxWidth * data.size / this._font.size; + + var prevCharCode = null; + var lastLineWidth = 0; + var maxLineWidth = 0; + var line = 0; + var lastBreakPos = -1; + var lastBreakWidth = 0; + var spacesRemoved = 0; + var maxLineHeight = 0; + + for (var i = 0; i < textLength; i++) + { + var charCode = text.charCodeAt(i); + var char = text.charAt(i); + + if ((/(?:\s)/).test(char)) + { + lastBreakPos = i; + lastBreakWidth = lastLineWidth; + } + + if (char === '\r' || char === '\n') + { + lineWidths.push(lastLineWidth); + maxLineWidth = Math.max(maxLineWidth, lastLineWidth); + ++line; + ++spacesRemoved; + + pos.x = 0; + pos.y += data.lineHeight; + prevCharCode = null; + continue; + } + + var charData = data.chars[charCode]; + + if (!charData) + { + continue; + } + + if (prevCharCode && charData.kerning[prevCharCode]) + { + pos.x += charData.kerning[prevCharCode]; + } + + chars.push({ + texture: charData.texture, + line: line, + charCode: charCode, + position: new Point(pos.x + charData.xOffset + (this._letterSpacing / 2), pos.y + charData.yOffset), + }); + pos.x += charData.xAdvance + this._letterSpacing; + lastLineWidth = pos.x; + maxLineHeight = Math.max(maxLineHeight, (charData.yOffset + charData.texture.height)); + prevCharCode = charCode; + + if (lastBreakPos !== -1 && maxWidth > 0 && pos.x > maxWidth) + { + ++spacesRemoved; + removeItems(chars, 1 + lastBreakPos - spacesRemoved, 1 + i - lastBreakPos); + i = lastBreakPos; + lastBreakPos = -1; + + lineWidths.push(lastBreakWidth); + maxLineWidth = Math.max(maxLineWidth, lastBreakWidth); + line++; + + pos.x = 0; + pos.y += data.lineHeight; + prevCharCode = null; + } + } + + var lastChar = text.charAt(text.length - 1); + + if (lastChar !== '\r' && lastChar !== '\n') + { + if ((/(?:\s)/).test(lastChar)) + { + lastLineWidth = lastBreakWidth; + } + + lineWidths.push(lastLineWidth); + maxLineWidth = Math.max(maxLineWidth, lastLineWidth); + } + + var lineAlignOffsets = []; + + for (var i$1 = 0; i$1 <= line; i$1++) + { + var alignOffset = 0; + + if (this._font.align === 'right') + { + alignOffset = maxLineWidth - lineWidths[i$1]; + } + else if (this._font.align === 'center') + { + alignOffset = (maxLineWidth - lineWidths[i$1]) / 2; + } + + lineAlignOffsets.push(alignOffset); + } + + var lenChars = chars.length; + var tint = this.tint; + + for (var i$2 = 0; i$2 < lenChars; i$2++) + { + var c = this._glyphs[i$2]; // get the next glyph sprite + + if (c) + { + c.texture = chars[i$2].texture; + } + else + { + c = new Sprite(chars[i$2].texture); + c.roundPixels = this.roundPixels; + this._glyphs.push(c); + } + + c.position.x = (chars[i$2].position.x + lineAlignOffsets[chars[i$2].line]) * scale; + c.position.y = chars[i$2].position.y * scale; + c.scale.x = c.scale.y = scale; + c.tint = tint; + + if (!c.parent) + { + this.addChild(c); + } + } + + // remove unnecessary children. + for (var i$3 = lenChars; i$3 < this._glyphs.length; ++i$3) + { + this.removeChild(this._glyphs[i$3]); + } + + this._textWidth = maxLineWidth * scale; + this._textHeight = (pos.y + data.lineHeight) * scale; + + // apply anchor + if (this.anchor.x !== 0 || this.anchor.y !== 0) + { + for (var i$4 = 0; i$4 < lenChars; i$4++) + { + this._glyphs[i$4].x -= this._textWidth * this.anchor.x; + this._glyphs[i$4].y -= this._textHeight * this.anchor.y; + } + } + this._maxLineHeight = maxLineHeight * scale; + }; + + /** + * Updates the transform of this object + * + * @private + */ + BitmapText.prototype.updateTransform = function updateTransform () + { + this.validate(); + this.containerUpdateTransform(); + }; + + /** + * Validates text before calling parent's getLocalBounds + * + * @return {PIXI.Rectangle} The rectangular bounding area + */ + BitmapText.prototype.getLocalBounds = function getLocalBounds () + { + this.validate(); + + return Container.prototype.getLocalBounds.call(this); + }; + + /** + * Updates text when needed + * + * @private + */ + BitmapText.prototype.validate = function validate () + { + if (this.dirty) + { + this.updateText(); + this.dirty = false; + } + }; + + /** + * The tint of the BitmapText object. + * + * @member {number} + */ + prototypeAccessors.tint.get = function () + { + return this._font.tint; + }; + + prototypeAccessors.tint.set = function (value) // eslint-disable-line require-jsdoc + { + this._font.tint = (typeof value === 'number' && value >= 0) ? value : 0xFFFFFF; + + this.dirty = true; + }; + + /** + * The alignment of the BitmapText object. + * + * @member {string} + * @default 'left' + */ + prototypeAccessors.align.get = function () + { + return this._font.align; + }; + + prototypeAccessors.align.set = function (value) // eslint-disable-line require-jsdoc + { + this._font.align = value || 'left'; + + this.dirty = true; + }; + + /** + * The anchor sets the origin point of the text. + * + * The default is `(0,0)`, this means the text's origin is the top left. + * + * Setting the anchor to `(0.5,0.5)` means the text's origin is centered. + * + * Setting the anchor to `(1,1)` would mean the text's origin point will be the bottom right corner. + * + * @member {PIXI.Point | number} + */ + prototypeAccessors.anchor.get = function () + { + return this._anchor; + }; + + prototypeAccessors.anchor.set = function (value) // eslint-disable-line require-jsdoc + { + if (typeof value === 'number') + { + this._anchor.set(value); + } + else + { + this._anchor.copyFrom(value); + } + }; + + /** + * The font descriptor of the BitmapText object. + * + * @member {object} + */ + prototypeAccessors.font.get = function () + { + return this._font; + }; + + prototypeAccessors.font.set = function (value) // eslint-disable-line require-jsdoc + { + if (!value) + { + return; + } + + if (typeof value === 'string') + { + value = value.split(' '); + + this._font.name = value.length === 1 ? value[0] : value.slice(1).join(' '); + this._font.size = value.length >= 2 ? parseInt(value[0], 10) : BitmapText.fonts[this._font.name].size; + } + else + { + this._font.name = value.name; + this._font.size = typeof value.size === 'number' ? value.size : parseInt(value.size, 10); + } + + this.dirty = true; + }; + + /** + * The text of the BitmapText object. + * + * @member {string} + */ + prototypeAccessors.text.get = function () + { + return this._text; + }; + + prototypeAccessors.text.set = function (text) // eslint-disable-line require-jsdoc + { + text = String(text === null || text === undefined ? '' : text); + + if (this._text === text) + { + return; + } + this._text = text; + this.dirty = true; + }; + + /** + * The max width of this bitmap text in pixels. If the text provided is longer than the + * value provided, line breaks will be automatically inserted in the last whitespace. + * Disable by setting the value to 0. + * + * @member {number} + */ + prototypeAccessors.maxWidth.get = function () + { + return this._maxWidth; + }; + + prototypeAccessors.maxWidth.set = function (value) // eslint-disable-line require-jsdoc + { + if (this._maxWidth === value) + { + return; + } + this._maxWidth = value; + this.dirty = true; + }; + + /** + * The max line height. This is useful when trying to use the total height of the Text, + * i.e. when trying to vertically align. + * + * @member {number} + * @readonly + */ + prototypeAccessors.maxLineHeight.get = function () + { + this.validate(); + + return this._maxLineHeight; + }; + + /** + * The width of the overall text, different from fontSize, + * which is defined in the style object. + * + * @member {number} + * @readonly + */ + prototypeAccessors.textWidth.get = function () + { + this.validate(); + + return this._textWidth; + }; + + /** + * Additional space between characters. + * + * @member {number} + */ + prototypeAccessors.letterSpacing.get = function () + { + return this._letterSpacing; + }; + + prototypeAccessors.letterSpacing.set = function (value) // eslint-disable-line require-jsdoc + { + if (this._letterSpacing !== value) + { + this._letterSpacing = value; + this.dirty = true; + } + }; + + /** + * The height of the overall text, different from fontSize, + * which is defined in the style object. + * + * @member {number} + * @readonly + */ + prototypeAccessors.textHeight.get = function () + { + this.validate(); + + return this._textHeight; + }; + + /** + * Register a bitmap font with data and a texture. + * + * @static + * @param {XMLDocument} xml - The XML document data. + * @param {Object.|PIXI.Texture|PIXI.Texture[]} textures - List of textures for each page. + * If providing an object, the key is the `` element's `file` attribute in the FNT file. + * @return {Object} Result font object with font, size, lineHeight and char fields. + */ + BitmapText.registerFont = function registerFont (xml, textures) + { + var data = {}; + var info = xml.getElementsByTagName('info')[0]; + var common = xml.getElementsByTagName('common')[0]; + var pages = xml.getElementsByTagName('page'); + var res = getResolutionOfUrl(pages[0].getAttribute('file')); + var pagesTextures = {}; + + data.font = info.getAttribute('face'); + data.size = parseInt(info.getAttribute('size'), 10); + data.lineHeight = parseInt(common.getAttribute('lineHeight'), 10) / res; + data.chars = {}; + + // Single texture, convert to list + if (textures instanceof Texture) + { + textures = [textures]; + } + + // Convert the input Texture, Textures or object + // into a page Texture lookup by "id" + for (var i = 0; i < pages.length; i++) + { + var id = pages[i].getAttribute('id'); + var file = pages[i].getAttribute('file'); + + pagesTextures[id] = textures instanceof Array ? textures[i] : textures[file]; + } + + // parse letters + var letters = xml.getElementsByTagName('char'); + + for (var i$1 = 0; i$1 < letters.length; i$1++) + { + var letter = letters[i$1]; + var charCode = parseInt(letter.getAttribute('id'), 10); + var page = letter.getAttribute('page') || 0; + var textureRect = new Rectangle( + (parseInt(letter.getAttribute('x'), 10) / res) + (pagesTextures[page].frame.x / res), + (parseInt(letter.getAttribute('y'), 10) / res) + (pagesTextures[page].frame.y / res), + parseInt(letter.getAttribute('width'), 10) / res, + parseInt(letter.getAttribute('height'), 10) / res + ); + + data.chars[charCode] = { + xOffset: parseInt(letter.getAttribute('xoffset'), 10) / res, + yOffset: parseInt(letter.getAttribute('yoffset'), 10) / res, + xAdvance: parseInt(letter.getAttribute('xadvance'), 10) / res, + kerning: {}, + texture: new Texture(pagesTextures[page].baseTexture, textureRect), + page: page, + }; + } + + // parse kernings + var kernings = xml.getElementsByTagName('kerning'); + + for (var i$2 = 0; i$2 < kernings.length; i$2++) + { + var kerning = kernings[i$2]; + var first = parseInt(kerning.getAttribute('first'), 10) / res; + var second = parseInt(kerning.getAttribute('second'), 10) / res; + var amount = parseInt(kerning.getAttribute('amount'), 10) / res; + + if (data.chars[second]) + { + data.chars[second].kerning[first] = amount; + } + } + + // I'm leaving this as a temporary fix so we can test the bitmap fonts in v3 + // but it's very likely to change + BitmapText.fonts[data.font] = data; + + return data; + }; + + Object.defineProperties( BitmapText.prototype, prototypeAccessors ); + + return BitmapText; + }(Container)); + + BitmapText.fonts = {}; + + /** + * {@link PIXI.Loader Loader} middleware for loading + * bitmap-based fonts suitable for using with {@link PIXI.BitmapText}. + * @class + * @memberof PIXI + * @implements PIXI.ILoaderPlugin + */ + var BitmapFontLoader = function BitmapFontLoader () {}; + + BitmapFontLoader.parse = function parse (resource, texture) + { + resource.bitmapFont = BitmapText.registerFont(resource.data, texture); + }; + + /** + * Called when the plugin is installed. + * + * @see PIXI.Loader.registerPlugin + */ + BitmapFontLoader.add = function add () + { + LoaderResource.setExtensionXhrType('fnt', LoaderResource.XHR_RESPONSE_TYPE.DOCUMENT); + }; + + /** + * Replacement for NodeJS's path.dirname + * @private + * @param {string} url Path to get directory for + */ + BitmapFontLoader.dirname = function dirname (url) + { + var dir = url + .replace(/\\/g, '/') // convert windows notation to UNIX notation, URL-safe because it's a forbidden character + .replace(/\/$/, '') // replace trailing slash + .replace(/\/[^\/]*$/, ''); // remove everything after the last + + // File request is relative, use current directory + if (dir === url) + { + return '.'; + } + // Started with a slash + else if (dir === '') + { + return '/'; + } + + return dir; + }; + + /** + * Called after a resource is loaded. + * @see PIXI.Loader.loaderMiddleware + * @param {PIXI.LoaderResource} resource + * @param {function} next + */ + BitmapFontLoader.use = function use (resource, next) + { + // skip if no data or not xml data + if (!resource.data || resource.type !== LoaderResource.TYPE.XML) + { + next(); + + return; + } + + // skip if not bitmap font data, using some silly duck-typing + if (resource.data.getElementsByTagName('page').length === 0 + || resource.data.getElementsByTagName('info').length === 0 + || resource.data.getElementsByTagName('info')[0].getAttribute('face') === null + ) + { + next(); + + return; + } + + var xmlUrl = !resource.isDataUrl ? BitmapFontLoader.dirname(resource.url) : ''; + + if (resource.isDataUrl) + { + if (xmlUrl === '.') + { + xmlUrl = ''; + } + + if (this.baseUrl && xmlUrl) + { + // if baseurl has a trailing slash then add one to xmlUrl so the replace works below + if (this.baseUrl.charAt(this.baseUrl.length - 1) === '/') + { + xmlUrl += '/'; + } + } + } + + // remove baseUrl from xmlUrl + xmlUrl = xmlUrl.replace(this.baseUrl, ''); + + // if there is an xmlUrl now, it needs a trailing slash. Ensure that it does if the string isn't empty. + if (xmlUrl && xmlUrl.charAt(xmlUrl.length - 1) !== '/') + { + xmlUrl += '/'; + } + + var pages = resource.data.getElementsByTagName('page'); + var textures = {}; + + // Handle completed, when the number of textures + // load is the same number as references in the fnt file + var completed = function (page) { + textures[page.metadata.pageFile] = page.texture; + + if (Object.keys(textures).length === pages.length) + { + BitmapFontLoader.parse(resource, textures); + next(); + } + }; + + for (var i = 0; i < pages.length; ++i) + { + var pageFile = pages[i].getAttribute('file'); + var url = xmlUrl + pageFile; + var exists = false; + + // incase the image is loaded outside + // using the same loader, resource will be available + for (var name in this.resources) + { + var bitmapResource = this.resources[name]; + + if (bitmapResource.url === url) + { + bitmapResource.metadata.pageFile = pageFile; + if (bitmapResource.texture) + { + completed(bitmapResource); + } + else + { + bitmapResource.onAfterMiddleware.add(completed); + } + exists = true; + break; + } + } + + // texture is not loaded, we'll attempt to add + // it to the load and add the texture to the list + if (!exists) + { + // Standard loading options for images + var options = { + crossOrigin: resource.crossOrigin, + loadType: LoaderResource.LOAD_TYPE.IMAGE, + metadata: Object.assign( + { pageFile: pageFile }, + resource.metadata.imageMetadata + ), + parentResource: resource, + }; + + this.add(url, options, completed); + } + } + }; + + /*! + * @pixi/filter-alpha - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/filter-alpha is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var fragment$3 = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n"; + + /** + * Simplest filter - applies alpha. + * + * Use this instead of Container's alpha property to avoid visual layering of individual elements. + * AlphaFilter applies alpha evenly across the entire display object and any opaque elements it contains. + * If elements are not opaque, they will blend with each other anyway. + * + * Very handy if you want to use common features of all filters: + * + * 1. Assign a blendMode to this filter, blend all elements inside display object with background. + * + * 2. To use clipping in display coordinates, assign a filterArea to the same container that has this filter. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ + var AlphaFilter = /*@__PURE__*/(function (Filter) { + function AlphaFilter(alpha) + { + if ( alpha === void 0 ) { alpha = 1.0; } + + Filter.call(this, _default, fragment$3, { uAlpha: 1 }); + + this.alpha = alpha; + } + + if ( Filter ) { AlphaFilter.__proto__ = Filter; } + AlphaFilter.prototype = Object.create( Filter && Filter.prototype ); + AlphaFilter.prototype.constructor = AlphaFilter; + + var prototypeAccessors = { alpha: { configurable: true } }; + + /** + * Coefficient for alpha multiplication + * + * @member {number} + * @default 1 + */ + prototypeAccessors.alpha.get = function () + { + return this.uniforms.uAlpha; + }; + + prototypeAccessors.alpha.set = function (value) // eslint-disable-line require-jsdoc + { + this.uniforms.uAlpha = value; + }; + + Object.defineProperties( AlphaFilter.prototype, prototypeAccessors ); + + return AlphaFilter; + }(Filter)); + + /*! + * @pixi/filter-blur - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/filter-blur is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var vertTemplate = "\n attribute vec2 aVertexPosition;\n\n uniform mat3 projectionMatrix;\n\n uniform float strength;\n\n varying vec2 vBlurTexCoords[%size%];\n\n uniform vec4 inputSize;\n uniform vec4 outputFrame;\n\n vec4 filterVertexPosition( void )\n {\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n }\n\n vec2 filterTextureCoord( void )\n {\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n }\n\n void main(void)\n {\n gl_Position = filterVertexPosition();\n\n vec2 textureCoord = filterTextureCoord();\n %blur%\n }"; + + function generateBlurVertSource(kernelSize, x) + { + var halfLength = Math.ceil(kernelSize / 2); + + var vertSource = vertTemplate; + + var blurLoop = ''; + var template; + // let value; + + if (x) + { + template = 'vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);'; + } + else + { + template = 'vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);'; + } + + for (var i = 0; i < kernelSize; i++) + { + var blur = template.replace('%index%', i); + + // value = i; + + // if(i >= halfLength) + // { + // value = kernelSize - i - 1; + // } + + blur = blur.replace('%sampleIndex%', ((i - (halfLength - 1)) + ".0")); + + blurLoop += blur; + blurLoop += '\n'; + } + + vertSource = vertSource.replace('%blur%', blurLoop); + vertSource = vertSource.replace('%size%', kernelSize); + + return vertSource; + } + + var GAUSSIAN_VALUES = { + 5: [0.153388, 0.221461, 0.250301], + 7: [0.071303, 0.131514, 0.189879, 0.214607], + 9: [0.028532, 0.067234, 0.124009, 0.179044, 0.20236], + 11: [0.0093, 0.028002, 0.065984, 0.121703, 0.175713, 0.198596], + 13: [0.002406, 0.009255, 0.027867, 0.065666, 0.121117, 0.174868, 0.197641], + 15: [0.000489, 0.002403, 0.009246, 0.02784, 0.065602, 0.120999, 0.174697, 0.197448], + }; + + var fragTemplate$1 = [ + 'varying vec2 vBlurTexCoords[%size%];', + 'uniform sampler2D uSampler;', + + 'void main(void)', + '{', + ' gl_FragColor = vec4(0.0);', + ' %blur%', + '}' ].join('\n'); + + function generateBlurFragSource(kernelSize) + { + var kernel = GAUSSIAN_VALUES[kernelSize]; + var halfLength = kernel.length; + + var fragSource = fragTemplate$1; + + var blurLoop = ''; + var template = 'gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;'; + var value; + + for (var i = 0; i < kernelSize; i++) + { + var blur = template.replace('%index%', i); + + value = i; + + if (i >= halfLength) + { + value = kernelSize - i - 1; + } + + blur = blur.replace('%value%', kernel[value]); + + blurLoop += blur; + blurLoop += '\n'; + } + + fragSource = fragSource.replace('%blur%', blurLoop); + fragSource = fragSource.replace('%size%', kernelSize); + + return fragSource; + } + + /** + * The BlurFilterPass applies a horizontal or vertical Gaussian blur to an object. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ + var BlurFilterPass = /*@__PURE__*/(function (Filter) { + function BlurFilterPass(horizontal, strength, quality, resolution, kernelSize) + { + kernelSize = kernelSize || 5; + var vertSrc = generateBlurVertSource(kernelSize, horizontal); + var fragSrc = generateBlurFragSource(kernelSize); + + Filter.call( + // vertex shader + this, vertSrc, + // fragment shader + fragSrc + ); + + this.horizontal = horizontal; + + this.resolution = resolution || settings.RESOLUTION; + + this._quality = 0; + + this.quality = quality || 4; + + this.blur = strength || 8; + } + + if ( Filter ) { BlurFilterPass.__proto__ = Filter; } + BlurFilterPass.prototype = Object.create( Filter && Filter.prototype ); + BlurFilterPass.prototype.constructor = BlurFilterPass; + + var prototypeAccessors = { blur: { configurable: true },quality: { configurable: true } }; + + BlurFilterPass.prototype.apply = function apply (filterManager, input, output, clear) + { + if (output) + { + if (this.horizontal) + { + this.uniforms.strength = (1 / output.width) * (output.width / input.width); + } + else + { + this.uniforms.strength = (1 / output.height) * (output.height / input.height); + } + } + else + { + if (this.horizontal) // eslint-disable-line + { + this.uniforms.strength = (1 / filterManager.renderer.width) * (filterManager.renderer.width / input.width); + } + else + { + this.uniforms.strength = (1 / filterManager.renderer.height) * (filterManager.renderer.height / input.height); // eslint-disable-line + } + } + + // screen space! + this.uniforms.strength *= this.strength; + this.uniforms.strength /= this.passes; + + if (this.passes === 1) + { + filterManager.applyFilter(this, input, output, clear); + } + else + { + var renderTarget = filterManager.getFilterTexture(); + var renderer = filterManager.renderer; + + var flip = input; + var flop = renderTarget; + + this.state.blend = false; + filterManager.applyFilter(this, flip, flop, true); + + for (var i = 1; i < this.passes - 1; i++) + { + renderer.renderTexture.bind(flip, flip.filterFrame); + + this.uniforms.uSampler = flop; + + var temp = flop; + + flop = flip; + flip = temp; + + renderer.shader.bind(this); + renderer.geometry.draw(5); + } + + this.state.blend = true; + filterManager.applyFilter(this, flop, output, clear); + filterManager.returnFilterTexture(renderTarget); + } + }; + /** + * Sets the strength of both the blur. + * + * @member {number} + * @default 16 + */ + prototypeAccessors.blur.get = function () + { + return this.strength; + }; + + prototypeAccessors.blur.set = function (value) // eslint-disable-line require-jsdoc + { + this.padding = 1 + (Math.abs(value) * 2); + this.strength = value; + }; + + /** + * Sets the quality of the blur by modifying the number of passes. More passes means higher + * quaility bluring but the lower the performance. + * + * @member {number} + * @default 4 + */ + prototypeAccessors.quality.get = function () + { + return this._quality; + }; + + prototypeAccessors.quality.set = function (value) // eslint-disable-line require-jsdoc + { + this._quality = value; + this.passes = value; + }; + + Object.defineProperties( BlurFilterPass.prototype, prototypeAccessors ); + + return BlurFilterPass; + }(Filter)); + + /** + * The BlurFilter applies a Gaussian blur to an object. + * + * The strength of the blur can be set for the x-axis and y-axis separately. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ + var BlurFilter = /*@__PURE__*/(function (Filter) { + function BlurFilter(strength, quality, resolution, kernelSize) + { + Filter.call(this); + + this.blurXFilter = new BlurFilterPass(true, strength, quality, resolution, kernelSize); + this.blurYFilter = new BlurFilterPass(false, strength, quality, resolution, kernelSize); + + this.resolution = resolution || settings.RESOLUTION; + this.quality = quality || 4; + this.blur = strength || 8; + + this.repeatEdgePixels = false; + } + + if ( Filter ) { BlurFilter.__proto__ = Filter; } + BlurFilter.prototype = Object.create( Filter && Filter.prototype ); + BlurFilter.prototype.constructor = BlurFilter; + + var prototypeAccessors = { blur: { configurable: true },quality: { configurable: true },blurX: { configurable: true },blurY: { configurable: true },blendMode: { configurable: true },repeatEdgePixels: { configurable: true } }; + + /** + * Applies the filter. + * + * @param {PIXI.systems.FilterSystem} filterManager - The manager. + * @param {PIXI.RenderTexture} input - The input target. + * @param {PIXI.RenderTexture} output - The output target. + */ + BlurFilter.prototype.apply = function apply (filterManager, input, output, clear) + { + var xStrength = Math.abs(this.blurXFilter.strength); + var yStrength = Math.abs(this.blurYFilter.strength); + + if (xStrength && yStrength) + { + var renderTarget = filterManager.getFilterTexture(); + + this.blurXFilter.apply(filterManager, input, renderTarget, true); + this.blurYFilter.apply(filterManager, renderTarget, output, clear); + + filterManager.returnFilterTexture(renderTarget); + } + else if (yStrength) + { + this.blurYFilter.apply(filterManager, input, output, clear); + } + else + { + this.blurXFilter.apply(filterManager, input, output, clear); + } + }; + + BlurFilter.prototype.updatePadding = function updatePadding () + { + if (this._repeatEdgePixels) + { + this.padding = 0; + } + else + { + this.padding = Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength)) * 2; + } + }; + + /** + * Sets the strength of both the blurX and blurY properties simultaneously + * + * @member {number} + * @default 2 + */ + prototypeAccessors.blur.get = function () + { + return this.blurXFilter.blur; + }; + + prototypeAccessors.blur.set = function (value) // eslint-disable-line require-jsdoc + { + this.blurXFilter.blur = this.blurYFilter.blur = value; + this.updatePadding(); + }; + + /** + * Sets the number of passes for blur. More passes means higher quaility bluring. + * + * @member {number} + * @default 1 + */ + prototypeAccessors.quality.get = function () + { + return this.blurXFilter.quality; + }; + + prototypeAccessors.quality.set = function (value) // eslint-disable-line require-jsdoc + { + this.blurXFilter.quality = this.blurYFilter.quality = value; + }; + + /** + * Sets the strength of the blurX property + * + * @member {number} + * @default 2 + */ + prototypeAccessors.blurX.get = function () + { + return this.blurXFilter.blur; + }; + + prototypeAccessors.blurX.set = function (value) // eslint-disable-line require-jsdoc + { + this.blurXFilter.blur = value; + this.updatePadding(); + }; + + /** + * Sets the strength of the blurY property + * + * @member {number} + * @default 2 + */ + prototypeAccessors.blurY.get = function () + { + return this.blurYFilter.blur; + }; + + prototypeAccessors.blurY.set = function (value) // eslint-disable-line require-jsdoc + { + this.blurYFilter.blur = value; + this.updatePadding(); + }; + + /** + * Sets the blendmode of the filter + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL + */ + prototypeAccessors.blendMode.get = function () + { + return this.blurYFilter.blendMode; + }; + + prototypeAccessors.blendMode.set = function (value) // eslint-disable-line require-jsdoc + { + this.blurYFilter.blendMode = value; + }; + + /** + * If set to true the edge of the target will be clamped + * + * @member {bool} + * @default false + */ + prototypeAccessors.repeatEdgePixels.get = function () + { + return this._repeatEdgePixels; + }; + + prototypeAccessors.repeatEdgePixels.set = function (value) + { + this._repeatEdgePixels = value; + this.updatePadding(); + }; + + Object.defineProperties( BlurFilter.prototype, prototypeAccessors ); + + return BlurFilter; + }(Filter)); + + /*! + * @pixi/filter-color-matrix - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/filter-color-matrix is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var fragment$4 = "varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n"; + + /** + * The ColorMatrixFilter class lets you apply a 5x4 matrix transformation on the RGBA + * color and alpha values of every pixel on your displayObject to produce a result + * with a new set of RGBA color and alpha values. It's pretty powerful! + * + * ```js + * let colorMatrix = new PIXI.filters.ColorMatrixFilter(); + * container.filters = [colorMatrix]; + * colorMatrix.contrast(2); + * ``` + * @author Clément Chenebault + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ + var ColorMatrixFilter = /*@__PURE__*/(function (Filter) { + function ColorMatrixFilter() + { + var uniforms = { + m: new Float32Array([1, 0, 0, 0, 0, + 0, 1, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 1, 0]), + uAlpha: 1, + }; + + Filter.call(this, defaultFilter, fragment$4, uniforms); + + this.alpha = 1; + } + + if ( Filter ) { ColorMatrixFilter.__proto__ = Filter; } + ColorMatrixFilter.prototype = Object.create( Filter && Filter.prototype ); + ColorMatrixFilter.prototype.constructor = ColorMatrixFilter; + + var prototypeAccessors = { matrix: { configurable: true },alpha: { configurable: true } }; + + /** + * Transforms current matrix and set the new one + * + * @param {number[]} matrix - 5x4 matrix + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype._loadMatrix = function _loadMatrix (matrix, multiply) + { + if ( multiply === void 0 ) { multiply = false; } + + var newMatrix = matrix; + + if (multiply) + { + this._multiply(newMatrix, this.uniforms.m, matrix); + newMatrix = this._colorMatrix(newMatrix); + } + + // set the new matrix + this.uniforms.m = newMatrix; + }; + + /** + * Multiplies two mat5's + * + * @private + * @param {number[]} out - 5x4 matrix the receiving matrix + * @param {number[]} a - 5x4 matrix the first operand + * @param {number[]} b - 5x4 matrix the second operand + * @returns {number[]} 5x4 matrix + */ + ColorMatrixFilter.prototype._multiply = function _multiply (out, a, b) + { + // Red Channel + out[0] = (a[0] * b[0]) + (a[1] * b[5]) + (a[2] * b[10]) + (a[3] * b[15]); + out[1] = (a[0] * b[1]) + (a[1] * b[6]) + (a[2] * b[11]) + (a[3] * b[16]); + out[2] = (a[0] * b[2]) + (a[1] * b[7]) + (a[2] * b[12]) + (a[3] * b[17]); + out[3] = (a[0] * b[3]) + (a[1] * b[8]) + (a[2] * b[13]) + (a[3] * b[18]); + out[4] = (a[0] * b[4]) + (a[1] * b[9]) + (a[2] * b[14]) + (a[3] * b[19]) + a[4]; + + // Green Channel + out[5] = (a[5] * b[0]) + (a[6] * b[5]) + (a[7] * b[10]) + (a[8] * b[15]); + out[6] = (a[5] * b[1]) + (a[6] * b[6]) + (a[7] * b[11]) + (a[8] * b[16]); + out[7] = (a[5] * b[2]) + (a[6] * b[7]) + (a[7] * b[12]) + (a[8] * b[17]); + out[8] = (a[5] * b[3]) + (a[6] * b[8]) + (a[7] * b[13]) + (a[8] * b[18]); + out[9] = (a[5] * b[4]) + (a[6] * b[9]) + (a[7] * b[14]) + (a[8] * b[19]) + a[9]; + + // Blue Channel + out[10] = (a[10] * b[0]) + (a[11] * b[5]) + (a[12] * b[10]) + (a[13] * b[15]); + out[11] = (a[10] * b[1]) + (a[11] * b[6]) + (a[12] * b[11]) + (a[13] * b[16]); + out[12] = (a[10] * b[2]) + (a[11] * b[7]) + (a[12] * b[12]) + (a[13] * b[17]); + out[13] = (a[10] * b[3]) + (a[11] * b[8]) + (a[12] * b[13]) + (a[13] * b[18]); + out[14] = (a[10] * b[4]) + (a[11] * b[9]) + (a[12] * b[14]) + (a[13] * b[19]) + a[14]; + + // Alpha Channel + out[15] = (a[15] * b[0]) + (a[16] * b[5]) + (a[17] * b[10]) + (a[18] * b[15]); + out[16] = (a[15] * b[1]) + (a[16] * b[6]) + (a[17] * b[11]) + (a[18] * b[16]); + out[17] = (a[15] * b[2]) + (a[16] * b[7]) + (a[17] * b[12]) + (a[18] * b[17]); + out[18] = (a[15] * b[3]) + (a[16] * b[8]) + (a[17] * b[13]) + (a[18] * b[18]); + out[19] = (a[15] * b[4]) + (a[16] * b[9]) + (a[17] * b[14]) + (a[18] * b[19]) + a[19]; + + return out; + }; + + /** + * Create a Float32 Array and normalize the offset component to 0-1 + * + * @private + * @param {number[]} matrix - 5x4 matrix + * @return {number[]} 5x4 matrix with all values between 0-1 + */ + ColorMatrixFilter.prototype._colorMatrix = function _colorMatrix (matrix) + { + // Create a Float32 Array and normalize the offset component to 0-1 + var m = new Float32Array(matrix); + + m[4] /= 255; + m[9] /= 255; + m[14] /= 255; + m[19] /= 255; + + return m; + }; + + /** + * Adjusts brightness + * + * @param {number} b - value of the brigthness (0-1, where 0 is black) + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.brightness = function brightness (b, multiply) + { + var matrix = [ + b, 0, 0, 0, 0, + 0, b, 0, 0, 0, + 0, 0, b, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Set the matrices in grey scales + * + * @param {number} scale - value of the grey (0-1, where 0 is black) + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.greyscale = function greyscale (scale, multiply) + { + var matrix = [ + scale, scale, scale, 0, 0, + scale, scale, scale, 0, 0, + scale, scale, scale, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Set the black and white matrice. + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.blackAndWhite = function blackAndWhite (multiply) + { + var matrix = [ + 0.3, 0.6, 0.1, 0, 0, + 0.3, 0.6, 0.1, 0, 0, + 0.3, 0.6, 0.1, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Set the hue property of the color + * + * @param {number} rotation - in degrees + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.hue = function hue (rotation, multiply) + { + rotation = (rotation || 0) / 180 * Math.PI; + + var cosR = Math.cos(rotation); + var sinR = Math.sin(rotation); + var sqrt = Math.sqrt; + + /* a good approximation for hue rotation + This matrix is far better than the versions with magic luminance constants + formerly used here, but also used in the starling framework (flash) and known from this + old part of the internet: quasimondo.com/archives/000565.php + + This new matrix is based on rgb cube rotation in space. Look here for a more descriptive + implementation as a shader not a general matrix: + https://github.com/evanw/glfx.js/blob/58841c23919bd59787effc0333a4897b43835412/src/filters/adjust/huesaturation.js + + This is the source for the code: + see http://stackoverflow.com/questions/8507885/shift-hue-of-an-rgb-color/8510751#8510751 + */ + + var w = 1 / 3; + var sqrW = sqrt(w); // weight is + + var a00 = cosR + ((1.0 - cosR) * w); + var a01 = (w * (1.0 - cosR)) - (sqrW * sinR); + var a02 = (w * (1.0 - cosR)) + (sqrW * sinR); + + var a10 = (w * (1.0 - cosR)) + (sqrW * sinR); + var a11 = cosR + (w * (1.0 - cosR)); + var a12 = (w * (1.0 - cosR)) - (sqrW * sinR); + + var a20 = (w * (1.0 - cosR)) - (sqrW * sinR); + var a21 = (w * (1.0 - cosR)) + (sqrW * sinR); + var a22 = cosR + (w * (1.0 - cosR)); + + var matrix = [ + a00, a01, a02, 0, 0, + a10, a11, a12, 0, 0, + a20, a21, a22, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Set the contrast matrix, increase the separation between dark and bright + * Increase contrast : shadows darker and highlights brighter + * Decrease contrast : bring the shadows up and the highlights down + * + * @param {number} amount - value of the contrast (0-1) + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.contrast = function contrast (amount, multiply) + { + var v = (amount || 0) + 1; + var o = -0.5 * (v - 1); + + var matrix = [ + v, 0, 0, 0, o, + 0, v, 0, 0, o, + 0, 0, v, 0, o, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Set the saturation matrix, increase the separation between colors + * Increase saturation : increase contrast, brightness, and sharpness + * + * @param {number} amount - The saturation amount (0-1) + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.saturate = function saturate (amount, multiply) + { + if ( amount === void 0 ) { amount = 0; } + + var x = (amount * 2 / 3) + 1; + var y = ((x - 1) * -0.5); + + var matrix = [ + x, y, y, 0, 0, + y, x, y, 0, 0, + y, y, x, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Desaturate image (remove color) + * + * Call the saturate function + * + */ + ColorMatrixFilter.prototype.desaturate = function desaturate () // eslint-disable-line no-unused-vars + { + this.saturate(-1); + }; + + /** + * Negative image (inverse of classic rgb matrix) + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.negative = function negative (multiply) + { + var matrix = [ + -1, 0, 0, 1, 0, + 0, -1, 0, 1, 0, + 0, 0, -1, 1, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Sepia image + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.sepia = function sepia (multiply) + { + var matrix = [ + 0.393, 0.7689999, 0.18899999, 0, 0, + 0.349, 0.6859999, 0.16799999, 0, 0, + 0.272, 0.5339999, 0.13099999, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Color motion picture process invented in 1916 (thanks Dominic Szablewski) + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.technicolor = function technicolor (multiply) + { + var matrix = [ + 1.9125277891456083, -0.8545344976951645, -0.09155508482755585, 0, 11.793603434377337, + -0.3087833385928097, 1.7658908555458428, -0.10601743074722245, 0, -70.35205161461398, + -0.231103377548616, -0.7501899197440212, 1.847597816108189, 0, 30.950940869491138, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Polaroid filter + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.polaroid = function polaroid (multiply) + { + var matrix = [ + 1.438, -0.062, -0.062, 0, 0, + -0.122, 1.378, -0.122, 0, 0, + -0.016, -0.016, 1.483, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Filter who transforms : Red -> Blue and Blue -> Red + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.toBGR = function toBGR (multiply) + { + var matrix = [ + 0, 0, 1, 0, 0, + 0, 1, 0, 0, 0, + 1, 0, 0, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski) + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.kodachrome = function kodachrome (multiply) + { + var matrix = [ + 1.1285582396593525, -0.3967382283601348, -0.03992559172921793, 0, 63.72958762196502, + -0.16404339962244616, 1.0835251566291304, -0.05498805115633132, 0, 24.732407896706203, + -0.16786010706155763, -0.5603416277695248, 1.6014850761964943, 0, 35.62982807460946, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Brown delicious browni filter (thanks Dominic Szablewski) + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.browni = function browni (multiply) + { + var matrix = [ + 0.5997023498159715, 0.34553243048391263, -0.2708298674538042, 0, 47.43192855600873, + -0.037703249837783157, 0.8609577587992641, 0.15059552388459913, 0, -36.96841498319127, + 0.24113635128153335, -0.07441037908422492, 0.44972182064877153, 0, -7.562075277591283, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Vintage filter (thanks Dominic Szablewski) + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.vintage = function vintage (multiply) + { + var matrix = [ + 0.6279345635605994, 0.3202183420819367, -0.03965408211312453, 0, 9.651285835294123, + 0.02578397704808868, 0.6441188644374771, 0.03259127616149294, 0, 7.462829176470591, + 0.0466055556782719, -0.0851232987247891, 0.5241648018700465, 0, 5.159190588235296, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * We don't know exactly what it does, kind of gradient map, but funny to play with! + * + * @param {number} desaturation - Tone values. + * @param {number} toned - Tone values. + * @param {string} lightColor - Tone values, example: `0xFFE580` + * @param {string} darkColor - Tone values, example: `0xFFE580` + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.colorTone = function colorTone (desaturation, toned, lightColor, darkColor, multiply) + { + desaturation = desaturation || 0.2; + toned = toned || 0.15; + lightColor = lightColor || 0xFFE580; + darkColor = darkColor || 0x338000; + + var lR = ((lightColor >> 16) & 0xFF) / 255; + var lG = ((lightColor >> 8) & 0xFF) / 255; + var lB = (lightColor & 0xFF) / 255; + + var dR = ((darkColor >> 16) & 0xFF) / 255; + var dG = ((darkColor >> 8) & 0xFF) / 255; + var dB = (darkColor & 0xFF) / 255; + + var matrix = [ + 0.3, 0.59, 0.11, 0, 0, + lR, lG, lB, desaturation, 0, + dR, dG, dB, toned, 0, + lR - dR, lG - dG, lB - dB, 0, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Night effect + * + * @param {number} intensity - The intensity of the night effect. + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.night = function night (intensity, multiply) + { + intensity = intensity || 0.1; + var matrix = [ + intensity * (-2.0), -intensity, 0, 0, 0, + -intensity, 0, intensity, 0, 0, + 0, intensity, intensity * 2.0, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Predator effect + * + * Erase the current matrix by setting a new indepent one + * + * @param {number} amount - how much the predator feels his future victim + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.predator = function predator (amount, multiply) + { + var matrix = [ + // row 1 + 11.224130630493164 * amount, + -4.794486999511719 * amount, + -2.8746118545532227 * amount, + 0 * amount, + 0.40342438220977783 * amount, + // row 2 + -3.6330697536468506 * amount, + 9.193157196044922 * amount, + -2.951810836791992 * amount, + 0 * amount, + -1.316135048866272 * amount, + // row 3 + -3.2184197902679443 * amount, + -4.2375030517578125 * amount, + 7.476448059082031 * amount, + 0 * amount, + 0.8044459223747253 * amount, + // row 4 + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * LSD effect + * + * Multiply the current matrix + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + ColorMatrixFilter.prototype.lsd = function lsd (multiply) + { + var matrix = [ + 2, -0.4, 0.5, 0, 0, + -0.5, 2, -0.4, 0, 0, + -0.4, -0.5, 3, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Erase the current matrix by setting the default one + * + */ + ColorMatrixFilter.prototype.reset = function reset () + { + var matrix = [ + 1, 0, 0, 0, 0, + 0, 1, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 1, 0 ]; + + this._loadMatrix(matrix, false); + }; + + /** + * The matrix of the color matrix filter + * + * @member {number[]} + * @default [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0] + */ + prototypeAccessors.matrix.get = function () + { + return this.uniforms.m; + }; + + prototypeAccessors.matrix.set = function (value) // eslint-disable-line require-jsdoc + { + this.uniforms.m = value; + }; + + /** + * The opacity value to use when mixing the original and resultant colors. + * + * When the value is 0, the original color is used without modification. + * When the value is 1, the result color is used. + * When in the range (0, 1) the color is interpolated between the original and result by this amount. + * + * @member {number} + * @default 1 + */ + prototypeAccessors.alpha.get = function () + { + return this.uniforms.uAlpha; + }; + + prototypeAccessors.alpha.set = function (value) // eslint-disable-line require-jsdoc + { + this.uniforms.uAlpha = value; + }; + + Object.defineProperties( ColorMatrixFilter.prototype, prototypeAccessors ); + + return ColorMatrixFilter; + }(Filter)); + + // Americanized alias + ColorMatrixFilter.prototype.grayscale = ColorMatrixFilter.prototype.greyscale; + + /*! + * @pixi/filter-displacement - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/filter-displacement is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var vertex$3 = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n"; + + var fragment$5 = "varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n"; + + /** + * The DisplacementFilter class uses the pixel values from the specified texture + * (called the displacement map) to perform a displacement of an object. + * + * You can use this filter to apply all manor of crazy warping effects. + * Currently the `r` property of the texture is used to offset the `x` + * and the `g` property of the texture is used to offset the `y`. + * + * The way it works is it uses the values of the displacement map to look up the + * correct pixels to output. This means it's not technically moving the original. + * Instead, it's starting at the output and asking "which pixel from the original goes here". + * For example, if a displacement map pixel has `red = 1` and the filter scale is `20`, + * this filter will output the pixel approximately 20 pixels to the right of the original. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ + var DisplacementFilter = /*@__PURE__*/(function (Filter) { + function DisplacementFilter(sprite, scale) + { + var maskMatrix = new Matrix(); + + sprite.renderable = false; + + Filter.call(this, vertex$3, fragment$5, { + mapSampler: sprite._texture, + filterMatrix: maskMatrix, + scale: { x: 1, y: 1 }, + rotation: new Float32Array([1, 0, 0, 1]), + }); + + this.maskSprite = sprite; + this.maskMatrix = maskMatrix; + + if (scale === null || scale === undefined) + { + scale = 20; + } + + /** + * scaleX, scaleY for displacements + * @member {PIXI.Point} + */ + this.scale = new Point(scale, scale); + } + + if ( Filter ) { DisplacementFilter.__proto__ = Filter; } + DisplacementFilter.prototype = Object.create( Filter && Filter.prototype ); + DisplacementFilter.prototype.constructor = DisplacementFilter; + + var prototypeAccessors = { map: { configurable: true } }; + + /** + * Applies the filter. + * + * @param {PIXI.systems.FilterSystem} filterManager - The manager. + * @param {PIXI.RenderTexture} input - The input target. + * @param {PIXI.RenderTexture} output - The output target. + * @param {boolean} clear - Should the output be cleared before rendering to it. + */ + DisplacementFilter.prototype.apply = function apply (filterManager, input, output, clear) + { + // fill maskMatrix with _normalized sprite texture coords_ + this.uniforms.filterMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, this.maskSprite); + this.uniforms.scale.x = this.scale.x; + this.uniforms.scale.y = this.scale.y; + + // Extract rotation from world transform + var wt = this.maskSprite.transform.worldTransform; + var lenX = Math.sqrt((wt.a * wt.a) + (wt.b * wt.b)); + var lenY = Math.sqrt((wt.c * wt.c) + (wt.d * wt.d)); + + if (lenX !== 0 && lenY !== 0) + { + this.uniforms.rotation[0] = wt.a / lenX; + this.uniforms.rotation[1] = wt.b / lenX; + this.uniforms.rotation[2] = wt.c / lenY; + this.uniforms.rotation[3] = wt.d / lenY; + } + + // draw the filter... + filterManager.applyFilter(this, input, output, clear); + }; + + /** + * The texture used for the displacement map. Must be power of 2 sized texture. + * + * @member {PIXI.Texture} + */ + prototypeAccessors.map.get = function () + { + return this.uniforms.mapSampler; + }; + + prototypeAccessors.map.set = function (value) // eslint-disable-line require-jsdoc + { + this.uniforms.mapSampler = value; + }; + + Object.defineProperties( DisplacementFilter.prototype, prototypeAccessors ); + + return DisplacementFilter; + }(Filter)); + + /*! + * @pixi/filter-fxaa - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/filter-fxaa is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var vertex$4 = "\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n"; + + var fragment$6 = "varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it's\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n"; + + /** + * Basic FXAA (Fast Approximate Anti-Aliasing) implementation based on the code on geeks3d.com + * with the modification that the texture2DLod stuff was removed since it is unsupported by WebGL. + * + * @see https://github.com/mitsuhiko/webgl-meincraft + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + * + */ + var FXAAFilter = /*@__PURE__*/(function (Filter) { + function FXAAFilter() + { + // TODO - needs work + Filter.call(this, vertex$4, fragment$6); + } + + if ( Filter ) { FXAAFilter.__proto__ = Filter; } + FXAAFilter.prototype = Object.create( Filter && Filter.prototype ); + FXAAFilter.prototype.constructor = FXAAFilter; + + return FXAAFilter; + }(Filter)); + + /*! + * @pixi/filter-noise - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/filter-noise is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var fragment$7 = "precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n"; + + /** + * @author Vico @vicocotea + * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js + */ + + /** + * A Noise effect filter. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ + var NoiseFilter = /*@__PURE__*/(function (Filter) { + function NoiseFilter(noise, seed) + { + if ( noise === void 0 ) { noise = 0.5; } + if ( seed === void 0 ) { seed = Math.random(); } + + Filter.call(this, defaultFilter, fragment$7, { + uNoise: 0, + uSeed: 0, + }); + + this.noise = noise; + this.seed = seed; + } + + if ( Filter ) { NoiseFilter.__proto__ = Filter; } + NoiseFilter.prototype = Object.create( Filter && Filter.prototype ); + NoiseFilter.prototype.constructor = NoiseFilter; + + var prototypeAccessors = { noise: { configurable: true },seed: { configurable: true } }; + + /** + * The amount of noise to apply, this value should be in the range (0, 1]. + * + * @member {number} + * @default 0.5 + */ + prototypeAccessors.noise.get = function () + { + return this.uniforms.uNoise; + }; + + prototypeAccessors.noise.set = function (value) // eslint-disable-line require-jsdoc + { + this.uniforms.uNoise = value; + }; + + /** + * A seed value to apply to the random noise generation. `Math.random()` is a good value to use. + * + * @member {number} + */ + prototypeAccessors.seed.get = function () + { + return this.uniforms.uSeed; + }; + + prototypeAccessors.seed.set = function (value) // eslint-disable-line require-jsdoc + { + this.uniforms.uSeed = value; + }; + + Object.defineProperties( NoiseFilter.prototype, prototypeAccessors ); + + return NoiseFilter; + }(Filter)); + + /*! + * @pixi/mixin-cache-as-bitmap - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/mixin-cache-as-bitmap is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var _tempMatrix = new Matrix(); + + DisplayObject.prototype._cacheAsBitmap = false; + DisplayObject.prototype._cacheData = false; + + // figured theres no point adding ALL the extra variables to prototype. + // this model can hold the information needed. This can also be generated on demand as + // most objects are not cached as bitmaps. + /** + * @class + * @ignore + */ + var CacheData = function CacheData() + { + this.textureCacheId = null; + + this.originalRender = null; + this.originalRenderCanvas = null; + this.originalCalculateBounds = null; + this.originalGetLocalBounds = null; + + this.originalUpdateTransform = null; + this.originalHitTest = null; + this.originalDestroy = null; + this.originalMask = null; + this.originalFilterArea = null; + this.sprite = null; + }; + + Object.defineProperties(DisplayObject.prototype, { + /** + * Set this to true if you want this display object to be cached as a bitmap. + * This basically takes a snap shot of the display object as it is at that moment. It can + * provide a performance benefit for complex static displayObjects. + * To remove simply set this property to `false` + * + * IMPORTANT GOTCHA - Make sure that all your textures are preloaded BEFORE setting this property to true + * as it will take a snapshot of what is currently there. If the textures have not loaded then they will not appear. + * + * @member {boolean} + * @memberof PIXI.DisplayObject# + */ + cacheAsBitmap: { + get: function get() + { + return this._cacheAsBitmap; + }, + set: function set(value) + { + if (this._cacheAsBitmap === value) + { + return; + } + + this._cacheAsBitmap = value; + + var data; + + if (value) + { + if (!this._cacheData) + { + this._cacheData = new CacheData(); + } + + data = this._cacheData; + + data.originalRender = this.render; + data.originalRenderCanvas = this.renderCanvas; + + data.originalUpdateTransform = this.updateTransform; + data.originalCalculateBounds = this.calculateBounds; + data.originalGetLocalBounds = this.getLocalBounds; + + data.originalDestroy = this.destroy; + + data.originalContainsPoint = this.containsPoint; + + data.originalMask = this._mask; + data.originalFilterArea = this.filterArea; + + this.render = this._renderCached; + this.renderCanvas = this._renderCachedCanvas; + + this.destroy = this._cacheAsBitmapDestroy; + } + else + { + data = this._cacheData; + + if (data.sprite) + { + this._destroyCachedDisplayObject(); + } + + this.render = data.originalRender; + this.renderCanvas = data.originalRenderCanvas; + this.calculateBounds = data.originalCalculateBounds; + this.getLocalBounds = data.originalGetLocalBounds; + + this.destroy = data.originalDestroy; + + this.updateTransform = data.originalUpdateTransform; + this.containsPoint = data.originalContainsPoint; + + this._mask = data.originalMask; + this.filterArea = data.originalFilterArea; + } + }, + }, + }); + + /** + * Renders a cached version of the sprite with WebGL + * + * @private + * @function _renderCached + * @memberof PIXI.DisplayObject# + * @param {PIXI.Renderer} renderer - the WebGL renderer + */ + DisplayObject.prototype._renderCached = function _renderCached(renderer) + { + if (!this.visible || this.worldAlpha <= 0 || !this.renderable) + { + return; + } + + this._initCachedDisplayObject(renderer); + + this._cacheData.sprite.transform._worldID = this.transform._worldID; + this._cacheData.sprite.worldAlpha = this.worldAlpha; + this._cacheData.sprite._render(renderer); + }; + + /** + * Prepares the WebGL renderer to cache the sprite + * + * @private + * @function _initCachedDisplayObject + * @memberof PIXI.DisplayObject# + * @param {PIXI.Renderer} renderer - the WebGL renderer + */ + DisplayObject.prototype._initCachedDisplayObject = function _initCachedDisplayObject(renderer) + { + if (this._cacheData && this._cacheData.sprite) + { + return; + } + + // make sure alpha is set to 1 otherwise it will get rendered as invisible! + var cacheAlpha = this.alpha; + + this.alpha = 1; + + // first we flush anything left in the renderer (otherwise it would get rendered to the cached texture) + renderer.batch.flush(); + // this.filters= []; + + // next we find the dimensions of the untransformed object + // this function also calls updatetransform on all its children as part of the measuring. + // This means we don't need to update the transform again in this function + // TODO pass an object to clone too? saves having to create a new one each time! + var bounds = this.getLocalBounds().clone(); + + // add some padding! + if (this.filters) + { + var padding = this.filters[0].padding; + + bounds.pad(padding); + } + + bounds.ceil(settings.RESOLUTION); + + // for now we cache the current renderTarget that the WebGL renderer is currently using. + // this could be more elegant.. + var cachedRenderTexture = renderer.renderTexture.current; + var cachedSourceFrame = renderer.renderTexture.sourceFrame.clone(); + var cachedProjectionTransform = renderer.projection.transform; + + // We also store the filter stack - I will definitely look to change how this works a little later down the line. + // const stack = renderer.filterManager.filterStack; + + // this renderTexture will be used to store the cached DisplayObject + var renderTexture = RenderTexture.create(bounds.width, bounds.height); + + var textureCacheId = "cacheAsBitmap_" + (uid()); + + this._cacheData.textureCacheId = textureCacheId; + + BaseTexture.addToCache(renderTexture.baseTexture, textureCacheId); + Texture.addToCache(renderTexture, textureCacheId); + + // need to set // + var m = _tempMatrix; + + m.tx = -bounds.x; + m.ty = -bounds.y; + + // reset + this.transform.worldTransform.identity(); + + // set all properties to there original so we can render to a texture + this.render = this._cacheData.originalRender; + + renderer.render(this, renderTexture, true, m, true); + + // now restore the state be setting the new properties + renderer.projection.transform = cachedProjectionTransform; + renderer.renderTexture.bind(cachedRenderTexture, cachedSourceFrame); + + // renderer.filterManager.filterStack = stack; + + this.render = this._renderCached; + // the rest is the same as for Canvas + this.updateTransform = this.displayObjectUpdateTransform; + this.calculateBounds = this._calculateCachedBounds; + this.getLocalBounds = this._getCachedLocalBounds; + + this._mask = null; + this.filterArea = null; + + // create our cached sprite + var cachedSprite = new Sprite(renderTexture); + + cachedSprite.transform.worldTransform = this.transform.worldTransform; + cachedSprite.anchor.x = -(bounds.x / bounds.width); + cachedSprite.anchor.y = -(bounds.y / bounds.height); + cachedSprite.alpha = cacheAlpha; + cachedSprite._bounds = this._bounds; + + this._cacheData.sprite = cachedSprite; + + this.transform._parentID = -1; + // restore the transform of the cached sprite to avoid the nasty flicker.. + if (!this.parent) + { + this.parent = renderer._tempDisplayObjectParent; + this.updateTransform(); + this.parent = null; + } + else + { + this.updateTransform(); + } + + // map the hit test.. + this.containsPoint = cachedSprite.containsPoint.bind(cachedSprite); + }; + + /** + * Renders a cached version of the sprite with canvas + * + * @private + * @function _renderCachedCanvas + * @memberof PIXI.DisplayObject# + * @param {PIXI.Renderer} renderer - the WebGL renderer + */ + DisplayObject.prototype._renderCachedCanvas = function _renderCachedCanvas(renderer) + { + if (!this.visible || this.worldAlpha <= 0 || !this.renderable) + { + return; + } + + this._initCachedDisplayObjectCanvas(renderer); + + this._cacheData.sprite.worldAlpha = this.worldAlpha; + this._cacheData.sprite._renderCanvas(renderer); + }; + + // TODO this can be the same as the WebGL version.. will need to do a little tweaking first though.. + /** + * Prepares the Canvas renderer to cache the sprite + * + * @private + * @function _initCachedDisplayObjectCanvas + * @memberof PIXI.DisplayObject# + * @param {PIXI.Renderer} renderer - the WebGL renderer + */ + DisplayObject.prototype._initCachedDisplayObjectCanvas = function _initCachedDisplayObjectCanvas(renderer) + { + if (this._cacheData && this._cacheData.sprite) + { + return; + } + + // get bounds actually transforms the object for us already! + var bounds = this.getLocalBounds(); + + var cacheAlpha = this.alpha; + + this.alpha = 1; + + var cachedRenderTarget = renderer.context; + var cachedProjectionTransform = renderer._projTransform; + + bounds.ceil(settings.RESOLUTION); + + var renderTexture = RenderTexture.create(bounds.width, bounds.height); + + var textureCacheId = "cacheAsBitmap_" + (uid()); + + this._cacheData.textureCacheId = textureCacheId; + + BaseTexture.addToCache(renderTexture.baseTexture, textureCacheId); + Texture.addToCache(renderTexture, textureCacheId); + + // need to set // + var m = _tempMatrix; + + this.transform.localTransform.copyTo(m); + m.invert(); + + m.tx -= bounds.x; + m.ty -= bounds.y; + + // m.append(this.transform.worldTransform.) + // set all properties to there original so we can render to a texture + this.renderCanvas = this._cacheData.originalRenderCanvas; + + renderer.render(this, renderTexture, true, m, false); + // now restore the state be setting the new properties + renderer.context = cachedRenderTarget; + renderer._projTransform = cachedProjectionTransform; + + this.renderCanvas = this._renderCachedCanvas; + // the rest is the same as for WebGL + this.updateTransform = this.displayObjectUpdateTransform; + this.calculateBounds = this._calculateCachedBounds; + this.getLocalBounds = this._getCachedLocalBounds; + + this._mask = null; + this.filterArea = null; + + // create our cached sprite + var cachedSprite = new Sprite(renderTexture); + + cachedSprite.transform.worldTransform = this.transform.worldTransform; + cachedSprite.anchor.x = -(bounds.x / bounds.width); + cachedSprite.anchor.y = -(bounds.y / bounds.height); + cachedSprite.alpha = cacheAlpha; + cachedSprite._bounds = this._bounds; + + this._cacheData.sprite = cachedSprite; + + this.transform._parentID = -1; + // restore the transform of the cached sprite to avoid the nasty flicker.. + if (!this.parent) + { + this.parent = renderer._tempDisplayObjectParent; + this.updateTransform(); + this.parent = null; + } + else + { + this.updateTransform(); + } + + // map the hit test.. + this.containsPoint = cachedSprite.containsPoint.bind(cachedSprite); + }; + + /** + * Calculates the bounds of the cached sprite + * + * @private + */ + DisplayObject.prototype._calculateCachedBounds = function _calculateCachedBounds() + { + this._bounds.clear(); + this._cacheData.sprite.transform._worldID = this.transform._worldID; + this._cacheData.sprite._calculateBounds(); + this._lastBoundsID = this._boundsID; + }; + + /** + * Gets the bounds of the cached sprite. + * + * @private + * @return {Rectangle} The local bounds. + */ + DisplayObject.prototype._getCachedLocalBounds = function _getCachedLocalBounds() + { + return this._cacheData.sprite.getLocalBounds(); + }; + + /** + * Destroys the cached sprite. + * + * @private + */ + DisplayObject.prototype._destroyCachedDisplayObject = function _destroyCachedDisplayObject() + { + this._cacheData.sprite._texture.destroy(true); + this._cacheData.sprite = null; + + BaseTexture.removeFromCache(this._cacheData.textureCacheId); + Texture.removeFromCache(this._cacheData.textureCacheId); + + this._cacheData.textureCacheId = null; + }; + + /** + * Destroys the cached object. + * + * @private + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value. + * Used when destroying containers, see the Container.destroy method. + */ + DisplayObject.prototype._cacheAsBitmapDestroy = function _cacheAsBitmapDestroy(options) + { + this.cacheAsBitmap = false; + this.destroy(options); + }; + + /*! + * @pixi/mixin-get-child-by-name - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/mixin-get-child-by-name is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * The instance name of the object. + * + * @memberof PIXI.DisplayObject# + * @member {string} name + */ + DisplayObject.prototype.name = null; + + /** + * Returns the display object in the container. + * + * @method getChildByName + * @memberof PIXI.Container# + * @param {string} name - Instance name. + * @return {PIXI.DisplayObject} The child with the specified name. + */ + Container.prototype.getChildByName = function getChildByName(name) + { + for (var i = 0; i < this.children.length; i++) + { + if (this.children[i].name === name) + { + return this.children[i]; + } + } + + return null; + }; + + /*! + * @pixi/mixin-get-global-position - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/mixin-get-global-position is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Returns the global position of the displayObject. Does not depend on object scale, rotation and pivot. + * + * @method getGlobalPosition + * @memberof PIXI.DisplayObject# + * @param {PIXI.Point} [point=new PIXI.Point()] - The point to write the global value to. + * @param {boolean} [skipUpdate=false] - Setting to true will stop the transforms of the scene graph from + * being updated. This means the calculation returned MAY be out of date BUT will give you a + * nice performance boost. + * @return {PIXI.Point} The updated point. + */ + DisplayObject.prototype.getGlobalPosition = function getGlobalPosition(point, skipUpdate) + { + if ( point === void 0 ) { point = new Point(); } + if ( skipUpdate === void 0 ) { skipUpdate = false; } + + if (this.parent) + { + this.parent.toGlobal(this.position, point, skipUpdate); + } + else + { + point.x = this.position.x; + point.y = this.position.y; + } + + return point; + }; + + var v5 = '5.0.0'; + + /** + * Deprecations (backward compatibilities) are automatically applied for browser bundles + * in the UMD module format. If using Webpack or Rollup, you'll need to apply these + * deprecations manually by doing something like this: + * @example + * import * as PIXI from 'pixi.js'; + * PIXI.useDeprecated(); // MUST be bound to namespace + * @memberof PIXI + * @function useDeprecated + */ + function useDeprecated() + { + var PIXI = this; + + Object.defineProperties(PIXI, { + /** + * @constant {RegExp|string} SVG_SIZE + * @memberof PIXI + * @see PIXI.resources.SVGResource.SVG_SIZE + * @deprecated since 5.0.0 + */ + SVG_SIZE: { + get: function get() + { + deprecation(v5, 'PIXI.utils.SVG_SIZE property has moved to PIXI.resources.SVGResource.SVG_SIZE'); + + return PIXI.SVGResource.SVG_SIZE; + }, + }, + + /** + * @class PIXI.TransformStatic + * @deprecated since 5.0.0 + * @see PIXI.Transform + */ + TransformStatic: { + get: function get() + { + deprecation(v5, 'PIXI.TransformStatic class has been removed, use PIXI.Transform'); + + return PIXI.Transform; + }, + }, + + /** + * @class PIXI.TransformBase + * @deprecated since 5.0.0 + * @see PIXI.Transform + */ + TransformBase: { + get: function get() + { + deprecation(v5, 'PIXI.TransformBase class has been removed, use PIXI.Transform'); + + return PIXI.Transform; + }, + }, + + /** + * Constants that specify the transform type. + * + * @static + * @constant + * @name TRANSFORM_MODE + * @memberof PIXI + * @enum {number} + * @deprecated since 5.0.0 + * @property {number} STATIC + * @property {number} DYNAMIC + */ + TRANSFORM_MODE: { + get: function get() + { + deprecation(v5, 'PIXI.TRANSFORM_MODE property has been removed'); + + return { STATIC: 0, DYNAMIC: 1 }; + }, + }, + + /** + * @class PIXI.WebGLRenderer + * @see PIXI.Renderer + * @deprecated since 5.0.0 + */ + WebGLRenderer: { + get: function get() + { + deprecation(v5, 'PIXI.WebGLRenderer class has moved to PIXI.Renderer'); + + return PIXI.Renderer; + }, + }, + + /** + * @class PIXI.CanvasRenderTarget + * @see PIXI.utils.CanvasRenderTarget + * @deprecated since 5.0.0 + */ + CanvasRenderTarget: { + get: function get() + { + deprecation(v5, 'PIXI.CanvasRenderTarget class has moved to PIXI.utils.CanvasRenderTarget'); + + return PIXI.utils.CanvasRenderTarget; + }, + }, + + /** + * @memberof PIXI + * @name loader + * @type {PIXI.Loader} + * @see PIXI.Loader.shared + * @deprecated since 5.0.0 + */ + loader: { + get: function get() + { + deprecation(v5, 'PIXI.loader instance has moved to PIXI.Loader.shared'); + + return PIXI.Loader.shared; + }, + }, + + /** + * @class PIXI.FilterManager + * @see PIXI.systems.FilterSystem + * @deprecated since 5.0.0 + */ + FilterManager: { + get: function get() + { + deprecation(v5, 'PIXI.FilterManager class has moved to PIXI.systems.FilterSystem'); + + return PIXI.systems.FilterSystem; + }, + }, + + /** + * @namespace PIXI.CanvasTinter + * @see PIXI.canvasUtils + * @deprecated since 5.2.0 + */ + CanvasTinter: { + get: function get() + { + deprecation('5.2.0', 'PIXI.CanvasTinter namespace has moved to PIXI.canvasUtils'); + + return PIXI.canvasUtils; + }, + }, + + /** + * @namespace PIXI.GroupD8 + * @see PIXI.groupD8 + * @deprecated since 5.2.0 + */ + GroupD8: { + get: function get() + { + deprecation('5.2.0', 'PIXI.GroupD8 namespace has moved to PIXI.groupD8'); + + return PIXI.groupD8; + }, + }, + }); + + /** + * @namespace PIXI.prepare + * @see PIXI + * @deprecated since 5.2.1 + */ + PIXI.prepare = {}; + + Object.defineProperties(PIXI.prepare, { + /** + * @class PIXI.prepare.BasePrepare + * @deprecated since 5.2.1 + * @see PIXI.BasePrepare + */ + BasePrepare: { + get: function get() + { + deprecation('5.2.1', 'PIXI.prepare.BasePrepare moved to PIXI.BasePrepare'); + + return PIXI.BasePrepare; + }, + }, + /** + * @class PIXI.prepare.Prepare + * @deprecated since 5.2.1 + * @see PIXI.Prepare + */ + Prepare: { + get: function get() + { + deprecation('5.2.1', 'PIXI.prepare.Prepare moved to PIXI.Prepare'); + + return PIXI.Prepare; + }, + }, + /** + * @class PIXI.prepare.CanvasPrepare + * @deprecated since 5.2.1 + * @see PIXI.CanvasPrepare + */ + CanvasPrepare: { + get: function get() + { + deprecation('5.2.1', 'PIXI.prepare.CanvasPrepare moved to PIXI.CanvasPrepare'); + + return PIXI.CanvasPrepare; + }, + }, + }); + + /** + * @namespace PIXI.extract + * @see PIXI + * @deprecated since 5.2.1 + */ + PIXI.extract = {}; + + Object.defineProperties(PIXI.extract, { + /** + * @class PIXI.extract.Extract + * @deprecated since 5.2.1 + * @see PIXI.Extract + */ + Extract: { + get: function get() + { + deprecation('5.2.1', 'PIXI.extract.Extract moved to PIXI.Extract'); + + return PIXI.Extract; + }, + }, + /** + * @class PIXI.extract.CanvasExtract + * @deprecated since 5.2.1 + * @see PIXI.CanvasExtract + */ + CanvasExtract: { + get: function get() + { + deprecation('5.2.1', 'PIXI.extract.CanvasExtract moved to PIXI.CanvasExtract'); + + return PIXI.CanvasExtract; + }, + }, + }); + + /** + * This namespace has been removed. All classes previous nested + * under this namespace have been moved to the top-level `PIXI` object. + * @namespace PIXI.extras + * @deprecated since 5.0.0 + */ + PIXI.extras = {}; + + Object.defineProperties(PIXI.extras, { + /** + * @class PIXI.extras.TilingSprite + * @see PIXI.TilingSprite + * @deprecated since 5.0.0 + */ + TilingSprite: { + get: function get() + { + deprecation(v5, 'PIXI.extras.TilingSprite class has moved to PIXI.TilingSprite'); + + return PIXI.TilingSprite; + }, + }, + /** + * @class PIXI.extras.TilingSpriteRenderer + * @see PIXI.TilingSpriteRenderer + * @deprecated since 5.0.0 + */ + TilingSpriteRenderer: { + get: function get() + { + deprecation(v5, 'PIXI.extras.TilingSpriteRenderer class has moved to PIXI.TilingSpriteRenderer'); + + return PIXI.TilingSpriteRenderer; + }, + }, + /** + * @class PIXI.extras.AnimatedSprite + * @see PIXI.AnimatedSprite + * @deprecated since 5.0.0 + */ + AnimatedSprite: { + get: function get() + { + deprecation(v5, 'PIXI.extras.AnimatedSprite class has moved to PIXI.AnimatedSprite'); + + return PIXI.AnimatedSprite; + }, + }, + /** + * @class PIXI.extras.BitmapText + * @see PIXI.BitmapText + * @deprecated since 5.0.0 + */ + BitmapText: { + get: function get() + { + deprecation(v5, 'PIXI.extras.BitmapText class has moved to PIXI.BitmapText'); + + return PIXI.BitmapText; + }, + }, + }); + + Object.defineProperties(PIXI.utils, { + /** + * @function PIXI.utils.getSvgSize + * @see PIXI.resources.SVGResource.getSize + * @deprecated since 5.0.0 + */ + getSvgSize: { + get: function get() + { + deprecation(v5, 'PIXI.utils.getSvgSize function has moved to PIXI.resources.SVGResource.getSize'); + + return PIXI.SVGResource.getSize; + }, + }, + }); + + /** + * All classes on this namespace have moved to the high-level `PIXI` object. + * @namespace PIXI.mesh + * @deprecated since 5.0.0 + */ + PIXI.mesh = {}; + + Object.defineProperties(PIXI.mesh, { + /** + * @class PIXI.mesh.Mesh + * @see PIXI.SimpleMesh + * @deprecated since 5.0.0 + */ + Mesh: { + get: function get() + { + deprecation(v5, 'PIXI.mesh.Mesh class has moved to PIXI.SimpleMesh'); + + return PIXI.SimpleMesh; + }, + }, + /** + * @class PIXI.mesh.NineSlicePlane + * @see PIXI.NineSlicePlane + * @deprecated since 5.0.0 + */ + NineSlicePlane: { + get: function get() + { + deprecation(v5, 'PIXI.mesh.NineSlicePlane class has moved to PIXI.NineSlicePlane'); + + return PIXI.NineSlicePlane; + }, + }, + /** + * @class PIXI.mesh.Plane + * @see PIXI.SimplePlane + * @deprecated since 5.0.0 + */ + Plane: { + get: function get() + { + deprecation(v5, 'PIXI.mesh.Plane class has moved to PIXI.SimplePlane'); + + return PIXI.SimplePlane; + }, + }, + /** + * @class PIXI.mesh.Rope + * @see PIXI.SimpleRope + * @deprecated since 5.0.0 + */ + Rope: { + get: function get() + { + deprecation(v5, 'PIXI.mesh.Rope class has moved to PIXI.SimpleRope'); + + return PIXI.SimpleRope; + }, + }, + /** + * @class PIXI.mesh.RawMesh + * @see PIXI.Mesh + * @deprecated since 5.0.0 + */ + RawMesh: { + get: function get() + { + deprecation(v5, 'PIXI.mesh.RawMesh class has moved to PIXI.Mesh'); + + return PIXI.Mesh; + }, + }, + /** + * @class PIXI.mesh.CanvasMeshRenderer + * @see PIXI.CanvasMeshRenderer + * @deprecated since 5.0.0 + */ + CanvasMeshRenderer: { + get: function get() + { + deprecation(v5, 'PIXI.mesh.CanvasMeshRenderer class has moved to PIXI.CanvasMeshRenderer'); + + return PIXI.CanvasMeshRenderer; + }, + }, + /** + * @class PIXI.mesh.MeshRenderer + * @see PIXI.MeshRenderer + * @deprecated since 5.0.0 + */ + MeshRenderer: { + get: function get() + { + deprecation(v5, 'PIXI.mesh.MeshRenderer class has moved to PIXI.MeshRenderer'); + + return PIXI.MeshRenderer; + }, + }, + }); + + /** + * This namespace has been removed and items have been moved to + * the top-level `PIXI` object. + * @namespace PIXI.particles + * @deprecated since 5.0.0 + */ + PIXI.particles = {}; + + Object.defineProperties(PIXI.particles, { + /** + * @class PIXI.particles.ParticleContainer + * @deprecated since 5.0.0 + * @see PIXI.ParticleContainer + */ + ParticleContainer: { + get: function get() + { + deprecation(v5, 'PIXI.particles.ParticleContainer class has moved to PIXI.ParticleContainer'); + + return PIXI.ParticleContainer; + }, + }, + /** + * @class PIXI.particles.ParticleRenderer + * @deprecated since 5.0.0 + * @see PIXI.ParticleRenderer + */ + ParticleRenderer: { + get: function get() + { + deprecation(v5, 'PIXI.particles.ParticleRenderer class has moved to PIXI.ParticleRenderer'); + + return PIXI.ParticleRenderer; + }, + }, + }); + + /** + * This namespace has been removed and items have been moved to + * the top-level `PIXI` object. + * @namespace PIXI.ticker + * @deprecated since 5.0.0 + */ + PIXI.ticker = {}; + + Object.defineProperties(PIXI.ticker, { + /** + * @class PIXI.ticker.Ticker + * @deprecated since 5.0.0 + * @see PIXI.Ticker + */ + Ticker: { + get: function get() + { + deprecation(v5, 'PIXI.ticker.Ticker class has moved to PIXI.Ticker'); + + return PIXI.Ticker; + }, + }, + /** + * @name PIXI.ticker.shared + * @type {PIXI.Ticker} + * @deprecated since 5.0.0 + * @see PIXI.Ticker.shared + */ + shared: { + get: function get() + { + deprecation(v5, 'PIXI.ticker.shared instance has moved to PIXI.Ticker.shared'); + + return PIXI.Ticker.shared; + }, + }, + }); + + /** + * All classes on this namespace have moved to the high-level `PIXI` object. + * @namespace PIXI.loaders + * @deprecated since 5.0.0 + */ + PIXI.loaders = {}; + + Object.defineProperties(PIXI.loaders, { + /** + * @class PIXI.loaders.Loader + * @see PIXI.Loader + * @deprecated since 5.0.0 + */ + Loader: { + get: function get() + { + deprecation(v5, 'PIXI.loaders.Loader class has moved to PIXI.Loader'); + + return PIXI.Loader; + }, + }, + /** + * @class PIXI.loaders.Resource + * @see PIXI.LoaderResource + * @deprecated since 5.0.0 + */ + Resource: { + get: function get() + { + deprecation(v5, 'PIXI.loaders.Resource class has moved to PIXI.LoaderResource'); + + return PIXI.LoaderResource; + }, + }, + /** + * @function PIXI.loaders.bitmapFontParser + * @see PIXI.BitmapFontLoader.use + * @deprecated since 5.0.0 + */ + bitmapFontParser: { + get: function get() + { + deprecation(v5, 'PIXI.loaders.bitmapFontParser function has moved to PIXI.BitmapFontLoader.use'); + + return PIXI.BitmapFontLoader.use; + }, + }, + /** + * @function PIXI.loaders.parseBitmapFontData + * @see PIXI.BitmapFontLoader.parse + * @deprecated since 5.0.0 + */ + parseBitmapFontData: { + get: function get() + { + deprecation(v5, 'PIXI.loaders.parseBitmapFontData function has moved to PIXI.BitmapFontLoader.parse'); + + return PIXI.BitmapFontLoader.parse; + }, + }, + /** + * @function PIXI.loaders.spritesheetParser + * @see PIXI.SpritesheetLoader.use + * @deprecated since 5.0.0 + */ + spritesheetParser: { + get: function get() + { + deprecation(v5, 'PIXI.loaders.spritesheetParser function has moved to PIXI.SpritesheetLoader.use'); + + return PIXI.SpritesheetLoader.use; + }, + }, + /** + * @function PIXI.loaders.getResourcePath + * @see PIXI.SpritesheetLoader.getResourcePath + * @deprecated since 5.0.0 + */ + getResourcePath: { + get: function get() + { + deprecation(v5, 'PIXI.loaders.getResourcePath property has moved to PIXI.SpritesheetLoader.getResourcePath'); + + return PIXI.SpritesheetLoader.getResourcePath; + }, + }, + }); + + /** + * @function PIXI.loaders.Loader.addPixiMiddleware + * @see PIXI.Loader.registerPlugin + * @deprecated since 5.0.0 + * @param {function} middleware + */ + PIXI.Loader.addPixiMiddleware = function addPixiMiddleware(middleware) + { + deprecation(v5, + 'PIXI.loaders.Loader.addPixiMiddleware function is deprecated, use PIXI.loaders.Loader.registerPlugin' + ); + + return PIXI.loaders.Loader.registerPlugin({ use: middleware() }); + }; + + /** + * @class PIXI.extract.WebGLExtract + * @deprecated since 5.0.0 + * @see PIXI.Extract + */ + Object.defineProperty(PIXI.extract, 'WebGLExtract', { + get: function get() + { + deprecation(v5, 'PIXI.extract.WebGLExtract method has moved to PIXI.Extract'); + + return PIXI.Extract; + }, + }); + + /** + * @class PIXI.prepare.WebGLPrepare + * @deprecated since 5.0.0 + * @see PIXI.Prepare + */ + Object.defineProperty(PIXI.prepare, 'WebGLPrepare', { + get: function get() + { + deprecation(v5, 'PIXI.prepare.WebGLPrepare class has moved to PIXI.Prepare'); + + return PIXI.Prepare; + }, + }); + + /** + * @method PIXI.Container#_renderWebGL + * @private + * @deprecated since 5.0.0 + * @see PIXI.Container#render + * @param {PIXI.Renderer} renderer Instance of renderer + */ + PIXI.Container.prototype._renderWebGL = function _renderWebGL(renderer) + { + deprecation(v5, 'PIXI.Container._renderWebGL method has moved to PIXI.Container._render'); + + this._render(renderer); + }; + + /** + * @method PIXI.Container#renderWebGL + * @deprecated since 5.0.0 + * @see PIXI.Container#render + * @param {PIXI.Renderer} renderer Instance of renderer + */ + PIXI.Container.prototype.renderWebGL = function renderWebGL(renderer) + { + deprecation(v5, 'PIXI.Container.renderWebGL method has moved to PIXI.Container.render'); + + this.render(renderer); + }; + + /** + * @method PIXI.DisplayObject#renderWebGL + * @deprecated since 5.0.0 + * @see PIXI.DisplayObject#render + * @param {PIXI.Renderer} renderer Instance of renderer + */ + PIXI.DisplayObject.prototype.renderWebGL = function renderWebGL(renderer) + { + deprecation(v5, 'PIXI.DisplayObject.renderWebGL method has moved to PIXI.DisplayObject.render'); + + this.render(renderer); + }; + + /** + * @method PIXI.Container#renderAdvancedWebGL + * @deprecated since 5.0.0 + * @see PIXI.Container#renderAdvanced + * @param {PIXI.Renderer} renderer Instance of renderer + */ + PIXI.Container.prototype.renderAdvancedWebGL = function renderAdvancedWebGL(renderer) + { + deprecation(v5, 'PIXI.Container.renderAdvancedWebGL method has moved to PIXI.Container.renderAdvanced'); + + this.renderAdvanced(renderer); + }; + + Object.defineProperties(PIXI.settings, { + /** + * Default transform type. + * + * @static + * @deprecated since 5.0.0 + * @memberof PIXI.settings + * @type {PIXI.TRANSFORM_MODE} + * @default PIXI.TRANSFORM_MODE.STATIC + */ + TRANSFORM_MODE: { + get: function get() + { + deprecation(v5, 'PIXI.settings.TRANSFORM_MODE property has been removed'); + + return 0; + }, + set: function set() + { + deprecation(v5, 'PIXI.settings.TRANSFORM_MODE property has been removed'); + }, + }, + }); + + var BaseTexture = PIXI.BaseTexture; + + /** + * @method loadSource + * @memberof PIXI.BaseTexture# + * @deprecated since 5.0.0 + */ + BaseTexture.prototype.loadSource = function loadSource(image) + { + deprecation(v5, 'PIXI.BaseTexture.loadSource method has been deprecated'); + + var resource = PIXI.resources.autoDetectResource(image); + + resource.internal = true; + + this.setResource(resource); + this.update(); + }; + + var baseTextureIdDeprecation = false; + + Object.defineProperties(BaseTexture.prototype, { + /** + * @name PIXI.BaseTexture#hasLoaded + * @type {boolean} + * @deprecated since 5.0.0 + * @readonly + * @see PIXI.BaseTexture#valid + */ + hasLoaded: { + get: function get() + { + deprecation(v5, 'PIXI.BaseTexture.hasLoaded property has been removed, use PIXI.BaseTexture.valid'); + + return this.valid; + }, + }, + /** + * @name PIXI.BaseTexture#imageUrl + * @type {string} + * @deprecated since 5.0.0 + * @see PIXI.resource.ImageResource#url + */ + imageUrl: { + get: function get() + { + deprecation(v5, 'PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url'); + + return this.resource && this.resource.url; + }, + + set: function set(imageUrl) + { + deprecation(v5, 'PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url'); + + if (this.resource) + { + this.resource.url = imageUrl; + } + }, + }, + /** + * @name PIXI.BaseTexture#source + * @type {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} + * @deprecated since 5.0.0 + * @readonly + * @see PIXI.resources.BaseImageResource#source + */ + source: { + get: function get() + { + deprecation(v5, 'PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source`'); + + return this.resource && this.resource.source; + }, + set: function set(source) + { + deprecation(v5, 'PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source` ' + + 'if you want to set HTMLCanvasElement. Otherwise, create new BaseTexture.'); + + if (this.resource) + { + this.resource.source = source; + } + }, + }, + + /** + * @name PIXI.BaseTexture#premultiplyAlpha + * @type {boolean} + * @deprecated since 5.2.0 + * @readonly + * @see PIXI.BaseTexture#alphaMode + */ + premultiplyAlpha: { + get: function get() + { + deprecation('5.2.0', 'PIXI.BaseTexture.premultiplyAlpha property has been changed to `alphaMode`' + + ', see `PIXI.ALPHA_MODES`'); + + return this.alphaMode !== 0; + }, + set: function set(value) + { + deprecation('5.2.0', 'PIXI.BaseTexture.premultiplyAlpha property has been changed to `alphaMode`' + + ', see `PIXI.ALPHA_MODES`'); + + this.alphaMode = Number(value); + }, + }, + /** + * Batch local field, stores current texture location + * + * @name PIXI.BaseTexture#_id + * @deprecated since 5.2.0 + * @type {number} + * @see PIXI.BaseTexture#_batchLocation + */ + _id: { + get: function get() + { + if (!baseTextureIdDeprecation) + { + // #popelyshev: That property was a hot place, I don't want to call deprecation method on it if possible + deprecation('5.2.0', 'PIXI.BaseTexture._id batch local field has been changed to `_batchLocation`'); + baseTextureIdDeprecation = true; + } + + return this._batchLocation; + }, + set: function set(value) + { + this._batchLocation = value; + }, + }, + }); + + /** + * @method fromImage + * @static + * @memberof PIXI.BaseTexture + * @deprecated since 5.0.0 + * @see PIXI.BaseTexture.from + */ + BaseTexture.fromImage = function fromImage(canvas, crossorigin, scaleMode, scale) + { + deprecation(v5, 'PIXI.BaseTexture.fromImage method has been replaced with PIXI.BaseTexture.from'); + + var resourceOptions = { scale: scale, crossorigin: crossorigin }; + + return BaseTexture.from(canvas, { scaleMode: scaleMode, resourceOptions: resourceOptions }); + }; + + /** + * @method fromCanvas + * @static + * @memberof PIXI.BaseTexture + * @deprecated since 5.0.0 + * @see PIXI.BaseTexture.from + */ + BaseTexture.fromCanvas = function fromCanvas(canvas, scaleMode) + { + deprecation(v5, 'PIXI.BaseTexture.fromCanvas method has been replaced with PIXI.BaseTexture.from'); + + return BaseTexture.from(canvas, { scaleMode: scaleMode }); + }; + + /** + * @method fromSVG + * @static + * @memberof PIXI.BaseTexture + * @deprecated since 5.0.0 + * @see PIXI.BaseTexture.from + */ + BaseTexture.fromSVG = function fromSVG(canvas, crossorigin, scaleMode, scale) + { + deprecation(v5, 'PIXI.BaseTexture.fromSVG method has been replaced with PIXI.BaseTexture.from'); + + var resourceOptions = { scale: scale, crossorigin: crossorigin }; + + return BaseTexture.from(canvas, { scaleMode: scaleMode, resourceOptions: resourceOptions }); + }; + + Object.defineProperties(PIXI.resources.ImageResource.prototype, { + /** + * @name PIXI.resources.ImageResource#premultiplyAlpha + * @type {boolean} + * @deprecated since 5.2.0 + * @readonly + * @see PIXI.resources.ImageResource#alphaMode + */ + premultiplyAlpha: { + get: function get() + { + deprecation('5.2.0', 'PIXI.resources.ImageResource.premultiplyAlpha property ' + + 'has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`'); + + return this.alphaMode !== 0; + }, + set: function set(value) + { + deprecation('5.2.0', 'PIXI.resources.ImageResource.premultiplyAlpha property ' + + 'has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`'); + this.alphaMode = Number(value); + }, + }, + }); + + /** + * @method PIXI.Point#copy + * @deprecated since 5.0.0 + * @see PIXI.Point#copyFrom + */ + PIXI.Point.prototype.copy = function copy(p) + { + deprecation(v5, 'PIXI.Point.copy method has been replaced with PIXI.Point.copyFrom'); + + return this.copyFrom(p); + }; + + /** + * @method PIXI.ObservablePoint#copy + * @deprecated since 5.0.0 + * @see PIXI.ObservablePoint#copyFrom + */ + PIXI.ObservablePoint.prototype.copy = function copy(p) + { + deprecation(v5, 'PIXI.ObservablePoint.copy method has been replaced with PIXI.ObservablePoint.copyFrom'); + + return this.copyFrom(p); + }; + + /** + * @method PIXI.Rectangle#copy + * @deprecated since 5.0.0 + * @see PIXI.Rectangle#copyFrom + */ + PIXI.Rectangle.prototype.copy = function copy(p) + { + deprecation(v5, 'PIXI.Rectangle.copy method has been replaced with PIXI.Rectangle.copyFrom'); + + return this.copyFrom(p); + }; + + /** + * @method PIXI.Matrix#copy + * @deprecated since 5.0.0 + * @see PIXI.Matrix#copyTo + */ + PIXI.Matrix.prototype.copy = function copy(p) + { + deprecation(v5, 'PIXI.Matrix.copy method has been replaced with PIXI.Matrix.copyTo'); + + return this.copyTo(p); + }; + + /** + * @method PIXI.systems.StateSystem#setState + * @deprecated since 5.1.0 + * @see PIXI.systems.StateSystem#set + */ + PIXI.systems.StateSystem.prototype.setState = function setState(s) + { + deprecation('v5.1.0', 'StateSystem.setState has been renamed to StateSystem.set'); + + return this.set(s); + }; + + Object.assign(PIXI.systems.FilterSystem.prototype, { + /** + * @method PIXI.FilterManager#getRenderTarget + * @deprecated since 5.0.0 + * @see PIXI.systems.FilterSystem#getFilterTexture + */ + getRenderTarget: function getRenderTarget(clear, resolution) + { + deprecation(v5, + 'PIXI.FilterManager.getRenderTarget method has been replaced with PIXI.systems.FilterSystem#getFilterTexture' + ); + + return this.getFilterTexture(resolution); + }, + + /** + * @method PIXI.FilterManager#returnRenderTarget + * @deprecated since 5.0.0 + * @see PIXI.systems.FilterSystem#returnFilterTexture + */ + returnRenderTarget: function returnRenderTarget(renderTexture) + { + deprecation(v5, + 'PIXI.FilterManager.returnRenderTarget method has been replaced with ' + + 'PIXI.systems.FilterSystem.returnFilterTexture' + ); + + this.returnFilterTexture(renderTexture); + }, + + /** + * @method PIXI.systems.FilterSystem#calculateScreenSpaceMatrix + * @deprecated since 5.0.0 + * @param {PIXI.Matrix} outputMatrix - the matrix to output to. + * @return {PIXI.Matrix} The mapped matrix. + */ + calculateScreenSpaceMatrix: function calculateScreenSpaceMatrix(outputMatrix) + { + deprecation(v5, 'PIXI.systems.FilterSystem.calculateScreenSpaceMatrix method is removed, ' + + 'use `(vTextureCoord * inputSize.xy) + outputFrame.xy` instead'); + + var mappedMatrix = outputMatrix.identity(); + var ref = this.activeState; + var sourceFrame = ref.sourceFrame; + var destinationFrame = ref.destinationFrame; + + mappedMatrix.translate(sourceFrame.x / destinationFrame.width, sourceFrame.y / destinationFrame.height); + mappedMatrix.scale(destinationFrame.width, destinationFrame.height); + + return mappedMatrix; + }, + + /** + * @method PIXI.systems.FilterSystem#calculateNormalizedScreenSpaceMatrix + * @deprecated since 5.0.0 + * @param {PIXI.Matrix} outputMatrix - The matrix to output to. + * @return {PIXI.Matrix} The mapped matrix. + */ + calculateNormalizedScreenSpaceMatrix: function calculateNormalizedScreenSpaceMatrix(outputMatrix) + { + deprecation(v5, 'PIXI.systems.FilterManager.calculateNormalizedScreenSpaceMatrix method is removed, ' + + 'use `((vTextureCoord * inputSize.xy) + outputFrame.xy) / outputFrame.zw` instead.'); + + var ref = this.activeState; + var sourceFrame = ref.sourceFrame; + var destinationFrame = ref.destinationFrame; + var mappedMatrix = outputMatrix.identity(); + + mappedMatrix.translate(sourceFrame.x / destinationFrame.width, sourceFrame.y / destinationFrame.height); + + var translateScaleX = (destinationFrame.width / sourceFrame.width); + var translateScaleY = (destinationFrame.height / sourceFrame.height); + + mappedMatrix.scale(translateScaleX, translateScaleY); + + return mappedMatrix; + }, + }); + + Object.defineProperties(PIXI.RenderTexture.prototype, { + /** + * @name PIXI.RenderTexture#sourceFrame + * @type {PIXI.Rectangle} + * @deprecated since 5.0.0 + * @readonly + */ + sourceFrame: { + get: function get() + { + deprecation(v5, 'PIXI.RenderTexture.sourceFrame property has been removed'); + + return this.filterFrame; + }, + }, + /** + * @name PIXI.RenderTexture#size + * @type {PIXI.Rectangle} + * @deprecated since 5.0.0 + * @readonly + */ + size: { + get: function get() + { + deprecation(v5, 'PIXI.RenderTexture.size property has been removed'); + + return this._frame; + }, + }, + }); + + /** + * @class BlurXFilter + * @memberof PIXI.filters + * @deprecated since 5.0.0 + * @see PIXI.filters.BlurFilterPass + */ + var BlurXFilter = /*@__PURE__*/(function (superclass) { + function BlurXFilter(strength, quality, resolution, kernelSize) + { + deprecation(v5, 'PIXI.filters.BlurXFilter class is deprecated, use PIXI.filters.BlurFilterPass'); + + superclass.call(this, true, strength, quality, resolution, kernelSize); + } + + if ( superclass ) BlurXFilter.__proto__ = superclass; + BlurXFilter.prototype = Object.create( superclass && superclass.prototype ); + BlurXFilter.prototype.constructor = BlurXFilter; + + return BlurXFilter; + }(PIXI.filters.BlurFilterPass)); + + /** + * @class BlurYFilter + * @memberof PIXI.filters + * @deprecated since 5.0.0 + * @see PIXI.filters.BlurFilterPass + */ + var BlurYFilter = /*@__PURE__*/(function (superclass) { + function BlurYFilter(strength, quality, resolution, kernelSize) + { + deprecation(v5, 'PIXI.filters.BlurYFilter class is deprecated, use PIXI.filters.BlurFilterPass'); + + superclass.call(this, false, strength, quality, resolution, kernelSize); + } + + if ( superclass ) BlurYFilter.__proto__ = superclass; + BlurYFilter.prototype = Object.create( superclass && superclass.prototype ); + BlurYFilter.prototype.constructor = BlurYFilter; + + return BlurYFilter; + }(PIXI.filters.BlurFilterPass)); + + Object.assign(PIXI.filters, { + BlurXFilter: BlurXFilter, + BlurYFilter: BlurYFilter, + }); + + var Sprite = PIXI.Sprite; + var Texture = PIXI.Texture; + var Graphics = PIXI.Graphics; + + // Support for pixi.js-legacy bifurcation + // give users a friendly assist to use legacy + if (!Graphics.prototype.generateCanvasTexture) + { + Graphics.prototype.generateCanvasTexture = function generateCanvasTexture() + { + deprecation(v5, 'PIXI.Graphics.generateCanvasTexture method is only available in "pixi.js-legacy"'); + }; + } + + /** + * @deprecated since 5.0.0 + * @member {PIXI.Graphics} PIXI.Graphics#graphicsData + * @see PIXI.Graphics#geometry + * @readonly + */ + Object.defineProperty(PIXI.Graphics.prototype, 'graphicsData', { + get: function get() + { + deprecation(v5, 'PIXI.Graphics.graphicsData property is deprecated, use PIXI.Graphics.geometry.graphicsData'); + + return this.geometry.graphicsData; + }, + }); + + /** + * @deprecated since 5.0.0 + * @member {PIXI.Point[]} PIXI.SimpleRope#points + * @see PIXI.Mesh#geometry + */ + Object.defineProperty(PIXI.SimpleRope.prototype, 'points', { + get: function get() + { + deprecation(v5, 'PIXI.SimpleRope.points property is deprecated, ' + + 'use PIXI.SimpleRope.geometry.points'); + + return this.geometry.points; + }, + set: function set(value) + { + deprecation(v5, 'PIXI.SimpleRope.points property is deprecated, ' + + 'use PIXI.SimpleRope.geometry.points'); + + this.geometry.points = value; + }, + }); + + // Use these to deprecate all the Sprite from* methods + function spriteFrom(name, source, crossorigin, scaleMode) + { + deprecation(v5, ("PIXI.Sprite." + name + " method is deprecated, use PIXI.Sprite.from")); + + return Sprite.from(source, { + resourceOptions: { + scale: scaleMode, + crossorigin: crossorigin, + }, + }); + } + + /** + * @deprecated since 5.0.0 + * @see PIXI.Sprite.from + * @method PIXI.Sprite.fromImage + * @return {PIXI.Sprite} + */ + Sprite.fromImage = spriteFrom.bind(null, 'fromImage'); + + /** + * @deprecated since 5.0.0 + * @method PIXI.Sprite.fromSVG + * @see PIXI.Sprite.from + * @return {PIXI.Sprite} + */ + Sprite.fromSVG = spriteFrom.bind(null, 'fromSVG'); + + /** + * @deprecated since 5.0.0 + * @method PIXI.Sprite.fromCanvas + * @see PIXI.Sprite.from + * @return {PIXI.Sprite} + */ + Sprite.fromCanvas = spriteFrom.bind(null, 'fromCanvas'); + + /** + * @deprecated since 5.0.0 + * @method PIXI.Sprite.fromVideo + * @see PIXI.Sprite.from + * @return {PIXI.Sprite} + */ + Sprite.fromVideo = spriteFrom.bind(null, 'fromVideo'); + + /** + * @deprecated since 5.0.0 + * @method PIXI.Sprite.fromFrame + * @see PIXI.Sprite.from + * @return {PIXI.Sprite} + */ + Sprite.fromFrame = spriteFrom.bind(null, 'fromFrame'); + + // Use these to deprecate all the Texture from* methods + function textureFrom(name, source, crossorigin, scaleMode) + { + deprecation(v5, ("PIXI.Texture." + name + " method is deprecated, use PIXI.Texture.from")); + + return Texture.from(source, { + resourceOptions: { + scale: scaleMode, + crossorigin: crossorigin, + }, + }); + } + + /** + * @deprecated since 5.0.0 + * @method PIXI.Texture.fromImage + * @see PIXI.Texture.from + * @return {PIXI.Texture} + */ + Texture.fromImage = textureFrom.bind(null, 'fromImage'); + + /** + * @deprecated since 5.0.0 + * @method PIXI.Texture.fromSVG + * @see PIXI.Texture.from + * @return {PIXI.Texture} + */ + Texture.fromSVG = textureFrom.bind(null, 'fromSVG'); + + /** + * @deprecated since 5.0.0 + * @method PIXI.Texture.fromCanvas + * @see PIXI.Texture.from + * @return {PIXI.Texture} + */ + Texture.fromCanvas = textureFrom.bind(null, 'fromCanvas'); + + /** + * @deprecated since 5.0.0 + * @method PIXI.Texture.fromVideo + * @see PIXI.Texture.from + * @return {PIXI.Texture} + */ + Texture.fromVideo = textureFrom.bind(null, 'fromVideo'); + + /** + * @deprecated since 5.0.0 + * @method PIXI.Texture.fromFrame + * @see PIXI.Texture.from + * @return {PIXI.Texture} + */ + Texture.fromFrame = textureFrom.bind(null, 'fromFrame'); + + /** + * @deprecated since 5.0.0 + * @member {boolean} PIXI.AbstractRenderer#autoResize + * @see PIXI.AbstractRenderer#autoDensity + */ + Object.defineProperty(PIXI.AbstractRenderer.prototype, 'autoResize', { + get: function get() + { + deprecation(v5, 'PIXI.AbstractRenderer.autoResize property is deprecated, ' + + 'use PIXI.AbstractRenderer.autoDensity'); + + return this.autoDensity; + }, + set: function set(value) + { + deprecation(v5, 'PIXI.AbstractRenderer.autoResize property is deprecated, ' + + 'use PIXI.AbstractRenderer.autoDensity'); + + this.autoDensity = value; + }, + }); + + /** + * @deprecated since 5.0.0 + * @member {PIXI.systems.TextureSystem} PIXI.Renderer#textureManager + * @see PIXI.Renderer#texture + */ + Object.defineProperty(PIXI.Renderer.prototype, 'textureManager', { + get: function get() + { + deprecation(v5, 'PIXI.Renderer.textureManager property is deprecated, use PIXI.Renderer.texture'); + + return this.texture; + }, + }); + + /** + * @namespace PIXI.utils.mixins + * @deprecated since 5.0.0 + */ + PIXI.utils.mixins = { + /** + * @memberof PIXI.utils.mixins + * @function mixin + * @deprecated since 5.0.0 + */ + mixin: function mixin() + { + deprecation(v5, 'PIXI.utils.mixins.mixin function is no longer available'); + }, + /** + * @memberof PIXI.utils.mixins + * @function delayMixin + * @deprecated since 5.0.0 + */ + delayMixin: function delayMixin() + { + deprecation(v5, 'PIXI.utils.mixins.delayMixin function is no longer available'); + }, + /** + * @memberof PIXI.utils.mixins + * @function performMixins + * @deprecated since 5.0.0 + */ + performMixins: function performMixins() + { + deprecation(v5, 'PIXI.utils.mixins.performMixins function is no longer available'); + }, + }; + } + + /*! + * @pixi/mesh - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/mesh is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * Class controls cache for UV mapping from Texture normal space to BaseTexture normal space. + * + * @class + * @memberof PIXI + */ + var MeshBatchUvs = function MeshBatchUvs(uvBuffer, uvMatrix) + { + /** + * Buffer with normalized UV's + * @member {PIXI.Buffer} + */ + this.uvBuffer = uvBuffer; + + /** + * Material UV matrix + * @member {PIXI.TextureMatrix} + */ + this.uvMatrix = uvMatrix; + + /** + * UV Buffer data + * @member {Float32Array} + * @readonly + */ + this.data = null; + + this._bufferUpdateId = -1; + + this._textureUpdateId = -1; + + this._updateID = 0; + }; + + /** + * updates + * + * @param {boolean} forceUpdate - force the update + */ + MeshBatchUvs.prototype.update = function update (forceUpdate) + { + if (!forceUpdate + && this._bufferUpdateId === this.uvBuffer._updateID + && this._textureUpdateId === this.uvMatrix._updateID) + { + return; + } + + this._bufferUpdateId = this.uvBuffer._updateID; + this._textureUpdateId = this.uvMatrix._updateID; + + var data = this.uvBuffer.data; + + if (!this.data || this.data.length !== data.length) + { + this.data = new Float32Array(data.length); + } + + this.uvMatrix.multiplyUvs(data, this.data); + + this._updateID++; + }; + + var tempPoint$2 = new Point(); + var tempPolygon = new Polygon(); + + /** + * Base mesh class. + * + * This class empowers you to have maximum flexibility to render any kind of WebGL visuals you can think of. + * This class assumes a certain level of WebGL knowledge. + * If you know a bit this should abstract enough away to make you life easier! + * + * Pretty much ALL WebGL can be broken down into the following: + * - Geometry - The structure and data for the mesh. This can include anything from positions, uvs, normals, colors etc.. + * - Shader - This is the shader that PixiJS will render the geometry with (attributes in the shader must match the geometry) + * - State - This is the state of WebGL required to render the mesh. + * + * Through a combination of the above elements you can render anything you want, 2D or 3D! + * + * @class + * @extends PIXI.Container + * @memberof PIXI + */ + var Mesh = /*@__PURE__*/(function (Container) { + function Mesh(geometry, shader, state, drawMode)// vertices, uvs, indices, drawMode) + { + if ( drawMode === void 0 ) { drawMode = exports.DRAW_MODES.TRIANGLES; } + + Container.call(this); + + /** + * Includes vertex positions, face indices, normals, colors, UVs, and + * custom attributes within buffers, reducing the cost of passing all + * this data to the GPU. Can be shared between multiple Mesh objects. + * @member {PIXI.Geometry} + * @readonly + */ + this.geometry = geometry; + + geometry.refCount++; + + /** + * Represents the vertex and fragment shaders that processes the geometry and runs on the GPU. + * Can be shared between multiple Mesh objects. + * @member {PIXI.Shader|PIXI.MeshMaterial} + */ + this.shader = shader; + + /** + * Represents the WebGL state the Mesh required to render, excludes shader and geometry. E.g., + * blend mode, culling, depth testing, direction of rendering triangles, backface, etc. + * @member {PIXI.State} + */ + this.state = state || State.for2d(); + + /** + * The way the Mesh should be drawn, can be any of the {@link PIXI.DRAW_MODES} constants. + * + * @member {number} + * @see PIXI.DRAW_MODES + */ + this.drawMode = drawMode; + + /** + * Typically the index of the IndexBuffer where to start drawing. + * @member {number} + * @default 0 + */ + this.start = 0; + + /** + * How much of the geometry to draw, by default `0` renders everything. + * @member {number} + * @default 0 + */ + this.size = 0; + + /** + * thease are used as easy access for batching + * @member {Float32Array} + * @private + */ + this.uvs = null; + + /** + * thease are used as easy access for batching + * @member {Uint16Array} + * @private + */ + this.indices = null; + + /** + * this is the caching layer used by the batcher + * @member {Float32Array} + * @private + */ + this.vertexData = new Float32Array(1); + + /** + * If geometry is changed used to decide to re-transform + * the vertexData. + * @member {number} + * @private + */ + this.vertexDirty = 0; + + this._transformID = -1; + + // Inherited from DisplayMode, set defaults + this.tint = 0xFFFFFF; + this.blendMode = exports.BLEND_MODES.NORMAL; + + /** + * Internal roundPixels field + * + * @member {boolean} + * @private + */ + this._roundPixels = settings.ROUND_PIXELS; + + /** + * Batched UV's are cached for atlas textures + * @member {PIXI.MeshBatchUvs} + * @private + */ + this.batchUvs = null; + } + + if ( Container ) { Mesh.__proto__ = Container; } + Mesh.prototype = Object.create( Container && Container.prototype ); + Mesh.prototype.constructor = Mesh; + + var prototypeAccessors = { uvBuffer: { configurable: true },verticesBuffer: { configurable: true },material: { configurable: true },blendMode: { configurable: true },roundPixels: { configurable: true },tint: { configurable: true },texture: { configurable: true } }; + + /** + * To change mesh uv's, change its uvBuffer data and increment its _updateID. + * @member {PIXI.Buffer} + * @readonly + */ + prototypeAccessors.uvBuffer.get = function () + { + return this.geometry.buffers[1]; + }; + + /** + * To change mesh vertices, change its uvBuffer data and increment its _updateID. + * Incrementing _updateID is optional because most of Mesh objects do it anyway. + * @member {PIXI.Buffer} + * @readonly + */ + prototypeAccessors.verticesBuffer.get = function () + { + return this.geometry.buffers[0]; + }; + + /** + * Alias for {@link PIXI.Mesh#shader}. + * @member {PIXI.Shader|PIXI.MeshMaterial} + */ + prototypeAccessors.material.set = function (value) + { + this.shader = value; + }; + + prototypeAccessors.material.get = function () + { + return this.shader; + }; + + /** + * The blend mode to be applied to the Mesh. Apply a value of + * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode. + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL; + * @see PIXI.BLEND_MODES + */ + prototypeAccessors.blendMode.set = function (value) + { + this.state.blendMode = value; + }; + + prototypeAccessors.blendMode.get = function () + { + return this.state.blendMode; + }; + + /** + * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. + * Advantages can include sharper image quality (like text) and faster rendering on canvas. + * The main disadvantage is movement of objects may appear less smooth. + * To set the global default, change {@link PIXI.settings.ROUND_PIXELS} + * + * @member {boolean} + * @default false + */ + prototypeAccessors.roundPixels.set = function (value) + { + if (this._roundPixels !== value) + { + this._transformID = -1; + } + this._roundPixels = value; + }; + + prototypeAccessors.roundPixels.get = function () + { + return this._roundPixels; + }; + + /** + * The multiply tint applied to the Mesh. This is a hex value. A value of + * `0xFFFFFF` will remove any tint effect. + * + * @member {number} + * @default 0xFFFFFF + */ + prototypeAccessors.tint.get = function () + { + return this.shader.tint; + }; + + prototypeAccessors.tint.set = function (value) + { + this.shader.tint = value; + }; + + /** + * The texture that the Mesh uses. + * + * @member {PIXI.Texture} + */ + prototypeAccessors.texture.get = function () + { + return this.shader.texture; + }; + + prototypeAccessors.texture.set = function (value) + { + this.shader.texture = value; + }; + + /** + * Standard renderer draw. + * @protected + * @param {PIXI.Renderer} renderer - Instance to renderer. + */ + Mesh.prototype._render = function _render (renderer) + { + // set properties for batching.. + // TODO could use a different way to grab verts? + var vertices = this.geometry.buffers[0].data; + + // TODO benchmark check for attribute size.. + if (this.shader.batchable && this.drawMode === exports.DRAW_MODES.TRIANGLES && vertices.length < Mesh.BATCHABLE_SIZE * 2) + { + this._renderToBatch(renderer); + } + else + { + this._renderDefault(renderer); + } + }; + + /** + * Standard non-batching way of rendering. + * @protected + * @param {PIXI.Renderer} renderer - Instance to renderer. + */ + Mesh.prototype._renderDefault = function _renderDefault (renderer) + { + var shader = this.shader; + + shader.alpha = this.worldAlpha; + if (shader.update) + { + shader.update(); + } + + renderer.batch.flush(); + + if (shader.program.uniformData.translationMatrix) + { + shader.uniforms.translationMatrix = this.transform.worldTransform.toArray(true); + } + + // bind and sync uniforms.. + renderer.shader.bind(shader); + + // set state.. + renderer.state.set(this.state); + + // bind the geometry... + renderer.geometry.bind(this.geometry, shader); + + // then render it + renderer.geometry.draw(this.drawMode, this.size, this.start, this.geometry.instanceCount); + }; + + /** + * Rendering by using the Batch system. + * @protected + * @param {PIXI.Renderer} renderer - Instance to renderer. + */ + Mesh.prototype._renderToBatch = function _renderToBatch (renderer) + { + var geometry = this.geometry; + + if (this.shader.uvMatrix) + { + this.shader.uvMatrix.update(); + this.calculateUvs(); + } + + // set properties for batching.. + this.calculateVertices(); + this.indices = geometry.indexBuffer.data; + this._tintRGB = this.shader._tintRGB; + this._texture = this.shader.texture; + + var pluginName = this.material.pluginName; + + renderer.batch.setObjectRenderer(renderer.plugins[pluginName]); + renderer.plugins[pluginName].render(this); + }; + + /** + * Updates vertexData field based on transform and vertices + */ + Mesh.prototype.calculateVertices = function calculateVertices () + { + var geometry = this.geometry; + var vertices = geometry.buffers[0].data; + + if (geometry.vertexDirtyId === this.vertexDirty && this._transformID === this.transform._worldID) + { + return; + } + + this._transformID = this.transform._worldID; + + if (this.vertexData.length !== vertices.length) + { + this.vertexData = new Float32Array(vertices.length); + } + + var wt = this.transform.worldTransform; + var a = wt.a; + var b = wt.b; + var c = wt.c; + var d = wt.d; + var tx = wt.tx; + var ty = wt.ty; + + var vertexData = this.vertexData; + + for (var i = 0; i < vertexData.length / 2; i++) + { + var x = vertices[(i * 2)]; + var y = vertices[(i * 2) + 1]; + + vertexData[(i * 2)] = (a * x) + (c * y) + tx; + vertexData[(i * 2) + 1] = (b * x) + (d * y) + ty; + } + + if (this._roundPixels) + { + var resolution = settings.RESOLUTION; + + for (var i$1 = 0; i$1 < vertexData.length; ++i$1) + { + vertexData[i$1] = Math.round((vertexData[i$1] * resolution | 0) / resolution); + } + } + + this.vertexDirty = geometry.vertexDirtyId; + }; + + /** + * Updates uv field based on from geometry uv's or batchUvs + */ + Mesh.prototype.calculateUvs = function calculateUvs () + { + var geomUvs = this.geometry.buffers[1]; + + if (!this.shader.uvMatrix.isSimple) + { + if (!this.batchUvs) + { + this.batchUvs = new MeshBatchUvs(geomUvs, this.shader.uvMatrix); + } + this.batchUvs.update(); + this.uvs = this.batchUvs.data; + } + else + { + this.uvs = geomUvs.data; + } + }; + + /** + * Updates the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account. + * there must be a aVertexPosition attribute present in the geometry for bounds to be calculated correctly. + * + * @protected + */ + Mesh.prototype._calculateBounds = function _calculateBounds () + { + this.calculateVertices(); + + this._bounds.addVertexData(this.vertexData, 0, this.vertexData.length); + }; + + /** + * Tests if a point is inside this mesh. Works only for PIXI.DRAW_MODES.TRIANGLES. + * + * @param {PIXI.Point} point the point to test + * @return {boolean} the result of the test + */ + Mesh.prototype.containsPoint = function containsPoint (point) + { + if (!this.getBounds().contains(point.x, point.y)) + { + return false; + } + + this.worldTransform.applyInverse(point, tempPoint$2); + + var vertices = this.geometry.getBuffer('aVertexPosition').data; + + var points = tempPolygon.points; + var indices = this.geometry.getIndex().data; + var len = indices.length; + var step = this.drawMode === 4 ? 3 : 1; + + for (var i = 0; i + 2 < len; i += step) + { + var ind0 = indices[i] * 2; + var ind1 = indices[i + 1] * 2; + var ind2 = indices[i + 2] * 2; + + points[0] = vertices[ind0]; + points[1] = vertices[ind0 + 1]; + points[2] = vertices[ind1]; + points[3] = vertices[ind1 + 1]; + points[4] = vertices[ind2]; + points[5] = vertices[ind2 + 1]; + + if (tempPolygon.contains(tempPoint$2.x, tempPoint$2.y)) + { + return true; + } + } + + return false; + }; + /** + * Destroys the Mesh object. + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all + * options have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have + * their destroy method called as well. 'options' will be passed on to those calls. + */ + Mesh.prototype.destroy = function destroy (options) + { + Container.prototype.destroy.call(this, options); + + this.geometry.refCount--; + if (this.geometry.refCount === 0) + { + this.geometry.dispose(); + } + + this.geometry = null; + this.shader = null; + this.state = null; + this.uvs = null; + this.indices = null; + this.vertexData = null; + }; + + Object.defineProperties( Mesh.prototype, prototypeAccessors ); + + return Mesh; + }(Container)); + + /** + * The maximum number of vertices to consider batchable. Generally, the complexity + * of the geometry. + * @memberof PIXI.Mesh + * @static + * @member {number} BATCHABLE_SIZE + */ + Mesh.BATCHABLE_SIZE = 100; + + var vertex$5 = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n"; + + var fragment$8 = "varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n"; + + /** + * Slightly opinionated default shader for PixiJS 2D objects. + * @class + * @memberof PIXI + * @extends PIXI.Shader + */ + var MeshMaterial = /*@__PURE__*/(function (Shader) { + function MeshMaterial(uSampler, options) + { + var uniforms = { + uSampler: uSampler, + alpha: 1, + uTextureMatrix: Matrix.IDENTITY, + uColor: new Float32Array([1, 1, 1, 1]), + }; + + // Set defaults + options = Object.assign({ + tint: 0xFFFFFF, + alpha: 1, + pluginName: 'batch', + }, options); + + if (options.uniforms) + { + Object.assign(uniforms, options.uniforms); + } + + Shader.call(this, options.program || Program.from(vertex$5, fragment$8), uniforms); + + /** + * Only do update if tint or alpha changes. + * @member {boolean} + * @private + * @default false + */ + this._colorDirty = false; + + /** + * TextureMatrix instance for this Mesh, used to track Texture changes + * + * @member {PIXI.TextureMatrix} + * @readonly + */ + this.uvMatrix = new TextureMatrix(uSampler); + + /** + * `true` if shader can be batch with the renderer's batch system. + * @member {boolean} + * @default true + */ + this.batchable = options.program === undefined; + + /** + * Renderer plugin for batching + * + * @member {string} + * @default 'batch' + */ + this.pluginName = options.pluginName; + + this.tint = options.tint; + this.alpha = options.alpha; + } + + if ( Shader ) { MeshMaterial.__proto__ = Shader; } + MeshMaterial.prototype = Object.create( Shader && Shader.prototype ); + MeshMaterial.prototype.constructor = MeshMaterial; + + var prototypeAccessors = { texture: { configurable: true },alpha: { configurable: true },tint: { configurable: true } }; + + /** + * Reference to the texture being rendered. + * @member {PIXI.Texture} + */ + prototypeAccessors.texture.get = function () + { + return this.uniforms.uSampler; + }; + prototypeAccessors.texture.set = function (value) + { + if (this.uniforms.uSampler !== value) + { + this.uniforms.uSampler = value; + this.uvMatrix.texture = value; + } + }; + + /** + * This gets automatically set by the object using this. + * + * @default 1 + * @member {number} + */ + prototypeAccessors.alpha.set = function (value) + { + if (value === this._alpha) { return; } + + this._alpha = value; + this._colorDirty = true; + }; + prototypeAccessors.alpha.get = function () + { + return this._alpha; + }; + + /** + * Multiply tint for the material. + * @member {number} + * @default 0xFFFFFF + */ + prototypeAccessors.tint.set = function (value) + { + if (value === this._tint) { return; } + + this._tint = value; + this._tintRGB = (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16); + this._colorDirty = true; + }; + prototypeAccessors.tint.get = function () + { + return this._tint; + }; + + /** + * Gets called automatically by the Mesh. Intended to be overridden for custom + * MeshMaterial objects. + */ + MeshMaterial.prototype.update = function update () + { + if (this._colorDirty) + { + this._colorDirty = false; + var baseTexture = this.texture.baseTexture; + + premultiplyTintToRgba(this._tint, this._alpha, this.uniforms.uColor, baseTexture.alphaMode); + } + if (this.uvMatrix.update()) + { + this.uniforms.uTextureMatrix = this.uvMatrix.mapCoord; + } + }; + + Object.defineProperties( MeshMaterial.prototype, prototypeAccessors ); + + return MeshMaterial; + }(Shader)); + + /** + * Standard 2D geometry used in PixiJS. + * + * Geometry can be defined without passing in a style or data if required. + * + * ```js + * const geometry = new PIXI.Geometry(); + * + * geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2); + * geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1], 2); + * geometry.addIndex([0,1,2,1,3,2]); + * + * ``` + * @class + * @memberof PIXI + * @extends PIXI.Geometry + */ + var MeshGeometry = /*@__PURE__*/(function (Geometry) { + function MeshGeometry(vertices, uvs, index) + { + Geometry.call(this); + + var verticesBuffer = new Buffer(vertices); + var uvsBuffer = new Buffer(uvs, true); + var indexBuffer = new Buffer(index, true, true); + + this.addAttribute('aVertexPosition', verticesBuffer, 2, false, exports.TYPES.FLOAT) + .addAttribute('aTextureCoord', uvsBuffer, 2, false, exports.TYPES.FLOAT) + .addIndex(indexBuffer); + + /** + * Dirty flag to limit update calls on Mesh. For example, + * limiting updates on a single Mesh instance with a shared Geometry + * within the render loop. + * @private + * @member {number} + * @default -1 + */ + this._updateId = -1; + } + + if ( Geometry ) { MeshGeometry.__proto__ = Geometry; } + MeshGeometry.prototype = Object.create( Geometry && Geometry.prototype ); + MeshGeometry.prototype.constructor = MeshGeometry; + + var prototypeAccessors = { vertexDirtyId: { configurable: true } }; + + /** + * If the vertex position is updated. + * @member {number} + * @readonly + * @private + */ + prototypeAccessors.vertexDirtyId.get = function () + { + return this.buffers[0]._updateID; + }; + + Object.defineProperties( MeshGeometry.prototype, prototypeAccessors ); + + return MeshGeometry; + }(Geometry)); + + /*! + * @pixi/mesh-extras - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/mesh-extras is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + var PlaneGeometry = /*@__PURE__*/(function (MeshGeometry) { + function PlaneGeometry(width, height, segWidth, segHeight) + { + if ( width === void 0 ) { width = 100; } + if ( height === void 0 ) { height = 100; } + if ( segWidth === void 0 ) { segWidth = 10; } + if ( segHeight === void 0 ) { segHeight = 10; } + + MeshGeometry.call(this); + + this.segWidth = segWidth; + this.segHeight = segHeight; + + this.width = width; + this.height = height; + + this.build(); + } + + if ( MeshGeometry ) { PlaneGeometry.__proto__ = MeshGeometry; } + PlaneGeometry.prototype = Object.create( MeshGeometry && MeshGeometry.prototype ); + PlaneGeometry.prototype.constructor = PlaneGeometry; + + /** + * Refreshes plane coordinates + * @private + */ + PlaneGeometry.prototype.build = function build () + { + var total = this.segWidth * this.segHeight; + var verts = []; + var uvs = []; + var indices = []; + + var segmentsX = this.segWidth - 1; + var segmentsY = this.segHeight - 1; + + var sizeX = (this.width) / segmentsX; + var sizeY = (this.height) / segmentsY; + + for (var i = 0; i < total; i++) + { + var x = (i % this.segWidth); + var y = ((i / this.segWidth) | 0); + + verts.push(x * sizeX, y * sizeY); + uvs.push(x / segmentsX, y / segmentsY); + } + + var totalSub = segmentsX * segmentsY; + + for (var i$1 = 0; i$1 < totalSub; i$1++) + { + var xpos = i$1 % segmentsX; + var ypos = (i$1 / segmentsX) | 0; + + var value = (ypos * this.segWidth) + xpos; + var value2 = (ypos * this.segWidth) + xpos + 1; + var value3 = ((ypos + 1) * this.segWidth) + xpos; + var value4 = ((ypos + 1) * this.segWidth) + xpos + 1; + + indices.push(value, value2, value3, + value2, value4, value3); + } + + this.buffers[0].data = new Float32Array(verts); + this.buffers[1].data = new Float32Array(uvs); + this.indexBuffer.data = new Uint16Array(indices); + + // ensure that the changes are uploaded + this.buffers[0].update(); + this.buffers[1].update(); + this.indexBuffer.update(); + }; + + return PlaneGeometry; + }(MeshGeometry)); + + /** + * RopeGeometry allows you to draw a geometry across several points and then manipulate these points. + * + * ```js + * for (let i = 0; i < 20; i++) { + * points.push(new PIXI.Point(i * 50, 0)); + * }; + * const rope = new PIXI.RopeGeometry(100, points); + * ``` + * + * @class + * @extends PIXI.MeshGeometry + * @memberof PIXI + * + */ + var RopeGeometry = /*@__PURE__*/(function (MeshGeometry) { + function RopeGeometry(width, points, textureScale) + { + if ( width === void 0 ) { width = 200; } + if ( textureScale === void 0 ) { textureScale = 0; } + + MeshGeometry.call(this, new Float32Array(points.length * 4), + new Float32Array(points.length * 4), + new Uint16Array((points.length - 1) * 6)); + + /** + * An array of points that determine the rope + * @member {PIXI.Point[]} + */ + this.points = points; + + /** + * The width (i.e., thickness) of the rope. + * @member {number} + * @readOnly + */ + this.width = width; + + /** + * Rope texture scale, if zero then the rope texture is stretched. + * @member {number} + * @readOnly + */ + this.textureScale = textureScale; + + this.build(); + } + + if ( MeshGeometry ) { RopeGeometry.__proto__ = MeshGeometry; } + RopeGeometry.prototype = Object.create( MeshGeometry && MeshGeometry.prototype ); + RopeGeometry.prototype.constructor = RopeGeometry; + /** + * Refreshes Rope indices and uvs + * @private + */ + RopeGeometry.prototype.build = function build () + { + var points = this.points; + + if (!points) { return; } + + var vertexBuffer = this.getBuffer('aVertexPosition'); + var uvBuffer = this.getBuffer('aTextureCoord'); + var indexBuffer = this.getIndex(); + + // if too little points, or texture hasn't got UVs set yet just move on. + if (points.length < 1) + { + return; + } + + // if the number of points has changed we will need to recreate the arraybuffers + if (vertexBuffer.data.length / 4 !== points.length) + { + vertexBuffer.data = new Float32Array(points.length * 4); + uvBuffer.data = new Float32Array(points.length * 4); + indexBuffer.data = new Uint16Array((points.length - 1) * 6); + } + + var uvs = uvBuffer.data; + var indices = indexBuffer.data; + + uvs[0] = 0; + uvs[1] = 0; + uvs[2] = 0; + uvs[3] = 1; + + var amount = 0; + var prev = points[0]; + var textureWidth = this.width * this.textureScale; + var total = points.length; // - 1; + + for (var i = 0; i < total; i++) + { + // time to do some smart drawing! + var index = i * 4; + + if (this.textureScale > 0) + { + // calculate pixel distance from previous point + var dx = prev.x - points[i].x; + var dy = prev.y - points[i].y; + var distance = Math.sqrt((dx * dx) + (dy * dy)); + + prev = points[i]; + amount += distance / textureWidth; + } + else + { + // stretch texture + amount = i / (total - 1); + } + + uvs[index] = amount; + uvs[index + 1] = 0; + + uvs[index + 2] = amount; + uvs[index + 3] = 1; + } + + var indexCount = 0; + + for (var i$1 = 0; i$1 < total - 1; i$1++) + { + var index$1 = i$1 * 2; + + indices[indexCount++] = index$1; + indices[indexCount++] = index$1 + 1; + indices[indexCount++] = index$1 + 2; + + indices[indexCount++] = index$1 + 2; + indices[indexCount++] = index$1 + 1; + indices[indexCount++] = index$1 + 3; + } + + // ensure that the changes are uploaded + uvBuffer.update(); + indexBuffer.update(); + + this.updateVertices(); + }; + + /** + * refreshes vertices of Rope mesh + */ + RopeGeometry.prototype.updateVertices = function updateVertices () + { + var points = this.points; + + if (points.length < 1) + { + return; + } + + var lastPoint = points[0]; + var nextPoint; + var perpX = 0; + var perpY = 0; + + var vertices = this.buffers[0].data; + var total = points.length; + + for (var i = 0; i < total; i++) + { + var point = points[i]; + var index = i * 4; + + if (i < points.length - 1) + { + nextPoint = points[i + 1]; + } + else + { + nextPoint = point; + } + + perpY = -(nextPoint.x - lastPoint.x); + perpX = nextPoint.y - lastPoint.y; + + var perpLength = Math.sqrt((perpX * perpX) + (perpY * perpY)); + var num = this.textureScale > 0 ? this.textureScale * this.width / 2 : this.width / 2; + + perpX /= perpLength; + perpY /= perpLength; + + perpX *= num; + perpY *= num; + + vertices[index] = point.x + perpX; + vertices[index + 1] = point.y + perpY; + vertices[index + 2] = point.x - perpX; + vertices[index + 3] = point.y - perpY; + + lastPoint = point; + } + + this.buffers[0].update(); + }; + + RopeGeometry.prototype.update = function update () + { + if (this.textureScale > 0) + { + this.build(); // we need to update UVs + } + else + { + this.updateVertices(); + } + }; + + return RopeGeometry; + }(MeshGeometry)); + + /** + * The rope allows you to draw a texture across several points and then manipulate these points + * + *```js + * for (let i = 0; i < 20; i++) { + * points.push(new PIXI.Point(i * 50, 0)); + * }; + * let rope = new PIXI.SimpleRope(PIXI.Texture.from("snake.png"), points); + * ``` + * + * @class + * @extends PIXI.Mesh + * @memberof PIXI + * + */ + var SimpleRope = /*@__PURE__*/(function (Mesh) { + function SimpleRope(texture, points, textureScale) + { + if ( textureScale === void 0 ) { textureScale = 0; } + + var ropeGeometry = new RopeGeometry(texture.height, points, textureScale); + var meshMaterial = new MeshMaterial(texture); + + if (textureScale > 0) + { + // attempt to set UV wrapping, will fail on non-power of two textures + texture.baseTexture.wrapMode = exports.WRAP_MODES.REPEAT; + } + Mesh.call(this, ropeGeometry, meshMaterial); + + /** + * re-calculate vertices by rope points each frame + * + * @member {boolean} + */ + this.autoUpdate = true; + } + + if ( Mesh ) { SimpleRope.__proto__ = Mesh; } + SimpleRope.prototype = Object.create( Mesh && Mesh.prototype ); + SimpleRope.prototype.constructor = SimpleRope; + + SimpleRope.prototype._render = function _render (renderer) + { + if (this.autoUpdate + || this.geometry.width !== this.shader.texture.height) + { + this.geometry.width = this.shader.texture.height; + this.geometry.update(); + } + + Mesh.prototype._render.call(this, renderer); + }; + + return SimpleRope; + }(Mesh)); + + /** + * The SimplePlane allows you to draw a texture across several points and then manipulate these points + * + *```js + * for (let i = 0; i < 20; i++) { + * points.push(new PIXI.Point(i * 50, 0)); + * }; + * let SimplePlane = new PIXI.SimplePlane(PIXI.Texture.from("snake.png"), points); + * ``` + * + * @class + * @extends PIXI.Mesh + * @memberof PIXI + * + */ + var SimplePlane = /*@__PURE__*/(function (Mesh) { + function SimplePlane(texture, verticesX, verticesY) + { + var planeGeometry = new PlaneGeometry(texture.width, texture.height, verticesX, verticesY); + var meshMaterial = new MeshMaterial(Texture.WHITE); + + Mesh.call(this, planeGeometry, meshMaterial); + + // lets call the setter to ensure all necessary updates are performed + this.texture = texture; + } + + if ( Mesh ) { SimplePlane.__proto__ = Mesh; } + SimplePlane.prototype = Object.create( Mesh && Mesh.prototype ); + SimplePlane.prototype.constructor = SimplePlane; + + var prototypeAccessors = { texture: { configurable: true } }; + + /** + * Method used for overrides, to do something in case texture frame was changed. + * Meshes based on plane can override it and change more details based on texture. + */ + SimplePlane.prototype.textureUpdated = function textureUpdated () + { + this._textureID = this.shader.texture._updateID; + + this.geometry.width = this.shader.texture.width; + this.geometry.height = this.shader.texture.height; + + this.geometry.build(); + }; + + prototypeAccessors.texture.set = function (value) + { + // Track texture same way sprite does. + // For generated meshes like NineSlicePlane it can change the geometry. + // Unfortunately, this method might not work if you directly change texture in material. + + if (this.shader.texture === value) + { + return; + } + + this.shader.texture = value; + this._textureID = -1; + + if (value.baseTexture.valid) + { + this.textureUpdated(); + } + else + { + value.once('update', this.textureUpdated, this); + } + }; + + prototypeAccessors.texture.get = function () + { + return this.shader.texture; + }; + + SimplePlane.prototype._render = function _render (renderer) + { + if (this._textureID !== this.shader.texture._updateID) + { + this.textureUpdated(); + } + + Mesh.prototype._render.call(this, renderer); + }; + + Object.defineProperties( SimplePlane.prototype, prototypeAccessors ); + + return SimplePlane; + }(Mesh)); + + /** + * The Simple Mesh class mimics Mesh in PixiJS v4, providing easy-to-use constructor arguments. + * For more robust customization, use {@link PIXI.Mesh}. + * + * @class + * @extends PIXI.Mesh + * @memberof PIXI + */ + var SimpleMesh = /*@__PURE__*/(function (Mesh) { + function SimpleMesh(texture, vertices, uvs, indices, drawMode) + { + if ( texture === void 0 ) { texture = Texture.EMPTY; } + + var geometry = new MeshGeometry(vertices, uvs, indices); + + geometry.getBuffer('aVertexPosition').static = false; + + var meshMaterial = new MeshMaterial(texture); + + Mesh.call(this, geometry, meshMaterial, null, drawMode); + + /** + * upload vertices buffer each frame + * @member {boolean} + */ + this.autoUpdate = true; + } + + if ( Mesh ) { SimpleMesh.__proto__ = Mesh; } + SimpleMesh.prototype = Object.create( Mesh && Mesh.prototype ); + SimpleMesh.prototype.constructor = SimpleMesh; + + var prototypeAccessors = { vertices: { configurable: true } }; + + /** + * Collection of vertices data. + * @member {Float32Array} + */ + prototypeAccessors.vertices.get = function () + { + return this.geometry.getBuffer('aVertexPosition').data; + }; + prototypeAccessors.vertices.set = function (value) + { + this.geometry.getBuffer('aVertexPosition').data = value; + }; + + SimpleMesh.prototype._render = function _render (renderer) + { + if (this.autoUpdate) + { + this.geometry.getBuffer('aVertexPosition').update(); + } + + Mesh.prototype._render.call(this, renderer); + }; + + Object.defineProperties( SimpleMesh.prototype, prototypeAccessors ); + + return SimpleMesh; + }(Mesh)); + + var DEFAULT_BORDER_SIZE = 10; + + /** + * The NineSlicePlane allows you to stretch a texture using 9-slice scaling. The corners will remain unscaled (useful + * for buttons with rounded corners for example) and the other areas will be scaled horizontally and or vertically + * + *```js + * let Plane9 = new PIXI.NineSlicePlane(PIXI.Texture.from('BoxWithRoundedCorners.png'), 15, 15, 15, 15); + * ``` + *
+	 *      A                          B
+	 *    +---+----------------------+---+
+	 *  C | 1 |          2           | 3 |
+	 *    +---+----------------------+---+
+	 *    |   |                      |   |
+	 *    | 4 |          5           | 6 |
+	 *    |   |                      |   |
+	 *    +---+----------------------+---+
+	 *  D | 7 |          8           | 9 |
+	 *    +---+----------------------+---+
+
+	 *  When changing this objects width and/or height:
+	 *     areas 1 3 7 and 9 will remain unscaled.
+	 *     areas 2 and 8 will be stretched horizontally
+	 *     areas 4 and 6 will be stretched vertically
+	 *     area 5 will be stretched both horizontally and vertically
+	 * 
+ * + * @class + * @extends PIXI.SimplePlane + * @memberof PIXI + * + */ + var NineSlicePlane = /*@__PURE__*/(function (SimplePlane) { + function NineSlicePlane(texture, leftWidth, topHeight, rightWidth, bottomHeight) + { + SimplePlane.call(this, Texture.WHITE, 4, 4); + + this._origWidth = texture.orig.width; + this._origHeight = texture.orig.height; + + /** + * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane + * + * @member {number} + * @override + */ + this._width = this._origWidth; + + /** + * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane + * + * @member {number} + * @override + */ + this._height = this._origHeight; + + /** + * The width of the left column (a) + * + * @member {number} + * @private + */ + this._leftWidth = typeof leftWidth !== 'undefined' ? leftWidth : DEFAULT_BORDER_SIZE; + + /** + * The width of the right column (b) + * + * @member {number} + * @private + */ + this._rightWidth = typeof rightWidth !== 'undefined' ? rightWidth : DEFAULT_BORDER_SIZE; + + /** + * The height of the top row (c) + * + * @member {number} + * @private + */ + this._topHeight = typeof topHeight !== 'undefined' ? topHeight : DEFAULT_BORDER_SIZE; + + /** + * The height of the bottom row (d) + * + * @member {number} + * @private + */ + this._bottomHeight = typeof bottomHeight !== 'undefined' ? bottomHeight : DEFAULT_BORDER_SIZE; + + // lets call the setter to ensure all necessary updates are performed + this.texture = texture; + } + + if ( SimplePlane ) { NineSlicePlane.__proto__ = SimplePlane; } + NineSlicePlane.prototype = Object.create( SimplePlane && SimplePlane.prototype ); + NineSlicePlane.prototype.constructor = NineSlicePlane; + + var prototypeAccessors = { vertices: { configurable: true },width: { configurable: true },height: { configurable: true },leftWidth: { configurable: true },rightWidth: { configurable: true },topHeight: { configurable: true },bottomHeight: { configurable: true } }; + + NineSlicePlane.prototype.textureUpdated = function textureUpdated () + { + this._textureID = this.shader.texture._updateID; + this._refresh(); + }; + + prototypeAccessors.vertices.get = function () + { + return this.geometry.getBuffer('aVertexPosition').data; + }; + + prototypeAccessors.vertices.set = function (value) + { + this.geometry.getBuffer('aVertexPosition').data = value; + }; + + /** + * Updates the horizontal vertices. + * + */ + NineSlicePlane.prototype.updateHorizontalVertices = function updateHorizontalVertices () + { + var vertices = this.vertices; + + var scale = this._getMinScale(); + + vertices[9] = vertices[11] = vertices[13] = vertices[15] = this._topHeight * scale; + vertices[17] = vertices[19] = vertices[21] = vertices[23] = this._height - (this._bottomHeight * scale); + vertices[25] = vertices[27] = vertices[29] = vertices[31] = this._height; + }; + + /** + * Updates the vertical vertices. + * + */ + NineSlicePlane.prototype.updateVerticalVertices = function updateVerticalVertices () + { + var vertices = this.vertices; + + var scale = this._getMinScale(); + + vertices[2] = vertices[10] = vertices[18] = vertices[26] = this._leftWidth * scale; + vertices[4] = vertices[12] = vertices[20] = vertices[28] = this._width - (this._rightWidth * scale); + vertices[6] = vertices[14] = vertices[22] = vertices[30] = this._width; + }; + + /** + * Returns the smaller of a set of vertical and horizontal scale of nine slice corners. + * + * @return {number} Smaller number of vertical and horizontal scale. + * @private + */ + NineSlicePlane.prototype._getMinScale = function _getMinScale () + { + var w = this._leftWidth + this._rightWidth; + var scaleW = this._width > w ? 1.0 : this._width / w; + + var h = this._topHeight + this._bottomHeight; + var scaleH = this._height > h ? 1.0 : this._height / h; + + var scale = Math.min(scaleW, scaleH); + + return scale; + }; + + /** + * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane + * + * @member {number} + */ + prototypeAccessors.width.get = function () + { + return this._width; + }; + + prototypeAccessors.width.set = function (value) // eslint-disable-line require-jsdoc + { + this._width = value; + this._refresh(); + }; + + /** + * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane + * + * @member {number} + */ + prototypeAccessors.height.get = function () + { + return this._height; + }; + + prototypeAccessors.height.set = function (value) // eslint-disable-line require-jsdoc + { + this._height = value; + this._refresh(); + }; + + /** + * The width of the left column + * + * @member {number} + */ + prototypeAccessors.leftWidth.get = function () + { + return this._leftWidth; + }; + + prototypeAccessors.leftWidth.set = function (value) // eslint-disable-line require-jsdoc + { + this._leftWidth = value; + this._refresh(); + }; + + /** + * The width of the right column + * + * @member {number} + */ + prototypeAccessors.rightWidth.get = function () + { + return this._rightWidth; + }; + + prototypeAccessors.rightWidth.set = function (value) // eslint-disable-line require-jsdoc + { + this._rightWidth = value; + this._refresh(); + }; + + /** + * The height of the top row + * + * @member {number} + */ + prototypeAccessors.topHeight.get = function () + { + return this._topHeight; + }; + + prototypeAccessors.topHeight.set = function (value) // eslint-disable-line require-jsdoc + { + this._topHeight = value; + this._refresh(); + }; + + /** + * The height of the bottom row + * + * @member {number} + */ + prototypeAccessors.bottomHeight.get = function () + { + return this._bottomHeight; + }; + + prototypeAccessors.bottomHeight.set = function (value) // eslint-disable-line require-jsdoc + { + this._bottomHeight = value; + this._refresh(); + }; + + /** + * Refreshes NineSlicePlane coords. All of them. + */ + NineSlicePlane.prototype._refresh = function _refresh () + { + var texture = this.texture; + + var uvs = this.geometry.buffers[1].data; + + this._origWidth = texture.orig.width; + this._origHeight = texture.orig.height; + + var _uvw = 1.0 / this._origWidth; + var _uvh = 1.0 / this._origHeight; + + uvs[0] = uvs[8] = uvs[16] = uvs[24] = 0; + uvs[1] = uvs[3] = uvs[5] = uvs[7] = 0; + uvs[6] = uvs[14] = uvs[22] = uvs[30] = 1; + uvs[25] = uvs[27] = uvs[29] = uvs[31] = 1; + + uvs[2] = uvs[10] = uvs[18] = uvs[26] = _uvw * this._leftWidth; + uvs[4] = uvs[12] = uvs[20] = uvs[28] = 1 - (_uvw * this._rightWidth); + uvs[9] = uvs[11] = uvs[13] = uvs[15] = _uvh * this._topHeight; + uvs[17] = uvs[19] = uvs[21] = uvs[23] = 1 - (_uvh * this._bottomHeight); + + this.updateHorizontalVertices(); + this.updateVerticalVertices(); + + this.geometry.buffers[0].update(); + this.geometry.buffers[1].update(); + }; + + Object.defineProperties( NineSlicePlane.prototype, prototypeAccessors ); + + return NineSlicePlane; + }(SimplePlane)); + + /*! + * @pixi/sprite-animated - v5.2.4 + * Compiled Sun, 03 May 2020 22:42:17 UTC + * + * @pixi/sprite-animated is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ + + /** + * An AnimatedSprite is a simple way to display an animation depicted by a list of textures. + * + * ```js + * let alienImages = ["image_sequence_01.png","image_sequence_02.png","image_sequence_03.png","image_sequence_04.png"]; + * let textureArray = []; + * + * for (let i=0; i < 4; i++) + * { + * let texture = PIXI.Texture.from(alienImages[i]); + * textureArray.push(texture); + * }; + * + * let animatedSprite = new PIXI.AnimatedSprite(textureArray); + * ``` + * + * The more efficient and simpler way to create an animated sprite is using a {@link PIXI.Spritesheet} + * containing the animation definitions: + * + * ```js + * PIXI.Loader.shared.add("assets/spritesheet.json").load(setup); + * + * function setup() { + * let sheet = PIXI.Loader.shared.resources["assets/spritesheet.json"].spritesheet; + * animatedSprite = new PIXI.AnimatedSprite(sheet.animations["image_sequence"]); + * ... + * } + * ``` + * + * @class + * @extends PIXI.Sprite + * @memberof PIXI + */ + var AnimatedSprite = /*@__PURE__*/(function (Sprite) { + function AnimatedSprite(textures, autoUpdate) + { + Sprite.call(this, textures[0] instanceof Texture ? textures[0] : textures[0].texture); + + /** + * @type {PIXI.Texture[]} + * @private + */ + this._textures = null; + + /** + * @type {number[]} + * @private + */ + this._durations = null; + + /** + * `true` uses PIXI.Ticker.shared to auto update animation time. + * + * @type {boolean} + * @default true + * @private + */ + this._autoUpdate = autoUpdate !== false; + + /** + * `true` if the instance is currently connected to PIXI.Ticker.shared to auto update animation time. + * + * @type {boolean} + * @default false + * @private + */ + this._isConnectedToTicker = false; + + /** + * The speed that the AnimatedSprite will play at. Higher is faster, lower is slower. + * + * @member {number} + * @default 1 + */ + this.animationSpeed = 1; + + /** + * Whether or not the animate sprite repeats after playing. + * + * @member {boolean} + * @default true + */ + this.loop = true; + + /** + * Update anchor to [Texture's defaultAnchor]{@link PIXI.Texture#defaultAnchor} when frame changes. + * + * Useful with [sprite sheet animations]{@link PIXI.Spritesheet#animations} created with tools. + * Changing anchor for each frame allows to pin sprite origin to certain moving feature + * of the frame (e.g. left foot). + * + * Note: Enabling this will override any previously set `anchor` on each frame change. + * + * @member {boolean} + * @default false + */ + this.updateAnchor = false; + + /** + * Function to call when an AnimatedSprite finishes playing. + * + * @member {Function} + */ + this.onComplete = null; + + /** + * Function to call when an AnimatedSprite changes which texture is being rendered. + * + * @member {Function} + */ + this.onFrameChange = null; + + /** + * Function to call when `loop` is true, and an AnimatedSprite is played and loops around to start again. + * + * @member {Function} + */ + this.onLoop = null; + + /** + * Elapsed time since animation has been started, used internally to display current texture. + * + * @member {number} + * @private + */ + this._currentTime = 0; + + this._playing = false; + + /** + * The texture index that was displayed last time + * + * @member {number} + * @private + */ + this._previousFrame = null; + + this.textures = textures; + } + + if ( Sprite ) { AnimatedSprite.__proto__ = Sprite; } + AnimatedSprite.prototype = Object.create( Sprite && Sprite.prototype ); + AnimatedSprite.prototype.constructor = AnimatedSprite; + + var prototypeAccessors = { totalFrames: { configurable: true },textures: { configurable: true },currentFrame: { configurable: true },playing: { configurable: true },autoUpdate: { configurable: true } }; + + /** + * Stops the AnimatedSprite. + * + */ + AnimatedSprite.prototype.stop = function stop () + { + if (!this.playing) + { + return; + } + + this._playing = false; + if (this._autoUpdate && this._isConnectedToTicker) + { + Ticker.shared.remove(this.update, this); + this._isConnectedToTicker = false; + } + }; + + /** + * Plays the AnimatedSprite. + * + */ + AnimatedSprite.prototype.play = function play () + { + if (this.playing) + { + return; + } + + this._playing = true; + if (this._autoUpdate && !this._isConnectedToTicker) + { + Ticker.shared.add(this.update, this, exports.UPDATE_PRIORITY.HIGH); + this._isConnectedToTicker = true; + } + }; + + /** + * Stops the AnimatedSprite and goes to a specific frame. + * + * @param {number} frameNumber - Frame index to stop at. + */ + AnimatedSprite.prototype.gotoAndStop = function gotoAndStop (frameNumber) + { + this.stop(); + + var previousFrame = this.currentFrame; + + this._currentTime = frameNumber; + + if (previousFrame !== this.currentFrame) + { + this.updateTexture(); + } + }; + + /** + * Goes to a specific frame and begins playing the AnimatedSprite. + * + * @param {number} frameNumber - Frame index to start at. + */ + AnimatedSprite.prototype.gotoAndPlay = function gotoAndPlay (frameNumber) + { + var previousFrame = this.currentFrame; + + this._currentTime = frameNumber; + + if (previousFrame !== this.currentFrame) + { + this.updateTexture(); + } + + this.play(); + }; + + /** + * Updates the object transform for rendering. + * + * @param {number} deltaTime - Time since last tick. + */ + AnimatedSprite.prototype.update = function update (deltaTime) + { + var elapsed = this.animationSpeed * deltaTime; + var previousFrame = this.currentFrame; + + if (this._durations !== null) + { + var lag = this._currentTime % 1 * this._durations[this.currentFrame]; + + lag += elapsed / 60 * 1000; + + while (lag < 0) + { + this._currentTime--; + lag += this._durations[this.currentFrame]; + } + + var sign = Math.sign(this.animationSpeed * deltaTime); + + this._currentTime = Math.floor(this._currentTime); + + while (lag >= this._durations[this.currentFrame]) + { + lag -= this._durations[this.currentFrame] * sign; + this._currentTime += sign; + } + + this._currentTime += lag / this._durations[this.currentFrame]; + } + else + { + this._currentTime += elapsed; + } + + if (this._currentTime < 0 && !this.loop) + { + this.gotoAndStop(0); + + if (this.onComplete) + { + this.onComplete(); + } + } + else if (this._currentTime >= this._textures.length && !this.loop) + { + this.gotoAndStop(this._textures.length - 1); + + if (this.onComplete) + { + this.onComplete(); + } + } + else if (previousFrame !== this.currentFrame) + { + if (this.loop && this.onLoop) + { + if (this.animationSpeed > 0 && this.currentFrame < previousFrame) + { + this.onLoop(); + } + else if (this.animationSpeed < 0 && this.currentFrame > previousFrame) + { + this.onLoop(); + } + } + + this.updateTexture(); + } + }; + + /** + * Updates the displayed texture to match the current frame index. + * + * @private + */ + AnimatedSprite.prototype.updateTexture = function updateTexture () + { + var currentFrame = this.currentFrame; + + if (this._previousFrame === currentFrame) + { + return; + } + + this._previousFrame = currentFrame; + + this._texture = this._textures[currentFrame]; + this._textureID = -1; + this._textureTrimmedID = -1; + this._cachedTint = 0xFFFFFF; + this.uvs = this._texture._uvs.uvsFloat32; + + if (this.updateAnchor) + { + this._anchor.copyFrom(this._texture.defaultAnchor); + } + + if (this.onFrameChange) + { + this.onFrameChange(this.currentFrame); + } + }; + + /** + * Stops the AnimatedSprite and destroys it. + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value. + * @param {boolean} [options.children=false] - If set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well. + * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well. + */ + AnimatedSprite.prototype.destroy = function destroy (options) + { + this.stop(); + Sprite.prototype.destroy.call(this, options); + + this.onComplete = null; + this.onFrameChange = null; + this.onLoop = null; + }; + + /** + * A short hand way of creating an AnimatedSprite from an array of frame ids. + * + * @static + * @param {string[]} frames - The array of frames ids the AnimatedSprite will use as its texture frames. + * @return {AnimatedSprite} The new animated sprite with the specified frames. + */ + AnimatedSprite.fromFrames = function fromFrames (frames) + { + var textures = []; + + for (var i = 0; i < frames.length; ++i) + { + textures.push(Texture.from(frames[i])); + } + + return new AnimatedSprite(textures); + }; + + /** + * A short hand way of creating an AnimatedSprite from an array of image ids. + * + * @static + * @param {string[]} images - The array of image urls the AnimatedSprite will use as its texture frames. + * @return {AnimatedSprite} The new animate sprite with the specified images as frames. + */ + AnimatedSprite.fromImages = function fromImages (images) + { + var textures = []; + + for (var i = 0; i < images.length; ++i) + { + textures.push(Texture.from(images[i])); + } + + return new AnimatedSprite(textures); + }; + + /** + * The total number of frames in the AnimatedSprite. This is the same as number of textures + * assigned to the AnimatedSprite. + * + * @readonly + * @member {number} + * @default 0 + */ + prototypeAccessors.totalFrames.get = function () + { + return this._textures.length; + }; + + /** + * The array of textures used for this AnimatedSprite. + * + * @member {PIXI.Texture[]} + */ + prototypeAccessors.textures.get = function () + { + return this._textures; + }; + + prototypeAccessors.textures.set = function (value) // eslint-disable-line require-jsdoc + { + if (value[0] instanceof Texture) + { + this._textures = value; + this._durations = null; + } + else + { + this._textures = []; + this._durations = []; + + for (var i = 0; i < value.length; i++) + { + this._textures.push(value[i].texture); + this._durations.push(value[i].time); + } + } + this._previousFrame = null; + this.gotoAndStop(0); + this.updateTexture(); + }; + + /** + * The AnimatedSprites current frame index. + * + * @member {number} + * @readonly + */ + prototypeAccessors.currentFrame.get = function () + { + var currentFrame = Math.floor(this._currentTime) % this._textures.length; + + if (currentFrame < 0) + { + currentFrame += this._textures.length; + } + + return currentFrame; + }; + + /** + * Indicates if the AnimatedSprite is currently playing. + * + * @member {boolean} + * @readonly + */ + prototypeAccessors.playing.get = function () + { + return this._playing; + }; + + /** + * Whether to use PIXI.Ticker.shared to auto update animation time + * + * @member {boolean} + */ + prototypeAccessors.autoUpdate.get = function () + { + return this._autoUpdate; + }; + + prototypeAccessors.autoUpdate.set = function (value) // eslint-disable-line require-jsdoc + { + if (value !== this._autoUpdate) + { + this._autoUpdate = value; + + if (!this._autoUpdate && this._isConnectedToTicker) + { + Ticker.shared.remove(this.update, this); + this._isConnectedToTicker = false; + } + else if (this._autoUpdate && !this._isConnectedToTicker && this._playing) + { + Ticker.shared.add(this.update, this); + this._isConnectedToTicker = true; + } + } + }; + + Object.defineProperties( AnimatedSprite.prototype, prototypeAccessors ); + + return AnimatedSprite; + }(Sprite)); + + // Install renderer plugins + Renderer.registerPlugin('accessibility', AccessibilityManager); + Renderer.registerPlugin('extract', Extract); + Renderer.registerPlugin('interaction', InteractionManager); + Renderer.registerPlugin('particle', ParticleRenderer); + Renderer.registerPlugin('prepare', Prepare); + Renderer.registerPlugin('batch', BatchRenderer); + Renderer.registerPlugin('tilingSprite', TilingSpriteRenderer); + + Loader$1.registerPlugin(BitmapFontLoader); + Loader$1.registerPlugin(SpritesheetLoader); + + Application.registerPlugin(TickerPlugin); + Application.registerPlugin(AppLoaderPlugin); + + /** + * String of the current PIXI version. + * + * @static + * @constant + * @memberof PIXI + * @name VERSION + * @type {string} + */ + var VERSION$1 = '5.2.4'; + + /** + * @namespace PIXI + */ + + /** + * This namespace contains WebGL-only display filters that can be applied + * to DisplayObjects using the {@link PIXI.DisplayObject#filters filters} property. + * + * Since PixiJS only had a handful of built-in filters, additional filters + * can be downloaded {@link https://github.com/pixijs/pixi-filters here} from the + * PixiJS Filters repository. + * + * All filters must extend {@link PIXI.Filter}. + * + * @example + * // Create a new application + * const app = new PIXI.Application(); + * + * // Draw a green rectangle + * const rect = new PIXI.Graphics() + * .beginFill(0x00ff00) + * .drawRect(40, 40, 200, 200); + * + * // Add a blur filter + * rect.filters = [new PIXI.filters.BlurFilter()]; + * + * // Display rectangle + * app.stage.addChild(rect); + * document.body.appendChild(app.view); + * @namespace PIXI.filters + */ + var filters = { + AlphaFilter: AlphaFilter, + BlurFilter: BlurFilter, + BlurFilterPass: BlurFilterPass, + ColorMatrixFilter: ColorMatrixFilter, + DisplacementFilter: DisplacementFilter, + FXAAFilter: FXAAFilter, + NoiseFilter: NoiseFilter, + }; + + exports.AbstractBatchRenderer = AbstractBatchRenderer; + exports.AbstractRenderer = AbstractRenderer; + exports.AnimatedSprite = AnimatedSprite; + exports.AppLoaderPlugin = AppLoaderPlugin; + exports.Application = Application; + exports.Attribute = Attribute; + exports.BasePrepare = BasePrepare; + exports.BaseRenderTexture = BaseRenderTexture; + exports.BaseTexture = BaseTexture; + exports.BatchDrawCall = BatchDrawCall; + exports.BatchGeometry = BatchGeometry; + exports.BatchPluginFactory = BatchPluginFactory; + exports.BatchRenderer = BatchRenderer; + exports.BatchShaderGenerator = BatchShaderGenerator; + exports.BatchTextureArray = BatchTextureArray; + exports.BitmapFontLoader = BitmapFontLoader; + exports.BitmapText = BitmapText; + exports.Bounds = Bounds; + exports.Buffer = Buffer; + exports.Circle = Circle; + exports.Container = Container; + exports.CountLimiter = CountLimiter; + exports.CubeTexture = CubeTexture; + exports.DEG_TO_RAD = DEG_TO_RAD; + exports.DisplayObject = DisplayObject; + exports.Ellipse = Ellipse; + exports.Extract = Extract; + exports.FillStyle = FillStyle; + exports.Filter = Filter; + exports.Framebuffer = Framebuffer; + exports.GLProgram = GLProgram; + exports.GLTexture = GLTexture; + exports.GRAPHICS_CURVES = GRAPHICS_CURVES; + exports.Geometry = Geometry; + exports.Graphics = Graphics; + exports.GraphicsData = GraphicsData; + exports.GraphicsGeometry = GraphicsGeometry; + exports.LineStyle = LineStyle; + exports.Loader = Loader$1; + exports.LoaderResource = LoaderResource; + exports.MaskData = MaskData; + exports.Matrix = Matrix; + exports.Mesh = Mesh; + exports.MeshBatchUvs = MeshBatchUvs; + exports.MeshGeometry = MeshGeometry; + exports.MeshMaterial = MeshMaterial; + exports.NineSlicePlane = NineSlicePlane; + exports.ObjectRenderer = ObjectRenderer; + exports.ObservablePoint = ObservablePoint; + exports.PI_2 = PI_2; + exports.ParticleContainer = ParticleContainer; + exports.ParticleRenderer = ParticleRenderer; + exports.PlaneGeometry = PlaneGeometry; + exports.Point = Point; + exports.Polygon = Polygon; + exports.Prepare = Prepare; + exports.Program = Program; + exports.Quad = Quad; + exports.QuadUv = QuadUv; + exports.RAD_TO_DEG = RAD_TO_DEG; + exports.Rectangle = Rectangle; + exports.RenderTexture = RenderTexture; + exports.RenderTexturePool = RenderTexturePool; + exports.Renderer = Renderer; + exports.RopeGeometry = RopeGeometry; + exports.RoundedRectangle = RoundedRectangle; + exports.Runner = Runner; + exports.Shader = Shader; + exports.SimpleMesh = SimpleMesh; + exports.SimplePlane = SimplePlane; + exports.SimpleRope = SimpleRope; + exports.Sprite = Sprite; + exports.SpriteMaskFilter = SpriteMaskFilter; + exports.Spritesheet = Spritesheet; + exports.SpritesheetLoader = SpritesheetLoader; + exports.State = State; + exports.System = System; + exports.TEXT_GRADIENT = TEXT_GRADIENT; + exports.Text = Text; + exports.TextMetrics = TextMetrics; + exports.TextStyle = TextStyle; + exports.Texture = Texture; + exports.TextureLoader = TextureLoader; + exports.TextureMatrix = TextureMatrix; + exports.TextureUvs = TextureUvs; + exports.Ticker = Ticker; + exports.TickerPlugin = TickerPlugin; + exports.TilingSprite = TilingSprite; + exports.TilingSpriteRenderer = TilingSpriteRenderer; + exports.TimeLimiter = TimeLimiter; + exports.Transform = Transform; + exports.UniformGroup = UniformGroup; + exports.VERSION = VERSION$1; + exports.ViewableBuffer = ViewableBuffer; + exports.accessibility = accessibility_es; + exports.autoDetectRenderer = autoDetectRenderer; + exports.checkMaxIfStatementsInShader = checkMaxIfStatementsInShader; + exports.defaultFilterVertex = defaultFilter; + exports.defaultVertex = _default; + exports.filters = filters; + exports.graphicsUtils = index$2; + exports.groupD8 = groupD8; + exports.interaction = interaction_es; + exports.isMobile = isMobile$1; + exports.resources = index; + exports.settings = settings; + exports.systems = systems; + exports.useDeprecated = useDeprecated; + exports.utils = utils_es; + + return exports; + +}({})); +PIXI.useDeprecated(); +//# sourceMappingURL=pixi.js.map diff --git a/js/libs/vorbisdecoder.js b/js/libs/vorbisdecoder.js new file mode 100644 index 0000000..ce59529 --- /dev/null +++ b/js/libs/vorbisdecoder.js @@ -0,0 +1,6 @@ +//============================================================================= +// vorbisdecoder.js v1.0.1 +// This code is based on: http://nothings.org/stb_vorbis/ +//============================================================================= +var VorbisDecoderModule={};VorbisDecoderModule["wasmBinary"]=Uint8Array.from(atob("AGFzbQEAAAABnAEWYAF/AX9gAn9/AX9gAn9/AGABfwBgA39/fwF/YAZ/f39/f38AYAR/f39/AGAEf39/fwF/YAF8AXxgA39/fwBgBX9/f39/AX9gBn9/f39/fwF/YAAAYAV/f39/fwBgAnx8AXxgB39/f39/f38AYAd/f39/f39/AX9gCH9/f39/f39/AX9gAnx/AX9gAX8BfWACfH8BfGADfHx/AXwCLAUBYQFhAAYBYQFiAAQBYQFjAAABYQZtZW1vcnkCARAQAWEFdGFibGUBcAADA2FgAgEBAgAABAkAAxQAAAEABAEIFQ4FAgUCAAADAA4IBgAAAAAEARIAAgAJAQUDAQ0RABMABAMCAwcICAcAAgIGBAEKBw0PBQsEAAUFBgsKAAEDCQcDBgEMAAIKARALBwMMBggBfwFB4LkECwcZBgFkAGIBZQBhAWYAH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9AoiASACTgRAIAAgByACdjYC8AogACABIAYtAABrNgL0CiADDwsgAEEANgL0CgwDCyADQQFqIQMMAQsLIABBFRADIABBADYC9AoLQX8PC0HqCUGACEGMDUH1CRAAAAu0AQEBfyAAQQBOBH8gAEH//wBMBEAgAEEPTARAIABBsAlqLAAADwsgAEH/A0wEQCAAQQV2QbAJaiwAAEEFag8LIABBCnZBsAlqLAAAQQpqDwsgAEH///8HTARAIABB//8fTARAIABBD3ZBsAlqLAAAQQ9qDwsgAEEUdkGwCWosAABBFGoPCyAAQf////8BTARAIABBGXZBsAlqLAAAQRlqDwsgAEEedkGwCWosAABBHmoFQQALC4IEAQN/IAJBgARPBEAgACABIAIQARogAA8LIAAgAmohAwJAIAAgAXNBA3FFBEACQCACQQFIBEAgACECDAELIABBA3FFBEAgACECDAELIAAhAgNAIAIgAS0AADoAACABQQFqIQEgAkEBaiICIANPDQEgAkEDcQ0ACwsCQCADQXxxIgRBwABJDQAgAiAEQUBqIgVLDQADQCACIAEoAgA2AgAgAiABKAIENgIEIAIgASgCCDYCCCACIAEoAgw2AgwgAiABKAIQNgIQIAIgASgCFDYCFCACIAEoAhg2AhggAiABKAIcNgIcIAIgASgCIDYCICACIAEoAiQ2AiQgAiABKAIoNgIoIAIgASgCLDYCLCACIAEoAjA2AjAgAiABKAI0NgI0IAIgASgCODYCOCACIAEoAjw2AjwgAUFAayEBIAJBQGsiAiAFTQ0ACwsgAiAETw0BA0AgAiABKAIANgIAIAFBBGohASACQQRqIgIgBEkNAAsMAQsgA0EESQRAIAAhAgwBCyADQXxqIgQgAEkEQCAAIQIMAQsgACECA0AgAiABLQAAOgAAIAIgAS0AAToAASACIAEtAAI6AAIgAiABLQADOgADIAFBBGohASACQQRqIgIgBE0NAAsLIAIgA0kEQANAIAIgAS0AADoAACABQQFqIQEgAkEBaiICIANHDQALCyAAC0EBAX8gAUEHakF4cSEBAn8gACgCUCICBEBBACAAKAJcIAFrIgEgACgCWEgNARogACABNgJcIAEgAmoPCyAB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AsGgBDvxIAiCaQAHg8iQCoxOQA5dt7AMQ6wgAm9OoA92eKAA2SvwBloysAPZOxAL18CwCkUdwAJ91jAGnh3QCalBkAqCmVAGjOKAAJ7bQARJ8gAE6YygBwgmMAfnwjAA+5MgCn9Y4AFFbnACHxCAC1nSoAb35NAKUZUQC1+asAgt/WAJbdYQAWNgIAxDqfAIOioQBy7W0AOY16AIK4qQBrMlwARidbAAA07QDSAHcA/PRVAAFZTQDgcYAAQbMrC21A+yH5PwAAAAAtRHQ+AAAAgJhG+DwAAABgUcx4OwAAAICDG/A5AAAAQCAlejgAAACAIoLjNgAAAAAd82k1AAAAAAAA4D8AAAAAAADgvwAAAAAAAPA/AAAAAAAA+D8AAAAAAAAAAAbQz0Pr/Uw+AEGrLAsFQAO44j8AQbAsCwpPZ2dTdm9yYmlz"),function(c){return c.charCodeAt(0)}); +var __dirname=null;var Module=typeof VorbisDecoderModule!=="undefined"?VorbisDecoderModule:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=function shell_read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);return nodeFS["readFileSync"](filename,binary?null:"utf8")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);quit_=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit==="function"){quit_=function(status){quit(status)}}if(typeof print!=="undefined"){if(typeof console==="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!=="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime;if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(typeof WebAssembly!=="object"){err("no native wasm support detected")}function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for getValue: "+type)}return null}var wasmMemory;var wasmTable=new WebAssembly.Table({"initial":3,"maximum":3+0,"element":"anyfunc"});var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}var WASM_PAGE_SIZE=65536;var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var DYNAMIC_BASE=72928,DYNAMICTOP_PTR=7232;var INITIAL_INITIAL_MEMORY=Module["INITIAL_MEMORY"]||1048576;if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_INITIAL_MEMORY/WASM_PAGE_SIZE,"maximum":INITIAL_INITIAL_MEMORY/WASM_PAGE_SIZE})}if(wasmMemory){buffer=wasmMemory.buffer}INITIAL_INITIAL_MEMORY=buffer.byteLength;updateGlobalBufferAndViews(buffer);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what+="";out(what);err(what);ABORT=true;EXITSTATUS=1;what="abort("+what+"). Build with -s ASSERTIONS=1 for more info.";throw new WebAssembly.RuntimeError(what)}function hasPrefix(str,prefix){return String.prototype.startsWith?str.startsWith(prefix):str.indexOf(prefix)===0}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return hasPrefix(filename,dataURIPrefix)}var fileURIPrefix="file://";function isFileURI(filename){return hasPrefix(filename,fileURIPrefix)}var wasmBinaryFile="vorbisdecoder.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch==="function"){fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync();return{}}__ATINIT__.push({func:function(){___wasm_call_ctors()}});function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function abortOnCannotGrowMemory(requestedSize){abort("OOM")}function _emscripten_resize_heap(requestedSize){requestedSize=requestedSize>>>0;abortOnCannotGrowMemory(requestedSize)}var asmLibraryArg={"a":___assert_fail,"b":_emscripten_memcpy_big,"c":_emscripten_resize_heap,"memory":wasmMemory,"table":wasmTable};var asm=createWasm();Module["asm"]=asm;var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["d"]).apply(null,arguments)};var _stb_vorbis_close=Module["_stb_vorbis_close"]=function(){return(_stb_vorbis_close=Module["_stb_vorbis_close"]=Module["asm"]["e"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["f"]).apply(null,arguments)};var _stb_vorbis_decode_frame_pushdata=Module["_stb_vorbis_decode_frame_pushdata"]=function(){return(_stb_vorbis_decode_frame_pushdata=Module["_stb_vorbis_decode_frame_pushdata"]=Module["asm"]["g"]).apply(null,arguments)};var _stb_vorbis_open_pushdata=Module["_stb_vorbis_open_pushdata"]=function(){return(_stb_vorbis_open_pushdata=Module["_stb_vorbis_open_pushdata"]=Module["asm"]["h"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["i"]).apply(null,arguments)};Module["asm"]=asm;Module["getValue"]=getValue;var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}noExitRuntime=true;run();class VorbisDecoder{constructor(context,decodeHandler,errorHandler){VorbisDecoder.id=(VorbisDecoder.id||0)%1e3;this.id=VorbisDecoder.id++;this.context=context;this.decodeHandler=decodeHandler;this.errorHandler=errorHandler;VorbisDecoder.instances=VorbisDecoder.instances||[];VorbisDecoder.instances[this.id]=this}destroy(){const message={id:this.id,destroy:true};VorbisDecoder.worker.postMessage(message);delete VorbisDecoder.instances[this.id]}send(arrayBuffer,isLoaded){const message={id:this.id,arrayBuffer:arrayBuffer,isLoaded:isLoaded};VorbisDecoder.worker.postMessage(message)}onMessage(message){const channels=message.data.length;if(channels>0){const length=message.data[0].length;const buffer=this.context.createBuffer(channels,length,message.sampleRate);for(let i=0;i=8e3&&this.sampleRate<22050){this.sampleScale=Math.ceil(22050/this.sampleRate)}this.totalSamples=0;this.arrays=[];this.data=[];for(let i=0;i0){const output=Module.getValue(this.outputPtr,"i32");const samples=Module.getValue(this.samplesPtr,"i32");this.byteOffset+=used;for(let i=0;i=this.sampleRate*5){this.sendBack();setTimeout(this.decode.bind(this));break}}}}resample(array){if(this.sampleScale===1){return array.slice()}else{const scale=this.sampleScale;const expanded=new Float32Array(array.length*scale);for(let i=0;i0){this.concatenate();const message={id:this.id,sampleRate:this.sampleRate*this.sampleScale,data:this.data};const transfer=[];for(let i=0;i{const id=e.data.id;const instances=VorbisWorkerDecoder.instances;if(!instances[id]){instances[id]=new VorbisWorkerDecoder(id)}if(instances[id]){instances[id].onMessage(e.data)}if(e.data.destroy){instances[id].close();delete instances[id]}})}else{VorbisDecoder.instances=[];VorbisDecoder.worker=new Worker(document.currentScript.src);VorbisDecoder.worker.addEventListener("message",e=>{const instances=VorbisDecoder.instances;const id=e.data.id;if(instances[id]){instances[id].onMessage(e.data)}})} diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..5b2f107 --- /dev/null +++ b/js/main.js @@ -0,0 +1,161 @@ +//============================================================================= +// main.js v1.4.4 +//============================================================================= + +const scriptUrls = [ + "js/libs/pixi.js", + "js/libs/pako.min.js", + "js/libs/localforage.min.js", + "js/libs/effekseer.min.js", + "js/libs/vorbisdecoder.js", + "js/rmmz_core.js", + "js/rmmz_managers.js", + "js/rmmz_objects.js", + "js/rmmz_scenes.js", + "js/rmmz_sprites.js", + "js/rmmz_windows.js", + "js/plugins.js" +]; +const effekseerWasmUrl = "js/libs/effekseer.wasm"; + +class Main { + constructor() { + this.xhrSucceeded = false; + this.loadCount = 0; + this.error = null; + } + + run() { + this.showLoadingSpinner(); + this.testXhr(); + this.hookNwjsClose(); + this.loadMainScripts(); + } + + showLoadingSpinner() { + const loadingSpinner = document.createElement("div"); + const loadingSpinnerImage = document.createElement("div"); + loadingSpinner.id = "loadingSpinner"; + loadingSpinnerImage.id = "loadingSpinnerImage"; + loadingSpinner.appendChild(loadingSpinnerImage); + document.body.appendChild(loadingSpinner); + } + + eraseLoadingSpinner() { + const loadingSpinner = document.getElementById("loadingSpinner"); + if (loadingSpinner) { + document.body.removeChild(loadingSpinner); + } + } + + testXhr() { + const xhr = new XMLHttpRequest(); + xhr.open("GET", document.currentScript.src); + xhr.onload = () => (this.xhrSucceeded = true); + xhr.send(); + } + + hookNwjsClose() { + // [Note] When closing the window, the NW.js process sometimes does + // not terminate properly. This code is a workaround for that. + if (typeof nw === "object") { + nw.Window.get().on("close", () => nw.App.quit()); + } + } + + loadMainScripts() { + for (const url of scriptUrls) { + const script = document.createElement("script"); + script.type = "text/javascript"; + script.src = url; + script.async = false; + script.defer = true; + script.onload = this.onScriptLoad.bind(this); + script.onerror = this.onScriptError.bind(this); + script._url = url; + document.body.appendChild(script); + } + this.numScripts = scriptUrls.length; + window.addEventListener("load", this.onWindowLoad.bind(this)); + window.addEventListener("error", this.onWindowError.bind(this)); + } + + onScriptLoad() { + if (++this.loadCount === this.numScripts) { + PluginManager.setup($plugins); + } + } + + onScriptError(e) { + this.printError("Failed to load", e.target._url); + } + + printError(name, message) { + this.eraseLoadingSpinner(); + if (!document.getElementById("errorPrinter")) { + const errorPrinter = document.createElement("div"); + errorPrinter.id = "errorPrinter"; + errorPrinter.innerHTML = this.makeErrorHtml(name, message); + document.body.appendChild(errorPrinter); + } + } + + makeErrorHtml(name, message) { + const nameDiv = document.createElement("div"); + const messageDiv = document.createElement("div"); + nameDiv.id = "errorName"; + messageDiv.id = "errorMessage"; + nameDiv.innerHTML = name; + messageDiv.innerHTML = message; + return nameDiv.outerHTML + messageDiv.outerHTML; + } + + onWindowLoad() { + if (!this.xhrSucceeded) { + const message = "Your browser does not allow to read local files."; + this.printError("Error", message); + } else if (this.isPathRandomized()) { + const message = "Please move the Game.app to a different folder."; + this.printError("Error", message); + } else if (this.error) { + this.printError(this.error.name, this.error.message); + } else { + this.initEffekseerRuntime(); + } + } + + onWindowError(event) { + if (!this.error) { + this.error = event.error; + } + } + + isPathRandomized() { + // [Note] We cannot save the game properly when Gatekeeper Path + // Randomization is in effect. + return ( + typeof process === "object" && + process.mainModule.filename.startsWith("/private/var") + ); + } + + initEffekseerRuntime() { + const onLoad = this.onEffekseerLoad.bind(this); + const onError = this.onEffekseerError.bind(this); + effekseer.initRuntime(effekseerWasmUrl, onLoad, onError); + } + + onEffekseerLoad() { + this.eraseLoadingSpinner(); + SceneManager.run(Scene_Boot); + } + + onEffekseerError() { + this.printError("Failed to load", effekseerWasmUrl); + } +} + +const main = new Main(); +main.run(); + +//----------------------------------------------------------------------------- diff --git a/js/plugins.js b/js/plugins.js new file mode 100644 index 0000000..dce9b6f --- /dev/null +++ b/js/plugins.js @@ -0,0 +1,10 @@ +// Generated by RPG Maker. +// Do not edit this file directly. +var $plugins = +[ +{"name":"VisuMZ_0_CoreEngine","status":true,"description":"[RPG Maker MZ] [Tier 0] [Version 1.59] [CoreEngine]","parameters":{"BreakHead":"----------------------------------","CoreEngine":"Plugin Parameters","ATTENTION":"READ THE HELP FILE","BreakSettings":"----------------------------------","QoL:struct":"{\"PlayTest\":\"\",\"NewGameBoot:eval\":\"false\",\"ForceNoPlayTest:eval\":\"false\",\"OpenConsole:eval\":\"true\",\"F6key:eval\":\"true\",\"F7key:eval\":\"true\",\"NewGameCommonEvent:num\":\"0\",\"BattleTest\":\"\",\"BTestItems:eval\":\"true\",\"BTestWeapons:eval\":\"true\",\"BTestArmors:eval\":\"true\",\"BTestAddedQuantity:num\":\"90\",\"DigitGrouping\":\"\",\"DigitGroupingStandardText:eval\":\"true\",\"DigitGroupingExText:eval\":\"true\",\"DigitGroupingDamageSprites:eval\":\"true\",\"DigitGroupingGaugeSprites:eval\":\"true\",\"DigitGroupingLocale:str\":\"en-US\",\"PlayerBenefit\":\"\",\"EncounterRateMinimum:num\":\"10\",\"EscapeAlways:eval\":\"true\",\"ImprovedAccuracySystem:eval\":\"true\",\"AccuracyBoost:eval\":\"true\",\"LevelUpFullHp:eval\":\"true\",\"LevelUpFullMp:eval\":\"true\",\"Pictures\":\"\",\"AntiZoomPictures:eval\":\"true\",\"PictureContainers\":\"\",\"DetachBattlePictureContainer:eval\":\"false\",\"DetachMapPictureContainer:eval\":\"false\",\"Misc\":\"\",\"AnimationMirrorOffset:eval\":\"false\",\"AutoStretch:str\":\"stretch\",\"FontShadows:eval\":\"false\",\"FontSmoothing:eval\":\"true\",\"FontWidthFix:eval\":\"true\",\"KeyItemProtect:eval\":\"true\",\"ModernControls:eval\":\"true\",\"MvAnimationRate:num\":\"4\",\"NewGameCommonEventAll:num\":\"0\",\"NoTileShadows:eval\":\"true\",\"PixelateImageRendering:eval\":\"false\",\"RequireFocus:eval\":\"true\",\"ShortcutScripts:eval\":\"true\",\"SmartEventCollisionPriority:eval\":\"true\",\"SubfolderParse:eval\":\"true\"}","BattleSystem:str":"stb","Color:struct":"{\"BasicColors\":\"\",\"ColorNormal:str\":\"0\",\"ColorSystem:str\":\"16\",\"ColorCrisis:str\":\"17\",\"ColorDeath:str\":\"18\",\"ColorGaugeBack:str\":\"19\",\"ColorHPGauge1:str\":\"20\",\"ColorHPGauge2:str\":\"21\",\"ColorMPGauge1:str\":\"22\",\"ColorMPGauge2:str\":\"23\",\"ColorMPCost:str\":\"23\",\"ColorPowerUp:str\":\"24\",\"ColorPowerDown:str\":\"25\",\"ColorCTGauge1:str\":\"26\",\"ColorCTGauge2:str\":\"27\",\"ColorTPGauge1:str\":\"28\",\"ColorTPGauge2:str\":\"29\",\"ColorTPCost:str\":\"29\",\"ColorPending:str\":\"#2a847d\",\"ColorExpGauge1:str\":\"30\",\"ColorExpGauge2:str\":\"31\",\"ColorMaxLvGauge1:str\":\"14\",\"ColorMaxLvGauge2:str\":\"6\",\"AlphaColors\":\"\",\"OutlineColor:str\":\"rgba(0, 0, 0, 0.6)\",\"DimColor1:str\":\"rgba(0, 0, 0, 0.6)\",\"DimColor2:str\":\"rgba(0, 0, 0, 0)\",\"ItemBackColor1:str\":\"rgba(32, 32, 32, 0.5)\",\"ItemBackColor2:str\":\"rgba(0, 0, 0, 0.5)\",\"ConditionalColors\":\"\",\"ActorHPColor:func\":\"\\\"// Set the variables used in this function.\\\\nlet actor = arguments[0];\\\\n\\\\n// Check if the actor exists. If not, return normal.\\\\nif (!actor) {\\\\n return this.normalColor();\\\\n\\\\n// If the actor is dead, return death color.\\\\n} else if (actor.isDead()) {\\\\n return this.deathColor();\\\\n\\\\n// If the actor is dying, return crisis color.\\\\n} else if (actor.isDying()) {\\\\n return this.crisisColor();\\\\n\\\\n// Otherwise, return the normal color.\\\\n} else {\\\\n return this.normalColor();\\\\n}\\\"\",\"ActorMPColor:func\":\"\\\"// Set the variables used in this function.\\\\nlet actor = arguments[0];\\\\n\\\\n// Check if the actor exists. If not, return normal.\\\\nif (!actor) {\\\\n return this.normalColor();\\\\n\\\\n// If MP rate is below 25%, return crisis color.\\\\n} else if (actor.mpRate() < 0.25) {\\\\n return this.crisisColor();\\\\n\\\\n// Otherwise, return the normal color.\\\\n} else {\\\\n return this.normalColor();\\\\n}\\\"\",\"ActorTPColor:func\":\"\\\"// Set the variables used in this function.\\\\nlet actor = arguments[0];\\\\n\\\\n// Check if the actor exists. If not, return normal.\\\\nif (!actor) {\\\\n return this.normalColor();\\\\n\\\\n// If TP rate is below 25%, return crisis color.\\\\n} else if (actor.tpRate() < 0.25) {\\\\n return this.crisisColor();\\\\n\\\\n// Otherwise, return the normal color.\\\\n} else {\\\\n return this.normalColor();\\\\n}\\\"\",\"ParamChange:func\":\"\\\"// Set the variables used in this function.\\\\nlet change = arguments[0];\\\\n\\\\n// If a positive change, use power up color.\\\\nif (change > 0) {\\\\n return this.powerUpColor();\\\\n\\\\n// If a negative change, use power down color.\\\\n} else if (change < 0) {\\\\n return this.powerDownColor();\\\\n\\\\n// Otherwise, return the normal color.\\\\n} else {\\\\n return this.normalColor();\\\\n}\\\"\",\"DamageColor:func\":\"\\\"// Set the variables used in this function.\\\\nlet colorType = arguments[0];\\\\n\\\\n// Check the value of the color type\\\\n// and return an appropriate color.\\\\nswitch (colorType) {\\\\n\\\\n case 0: // HP damage\\\\n return \\\\\\\"#ffffff\\\\\\\";\\\\n\\\\n case 1: // HP recover\\\\n return \\\\\\\"#b9ffb5\\\\\\\";\\\\n\\\\n case 2: // MP damage\\\\n return \\\\\\\"#bb88bb\\\\\\\";\\\\n\\\\n case 3: // MP recover\\\\n return \\\\\\\"#80b0ff\\\\\\\";\\\\n\\\\n default:\\\\n return \\\\\\\"#808080\\\\\\\";\\\\n}\\\"\"}","Gold:struct":"{\"GoldMax:num\":\"999999999\",\"GoldFontSize:num\":\"24\",\"GoldIcon:num\":\"314\",\"GoldOverlap:str\":\"A Lot\",\"ItemStyle:eval\":\"true\"}","ImgLoad:struct":"{\"animations:arraystr\":\"[]\",\"battlebacks1:arraystr\":\"[]\",\"battlebacks2:arraystr\":\"[]\",\"characters:arraystr\":\"[]\",\"enemies:arraystr\":\"[]\",\"faces:arraystr\":\"[]\",\"parallaxes:arraystr\":\"[]\",\"pictures:arraystr\":\"[]\",\"sv_actors:arraystr\":\"[]\",\"sv_enemies:arraystr\":\"[]\",\"system:arraystr\":\"[\\\"Balloon\\\",\\\"IconSet\\\"]\",\"tilesets:arraystr\":\"[]\",\"titles1:arraystr\":\"[]\",\"titles2:arraystr\":\"[]\"}","KeyboardInput:struct":"{\"Controls\":\"\",\"WASD:eval\":\"false\",\"DashToggleR:eval\":\"false\",\"NameInput\":\"\",\"EnableNameInput:eval\":\"true\",\"DefaultMode:str\":\"keyboard\",\"QwertyLayout:eval\":\"true\",\"NameInputMessage:eval\":\"\\\"Type in this character's name.\\\\nPress \\\\\\\\c[5]ENTER\\\\\\\\c[0] when you're done.\\\\n\\\\n-or-\\\\n\\\\nPress \\\\\\\\c[5]arrow keys\\\\\\\\c[0]/\\\\\\\\c[5]TAB\\\\\\\\c[0] to switch\\\\nto manual character entry.\\\\n\\\\nPress \\\\\\\\c[5]ESC\\\\\\\\c[0]/\\\\\\\\c[5]TAB\\\\\\\\c[0] to use to keyboard.\\\"\",\"NumberInput\":\"\",\"EnableNumberInput:eval\":\"true\",\"ButtonAssist\":\"\",\"Keyboard:str\":\"Keyboard\",\"Manual:str\":\"Manual\"}","MenuBg:struct":"{\"Scene_Menu:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_Item:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_Skill:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_Equip:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_Status:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_Options:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_Save:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_Load:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_GameEnd:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"128\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_Shop:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_Name:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\",\"Scene_Unlisted:struct\":\"{\\\"SnapshotOpacity:num\\\":\\\"192\\\",\\\"BgFilename1:str\\\":\\\"\\\",\\\"BgFilename2:str\\\":\\\"\\\"}\"}","ButtonAssist:struct":"{\"General\":\"\",\"Enable:eval\":\"true\",\"Location:str\":\"bottom\",\"BgType:num\":\"0\",\"Text\":\"\",\"TextFmt:str\":\"%1:%2\",\"MultiKeyFmt:str\":\"%1/%2\",\"OkText:str\":\"Select\",\"CancelText:str\":\"Back\",\"SwitchActorText:str\":\"Switch Ally\",\"Keys\":\"\",\"KeyUnlisted:str\":\"\\\\}❪%1❫\\\\{\",\"KeyUP:str\":\"^\",\"KeyDOWN:str\":\"v\",\"KeyLEFT:str\":\"<<\",\"KeyRIGHT:str\":\">>\",\"KeySHIFT:str\":\"\\\\}❪SHIFT❫\\\\{\",\"KeyTAB:str\":\"\\\\}❪TAB❫\\\\{\",\"KeyA:str\":\"A\",\"KeyB:str\":\"B\",\"KeyC:str\":\"C\",\"KeyD:str\":\"D\",\"KeyE:str\":\"E\",\"KeyF:str\":\"F\",\"KeyG:str\":\"G\",\"KeyH:str\":\"H\",\"KeyI:str\":\"I\",\"KeyJ:str\":\"J\",\"KeyK:str\":\"K\",\"KeyL:str\":\"L\",\"KeyM:str\":\"M\",\"KeyN:str\":\"N\",\"KeyO:str\":\"O\",\"KeyP:str\":\"P\",\"KeyQ:str\":\"Q\",\"KeyR:str\":\"R\",\"KeyS:str\":\"S\",\"KeyT:str\":\"T\",\"KeyU:str\":\"U\",\"KeyV:str\":\"V\",\"KeyW:str\":\"W\",\"KeyX:str\":\"X\",\"KeyY:str\":\"Y\",\"KeyZ:str\":\"Z\"}","MenuLayout:struct":"{\"Title:struct\":\"{\\\"TitleScreen\\\":\\\"\\\",\\\"DocumentTitleFmt:str\\\":\\\"%1: %2 - Version %3\\\",\\\"Subtitle:str\\\":\\\"Subtitle\\\",\\\"Version:str\\\":\\\"0.00\\\",\\\"drawGameTitle:func\\\":\\\"\\\\\\\"const x = 20;\\\\\\\\nconst y = Graphics.height / 4;\\\\\\\\nconst maxWidth = Graphics.width - x * 2;\\\\\\\\nconst text = $dataSystem.gameTitle;\\\\\\\\nconst bitmap = this._gameTitleSprite.bitmap;\\\\\\\\nbitmap.fontFace = $gameSystem.mainFontFace();\\\\\\\\nbitmap.outlineColor = \\\\\\\\\\\\\\\"black\\\\\\\\\\\\\\\";\\\\\\\\nbitmap.outlineWidth = 8;\\\\\\\\nbitmap.fontSize = 72;\\\\\\\\nbitmap.drawText(text, x, y, maxWidth, 48, \\\\\\\\\\\\\\\"center\\\\\\\\\\\\\\\");\\\\\\\"\\\",\\\"drawGameSubtitle:func\\\":\\\"\\\\\\\"const x = 20;\\\\\\\\nconst y = Graphics.height / 4 + 72;\\\\\\\\nconst maxWidth = Graphics.width - x * 2;\\\\\\\\nconst text = Scene_Title.subtitle;\\\\\\\\nconst bitmap = this._gameTitleSprite.bitmap;\\\\\\\\nbitmap.fontFace = $gameSystem.mainFontFace();\\\\\\\\nbitmap.outlineColor = \\\\\\\\\\\\\\\"black\\\\\\\\\\\\\\\";\\\\\\\\nbitmap.outlineWidth = 6;\\\\\\\\nbitmap.fontSize = 48;\\\\\\\\nbitmap.drawText(text, x, y, maxWidth, 48, \\\\\\\\\\\\\\\"center\\\\\\\\\\\\\\\");\\\\\\\"\\\",\\\"drawGameVersion:func\\\":\\\"\\\\\\\"const bitmap = this._gameTitleSprite.bitmap;\\\\\\\\nconst x = 0;\\\\\\\\nconst y = Graphics.height - 20;\\\\\\\\nconst width = Math.round(Graphics.width / 4);\\\\\\\\nconst height = 20;\\\\\\\\nconst c1 = ColorManager.dimColor1();\\\\\\\\nconst c2 = ColorManager.dimColor2();\\\\\\\\nconst text = 'Version ' + Scene_Title.version;\\\\\\\\nbitmap.gradientFillRect(x, y, width, height, c1, c2);\\\\\\\\nbitmap.fontFace = $gameSystem.mainFontFace();\\\\\\\\nbitmap.outlineColor = \\\\\\\\\\\\\\\"black\\\\\\\\\\\\\\\";\\\\\\\\nbitmap.outlineWidth = 3;\\\\\\\\nbitmap.fontSize = 16;\\\\\\\\nbitmap.drawText(text, x + 4, y, Graphics.width, height, \\\\\\\\\\\\\\\"left\\\\\\\\\\\\\\\");\\\\\\\"\\\",\\\"CommandRect:func\\\":\\\"\\\\\\\"const offsetX = $dataSystem.titleCommandWindow.offsetX;\\\\\\\\nconst offsetY = $dataSystem.titleCommandWindow.offsetY;\\\\\\\\nconst rows = this.commandWindowRows();\\\\\\\\nconst width = this.mainCommandWidth();\\\\\\\\nconst height = this.calcWindowHeight(rows, true);\\\\\\\\nconst x = (Graphics.boxWidth - width) / 2 + offsetX;\\\\\\\\nconst y = Graphics.boxHeight - height - 96 + offsetY;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"ButtonFadeSpeed:num\\\":\\\"4\\\"}\",\"MainMenu:struct\":\"{\\\"CommandWindow\\\":\\\"\\\",\\\"CommandBgType:num\\\":\\\"0\\\",\\\"CommandRect:func\\\":\\\"\\\\\\\"const width = this.mainCommandWidth();\\\\\\\\nconst height = this.mainAreaHeight() - this.goldWindowRect().height;\\\\\\\\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"GoldWindow\\\":\\\"\\\",\\\"GoldBgType:num\\\":\\\"0\\\",\\\"GoldRect:func\\\":\\\"\\\\\\\"const rows = 1;\\\\\\\\nconst width = this.mainCommandWidth();\\\\\\\\nconst height = this.calcWindowHeight(rows, true);\\\\\\\\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\\\\\\\\nconst y = this.mainAreaBottom() - height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"StatusWindow\\\":\\\"\\\",\\\"StatusBgType:num\\\":\\\"0\\\",\\\"StatusRect:func\\\":\\\"\\\\\\\"const width = Graphics.boxWidth - this.mainCommandWidth();\\\\\\\\nconst height = this.mainAreaHeight();\\\\\\\\nconst x = this.isRightInputMode() ? 0 : Graphics.boxWidth - width;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\"}\",\"ItemMenu:struct\":\"{\\\"HelpWindow\\\":\\\"\\\",\\\"HelpBgType:num\\\":\\\"0\\\",\\\"HelpRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.helpAreaTop();\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.helpAreaHeight();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"CategoryWindow\\\":\\\"\\\",\\\"CategoryBgType:num\\\":\\\"0\\\",\\\"CategoryRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nconst rows = 1;\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.calcWindowHeight(rows, true);\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"ItemWindow\\\":\\\"\\\",\\\"ItemBgType:num\\\":\\\"0\\\",\\\"ItemRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this._categoryWindow.y + this._categoryWindow.height;\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.mainAreaBottom() - y;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"ActorWindow\\\":\\\"\\\",\\\"ActorBgType:num\\\":\\\"0\\\",\\\"ActorRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.mainAreaHeight();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\"}\",\"SkillMenu:struct\":\"{\\\"HelpWindow\\\":\\\"\\\",\\\"HelpBgType:num\\\":\\\"0\\\",\\\"HelpRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.helpAreaTop();\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.helpAreaHeight();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"SkillTypeWindow\\\":\\\"\\\",\\\"SkillTypeBgType:num\\\":\\\"0\\\",\\\"SkillTypeRect:func\\\":\\\"\\\\\\\"const rows = 3;\\\\\\\\nconst width = this.mainCommandWidth();\\\\\\\\nconst height = this.calcWindowHeight(rows, true);\\\\\\\\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"StatusWindow\\\":\\\"\\\",\\\"StatusBgType:num\\\":\\\"0\\\",\\\"StatusRect:func\\\":\\\"\\\\\\\"const width = Graphics.boxWidth - this.mainCommandWidth();\\\\\\\\nconst height = this._skillTypeWindow.height;\\\\\\\\nconst x = this.isRightInputMode() ? 0 : Graphics.boxWidth - width;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"ItemWindow\\\":\\\"\\\",\\\"ItemBgType:num\\\":\\\"0\\\",\\\"ItemRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this._statusWindow.y + this._statusWindow.height;\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.mainAreaHeight() - this._statusWindow.height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"ActorWindow\\\":\\\"\\\",\\\"ActorBgType:num\\\":\\\"0\\\",\\\"ActorRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.mainAreaHeight();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\"}\",\"EquipMenu:struct\":\"{\\\"HelpWindow\\\":\\\"\\\",\\\"HelpBgType:num\\\":\\\"0\\\",\\\"HelpRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.helpAreaTop();\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.helpAreaHeight();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"StatusWindow\\\":\\\"\\\",\\\"StatusBgType:num\\\":\\\"0\\\",\\\"StatusRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nconst width = this.statusWidth();\\\\\\\\nconst height = this.mainAreaHeight();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"CommandWindow\\\":\\\"\\\",\\\"CommandBgType:num\\\":\\\"0\\\",\\\"CommandRect:func\\\":\\\"\\\\\\\"const x = this.statusWidth();\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nconst rows = 1;\\\\\\\\nconst width = Graphics.boxWidth - this.statusWidth();\\\\\\\\nconst height = this.calcWindowHeight(rows, true);\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"SlotWindow\\\":\\\"\\\",\\\"SlotBgType:num\\\":\\\"0\\\",\\\"SlotRect:func\\\":\\\"\\\\\\\"const commandWindowRect = this.commandWindowRect();\\\\\\\\nconst x = this.statusWidth();\\\\\\\\nconst y = commandWindowRect.y + commandWindowRect.height;\\\\\\\\nconst width = Graphics.boxWidth - this.statusWidth();\\\\\\\\nconst height = this.mainAreaHeight() - commandWindowRect.height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"ItemWindow\\\":\\\"\\\",\\\"ItemBgType:num\\\":\\\"0\\\",\\\"ItemRect:func\\\":\\\"\\\\\\\"return this.slotWindowRect();\\\\\\\"\\\"}\",\"StatusMenu:struct\":\"{\\\"ProfileWindow\\\":\\\"\\\",\\\"ProfileBgType:num\\\":\\\"0\\\",\\\"ProfileRect:func\\\":\\\"\\\\\\\"const width = Graphics.boxWidth;\\\\\\\\nconst height = this.profileHeight();\\\\\\\\nconst x = 0;\\\\\\\\nconst y = this.mainAreaBottom() - height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"StatusWindow\\\":\\\"\\\",\\\"StatusBgType:num\\\":\\\"0\\\",\\\"StatusRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.statusParamsWindowRect().y - y;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"StatusParamsWindow\\\":\\\"\\\",\\\"StatusParamsBgType:num\\\":\\\"0\\\",\\\"StatusParamsRect:func\\\":\\\"\\\\\\\"const width = this.statusParamsWidth();\\\\\\\\nconst height = this.statusParamsHeight();\\\\\\\\nconst x = 0;\\\\\\\\nconst y = this.mainAreaBottom() - this.profileHeight() - height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"StatusEquipWindow\\\":\\\"\\\",\\\"StatusEquipBgType:num\\\":\\\"0\\\",\\\"StatusEquipRect:func\\\":\\\"\\\\\\\"const width = Graphics.boxWidth - this.statusParamsWidth();\\\\\\\\nconst height = this.statusParamsHeight();\\\\\\\\nconst x = this.statusParamsWidth();\\\\\\\\nconst y = this.mainAreaBottom() - this.profileHeight() - height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\"}\",\"OptionsMenu:struct\":\"{\\\"OptionsWindow\\\":\\\"\\\",\\\"OptionsBgType:num\\\":\\\"0\\\",\\\"OptionsRect:func\\\":\\\"\\\\\\\"const n = Math.min(this.maxCommands(), this.maxVisibleCommands());\\\\\\\\nconst width = 400;\\\\\\\\nconst height = this.calcWindowHeight(n, true);\\\\\\\\nconst x = (Graphics.boxWidth - width) / 2;\\\\\\\\nconst y = (Graphics.boxHeight - height) / 2;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\"}\",\"SaveMenu:struct\":\"{\\\"HelpWindow\\\":\\\"\\\",\\\"HelpBgType:num\\\":\\\"0\\\",\\\"HelpRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nconst rows = 1;\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.calcWindowHeight(rows, false);\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"ListWindow\\\":\\\"\\\",\\\"ListBgType:num\\\":\\\"0\\\",\\\"ListRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.mainAreaTop() + this._helpWindow.height;\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.mainAreaHeight() - this._helpWindow.height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\"}\",\"LoadMenu:struct\":\"{\\\"HelpWindow\\\":\\\"\\\",\\\"HelpBgType:num\\\":\\\"0\\\",\\\"HelpRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nconst rows = 1;\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.calcWindowHeight(rows, false);\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"ListWindow\\\":\\\"\\\",\\\"ListBgType:num\\\":\\\"0\\\",\\\"ListRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.mainAreaTop() + this._helpWindow.height;\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.mainAreaHeight() - this._helpWindow.height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\"}\",\"GameEnd:struct\":\"{\\\"CommandList:arraystruct\\\":\\\"[\\\\\\\"{\\\\\\\\\\\\\\\"Symbol:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"toTitle\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"TextStr:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Untitled\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"TextJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"return TextManager.toTitle;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"return true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"EnableJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"return true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ExtJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"return null;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CallHandlerJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"SceneManager._scene.commandToTitle();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Symbol:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"cancel\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"TextStr:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Untitled\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"TextJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"return TextManager.cancel;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"return true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"EnableJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"return true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ExtJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"return null;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CallHandlerJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"SceneManager._scene.popScene();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\"]\\\",\\\"CommandBgType:num\\\":\\\"0\\\",\\\"CommandRect:func\\\":\\\"\\\\\\\"const rows = 2;\\\\\\\\nconst width = this.mainCommandWidth();\\\\\\\\nconst height = this.calcWindowHeight(rows, true);\\\\\\\\nconst x = (Graphics.boxWidth - width) / 2;\\\\\\\\nconst y = (Graphics.boxHeight - height) / 2;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\"}\",\"ShopMenu:struct\":\"{\\\"HelpWindow\\\":\\\"\\\",\\\"HelpBgType:num\\\":\\\"0\\\",\\\"HelpRect:func\\\":\\\"\\\\\\\"const wx = 0;\\\\\\\\nconst wy = this.helpAreaTop();\\\\\\\\nconst ww = Graphics.boxWidth;\\\\\\\\nconst wh = this.helpAreaHeight();\\\\\\\\nreturn new Rectangle(wx, wy, ww, wh);\\\\\\\"\\\",\\\"GoldWindow\\\":\\\"\\\",\\\"GoldBgType:num\\\":\\\"0\\\",\\\"GoldRect:func\\\":\\\"\\\\\\\"const rows = 1;\\\\\\\\nconst width = this.mainCommandWidth();\\\\\\\\nconst height = this.calcWindowHeight(rows, true);\\\\\\\\nconst x = Graphics.boxWidth - width;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"CommandWindow\\\":\\\"\\\",\\\"CommandBgType:num\\\":\\\"0\\\",\\\"CommandRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this.mainAreaTop();\\\\\\\\nconst rows = 1;\\\\\\\\nconst width = this._goldWindow.x;\\\\\\\\nconst height = this.calcWindowHeight(rows, true);\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"DummyWindow\\\":\\\"\\\",\\\"DummyBgType:num\\\":\\\"0\\\",\\\"DummyRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this._commandWindow.y + this._commandWindow.height;\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.mainAreaHeight() - this._commandWindow.height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"NumberWindow\\\":\\\"\\\",\\\"NumberBgType:num\\\":\\\"0\\\",\\\"NumberRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this._dummyWindow.y;\\\\\\\\nconst width = Graphics.boxWidth - this.statusWidth();\\\\\\\\nconst height = this._dummyWindow.height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"StatusWindow\\\":\\\"\\\",\\\"StatusBgType:num\\\":\\\"0\\\",\\\"StatusRect:func\\\":\\\"\\\\\\\"const width = this.statusWidth();\\\\\\\\nconst height = this._dummyWindow.height;\\\\\\\\nconst x = Graphics.boxWidth - width;\\\\\\\\nconst y = this._dummyWindow.y;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"BuyWindow\\\":\\\"\\\",\\\"BuyBgType:num\\\":\\\"0\\\",\\\"BuyRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this._dummyWindow.y;\\\\\\\\nconst width = Graphics.boxWidth - this.statusWidth();\\\\\\\\nconst height = this._dummyWindow.height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"CategoryWindow\\\":\\\"\\\",\\\"CategoryBgType:num\\\":\\\"0\\\",\\\"CategoryRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this._dummyWindow.y;\\\\\\\\nconst rows = 1;\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height = this.calcWindowHeight(rows, true);\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"SellWindow\\\":\\\"\\\",\\\"SellBgType:num\\\":\\\"0\\\",\\\"SellRect:func\\\":\\\"\\\\\\\"const x = 0;\\\\\\\\nconst y = this._categoryWindow.y + this._categoryWindow.height;\\\\\\\\nconst width = Graphics.boxWidth;\\\\\\\\nconst height =\\\\\\\\n this.mainAreaHeight() -\\\\\\\\n this._commandWindow.height -\\\\\\\\n this._categoryWindow.height;\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\"}\",\"NameMenu:struct\":\"{\\\"EditWindow\\\":\\\"\\\",\\\"EditBgType:num\\\":\\\"0\\\",\\\"EditRect:func\\\":\\\"\\\\\\\"const rows = 9;\\\\\\\\nconst inputWindowHeight = this.calcWindowHeight(rows, true);\\\\\\\\nconst padding = $gameSystem.windowPadding();\\\\\\\\nconst width = 600;\\\\\\\\nconst height = Math.min(ImageManager.faceHeight + padding * 2, this.mainAreaHeight() - inputWindowHeight);\\\\\\\\nconst x = (Graphics.boxWidth - width) / 2;\\\\\\\\nconst y = (this.mainAreaHeight() - (height + inputWindowHeight)) / 2 + this.mainAreaTop();\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\",\\\"InputWindow\\\":\\\"\\\",\\\"InputBgType:num\\\":\\\"0\\\",\\\"InputRect:func\\\":\\\"\\\\\\\"const x = this._editWindow.x;\\\\\\\\nconst y = this._editWindow.y + this._editWindow.height;\\\\\\\\nconst rows = 9;\\\\\\\\nconst width = this._editWindow.width;\\\\\\\\nconst height = this.calcWindowHeight(rows, true);\\\\\\\\nreturn new Rectangle(x, y, width, height);\\\\\\\"\\\"}\"}","Param:struct":"{\"DisplayedParams:arraystr\":\"[\\\"ATK\\\",\\\"DEF\\\",\\\"MAT\\\",\\\"MDF\\\",\\\"AGI\\\",\\\"LUK\\\"]\",\"ExtDisplayedParams:arraystr\":\"[\\\"MaxHP\\\",\\\"MaxMP\\\",\\\"ATK\\\",\\\"DEF\\\",\\\"MAT\\\",\\\"MDF\\\",\\\"AGI\\\",\\\"LUK\\\"]\",\"BasicParameters\":\"\",\"CrisisRate:num\":\"0.25\",\"BasicParameterFormula:func\":\"\\\"// Determine the variables used in this calculation.\\\\nlet paramId = arguments[0];\\\\nlet base = this.paramBase(paramId);\\\\nlet plus = this.paramPlus(paramId);\\\\nlet paramRate = this.paramRate(paramId);\\\\nlet buffRate = this.paramBuffRate(paramId);\\\\nlet flatBonus = this.paramFlatBonus(paramId);\\\\n\\\\n// Formula to determine total parameter value.\\\\nlet value = (base + plus) * paramRate * buffRate + flatBonus;\\\\n\\\\n// Determine the limits\\\\nconst maxValue = this.paramMax(paramId);\\\\nconst minValue = this.paramMin(paramId);\\\\n\\\\n// Final value\\\\nreturn Math.round(value.clamp(minValue, maxValue));\\\"\",\"BasicParamCaps\":\"\",\"BasicActorParamCaps\":\"\",\"BasicActorParamMax0:str\":\"9999\",\"BasicActorParamMax1:str\":\"9999\",\"BasicActorParamMax2:str\":\"999\",\"BasicActorParamMax3:str\":\"999\",\"BasicActorParamMax4:str\":\"999\",\"BasicActorParamMax5:str\":\"999\",\"BasicActorParamMax6:str\":\"999\",\"BasicActorParamMax7:str\":\"999\",\"BasicEnemyParamCaps\":\"\",\"BasicEnemyParamMax0:str\":\"999999\",\"BasicEnemyParamMax1:str\":\"9999\",\"BasicEnemyParamMax2:str\":\"999\",\"BasicEnemyParamMax3:str\":\"999\",\"BasicEnemyParamMax4:str\":\"999\",\"BasicEnemyParamMax5:str\":\"999\",\"BasicEnemyParamMax6:str\":\"999\",\"BasicEnemyParamMax7:str\":\"999\",\"XParameters\":\"\",\"XParameterFormula:func\":\"\\\"// Determine the variables used in this calculation.\\\\nlet xparamId = arguments[0];\\\\nlet base = this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId);\\\\nlet plus = this.xparamPlus(xparamId);\\\\nlet paramRate = this.xparamRate(xparamId);\\\\nlet flatBonus = this.xparamFlatBonus(xparamId);\\\\n\\\\n// Formula to determine total parameter value.\\\\nlet value = (base + plus) * paramRate + flatBonus;\\\\n\\\\n// Final value\\\\nreturn value;\\\"\",\"XParamVocab\":\"\",\"XParamVocab0:str\":\"Hit\",\"XParamVocab1:str\":\"Evasion\",\"XParamVocab2:str\":\"Critical Rate\",\"XParamVocab3:str\":\"Critical Evade\",\"XParamVocab4:str\":\"Magic Evade\",\"XParamVocab5:str\":\"Magic Reflect\",\"XParamVocab6:str\":\"Counter\",\"XParamVocab7:str\":\"HP Regen\",\"XParamVocab8:str\":\"MP Regen\",\"XParamVocab9:str\":\"TP Regen\",\"SParameters\":\"\",\"SParameterFormula:func\":\"\\\"// Determine the variables used in this calculation.\\\\nlet sparamId = arguments[0];\\\\nlet base = this.traitsPi(Game_BattlerBase.TRAIT_SPARAM, sparamId);\\\\nlet plus = this.sparamPlus(sparamId);\\\\nlet paramRate = this.sparamRate(sparamId);\\\\nlet flatBonus = this.sparamFlatBonus(sparamId);\\\\n\\\\n// Formula to determine total parameter value.\\\\nlet value = (base + plus) * paramRate + flatBonus;\\\\n\\\\n// Final value\\\\nreturn value;\\\"\",\"SParamVocab\":\"\",\"SParamVocab0:str\":\"Aggro\",\"SParamVocab1:str\":\"Guard\",\"SParamVocab2:str\":\"Recovery\",\"SParamVocab3:str\":\"Item Effect\",\"SParamVocab4:str\":\"MP Cost\",\"SParamVocab5:str\":\"TP Charge\",\"SParamVocab6:str\":\"Physical DMG\",\"SParamVocab7:str\":\"Magical DMG\",\"SParamVocab8:str\":\"Floor DMG\",\"SParamVocab9:str\":\"EXP Gain\",\"Icons\":\"\",\"DrawIcons:eval\":\"true\",\"IconParam0:str\":\"84\",\"IconParam1:str\":\"165\",\"IconParam2:str\":\"76\",\"IconParam3:str\":\"81\",\"IconParam4:str\":\"101\",\"IconParam5:str\":\"133\",\"IconParam6:str\":\"140\",\"IconParam7:str\":\"87\",\"IconXParam0:str\":\"102\",\"IconXParam1:str\":\"82\",\"IconXParam2:str\":\"78\",\"IconXParam3:str\":\"82\",\"IconXParam4:str\":\"171\",\"IconXParam5:str\":\"222\",\"IconXParam6:str\":\"77\",\"IconXParam7:str\":\"72\",\"IconXParam8:str\":\"72\",\"IconXParam9:str\":\"72\",\"IconSParam0:str\":\"5\",\"IconSParam1:str\":\"128\",\"IconSParam2:str\":\"72\",\"IconSParam3:str\":\"176\",\"IconSParam4:str\":\"165\",\"IconSParam5:str\":\"164\",\"IconSParam6:str\":\"76\",\"IconSParam7:str\":\"79\",\"IconSParam8:str\":\"141\",\"IconSParam9:str\":\"73\"}","CustomParam:arraystruct":"[\"{\\\"ParamName:str\\\":\\\"Strength\\\",\\\"Abbreviation:str\\\":\\\"str\\\",\\\"Icon:num\\\":\\\"77\\\",\\\"Type:str\\\":\\\"integer\\\",\\\"ValueJS:json\\\":\\\"\\\\\\\"// Declare Constants\\\\\\\\nconst user = this;\\\\\\\\n\\\\\\\\n// Calculations\\\\\\\\nreturn (user.atk * 0.75) + (user.def * 0.25);\\\\\\\"\\\"}\",\"{\\\"ParamName:str\\\":\\\"Dexterity\\\",\\\"Abbreviation:str\\\":\\\"dex\\\",\\\"Icon:num\\\":\\\"82\\\",\\\"Type:str\\\":\\\"integer\\\",\\\"ValueJS:json\\\":\\\"\\\\\\\"// Declare Constants\\\\\\\\nconst user = this;\\\\\\\\n\\\\\\\\n// Calculations\\\\\\\\nreturn (user.agi * 0.75) + (user.atk * 0.25);\\\\\\\"\\\"}\",\"{\\\"ParamName:str\\\":\\\"Constitution\\\",\\\"Abbreviation:str\\\":\\\"con\\\",\\\"Icon:num\\\":\\\"81\\\",\\\"Type:str\\\":\\\"integer\\\",\\\"ValueJS:json\\\":\\\"\\\\\\\"// Declare Constants\\\\\\\\nconst user = this;\\\\\\\\n\\\\\\\\n// Calculations\\\\\\\\nreturn (user.def * 0.75) + (user.mdf * 0.25);\\\\\\\"\\\"}\",\"{\\\"ParamName:str\\\":\\\"Intelligence\\\",\\\"Abbreviation:str\\\":\\\"int\\\",\\\"Icon:num\\\":\\\"79\\\",\\\"Type:str\\\":\\\"integer\\\",\\\"ValueJS:json\\\":\\\"\\\\\\\"// Declare Constants\\\\\\\\nconst user = this;\\\\\\\\n\\\\\\\\n// Calculations\\\\\\\\nreturn (user.mat * 0.75) + (user.mdf * 0.25);\\\\\\\"\\\"}\",\"{\\\"ParamName:str\\\":\\\"Wisdom\\\",\\\"Abbreviation:str\\\":\\\"wis\\\",\\\"Icon:num\\\":\\\"72\\\",\\\"Type:str\\\":\\\"integer\\\",\\\"ValueJS:json\\\":\\\"\\\\\\\"// Declare Constants\\\\\\\\nconst user = this;\\\\\\\\n\\\\\\\\n// Calculations\\\\\\\\nreturn (user.mdf * 0.75) + (user.luk * 0.25);\\\\\\\"\\\"}\",\"{\\\"ParamName:str\\\":\\\"Charisma\\\",\\\"Abbreviation:str\\\":\\\"cha\\\",\\\"Icon:num\\\":\\\"84\\\",\\\"Type:str\\\":\\\"integer\\\",\\\"ValueJS:json\\\":\\\"\\\\\\\"// Declare Constants\\\\\\\\nconst user = this;\\\\\\\\n\\\\\\\\n// Calculations\\\\\\\\nreturn (user.luk * 0.75) + (user.agi * 0.25);\\\\\\\"\\\"}\"]","ScreenResolution:struct":"{\"Troops\":\"\",\"RepositionActors:eval\":\"true\",\"RepositionEnemies:eval\":\"true\",\"RepositionEnemies130:eval\":\"false\"}","ScreenShake:struct":"{\"DefaultStyle:str\":\"random\",\"originalJS:func\":\"\\\"// Calculation\\\\nthis.x += Math.round($gameScreen.shake());\\\"\",\"randomJS:func\":\"\\\"// Calculation\\\\n// Original Formula by Aries of Sheratan\\\\nconst power = $gameScreen._shakePower * 0.75;\\\\nconst speed = $gameScreen._shakeSpeed * 0.60;\\\\nconst duration = $gameScreen._shakeDuration;\\\\nthis.x += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);\\\\nthis.y += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);\\\"\",\"horzJS:func\":\"\\\"// Calculation\\\\n// Original Formula by Aries of Sheratan\\\\nconst power = $gameScreen._shakePower * 0.75;\\\\nconst speed = $gameScreen._shakeSpeed * 0.60;\\\\nconst duration = $gameScreen._shakeDuration;\\\\nthis.x += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);\\\"\",\"vertJS:func\":\"\\\"// Calculation\\\\n// Original Formula by Aries of Sheratan\\\\nconst power = $gameScreen._shakePower * 0.75;\\\\nconst speed = $gameScreen._shakeSpeed * 0.60;\\\\nconst duration = $gameScreen._shakeDuration;\\\\nthis.y += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);\\\"\"}","TitleCommandList:arraystruct":"[\"{\\\"Symbol:str\\\":\\\"newGame\\\",\\\"TextStr:str\\\":\\\"Untitled\\\",\\\"TextJS:func\\\":\\\"\\\\\\\"return TextManager.newGame;\\\\\\\"\\\",\\\"ShowJS:func\\\":\\\"\\\\\\\"return true;\\\\\\\"\\\",\\\"EnableJS:func\\\":\\\"\\\\\\\"return true;\\\\\\\"\\\",\\\"ExtJS:func\\\":\\\"\\\\\\\"return null;\\\\\\\"\\\",\\\"CallHandlerJS:func\\\":\\\"\\\\\\\"SceneManager._scene.commandNewGame();\\\\\\\"\\\"}\",\"{\\\"Symbol:str\\\":\\\"continue\\\",\\\"TextStr:str\\\":\\\"Untitled\\\",\\\"TextJS:func\\\":\\\"\\\\\\\"return TextManager.continue_;\\\\\\\"\\\",\\\"ShowJS:func\\\":\\\"\\\\\\\"return true;\\\\\\\"\\\",\\\"EnableJS:func\\\":\\\"\\\\\\\"return DataManager.isAnySavefileExists();\\\\\\\"\\\",\\\"ExtJS:func\\\":\\\"\\\\\\\"return null;\\\\\\\"\\\",\\\"CallHandlerJS:func\\\":\\\"\\\\\\\"SceneManager._scene.commandContinue();\\\\\\\"\\\"}\",\"{\\\"Symbol:str\\\":\\\"options\\\",\\\"TextStr:str\\\":\\\"Untitled\\\",\\\"TextJS:func\\\":\\\"\\\\\\\"return TextManager.options;\\\\\\\"\\\",\\\"ShowJS:func\\\":\\\"\\\\\\\"return true;\\\\\\\"\\\",\\\"EnableJS:func\\\":\\\"\\\\\\\"return true;\\\\\\\"\\\",\\\"ExtJS:func\\\":\\\"\\\\\\\"return null;\\\\\\\"\\\",\\\"CallHandlerJS:func\\\":\\\"\\\\\\\"SceneManager._scene.commandOptions();\\\\\\\"\\\"}\",\"{\\\"Symbol:str\\\":\\\"shutdown\\\",\\\"TextStr:str\\\":\\\"Untitled\\\",\\\"TextJS:func\\\":\\\"\\\\\\\"return TextManager.gameEnd;\\\\\\\"\\\",\\\"ShowJS:func\\\":\\\"\\\\\\\"return Utils.isNwjs();\\\\\\\"\\\",\\\"EnableJS:func\\\":\\\"\\\\\\\"return true;\\\\\\\"\\\",\\\"ExtJS:func\\\":\\\"\\\\\\\"return null;\\\\\\\"\\\",\\\"CallHandlerJS:func\\\":\\\"\\\\\\\"SceneManager.exit();\\\\\\\\n\\\\\\\\n// Note!\\\\\\\\n// Do NOT use this command with mobile devices or\\\\\\\\n// browser games. All it does is cause the game to\\\\\\\\n// display a blank, black canvas which the player\\\\\\\\n// is unable to do anything with. It does NOT force\\\\\\\\n// close the browser tab nor the app.\\\\\\\"\\\"}\"]","TitlePicButtons:arraystruct":"[]","UI:struct":"{\"UIArea\":\"\",\"FadeSpeed:num\":\"24\",\"BoxMargin:num\":\"4\",\"CommandWidth:num\":\"240\",\"BottomHelp:eval\":\"false\",\"RightMenus:eval\":\"true\",\"ShowButtons:eval\":\"true\",\"cancelShowButton:eval\":\"true\",\"menuShowButton:eval\":\"true\",\"pagedownShowButton:eval\":\"true\",\"numberShowButton:eval\":\"true\",\"ButtonHeight:num\":\"52\",\"BottomButtons:eval\":\"false\",\"SideButtons:eval\":\"true\",\"MenuObjects\":\"\",\"LvExpGauge:eval\":\"true\",\"ParamArrow:str\":\"→\",\"TextCodeSupport\":\"\",\"TextCodeClassNames:eval\":\"true\",\"TextCodeNicknames:eval\":\"true\"}","Window:struct":"{\"WindowDefaults\":\"\",\"EnableMasking:eval\":\"false\",\"LineHeight:num\":\"36\",\"SelectableItems\":\"\",\"ShowItemBackground:eval\":\"true\",\"ItemHeight:num\":\"8\",\"DrawItemBackgroundJS:func\":\"\\\"const rect = arguments[0];\\\\nconst c1 = ColorManager.itemBackColor1();\\\\nconst c2 = ColorManager.itemBackColor2();\\\\nconst x = rect.x;\\\\nconst y = rect.y;\\\\nconst w = rect.width;\\\\nconst h = rect.height;\\\\nthis.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true);\\\\nthis.contentsBack.strokeRect(x, y, w, h, c1);\\\"\",\"ItemPadding:num\":\"8\",\"BackOpacity:num\":\"192\",\"TranslucentOpacity:num\":\"160\",\"OpenSpeed:num\":\"32\",\"ColSpacing:num\":\"8\",\"RowSpacing:num\":\"4\"}","jsQuickFunc:arraystruct":"[\"{\\\"FunctionName:str\\\":\\\"Example\\\",\\\"CodeJS:json\\\":\\\"\\\\\\\"// Insert this as a function anywhere you can input code\\\\\\\\n// such as Script Calls or Conditional Branch Scripts.\\\\\\\\n\\\\\\\\n// Process Code\\\\\\\\nreturn 'Example';\\\\\\\"\\\"}\",\"{\\\"FunctionName:str\\\":\\\"Bad Code Name\\\",\\\"CodeJS:json\\\":\\\"\\\\\\\"// If a function name has spaces in them, the spaces will\\\\\\\\n// be removed. \\\\\\\\\\\\\\\"Bad Code Name\\\\\\\\\\\\\\\" becomes \\\\\\\\\\\\\\\"BadeCodeName\\\\\\\\\\\\\\\".\\\\\\\\n\\\\\\\\n// Process Code\\\\\\\\nOhNoItsBadCode()\\\\\\\\n\\\\\\\\n// If a function has bad code, a fail safe will catch the\\\\\\\\n// error and display it in the console.\\\\\\\"\\\"}\",\"{\\\"FunctionName:str\\\":\\\"RandomNumber\\\",\\\"CodeJS:json\\\":\\\"\\\\\\\"// This generates a random number from 0 to itself.\\\\\\\\n// Example: RandomNumber(10)\\\\\\\\n\\\\\\\\n// Process Code\\\\\\\\nconst number = (arguments[0] || 0) + 1;\\\\\\\\nreturn Math.floor(number * Math.random());\\\\\\\"\\\"}\",\"{\\\"FunctionName:str\\\":\\\"RandomBetween\\\",\\\"CodeJS:json\\\":\\\"\\\\\\\"// This generates a random number between two arguments.\\\\\\\\n// Example: RandomNumber(5, 10)\\\\\\\\n\\\\\\\\n// Process Code\\\\\\\\nlet min = Math.min(arguments[0] || 0, arguments[1] || 0);\\\\\\\\nlet max = Math.max(arguments[0] || 0, arguments[1] || 0);\\\\\\\\nreturn Math.floor(Math.random() * (max - min + 1) + min);\\\\\\\"\\\"}\",\"{\\\"FunctionName:str\\\":\\\"RandomFrom\\\",\\\"CodeJS:json\\\":\\\"\\\\\\\"// Selects a number from the list of inserted numbers.\\\\\\\\n// Example: RandomFrom(5, 10, 15, 20)\\\\\\\\n\\\\\\\\n// Process Code\\\\\\\\nreturn arguments[Math.randomInt(arguments.length)];\\\\\\\"\\\"}\"]","BreakEnd1":"----------------------------------","End Of":"Plugin Parameters","BreakEnd2":"----------------------------------"}}, +{"name":"VisuMZ_1_BattleCore","status":true,"description":"[RPG Maker MZ] [Tier 1] [Version 1.60] [BattleCore]","parameters":{"BreakHead":"----------------------------------","BattleCore":"Plugin Parameters","ATTENTION":"READ THE HELP FILE","BreakSettings":"----------------------------------","AutoBattle:struct":"{\"BattleDisplay\":\"\",\"AutoBattleMsg:str\":\"Press %1 or %2 to stop Auto Battle\",\"AutoBattleOK:str\":\"OK\",\"AutoBattleCancel:str\":\"Cancel\",\"AutoBattleBgType:num\":\"1\",\"AutoBattleRect:func\":\"\\\"const width = Graphics.width;\\\\nconst height = this.calcWindowHeight(1, false);\\\\nconst x = 0;\\\\nconst y = (Graphics.height - height) / 2;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"Options\":\"\",\"AddOption:eval\":\"true\",\"AdjustRect:eval\":\"true\",\"StartName:str\":\"Auto Battle Start\",\"StyleName:str\":\"Auto Battle Style\",\"StyleOFF:str\":\"Attack\",\"StyleON:str\":\"Skills\"}","Damage:struct":"{\"DamageStyles\":\"\",\"DefaultDamageStyle:str\":\"Standard\",\"DamageStyleList:arraystruct\":\"[\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"Standard\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Declare Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Replace Formula\\\\\\\\\\\\\\\\nlet formula = item.damage.formula;\\\\\\\\\\\\\\\\nif (SceneManager.isSceneBattle() && !this.isCertainHit()) {\\\\\\\\\\\\\\\\n const fmt = 'Math.max(this.applyArmorModifiers(b, %1), 0)';\\\\\\\\\\\\\\\\n formula = formula.replace(/b.def/g, fmt.format('b.def'));\\\\\\\\\\\\\\\\n formula = formula.replace(/b.mdf/g, fmt.format('b.mdf'));\\\\\\\\\\\\\\\\n formula = formula.replace(/b.agi/g, fmt.format('b.agi'));\\\\\\\\\\\\\\\\n formula = formula.replace(/b.luk/g, fmt.format('b.luk'));\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Calculate Damage\\\\\\\\\\\\\\\\nlet value = Math.max(eval(formula), 0);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"return this.getItemDamageAmountTextOriginal();\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"Armor Scaling\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Declare Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Replace Formula\\\\\\\\\\\\\\\\nlet formula = item.damage.formula;\\\\\\\\\\\\\\\\nif (SceneManager.isSceneBattle() && !this.isCertainHit()) {\\\\\\\\\\\\\\\\n const fmt = 'Math.max(this.applyArmorModifiers(b, %1), 1)';\\\\\\\\\\\\\\\\n formula = formula.replace(/b.def/g, fmt.format('b.def'));\\\\\\\\\\\\\\\\n formula = formula.replace(/b.mdf/g, fmt.format('b.mdf'));\\\\\\\\\\\\\\\\n formula = formula.replace(/b.agi/g, fmt.format('b.agi'));\\\\\\\\\\\\\\\\n formula = formula.replace(/b.luk/g, fmt.format('b.luk'));\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Calculate Damage\\\\\\\\\\\\\\\\nlet value = Math.max(eval(formula), 0);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Apply Defender's Defense Parameter\\\\\\\\\\\\\\\\nif (this.isDamage() && !this.isCertainHit()) {\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n // Calculate Base Armor\\\\\\\\\\\\\\\\n let armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\n armor = this.applyArmorModifiers(target, armor);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n // Apply Armor to Damage\\\\\\\\\\\\\\\\n if (armor >= 0) {\\\\\\\\\\\\\\\\n value *= 100 / (100 + armor);\\\\\\\\\\\\\\\\n } else {\\\\\\\\\\\\\\\\n value *= 2 - (100 / (100 - armor));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"return this.getItemDamageAmountTextOriginal();\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"CT\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Multiplier\\\\\\\\\\\\\\\\nconst multiplier = Math.max(eval(item.damage.formula), 0);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Declare Values\\\\\\\\\\\\\\\\nlet value = 0;\\\\\\\\\\\\\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\\\\\\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\narmor = Math.max(this.applyArmorModifiers(target, armor), 0);\\\\\\\\\\\\\\\\nlet attackStat = 0;\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n attackStat = a.atk;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n attackStat = a.mat;\\\\\\\\\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\\\\\\\\\n attackStat = a.def;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\\\\\\\\\n attackStat = a.mdf;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Calculate Damage\\\\\\\\\\\\\\\\nattackStat = (attackStat * 1.75) + (level ** 2 / 45.5);\\\\\\\\\\\\\\\\nvalue = attackStat * 4;\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n value *= Math.max(256 - armor, 0) / 256;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n value *= Math.max(102.4 - armor, 0) / 128;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\nvalue *= multiplier;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst item = this._item;\\\\\\\\\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\\\\\\\\\nconst a = this._tempActorA;\\\\\\\\\\\\\\\\nconst b = this._tempActorB;\\\\\\\\\\\\\\\\nconst user = a;\\\\\\\\\\\\\\\\nconst target = b;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\ntry {\\\\\\\\\\\\\\\\n const value = Math.max(eval(formula), 0);\\\\\\\\\\\\\\\\n return '%1%'.format(Math.round(value * 100));\\\\\\\\\\\\\\\\n} catch (e) {\\\\\\\\\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n return '?????';\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"D4\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Multiplier\\\\\\\\\\\\\\\\nconst multiplier = Math.max(eval(item.damage.formula), 0);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Declare Values\\\\\\\\\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\narmor = this.applyArmorModifiers(target, armor);\\\\\\\\\\\\\\\\nlet stat = 0;\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n stat = a.atk;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n stat = a.mat;\\\\\\\\\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\\\\\\\\\n stat = a.def;\\\\\\\\\\\\\\\\n armor = 0;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\\\\\\\\\n stat = a.mdf;\\\\\\\\\\\\\\\\n armor = 0;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Calculate Damage \\\\\\\\\\\\\\\\nlet value = 1.5 * Math.max(2 * stat * multiplier - armor, 1) * multiplier / 5;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst item = this._item;\\\\\\\\\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\\\\\\\\\nconst a = this._tempActorA;\\\\\\\\\\\\\\\\nconst b = this._tempActorB;\\\\\\\\\\\\\\\\nconst user = a;\\\\\\\\\\\\\\\\nconst target = b;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\ntry {\\\\\\\\\\\\\\\\n const value = Math.max(eval(formula), 0);\\\\\\\\\\\\\\\\n return '%1%'.format(Math.round(value * 100));\\\\\\\\\\\\\\\\n} catch (e) {\\\\\\\\\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n return '?????';\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"DQ\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Multiplier\\\\\\\\\\\\\\\\nlet multiplier = Math.max(eval(item.damage.formula), 0);\\\\\\\\\\\\\\\\nif (this.isCertainHit()) {\\\\\\\\\\\\\\\\n let value = multiplier * Math.max(a.atk, a.mat);\\\\\\\\\\\\\\\\n return (isNaN(value) ? 0 : value) * sign;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Get Primary Stats\\\\\\\\\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\narmor = this.applyArmorModifiers(b, armor);\\\\\\\\\\\\\\\\nlet stat = 1;\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n stat = a.atk;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n stat = a.mat;\\\\\\\\\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\\\\\\\\\n stat = a.def;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\\\\\\\\\n stat = a.mdf;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Check for Recovery\\\\\\\\\\\\\\\\nif (this.isRecover()) {\\\\\\\\\\\\\\\\n let value = stat * multiplier * sign;\\\\\\\\\\\\\\\\n return isNaN(value) ? 0 : value;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Calculate Damage\\\\\\\\\\\\\\\\nlet value = 0;\\\\\\\\\\\\\\\\nif (stat < ((2 + armor) / 2)) {\\\\\\\\\\\\\\\\n // Plink Damage\\\\\\\\\\\\\\\\n let baseline = Math.max(stat - ((12 * (armor - stat + 1)) / stat), 5);\\\\\\\\\\\\\\\\n value = baseline / 3;\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n // Normal Damage\\\\\\\\\\\\\\\\n let baseline = Math.max(stat - (armor / 2), 1);\\\\\\\\\\\\\\\\n value = baseline / 2;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\nvalue *= multiplier;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn isNaN(value) ? 0 : value;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst item = this._item;\\\\\\\\\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\\\\\\\\\nconst a = this._tempActorA;\\\\\\\\\\\\\\\\nconst b = this._tempActorB;\\\\\\\\\\\\\\\\nconst user = a;\\\\\\\\\\\\\\\\nconst target = b;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\ntry {\\\\\\\\\\\\\\\\n const value = Math.max(eval(formula), 0);\\\\\\\\\\\\\\\\n return '%1%'.format(Math.round(value * 100));\\\\\\\\\\\\\\\\n} catch (e) {\\\\\\\\\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n return '?????';\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"FF7\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Power\\\\\\\\\\\\\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Declare base Damage\\\\\\\\\\\\\\\\nlet baseDamage = 0;\\\\\\\\\\\\\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n baseDamage = a.atk + ((a.atk + level) / 32) * ((a.atk * level) / 32);\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n baseDamage = 6 * (a.mat + level);\\\\\\\\\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\\\\\\\\\n baseDamage = 6 * (a.def + level);\\\\\\\\\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\\\\\\\\\n baseDamage = 6 * (a.mdf + level);\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Calculate Final Damage\\\\\\\\\\\\\\\\nlet value = baseDamage;\\\\\\\\\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\narmor = this.applyArmorModifiers(target, armor);\\\\\\\\\\\\\\\\nif (this.isRecover()) {\\\\\\\\\\\\\\\\n value += 22 * power;\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n value = (power * Math.max(512 - armor, 1) * baseDamage) / (16 * 512);\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Power\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Power\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Power\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Power\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Power\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Power\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst item = this._item;\\\\\\\\\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\\\\\\\\\nconst a = this._tempActorA;\\\\\\\\\\\\\\\\nconst b = this._tempActorB;\\\\\\\\\\\\\\\\nconst user = a;\\\\\\\\\\\\\\\\nconst target = b;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\ntry {\\\\\\\\\\\\\\\\n return formula;\\\\\\\\\\\\\\\\n} catch (e) {\\\\\\\\\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n return '?????';\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"FF8\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Power\\\\\\\\\\\\\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Declare Damage\\\\\\\\\\\\\\\\nlet Value = 0;\\\\\\\\\\\\\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\\\\\\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\narmor = this.applyArmorModifiers(target, armor);\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n value = a.atk ** 2 / 16 + a.atk;\\\\\\\\\\\\\\\\n value *= Math.max(265 - armor, 1) / 256;\\\\\\\\\\\\\\\\n value *= power / 16;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n value = a.mat + power;\\\\\\\\\\\\\\\\n value *= Math.max(265 - armor, 1) / 4;\\\\\\\\\\\\\\\\n value *= power / 256;\\\\\\\\\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\\\\\\\\\n value = (power + a.def) * power / 2;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\\\\\\\\\n value = (power + a.mdf) * power / 2;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Power\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Power\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Power\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Power\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Power\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Power\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst item = this._item;\\\\\\\\\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\\\\\\\\\nconst a = this._tempActorA;\\\\\\\\\\\\\\\\nconst b = this._tempActorB;\\\\\\\\\\\\\\\\nconst user = a;\\\\\\\\\\\\\\\\nconst target = b;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\ntry {\\\\\\\\\\\\\\\\n return formula;\\\\\\\\\\\\\\\\n} catch (e) {\\\\\\\\\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n return '?????';\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"FF9\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Damage Constant\\\\\\\\\\\\\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\\\\\\\\\\\\\nif (this.isCertainHit()) {\\\\\\\\\\\\\\\\n return (isNaN(power) ? 0 : power) * sign;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Declare Main Stats\\\\\\\\\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\narmor = this.applyArmorModifiers(b, armor);\\\\\\\\\\\\\\\\nlet stat = 1;\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n stat = a.atk;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n stat = a.mat;\\\\\\\\\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\\\\\\\\\n stat = a.def;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\\\\\\\\\n stat = a.mdf;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Declare Base Damage\\\\\\\\\\\\\\\\nlet baseDamage = power;\\\\\\\\\\\\\\\\nif (this.isPhysical()) {\\\\\\\\\\\\\\\\n baseDamage += stat;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\nif (this.isDamage() || this.isDrain()) {\\\\\\\\\\\\\\\\n baseDamage -= armor;\\\\\\\\\\\\\\\\n baseDamage = Math.max(1, baseDamage);\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Declare Bonus Damage\\\\\\\\\\\\\\\\nlet bonusDamage = stat + (((a.level || a.luk) + stat) / 8);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Declare Final Damage\\\\\\\\\\\\\\\\nlet value = baseDamage * bonusDamage * sign;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn isNaN(value) ? 0 : value;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Power\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Power\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Power\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Power\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Power\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Power\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst item = this._item;\\\\\\\\\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\\\\\\\\\nconst a = this._tempActorA;\\\\\\\\\\\\\\\\nconst b = this._tempActorB;\\\\\\\\\\\\\\\\nconst user = a;\\\\\\\\\\\\\\\\nconst target = b;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\ntry {\\\\\\\\\\\\\\\\n return formula;\\\\\\\\\\\\\\\\n} catch (e) {\\\\\\\\\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n return '?????';\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"FF10\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Damage Constant\\\\\\\\\\\\\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\\\\\\\\\\\\\nif (this.isCertainHit()) {\\\\\\\\\\\\\\\\n return (isNaN(power) ? 0 : power) * sign;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Damage Offense Value\\\\\\\\\\\\\\\\nlet value = power;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n value = (((a.atk ** 3) / 32) + 32) * power / 16;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n value = power * ((a.mat ** 2 / 6) + power) / 4;\\\\\\\\\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\\\\\\\\\n value = power * ((a.def + power) / 2);\\\\\\\\\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\\\\\\\\\n value = power * ((a.mdf + power) / 2);\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Apply Damage Defense Value\\\\\\\\\\\\\\\\nif (this.isDamage() || this.isDrain()) {\\\\\\\\\\\\\\\\n let armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\n armor = this.applyArmorModifiers(b, armor);\\\\\\\\\\\\\\\\n armor = Math.max(armor, 1);\\\\\\\\\\\\\\\\n value *= ((((armor - 280.4) ** 2) / 110) / 16) / 730;\\\\\\\\\\\\\\\\n value *= (730 - (armor * 51 - (armor ** 2) / 11) / 10) / 730;\\\\\\\\\\\\\\\\n} else if (this.isRecover()) {\\\\\\\\\\\\\\\\n value *= -1;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn isNaN(value) ? 0 : value;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Power\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Power\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Power\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Power\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Power\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Power\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst item = this._item;\\\\\\\\\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\\\\\\\\\nconst a = this._tempActorA;\\\\\\\\\\\\\\\\nconst b = this._tempActorB;\\\\\\\\\\\\\\\\nconst user = a;\\\\\\\\\\\\\\\\nconst target = b;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\ntry {\\\\\\\\\\\\\\\\n return formula;\\\\\\\\\\\\\\\\n} catch (e) {\\\\\\\\\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n return '?????';\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"MK\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Multiplier\\\\\\\\\\\\\\\\nconst multiplier = Math.max(eval(item.damage.formula), 0);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Declare Values\\\\\\\\\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\narmor = this.applyArmorModifiers(target, armor);\\\\\\\\\\\\\\\\nconst denominator = Math.max(200 + armor, 1);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Calculate Damage \\\\\\\\\\\\\\\\nlet value = 0;\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n value = 200 * a.atk / denominator;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n value = 200 * a.mat / denominator;\\\\\\\\\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\\\\\\\\\n value = 200 * a.def / 200;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\\\\\\\\\n value = 200 * a.mdf / 200;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\nvalue *= multiplier;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst item = this._item;\\\\\\\\\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\\\\\\\\\nconst a = this._tempActorA;\\\\\\\\\\\\\\\\nconst b = this._tempActorB;\\\\\\\\\\\\\\\\nconst user = a;\\\\\\\\\\\\\\\\nconst target = b;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\ntry {\\\\\\\\\\\\\\\\n const value = Math.max(eval(formula), 0);\\\\\\\\\\\\\\\\n return '%1%'.format(Math.round(value * 100));\\\\\\\\\\\\\\\\n} catch (e) {\\\\\\\\\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n return '?????';\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"MOBA\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Damage Value\\\\\\\\\\\\\\\\nlet value = Math.max(eval(item.damage.formula), 0) * sign;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Apply Attacker's Offense Parameter\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n value *= a.atk;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n value *= a.mat;\\\\\\\\\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\\\\\\\\\n value *= a.def;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\\\\\\\\\n value *= a.mdf;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Apply Defender's Defense Parameter\\\\\\\\\\\\\\\\nif (this.isDamage() && !this.isCertainHit()) {\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n // Calculate Base Armor\\\\\\\\\\\\\\\\n let armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\n armor = this.applyArmorModifiers(target, armor);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n // Apply Armor to Damage\\\\\\\\\\\\\\\\n if (armor >= 0) {\\\\\\\\\\\\\\\\n value *= 100 / (100 + armor);\\\\\\\\\\\\\\\\n } else {\\\\\\\\\\\\\\\\n value *= 2 - (100 / (100 - armor));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn isNaN(value) ? 0 : value;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Multiplier\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Multiplier\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Multiplier\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst item = this._item;\\\\\\\\\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\\\\\\\\\nconst a = this._tempActorA;\\\\\\\\\\\\\\\\nconst b = this._tempActorB;\\\\\\\\\\\\\\\\nconst user = a;\\\\\\\\\\\\\\\\nconst target = b;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\ntry {\\\\\\\\\\\\\\\\n const value = Math.max(eval(formula), 0);\\\\\\\\\\\\\\\\n return '%1%'.format(Math.round(value * 100));\\\\\\\\\\\\\\\\n} catch (e) {\\\\\\\\\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n return '?????';\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name:str\\\\\\\":\\\\\\\"PKMN\\\\\\\",\\\\\\\"Formula:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst user = this.subject();\\\\\\\\\\\\\\\\nconst target = arguments[0];\\\\\\\\\\\\\\\\nconst item = this.item();\\\\\\\\\\\\\\\\nconst a = this.subject();\\\\\\\\\\\\\\\\nconst b = target;\\\\\\\\\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Create Power\\\\\\\\\\\\\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Declare Values\\\\\\\\\\\\\\\\nlet value = 0;\\\\\\\\\\\\\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\\\\\\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\\\\\\\\\narmor = Math.max(this.applyArmorModifiers(target, armor), 0);\\\\\\\\\\\\\\\\nlet attackStat = 0;\\\\\\\\\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n attackStat = a.atk;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\\\\\\\\\n attackStat = a.mat;\\\\\\\\\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\\\\\\\\\n attackStat = a.def;\\\\\\\\\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\\\\\\\\\n attackStat = a.mdf;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Calculate Damage\\\\\\\\\\\\\\\\nvalue = (((((2 * level) / 5) + 2) * power * (attackStat / armor)) / 50) + 2;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ItemsEquipsCore\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"DamageType1:str\\\\\\\":\\\\\\\"%1 Damage Power\\\\\\\",\\\\\\\"DamageType2:str\\\\\\\":\\\\\\\"%1 Damage Power\\\\\\\",\\\\\\\"DamageType3:str\\\\\\\":\\\\\\\"%1 Recovery Power\\\\\\\",\\\\\\\"DamageType4:str\\\\\\\":\\\\\\\"%1 Recovery Power\\\\\\\",\\\\\\\"DamageType5:str\\\\\\\":\\\\\\\"%1 Drain Power\\\\\\\",\\\\\\\"DamageType6:str\\\\\\\":\\\\\\\"%1 Drain Power\\\\\\\",\\\\\\\"DamageDisplay:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Define Constants\\\\\\\\\\\\\\\\nconst item = this._item;\\\\\\\\\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\\\\\\\\\nconst a = this._tempActorA;\\\\\\\\\\\\\\\\nconst b = this._tempActorB;\\\\\\\\\\\\\\\\nconst user = a;\\\\\\\\\\\\\\\\nconst target = b;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n// Return Value\\\\\\\\\\\\\\\\ntry {\\\\\\\\\\\\\\\\n return formula;\\\\\\\\\\\\\\\\n} catch (e) {\\\\\\\\\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\\\\\\\\\n }\\\\\\\\\\\\\\\\n return '?????';\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\"]\",\"Cap\":\"\",\"EnableDamageCap:eval\":\"false\",\"DefaultHardCap:num\":\"9999\",\"EnableSoftCap:eval\":\"false\",\"DefaultSoftCap:num\":\"0.80\",\"DefaultSoftScaler:num\":\"0.1275\",\"Popups\":\"\",\"PopupDuration:num\":\"128\",\"NewPopupBottom:eval\":\"true\",\"PopupPosition:str\":\"base\",\"PopupOffsetX:num\":\"0\",\"PopupOffsetY:num\":\"0\",\"PopupShiftX:num\":\"8\",\"PopupShiftY:num\":\"-28\",\"hpDamageFmt:str\":\"-%1\",\"hpHealingFmt:str\":\"+%1\",\"mpDamageFmt:str\":\"-%1 %2\",\"mpHealingFmt:str\":\"+%1 %2\",\"CriticalColor:eval\":\"[255, 0, 0, 160]\",\"CriticalDuration:num\":\"128\",\"Formulas\":\"\",\"OverallFormulaJS:func\":\"\\\"// Declare Constants\\\\nconst target = arguments[0];\\\\nconst critical = arguments[1];\\\\nconst item = this.item();\\\\n\\\\n// Get Base Damage\\\\nconst baseValue = this.evalDamageFormula(target);\\\\n\\\\n// Calculate Element Modifiers\\\\nlet value = baseValue * this.calcElementRate(target);\\\\n\\\\n// Calculate Physical and Magical Modifiers\\\\nif (this.isPhysical()) {\\\\n value *= target.pdr;\\\\n}\\\\nif (this.isMagical()) {\\\\n value *= target.mdr;\\\\n}\\\\n\\\\n// Apply Healing Modifiers\\\\nif (baseValue < 0) {\\\\n value *= target.rec;\\\\n}\\\\n\\\\n// Apply Critical Modifiers\\\\nif (critical) {\\\\n value = this.applyCritical(value);\\\\n}\\\\n\\\\n// Apply Variance and Guard Modifiers\\\\nvalue = this.applyVariance(value, item.damage.variance);\\\\nvalue = this.applyGuard(value, target);\\\\n\\\\n// Finalize Damage\\\\nvalue = Math.round(value);\\\\nreturn value;\\\"\",\"VarianceFormulaJS:func\":\"\\\"// Declare Constants\\\\nconst damage = arguments[0];\\\\nconst variance = arguments[1];\\\\n\\\\n// Calculate Variance\\\\nconst amp = Math.floor(Math.max((Math.abs(damage) * variance) / 100, 0));\\\\nconst v = Math.randomInt(amp + 1) + Math.randomInt(amp + 1) - amp;\\\\n\\\\n// Return Damage\\\\nreturn damage >= 0 ? damage + v : damage - v;\\\"\",\"GuardFormulaJS:func\":\"\\\"// Declare Constants\\\\nconst damage = arguments[0];\\\\nconst target = arguments[1];\\\\n\\\\n// Return Damage Early\\\\nconst note = this.item().note;\\\\nif (note.match(//i)) return damage;\\\\nif (!target.isGuard()) return damage;\\\\nif (damage < 0) return damage;\\\\n\\\\n// Declare Guard Rate\\\\nlet guardRate = 0.5;\\\\nguardRate /= target.grd;\\\\n\\\\n// Return Damage\\\\nreturn damage * guardRate;\\\"\",\"Critical\":\"\",\"CriticalHitRateJS:func\":\"\\\"// Declare Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\n\\\\n// Create Base Critical Rate\\\\nlet rate = this.subject().cri * (1 - target.cev);\\\\n\\\\n// Apply Notetags\\\\nconst note = this.item().note;\\\\nif (note.match(//i)) {\\\\n return 1;\\\\n}\\\\nif (note.match(//i)) {\\\\n return Number(RegExp.$1) / 100;\\\\n}\\\\nif (note.match(//i)) {\\\\n rate *= Number(RegExp.$1) / 100;\\\\n}\\\\nif (note.match(//i)) {\\\\n rate += Number(RegExp.$1) / 100;\\\\n}\\\\nif (note.match(/\\\\\\\\s*([\\\\\\\\s\\\\\\\\S]*)\\\\\\\\s*<\\\\\\\\/JS CRITICAL RATE>/i)) {\\\\n const code = String(RegExp.$1);\\\\n try {\\\\n eval(code);\\\\n } catch (e) {\\\\n if ($gameTemp.isPlaytest()) console.log(e);\\\\n }\\\\n}\\\\n\\\\n// Apply LUK Buffs/Debuffs\\\\nconst lukStack = this.subject().buff(7);\\\\nrate *= 2 ** lukStack;\\\\n\\\\n// Return Rate\\\\nreturn rate;\\\"\",\"CriticalHitMultiplier:func\":\"\\\"// Declare Constants\\\\nconst user = this.subject();\\\\nlet damage = arguments[0];\\\\nlet multiplier = 2.0;\\\\nlet bonusDamage = this.subject().luk * this.subject().cri;\\\\nif (this.isHpRecover() || this.isMpRecover()) {\\\\n bonusDamage *= -1;\\\\n}\\\\n\\\\n// Apply Notetags\\\\nconst note = this.item().note;\\\\nif (note.match(//i)) {\\\\n multiplier = Number(RegExp.$1) / 100;\\\\n}\\\\nif (note.match(//i)) {\\\\n multiplier += Number(RegExp.$1) / 100;\\\\n}\\\\nif (note.match(//i)) {\\\\n bonusDamage *= Number(RegExp.$1) / 100;\\\\n}\\\\nif (note.match(//i)) {\\\\n bonusDamage += bonusDamage * (RegExp.$1) / 100;\\\\n}\\\\nif (note.match(/\\\\\\\\s*([\\\\\\\\s\\\\\\\\S]*)\\\\\\\\s*<\\\\\\\\/JS CRITICAL DAMAGE>/i)) {\\\\n const code = String(RegExp.$1);\\\\n try {\\\\n eval(code);\\\\n } catch (e) {\\\\n if ($gameTemp.isPlaytest()) console.log(e);\\\\n }\\\\n}\\\\n\\\\n// Return Damage\\\\nreturn damage * multiplier + bonusDamage;\\\"\"}","Mechanics:struct":"{\"ActionSpeed\":\"\",\"AllowRandomSpeed:eval\":\"false\",\"CalcActionSpeedJS:func\":\"\\\"// Declare Constants\\\\nconst agi = this.subject().agi;\\\\n\\\\n// Create Speed\\\\nlet speed = agi;\\\\nif (this.allowRandomSpeed()) {\\\\n speed += Math.randomInt(Math.floor(5 + agi / 4));\\\\n}\\\\nif (this.item()) {\\\\n speed += this.item().speed;\\\\n}\\\\nif (this.isAttack()) {\\\\n speed += this.subject().attackSpeed();\\\\n}\\\\n\\\\n// Return Speed\\\\nreturn speed;\\\"\",\"BaseTroop\":\"\",\"BaseTroopIDs:arraynum\":\"[\\\"1\\\"]\",\"CommonEvents\":\"\",\"BattleStartEvent:num\":\"0\",\"BattleEndEvent:num\":\"0\",\"VictoryEvent:num\":\"0\",\"DefeatEvent:num\":\"0\",\"EscapeSuccessEvent:num\":\"0\",\"EscapeFailEvent:num\":\"0\",\"Escape\":\"\",\"CalcEscapeRatioJS:func\":\"\\\"// Calculate Escape Ratio\\\\nlet ratio = 0.5;\\\\nratio *= $gameParty.agility();\\\\nratio /= $gameTroop.agility();\\\\n\\\\n// Return Ratio\\\\nreturn ratio;\\\"\",\"CalcEscapeRaiseJS:func\":\"\\\"// Calculate Escape Ratio\\\\nlet value = 0.1;\\\\nvalue += $gameParty.aliveMembers().length;\\\\n\\\\n// Return Value\\\\nreturn value;\\\"\",\"BattleJS\":\"\",\"PreStartBattleJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PostStartBattleJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"BattleVictoryJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"EscapeSuccessJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"EscapeFailureJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"BattleDefeatJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PreEndBattleJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PostEndBattleJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"TurnJS\":\"\",\"PreStartTurnJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PostStartTurnJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PreEndTurnJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PostEndTurnJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PreRegenerateJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PostRegenerateJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"ActionJS\":\"\",\"PreStartActionJS:func\":\"\\\"// Declare Constants\\\\nconst value = arguments[0];\\\\nconst user = this.subject();\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\nconst action = this;\\\\nconst item = this.item();\\\\nconst skill = this.item();\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PostStartActionJS:func\":\"\\\"// Declare Constants\\\\nconst value = arguments[0];\\\\nconst user = this.subject();\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\nconst action = this;\\\\nconst item = this.item();\\\\nconst skill = this.item();\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PreApplyJS:func\":\"\\\"// Declare Constants\\\\nconst value = arguments[0];\\\\nconst target = arguments[1];\\\\nconst user = this.subject();\\\\nconst a = user;\\\\nconst b = target;\\\\nconst action = this;\\\\nconst item = this.item();\\\\nconst skill = this.item();\\\\n\\\\n// Perform Actions\\\\n\\\\n// Return Value\\\\nreturn value;\\\"\",\"PreDamageJS:func\":\"\\\"// Declare Constants\\\\nconst value = arguments[0];\\\\nconst target = arguments[1];\\\\nconst user = this.subject();\\\\nconst a = user;\\\\nconst b = target;\\\\nconst action = this;\\\\nconst item = this.item();\\\\nconst skill = this.item();\\\\n\\\\n// Perform Actions\\\\n\\\\n// Return Value\\\\nreturn value;\\\"\",\"PostDamageJS:func\":\"\\\"// Declare Constants\\\\nconst value = arguments[0];\\\\nconst target = arguments[1];\\\\nconst user = this.subject();\\\\nconst a = user;\\\\nconst b = target;\\\\nconst action = this;\\\\nconst item = this.item();\\\\nconst skill = this.item();\\\\n\\\\n// Perform Actions\\\\n\\\\n// Return Value\\\\nreturn value;\\\"\",\"PostApplyJS:func\":\"\\\"// Declare Constants\\\\nconst value = arguments[0];\\\\nconst target = arguments[1];\\\\nconst user = this.subject();\\\\nconst a = user;\\\\nconst b = target;\\\\nconst action = this;\\\\nconst item = this.item();\\\\nconst skill = this.item();\\\\n\\\\n// Perform Actions\\\\n\\\\n// Return Value\\\\nreturn value;\\\"\",\"PreEndActionJS:func\":\"\\\"// Declare Constants\\\\nconst value = arguments[0];\\\\nconst user = this.subject();\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\nconst action = this;\\\\nconst item = this.item();\\\\nconst skill = this.item();\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"PostEndActionJS:func\":\"\\\"// Declare Constants\\\\nconst value = arguments[0];\\\\nconst user = this.subject();\\\\nconst target = user;\\\\nconst a = user;\\\\nconst b = user;\\\\nconst action = this;\\\\nconst item = this.item();\\\\nconst skill = this.item();\\\\n\\\\n// Perform Actions\\\\n\\\"\"}","CmdWindows":"----------------------------------","BattleLayout:struct":"{\"Style:str\":\"default\",\"ListStyle\":\"\",\"ShowFacesListStyle:eval\":\"true\",\"CommandWidth:num\":\"192\",\"XPStyle\":\"\",\"XPActorCommandLines:num\":\"4\",\"XPActorDefaultHeight:num\":\"64\",\"XPSpriteYLocation:str\":\"name\",\"PotraitStyle\":\"\",\"ShowPortraits:eval\":\"true\",\"PortraitScale:num\":\"0.5\",\"BorderStyle\":\"\",\"SkillItemBorderCols:num\":\"1\",\"ShowPortraitsBorderStyle:eval\":\"true\",\"PortraitScaleBorderStyle:num\":\"1.25\",\"SkillItemWindows\":\"\",\"SkillItemMiddleLayout:eval\":\"false\",\"SkillItemStandardCols:num\":\"2\",\"StatusWindow\":\"\",\"StatusWindowName\":\"\",\"NameOffsetX:num\":\"+0\",\"NameOffsetY:num\":\"+0\",\"StatusWindowHpGauge\":\"\",\"HpGaugeOffsetX:num\":\"+0\",\"HpGaugeOffsetY:num\":\"+0\",\"StatusWindowMpGauge\":\"\",\"MpGaugeOffsetX:num\":\"+0\",\"MpGaugeOffsetY:num\":\"+0\",\"StatusWindowTpGauge\":\"\",\"TpGaugeOffsetX:num\":\"+0\",\"TpGaugeOffsetY:num\":\"+0\",\"StatusWindowStateIcon\":\"\",\"StateIconOffsetX:num\":\"+0\",\"StateIconOffsetY:num\":\"+0\",\"StatusWindowTpbGauge\":\"\",\"TpbGaugeOffsetX:num\":\"+0\",\"TpbGaugeOffsetY:num\":\"+0\",\"StatusWindowSkin\":\"\",\"StatusWindowSkinFilename:str\":\"\",\"StatusWindowSkinHide:eval\":\"false\",\"StatusWindowSelectBack\":\"\",\"StatusWindowSelectableBackHide:eval\":\"false\",\"StatusWindowAttachments\":\"\",\"StatusWindowBackAttachment\":\"\",\"StatusWindowAttachmentBack:str\":\"\",\"StatusWindowAttachmentBackOffsetX:num\":\"+0\",\"StatusWindowAttachmentBackOffsetY:num\":\"+0\",\"StatusWindowFrontAttachment\":\"\",\"StatusWindowAttachmentFront:str\":\"\",\"StatusWindowAttachmentFrontOffsetX:num\":\"+0\",\"StatusWindowAttachmentFrontOffsetY:num\":\"+0\",\"UiElements\":\"\",\"AntiTintUiElements:eval\":\"true\"}","BattleLog:struct":"{\"General\":\"\",\"BackColor:str\":\"#000000\",\"MaxLines:num\":\"10\",\"MessageWait:num\":\"16\",\"TextAlign:str\":\"center\",\"BattleLogRectJS:func\":\"\\\"const wx = 0;\\\\nconst wy = 0;\\\\nconst ww = Graphics.boxWidth;\\\\nconst wh = this.calcWindowHeight(10, false);\\\\nreturn new Rectangle(wx, wy, ww, wh);\\\"\",\"StartTurn\":\"\",\"StartTurnShow:eval\":\"true\",\"StartTurnMsg:str\":\"Turn %1\",\"StartTurnWait:num\":\"40\",\"DisplayAction\":\"\",\"ActionCenteredName:eval\":\"false\",\"ActionSkillMsg1:eval\":\"true\",\"ActionSkillMsg2:eval\":\"false\",\"ActionItemMsg:eval\":\"false\",\"ActionChanges\":\"\",\"ShowCounter:eval\":\"true\",\"ShowReflect:eval\":\"true\",\"ShowSubstitute:eval\":\"true\",\"ActionResults\":\"\",\"ShowFailure:eval\":\"false\",\"ShowCritical:eval\":\"false\",\"ShowMissEvasion:eval\":\"false\",\"ShowHpDmg:eval\":\"false\",\"ShowMpDmg:eval\":\"false\",\"ShowTpDmg:eval\":\"false\",\"DisplayStates\":\"\",\"ShowAddedState:eval\":\"false\",\"ShowRemovedState:eval\":\"false\",\"ShowCurrentState:eval\":\"false\",\"ShowAddedBuff:eval\":\"false\",\"ShowAddedDebuff:eval\":\"false\",\"ShowRemovedBuff:eval\":\"false\"}","Battleback:struct":"{\"DefaultStyle:str\":\"MZ\",\"jsOneForOne:func\":\"\\\"// Adjust Size\\\\nthis.width = Graphics.width;\\\\nthis.height = Graphics.height;\\\\n\\\\n// Adjust Scale\\\\nconst scale = 1.0;\\\\nthis.scale.x = scale;\\\\nthis.scale.y = scale;\\\\n\\\\n// Adjust Coordinates\\\\nthis.x = 0;\\\\nthis.y = 0;\\\"\",\"jsScaleToFit:func\":\"\\\"// Adjust Size\\\\nthis.width = Graphics.width;\\\\nthis.height = Graphics.height;\\\\n\\\\n// Adjust Scale\\\\nconst ratioX = this.width / this.bitmap.width;\\\\nconst ratioY = this.height / this.bitmap.height;\\\\nconst scale = Math.max(ratioX, ratioY);\\\\nthis.scale.x = scale;\\\\nthis.scale.y = scale;\\\\n\\\\n// Adjust Coordinates\\\\nthis.x = (Graphics.width - this.width) / 2;\\\\nthis.y = Graphics.height - this.height;\\\"\",\"jsScaleDown:func\":\"\\\"// Adjust Size\\\\nthis.width = Graphics.width;\\\\nthis.height = Graphics.height;\\\\n\\\\n// Adjust Scale\\\\nconst ratioX = Math.min(1, this.width / this.bitmap.width);\\\\nconst ratioY = Math.min(1, this.height / this.bitmap.height);\\\\nconst scale = Math.max(ratioX, ratioY);\\\\nthis.scale.x = scale;\\\\nthis.scale.y = scale;\\\\n\\\\n// Adjust Coordinates\\\\nthis.x = (Graphics.width - this.width) / 2;\\\\nthis.y = Graphics.height - this.height;\\\"\",\"jsScale Up:func\":\"\\\"// Adjust Size\\\\nthis.width = Graphics.width;\\\\nthis.height = Graphics.height;\\\\n\\\\n// Adjust Scale\\\\nconst ratioX = Math.max(1, this.width / this.bitmap.width);\\\\nconst ratioY = Math.max(1, this.height / this.bitmap.height);\\\\nconst scale = Math.max(ratioX, ratioY);\\\\nthis.scale.x = scale;\\\\nthis.scale.y = scale;\\\\n\\\\n// Adjust Coordinates\\\\nthis.x = (Graphics.width - this.width) / 2;\\\\nthis.y = Graphics.height - this.height;\\\"\"}","PartyCmd:struct":"{\"Cmd\":\"\",\"CmdStyle:str\":\"auto\",\"CmdTextAlign:str\":\"left\",\"CmdIconFight:num\":\"76\",\"CommandAddAutoBattle:eval\":\"true\",\"CmdIconAutoBattle:num\":\"78\",\"CmdTextAutoBattle:str\":\"Auto\",\"CommandAddOptions:eval\":\"true\",\"CmdIconOptions:num\":\"83\",\"ActiveTpbOptionsMessage:str\":\"Options Menu queued after action is complete.\",\"CmdIconEscape:num\":\"82\",\"Access\":\"\",\"SkipPartyCmd:eval\":\"true\",\"DisablePartyCmd:eval\":\"false\",\"HelpWindow\":\"\",\"HelpFight:str\":\"Select actions to fight.\",\"HelpAutoBattle:str\":\"Sets party to Auto Battle mode.\",\"HelpOptions:str\":\"Opens up the Options Menu.\",\"HelpEscape:str\":\"Attempt to escape the battle.\"}","ActorCmd:struct":"{\"Cmd\":\"\",\"CmdStyle:str\":\"auto\",\"CmdTextAlign:str\":\"left\",\"CmdIconItem:num\":\"176\",\"IconStypeNorm:num\":\"78\",\"IconStypeMagic:num\":\"79\",\"BattleCmd\":\"\",\"BattleCmdList:arraystr\":\"[\\\"attack\\\",\\\"skills\\\",\\\"guard\\\",\\\"item\\\",\\\"escape\\\"]\",\"HelpWindow\":\"\",\"HelpSkillType:str\":\"Opens up a list of skills under the \\\\C[16]%1\\\\C[0] category.\",\"HelpItem:str\":\"Opens up a list of items that you can use.\",\"HelpEscape:str\":\"Attempt to escape the battle.\",\"HelpAutoBattle:str\":\"Automatically choose an action suitable for combat.\"}","VisualBreak":"----------------------------------","Actor:struct":"{\"Flinch\":\"\",\"FlinchDistanceX:num\":\"12\",\"FlinchDistanceY:num\":\"0\",\"FlinchDuration:num\":\"6\",\"SvBattlers\":\"\",\"AnchorX:num\":\"0.5\",\"AnchorY:num\":\"1.0\",\"ChantStyle:eval\":\"true\",\"OffsetX:num\":\"0\",\"OffsetY:num\":\"0\",\"MotionSpeed:num\":\"12\",\"PrioritySortActive:eval\":\"true\",\"PrioritySortActors:eval\":\"false\",\"Shadow:eval\":\"true\",\"SmoothImage:eval\":\"true\",\"HomePosJS:func\":\"\\\"// Declare Constants\\\\nconst sprite = this;\\\\nconst actor = this._actor;\\\\nconst index = arguments[0];\\\\n\\\\n// Make Calculations\\\\nlet x = Math.round((Graphics.width / 2) + 192)\\\\nx -= Math.floor((Graphics.width - Graphics.boxWidth) / 2);\\\\nx += index * 32;\\\\nlet y = (Graphics.height - 200) - ($gameParty.maxBattleMembers() * 48);\\\\ny -= Math.floor((Graphics.height - Graphics.boxHeight) / 2);\\\\ny += index * 48;\\\\n\\\\n// Home Position Offsets\\\\nconst offsetNote = //i;\\\\nconst xOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$1) : 0));\\\\nconst yOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$2) : 0));\\\\nx = xOffsets.reduce((r, offset) => r + offset, x);\\\\ny = yOffsets.reduce((r, offset) => r + offset, y);\\\\n\\\\n// Set Home Position\\\\nthis.setHome(x, y);\\\"\"}","Enemy:struct":"{\"Visual\":\"\",\"AttackAnimation:num\":\"1\",\"EmergeText:eval\":\"false\",\"OffsetX:num\":\"0\",\"OffsetY:num\":\"0\",\"SmoothImage:eval\":\"true\",\"SelectWindow\":\"\",\"FrontViewSelect:eval\":\"false\",\"SideviewSelect:eval\":\"true\",\"NameFontSize:num\":\"22\",\"SvBattlers\":\"\",\"AllowCollapse:eval\":\"false\",\"AnchorX:num\":\"0.5\",\"AnchorY:num\":\"1.0\",\"MotionIdle:str\":\"walk\",\"Shadow:eval\":\"true\",\"Width:num\":\"64\",\"Height:num\":\"64\",\"WtypeId:num\":\"0\"}","HpGauge:struct":"{\"Display\":\"\",\"ShowActorGauge:eval\":\"false\",\"ShowEnemyGauge:eval\":\"true\",\"RequiresDefeat:eval\":\"false\",\"BTestBypass:eval\":\"true\",\"Settings\":\"\",\"AnchorX:num\":\"0.5\",\"AnchorY:num\":\"1.0\",\"Scale:num\":\"0.5\",\"OffsetX:num\":\"0\",\"OffsetY:num\":\"-3\",\"Options\":\"\",\"AddHpGaugeOption:eval\":\"true\",\"AdjustRect:eval\":\"true\",\"Name:str\":\"Show HP Gauge\"}","ActionSequence:struct":"{\"AutoSequences\":\"\",\"AutoMeleeSolo:eval\":\"true\",\"AutoMeleeAoE:eval\":\"true\",\"QoL\":\"\",\"AutoNotetag:eval\":\"false\",\"CastAnimations\":\"\",\"CastCertain:num\":\"0\",\"CastPhysical:num\":\"0\",\"CastMagical:num\":\"0\",\"CounterReflection\":\"\",\"CounterPlayback:eval\":\"true\",\"ReflectAnimation:num\":\"53\",\"ReflectPlayback:eval\":\"true\",\"Stepping\":\"\",\"MeleeDistance:num\":\"24\",\"StepDistanceX:num\":\"48\",\"StepDistanceY:num\":\"0\",\"StepDuration:num\":\"12\"}","BreakEnd1":"----------------------------------","End Of":"Plugin Parameters","BreakEnd2":"----------------------------------"}}, +{"name":"VisuMZ_2_BattleSystemSTB","status":true,"description":"[RPG Maker MZ] [Tier 2] [Version 1.14] [BattleSystemSTB]","parameters":{"BreakHead":"----------------------------------","BattleSystemSTB":"Plugin Parameters","ATTENTION":"READ THE HELP FILE","BreakSettings":"----------------------------------","Speed:struct":"{\"Speed\":\"\",\"InitialSpeedJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst agi = user.agi;\\\\n\\\\n// Create Base Speed\\\\nlet speed = agi;\\\\n\\\\n// Random Speed Check\\\\nif (user.allowRandomSpeed()) {\\\\n speed += Math.randomInt(Math.floor(5 + agi / 4));\\\\n}\\\\n\\\\n// Add Saved Speed Modifiers from Previous Round\\\\nspeed += user.getSTBNextTurnSpeed();\\\\n\\\\n// Return Speed\\\\nreturn speed;\\\"\",\"NextTurnSavedSpeedJS:func\":\"\\\"// Create Speed\\\\nconst action = this;\\\\nlet speed = 0;\\\\n\\\\n// Check Object\\\\nif (action.item()) {\\\\n speed += action.item().speed;\\\\n}\\\\n\\\\n// Check Attack\\\\nif (action.isAttack()) {\\\\n speed += action.subject().attackSpeed();\\\\n}\\\\n\\\\n// Return Speed\\\\nreturn speed;\\\"\"}","Exploit:struct":"{\"EnableExploit:eval\":\"false\",\"ExploitCritical:eval\":\"true\",\"ExploitEleWeakness:eval\":\"true\",\"ExploitEleRate:num\":\"1.05\",\"TurnResetExploits:eval\":\"true\"}","Exploited:struct":"{\"Mechanics\":\"\",\"AddedStates:arraynum\":\"[\\\"13\\\"]\",\"FullExploitEvents\":\"\",\"vsActorsFullExploit:num\":\"0\",\"vsEnemiesFullExploit:num\":\"0\",\"UnlimitedExploits:eval\":\"false\",\"CustomJS:func\":\"\\\"// Declare Constants\\\\nconst target = this;\\\\nconst user = arguments[0];\\\\nconst action = arguments[1];\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"Animation\":\"\",\"AnimationID:num\":\"0\",\"Mirror:eval\":\"false\",\"Mute:eval\":\"false\",\"Popups\":\"\",\"PopupText:str\":\"\",\"TextColor:str\":\"0\",\"FlashColor:eval\":\"[255, 255, 255, 160]\",\"FlashDuration:num\":\"60\"}","Exploiter:struct":"{\"Mechanics\":\"\",\"AddedStates:arraynum\":\"[]\",\"ExtraActions:num\":\"1\",\"MultipleExploits:eval\":\"false\",\"CustomJS:func\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\nconst target = arguments[0];\\\\nconst action = arguments[1];\\\\n\\\\n// Perform Actions\\\\n\\\"\",\"Animation\":\"\",\"AnimationID:num\":\"12\",\"Mirror:eval\":\"false\",\"Mute:eval\":\"false\",\"Popups\":\"\",\"PopupText:str\":\"ONE MORE!\",\"TextColor:str\":\"0\",\"FlashColor:eval\":\"[255, 255, 128, 160]\",\"FlashDuration:num\":\"60\"}","TurnOrder:struct":"{\"General\":\"\",\"DisplayPosition:str\":\"top\",\"DisplayOffsetX:num\":\"0\",\"DisplayOffsetY:num\":\"0\",\"CenterHorz:eval\":\"true\",\"RepositionTopForHelp:eval\":\"true\",\"RepositionLogWindow:eval\":\"true\",\"OrderDirection:eval\":\"true\",\"SubjectDistance:num\":\"8\",\"ScreenBuffer:num\":\"20\",\"Reposition\":\"\",\"RepositionTopHelpX:num\":\"0\",\"RepositionTopHelpY:num\":\"96\",\"Slots\":\"\",\"MaxHorzSprites:num\":\"16\",\"MaxVertSprites:num\":\"10\",\"SpriteLength:num\":\"72\",\"SpriteThin:num\":\"72\",\"UpdateFrames:num\":\"24\",\"Border\":\"\",\"ShowMarkerBorder:eval\":\"true\",\"BorderActor\":\"\",\"ActorBorderColor:str\":\"4\",\"ActorSystemBorder:str\":\"\",\"BorderEnemy\":\"\",\"EnemyBorderColor:str\":\"2\",\"EnemySystemBorder:str\":\"\",\"BorderThickness:num\":\"2\",\"Sprite\":\"\",\"ActorSprite\":\"\",\"ActorBattlerType:str\":\"face\",\"ActorBattlerIcon:num\":\"84\",\"EnemySprite\":\"\",\"EnemyBattlerType:str\":\"enemy\",\"EnemyBattlerFaceName:str\":\"Monster\",\"EnemyBattlerFaceIndex:num\":\"1\",\"EnemyBattlerIcon:num\":\"298\",\"EnemyBattlerMatchHue:eval\":\"true\",\"Letter\":\"\",\"EnemyBattlerDrawLetter:eval\":\"true\",\"EnemyBattlerFontFace:str\":\"\",\"EnemyBattlerFontSize:num\":\"16\",\"Background\":\"\",\"ShowMarkerBg:eval\":\"true\",\"BackgroundActor\":\"\",\"ActorBgColor1:str\":\"19\",\"ActorBgColor2:str\":\"9\",\"ActorSystemBg:str\":\"\",\"BackgroundEnemy\":\"\",\"EnemyBgColor1:str\":\"19\",\"EnemyBgColor2:str\":\"18\",\"EnemySystemBg:str\":\"\"}","BreakEnd1":"----------------------------------","End Of":"Plugin Parameters","BreakEnd2":"----------------------------------"}}, +{"name":"VisuMZ_2_QuestSystem","status":true,"description":"[RPG Maker MZ] [Tier 2] [Version 1.13] [QuestSystem]","parameters":{"BreakHead":"----------------------------------","QuestSystem":"Plugin Parameters","ATTENTION":"READ THE HELP FILE","BreakSettings":"----------------------------------","General:struct":"{\"StartingQuests\":\"\",\"KnownQuests:arraystr\":\"[]\",\"CompletedQuests:arraystr\":\"[]\",\"FailedQuests:arraystr\":\"[]\",\"TrackedQuest:str\":\"\",\"SceneQuest\":\"\",\"Vocab\":\"\",\"VocabCommandWindow\":\"\",\"CommandWindow_Known_Text:str\":\"Available\",\"CommandWindow_Completed_Text:str\":\"Completed\",\"CommandWindow_Failed_Text:str\":\"Failed\",\"VocabLabelWindow\":\"\",\"EmptyTitleLabel:str\":\"\\\\i[186]Quest Journal\",\"VocabListWindow\":\"\",\"ListWindowCategoryOpenFmt:str\":\"- %1(%2)\",\"ListWindowCategoryCloseFmt:str\":\"+ %1(%2)\",\"NoQuestListed:str\":\"(No Quests Listed)\",\"ListWindowTrackedQuest:str\":\"\\\\c[17]%1\\\\c[0]\",\"VocabLogWindow\":\"\",\"LogEmpty:json\":\"\\\"\\\\\\\\c[5]Main Quests\\\\\\\\c[0] are quests that must be\\\\ncompleted in order to progress further\\\\ninto the game's story.\\\\n\\\\n\\\\\\\\c[6]Side Quests\\\\\\\\c[0] are optional quests that can\\\\nbe completed at your discretion. Upon\\\\ncompleting a side quest, you can receive\\\\nuseful rewards that may assist you on\\\\nyour journey.\\\"\",\"OnLoadQuestJS:func\":\"\\\"// Insert JavaScript code here.\\\"\",\"LogFmt:json\":\"\\\"\\\\\\\\{[[Title]]\\\\\\\\}\\\\n\\\\\\\\c[4]Level:\\\\\\\\c[0] [[Difficulty]]\\\\n\\\\\\\\c[4]From:\\\\\\\\c[0] [[From]]\\\\n\\\\\\\\c[4]Location:\\\\\\\\c[0] [[Location]]\\\\n\\\\n\\\\\\\\c[4]Description:\\\\\\\\c[0]\\\\n[[Description]]\\\\n\\\\n\\\\\\\\c[4]Objectives:\\\\\\\\c[0]\\\\n[[Objectives]]\\\\n\\\\n\\\\\\\\c[4]Rewards:\\\\\\\\c[0]\\\\n[[Rewards]]\\\\n\\\\n[[Subtext]]\\\\n\\\\n[[Quote]]\\\"\",\"Objective_Normal_Fmt:str\":\"◎%1\",\"Objective_Completed_Fmt:str\":\"\\\\c[24]✔%1\\\\c[0]\",\"Objective_Failed_Fmt:str\":\"\\\\c[25]✘%1\\\\c[0]\",\"Reward_Normal_Fmt:str\":\"◎%1\",\"Reward_Completed_Fmt:str\":\"\\\\c[24]✔%1\\\\c[0]\",\"Reward_Failed_Fmt:str\":\"\\\\c[25]✘%1\\\\c[0]\",\"ButtonAssistWindow\":\"\",\"ButtonAssistPageUpDown:str\":\"Scroll Up/Down\",\"questButtonAssistActive:str\":\"Track\",\"ButtonAssistExpand:str\":\"Expand\",\"ButtonAssistCollapse:str\":\"Collapse\",\"CommandWindowIcons\":\"\",\"CommandWindow_Known_Icon:num\":\"193\",\"CommandWindow_Completed_Icon:num\":\"192\",\"CommandWindow_Failed_Icon:num\":\"194\"}","Categories:arraystruct":"[\"{\\\"CategoryName:str\\\":\\\"\\\\\\\\C[5]Naomi's Adventure\\\",\\\"Quests:arraystruct\\\":\\\"[\\\\\\\"{\\\\\\\\\\\\\\\"Key:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"see-ruu\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Header\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Title:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[87]See Ruu\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Difficulty:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Easy Peasy\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"From:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Location:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Ruu's house\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Description:arrayjson\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"The \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[27]Everyone Bell\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] has been rung. I need\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nto go make sure that Ruu is okay.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Lists\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Objectives:arrayjson\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Visit Ruu at her house.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"VisibleObjectives:arraynum\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Rewards:arrayjson\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"VisibleRewards:arraynum\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Footer\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Subtext:arrayjson\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"[]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Quotes:arrayjson\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"[]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"JavaScript\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"OnLoadQuestJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Key:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"get-soap\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Header\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Title:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[87]Get Ruu's Soap!\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Difficulty:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Lemon Squeezy\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"From:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Goblin Ruu\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Location:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Spidersilk Cave\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Description:arrayjson\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"For reasons far beyond my understanding, Ruu lost her\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nsoap which means she turned in to an actual goblin. I've\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ngot to get her soap back.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Lists\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Objectives:arrayjson\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Key:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Socials\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Header\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Title:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Check out our socials!\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Difficulty:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Easy Peasy\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"From:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"nhcarrigan\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Location:str\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"The end!\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Description:arrayjson\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Thanks for completing our game! Please take some time to\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncheck out our social media and let us know what you\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthought of the game!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Lists\\\\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\\\\\\\":\\\\\\\\\\\\\\\"[]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Quotes:arrayjson\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"[]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"JavaScript\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"OnLoadQuestJS:func\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\"]\\\"}\"]","Tracker:struct":"{\"General\":\"\",\"TrackerFmt:json\":\"\\\"\\\\\\\\{[[Title]]\\\\\\\\}\\\\n[[Objectives]]\\\"\",\"Options\":\"\",\"AdjustRect:eval\":\"true\",\"AddShowOption:eval\":\"true\",\"ShowName:str\":\"Show Quest Tracker\",\"AddPositionOption:eval\":\"true\",\"PositionName:str\":\"Quest Tracker Position\",\"PositionOff:str\":\"←\",\"PositionOn:str\":\"→\"}","MainMenu:struct":"{\"Name:str\":\"Quest\",\"ShowMainMenu:eval\":\"true\",\"EnableMainMenu:eval\":\"true\"}","BgSettings:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Window:struct":"{\"CommandWindow\":\"\",\"ShowFailed:eval\":\"true\",\"CmdStyle:str\":\"auto\",\"CmdTextAlign:str\":\"center\",\"CommandWindow_BgType:num\":\"0\",\"CommandWindow_Rect:func\":\"\\\"const ww = this.mainCommandWidth();\\\\nconst wh = this.calcWindowHeight(Window_QuestCommand.prototype.totalCommands(), true);\\\\nconst wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0;\\\\nconst wy = this.mainAreaTop();\\\\nreturn new Rectangle(wx, wy, ww, wh);\\\"\",\"QuestLabel\":\"\",\"QuestLabel_BgType:num\":\"0\",\"QuestLabel_Rect:func\":\"\\\"const ww = Graphics.boxWidth - this.mainCommandWidth();\\\\nconst wh = this.calcWindowHeight(1, false);\\\\nconst wx = this.isRightInputMode() ? 0 : Graphics.boxWidth - ww;\\\\nconst wy = this.mainAreaTop();\\\\nreturn new Rectangle(wx, wy, ww, wh);\\\"\",\"LogWindow\":\"\",\"LogWindow_Auto_WordWrap:eval\":\"false\",\"LogWindow_ScrollSpeed:num\":\"0.20\",\"LogWindow_BgType:num\":\"0\",\"LogWindow_Rect:func\":\"\\\"const ww = Graphics.boxWidth - this.mainCommandWidth();\\\\nconst wh = this.mainAreaHeight() - this.questLabelWindowRect().height;\\\\nconst wx = this.isRightInputMode() ? 0 : Graphics.boxWidth - ww;\\\\nconst wy = this.mainAreaTop() + this.questLabelWindowRect().height;\\\\nreturn new Rectangle(wx, wy, ww, wh);\\\"\",\"ListWindow\":\"\",\"ListWindow_BgType:num\":\"0\",\"ListWindow_Rect:func\":\"\\\"const ww = this.mainCommandWidth();\\\\nconst wh = this.mainAreaHeight() - this.commandWindowRect().height;\\\\nconst wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0;\\\\nconst wy = this.mainAreaTop() + this.commandWindowRect().height;\\\\nreturn new Rectangle(wx, wy, ww, wh);\\\"\",\"TrackerWindow\":\"\",\"TrackerWindow_Scale:num\":\"0.50\",\"TrackerWindow_BgType:num\":\"0\",\"TrackerWindow_Rect:func\":\"\\\"const ww = 560;\\\\nconst wh = Graphics.height / Window_QuestTracker.scale;\\\\nconst wx = this.questTrackerOnRight() ? Graphics.width - Math.ceil(ww * Window_QuestTracker.scale) : 0;\\\\nconst wy = this.buttonAreaHeight() + 8;\\\\nreturn new Rectangle(wx, wy, ww, wh);\\\"\"}","BreakEnd1":"----------------------------------","End Of":"Plugin Parameters","BreakEnd2":"----------------------------------"}}, +{"name":"BBS_VersionDisplay","status":true,"description":"v1.02 Adds display of the game version to the title screen.\r\nSpecial Thanks to Tsukihime for all the help.\r\nSpecial Thanks to 'Ramza' Michael Sweeney for all the support.\r\n\r\n============================================================================\r\nParameters\r\n============================================================================","parameters":{"Game Version Number":"1.0.0","Game Version Font":"","Version Font Size":"20","Show Version Number?":"true","Version Text Color":"white","Version Outline Color":"black","Version Outline Width":"8","Title Italic":"false","Version Text Max Width":"Graphics.width / 3"}} +]; diff --git a/js/plugins/AltMenuScreen.js b/js/plugins/AltMenuScreen.js new file mode 100644 index 0000000..a984a26 --- /dev/null +++ b/js/plugins/AltMenuScreen.js @@ -0,0 +1,105 @@ +//============================================================================= +// RPG Maker MZ - Alternative Menu Screen +//============================================================================= + +/*: + * @target MZ + * @plugindesc Alternative menu screen layout. + * @author Yoji Ojima + * + * @help AltMenuScreen.js + * + * This plugin changes the layout of the menu screen. + * It puts the commands on the top and the status on the bottom. + * + * It does not provide plugin commands. + */ + +/*:ja + * @target MZ + * @plugindesc メニュー画面のレイアウトを変更します。 + * @author Yoji Ojima + * + * @help AltMenuScreen.js + * + * このプラグインは、メニュー画面のレイアウトを変更します。 + * コマンドを上側に、ステータスを下側に配置します。 + * + * プラグインコマンドはありません。 + */ + +(() => { + Scene_MenuBase.prototype.commandWindowHeight = function() { + return this.calcWindowHeight(2, true); + }; + + Scene_MenuBase.prototype.goldWindowHeight = function() { + return this.calcWindowHeight(1, true); + }; + + Scene_Menu.prototype.commandWindowRect = function() { + const ww = Graphics.boxWidth; + const wh = this.commandWindowHeight(); + const wx = 0; + const wy = this.mainAreaTop(); + return new Rectangle(wx, wy, ww, wh); + }; + + Scene_Menu.prototype.statusWindowRect = function() { + const h1 = this.commandWindowHeight(); + const h2 = this.goldWindowHeight(); + const ww = Graphics.boxWidth; + const wh = this.mainAreaHeight() - h1 - h2; + const wx = 0; + const wy = this.mainAreaTop() + this.commandWindowHeight(); + return new Rectangle(wx, wy, ww, wh); + }; + + Scene_ItemBase.prototype.actorWindowRect = function() { + const rect = Scene_Menu.prototype.statusWindowRect(); + rect.y = this.mainAreaBottom() - rect.height; + return rect; + }; + + Window_MenuCommand.prototype.maxCols = function() { + return 4; + }; + + Window_MenuCommand.prototype.numVisibleRows = function() { + return 2; + }; + + Window_MenuStatus.prototype.maxCols = function() { + return 4; + }; + + Window_MenuStatus.prototype.numVisibleRows = function() { + return 1; + }; + + Window_MenuStatus.prototype.drawItemImage = function(index) { + const actor = this.actor(index); + const rect = this.itemRectWithPadding(index); + const w = Math.min(rect.width, 144); + const h = Math.min(rect.height, 144); + const lineHeight = this.lineHeight(); + this.changePaintOpacity(actor.isBattleMember()); + this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2, w, h); + this.changePaintOpacity(true); + }; + + Window_MenuStatus.prototype.drawItemStatus = function(index) { + const actor = this.actor(index); + const rect = this.itemRectWithPadding(index); + const x = rect.x; + const y = rect.y; + const width = rect.width; + const bottom = y + rect.height; + const lineHeight = this.lineHeight(); + this.drawActorName(actor, x, y + lineHeight * 0, width); + this.drawActorLevel(actor, x, y + lineHeight * 1, width); + this.drawActorClass(actor, x, bottom - lineHeight * 4, width); + this.placeBasicGauges(actor, x, bottom - lineHeight * 3, width); + this.drawActorIcons(actor, x, bottom - lineHeight * 1, width); + }; +})(); diff --git a/js/plugins/AltSaveScreen.js b/js/plugins/AltSaveScreen.js new file mode 100644 index 0000000..86b8bb1 --- /dev/null +++ b/js/plugins/AltSaveScreen.js @@ -0,0 +1,126 @@ +//============================================================================= +// RPG Maker MZ - Alternative Save Screen +//============================================================================= + +/*: + * @target MZ + * @plugindesc Alternative save/load screen layout. + * @author Yoji Ojima + * + * @help AltSaveScreen.js + * + * This plugin changes the layout of the save/load screen. + * It puts the file list on the top and the details on the bottom. + * + * It does not provide plugin commands. + */ + +/*:ja + * @target MZ + * @plugindesc セーブ/ロード画面のレイアウトを変更します。 + * @author Yoji Ojima + * + * @help AltSaveScreen.js + * + * このプラグインは、セーブ/ロード画面のレイアウトを変更します。 + * ファイル一覧を上側に、詳細を下側に配置します。 + * + * プラグインコマンドはありません。 + */ + +(() => { + const _Scene_File_create = Scene_File.prototype.create; + Scene_File.prototype.create = function() { + _Scene_File_create.apply(this, arguments); + this._listWindow.height = this._listWindow.fittingHeight(3); + const x = 0; + const y = this._listWindow.y + this._listWindow.height; + const width = Graphics.boxWidth; + const height = Graphics.boxHeight - y; + const rect = new Rectangle(x, y, width, height); + const statusWindow = new Window_SavefileStatus(rect); + this._listWindow.mzkp_statusWindow = statusWindow; + this.addWindow(statusWindow); + }; + + const _Scene_File_start = Scene_File.prototype.start; + Scene_File.prototype.start = function() { + _Scene_File_start.apply(this, arguments); + this._listWindow.ensureCursorVisible(); + this._listWindow.callUpdateHelp(); + }; + + Window_SavefileList.prototype.windowWidth = function() { + return Graphics.boxWidth; + }; + + Window_SavefileList.prototype.maxCols = function() { + return 4; + }; + + Window_SavefileList.prototype.itemHeight = function() { + return this.lineHeight() * 2 + 16; + }; + + const _Window_SavefileList_callUpdateHelp = + Window_SavefileList.prototype.callUpdateHelp; + Window_SavefileList.prototype.callUpdateHelp = function() { + _Window_SavefileList_callUpdateHelp.apply(this, arguments); + if (this.active && this.mzkp_statusWindow) { + this.mzkp_statusWindow.setSavefileId(this.savefileId()); + } + }; + + function Window_SavefileStatus() { + this.initialize.apply(this, arguments); + } + + Window_SavefileStatus.prototype = Object.create(Window_Base.prototype); + Window_SavefileStatus.prototype.constructor = Window_SavefileStatus; + + Window_SavefileStatus.prototype.initialize = function(rect) { + Window_Base.prototype.initialize.call(this, rect); + this._savefileId = 1; + }; + + Window_SavefileStatus.prototype.setSavefileId = function(id) { + this._savefileId = id; + this.refresh(); + }; + + Window_SavefileStatus.prototype.refresh = function() { + const info = DataManager.savefileInfo(this._savefileId); + const rect = this.contents.rect; + this.contents.clear(); + this.resetTextColor(); + this.drawTitle(this._savefileId, rect.x, rect.y); + if (info) { + this.drawContents(info, rect); + } + }; + + Window_SavefileStatus.prototype.drawTitle = function(savefileId, x, y) { + if (savefileId === 0) { + this.drawText(TextManager.autosave, x, y, 180); + } else { + this.drawText(TextManager.file + " " + savefileId, x, y, 180); + } + }; + + Window_SavefileStatus.prototype.drawContents = function(info, rect) { + const bottom = rect.y + rect.height; + const playtimeY = bottom - this.lineHeight(); + this.drawText(info.title, rect.x + 192, rect.y, rect.width - 192); + this.drawPartyfaces(info.faces, rect.x, bottom - 144); + this.drawText(info.playtime, rect.x, playtimeY, rect.width, "right"); + }; + + Window_SavefileStatus.prototype.drawPartyfaces = function(faces, x, y) { + if (faces) { + for (let i = 0; i < faces.length; i++) { + const data = faces[i]; + this.drawFace(data[0], data[1], x + i * 150, y); + } + } + }; +})(); diff --git a/js/plugins/BBS_VersionDisplay.js b/js/plugins/BBS_VersionDisplay.js new file mode 100644 index 0000000..7d2db47 --- /dev/null +++ b/js/plugins/BBS_VersionDisplay.js @@ -0,0 +1,209 @@ +//============================================================================= +// Bluebooth Plugins - Version Display +// BBS_VersionDisplay.js +//============================================================================= + +//============================================================================= +/*: + * @title Version Display + * @author Michael Morris (https://www.*******.com/bluebooth) + * @date May 29, 2017 + * @filename BBS_VersionDisplay.js + * If you enjoy my work, consider supporting me on *******! + * + * https://www.*******.com/bluebooth + * + * @plugindesc v1.02 Adds display of the game version to the title screen. + * Special Thanks to Tsukihime for all the help. + * Special Thanks to 'Ramza' Michael Sweeney for all the support. + * + * ============================================================================ + * Parameters + * ============================================================================ + * + * @param Game Version Number + * @desc Game Version. Recommend using format [MILESTONE].[MAJOR].[MINOR] + * Default: 1.0.0 + * @default 1.0.0 + * + * @param Game Version Font + * @desc Font face for the version number. Leave blank to use standard. See help. + * @default + * + * @param Version Font Size + * @desc Font size for the version number in the details window. + * Default: 20 + * @default 20 + * + * @param Show Version Number? + * @desc true to show version number, false to hide. Useful if you want to store version + * number without showing it. + * Default: true + * @default true + * + * @param Version Text Color + * @desc Version font color. Use system color name. + * Leave blank to use standard color. + * @default white + * + * @param Version Outline Color + * @desc Version text outline color. Use system color name. + * Leave blank to use standard. + * @default black + * + * @param Version Outline Width + * @desc Version text outline width. Use system color number, or leave blank + * blank to use standard. + * @default 8 + * + * @param Title Italic + * @desc Version font in Italics? YES: true NO: false + * Default: false + * @default false + * + * @param Version Text Max Width + * @desc Max width for the game version number label. Can contain formulae! + * Default Graphics.width / 3 + * @default Graphics.width / 3 + * + * ============================================================================ + * Terms of Use + * ============================================================================ + * - Free for use in non-commercial projects and commercial products with credits + * + * @help + * ============================================================================ + * Description + * ============================================================================ + * + * Adds the display of a customized version number to the Title Scene. Exposes + * a variable to get version number at any time in play. + * + * Use script: $gameSystem.getVersion(); + * + * ============================================================================ + * Change Log + * ============================================================================ + * 1.02 - Fixed display bug pointed out by Michael 'Ramza' Sweeney when using + * different resolutions. + * 1.01 - Plugin finished. + * + */ +//============================================================================= + +//============================================================================= +var Imported = Imported || {}; +var BBS = BBS || {}; +Imported.VersionDisplay = 1; +BBS.VersionDisplay = BBS.VersionDisplay || {}; + +(function () { + //============================================================================= + // Parameter Variables + //============================================================================= + var parameters = PluginManager.parameters("BBS_VersionDisplay"); + var pVersionNumber = String(parameters["Game Version Number"] || "1.0.0"); + var pVersionFont = String(parameters["Game Version Font"] || "").trim(); + var pFontSize = Number(parameters["Version Font Size"] || 20); + var pShowVersionNumber = eval( + String(parameters["Show Version Number?"] || "true") + ); + + var pVersionTextColor = String(parameters["Version Text Color"] || "white"); + var pVersionOutlineColor = String( + parameters["Version Outline Color"] || "black" + ); + var pVersionOutlineWidth = Number(parameters["Version Outline Width"] || 8); + var pVersionItalic = eval(String(parameters["Title Italic"] || "false")); + var pVersionWidth = String( + parameters["Version Text Max Width"] || "Graphics.width / 3" + ); + + var _version = pVersionNumber; // Track the current version of the game. + var _saveVersion = pVersionNumber; // Track the version of the game last saved. This can be different from current game version. + var _defaultVersion = "version 1.0.0"; // Value to use when no _version is found. + + //============================================================================= + // Game_System + //============================================================================= + Game_System.prototype.getVersion = function () { + return _version; + }; + + Game_System.prototype.getSaveVersion = function () { + return _saveVersion; + }; + + //============================================================================= + // Scene_Title + //============================================================================= + var BBS_VD_Scene_Title_createForeground = + Scene_Title.prototype.createForeground; + Scene_Title.prototype.createForeground = function () { + BBS_VD_Scene_Title_createForeground.call(this); + if (pShowVersionNumber) { + this.drawGameVersion(); + } + }; + + Scene_Title.prototype.drawGameVersion = function () { + var x = Graphics.width - Graphics.width / 3 - 18; + var y = Graphics.height - 50; + var maxWidth = eval(pVersionWidth); //Graphics.width / 3; + + // Handle customization options. + this._gameTitleSprite.bitmap.fontSize = pFontSize; + this._gameTitleSprite.bitmap.fontItalic = pVersionItalic; + + if (pVersionFont !== "") { + this._gameTitleSprite.bitmap.fontFace = pVersionFont; + } + if (pVersionTextColor !== "") { + this._gameTitleSprite.bitmap.textColor = pVersionTextColor; + } + if (pVersionOutlineColor !== "") { + this._gameTitleSprite.bitmap.outlineColor = pVersionOutlineColor; + } + if (pVersionOutlineWidth !== "") { + this._gameTitleSprite.bitmap.outlineWidth = pVersionOutlineWidth; + } + + // And finally... draw + this._gameTitleSprite.bitmap.drawText( + pVersionNumber, + x, + y, + maxWidth, + 48, + "right" + ); + }; + + //============================================================================= + // ConfigManager + //============================================================================= + var bbs_vd_Configmanager_makeData = ConfigManager.makeData; + ConfigManager.makeData = function () { + var config = bbs_vd_Configmanager_makeData.call(this); + config.saveVersion = _saveVersion; + return config; + }; + + var bbs_vd_Configmanager_applyData = ConfigManager.applyData; + ConfigManager.applyData = function (config) { + bbs_vd_Configmanager_applyData.call(this, config); + _saveVersion = this.readSaveVersion(config, "saveVersion"); + }; + + ConfigManager.readSaveVersion = function (config, name) { + var value = config[name]; + if (value !== undefined) { + return value; + } else { + return _defaultVersion; + } + }; +})(BBS.VersionDisplay); +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/ButtonPicture.js b/js/plugins/ButtonPicture.js new file mode 100644 index 0000000..05f74d6 --- /dev/null +++ b/js/plugins/ButtonPicture.js @@ -0,0 +1,106 @@ +//============================================================================= +// RPG Maker MZ - Button Picture +//============================================================================= + +/*: + * @target MZ + * @plugindesc Makes a picture clickable. + * @author Yoji Ojima + * + * @help ButtonPicture.js + * + * This plugin provides a command to call a common event when a picture is + * clicked. + * + * Use it in the following procedure. + * 1. Execute "Show Picture" to display your button image. + * 2. Call the plugin command "Set Button Picture". + * + * @command set + * @text Set Button Picture + * @desc Makes the specified picture clickable. + * + * @arg pictureId + * @type number + * @min 1 + * @max 100 + * @default 1 + * @text Picture Number + * @desc Control number of the picture. + * + * @arg commonEventId + * @type common_event + * @default 1 + * @text Common Event + * @desc Common event to call when the picture is clicked. + */ + +/*:ja + * @target MZ + * @plugindesc ピクチャをクリック可能にします。 + * @author Yoji Ojima + * + * @help ButtonPicture.js + * + * このプラグインは、ピクチャのクリック時にコモンイベントを呼び出すコマンドを + * 提供します。 + * + * 次の手順で使用してください。 + * 1. 「ピクチャの表示」を実行して、ボタン画像を表示します。 + * 2. プラグインコマンド「ボタンピクチャの設定」を呼び出します。 + * + * @command set + * @text ボタンピクチャの設定 + * @desc 指定したピクチャをクリック可能にします。 + * + * @arg pictureId + * @type number + * @min 1 + * @max 100 + * @default 1 + * @text ピクチャ番号 + * @desc ピクチャの管理番号です。 + * + * @arg commonEventId + * @type common_event + * @default 1 + * @text コモンイベント + * @desc ピクチャがクリックされた時に呼び出すコモンイベントです。 + */ + +(() => { + const pluginName = "ButtonPicture"; + + PluginManager.registerCommand(pluginName, "set", args => { + const pictureId = Number(args.pictureId); + const commonEventId = Number(args.commonEventId); + const picture = $gameScreen.picture(pictureId); + if (picture) { + picture.mzkp_commonEventId = commonEventId; + } + }); + + Sprite_Picture.prototype.isClickEnabled = function() { + const picture = this.picture(); + return picture && picture.mzkp_commonEventId && !$gameMessage.isBusy(); + }; + + Sprite_Picture.prototype.onClick = function() { + $gameTemp.reserveCommonEvent(this.picture().mzkp_commonEventId); + }; + + Spriteset_Base.prototype.mzkp_isAnyPicturePressed = function() { + return this._pictureContainer.children.some(sprite => + sprite.isPressed() + ); + }; + + const _Scene_Map_isAnyButtonPressed = + Scene_Map.prototype.isAnyButtonPressed; + Scene_Map.prototype.isAnyButtonPressed = function() { + return ( + _Scene_Map_isAnyButtonPressed.apply(this, arguments) || + this._spriteset.mzkp_isAnyPicturePressed() + ); + }; +})(); diff --git a/js/plugins/HealOnLevelUp.js b/js/plugins/HealOnLevelUp.js new file mode 100644 index 0000000..1b3b4da --- /dev/null +++ b/js/plugins/HealOnLevelUp.js @@ -0,0 +1,57 @@ +//============================================================================= +// Heal on Level Up +// by Shaz +// Last Update: 2015.10.25 +//============================================================================= + +/*: + * @plugindesc Allows you to heal actors on level up + * @author Shaz + * + * @param All HP + * @desc Heal HP for all party members (Y/N) + * @default Y + * + * @param All MP + * @desc Heal MP for all party members (Y/N) + * @default Y + * + * @param All States + * @desc Remove states for all party members (Y/N) + * @default Y + * + * @help This plugin does not provide plugin commands + * + * If you only want to set SOME actors to have the above properties, add + * the following tags to the actor notebox: + * + * + * + */ + +(function() { + + var parameters = PluginManager.parameters('HealOnLevelUp'); + var healHP = (parameters['All HP'].toUpperCase() || '') === 'Y'; + var healMP = (parameters['All MP'].toUpperCase() || '') === 'Y'; + var healStates = (parameters['All States'].toUpperCase() || '') === 'Y'; + + var _Game_Actor_levelUp = Game_Actor.prototype.levelUp; + Game_Actor.prototype.levelUp = function() { + _Game_Actor_levelUp.call(this); + + if (healHP || this.actor().meta.LUHealHP) { + this._hp = this.mhp; + } + + if (healMP || this.actor().meta.LUHealMP) { + this._mp = this.mmp; + } + + if (healStates || this.actor().meta.LUHealStates) { + this.clearStates(); + } + }; + + +})(); \ No newline at end of file diff --git a/js/plugins/TextPicture.js b/js/plugins/TextPicture.js new file mode 100644 index 0000000..3521c4b --- /dev/null +++ b/js/plugins/TextPicture.js @@ -0,0 +1,116 @@ +//============================================================================= +// RPG Maker MZ - Text Picture +//============================================================================= + +/*: + * @target MZ + * @plugindesc Displays text as a picture. + * @author Yoji Ojima + * + * @help TextPicture.js + * + * This plugin provides a command to show text as a picture. + * + * Use it in the following procedure. + * 1. Call the plugin command "Set Text Picture". + * 2. Execute "Show Picture" without specifying an image. + * + * @command set + * @text Set Text Picture + * @desc Sets text to display as a picture. + * After this, execute "Show Picture" without specifying an image. + * + * @arg text + * @type multiline_string + * @text Text + * @desc Text to display as a picture. + * Control characters are allowed. + */ + +/*:ja + * @target MZ + * @plugindesc テキストをピクチャとして表示します。 + * @author Yoji Ojima + * + * @help TextPicture.js + * + * このプラグインは、テキストをピクチャとして表示するコマンドを提供します。 + * + * 次の手順で使用してください。 + * 1. プラグインコマンド「テキストピクチャの設定」を呼び出します。 + * 2. 画像を指定せずに「ピクチャの表示」を実行します。 + * + * @command set + * @text テキストピクチャの設定 + * @desc ピクチャとして表示するテキストを設定します。 + * この後、画像を指定せずに「ピクチャの表示」を実行してください。 + * + * @arg text + * @type multiline_string + * @text テキスト + * @desc ピクチャとして表示するテキストです。 + * 制御文字が使用可能です。 + */ + +(() => { + const pluginName = "TextPicture"; + let textPictureText = ""; + + PluginManager.registerCommand(pluginName, "set", args => { + textPictureText = String(args.text); + }); + + const _Game_Picture_show = Game_Picture.prototype.show; + Game_Picture.prototype.show = function() { + _Game_Picture_show.apply(this, arguments); + if (this._name === "" && textPictureText) { + this.mzkp_text = textPictureText; + this.mzkp_textChanged = true; + textPictureText = ""; + } + }; + + const _Sprite_Picture_destroy = Sprite_Picture.prototype.destroy; + Sprite_Picture.prototype.destroy = function() { + destroyTextPictureBitmap(this.bitmap); + _Sprite_Picture_destroy.apply(this, arguments); + }; + + const _Sprite_Picture_updateBitmap = Sprite_Picture.prototype.updateBitmap; + Sprite_Picture.prototype.updateBitmap = function() { + _Sprite_Picture_updateBitmap.apply(this, arguments); + if (this.visible && this._pictureName === "") { + const picture = this.picture(); + const text = picture ? picture.mzkp_text || "" : ""; + const textChanged = picture && picture.mzkp_textChanged; + if (this.mzkp_text !== text || textChanged) { + this.mzkp_text = text; + destroyTextPictureBitmap(this.bitmap); + this.bitmap = createTextPictureBitmap(text); + picture.mzkp_textChanged = false; + } + } else { + this.mzkp_text = ""; + } + }; + + function createTextPictureBitmap(text) { + const tempWindow = new Window_Base(new Rectangle()); + const size = tempWindow.textSizeEx(text); + tempWindow.padding = 0; + tempWindow.move(0, 0, size.width, size.height); + tempWindow.createContents(); + tempWindow.drawTextEx(text, 0, 0, 0); + const bitmap = tempWindow.contents; + tempWindow.contents = null; + tempWindow.destroy(); + bitmap.mzkp_isTextPicture = true; + return bitmap; + } + + function destroyTextPictureBitmap(bitmap) { + if (bitmap && bitmap.mzkp_isTextPicture) { + bitmap.destroy(); + } + } +})(); diff --git a/js/plugins/VisuMZ_0_CoreEngine.js b/js/plugins/VisuMZ_0_CoreEngine.js new file mode 100644 index 0000000..a17e44d --- /dev/null +++ b/js/plugins/VisuMZ_0_CoreEngine.js @@ -0,0 +1,7873 @@ +//============================================================================= +// VisuStella MZ - Core Engine +// VisuMZ_0_CoreEngine.js +//============================================================================= + +var Imported = Imported || {}; +Imported.VisuMZ_0_CoreEngine = true; + +var VisuMZ = VisuMZ || {}; +VisuMZ.CoreEngine = VisuMZ.CoreEngine || {}; +VisuMZ.CoreEngine.version = 1.59; + +//============================================================================= + /*: + * @target MZ + * @plugindesc [RPG Maker MZ] [Tier 0] [Version 1.59] [CoreEngine] + * @author VisuStella + * @url http://www.yanfly.moe/wiki/Core_Engine_VisuStella_MZ + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * The Core Engine plugin is designed to fix any bugs that may have slipped + * past RPG Maker MZ's source code and to give game devs more control over + * RPG Maker MZ's various features, ranging from mechanics to aesthetics to + * quality of life improvements. + * + * Features include all (but not limited to) the following: + * + * * Bug fixes for the problems existing in the RPG Maker MZ base code. + * * Failsafes added for Script Call related event commands. + * * Lots of Quality of Life Settings that can be activated through the + * Plugin Parameters. + * * Control over the various Text Colors used throughout the game. + * * Change up the maximum amount of gold carried, give it an icon attached to + * the label, and include text for overlap specifics. + * * Preload images as the game boots up. + * * Add specific background images for menus found throughout the game. + * * A button assist window will appear at the top or bottom of the screen, + * detailing which buttons do what when inside a menu. This feature can be + * turned off. + * * Choose which in-game battler parameters to display inside menus (ie ATK, + * DEF, AGI, etc.) and determine their maximum values, along with plenty of + * notetags to give more control over parameter, x-parameter, s-parameter + * bonuses through equipment, states, and other trait objects. + * * Control over how the UI objects appear (such as the menu button, cancel + * button, left/right actor switch buttons). + * * Reposition actors and enemies if the battle resolution is larger. + * * Allow class names and nicknames to support text codes when displayed. + * * Determine how windows behave in the game, if they will mask other windows, + * their line height properties, and more. + * + * ============================================================================ + * Requirements + * ============================================================================ + * + * This plugin is made for RPG Maker MZ. This will not work in other iterations + * of RPG Maker. + * + * ------ Tier 0 ------ + * + * This plugin is a Tier 0 plugin. Place it under other plugins of lower tier + * value on your Plugin Manager list (ie: 0, 1, 2, 3, 4, 5). This is to ensure + * that your plugins will have the best compatibility with the rest of the + * VisuStella MZ Plugin library. + * + * ============================================================================ + * Important Changes: Bug Fixes + * ============================================================================ + * + * This plugin also serves to fix various bugs found in RPG Maker MZ that have + * been unaddressed or not yet taken care of. The following is a list of bugs + * that have been fixed by this plugin: + * + * --- + * + * Attack Skill Trait + * + * Enemies are unaffected by the Attack Skill Trait. This means if they have + * an Attack action, they will always use Attack over and over even if their + * Attack Skill Trait has been changed. This plugin will change it up so that + * the Attack skill will comply with whatever their Attack Skill Trait's skill + * is set to. + * + * --- + * + * Auto Battle Actor Skill Usage + * + * If an actor with Auto Battle has access to a skill but not have any access + * to that skill's type, that actor will still be able to use the skill during + * Auto Battle despite the fact that the actor cannot use that skill during + * manual input. + * + * --- + * + * Auto Battle Attack Seal Bypass + * + * By default, if the attack skill is sealed via a trait and an actor has + * auto-battle, the action can still be used via auto-battle. This is now fixed + * and actors should not be able to attack via auto-battle if their attack + * ability is sealed. + * + * --- + * + * Auto Battle Lock Up + * + * If an auto battle Actor fights against an enemy whose DEF/MDF is too high, + * they will not use any actions at all. This can cause potential game freezing + * and softlocks. This plugin will change that and have them default to a + * regular Attack. + * + * --- + * + * Gamepad Repeat Input + * + * Cleared inputs on gamepads do not have a downtime and will trigger the + * following input frame. The causes problems with certain RPG Maker MZ menus + * where the inputs have to be cleared as the next immediate frame will have + * them inputted again. This plugin changes it so that whenever inputs are + * cleared, there is a downtime equal to the keyboard clear frames before the + * gamepad input is registered once more. + * + * --- + * + * Invisible Battle Sprites + * + * If you removed a party member during battle and added that exact party + * member back into the same slot, their sprite would appear invisible. The + * VisuStella Core Engine will fix this problem and prevent it from happening. + * + * --- + * + * Instant Text Discrepancy for Window_Message + * + * Window_Message displays text differently when it draws letters one by one + * versus when the text is displayed instantly. This isn't noticeable with the + * default font, but it's very visible when using something like Arial. The + * error is due to Bitmap.measureTextWidth yielding a rounded value per letter + * versus per word. The Core Engine will provide a bug fix that will single out + * the cause and make it so that only Window_Message will not utilize any round + * number values when determining the width of each letter, whether or not it + * is shown instantly. This change will only affect Window_Message and not any + * other window in order to prevent unintended side effects. + * + * This can be disabled through the Plugin Parameters: + * + * Plugin Parameters > QoL Settings > Misc > Font Width Fix + * + * --- + * + * Move Picture, Origin Differences + * + * If a Show Picture event command is made with an Origin setting of + * "Upper Left" and a Move Picture event command is made afterwards with an + * Origin setting of "Center", RPG Maker MZ would originally have it instantly + * jump into the new origin setting without making a clean transition between + * them. This plugin will create that clean transition between origins. + * + * --- + * + * Overly-Protective Substitute + * + * When an ally with critical health is being targeted by a friendly non- + * Certain Hit skill (such as a heal or buff) and another ally has the + * substitute state, the other ally would "protect" the originally targeted + * ally and take the heal or buff. + * + * The new changed behavior is that now, substitute will not trigger for any + * actions whose scope targets allies. + * + * --- + * + * Status Window Name Vertical Cutoffs + * + * In the battle status windows, whenever actor names are displayed, the bitmap + * used to display their name text do not extend vertically all the way, + * causing letters like lowercase "Q" and "G" to be cut off, making them hard + * to distinguish from one another. The Core Engine will remedy this by + * extending the bitmap to allow enough room. Fix made by Irina. + * + * --- + * + * Termination Clear Effects + * + * In RPG Maker MZ, requesting an animation while transitioning between + * scenes, such as going from the map scene to the battle scene, can cause + * crashes. This is because the animation queue does not take off immediately + * and will likely register incorrect targets for the scene. This plugin will + * forcefully clear any registered animations and balloon effects when + * terminating a scene in order to prevent crashes. + * + * --- + * + * Timer Sprite + * + * By default, RPG Maker MZ adds Sprite_Timer into its spriteset, either for + * maps or for battles. There is one major problem with this: when spritesets + * are affected by filters, zooms, and/or blurs, this hinders how readable the + * timer sprite is, making the information perceived by the player to be much + * harder than it needs to be. The Core Engine adds the sprite to the parent + * scene instead of the spriteset to ensure it's unobscured by anything else. + * + * --- + * + * Unusable Battle Items + * + * If any party member is able to use an item in battle, then all party members + * are able to use said item, even if that party member is supposed to be + * unable to use that item. This is now changed so that battle items are + * checked on an individual basis and not on a party-wide basis. + * + * --- + * + * Window Arrows Sprite Tearing + * + * If a window object in RPG Maker MZ were to have an odd number for width size + * then the arrow elements found for the window would be positioned on a half + * pixel, giving it a blurry look and also have sprite tearing issues. This is + * now fixed by rounding the number to the nearest whole number. + * + * --- + * + * Window Client Area Scaling Bug + * + * If the window has a scale value different from 1.0, the client area (the + * interactable parts) will not scale properly and appear clipped out. This + * is now fixed by adjusting the client area to the window's scale values and + * rounding upward to the nearest whole number. + * + * --- + * + * Window Skin Bleeding + * + * This bug is fixed in the core scripts for RPG Maker MZ v1.3.0+. + * + * Since the v1.2.0 update, Window.prototype._refreshBack's frame value has + * been set from 96 to 95. This results in the window skin bleeding past the + * window's intended borders. The Core Engine now reverts this change to + * prevent the bleeding effect from happening. + * + * --- + * + * ============================================================================ + * Major Changes: New Hard-Coded Features + * ============================================================================ + * + * This plugin adds some new hard-coded features to RPG Maker MZ's functions. + * The following is a list of them. + * + * --- + * + * Scroll-Linked Pictures + * + * - If a Parallax has a ! at the start of its filename, it is bound to the map + * scrolling. The same thing now happens with pictures. If a Picture has a ! at + * the start of its filename, it is bound to the map's scrolling as well. + * + * --- + * + * Movement Route Scripts + * + * - If code in a Movement Route Script command fails, instead of crashing the + * game, it will now act as if nothing happened except to display the cause of + * the error inside the console. + * + * --- + * + * Script Call Failsafes + * + * - If code found in Conditional Branches, Control Variables, and/or Script + * Calls fail to activate, instead of crashing the game, it will now act as if + * nothing happened except to display the cause of the error inside the + * console. + * + * --- + * + * Digit Grouping + * + * - There exists an option to change how numbers are displayed and converted + * in your game. This option can be enabled or disabled by going into the + * Plugin Manager > VisuMZ_0_OptionsCore > Quality of Life Settings > + * Digit Grouping and toggling on/off whichever ones you want. + * + * - Digit Grouping will follow the rules of whatever country/locale the Plugin + * Parameters are set to. If it's to default 'en-US', then 1234567.123456 will + * become 1,234,567.123456. Set it to 'es-ES' and it becomes 1.234.567,123456 + * instead. + * + * - This uses JavaScript's Number.toLocaleString() function and will therefore + * follow whatever rules it has. This means if there are trailing zeroes at the + * end of a decimal, it will cut them off. Numbers like 123.45000 will become + * 123.45 instead. Excess numbers past 6 decimal places will be rounded. A + * number like 0.123456789 will become 0.123457 instead. + * + * - Numbers in between [ and ], < and > will be excluded from digit grouping + * in order for text codes to be preserved accurately. \I[1234] will remain as + * \I[1234]. + * + * - If you would like to enter in a number without digit grouping, surround it + * with {{ and }}. Typing in {{1234567890}} will yield 1234567890. + * + * --- + * + * Show Scrolling Text, additional functionality + * + * The event command "Show Scrolling Text" now has additional functionality as + * long as the VisuStella MZ Core Engine is installed. If the game dev inserts + * "// Script Call" (without the quotes) inside the scrolling text, then the + * entirity of the Show Scrolling Text event command will be ran as a giant + * script call event command. + * + * The reason why this functionality is added is because the "Script..." event + * command contains only 12 lines maximum. This means for any script call + * larger than 12 lines of code cannot be done by normal means as each script + * call is ran as a separate instance. + * + * By repurposing the "Show Scrolling Text" event command to be able to + * function as an extended "Script..." event command, such a thing is now + * possible with less hassle and more lines to code with. + * + * This effect does not occur if the Show Scrolling Text event command does not + * have "// Script Call" in its contents. + * + * --- + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * The following are notetags that have been added through this plugin. These + * notetags will not work with your game if this plugin is OFF or not present. + * + * === Actors === + * + * Parameter limits can be adjusted in the Plugin Parameters, but this won't + * lift the ability to change the values of an actor's initial or max level + * past the editor's limits. Instead, this must be done through the usage of + * notetags to accomplish the feat. + * + * --- + * + * + * + * - Used for: Actor Notetags + * - Replace 'x' with an integer to determine the actor's max level. + * - This allows you to go over the database limit of 99. + * - If this notetag isn't used, default to the actor's database value. + * + * --- + * + * + * + * - Used for: Actor Notetags + * - Replace 'x' with an integer to determine the actor's initial level. + * - This allows you to go over the database limit of 99. + * - If this notetag isn't used, default to the actor's database value. + * + * --- + * + * === Classes === + * + * As actor levels can now surpass 99 due to the notetag system, there may be + * some skills you wish certain classes can learn upon reaching higher levels + * past 99, too. + * + * --- + * + * + * + * - Used for: Class Skill Learn Notetags + * - Replace 'x' with an integer to determine the level this class will learn + * the associated skill at. + * - This allows you to go over the database limit of 99. + * - If this notetag isn't used, default to the class's database value. + * + * --- + * + * === Enemies === + * + * Enemies are now given levels. The levels don't do anything except to serve + * as a container for a number value. This way, levels can be used in damage + * formulas (ie. a.atk - b.level) without causing any errors. To give enemies + * levels, use the notetags below. These notetags also allow you to adjust the + * base parameters, EXP, and Gold past the database limitations. + * + * --- + * + * + * + * - Used for: Enemy Notetags + * - Replace 'x' with an integer to determine the enemy's level. + * - If no level is declared, the level will default to 1. + * + * --- + * + * + * + * - Used for: Enemy Notetags + * - Replace 'param' with 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', + * or 'LUK' to determine which parameter to alter. + * - This notetag does NOT work with X Parameters, S Parameters, or any + * custom parameters. This notetag ONLY works with the base parameters. + * - Replace 'x' with an integer to set an enemy's 'param' base value. + * - This will overwrite the enemy's database value and can exceed the original + * value limitation in the database. + * - If these notetags aren't used, default to the enemy's database value. + * + * --- + * + * + * + * + * - Used for: Enemy Notetags + * - Replace 'x' with an integer to determine the enemy's EXP or Gold values. + * - This will overwrite the enemy's database value and can exceed the original + * value limitation in the database. + * - If these notetags aren't used, default to the enemy's database value. + * + * --- + * + * === Animations === + * + * Animations in RPG Maker MZ are done by Effekseer and the animation system + * has been revamped. However, the animations are only centered on the targets + * now, and cannot be attached to the head or foot. Insert these tags into + * the names of the animations in the database to adjust their positions. + * + * --- + * + * + * + * + * - Used for: Animation Name Tags + * - Will set the animation to anchor on top of the sprite (if is used) + * or at the bottom of the sprite (if is used). + * + * --- + * + * + * + * + * + * + * - Used for: Animation Name Tags + * - Will anchor the animation at a specific point within the sprite based on + * the 'x' and 'y' values. + * - Replace 'x' and 'y' with numeric values representing their positions based + * on a rate where 0.0 is the furthest left/up (x, y respectively) to 1.0 for + * the furthest right/down (x, y respectively). + * + * Examples: + * + * + * + * + * + * + * --- + * + * + * + * + * + * + * + * + * + * - Used for: Animation Name Tags + * - Will anchor the animation to be offset by an exact number of pixels. + * - This does the same the editor does, except it lets you input values + * greater than 999 and lower than -999. + * - Replace 'x' and 'y' with numeric values the exact number of pixels to + * offset the animation's x and y coordinates by. + * + * Examples: + * + * + * + * + * + * + * --- + * + * + * + * + * - Used for: Animation Name Tags + * - If an animation is mirrored, you can choose to have the animation's Offset + * X value be mirrored, too (or not at all). + * - If no name tag is discovered, this will use the setting found in the + * Plugin Parameters > QoL Settings > Misc > Ani: Mirror Offset X setting. + * + * --- + * + * + * + * - Used for: MV Animation Name Tags + * - Allows you to adjust the update for this MV Animation. + * - Does NOT work with Effekseer animations. + * - The lower the number, the faster. + * - Replace 'x' with a number representing the animation update rate. + * - Default rate: 4. + * - Minimum rate: 1. + * - Maximum rate: 10. + * + * --- + * + * === Quality of Life === + * + * By default, RPG Maker MZ does not offer an encounter step minimum after a + * random encounter has finished. This means that one step immediately after + * finishing a battle, the player can immediately enter another battle. The + * Quality of Life improvement: Minimum Encounter Steps allows you to set a + * buffer range between battles for the player to have some breathing room. + * + * --- + * + * + * + * - Used for: Map Notetags + * - Replace 'x' with the minimum number of steps before the player enters a + * random encounter on that map. + * - If this notetag is not used, then the minimum encounter steps for the map + * will default to Quality of Life Settings => Encounter Rate Min. + * + * --- + * + * Tile shadows are automatically added to certain tiles in the map editor. + * These tile shadows may or may not fit some types of maps. You can turn them + * on/off with the Quality of Life Plugin Parameters or you can override the + * settings with the following notetags: + * + * --- + * + * + * + * + * - Used for: Map Notetags + * - Use the respective notetag for the function you wish to achieve. + * - If this notetag is not used, then the minimum encounter steps for the map + * will default to Quality of Life Settings => No Tile Shadows. + * + * --- + * + * === Basic, X, and S Parameters === + * + * A battler's parameters, or stats as some devs know them as, are the values + * that determine how a battler performs. These settings allow you to alter + * behaviors and give boosts to trait objects in a more controlled manner. + * + * --- + * + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Adds or subtracts 'x' to 'param' plus value when calculating totals. + * - Replace 'param' with 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', + * or 'LUK' to determine which parameter to modify. + * - Replace 'x' with an integer on how much to adjust the parameter by. + * - This is used to calculate the 'plus' portion in the Parameter Settings => + * Basic Parameter => Formula. + * + * --- + * + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Changes 'param' rate to 'x' to alter the total 'param' value. + * - Replace 'param' with 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', + * or 'LUK' to determine which parameter to modify. + * - Replace 'x' with a percentage (ie. 150%) or a rate (ie. 1.5). + * - This is used to calculate the 'paramRate' portion in Parameter Settings => + * Basic Parameter => Formula. + * + * --- + * + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Adds or subtracts 'x' to 'param' plus value when calculating totals. + * - Replace 'param' with 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', + * or 'LUK' to determine which parameter to modify. + * - Replace 'x' with an integer on how much to adjust the parameter by. + * - This is used to calculate the 'flatBonus' portion in Parameter Settings => + * Basic Parameter => Formula. + * + * --- + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Sets max caps for the 'param' to be 'x'. If there are multiple max caps + * available to the unit, then the highest will be selected. + * - Replace 'param' with 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', + * or 'LUK' to determine which parameter to modify. + * - Replace 'x' with an integer to determine what the max cap should be. + * + * --- + * + * + * + * + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Adds or subtracts 'x' to 'xparam' plus value when calculating totals. + * - Replace 'xparam' with 'HIT', 'EVA', 'CRI', 'CEV', 'MEV', 'MRF', 'CNT', + * 'HRG', 'MRG', 'TRG' to determine which X parameter to modify. + * - Replace 'x' with a percentage (ie. 150%) or a rate (ie. 1.5). + * - This is used to calculate the 'plus' portion in the Parameter Settings => + * X Parameter => Formula. + * + * --- + * + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Changes 'param' rate to 'x' to alter the total 'xparam' value. + * - Replace 'xparam' with 'HIT', 'EVA', 'CRI', 'CEV', 'MEV', 'MRF', 'CNT', + * 'HRG', 'MRG', 'TRG' to determine which X parameter to modify. + * - Replace 'x' with a percentage (ie. 150%) or a rate (ie. 1.5). + * - This is used to calculate the 'paramRate' portion in Parameter Settings => + * X Parameter => Formula. + * + * --- + * + * + * + * + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Adds or subtracts 'x' to 'xparam' plus value when calculating totals. + * - Replace 'xparam' with 'HIT', 'EVA', 'CRI', 'CEV', 'MEV', 'MRF', 'CNT', + * 'HRG', 'MRG', 'TRG' to determine which X parameter to modify. + * - Replace 'x' with a percentage (ie. 150%) or a rate (ie. 1.5). + * - This is used to calculate the 'flatBonus' portion in Parameter Settings => + * X Parameter => Formula. + * + * --- + * + * + * + * + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Adds or subtracts 'x' to 'sparam' plus value when calculating totals. + * - Replace 'sparam' with 'TGR', 'GRD', 'REC', 'PHA', 'MCR', 'TCR', 'PDR', + * 'MDR', 'FDR', 'EXR' to determine which S parameter to modify. + * - Replace 'x' with a percentage (ie. 150%) or a rate (ie. 1.5). + * - This is used to calculate the 'plus' portion in the Parameter Settings => + * S Parameter => Formula. + * + * --- + * + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Changes 'param' rate to 'x' to alter the total 'sparam' value. + * - Replace 'sparam' with 'TGR', 'GRD', 'REC', 'PHA', 'MCR', 'TCR', 'PDR', + * 'MDR', 'FDR', 'EXR' to determine which S parameter to modify. + * - Replace 'x' with a percentage (ie. 150%) or a rate (ie. 1.5). + * - This is used to calculate the 'paramRate' portion in Parameter Settings => + * S Parameter => Formula. + * + * --- + * + * + * + * + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Adds or subtracts 'x' to 'sparam' plus value when calculating totals. + * - Replace 'sparam' with 'TGR', 'GRD', 'REC', 'PHA', 'MCR', 'TCR', 'PDR', + * 'MDR', 'FDR', 'EXR' to determine which S parameter to modify. + * - Replace 'x' with a percentage (ie. 150%) or a rate (ie. 1.5). + * - This is used to calculate the 'flatBonus' portion in Parameter Settings => + * S Parameter => Formula. + * + * === JavaScript Notetags: Basic, X, and S Parameters === + * + * The following are notetags made for users with JavaScript knowledge. These + * notetags are primarily aimed at Basic, X, and S Parameters. + * + * --- + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs 'code' to change the 'param' plus value. + * - Replace 'param' with 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', + * or 'LUK' to determine which parameter to modify. + * - Replace 'code' with JavaScript code to determine how much to change the + * plus amount for the parameter's total calculation. + * - This is used to calculate the 'plus' portion in the Parameter Settings => + * Basic Parameter => Formula. + * + * --- + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs 'code' to change the 'param' rate value. + * - Replace 'param' with 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', + * or 'LUK' to determine which parameter to modify. + * - Replace 'code' with JavaScript code to determine how much to change the + * param rate amount for the parameter's total calculation. + * - This is used to calculate the 'paramRate' portion in Parameter Settings => + * Basic Parameter => Formula. + * + * --- + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs 'code' to change the 'param' flat value. + * - Replace 'param' with 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', + * or 'LUK' to determine which parameter to modify. + * - Replace 'code' with JavaScript code to determine how much to change the + * flat bonus amount for the parameter's total calculation. + * - This is used to calculate the 'flatBonus' portion in Parameter Settings => + * Basic Parameter => Formula. + * + * --- + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs 'code' to determine what the max cap for 'param' should be. If there + * are multiple max caps available to the unit, then the highest is selected. + * - Replace 'param' with 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', + * or 'LUK' to determine which parameter to modify. + * - Replace 'code' with JavaScript code to determine the max cap for the + * desired parameter. + * + * --- + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs 'code' to change the 'xparam' plus value. + * - Replace 'xparam' with 'HIT', 'EVA', 'CRI', 'CEV', 'MEV', 'MRF', 'CNT', + * 'HRG', 'MRG', 'TRG' to determine which X parameter to modify. + * - Replace 'code' with JavaScript code to determine how much to change the + * plus amount for the X parameter's total calculation. + * - This is used to calculate the 'plus' portion in the Parameter Settings => + * X Parameter => Formula. + * + * --- + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs 'code' to change the 'xparam' rate value. + * - Replace 'xparam' with 'HIT', 'EVA', 'CRI', 'CEV', 'MEV', 'MRF', 'CNT', + * 'HRG', 'MRG', 'TRG' to determine which X parameter to modify. + * - Replace 'code' with JavaScript code to determine how much to change the + * param rate amount for the X parameter's total calculation. + * - This is used to calculate the 'paramRate' portion in Parameter Settings => + * X Parameter => Formula. + * + * --- + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs 'code' to change the 'xparam' flat value. + * - Replace 'xparam' with 'HIT', 'EVA', 'CRI', 'CEV', 'MEV', 'MRF', 'CNT', + * 'HRG', 'MRG', 'TRG' to determine which X parameter to modify. + * - Replace 'code' with JavaScript code to determine how much to change the + * flat bonus amount for the X parameter's total calculation. + * - This is used to calculate the 'flatBonus' portion in Parameter Settings => + * X Parameter => Formula. + * + * --- + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs 'code' to change the 'sparam' plus value. + * - Replace 'sparam' with 'TGR', 'GRD', 'REC', 'PHA', 'MCR', 'TCR', 'PDR', + * 'MDR', 'FDR', 'EXR' to determine which S parameter to modify. + * - Replace 'code' with JavaScript code to determine how much to change the + * plus amount for the S parameter's total calculation. + * - This is used to calculate the 'plus' portion in the Parameter Settings => + * S Parameter => Formula. + * + * --- + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs 'code' to change the 'sparam' rate value. + * - Replace 'sparam' with 'TGR', 'GRD', 'REC', 'PHA', 'MCR', 'TCR', 'PDR', + * 'MDR', 'FDR', 'EXR' to determine which S parameter to modify. + * - Replace 'code' with JavaScript code to determine how much to change the + * param rate amount for the S parameter's total calculation. + * - This is used to calculate the 'paramRate' portion in Parameter Settings => + * S Parameter => Formula. + * + * --- + * + * + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs 'code' to change the 'sparam' flat value. + * - Replace 'sparam' with 'TGR', 'GRD', 'REC', 'PHA', 'MCR', 'TCR', 'PDR', + * 'MDR', 'FDR', 'EXR' to determine which S parameter to modify. + * - Replace 'code' with JavaScript code to determine how much to change the + * flat bonus amount for the S parameter's total calculation. + * - This is used to calculate the 'flatBonus' portion in Parameter Settings => + * S Parameter => Formula. + * + * --- + * + * === Battle Setting-Related Notetags === + * + * These tags will change the settings for battle regardless of how the battle + * system is set up normally. Insert these tags in either the noteboxes of maps + * or the names of troops for them to take effect. If both are present for a + * specific battle, then priority goes to the setting found in the troop name. + * + * --- + * + * + * + * + * + * + * - Used for: Map Notetags, Troop Name Tags, and Troop Comment Tags + * - Changes the perspective of battle to front view for this specific map or + * battle. + * - Make sure you have the enemy image files available in the img/enemies/ + * folder as they will used instead of the "sv_enemies" graphics. + * - If using Troop Comment Tags, then as long as the tag appears in a comment + * found on any of the Troop's pages (even if they don't run), the tag will + * be considered in effect. + * + * --- + * + * + * + * + * + * + * - Used for: Map Notetags, Troop Name Tags, and Troop Comment Tags + * - Changes the perspective of battle to side view for this specific map or + * battle. + * - Make sure you have the enemy image files available in the img/sv_enemies/ + * folder as they will used instead of the "enemies" graphics. + * - Make sure your actors have "sv_actor" graphics attached to them. + * - If using Troop Comment Tags, then as long as the tag appears in a comment + * found on any of the Troop's pages (even if they don't run), the tag will + * be considered in effect. + * + * --- + * + * + * + * + * - Used for: Map Notetags, Troop Name Tags, and Troop Comment Tags + * - Changes the battle system to the default battle system (DTB). + * - If using Troop Comment Tags, then as long as the tag appears in a comment + * found on any of the Troop's pages (even if they don't run), the tag will + * be considered in effect. + * + * --- + * + * + * + * + * + * + * + * + * + * + * + * - Used for: Map Notetags, Troop Name Tags, and Troop Comment Tags + * - Changes the battle system to the time progress battle system (TPB) or + * active turn battle system (ATB) if you have VisuMZ_2_BattleSystemATB + * installed for the game project. + * - If using Troop Comment Tags, then as long as the tag appears in a comment + * found on any of the Troop's pages (even if they don't run), the tag will + * be considered in effect. + * + * --- + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * - Used for: Map Notetags, Troop Name Tags, and Troop Comment Tags + * - Changes the battle system to the respective battle system as long as you + * have those plugins installed in the current project. + * - If using Troop Comment Tags, then as long as the tag appears in a comment + * found on any of the Troop's pages (even if they don't run), the tag will + * be considered in effect. + * + * --- + * + * ============================================================================ + * Plugin Commands + * ============================================================================ + * + * The following are Plugin Commands that come with this plugin. They can be + * accessed through the Plugin Command event command. + * + * --- + * + * === Animation Commands === + * + * --- + * + * Animation: Play at Coordinate + * - Plays an animation on the screen at a specific x, y coordinate even if + * there is no sprite attached. + * + * Animation ID: + * - Plays this animation. + * + * Coordinates: + * + * X: + * Y: + * - X/Y coordinate used for the animation. + * You may use JavaScript code. + * + * Mirror Animation?: + * - Mirror the animation? + * + * Mute Animation?: + * - Mute the animation? + * + * --- + * + * === Export Plugin Commands === + * + * --- + * + * Export: All Maps Text + * - PLAY TEST ONLY. Exports all of the text from all maps, + * their events, event pages, and any associated Common Events. + * + * - Exports 'Show Text' event commands. + * - Exports 'Show Choices' event commands. + * - Exports 'Show Scrolling Text' event commands. + * - Exports 'Comments' event commands. + * - Only the raw text will be exported. + * - Only usable during Play Test. + * + * --- + * + * Export: All Troops Text + * - PLAY TEST ONLY. Exports all of the text from all troops, + * their event pages, and any associated Common Events. + * + * - Exports 'Show Text' event commands. + * - Exports 'Show Choices' event commands. + * - Exports 'Show Scrolling Text' event commands. + * - Exports 'Comments' event commands. + * - Only the raw text will be exported. + * - Only usable during Play Test. + * + * --- + * + * Export: Current Map Text + * - PLAY TEST ONLY. Exports all of the text on the current map, + * its events, the event pages, and any associated Common Events. + * + * - Exports 'Show Text' event commands. + * - Exports 'Show Choices' event commands. + * - Exports 'Show Scrolling Text' event commands. + * - Exports 'Comments' event commands. + * - Only the raw text will be exported. + * - Only usable during Play Test. + * - If not in battle, this Plugin Command will not work. + * + * --- + * + * Export: Current Troop Text + * - PLAY TEST ONLY. Exports all of the text on the current troop, + * the troop's event pages, and any associated Common Events. + * + * - Exports 'Show Text' event commands. + * - Exports 'Show Choices' event commands. + * - Exports 'Show Scrolling Text' event commands. + * - Exports 'Comments' event commands. + * - Only the raw text will be exported. + * - Only usable during Play Test. + * - If not in battle, this Plugin Command will not work. + * + * --- + * + * === Game Plugin Commands === + * + * --- + * + * Game: Open URL + * - Opens a website URL from the game. + * + * URL: + * - Where do you want to take the player? + * + * --- + * + * === Gold Plugin Commands === + * + * --- + * + * Gold: Gain/Lose + * - Allows you to give/take more gold than the event editor limit. + * + * Value: + * - How much gold should the player gain/lose? + * - Use negative values to remove gold. + * + * --- + * + * === Map Plugin Commands === + * + * --- + * + * Map: Once Parallel + * - Plays a Common Event parallel to the event once without repeating itself + * when done. + * - Map only! + * + * Common Event ID: + * - The ID of the parallel Common Event to play. + * - Does NOT repeat itself when finished. + * - When exiting map scene or changing maps, all Once Parallels are cleared. + * - Once Parallels are not retained upon reentering the scene or map. + * - Once Parallels are not stored in memory and cannot be saved. + * + * --- + * + * === Picture Plugin Commands === + * + * --- + * + * Picture: Coordinates Mode + * - Play Test Mode only! Gets the coordinates of a specific picture as you + * move it across the screen. + * + * Picture ID: + * - The ID of the pictures to track the coordinates of. + * + * --- + * + * Picture: Easing Type + * - Changes the easing type to a number of options. + * + * Picture ID: + * - Which picture do you wish to apply this easing to? + * + * Easing Type: + * - Select which easing type you wish to apply. + * + * Instructions: + * - Insert this Plugin Command after a "Move Picture" event command. + * - Turn off "Wait for Completion" in the "Move Picture" event. + * - You may have to add in your own "Wait" event command after. + * + * --- + * + * Picture: Erase All + * - Erases all pictures on the screen because it's extremely tedious to do it + * one by one. + * + * --- + * + * Picture: Erase Range + * - Erases all pictures within a range of numbers because it's extremely + * tedious to do it one by one. + * + * Starting ID: + * - The starting ID of the pictures to erase. + * + * Ending ID: + * - The ending ID of the pictures to erase. + * + * --- + * + * Picture: Show Icon + * - Shows an icon instead of a picture image. + * - The picture icon can be controlled like any other picture. + * + * General: + * + * Picture ID Number: + * - What is the ID of the picture you wish to show at? + * - Use a number between 1 and 100. + * - You may use JavaScript code. + * + * Icon Index: + * - Select the icon index to use for this picture. + * - You may use JavaScript code. + * + * Smooth Icon?: + * - This will make the icon smoothed out or pixelated. + * + * Picture Settings: + * + * Position: + * + * Origin: + * - What is the origin of this picture icon? + * - Upper Left + * - Center + * + * Position X: + * - X coordinate of the picture. + * - You may use JavaScript code. + * + * Position Y: + * - Y coordinate of the picture. + * - You may use JavaScript code. + * + * Scale: + * + * Width %: + * - Horizontal scale of the picture. + * - You may use JavaScript code. + * - 100 is 100% + * + * Height %: + * - Vertical scale of the picture. + * - You may use JavaScript code. + * - 100 is 100% + * + * Blend: + * + * Opacity: + * - Insert a number to determine opacity level. + * - Use a number between 0 and 255. + * - You may use JavaScript code. + * + * Blend Mode: + * - What kind of blend mode do you wish to apply to the picture? + * + * --- + * + * === Screen Shake Plugin Commands === + * + * --- + * + * Screen Shake: Custom: + * - Creates a custom screen shake effect and also sets the following uses of + * screen shake to this style. + * + * Shake Style: + * - Select shake style type. + * - Original + * - Random + * - Horizontal + * - Vertical + * + * Power: + * - Power level for screen shake. + * + * Speed: + * - Speed level for screen shake. + * + * Duration: + * - Duration of screenshake. + * - You can use code as well. + * + * Wait for Completion: + * - Wait until completion before moving onto the next event? + * + * --- + * + * === Switch Plugin Commands === + * + * --- + * + * Switches: Randomize ID(s) + * - Select specific Switch ID's to randomize ON/OFF. + * + * Switch ID(s): + * - Select which Switch ID(s) to toggle. + * + * Chance for ON: + * - Chance out of 100 that determines the switches to be ON. + * + * --- + * + * Switches: Randomize Range + * - Select specific Switch ID Range to randomize ON/OFF. + * - The ratio determines the ON/OFF distribution. + * + * Starting ID: + * - The starting ID of the Switch to toggle. + * + * Ending ID: + * - The ending ID of the Switch to toggle. + * + * Chance for ON: + * - Chance out of 100 that determines the switches to be ON. + * + * --- + * + * Switches: Toggle ID(s) + * - Select specific Switch ID's to toggle ON/OFF. + * - ON becomes OFF. OFF becomes ON. + * + * Switch ID(s): + * - Select which Switch ID(s) to toggle. + * + * --- + * + * Switches: Toggle Range + * - Select specific Switch ID Range to toggle ON/OFF. + * - ON becomes OFF. OFF becomes ON. + * + * Starting ID: + * - The starting ID of the Switch to toggle. + * + * Ending ID: + * - The ending ID of the Switch to toggle. + * + * --- + * + * === System Plugin Commands === + * + * --- + * + * System: Battle System Change + * - Switch to a different battle system in-game. + * - Some battle systems REQUIRE their specific plugins! + * + * Change To: + * - Choose which battle system to switch to. + * - Database Default (Use game database setting) + * - - + * - DTB: Default Turn Battle + * - TPB Active: Time Progress Battle (Active) + * - TPB Wait: Time Progress Battle (Wait) + * - - + * - BTB: Brave Turn Battle (Req VisuMZ_2_BattleSystemBTB) + * - CTB: Charge Turn Battle (Req VisuMZ_2_BattleSystemCTB) + * - OTB: Order Turn Battle (Req VisuMZ_2_BattleSystemOTB) + * - STB: Standard Turn Battle (Req VisuMZ_2_BattleSystemSTB) + * + * --- + * + * System: Load Images + * - Allows you to (pre) load up images ahead of time. + * + * img/animations/: + * img/battlebacks1/: + * img/battlebacks2/: + * img/enemies/: + * img/faces/: + * img/parallaxes/: + * img/pictures/: + * img/sv_actors/: + * img/sv_enemies/: + * img/system/: + * img/tilesets/: + * img/titles1/: + * img/titles2/: + * - Which files do you wish to load from this directory? + * + * --- + * + * System: Main Font Size + * - Set the game's main font size. + * + * Change To: + * - Change the font size to this number. + * + * --- + * + * System: Side View Battle + * - Switch between Front View or Side View for battle. + * + * Change To: + * - Choose which view type to switch to. + * + * --- + * + * System: Window Padding + * - Change the game's window padding amount. + * + * Change To: + * - Change the game's standard window padding to this value. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Quality of Life Settings + * ============================================================================ + * + * A variety of (optional) settings and changes are added with the Core Engine + * to improve the quality of life for both the game devs and players alike. + * + * --- + * + * Play Test + * + * New Game on Boot: + * - Automatically start a new game on Play Test? + * - Only enabled during Play Test. + * + * No Play Test Mode: + * - Force the game to be out of Play Test mode when play testing. + * + * Open Console on Boot: + * - Open the Debug Console upon booting up your game? + * - Only enabled during Play Test. + * + * F6: Toggle Sound: + * - F6 Key Function: Turn on all sound to 100% or to 0%, toggling between + * the two. + * - Only enabled during Play Test. + * + * F7: Toggle Fast Mode: + * - F7 Key Function: Toggle fast mode. + * - Only enabled during Play Test. + * + * New Game > Common Event: + * - Runs a common event each time a new game is started. + * - Only enabled during Play Test. + * + * --- + * + * Battle Test + * + * Add Item Type: + * Add Weapon Type: + * Add Armor Type: + * - Add copies of each database item, weapon, and/or armor? + * - Effective only during battle test. + * + * Added Quantity: + * - Determines how many items are added during a battle test instead of + * the maximum amount. + * + * --- + * + * Digit Grouping + * + * Standard Text: + * - Make numbers like 1234567 appear like 1,234,567 for standard text + * inside windows? + * + * Ex Text: + * - Make numbers like 1234567 appear like 1,234,567 for ex text, + * written through drawTextEx (like messages)? + * + * Damage Sprites: + * - Make numbers like 1234567 appear like 1,234,567 for in-battle + * damage sprites? + * + * Gauge Sprites: + * - Make numbers like 1234567 appear like 1,234,567 for visible gauge + * sprites such as HP, MP, and TP gauges? + * + * Country/Locale + * - Base the digit grouping on which country/locale? + * - This will follow all of the digit grouping rules found here: + * https://www.w3schools.com/JSREF/jsref_tolocalestring_number.asp + * + * --- + * + * Player Benefit + * + * Encounter Rate Min: + * - Minimum number of steps the player can take without any + * random encounters. + * + * Escape Always: + * - If the player wants to escape a battle, let them escape the battle + * with 100% chance. + * + * Accuracy Formula: + * - Accuracy formula calculation change to + * Skill Hit% * (User HIT - Target EVA) for better results. + * + * Accuracy Boost: + * - Boost HIT and EVA rates in favor of the player. + * + * Level Up -> Full HP: + * Level Up -> Full MP: + * - Recovers full HP or MP when an actor levels up. + * + * --- + * + * Picture-Related + * + * Anti-Zoom Pictures: + * - If on, prevents pictures from being affected by zoom. + * + * Picture Containers > Detach in Battle: + * - If detached, picture container will be separated from the spriteset + * while on the battle scene. + * - This will prevent any visual effects that alter the entire spriteset + * from affecting the detached picture container. + * + * Picture Containers > Detach in Map: + * - If detached, picture container will be separated from the spriteset + * while on the map scene. + * - This will prevent any visual effects that alter the entire spriteset + * from affecting the detached picture container. + * + * --- + * + * Misc + * + * Animation: Mirror Offset X: + * - When animations are mirrored, mirror their Offset X values, too. + * - The animation name tags and will + * override this effect for that specific animation. + * + * Font Shadows: + * - If on, text uses shadows instead of outlines. + * + * Font Smoothing: + * - If on, smoothes fonts shown in-game. + * + * Font Width Fix: + * - Fixes the font width issue with instant display non-monospaced fonts + * in the Message Window. + * + * Key Item Protection: + * - If on, prevents Key Items from being able to be sold and from being + * able to be consumed. + * + * Modern Controls: + * - If on, allows usage of the Home/End buttons. + * - Home would scroll to the first item on a list. + * - End would scroll to the last item on a list. + * - Shift + Up would page up. + * - Shift + Down would page down. + * + * MV Animation Rate: + * - Adjusts the rate at which MV animations play. + * - Default: 4. + * - Lower for faster. + * - Higher for slower. + * + * NewGame > CommonEvent: + * - Runs a common event each time a new game during any session is started. + * - Applies to all types of sessions, play test or not. + * + * No Tile Shadows: + * - Removes tile shadows from being displayed in-game. + * + * Pixel Image Rendering: + * - If on, pixelates the image rendering (for pixel games). + * + * Require Focus? + * - Requires the game to be focused? If the game isn't focused, it will + * pause if it's not the active window. + * + * Shortcut Scripts: + * - Enables shortcut-based script variables and functions that can be used + * for script calls. + * - Shortcut list enabled for this is as follows: + * + * $commonEvent(id) + * - Queues a common event. + * - This does not interrupt the current event to run the desired common + * event. Any queued common events will run after the current event list + * has finished. + * - Replace 'id' with the ID of the common event you wish to queue. + * - Common events only run in the map scene and battle scene. + * + * $onceParallel(id) + * - Runs a common event in the background as a once parallel event. + * - Once parallel events will run in the background like a parallel + * process, except that it does not repeat after finishing. + * - Replace 'id' with the ID of the common event you wish to run. + * - Only works in the map scene and battle scene. Battle scene usage will + * require VisuMZ_1_BattleCore. + * + * $scene + * - Returns current scene. + * + * $spriteset + * - Returns current scene's spriteset if there is one. + * + * $subject + * - Returns last recorded identity of the battle's subject/user. + * + * $targets + * - Returns last recorded targets marked in battle. + * + * $target + * - Returns last recorded target marked in battle. + * - Works better with VisuMZ_1_BattleCore. + * + * $event + * - Returns currently initiated map event. + * + * Smart Event Collision: + * - Makes events only able to collide with one another if they're + * 'Same as characters' priority. + * + * Subfolder Name Purge: + * - Purge subfolder name from Plugin Parameters when reading data to let + * Plugin Commands work properly. + * - This is for plugins (such as the VisuMZ library) that utilize dynamic + * name registrations for Plugin Commands. Turn this on if you plan on + * using subfolders with VisuMZ plugins. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Battle System + * ============================================================================ + * + * Choose which battle system to use for your game. + * + * Some battle systems REQUIRE their specific plugins! This means if you do not + * have the required battle system plugin installed, it will not change over. + * The Core Engine plugin does not contain data for all of the battle systems + * inside its code. + * + * --- + * + * Database Default (Use game database setting) + * + * - + * + * DTB: Default Turn Battle + * TPB Active: Time Progress Battle (Active) + * TPB Wait: Time Progress Battle (Wait) + * + * - + * + * BTB: Brave Turn Battle (Req VisuMZ_2_BattleSystemBTB) + * CTB: Charge Turn Battle (Req VisuMZ_2_BattleSystemCTB) + * ETB: Energy Turn Battle (Req VisuMZ_2_BattleSystemETB) + * FTB: Free Turn Battle (Req VisuMZ_2_BattleSystemFTB) + * OTB: Order Turn Battle (Req VisuMZ_2_BattleSystemOTB) + * PTB: Press Turn Battle (Req VisuMZ_2_BattleSystemPTB) + * STB: Standard Turn Battle (Req VisuMZ_2_BattleSystemSTB) + * + * - + * + * --- + * + * ============================================================================ + * Plugin Parameters: Color Settings + * ============================================================================ + * + * These settings allow you, the game dev, to have more control over which + * colors appear for what conditions found in the game. You can use regular + * numbers to use the colors predetermined by the game's Window Skin or you + * can use the #rrggbb format for a hex color code. + * + * If the game's Window Skin is changed mid-game, the colors used will still be + * based off the default Window Skin's colors. This is due to storing them in a + * cache and preventing extra processing and reduces lag. + * + * You can find out what hex codes belong to which color from this website: + * https://htmlcolorcodes.com/ + * + * --- + * + * Basic Colors + * - These are colors that almost never change and are used globally throughout + * the in-game engine. + * + * Normal: + * System: + * Crisis: + * Death: + * Gauge Back: + * HP Gauge: + * MP Gauge: + * MP Cost: + * Power Up: + * Power Down: + * CT Gauge: + * TP Gauge: + * Pending Color: + * EXP Gauge: + * MaxLv Gauge: + * - Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * + * --- + * + * Alpha Colors: + * - These are colors that have a bit of transparency to them and are specified + * by the 'rgba(red, green, blue, alpha)' format. + * - Replace 'red' with a number between 0-255 (integer). + * - Replace 'green' with a number between 0-255 (integer). + * - Replace 'blue' with a number between 0-255 (integer). + * - Replace 'alpha' with a number between 0 and 1 (decimal). + * + * Window Font Outline: + * Gauge Number Outline: + * Dim Color: + * Item Back Color: + * - Colors with a bit of alpha settings. + * - Format rgba(0-255, 0-255, 0-255, 0-1) + * + * --- + * + * Conditional Colors: + * - These require a bit of JavaScript knowledge. These determine what colors + * to use under which situations and uses such as different values of HP, MP, + * TP, for comparing equipment, and determine damage popup colors. + * + * JS: Actor HP Color: + * JS: Actor MP Color: + * JS: Actor TP Color: + * - Code used for determining what HP, MP, or TP color to use for actors. + * + * JS: Parameter Change: + * - Code used for determining whatcolor to use for parameter changes. + * + * JS: Damage Colors: + * - Code used for determining what color to use for damage types. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Gold Settings + * ============================================================================ + * + * Gold is the main currency in RPG Maker MZ. The settings provided here will + * determine how Gold appears in the game and certain behaviors Gold has. + * + * --- + * + * Gold Settings + * + * Gold Max: + * - Maximum amount of Gold the party can hold. + * - Default 99999999 + * + * Gold Font Size: + * - Font size used for displaying Gold inside Gold Windows. + * - Default: 26 + * + * Gold Icon: + * - Icon used to represent Gold. + * - Use 0 for no icon. + * + * Gold Overlap: + * - Text used too much Gold to fit in the window. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Image Loading + * ============================================================================ + * + * Not all images are loaded at once in-game. RPG Maker MZ uses asynchronous + * loading which means images are loaded when needed. This may cause delays in + * when you want certain images to appear. However, if an image is loaded + * beforehand, they can be used immediately provided they aren't removed from + * the image cache. + * + * --- + * + * Image Loading + * + * img/animations/: + * img/battlebacks1/: + * img/battlebacks2/: + * img/enemies/: + * img/faces/: + * img/parallaxes/: + * img/pictures/: + * img/sv_actors/: + * img/sv_enemies/: + * img/system/: + * img/tilesets/: + * img/titles1/: + * img/titles2/: + * - Which files do you wish to load from this directory upon starting + * up the game? + * + * --- + * + * ============================================================================ + * Plugin Parameters: Keyboard Input Settings + * ============================================================================ + * + * Settings for the game that utilize keyboard input. These are primarily for + * the name input scene (Scene_Name) and the number input event command. These + * settings have only been tested on English keyboards and may or may not be + * compatible with other languages, so please disable these features if they do + * not fit in with your game. + * + * If a controller is connected upon entering the name change scene, it will + * use the default manual-entry mode instead of the keyboard-entry mode. If a + * controller button is pressed during the keyboard-entry mode, it will + * automatically switch to the manual-entry mode. + * + * This plugin does not provide support for controllers that are undetected by + * RPG Maker MZ's default controller support. + * + * --- + * + * Controls + * + * WASD Movement: + * - Enables or disables WASD movement for your game project. + * - Moves the W page down button to E. + * + * R Button: Dash Toggle: + * - Enables or disables R button as an Always Dash option toggle. + * + * --- + * + * Name Input + * + * Enable?: + * - Enables keyboard input for name entry. + * - Only tested with English keyboards. + * + * Default Mode: + * - Select default mode when entering the scene. + * - Default - Uses Arrow Keys to select letters. + * - Keyboard - Uses Keyboard to type in letters. + * + * QWERTY Layout: + * - Uses the QWERTY layout for manual entry. + * + * Keyboard Message: + * - The message displayed when allowing keyboard entry. + * - You may use text codes here. + * + * Banned Words: + * - Players cannot use these words for names. + * - These include words inside the names. + * - If a banned word is used, a buzzer sound will play. + * + * --- + * + * Number Input + * + * Enable?: + * - Enables keyboard input for number entry. + * - Only tested with English keyboards. + * + * --- + * + * Button Assist + * + * Switch to Keyboard: + * - Text used to describe the keyboard switch. + * + * Switch To Manual: + * - Text used to describe the manual entry switch. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Menu Background Settings + * ============================================================================ + * + * These settings in the Plugin Parameters allow you to adjust the background + * images used for each of the scenes. The images will be taken from the game + * project folders img/titles1/ and img/titles2/ to load into the game. + * + * These settings are only available to scenes found within the Main Menu, the + * Shop scene, and the Actor Naming scene. + * + * --- + * + * Menu Background Settings: + * + * Scene_Menu: + * Scene_Item: + * Scene_Skill: + * Scene_Equip: + * Scene_Status: + * Scene_Options: + * Scene_Save: + * Scene_Load: + * Scene_GameEnd: + * Scene_Shop: + * Scene_Name: + * - Individual background settings for the scene. + * + * Scene_Unlisted + * - Individual background settings for any scenes that aren't listed above. + * + * --- + * + * Background Settings + * + * Snapshop Opacity: + * - Snapshot opacity for the scene. + * + * Background 1: + * - Filename used for the bottom background image. + * - Leave empty if you don't wish to use one. + * + * Background 2: + * - Filename used for the upper background image. + * - Leave empty if you don't wish to use one. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Menu Button Assist Window + * ============================================================================ + * + * In most modern RPG's, there exist small windows on the screen which tell the + * player what the control schemes are for that scene. This plugin gives you + * the option to add that window to the menu scenes in the form of a Button + * Assist Window. + * + * --- + * + * General + * + * Enable: + * - Enable the Menu Button Assist Window. + * + * Location: + * - Determine the location of the Button Assist Window. + * - Requires Plugin Parameters => UI => Side Buttons ON. + * + * Background Type: + * - Select background type for this window. + * + * --- + * + * Text + * + * Text Format: + * - Format on how the buttons are displayed. + * - Text codes allowed. %1 - Key, %2 - Text + * + * Multi-Key Format: + * - Format for actions with multiple keys. + * - Text codes allowed. %1 - Key 1, %2 - Key 2 + * + * OK Text: + * Cancel Text: + * Switch Actor Text: + * - Default text used to display these various actions. + * + * --- + * + * Keys + * + * Key: Unlisted Format: + * - If a key is not listed below, use this format. + * - Text codes allowed. %1 - Key + * + * Key: Up: + * Key: Down: + * Key: Left: + * Key: Right: + * Key: Shift: + * Key: Tab: + * Key: A through Z: + * - How this key is shown in-game. + * - Text codes allowed. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Menu Layout Settings + * ============================================================================ + * + * These settings allow you to rearrange the positions of the scenes accessible + * from the Main Menu, the Shop scene, and the Actor Naming scene. This will + * require you to have some JavaScript knowledge to make the windows work the + * way you would like. + * + * --- + * + * Menu Layout Settings + * + * Scene_Title: + * Scene_Menu: + * Scene_Item: + * Scene_Skill: + * Scene_Equip: + * Scene_Status: + * Scene_Options: + * Scene_Save: + * Scene_Load: + * Scene_GameEnd: + * Scene_Shop: + * Scene_Name: + * - Various options on adjusting the selected scene. + * + * --- + * + * Scene Window Settings + * + * Background Type: + * - Selects the background type for the selected window. + * - Window + * - Dim + * - Transparent + * + * JS: X, Y, W, H + * - Code used to determine the dimensions for the selected window. + * + * --- + * + * Scene_Title Settings + * - The following are settings unique to Scene_Title. + * + * Title Screen + * + * Document Title Format: + * - Format to display text in document title. + * - %1 - Main Title, %2 - Subtitle, %3 - Version + * + * Subtitle: + * - Subtitle to be displayed under the title name. + * + * Version: + * - Version to be display in the title screen corner. + * + * JS: Draw Title: + * - Code used to draw the game title. + * + * JS: Draw Subtitle: + * - Code used to draw the game subtitle. + * + * JS: Draw Version: + * - Code used to draw the game version. + * + * Button Fade Speed: + * - Speed at which the buttons fade in at (1-255). + * + * --- + * + * Scene_GameEnd Settings + * - The following are settings unique to Scene_GameEnd. + * + * Command Window List: + * - Window commands used by the title screen. + * - Add new commands here. + * + * --- + * + * Command Window List + * - This is found under Scene_Title and Scene_GameEnd settings. + * + * Symbol: + * - The symbol used for this command. + * + * STR: Text: + * - Displayed text used for this title command. + * - If this has a value, ignore the JS: Text version. + * + * JS: Text: + * - JavaScript code used to determine string used for the displayed name. + * + * JS: Show: + * - JavaScript code used to determine if the item is shown or not. + * + * JS: Enable: + * - JavaScript code used to determine if the item is enabled or not. + * + * JS: Ext: + * - JavaScript code used to determine any ext data that should be added. + * + * JS: Run Code: + * - JavaScript code that runs once this command is selected. + * + * --- + * + * Title Picture Buttons: + * - This is found under Scene_Title settings. + * + * Picture's Filename: + * - Filename used for the picture. + * + * Button URL: + * - URL for the button to go to upon being clicked. + * + * JS: Position: + * - JavaScript code that helps determine the button's Position. + * + * JS: On Load: + * - JavaScript code that runs once this button bitmap is loaded. + * + * JS: Run Code: + * - JavaScript code that runs once this button is pressed. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Parameter Settings + * ============================================================================ + * + * A battler's parameters, or stats as some devs know them as, are the values + * that determine how a battler performs. These settings allow you to alter + * their behaviors and give boosts to trait objects in a controlled manner. + * + * --- + * + * Parameter Settings + * + * Displayed Parameters + * - A list of the parameters that will be displayed in-game. + * - Shown in the Equip Menu. + * - Shown in the Status Menu. + * + * Extended Parameters + * - The list shown in extended scenes (for other VisuStella plugins). + * + * --- + * + * === Basic Parameters === + * + * MHP - MaxHP + * - This is the maximum health points value. The amount of health points (HP) + * a battler has determines whether or not the battler is in a living state or + * a dead state. If the HP value is above 0, then the battler is living. If it + * is 0 or below, the battler is in a dead state unless the battler has a way + * to counteract death (usually through immortality). When the battler takes + * damage, it is usually dealt to the HP value and reduces it. If the battler + * is healed, then the HP value is increased. The MaxHP value determines what's + * the maximum amount the HP value can be held at, meaning the battler cannot + * be healed past that point. + * + * MMP - MaxMP + * - This is the maximum magic points value. Magic points (MP) are typically + * used for the cost of skills and spells in battle. If the battler has enough + * MP to fit the cost of the said skill, the battler is able to use the said + * skill provided that all of the skill's other conditions are met. If not, the + * battler is then unable to use the skill. Upon using a skill that costs MP, + * the battler's MP is reduced. However, the battler's MP can be recovered and + * results in a gain of MP. The MaxMP value determines what is the maximum + * amount the MP value can be held at, meaning the battler cannot recover MP + * past the MaxMP value. + * + * ATK - Attack + * - This is the attack value of the battler. By default, this stat is used for + * the purpose of damage calculations only, and is typically used to represent + * the battler's physical attack power. Given normal damage formulas, higher + * values mean higher damage output for physical attacks. + * + * DEF - Defense + * - This is the defense value of the battler. By default, this stat is used + * for the purpose of damage calculations only, and is typically used to + * represent the battler's physical defense. Given normal damage formulas, + * higher values mean less damage received from physical attacks. + * + * MAT - Magic Attack + * - This is the magic attack value of the battler. By default, this stat is + * used for the purpose of damage calculations only, and is typically used to + * represent the battler's magical attack power. Given normal damage formulas, + * higher values mean higher damage output for magical attacks. + * + * MDF - Magic Defense + * - This is the magic defense value of the battler. By default, this stat is + * used for the purpose of damage calculations only, and is typically used to + * represent the battler's magical defense. Given normal damage formulas, + * higher values mean less damage received from magical attacks. + * + * AGI - Agility + * - This is the agility value of the battler. By default, this stat is used to + * determine battler's position in the battle turn's order. Given a normal turn + * calculation formula, the higher the value, the faster the battler is, and + * the more likely the battler will have its turn earlier in a turn. + * + * LUK - Luck + * - This is the luck value of the battler. By default, this stat is used to + * affect the success rate of states, buffs, and debuffs applied by the battler + * and received by the battler. If the user has a higher LUK value, the state, + * buff, or debuff is more likely to succeed. If the target has a higher LUK + * value, then the state, buff, or debuff is less likely to succeed. + * + * --- + * + * Basic Parameters + * + * HP Crisis Rate: + * - HP Ratio at which a battler can be considered in crisis mode. + * + * JS: Formula: + * - Formula used to determine the total value all 8 basic parameters: + * - MaxHP, MaxMP, ATK, DEF, MAT, MDF, AGI, LUK. + * + * Parameter Caps: + * + * MaxHP Cap: + * MaxMP Cap: + * ATK Cap: + * DEF Cap: + * MAT Cap: + * MDF Cap: + * AGI Cap: + * LUK Cap: + * - Formula used to determine the selected parameter's cap. + * - These settings DO NOT raise the editor's maximum values. If you want to + * raise an enemy's maximum parameter value past their default cap, use the + * associated notetag for them instead. + * + * --- + * + * === X Parameters === + * + * HIT - Hit Rate% + * - This determines the physical hit success rate of the any physical action. + * All physical attacks make a check through the HIT rate to see if the attack + * will connect. If the HIT value passes the randomizer check, the attack will + * connect. If the HIT value fails to pass the randomizer check, the attack + * will be considered a MISS. + * + * EVA - Evasion Rate% + * - This determines the physical evasion rate against any incoming physical + * actions. If the HIT value passes, the action is then passed to the EVA check + * through a randomizer check. If the randomizer check passes, the physical + * attack is evaded and will fail to connect. If the randomizer check passes, + * the attempt to evade the action will fail and the action connects. + * + * CRI - Critical Hit Rate% + * - Any actions that enable Critical Hits will make a randomizer check with + * this number. If the randomizer check passes, extra damage will be carried + * out by the initiated action. If the randomizer check fails, no extra damage + * will be added upon the action. + * + * CEV - Critical Evasion Rate% + * - This value is put against the Critical Hit Rate% in a multiplicative rate. + * If the Critical Hit Rate is 90% and the Critical Evasion Rate is + * 20%, then the randomizer check will make a check against 72% as the values + * are calculated by the source code as CRI * (1 - CEV), therefore, with values + * as 0.90 * (1 - 0.20) === 0.72. + * + * MEV - Magic Evasion Rate% + * - Where EVA is the evasion rate against physical actions, MEV is the evasion + * rate against magical actions. As there is not magical version of HIT, the + * MEV value will always be bit against when a magical action is initiated. If + * the randomizer check passes for MEV, the magical action will not connect. If + * the randomizer check fails for MEV, the magical action will connect. + * + * MRF - Magic Reflect Rate% + * - If a magical action connects and passes, there is a chance the magical + * action can be bounced back to the caster. That chance is the Magic Reflect + * Rate. If the randomizer check for the Magic Reflect Rate passes, then the + * magical action is bounced back to the caster, ignoring the caster's Magic + * Evasion Rate. If the randomizer check for the Magic Reflect Rate fails, then + * the magical action will connect with its target. + * + * CNT - Counter Attack Rate% + * - If a physical action connects and passes, there is a chance the physical + * action can be avoided and a counter attack made by the user will land on the + * attacking unit. This is the Counter Attack Rate. If the randomizer check for + * the Counter Attack Rate passes, the physical action is evaded and the target + * will counter attack the user. If the randomizer check fails, the physical + * action will connect to the target. + * + * HRG - HP% Regeneration + * - During a battler's regeneration phase, the battler will regenerate this + * percentage of its MaxHP as gained HP with a 100% success rate. + * + * MRG - MP% Regeneration + * - During a battler's regeneration phase, the battler will regenerate this + * percentage of its MaxMP as gained MP with a 100% success rate. + * + * TRG - TP% Regeneration + * - During a battler's regeneration phase, the battler will regenerate this + * percentage of its MaxTP as gained TP with a 100% success rate. + * + * --- + * + * X Parameters + * + * JS: Formula: + * - Formula used to determine the total value all 10 X parameters: + * - HIT, EVA, CRI, CEV, MEV, MRF, CNT, HRG, MRG, TRG. + * + * Vocabulary + * + * HIT: + * EVA: + * CRI: + * CEV: + * MEV: + * MRF: + * CNT: + * HRG: + * MRG: + * TRG: + * - In-game vocabulary used for the selected X Parameter. + * + * --- + * + * === S Parameters === + * + * TGR - Target Rate + * - Against the standard enemy, the Target Rate value determines the odds of + * an enemy specifically targeting the user for a single target attack. At 0%, + * the enemy will almost never target the user. At 100%, it will have normal + * targeting opportunity. At 100%+, the user will have an increased chance of + * being targeted. + * *NOTE: For those using the Battle A.I. Core, any actions that have specific + * target conditions will bypass the TGR rate. + * + * GRD - Guard Effect + * - This is the effectiveness of guarding. This affects the guard divisor + * value of 2. At 100% GRD, damage will become 'damage / (2 * 1.00)'. At 50% + * GRD, damage will become 'damage / (2 * 0.50)'. At 200% GRD, damage will + * become 'damage / (2 * 2.00)' and so forth. + * + * REC - Recovery Effect + * - This is how effective heals are towards the user. The higher the REC rate, + * the more the user is healed. If a spell were to heal for 100 and the user + * has 300% REC, then the user is healed for 300 instead. + * + * PHA - Pharmacology + * - This is how effective items are when used by the user. The higher the PHA + * rate, the more effective the item effect. If the user is using a Potion that + * recovers 100% on a target ally and the user has 300% PHA, then the target + * ally will receive healing for 300 instead. + * + * MCR - MP Cost Rate + * - This rate affects how much MP skills with an MP Cost will require to use. + * If the user has 100% MCR, then the MP Cost will be standard. If the user has + * 50% MCR, then all skills that cost MP will cost only half the required MP. + * If the user has 200% MCR, then all skills will cost 200% their MP cost. + * + * TCR - TP Charge Rate + * - This rate affects how much TP skills with an TP will charge when gaining + * TP through various actions. At 100%, TP will charge normally. At 50%, TP + * will charge at half speed. At 200%, TP will charge twice as fast. + * + * PDR - Physical Damage Rate + * - This rate affects how much damage the user will take from physical damage. + * If the user has 100% PDR, then the user takes the normal amount. If the user + * has 50% PDR, then all physical damage dealt to the user is halved. If the + * user has 200% PDR, then all physical damage dealt to the user is doubled. + * + * MDR - Magical Damage Rate + * - This rate affects how much damage the user will take from magical damage. + * If the user has 100% MDR, then the user takes the normal amount. If the user + * has 50% MDR, then all magical damage dealt to the user is halved. If the + * user has 200% MDR, then all magical damage dealt to the user is doubled. + * + * FDR - Floor Damage Rate + * - On the field map, this alters how much damage the user will take when the + * player walks over a tile that damages the party. The FDR value only affects + * the damage dealt to the particular actor and not the whole party. If FDR is + * at 100%, then the user takes the full damage. If FDR is at 50%, then only + * half of the damage goes through. If FDR is at 200%, then floor damage is + * doubled for that actor. + * + * EXR - Experience Rate + * - This determines the amount of experience gain the user whenever the user + * gains any kind of EXP. At 100% EXR, the rate of experience gain is normal. + * At 50%, the experience gain is halved. At 200%, the experience gain for the + * user is doubled. + * + * --- + * + * S Parameters + * + * JS: Formula + * - Formula used to determine the total value all 10 S parameters: + * - TGR, GRD, REC, PHA, MCR, TCR, PDR, MDR, FDR, EXR. + * + * Vocabulary + * + * TGR: + * GRD: + * REC: + * PHA: + * MCR: + * TCR: + * PDR: + * MDR: + * FDR: + * EXR: + * - In-game vocabulary used for the selected S Parameter. + * + * --- + * + * Icons + * + * Draw Icons? + * - Draw icons next to parameter names? + * + * MaxHP, MaxMP, ATK, DEF, MAT, MDF, AGI, LUK: + * HIT, EVA, CRI, CEV, MEV, MRF, CNT, HRG, MRG, TRG: + * TGR, GRD, REC, PHA, MCR, TCR, PDR, MDR, FDR, EXR: + * - Icon used for the selected parameter. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Custom Parameters Settings + * ============================================================================ + * + * As of version 1.07, you can add Custom Parameters to your game if RPG Maker + * MZ's default set of parameters isn't enough for you. These parameters can + * have variable functionality depending on how you code it. More importantly, + * these are compatible with the VisuStella MZ menus and the VisuStella Core + * Engine's Parameters settings. + * + * For clarification, these settings do NOT create brand-new parameters for you + * to use and add to your game nor are the bonuses supported by other plugins + * in the VisuStella MZ library. These settings exist to function as a bridge + * for non-VisuStella MZ plugins that have created their own parameter values + * and to show them inside VisuStella menus. + * + * --- + * + * Custom Parameter + * + * Parameter Name: + * - What's the parameter's name? + * - Used for VisuStella MZ menus. + * + * Abbreviation: + * - What abbreviation do you want to use for the parameter? + * - Do not use special characters. Avoid numbers if possible. + * + * Icon: + * - What icon do you want to use to represent this parameter? + * - Used for VisuStella MZ menus. + * + * Type: + * - What kind of number value will be returned with this parameter? + * - Integer (Whole Numbers Only) + * - Float (Decimals are Allowed) + * + * JS: Value: + * - Run this code when this parameter is to be returned. + * + * --- + * + * Instructions on Adding Custom Parameters to VisuStella Menus + * + * In the Core Engine and Elements and Status Menu Core plugins, there are + * plugin parameter fields for you to insert the parameters you want displayed + * and visible to the player. + * + * Insert in those the abbreviation of the custom parameter. For example, if + * you want to add the "Strength" custom parameter and the abbreviation is + * "str", then add "str" to the Core Engine/Elements and Status Menu Core's + * plugin parameter field for "Strength" to appear in-game. Case does not + * matter here so you can insert "str" or "STR" and it will register all the + * same to make them appear in-game. + * + * --- + * + * Instructions on Using Custom Parameters as Mechanics + * + * If you want to use a custom parameter in, say, a damage formula, refer to + * the abbreviation you have set for the custom parameter. For example, if you + * want to call upon the "Strength" custom parameter's value and its set + * abbreviation is "str", then refer to it as such. This is case sensitive. + * + * An example damage formula would be something like the following if using + * "str" for "Strength" and "con" for "Constitution": + * + * a.str - b.con + * + * These values are attached to the Game_Battlerbase prototype class. + * + * --- + * + * Instructions on Setting Custom Parameter Values + * + * This requires JavaScript knowledge. There is no way around it. Whatever code + * you insert into the "JS: Value" field will return the value desired. The + * 'user' variable will refer to the Game_Battlerbase prototype object in which + * the information is to be drawn from. + * + * Depending on the "type" you've set for the Custom Parameter, the returned + * value will be rounded using Math.round for integers and left alone if set as + * a float number. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Screen Resolution Settings + * ============================================================================ + * + * Alter various properties to make the game look better for varying screen + * resolutions. This is mostly for RPG Maker MZ version 1.3.0 and up where the + * Troops tab has been updated to match the screen resolution settings found in + * the System 2 Database tab. + * + * --- + * + * Troops + * + * Reposition Actors: + * - Update the position of actors in battle if the screen resolution + * has changed to become larger than 816x624. + * - Ignore if using the VisuStella MZ Battle Core. + * - When using the VisuStella MZ Battle Core, adjust the position through + * Battle Core > Parameters > Actor Battler Settings > JS: Home Position + * + * Reposition Enemies: + * - Update the position of enemies in battle if the screen resolution + * has changed to become larger than 816x624. + * + * For MZ 1.3.0+?: + * - Both this parameter and its parent parameter need to be on when using + * RPG Maker MZ 1.3.0+. + * - If the Core Script is below 1.3.0, this setting is ignored. This does + * not take into account what version the editor is on. Pay attention to + * that as the plugin will not auto adjust for it. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Screen Shake Settings + * ============================================================================ + * + * Get more screen shake effects into your game! + * + * These effects have been added by Aries of Sheratan! + * + * --- + * + * Settings + * + * Default Style: + * - The default style used for screen shakes. + * - Original + * - Random + * - Horizontal + * - Vertical + * + * JS: Original Style: + * JS: Random Style + * JS: Horizontal Style + * JS: Vertical Style + * - This code gives you control over screen shake for this screen + * shake style. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Title Command List Settings + * ============================================================================ + * + * This plugin parameter allows you to adjust the commands that appear on the + * title screen. Some JavaScript knowledge is needed. + * + * --- + * + * Title Command + * + * Symbol: + * - The symbol used for this command. + * + * STR: Text: + * - Displayed text used for this title command. + * - If this has a value, ignore the JS: Text version. + * + * JS: Text: + * - JavaScript code used to determine string used for the displayed name. + * + * JS: Show: + * - JavaScript code used to determine if the item is shown or not. + * + * JS: Enable: + * - JavaScript code used to determine if the item is enabled or not. + * + * JS: Ext: + * - JavaScript code used to determine any ext data that should be added. + * + * JS: Run Code: + * - JavaScript code that runs once this command is selected. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Title Picture Buttons Settings + * ============================================================================ + * + * These allow you to insert picture buttons on your title screen that can + * send users to various links on the internet when clicked. + * + * --- + * + * Settings + * + * Picture's Filename: + * - Filename used for the picture. + * + * Button URL: + * - URL for the button to go to upon being clicked. + * + * JS: Position: + * - JavaScript code that helps determine the button's Position. + * + * JS: On Load: + * - JavaScript code that runs once this button bitmap is loaded. + * + * JS: Run Code: + * - JavaScript code that runs once this button is pressed. + * + * --- + * + * ============================================================================ + * Plugin Parameters: UI Settings + * ============================================================================ + * + * In previous iterations of RPG Maker, the Core Engine would allow you to + * change the screen resolution. In MZ, that functionality is provided by + * default but a number of UI settings still remain. These settings allow you + * adjust how certain in-game objects and menus are displayed. + * + * --- + * + * UI Area + * + * Fade Speed: + * - Default fade speed for transitions. + * + * Box Margin: + * - Set the margin in pixels for the screen borders. + * + * Command Window Width: + * - Sets the width for standard Command Windows. + * + * Bottom Help Window: + * - Put the Help Window at the bottom of the screen? + * + * Right Aligned Menus: + * - Put most command windows to the right side of the screen. + * + * Show Buttons: + * - Show clickable buttons in your game? + * + * Show Cancel Button: + * Show Menu Button: + * Show Page Up/Down: + * Show Number Buttons: + * - Show/hide these respective buttons if the above is enabled. + * - If 'Show Buttons' is false, these will be hidden no matter what. + * + * Button Area Height: + * - Sets the height for the button area. + * + * Bottom Buttons: + * - Put the buttons at the bottom of the screen? + * + * Side Buttons: + * - Push buttons to the side of the UI if there is room. + * + * --- + * + * Larger Resolutions + * + * --- + * + * Menu Objects + * + * Level -> EXP Gauge: + * - Draw an EXP Gauge under the drawn level. + * + * Parameter Arrow: + * - The arrow used to show changes in the parameter values. + * + * --- + * + * Text Code Support + * + * Class Names: + * - Make class names support text codes? + * + * Nicknames: + * - Make nicknames support text codes? + * + * --- + * + * ============================================================================ + * Plugin Parameters: Window Settings + * ============================================================================ + * + * Adjust the default settings of the windows in-game. This ranges from things + * such as the line height (to better fit your font size) to the opacity level + * (to fit your window skins). + * + * --- + * + * Window Defaults + * + * Line Height: + * - Default line height used for standard windows. + * + * Item Height Padding: + * - Default padding for selectable items. + * + * Item Padding: + * - Default line padding used for standard windows. + * + * Back Opacity: + * - Default back opacity used for standard windows. + * - As of version 1.3.0, this is no longer needed. + * - This will still work for lower versions. + * + * Translucent Opacity: + * - Default translucent opacity used for standard windows. + * + * Window Opening Speed: + * - Default open speed used for standard windows. + * - Default: 32 (Use a number between 0-255) + * + * Column Spacing: + * - Default column spacing for selectable windows. + * - Default: 8 + * + * Row Spacing: + * - Default row spacing for selectable windows. + * - Default: 4 + * + * --- + * + * Selectable Items: + * + * Show Background?: + * - Selectable menu items have dark boxes behind them. Show them? + * + * Item Height Padding: + * - Default padding for selectable items. + * + * JS: Draw Background: + * - Code used to draw the background rectangle behind clickable menu objects + * + * --- + * + * ============================================================================ + * Plugin Parameters: JS: Quick Functions + * ============================================================================ + * + * WARNING: This feature is highly experimental! Use it at your own risk! + * + * JavaScript Quick Functions allow you to quickly declare functions in the + * global namespace for ease of access. It's so that these functions can be + * used in Script Calls, Control Variable Script Inputs, Conditional Branch + * Script Inputs, Damage Formulas, and more. + * + * --- + * + * JS: Quick Function + * + * Function Name: + * - The function's name in the global namespace. + * - Will not overwrite functions/variables of the same name. + * + * JS: Code: + * - Run this code when using the function. + * + * --- + * + * If you have a Function Name of "Example", then typing "Example()" in a + * Script Call, Conditional Branch Script Input, or similar field will yield + * whatever the code is instructed to return. + * + * If a function or variable of a similar name already exists in the global + * namespace, then the quick function will be ignored and not created. + * + * If a quick function contains bad code that would otherwise crash the game, + * a fail safe has been implemented to prevent it from doing so, display an + * error log, and then return a 0 value. + * + * --- + * + * ============================================================================ + * Terms of Use + * ============================================================================ + * + * 1. These plugins may be used in free or commercial games provided that they + * have been acquired through legitimate means at VisuStella.com and/or any + * other official approved VisuStella sources. Exceptions and special + * circumstances that may prohibit usage will be listed on VisuStella.com. + * + * 2. All of the listed coders found in the Credits section of this plugin must + * be given credit in your games or credited as a collective under the name: + * "VisuStella". + * + * 3. You may edit the source code to suit your needs, so long as you do not + * claim the source code belongs to you. VisuStella also does not take + * responsibility for the plugin if any changes have been made to the plugin's + * code, nor does VisuStella take responsibility for user-provided custom code + * used for custom control effects including advanced JavaScript notetags + * and/or plugin parameters that allow custom JavaScript code. + * + * 4. You may NOT redistribute these plugins nor take code from this plugin to + * use as your own. These plugins and their code are only to be downloaded from + * VisuStella.com and other official/approved VisuStella sources. A list of + * official/approved sources can also be found on VisuStella.com. + * + * 5. VisuStella is not responsible for problems found in your game due to + * unintended usage, incompatibility problems with plugins outside of the + * VisuStella MZ library, plugin versions that aren't up to date, nor + * responsible for the proper working of compatibility patches made by any + * third parties. VisuStella is not responsible for errors caused by any + * user-provided custom code used for custom control effects including advanced + * JavaScript notetags and/or plugin parameters that allow JavaScript code. + * + * 6. If a compatibility patch needs to be made through a third party that is + * unaffiliated with VisuStella that involves using code from the VisuStella MZ + * library, contact must be made with a member from VisuStella and have it + * approved. The patch would be placed on VisuStella.com as a free download + * to the public. Such patches cannot be sold for monetary gain, including + * commissions, crowdfunding, and/or donations. + * + * ============================================================================ + * Credits + * ============================================================================ + * + * If you are using this plugin, credit the following people in your game: + * + * Team VisuStella + * * Yanfly + * * Arisu + * * Olivia + * * Irina + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.59: April 7, 2022 + * * Compatibility Update! + * ** RPG Maker MZ 1.4.4 compatibility update! + * *** "Shutdown" command should now be more compatible with other aspects of + * the client when running from Node JS client on other OS's. + * + * Version 1.58: March 24, 2022 + * * Feature Update! + * ** Plugin Commands now have separators for easier selection. + * + * Version 1.57: March 3, 2022 + * * Compatibility Update! + * ** The "Shutdown" command from the title screen should now be compatible + * with RPG Maker MZ 1.4.4 and up. Update made by Olivia. + * + * Version 1.56: February 10, 2022 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New features added by Arisu and sponsored by Anon: + * *** Plugin Parameters > QoL > Misc > Shortcut Scripts + * **** Enables shortcut-based script variables and functions that can be used + * for script calls. + * **** Shortcut list enabled for this is as follows: + * ***** $commonEvent(id), $onceParallel(id), $scene, $spriteset, $subject, + * $targets, $target, $event + * ***** For more information on how to use them, review the help file. + * + * Version 1.55: January 27, 2022 + * * Feature Update! + * ** Once Parallels for the map are now able to update even while other events + * are running. Update made by Arisu. + * + * Version 1.54: January 13, 2022 + * * Bug Fixes! + * ** RPG Maker MZ Bug Fix! + * *** Overly-Protective Substitute + * *** When an ally with critical health is being targeted by a friendly non- + * Certain Hit skill (such as a heal or buff) and another ally has the + * substitute state, the other ally would "protect" the originally targeted + * ally and take the heal or buff. + * *** The new changed behavior is that now, substitute will not trigger for + * any actions whose scope targets allies. + * *** Fix made by Olivia. + * * Documentation Update! + * ** Added documentation for new MZ Bug: Overly-Protective Substitute. + * * Feature Update! + * ** Added a failsafe for those who did not update the plugin parameter + * settings and are using MV Animations. + * + * Version 1.53: December 30, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Notetag added by Olivia: + * *** + * **** Allows you to adjust the update for this MV Animation. + * ***** Does NOT work with Effekseer animations. + * **** The lower the number, the faster. + * **** Replace 'x' with a number representing the animation update rate. + * ***** Default rate: 4. + * ***** Minimum rate: 1. + * ***** Maximum rate: 10. + * ** New Plugin Parameter added by Olivia: + * *** Plugin Parameters > Qualify of Life Settings > MV Animation Rate + * **** Adjusts the rate at which MV animations play. + * **** Default: 4. Lower for faster. Higher for slower. + * * Optimization Update! + * ** MV Animations should run more optimized. + * + * Version 1.52: December 16, 2021 + * * Compatibility Update! + * ** RPG Maker MZ 1.4.0 compatibility update! + * *** MV Animations played on screen level will now show up properly in the + * center of the screen. + * + * Version 1.51: December 9, 2021 + * * Bug Fixes! + * ** RPG Maker MZ Bug Fix! + * *** In the battle status windows, whenever actor names are displayed, the + * bitmap used to display their name text do not extend vertically all the + * way, causing letters like lowercase "Q" and "G" to be cut off, making + * them hard to distinguish from one another. The Core Engine will remedy + * this by extending the bitmap to allow enough room. Fix made by Irina. + * + * Version 1.50: November 4, 2021 + * * Bug Fixes! + * ** RPG Maker MZ Bug Fix! + * *** By default, if the attack skill is sealed via a trait and an actor has + * auto-battle, the action can still be used via auto-battle. This is now + * fixed and actors should not be able to attack via auto-battle if their + * attack ability is sealed. Fix made by Yanfly. + * * Documentation Update! + * ** Help file updated for new RPG Maker MZ bug fix. + * + * Version 1.49: October 28, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Feature! + * ** New Plugin Command added by Arisu and sponsored by Anon: + * *** Map: Once Parallel + * **** Plays a Common Event parallel to the event once without repeating + * itself when done. Map only! + * **** When exiting map scene or changing maps, all Once Parallels are cleared + * **** Once Parallels are not retained upon reentering the scene or map. + * **** Once Parallels are not stored in memory and cannot be saved. + * + * Version 1.48: October 21, 2021 + * * Feature Update! + * ** Bitmap.blt function will now have source coordinates and destination X + * and Y coordinates rounded to prevent blurring. Update made by Olivia. + * + * Version 1.47: October 14, 2021 + * * Bug Fixes! + * ** Prevents Number Input window from having a NaN value due to holding down + * the fast forward key. Fix made by Arisu. + * * Compatibility Update + * ** Added compatibility functionality for future plugins. + * * Documentation Update! + * ** Help file updated for new features. + * * New Feature! + * ** New Plugin Parameter added by Yanfly: + * *** Plugin Parameters > QoL Settings > Misc > Font Width Fix + * **** Fixes the font width issue with non-monospaced fonts in the Message + * Window. This is now an optional fix. + * + * Version 1.46: September 23, 2021 + * * Documentation Update! + * ** Added line to Plugin Command: "System: Battle System Change": + * *** Some battle systems REQUIRE their specific plugins! + * ** Added lines to "Plugin Parameters: Battle System": + * *** Some battle systems REQUIRE their specific plugins! This means if you do + * not have the required battle system plugin installed, it will not change + * over. The Core Engine plugin does not contain data for all of the battle + * systems inside its code. + * + * Version 1.45: September 17, 2021 + * * Bug Fixes! + * ** Fixed a problem with "Picture: Coordinates Mode" to properly utilize the + * correct picture ID. Fix made by Arisu. + * ** RPG Maker MZ Bug Fix: + * *** Instant Text Discrepancy for Window_Message + * **** Window_Message displays text differently when it draws letters one by + * one versus when the text is displayed instantly. This isn't noticeable + * with the default font, but it's very visible when using something like + * Arial. The error is due to Bitmap.measureTextWidth yielding a rounded + * value per letter versus per word. The Core Engine will provide a bug + * fix that will single out the cause and make it so that only + * Window_Message will not utilize any round number values when + * determining the width of each letter, whether or not it is shown + * instantly. This change will only affect Window_Message and not any + * other window in order to prevent unintended side effects. + * **** Fix made by Yanfly. + * * Compatibility Update! + * ** RPG Maker MZ 1.3.3 compatibility. + * *** Updated how gauges are drawn. + * * Documentation Update! + * ** Help file updated for new RPG Maker MZ bug fix. + * + * Version 1.44: August 20, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Command added by Irina and sponsored by Anon. + * *** "Animation: Play at Coordinate" + * **** Plays an animation on the screen at a specific x, y coordinate even if + * there is no sprite attached. + * + * Version 1.43: July 23, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Command added by Irina and sponsored by Archeia! + * *** "Picture: Coordinates Mode" + * **** Play Test Mode only! + * **** Gets the coordinates of a specific picture as you move it across the + * screen. + * **** Helpful for those who don't want to do guess work on the screen + * coordinates when it comes to placing down pictures. + * + * Version 1.42: July 16, 2021 + * * Documentation Update + * ** Added text to "Plugin Parameters: Color Settings" for clarification: + * *** If the game's Window Skin is changed mid-game, the colors used will + * still be based off the default Window Skin's colors. This is due to + * storing them in a cache and preventing extra processing and reduces lag. + * + * Version 1.41: July 2, 2021 + * * Compatibility Update + * ** Further compatibility update with RPG Maker MZ 1.3.0+. + * * Documentation Update + * ** Added extra notes to "Important Changes: Bug Fixes" section for the + * "Window Skin Bleeding" bug: + * *** This bug is fixed in the core scripts for RPG Maker MZ v1.3.0+. + * + * Version 1.40: June 25, 2021 + * * Compatibility Update + * ** Compatibility update with RPG Maker MZ 1.3.0+. + * * Documentation Update: + * ** Plugin Parameters > Window Settings > Back Opacity + * *** As of version 1.3.0, this is no longer needed. + * *** This will still work for lower versions. + * ** Help file updated for new features. + * * Feature Updates! + * ** Window Skin Bleeding fix updated to newest version. + * * New Plugin Parameters added: + * ** Plugin Parmaeters > Screen Resolution Settings + * *** These settings have been moved from the UI settings to be its own thing. + * **** This is mostly for RPG Maker MZ version 1.3.0 and up where the Troops + * tab has been updated to match the screen resolution settings found in + * the System 2 Database tab. + * *** Reposition Enemies > For MZ 1.3.0+? + * **** Both of these plugin parameters need to be set to true in order for the + * repositioning to work for MZ v1.3.0. + * **** If the Core Script is below 1.3.0, this setting is ignored. This does + * not take into account what version the editor is on. Pay attention to + * that as the plugin will not auto adjust for it. + * + * Version 1.39: June 18, 2021 + * * Bug Fixes! + * ** Number Inputs should now work with the controller if keyboard Number + * Input is enabled. Fix made by Olivia. + * ** RPG Maker Bug: Termination Clear Effects + * *** In RPG Maker MZ, requesting an animation while transitioning between + * scenes, such as going from the map scene to the battle scene, can cause + * crashes. This is because the animation queue does not take off + * immediately and will likely register incorrect targets for the scene. + * This plugin will forcefully clear any registered animations and balloon + * effects when terminating a scene in order to prevent crashes. + * * Documentation Update! + * ** Help file updated for updated features. + * * Feature Update! + * ** Troop Name tags can now work with comment tags. + * ** Troop Name tags can now work with comment tags. + * *** Updates made by Irina. + * + * Version 1.38: June 11, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Command added by Irina and sponsored by Caz! + * *** Picture: Show Icon + * **** Shows an icon instead of a picture image. + * **** The picture icon can be controlled like any other picture. + * + * Version 1.37: May 21, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Commands added by Arisu: + * *** Switches: Randomize ID(s) + * *** Switches: Randomize Range + * *** Switches: Toggle ID(s) + * *** Switches: Toggle Range + * **** These Plugin Commands allow you to randomize the ON/OFF positions of + * switches or toggle them so that they flip their ON/OFF status. + * + * Version 1.36: May 14, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Commands added by Irina: + * *** Export: All Maps Text + * *** Export: All Troops Text + * *** Export: Current Map Text + * *** Export: Current Troop Text + * **** Play Test Only Plugin Commands. These Plugin Commands are used for + * extracting all messages, show choices, comments, and scrolling text to + * parse and export them as a TXT file. Useful for getting a game's script + * to a voice actor or voice actress. + * + * Version 1.35: May 7, 2021 + * * Documentation Update! + * ** Added the following text to "Parameter Settings" Plugin Parameters for + * extra clarity regarding Parameter Caps: + * *** These settings DO NOT raise the editor's maximum values. If you want to + * raise an enemy's maximum parameter value past their default cap, use the + * associated notetag for them instead. + * + * Version 1.34: April 23, 2021 + * * Bug Fixes! + * ** For the vanilla Equip Status window, custom parameters with integer + * values will now show up as integers and not percentiles. Fix by Olivia. + * * Documentation Update! + * ** Added clarity to the notetag for enemies. + * *** This notetag does NOT work with X Parameters, S Parameters, or any + * custom parameters. This notetag ONLY works with the base parameters. + * + * Version 1.33: April 9, 2021 + * * Bug Fixes! + * ** RPG Maker MZ Bug: Window Skin Bleeding + * *** Since the v1.2.0 update, Window.prototype._refreshBack's frame value has + * been set from 96 to 95. This results in the window skin bleeding past + * the window's intended borders. The Core Engine now reverts this change + * to prevent the bleeding effect from happening. + * * Feature Update! + * ** "Encounter Rate Minimum" now has a valid minimum value of 1. Update made + * by Olivia. + * + * Version 1.32: April 2, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Parameters added by Yanfly: + * *** Plugin Parameters > QoL Settings > Battle Test > Add Item Type + * *** Plugin Parameters > QoL Settings > Battle Test > Add Weapon Type + * *** Plugin Parameters > QoL Settings > Battle Test > Add Armor Type + * *** Plugin Parameters > QoL Settings > Battle Test > Added Quantity + * **** By default, RPG Maker MZ only adds 99 of items and not weapons or armor + * making it awkward for testing specific battle mechanics. These settings + * allow you to add in custom amounts of items, weapons, and/or armors if + * you so wish. + * + * Version 1.31: March 26, 2021 + * * Feature Update! + * ** Title screen buttons will now become fully opaque when hovered over them + * instead of only when pressed. Update made by Yanfly. + * + * Version 1.30: March 19, 2021 + * * Bug Fixes! + * ** RPG Maker MZ Bug: Invisible Battle Sprites + * *** If you removed a party member during battle and added that exact party + * member back into the same slot, their sprite would appear invisible. The + * VisuStella Core Engine will fix this problem and prevent it from + * happening. Fix made by Olivia. + * * Compatibility Update + * ** Added compatibility functionality for future plugins. + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Parameter added by Arisu: + * *** Plugin Parameters > QoL Settings > Misc > Ani: Mirror Offset + * **** When animations are mirrored, mirror their Offset X values, too. + * ** New animation name tags added by Arisu: + * *** and + * **** If these text tags are placed in an animation's name, it will cause the + * offset X value to be mirrored when the animation is mirrored or have it + * ignored despite being mirrored. + * + * Version 1.29: March 12, 2021 + * * Bug Fixes! + * ** RPG Maker MZ Bug: Interactable window client area does not conform to the + * window's declared scale when the scale is anything but 1.0. This will now + * be fixed through this plugin. Fix made by Olivia. + * * Documentation Update! + * ** Added documentation for new RPG Maker MZ bug fixes! + * ** Help file updated for updated features. + * * Feature Update! + * ** Name Input should be more controller-friendly. If a controller is + * connected upon entering the name change scene, it will use the default + * manual-entry mode instead of the keyboard-entry mode. If a controller + * button is pressed during the keyboard-entry mode, it will automatically + * switch to the manual-entry mode. + * ** This plugin does not provide support for controllers that are undetected + * by RPG Maker MZ's default controller support. + * ** This feature was already implemented since version 1.27 but wasn't + * documented so here we are. Update made by Irina. + * + * Version 1.28: March 5, 2021 + * * Bug Fixes! + * ** RPG Maker MZ Bug: The arrows drawn by a window skin will no longer by + * placed on a half pixel when a window's size is an odd number. This would + * cause sprite tearing problems and look awful. Fix made by Irina. + * * Documentation Update! + * ** Added documentation for new RPG Maker MZ bug fixes! + * + * Version 1.27: February 26, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * ** Moved "Show Scrolling Text, additional functionality" section from Bug + * Fixes to Major Changes as it was placed in the wrong section. + * * New Features! + * ** New Plugin Parameter added by Yanfly. + * *** Plugin Parameters > Keyboard Input > Name Input > Banned Words + * **** Insert words you don't want your players to use for character names. + * + * Version 1.26: February 19, 2021 + * * Bug Fixes! + * ** Certain Plugin Parameters no longer have settings that restrict them to + * a maximum of 1. Fix made by Arisu. + * * Feature Update! + * ** Changed the default value for a New Game > Common Event upon Play Testing + * to 0 to prevent confusion. Update made by Arisu. + * + * Version 1.25: February 5, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** Show Scrolling Text, additional functionality added by Arisu + * *** The event command "Show Scrolling Text" now has additional functionality + * as long as the VisuStella MZ Core Engine is installed. If the game dev + * inserts "// Script Call" (without the quotes) inside the scrolling text, + * then the entirity of the Show Scrolling Text event command will be ran + * as a giant script call event command. + * *** The reason why this functionality is added is because the "Script..." + * event command contains only 12 lines maximum. This means for any script + * call larger than 12 lines of code cannot be done by normal means as each + * script call is ran as a separate instance. + * *** By repurposing the "Show Scrolling Text" event command to be able to + * function as an extended "Script..." event command, such a thing is now + * possible with less hassle and more lines to code with. + * *** This effect does not occur if the Show Scrolling Text event command does + * not have "// Script Call" in its contents. + * + * Version 1.24: January 29, 2021 + * * Documentation Update! + * ** Plugin Parameters: Custom Parameters Settings added the following note: + * *** For clarification, these settings do NOT create brand-new parameters for + * you to use and add to your game nor are the bonuses supported by other + * plugins in the VisuStella MZ library. These settings exist to function + * as a bridge for non-VisuStella MZ plugins that have created their own + * parameter values and to show them inside VisuStella menus. + * * Feature Update! + * ** Default JS Plugin Parameter for the Title Command: "Shutdown" now has a + * note in it that reads: "Do NOT use this command with mobile devices or + * browser games. All it does is cause the game to display a blank, black + * canvas which the player is unable to do anything with. It does NOT force + * close the browser tab nor the app." + * *** This is also why this command is disabled by default for any non-NodeJS + * client deployed game versions. + * ** Disabled some bug fixes made by the Core Engine for the default RMMZ code + * base since the 1.1.1 version now contains those very same fixes. + * + * Version 1.23: January 22, 2021 + * * Optimization Update! + * ** Plugin should run more optimized. + * + * Version 1.22: January 15, 2021 + * * Documentation Update! + * ** Added documentation for new RPG Maker MZ bug fixes! + * * Bug Fixes! + * ** RPG Maker MZ Bug: Sprite_Timer is added to the spriteset for the parent + * scene, making it affected by any filers, zooms, and/or blurs, hindering + * its readability. + * + * Version 1.21: January 8, 2021 + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * New Features! + * ** New Plugin Parameters added by Arisu: + * *** Plugin Parameters > Keyboard Input > Controls > WASD Movement + * *** Plugin Parameters > Keyboard Input > Controls > R Button: Dash Toggle + * + * Version 1.20: January 1, 2021 + * * Compatibility Update! + * ** Added compatibility functionality for future plugins. + * + * Version 1.19: December 25, 2020 + * * Documentation Update! + * ** Added documentation for new feature(s) and feature updates! + * * Bug Fixes! + * ** Fixed typo inside of the comments inside the JS: Quick Functions. + * * Feature Update! + * ** Plugin Parameters > Color Settings > Outline Color is now renamed to + * Font Outline. + * * New Features! + * ** New Plugin Parameters added by Shaz! + * *** Plugin Parameters > Color Settings > Gauge Number Outline + * + * Version 1.18: December 18, 2020 + * * Bug Fixes! + * ** Compatible string text from the Items and Equips Core will no longer + * register MaxHP and MaxMP as percentile values for the info window. + * ** RPG Maker MZ Bug: Gamepads no longer go rapidfire after a cleared input. + * There is now a period of delay for gamepads after an input clear. + * ** RPG Maker MZ Bug: Unusable items on an individual-actor basis will no + * longer be overwritten by party-based usability for battle. Fix by Yanfly. + * ** RPG Maker MV animations will no longer crash for unplayable sound + * effects. Fix made by Yanfly. + * * Compatibility Update! + * ** Plugins should be more compatible with one another. + * * Documentation Update! + * ** Added documentation for new feature(s)! + * ** Added documentation for new RPG Maker MZ bug fixes! + * * New Features! + * ** New Plugin Parameters added by Yanfly! + * *** Plugin Parameters > Button Assist > Key: Shift + * *** Plugin Parameters > Button Assist > Key: Tab + * **** These let you assign text codes to the Shift and Tab buttons for the + * Button Assist windows. + * *** Plugin Parameters > QoL Settings > Misc > NewGame > CommonEvent + * **** For an all version (including non-play test) common event to start new + * games with. + * + * Version 1.17: December 11, 2020 + * * Compatibility Update! + * ** Added compatibility functionality for future plugins. + * + * Version 1.16: December 4, 2020 + * * Compatibility Update! + * ** Plugins should be more compatible with one another. + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * Feature Update! + * ** Button Assist Window for the change name scene will now default to "Tab" + * for switching between both modes. Update made by Yanfly. + * * New Features! + * ** New Plugin Parameter added by Yanfly: + * *** Plugin Parameters > Keyboard Input > Default Mode + * **** Select default mode when entering the scene. + * + * Version 1.15: November 29, 2020 + * * Bug Fixes! + * ** Pressing "Enter" in the change name scene while the actor's name is + * completely empty will no longer result in endless buzzer sounds. Fix made + * by Arisu. + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * Feature Update! + * ** For the name change scene, the "Tab" key now also lets the user switch + * between the two modes. Update made by Yanfly. + * * New Features! + * ** Two new plugin parameters added to Keyboard Input: + * *** "Switch To Keyboard" and "Switch To Manual" + * **** These determine the text used for the button assist window when + * switching between the two modes. Update made by Yanfly. + * **** Button Assist window now takes into consideration for these texts. + * * Optimization Update! + * ** Plugin should run more optimized. + * + * Version 1.14: November 22, 2020 + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * New Features! + * ** New Plugin Command added by Yanfly! + * *** System: Load Images + * **** Allows you to (pre) load up images ahead of time. + * + * Version 1.13: November 15, 2020 + * * Optimization Update! + * ** Plugin should run more optimized. + * + * Version 1.12: November 8, 2020 + * * Compatibility Update! + * ** Plugins should be more compatible with one another. + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * Feature Update! + * ** Screen Shake Plugin Parameters and JS: Quick Function Plugin Parameters + * have been taken off experimental status. + * * New Features! + * ** New plugin parameters added by Arisu. + * *** Plugin Parameters > Keyboard Input + * **** Settings for the game that utilize keyboard input. These are primarily + * for the name input scene (Scene_Name) and the number input event + * command. These settings have only been tested on English keyboards and + * may or may not be compatible with other languages, so please disable + * these features if they do not fit in with your game. + * + * Version 1.11: November 1, 2020 + * * Compatibility Update! + * ** Plugins should be more compatible with one another. + * * Feature Update! + * ** Bitmap smoothing now takes into consideration for rounding coordinates. + * Update made by Irina. + * + * Version 1.10: October 25, 2020 + * * Feature Update! + * ** Sprite animation location now adjusts position relative to the sprite's + * scale, too. Update made by Arisu. + * + * Version 1.09: October 18, 2020 + * * Bug Fixes! + * ** RPG Maker MZ Bug: Auto Battle Lock Up. Fixed by Yanfly. + * *** If an auto battle Actor fights against an enemy whose DEF/MDF is too + * high, they will not use any actions at all. This can cause potential + * game freezing and softlocks. This plugin will change that and have them + * default to a regular Attack. + * * Compatibility Update! + * ** Plugins should be more compatible with one another. + * + * Version 1.08: October 11, 2020 + * * Feature Update! + * ** Altered sprite bitmaps via the various draw functions will now be marked + * as modified and will automatically purge themselves from graphical memory + * upon a sprite's removal to free up more resources. Change made by Yanfly. + * ** Picture Sprite Origin anchors are now tied to the Game_Picture show and + * move commands instead of the Game_Interpretter commands. Change by Arisu. + * + * Version 1.07: October 4, 2020 + * * Documentation Update! + * ** New documentation added for the new Plugin Parameter category: + * "Custom Parameters". + * * New Features! + * ** New Plugin Parameter "Custom Parameters" added by Yanfly. + * *** Create custom parameters for your game! These will appear in + * VisuStella MZ menus. + * + * Version 1.06: September 27, 2020 + * * Bug Fixes! + * ** Battler evasion pose can now occur if there is a miss. These were made + * separate in RPG Maker MZ and misses didn't enable the evasion pose. Fix + * made by Olivia. + * * New Features! + * ** New notetags for Maps and name tags for Troops added by Yanfly! + * *** , to change the battle view for that specific map, + * or troop regardless of what other settings are. + * *** , , to change the battle system for that + * specific map or troop regardless of what other settings are. + * + * Version 1.05: September 20, 2020 + * * Bug Fixes! + * ** notetag for enemies is now fixed! Fix made by Arisu. + * * Documentation Update! + * ** Documentation added for the new "System: Battle System Change" Plugin + * Command and removed the old "System: Set Time Progress Battle". + * * Feature Update! + * ** The Plugin Command "System: Set Time Progress Battle" has been replaced + * with "System: Battle System Change" instead. This is to accommodate + * future plugins that allow for different battle systems. Added by Yanfly. + * *** If you have previously used "System: Set Time Progress Battle", please + * replace them. We apologize for the inconvenience. + * * New Features! + * ** In the Core Engine's plugin parameters, you can now set the Battle System + * used. This will default to whatever is the game database's setting. This + * feature is used for the future when new battle systems are made. Feature + * added by Yanfly. + * + * Version 1.04: September 13, 2020 + * * Documentation Update! + * ** Added new documentation for the "Title Command List" and Title Picture + * Buttons" plugin parameters. They now have a dedicated section each. + * * Feature Updates! + * ** Moved the "Title Command List" and "Title Picture Buttons" parameters + * from the Menu Layout > Title settings. They were far too hidden away and + * users had a hard time finding them. Update made by Yanfly. + * *** Users who have customized these settings before will need to readjust + * them again. We apologize for the inconvenience. + * + * Version 1.03: September 6, 2020 + * * Bug Fixes! + * ** Having QoL > Modern Controls disabled (why would you) used to prevent the + * down button from working. It works again. Fix made by Yanfly. + * * New Feature! + * ** Plugin default settings now come with a "Game End" option on the title + * screen. For those updating from version 1.02 or order, you can add this + * in by opening the Core Engine > Plugin Parameters > Menu Layout Settings + * > press "delete" on Scene_Title > open it up, then the new settings will + * fill in automatically. + * * New Experimental Feature Added: + * ** Screen Shake Settings added to the Plugin Parameters. + * *** Screen Shake: Custom Plugin Command added! + * *** Credit to Aries of Sheratan, who gave us permission to use her formula. + * *** We'll be expanding on more screen shaking options in the future. + * * Optimization Update + * ** Digit Grouping now works more efficiently. + * + * Version 1.02: August 30, 2020 + * * New Feature! + * ** New Plugin Command: "Picture: Erase All". Added by Olivia. + * *** Erases all pictures on the screen because it's extremely tedious to do + * it one by one. + * ** New Plugin Command: "Picture: Erase Range" + * *** Erases all pictures within a range of numbers because it's extremely + * tedious to do it one by one. + * * Optimization Update + * ** Added a more accurate means of parsing numbers for Digit Grouping. + * ** Window_Base.prototype.textSizeEx now stores data to a cache. + * * Documentation Update + * ** Added a section to Major Changes: New Hard-Coded Features on + * Digit Grouping and explaining its intricacies. + * ** Added a note to Plugin Parameters > UI > Reposition Actors to ignore the + * setting if using the Battle Core. + * + * Version 1.01: August 23, 2020 + * * Bug Fixes! + * ** Digit grouping fixed to allow text codes to detect values larger than + * 1000. Fix made by Olivia and Yanfly. + * ** Param Plus, Rate, Flat notetags fixed. Fix made by Yanfly. + * * New Experimental Feature Added: + * ** JS: Quick Functions found in the Plugin Parameters + * + * Version 1.00: August 20, 2020 + * * Finished Plugin! + * + * ============================================================================ + * End of Helpfile + * ============================================================================ + * + * @ -------------------------------------------------------------------------- + * + * @command Separator_Animation + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command AnimationPoint + * @text Animation: Play at Coordinate + * @desc Plays an animation on the screen at a specific x, y + * coordinate even if there is no sprite attached. + * + * @arg AnimationID:num + * @text Animation ID + * @parent Animation + * @type animation + * @desc Plays this animation. + * @default 1 + * + * @arg Coordinates + * + * @arg pointX:eval + * @text X + * @parent Coordinates + * @desc X coordinate used for the animation. + * You may use JavaScript code. + * @default Graphics.width / 2 + * + * @arg pointY:eval + * @text Y + * @parent Coordinates + * @desc Y coordinate used for the animation. + * You may use JavaScript code. + * @default Graphics.height / 2 + * + * @arg Mirror:eval + * @text Mirror Animation? + * @parent Animation + * @type boolean + * @on Mirror + * @off Normal + * @desc Mirror the animation? + * @default false + * + * @arg Mute:eval + * @text Mute Animation? + * @parent Animation + * @type boolean + * @on Mute + * @off Normal + * @desc Mute the animation? + * @default false + * + * @ -------------------------------------------------------------------------- + * + * @command Separator_Export + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ExportAllMapText + * @text Export: All Maps Text + * @desc PLAY TEST ONLY. Exports all of the text from all maps, + * their events, event pages, and any associated Common Events. + * + * @ -------------------------------------------------------------------------- + * + * @command ExportAllTroopText + * @text Export: All Troops Text + * @desc PLAY TEST ONLY. Exports all of the text from all troops, + * their event pages, and any associated Common Events. + * + * @ -------------------------------------------------------------------------- + * + * @command ExportCurMapText + * @text Export: Current Map Text + * @desc PLAY TEST ONLY. Exports all of the text on the current map, + * its events, the event pages, and any associated Common Events. + * + * @ -------------------------------------------------------------------------- + * + * @command ExportCurTroopText + * @text Export: Current Troop Text + * @desc PLAY TEST ONLY. Exports all of the text on the current troop, + * the troop's event pages, and any associated Common Events. + * + * @ -------------------------------------------------------------------------- + * + * @command Separator_Game + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command OpenURL + * @text Game: Open URL + * @desc Opens a website URL from the game. + * + * @arg URL:str + * @text URL + * @desc Where do you want to take the player? + * @default https://www.google.com/ + * + * @ -------------------------------------------------------------------------- + * + * @command Separator_Gold + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command GoldChange + * @text Gold: Gain/Lose + * @desc Allows you to give/take more gold than the event editor limit. + * + * @arg value:eval + * @text Value + * @desc How much gold should the player gain/lose? + * Use negative values to remove gold. You may use JS. + * @default 0 + * + * @ -------------------------------------------------------------------------- + * + * @command Separator_Map + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command MapOnceParallel + * @text Map: Once Parallel + * @desc Plays a Common Event parallel to the event once without + * repeating itself when done. Map only! + * + * @arg CommonEventID:num + * @text Common Event ID + * @type common_event + * @desc The ID of the parallel Common Event to play. + * Does NOT repeat itself when finished. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command Separator_Picture + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command PictureCoordinatesMode + * @text Picture: Coordinates Mode + * @desc Play Test Mode only! Gets the coordinates of a specific + * picture as you move it across the screen. + * + * @arg PictureID:num + * @text Picture ID + * @type number + * @min 1 + * @max 100 + * @desc The ID of the pictures to track the coordinates of. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command PictureEasingType + * @text Picture: Easing Type + * @desc Changes the easing type to a number of options. + * + * @arg pictureId:num + * @text Picture ID + * @type number + * @min 1 + * @max 100 + * @desc Which picture do you wish to apply this easing to? + * @default 1 + * + * @arg easingType:str + * @text Easing Type + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * @default Linear + * + * @arg LineBreak + * @text ------------------------ + * @default -------------------------------- + * + * @arg Instructions1 + * @text Instructions + * @default Insert this Plugin Command after + * + * @arg Instructions2 + * @text - + * @default a "Move Picture" event command. + * + * @arg Instructions3 + * @text - + * @default Turn off "Wait for Completion" + * + * @arg Instructions4 + * @text - + * @default in the "Move Picture" event. + * + * @arg Instructions5 + * @text - + * @default You may have to add in your own + * + * @arg Instructions6 + * @text - + * @default "Wait" event command after. + * + * @ -------------------------------------------------------------------------- + * + * @command PictureEraseAll + * @text Picture: Erase All + * @desc Erases all pictures on the screen because it's extremely + * tedious to do it one by one. + * + * @ -------------------------------------------------------------------------- + * + * @command PictureEraseRange + * @text Picture: Erase Range + * @desc Erases all pictures within a range of numbers because it's + * extremely tedious to do it one by one. + * + * @arg StartID:num + * @text Starting ID + * @type number + * @min 1 + * @max 100 + * @desc The starting ID of the pictures to erase. + * @default 1 + * + * @arg EndingID:num + * @text Ending ID + * @type number + * @min 1 + * @max 100 + * @desc The ending ID of the pictures to erase. + * @default 100 + * + * @ -------------------------------------------------------------------------- + * + * @command PictureShowIcon + * @text Picture: Show Icon + * @desc Shows an icon instead of a picture image. + * The picture icon can be controlled like any other picture. + * + * @arg General + * + * @arg PictureID:eval + * @text Picture ID Number + * @parent General + * @desc What is the ID of the picture you wish to show at? Use a + * number between 1 and 100. You may use JavaScript code. + * @default 1 + * + * @arg IconIndex:eval + * @text Icon Index + * @parent General + * @desc Select the icon index to use for this picture. + * You may use JavaScript code. + * @default 23 + * + * @arg Smooth:eval + * @text Smooth Icon? + * @parent General + * @type boolean + * @on Smooth + * @off Pixelate + * @desc This will make the icon smoothed out or pixelated. + * @default false + * + * @arg PictureSettings + * @text Picture Settings + * + * @arg Settings:struct + * @text Settings + * @parent PictureSettings + * @type struct + * @desc Alter the settings for how the picture will be shown. + * @default {"Position":"","Origin:num":"0","PositionX:eval":"0","PositionY:eval":"0","Scale":"","ScaleX:eval":"100","ScaleY:eval":"100","Blend":"","Opacity:eval":"255","BlendMode:num":"0"} + * + * @ -------------------------------------------------------------------------- + * + * @command Separator_ScreenShake + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ScreenShake + * @text Screen Shake: Custom + * @desc Creates a custom screen shake effect and also sets + * the following uses of screen shake to this style. + * + * @arg Type:str + * @text Shake Style + * @type select + * @option Original + * @value original + * @option Random + * @value random + * @option Horizontal + * @value horizontal + * @option Vertical + * @value vertical + * @desc Select shake style type. + * @default random + * + * @arg Power:num + * @text Power + * @type number + * @min 1 + * @max 9 + * @desc Power level for screen shake. + * @default 5 + * + * @arg Speed:num + * @text Speed + * @type number + * @min 1 + * @max 9 + * @desc Speed level for screen shake. + * @default 5 + * + * @arg Duration:eval + * @text Duration + * @desc Duration of screenshake. + * You can use code as well. + * @default 60 + * + * @arg Wait:eval + * @text Wait for Completion + * @parent Duration:eval + * @type boolean + * @on Wait + * @off Don't Wait + * @desc Wait until completion before moving onto the next event? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command Separator_Switch + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command SwitchRandomizeOne + * @text Switches: Randomize ID(s) + * @desc Select specific Switch ID's to randomize ON/OFF. + * + * @arg IDs:arraynum + * @text Switch ID(s) + * @type switch[] + * @desc Select which Switch ID(s) to toggle. + * @default ["1"] + * + * @arg Chance:num + * @text Chance for ON + * @type number + * @min 1 + * @max 100 + * @desc Chance out of 100 that determines the switches to be ON. + * @default 50 + * + * @ -------------------------------------------------------------------------- + * + * @command SwitchRandomizeRange + * @text Switches: Randomize Range + * @desc Select specific Switch ID Range to randomize ON/OFF. + * The ratio determines the ON/OFF distribution. + * + * @arg StartID:num + * @text Starting ID + * @type switch + * @desc The starting ID of the Switch to toggle. + * @default 1 + * + * @arg EndingID:num + * @text Ending ID + * @type switch + * @desc The ending ID of the Switch to toggle. + * @default 20 + * + * @arg Chance:num + * @text Chance for ON + * @type number + * @min 1 + * @max 100 + * @desc Chance out of 100 that determines the switches to be ON. + * @default 50 + * + * @ -------------------------------------------------------------------------- + * + * @command SwitchToggleOne + * @text Switches: Toggle ID(s) + * @desc Select specific Switch ID's to toggle ON/OFF. + * ON becomes OFF. OFF becomes ON. + * + * @arg IDs:arraynum + * @text Switch ID(s) + * @type switch[] + * @desc Select which Switch ID(s) to toggle. + * @default ["1"] + * + * @ -------------------------------------------------------------------------- + * + * @command SwitchToggleRange + * @text Switches: Toggle Range + * @desc Select specific Switch ID Range to toggle ON/OFF. + * ON becomes OFF. OFF becomes ON. + * + * @arg StartID:num + * @text Starting ID + * @type switch + * @desc The starting ID of the Switch to toggle. + * @default 1 + * + * @arg EndingID:num + * @text Ending ID + * @type switch + * @desc The ending ID of the Switch to toggle. + * @default 20 + * + * @ -------------------------------------------------------------------------- + * + * @command Separator_System + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command SystemSetBattleSystem + * @text System: Battle System Change + * @desc Switch to a different battle system in-game. + * Some battle systems REQUIRE their specific plugins! + * + * @arg option:str + * @text Change To + * @type select + * @option Database Default (Use game database setting) + * @value database + * @option - + * @value database + * @option DTB: Default Turn Battle + * @value dtb + * @option TPB Active: Time Progress Battle (Active) + * @value tpb active + * @option TPB Wait: Time Progress Battle (Wait) + * @value tpb wait + * @option - + * @value database + * @option BTB: Brave Turn Battle (Req VisuMZ_2_BattleSystemBTB) + * @value btb + * @option CTB: Charge Turn Battle (Req VisuMZ_2_BattleSystemCTB) + * @value ctb + * @option ETB: Energy Turn Battle (Req VisuMZ_2_BattleSystemETB) + * @value etb + * @option FTB: Free Turn Battle (Req VisuMZ_2_BattleSystemFTB) + * @value ftb + * @option OTB: Order Turn Battle (Req VisuMZ_2_BattleSystemOTB) + * @value otb + * @option PTB: Press Turn Battle (Req VisuMZ_2_BattleSystemPTB) + * @value ptb + * @option STB: Standard Turn Battle (Req VisuMZ_2_BattleSystemSTB) + * @value stb + * @desc Choose which battle system to switch to. + * @default database + * + * @ -------------------------------------------------------------------------- + * + * @command SystemLoadImages + * @text System: Load Images + * @desc Allows you to (pre) load up images ahead of time. + * + * @arg animations:arraystr + * @text img/animations/ + * @type file[] + * @dir img/animations/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg battlebacks1:arraystr + * @text img/battlebacks1/ + * @type file[] + * @dir img/battlebacks1/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg battlebacks2:arraystr + * @text img/battlebacks2/ + * @type file[] + * @dir img/battlebacks2/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg characters:arraystr + * @text img/characters/ + * @type file[] + * @dir img/characters/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg enemies:arraystr + * @text img/enemies/ + * @type file[] + * @dir img/enemies/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg faces:arraystr + * @text img/faces/ + * @type file[] + * @dir img/faces/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg parallaxes:arraystr + * @text img/parallaxes/ + * @type file[] + * @dir img/parallaxes/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg pictures:arraystr + * @text img/pictures/ + * @type file[] + * @dir img/pictures/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg sv_actors:arraystr + * @text img/sv_actors/ + * @type file[] + * @dir img/sv_actors/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg sv_enemies:arraystr + * @text img/sv_enemies/ + * @type file[] + * @dir img/sv_enemies/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg system:arraystr + * @text img/system/ + * @type file[] + * @dir img/system/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg tilesets:arraystr + * @text img/tilesets/ + * @type file[] + * @dir img/tilesets/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg titles1:arraystr + * @text img/titles1/ + * @type file[] + * @dir img/titles1/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @arg titles2:arraystr + * @text img/titles2/ + * @type file[] + * @dir img/titles2/ + * @desc Which files do you wish to load from this directory? + * @default [] + * + * @ -------------------------------------------------------------------------- + * + * @command SystemSetFontSize + * @text System: Main Font Size + * @desc Set the game's main font size. + * + * @arg option:num + * @text Change To + * @type number + * @min 1 + * @desc Change the font size to this number. + * @default 26 + * + * @ -------------------------------------------------------------------------- + * + * @command SystemSetSideView + * @text System: Side View Battle + * @desc Switch between Front View or Side View for battle. + * + * @arg option:str + * @text Change To + * @type select + * @option Front View + * @value Front View + * @option Side View + * @value Side View + * @option Toggle + * @value Toggle + * @desc Choose which view type to switch to. + * @default Toggle + * + * @ -------------------------------------------------------------------------- + * + * @command SystemSetWindowPadding + * @text System: Window Padding + * @desc Change the game's window padding amount. + * + * @arg option:num + * @text Change To + * @type number + * @min 1 + * @desc Change the game's standard window padding to this value. + * Default: 12 + * @default 12 + * + * @ -------------------------------------------------------------------------- + * + * @command Separator_End + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @ ========================================================================== + * @ Plugin Parameters + * @ ========================================================================== + * + * @param BreakHead + * @text -------------------------- + * @default ---------------------------------- + * + * @param CoreEngine + * @default Plugin Parameters + * @param ATTENTION + * @default READ THE HELP FILE + * + * @param BreakSettings + * @text -------------------------- + * @default ---------------------------------- + * + * @param QoL:struct + * @text Quality of Life Settings + * @type struct + * @desc Quality of Life settings for both developers and players. + * @default {"PlayTest":"","NewGameBoot:eval":"false","ForceNoPlayTest:eval":"false","OpenConsole:eval":"true","F6key:eval":"true","F7key:eval":"true","NewGameCommonEvent:num":"0","DigitGrouping":"","DigitGroupingStandardText:eval":"true","DigitGroupingExText:eval":"true","DigitGroupingDamageSprites:eval":"true","DigitGroupingGaugeSprites:eval":"true","DigitGroupingLocale:str":"en-US","PlayerBenefit":"","EncounterRateMinimum:num":"10","EscapeAlways:eval":"true","ImprovedAccuracySystem:eval":"true","AccuracyBoost:eval":"true","LevelUpFullHp:eval":"true","LevelUpFullMp:eval":"true","Misc":"","AntiZoomPictures:eval":"true","AutoStretch:str":"stretch","FontShadows:eval":"false","FontSmoothing:eval":"true","KeyItemProtect:eval":"true","ModernControls:eval":"true","NoTileShadows:eval":"true","PixelateImageRendering:eval":"false","RequireFocus:eval":"true","SmartEventCollisionPriority:eval":"true"} + * + * @param BattleSystem:str + * @text Battle System + * @type select + * @option Database Default (Use game database setting) + * @value database + * @option - + * @value database + * @option DTB: Default Turn Battle + * @value dtb + * @option TPB Active: Time Progress Battle (Active) + * @value tpb active + * @option TPB wait: Time Progress Battle (Wait) + * @value tpb wait + * @option - + * @value database + * @option BTB: Brave Turn Battle (Req VisuMZ_2_BattleSystemBTB) + * @value btb + * @option CTB: Charge Turn Battle (Req VisuMZ_2_BattleSystemCTB) + * @value ctb + * @option ETB: Energy Turn Battle (Req VisuMZ_2_BattleSystemETB) + * @value etb + * @option FTB: Free Turn Battle (Req VisuMZ_2_BattleSystemFTB) + * @value ftb + * @option OTB: Order Turn Battle (Req VisuMZ_2_BattleSystemOTB) + * @value otb + * @option PTB: Press Turn Battle (Req VisuMZ_2_BattleSystemPTB) + * @value ptb + * @option STB: Standard Turn Battle (Req VisuMZ_2_BattleSystemSTB) + * @value stb + * @desc Choose which battle system to use for your game. + * Some battle systems REQUIRE their specific plugins! + * @default database + * + * @param Color:struct + * @text Color Settings + * @type struct + * @desc Change the colors used for in-game text. + * @default {"BasicColors":"","ColorNormal:str":"0","ColorSystem:str":"16","ColorCrisis:str":"17","ColorDeath:str":"18","ColorGaugeBack:str":"19","ColorHPGauge1:str":"20","ColorHPGauge2:str":"21","ColorMPGauge1:str":"22","ColorMPGauge2:str":"23","ColorMPCost:str":"23","ColorPowerUp:str":"24","ColorPowerDown:str":"25","ColorCTGauge1:str":"26","ColorCTGauge2:str":"27","ColorTPGauge1:str":"28","ColorTPGauge2:str":"29","ColorTPCost:str":"29","ColorPending:str":"#2a847d","ColorExpGauge1:str":"30","ColorExpGauge2:str":"31","ColorMaxLvGauge1:str":"14","ColorMaxLvGauge2:str":"6","AlphaColors":"","OutlineColor:str":"rgba(0, 0, 0, 0.6)","DimColor1:str":"rgba(0, 0, 0, 0.6)","DimColor2:str":"rgba(0, 0, 0, 0)","ItemBackColor1:str":"rgba(32, 32, 32, 0.5)","ItemBackColor2:str":"rgba(0, 0, 0, 0.5)","ConditionalColors":"","ActorHPColor:func":"\"// Set the variables used in this function.\\nlet actor = arguments[0];\\n\\n// Check if the actor exists. If not, return normal.\\nif (!actor) {\\n return this.normalColor();\\n\\n// If the actor is dead, return death color.\\n} else if (actor.isDead()) {\\n return this.deathColor();\\n\\n// If the actor is dying, return crisis color.\\n} else if (actor.isDying()) {\\n return this.crisisColor();\\n\\n// Otherwise, return the normal color.\\n} else {\\n return this.normalColor();\\n}\"","ActorMPColor:func":"\"// Set the variables used in this function.\\nlet actor = arguments[0];\\n\\n// Check if the actor exists. If not, return normal.\\nif (!actor) {\\n return this.normalColor();\\n\\n// If MP rate is below 25%, return crisis color.\\n} else if (actor.mpRate() < 0.25) {\\n return this.crisisColor();\\n\\n// Otherwise, return the normal color.\\n} else {\\n return this.normalColor();\\n}\"","ActorTPColor:func":"\"// Set the variables used in this function.\\nlet actor = arguments[0];\\n\\n// Check if the actor exists. If not, return normal.\\nif (!actor) {\\n return this.normalColor();\\n\\n// If TP rate is below 25%, return crisis color.\\n} else if (actor.tpRate() < 0.25) {\\n return this.crisisColor();\\n\\n// Otherwise, return the normal color.\\n} else {\\n return this.normalColor();\\n}\"","ParamChange:func":"\"// Set the variables used in this function.\\nlet change = arguments[0];\\n\\n// If a positive change, use power up color.\\nif (change > 0) {\\n return this.powerUpColor();\\n\\n// If a negative change, use power down color.\\n} else if (change < 0) {\\n return this.powerDownColor();\\n\\n// Otherwise, return the normal color.\\n} else {\\n return this.normalColor();\\n}\"","DamageColor:func":"\"// Set the variables used in this function.\\nlet colorType = arguments[0];\\n\\n// Check the value of the color type\\n// and return an appropriate color.\\nswitch (colorType) {\\n\\n case 0: // HP damage\\n return \\\"#ffffff\\\";\\n\\n case 1: // HP recover\\n return \\\"#b9ffb5\\\";\\n\\n case 2: // MP damage\\n return \\\"#bb88bb\\\";\\n\\n case 3: // MP recover\\n return \\\"#80b0ff\\\";\\n\\n default:\\n return \\\"#808080\\\";\\n}\""} + * + * @param Gold:struct + * @text Gold Settings + * @type struct + * @desc Change up how gold operates and is displayed in-game. + * @default {"GoldMax:num":"999999999","GoldFontSize:num":"24","GoldIcon:num":"314","GoldOverlap:str":"A Lot","ItemStyle:eval":"true"} + * + * @param ImgLoad:struct + * @text Image Loading + * @type struct + * @desc Game images that will be loaded upon booting up the game. + * Use this responsibly!!! + * @default {"animations:arraystr":"[]","battlebacks1:arraystr":"[]","battlebacks2:arraystr":"[]","characters:arraystr":"[]","enemies:arraystr":"[]","faces:arraystr":"[]","parallaxes:arraystr":"[]","pictures:arraystr":"[]","sv_actors:arraystr":"[]","sv_enemies:arraystr":"[]","system:arraystr":"[\"Balloon\",\"IconSet\"]","tilesets:arraystr":"[]","titles1:arraystr":"[]","titles2:arraystr":"[]"} + * + * @param KeyboardInput:struct + * @text Keyboard Input + * @type struct + * @desc Settings for the game that utilize keyboard input. + * @default {"Controls":"","WASD:eval":"false","DashToggleR:eval":"false","NameInput":"","EnableNameInput:eval":"true","DefaultMode:str":"keyboard","QwertyLayout:eval":"true","NameInputMessage:eval":"\"Type in this character's name.\\nPress \\\\c[5]ENTER\\\\c[0] when you're done.\\n\\n-or-\\n\\nPress \\\\c[5]arrow keys\\\\c[0]/\\\\c[5]TAB\\\\c[0] to switch\\nto manual character entry.\\n\\nPress \\\\c[5]ESC\\\\c[0]/\\\\c[5]TAB\\\\c[0] to use to keyboard.\"","NumberInput":"","EnableNumberInput:eval":"true","ButtonAssist":"","Keyboard:str":"Keyboard","Manual:str":"Manual"} + * + * @param MenuBg:struct + * @text Menu Background Settings + * @type struct + * @desc Change how menu backgrounds look for each scene. + * @default {"Scene_Menu:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_Item:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_Skill:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_Equip:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_Status:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_Options:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_Save:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_Load:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_GameEnd:struct":"{\"SnapshotOpacity:num\":\"128\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_Shop:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_Name:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}","Scene_Unlisted:struct":"{\"SnapshotOpacity:num\":\"192\",\"BgFilename1:str\":\"\",\"BgFilename2:str\":\"\"}"} + * + * @param ButtonAssist:struct + * @text Menu Button Assist Window + * @type struct + * @desc Settings pertaining to the Button Assist window found in in-game menus. + * @default {"General":"","Enable:eval":"true","Location:str":"bottom","BgType:num":"0","Text":"","TextFmt:str":"%1:%2","MultiKeyFmt:str":"%1/%2","OkText:str":"Select","CancelText:str":"Back","SwitchActorText:str":"Switch Ally","Keys":"","KeyUnlisted:str":"\\}❪%1❫\\{","KeyUP:str":"^","KeyDOWN:str":"v","KeyLEFT:str":"<<","KeyRIGHT:str":">>","KeySHIFT:str":"\\}❪SHIFT❫\\{","KeyTAB:str":"\\}❪TAB❫\\{","KeyA:str":"A","KeyB:str":"B","KeyC:str":"C","KeyD:str":"D","KeyE:str":"E","KeyF:str":"F","KeyG:str":"G","KeyH:str":"H","KeyI:str":"I","KeyJ:str":"J","KeyK:str":"K","KeyL:str":"L","KeyM:str":"M","KeyN:str":"N","KeyO:str":"O","KeyP:str":"P","KeyQ:str":"Q","KeyR:str":"R","KeyS:str":"S","KeyT:str":"T","KeyU:str":"U","KeyV:str":"V","KeyW:str":"W","KeyX:str":"X","KeyY:str":"Y","KeyZ:str":"Z"} + * + * @param MenuLayout:struct + * @text Menu Layout Settings + * @type struct + * @desc Change how menu layouts look for each scene. + * @default {"Title:struct":"{\"TitleScreen\":\"\",\"DocumentTitleFmt:str\":\"%1: %2 - Version %3\",\"Subtitle:str\":\"Subtitle\",\"Version:str\":\"0.00\",\"drawGameTitle:func\":\"\\\"const x = 20;\\\\nconst y = Graphics.height / 4;\\\\nconst maxWidth = Graphics.width - x * 2;\\\\nconst text = $dataSystem.gameTitle;\\\\nconst bitmap = this._gameTitleSprite.bitmap;\\\\nbitmap.fontFace = $gameSystem.mainFontFace();\\\\nbitmap.outlineColor = \\\\\\\"black\\\\\\\";\\\\nbitmap.outlineWidth = 8;\\\\nbitmap.fontSize = 72;\\\\nbitmap.drawText(text, x, y, maxWidth, 48, \\\\\\\"center\\\\\\\");\\\"\",\"drawGameSubtitle:func\":\"\\\"const x = 20;\\\\nconst y = Graphics.height / 4 + 72;\\\\nconst maxWidth = Graphics.width - x * 2;\\\\nconst text = Scene_Title.subtitle;\\\\nconst bitmap = this._gameTitleSprite.bitmap;\\\\nbitmap.fontFace = $gameSystem.mainFontFace();\\\\nbitmap.outlineColor = \\\\\\\"black\\\\\\\";\\\\nbitmap.outlineWidth = 6;\\\\nbitmap.fontSize = 48;\\\\nbitmap.drawText(text, x, y, maxWidth, 48, \\\\\\\"center\\\\\\\");\\\"\",\"drawGameVersion:func\":\"\\\"const bitmap = this._gameTitleSprite.bitmap;\\\\nconst x = 0;\\\\nconst y = Graphics.height - 20;\\\\nconst width = Math.round(Graphics.width / 4);\\\\nconst height = 20;\\\\nconst c1 = ColorManager.dimColor1();\\\\nconst c2 = ColorManager.dimColor2();\\\\nconst text = 'Version ' + Scene_Title.version;\\\\nbitmap.gradientFillRect(x, y, width, height, c1, c2);\\\\nbitmap.fontFace = $gameSystem.mainFontFace();\\\\nbitmap.outlineColor = \\\\\\\"black\\\\\\\";\\\\nbitmap.outlineWidth = 3;\\\\nbitmap.fontSize = 16;\\\\nbitmap.drawText(text, x + 4, y, Graphics.width, height, \\\\\\\"left\\\\\\\");\\\"\",\"CommandRect:func\":\"\\\"const offsetX = $dataSystem.titleCommandWindow.offsetX;\\\\nconst offsetY = $dataSystem.titleCommandWindow.offsetY;\\\\nconst rows = this.commandWindowRows();\\\\nconst width = this.mainCommandWidth();\\\\nconst height = this.calcWindowHeight(rows, true);\\\\nconst x = (Graphics.boxWidth - width) / 2 + offsetX;\\\\nconst y = Graphics.boxHeight - height - 96 + offsetY;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"ButtonFadeSpeed:num\":\"4\"}","MainMenu:struct":"{\"CommandWindow\":\"\",\"CommandBgType:num\":\"0\",\"CommandRect:func\":\"\\\"const width = this.mainCommandWidth();\\\\nconst height = this.mainAreaHeight() - this.goldWindowRect().height;\\\\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\\\\nconst y = this.mainAreaTop();\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"GoldWindow\":\"\",\"GoldBgType:num\":\"0\",\"GoldRect:func\":\"\\\"const rows = 1;\\\\nconst width = this.mainCommandWidth();\\\\nconst height = this.calcWindowHeight(rows, true);\\\\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\\\\nconst y = this.mainAreaBottom() - height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"StatusWindow\":\"\",\"StatusBgType:num\":\"0\",\"StatusRect:func\":\"\\\"const width = Graphics.boxWidth - this.mainCommandWidth();\\\\nconst height = this.mainAreaHeight();\\\\nconst x = this.isRightInputMode() ? 0 : Graphics.boxWidth - width;\\\\nconst y = this.mainAreaTop();\\\\nreturn new Rectangle(x, y, width, height);\\\"\"}","ItemMenu:struct":"{\"HelpWindow\":\"\",\"HelpBgType:num\":\"0\",\"HelpRect:func\":\"\\\"const x = 0;\\\\nconst y = this.helpAreaTop();\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.helpAreaHeight();\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"CategoryWindow\":\"\",\"CategoryBgType:num\":\"0\",\"CategoryRect:func\":\"\\\"const x = 0;\\\\nconst y = this.mainAreaTop();\\\\nconst rows = 1;\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.calcWindowHeight(rows, true);\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"ItemWindow\":\"\",\"ItemBgType:num\":\"0\",\"ItemRect:func\":\"\\\"const x = 0;\\\\nconst y = this._categoryWindow.y + this._categoryWindow.height;\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.mainAreaBottom() - y;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"ActorWindow\":\"\",\"ActorBgType:num\":\"0\",\"ActorRect:func\":\"\\\"const x = 0;\\\\nconst y = this.mainAreaTop();\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.mainAreaHeight();\\\\nreturn new Rectangle(x, y, width, height);\\\"\"}","SkillMenu:struct":"{\"HelpWindow\":\"\",\"HelpBgType:num\":\"0\",\"HelpRect:func\":\"\\\"const x = 0;\\\\nconst y = this.helpAreaTop();\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.helpAreaHeight();\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"SkillTypeWindow\":\"\",\"SkillTypeBgType:num\":\"0\",\"SkillTypeRect:func\":\"\\\"const rows = 3;\\\\nconst width = this.mainCommandWidth();\\\\nconst height = this.calcWindowHeight(rows, true);\\\\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\\\\nconst y = this.mainAreaTop();\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"StatusWindow\":\"\",\"StatusBgType:num\":\"0\",\"StatusRect:func\":\"\\\"const width = Graphics.boxWidth - this.mainCommandWidth();\\\\nconst height = this._skillTypeWindow.height;\\\\nconst x = this.isRightInputMode() ? 0 : Graphics.boxWidth - width;\\\\nconst y = this.mainAreaTop();\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"ItemWindow\":\"\",\"ItemBgType:num\":\"0\",\"ItemRect:func\":\"\\\"const x = 0;\\\\nconst y = this._statusWindow.y + this._statusWindow.height;\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.mainAreaHeight() - this._statusWindow.height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"ActorWindow\":\"\",\"ActorBgType:num\":\"0\",\"ActorRect:func\":\"\\\"const x = 0;\\\\nconst y = this.mainAreaTop();\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.mainAreaHeight();\\\\nreturn new Rectangle(x, y, width, height);\\\"\"}","EquipMenu:struct":"{\"HelpWindow\":\"\",\"HelpBgType:num\":\"0\",\"HelpRect:func\":\"\\\"const x = 0;\\\\nconst y = this.helpAreaTop();\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.helpAreaHeight();\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"StatusWindow\":\"\",\"StatusBgType:num\":\"0\",\"StatusRect:func\":\"\\\"const x = 0;\\\\nconst y = this.mainAreaTop();\\\\nconst width = this.statusWidth();\\\\nconst height = this.mainAreaHeight();\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"CommandWindow\":\"\",\"CommandBgType:num\":\"0\",\"CommandRect:func\":\"\\\"const x = this.statusWidth();\\\\nconst y = this.mainAreaTop();\\\\nconst rows = 1;\\\\nconst width = Graphics.boxWidth - this.statusWidth();\\\\nconst height = this.calcWindowHeight(rows, true);\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"SlotWindow\":\"\",\"SlotBgType:num\":\"0\",\"SlotRect:func\":\"\\\"const commandWindowRect = this.commandWindowRect();\\\\nconst x = this.statusWidth();\\\\nconst y = commandWindowRect.y + commandWindowRect.height;\\\\nconst width = Graphics.boxWidth - this.statusWidth();\\\\nconst height = this.mainAreaHeight() - commandWindowRect.height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"ItemWindow\":\"\",\"ItemBgType:num\":\"0\",\"ItemRect:func\":\"\\\"return this.slotWindowRect();\\\"\"}","StatusMenu:struct":"{\"ProfileWindow\":\"\",\"ProfileBgType:num\":\"0\",\"ProfileRect:func\":\"\\\"const width = Graphics.boxWidth;\\\\nconst height = this.profileHeight();\\\\nconst x = 0;\\\\nconst y = this.mainAreaBottom() - height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"StatusWindow\":\"\",\"StatusBgType:num\":\"0\",\"StatusRect:func\":\"\\\"const x = 0;\\\\nconst y = this.mainAreaTop();\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.statusParamsWindowRect().y - y;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"StatusParamsWindow\":\"\",\"StatusParamsBgType:num\":\"0\",\"StatusParamsRect:func\":\"\\\"const width = this.statusParamsWidth();\\\\nconst height = this.statusParamsHeight();\\\\nconst x = 0;\\\\nconst y = this.mainAreaBottom() - this.profileHeight() - height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"StatusEquipWindow\":\"\",\"StatusEquipBgType:num\":\"0\",\"StatusEquipRect:func\":\"\\\"const width = Graphics.boxWidth - this.statusParamsWidth();\\\\nconst height = this.statusParamsHeight();\\\\nconst x = this.statusParamsWidth();\\\\nconst y = this.mainAreaBottom() - this.profileHeight() - height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\"}","OptionsMenu:struct":"{\"OptionsWindow\":\"\",\"OptionsBgType:num\":\"0\",\"OptionsRect:func\":\"\\\"const n = Math.min(this.maxCommands(), this.maxVisibleCommands());\\\\nconst width = 400;\\\\nconst height = this.calcWindowHeight(n, true);\\\\nconst x = (Graphics.boxWidth - width) / 2;\\\\nconst y = (Graphics.boxHeight - height) / 2;\\\\nreturn new Rectangle(x, y, width, height);\\\"\"}","SaveMenu:struct":"{\"HelpWindow\":\"\",\"HelpBgType:num\":\"0\",\"HelpRect:func\":\"\\\"const x = 0;\\\\nconst y = this.mainAreaTop();\\\\nconst rows = 1;\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.calcWindowHeight(rows, false);\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"ListWindow\":\"\",\"ListBgType:num\":\"0\",\"ListRect:func\":\"\\\"const x = 0;\\\\nconst y = this.mainAreaTop() + this._helpWindow.height;\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.mainAreaHeight() - this._helpWindow.height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\"}","LoadMenu:struct":"{\"HelpWindow\":\"\",\"HelpBgType:num\":\"0\",\"HelpRect:func\":\"\\\"const x = 0;\\\\nconst y = this.mainAreaTop();\\\\nconst rows = 1;\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.calcWindowHeight(rows, false);\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"ListWindow\":\"\",\"ListBgType:num\":\"0\",\"ListRect:func\":\"\\\"const x = 0;\\\\nconst y = this.mainAreaTop() + this._helpWindow.height;\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.mainAreaHeight() - this._helpWindow.height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\"}","GameEnd:struct":"{\"CommandList:arraystruct\":\"[\\\"{\\\\\\\"Symbol:str\\\\\\\":\\\\\\\"toTitle\\\\\\\",\\\\\\\"TextStr:str\\\\\\\":\\\\\\\"Untitled\\\\\\\",\\\\\\\"TextJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"return TextManager.toTitle;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ShowJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"return true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"EnableJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"return true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ExtJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"return null;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CallHandlerJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"SceneManager._scene.commandToTitle();\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Symbol:str\\\\\\\":\\\\\\\"cancel\\\\\\\",\\\\\\\"TextStr:str\\\\\\\":\\\\\\\"Untitled\\\\\\\",\\\\\\\"TextJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"return TextManager.cancel;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ShowJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"return true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"EnableJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"return true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ExtJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"return null;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CallHandlerJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"SceneManager._scene.popScene();\\\\\\\\\\\\\\\"\\\\\\\"}\\\"]\",\"CommandBgType:num\":\"0\",\"CommandRect:func\":\"\\\"const rows = 2;\\\\nconst width = this.mainCommandWidth();\\\\nconst height = this.calcWindowHeight(rows, true);\\\\nconst x = (Graphics.boxWidth - width) / 2;\\\\nconst y = (Graphics.boxHeight - height) / 2;\\\\nreturn new Rectangle(x, y, width, height);\\\"\"}","ShopMenu:struct":"{\"HelpWindow\":\"\",\"HelpBgType:num\":\"0\",\"HelpRect:func\":\"\\\"const wx = 0;\\\\nconst wy = this.helpAreaTop();\\\\nconst ww = Graphics.boxWidth;\\\\nconst wh = this.helpAreaHeight();\\\\nreturn new Rectangle(wx, wy, ww, wh);\\\"\",\"GoldWindow\":\"\",\"GoldBgType:num\":\"0\",\"GoldRect:func\":\"\\\"const rows = 1;\\\\nconst width = this.mainCommandWidth();\\\\nconst height = this.calcWindowHeight(rows, true);\\\\nconst x = Graphics.boxWidth - width;\\\\nconst y = this.mainAreaTop();\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"CommandWindow\":\"\",\"CommandBgType:num\":\"0\",\"CommandRect:func\":\"\\\"const x = 0;\\\\nconst y = this.mainAreaTop();\\\\nconst rows = 1;\\\\nconst width = this._goldWindow.x;\\\\nconst height = this.calcWindowHeight(rows, true);\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"DummyWindow\":\"\",\"DummyBgType:num\":\"0\",\"DummyRect:func\":\"\\\"const x = 0;\\\\nconst y = this._commandWindow.y + this._commandWindow.height;\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.mainAreaHeight() - this._commandWindow.height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"NumberWindow\":\"\",\"NumberBgType:num\":\"0\",\"NumberRect:func\":\"\\\"const x = 0;\\\\nconst y = this._dummyWindow.y;\\\\nconst width = Graphics.boxWidth - this.statusWidth();\\\\nconst height = this._dummyWindow.height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"StatusWindow\":\"\",\"StatusBgType:num\":\"0\",\"StatusRect:func\":\"\\\"const width = this.statusWidth();\\\\nconst height = this._dummyWindow.height;\\\\nconst x = Graphics.boxWidth - width;\\\\nconst y = this._dummyWindow.y;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"BuyWindow\":\"\",\"BuyBgType:num\":\"0\",\"BuyRect:func\":\"\\\"const x = 0;\\\\nconst y = this._dummyWindow.y;\\\\nconst width = Graphics.boxWidth - this.statusWidth();\\\\nconst height = this._dummyWindow.height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"CategoryWindow\":\"\",\"CategoryBgType:num\":\"0\",\"CategoryRect:func\":\"\\\"const x = 0;\\\\nconst y = this._dummyWindow.y;\\\\nconst rows = 1;\\\\nconst width = Graphics.boxWidth;\\\\nconst height = this.calcWindowHeight(rows, true);\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"SellWindow\":\"\",\"SellBgType:num\":\"0\",\"SellRect:func\":\"\\\"const x = 0;\\\\nconst y = this._categoryWindow.y + this._categoryWindow.height;\\\\nconst width = Graphics.boxWidth;\\\\nconst height =\\\\n this.mainAreaHeight() -\\\\n this._commandWindow.height -\\\\n this._categoryWindow.height;\\\\nreturn new Rectangle(x, y, width, height);\\\"\"}","NameMenu:struct":"{\"EditWindow\":\"\",\"EditBgType:num\":\"0\",\"EditRect:func\":\"\\\"const rows = 9;\\\\nconst inputWindowHeight = this.calcWindowHeight(rows, true);\\\\nconst padding = $gameSystem.windowPadding();\\\\nconst width = 600;\\\\nconst height = Math.min(ImageManager.faceHeight + padding * 2, this.mainAreaHeight() - inputWindowHeight);\\\\nconst x = (Graphics.boxWidth - width) / 2;\\\\nconst y = (this.mainAreaHeight() - (height + inputWindowHeight)) / 2 + this.mainAreaTop();\\\\nreturn new Rectangle(x, y, width, height);\\\"\",\"InputWindow\":\"\",\"InputBgType:num\":\"0\",\"InputRect:func\":\"\\\"const x = this._editWindow.x;\\\\nconst y = this._editWindow.y + this._editWindow.height;\\\\nconst rows = 9;\\\\nconst width = this._editWindow.width;\\\\nconst height = this.calcWindowHeight(rows, true);\\\\nreturn new Rectangle(x, y, width, height);\\\"\"}"} + * + * @param Param:struct + * @text Parameter Settings + * @type struct + * @desc Change up the limits of parameters and how they're calculated. + * @default {"DisplayedParams:arraystr":"[\"ATK\",\"DEF\",\"MAT\",\"MDF\",\"AGI\",\"LUK\"]","ExtDisplayedParams:arraystr":"[\"MaxHP\",\"MaxMP\",\"ATK\",\"DEF\",\"MAT\",\"MDF\",\"AGI\",\"LUK\"]","BasicParameters":"","CrisisRate:num":"0.25","BasicParameterFormula:func":"\"// Determine the variables used in this calculation.\\nlet paramId = arguments[0];\\nlet base = this.paramBase(paramId);\\nlet plus = this.paramPlus(paramId);\\nlet paramRate = this.paramRate(paramId);\\nlet buffRate = this.paramBuffRate(paramId);\\nlet flatBonus = this.paramFlatBonus(paramId);\\n\\n// Formula to determine total parameter value.\\nlet value = (base + plus) * paramRate * buffRate + flatBonus;\\n\\n// Determine the limits\\nconst maxValue = this.paramMax(paramId);\\nconst minValue = this.paramMin(paramId);\\n\\n// Final value\\nreturn Math.round(value.clamp(minValue, maxValue));\"","BasicParamCaps":"","BasicActorParamCaps":"","BasicActorParamMax0:str":"9999","BasicActorParamMax1:str":"9999","BasicActorParamMax2:str":"999","BasicActorParamMax3:str":"999","BasicActorParamMax4:str":"999","BasicActorParamMax5:str":"999","BasicActorParamMax6:str":"999","BasicActorParamMax7:str":"999","BasicEnemyParamCaps":"","BasicEnemyParamMax0:str":"999999","BasicEnemyParamMax1:str":"9999","BasicEnemyParamMax2:str":"999","BasicEnemyParamMax3:str":"999","BasicEnemyParamMax4:str":"999","BasicEnemyParamMax5:str":"999","BasicEnemyParamMax6:str":"999","BasicEnemyParamMax7:str":"999","XParameters":"","XParameterFormula:func":"\"// Determine the variables used in this calculation.\\nlet xparamId = arguments[0];\\nlet base = this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId);\\nlet plus = this.xparamPlus(xparamId);\\nlet paramRate = this.xparamRate(xparamId);\\nlet flatBonus = this.xparamFlatBonus(xparamId);\\n\\n// Formula to determine total parameter value.\\nlet value = (base + plus) * paramRate + flatBonus;\\n\\n// Final value\\nreturn value;\"","XParamVocab":"","XParamVocab0:str":"Hit","XParamVocab1:str":"Evasion","XParamVocab2:str":"Critical Rate","XParamVocab3:str":"Critical Evade","XParamVocab4:str":"Magic Evade","XParamVocab5:str":"Magic Reflect","XParamVocab6:str":"Counter","XParamVocab7:str":"HP Regen","XParamVocab8:str":"MP Regen","XParamVocab9:str":"TP Regen","SParameters":"","SParameterFormula:func":"\"// Determine the variables used in this calculation.\\nlet sparamId = arguments[0];\\nlet base = this.traitsPi(Game_BattlerBase.TRAIT_SPARAM, sparamId);\\nlet plus = this.sparamPlus(sparamId);\\nlet paramRate = this.sparamRate(sparamId);\\nlet flatBonus = this.sparamFlatBonus(sparamId);\\n\\n// Formula to determine total parameter value.\\nlet value = (base + plus) * paramRate + flatBonus;\\n\\n// Final value\\nreturn value;\"","SParamVocab":"","SParamVocab0:str":"Aggro","SParamVocab1:str":"Guard","SParamVocab2:str":"Recovery","SParamVocab3:str":"Item Effect","SParamVocab4:str":"MP Cost","SParamVocab5:str":"TP Charge","SParamVocab6:str":"Physical DMG","SParamVocab7:str":"Magical DMG","SParamVocab8:str":"Floor DMG","SParamVocab9:str":"EXP Gain","Icons":"","DrawIcons:eval":"true","IconParam0:str":"84","IconParam1:str":"165","IconParam2:str":"76","IconParam3:str":"81","IconParam4:str":"101","IconParam5:str":"133","IconParam6:str":"140","IconParam7:str":"87","IconXParam0:str":"102","IconXParam1:str":"82","IconXParam2:str":"78","IconXParam3:str":"82","IconXParam4:str":"171","IconXParam5:str":"222","IconXParam6:str":"77","IconXParam7:str":"72","IconXParam8:str":"72","IconXParam9:str":"72","IconSParam0:str":"5","IconSParam1:str":"128","IconSParam2:str":"72","IconSParam3:str":"176","IconSParam4:str":"165","IconSParam5:str":"164","IconSParam6:str":"76","IconSParam7:str":"79","IconSParam8:str":"141","IconSParam9:str":"73"} + * + * @param CustomParam:arraystruct + * @text Custom Parameters + * @parent Param:struct + * @type struct[] + * @desc Create custom parameters for your game! + * These will appear in VisuStella MZ menus. + * @default ["{\"ParamName:str\":\"Strength\",\"Abbreviation:str\":\"str\",\"Icon:num\":\"77\",\"Type:str\":\"integer\",\"ValueJS:json\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\n\\\\n// Calculations\\\\nreturn (user.atk * 0.75) + (user.def * 0.25);\\\"\"}","{\"ParamName:str\":\"Dexterity\",\"Abbreviation:str\":\"dex\",\"Icon:num\":\"82\",\"Type:str\":\"integer\",\"ValueJS:json\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\n\\\\n// Calculations\\\\nreturn (user.agi * 0.75) + (user.atk * 0.25);\\\"\"}","{\"ParamName:str\":\"Constitution\",\"Abbreviation:str\":\"con\",\"Icon:num\":\"81\",\"Type:str\":\"integer\",\"ValueJS:json\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\n\\\\n// Calculations\\\\nreturn (user.def * 0.75) + (user.mdf * 0.25);\\\"\"}","{\"ParamName:str\":\"Intelligence\",\"Abbreviation:str\":\"int\",\"Icon:num\":\"79\",\"Type:str\":\"integer\",\"ValueJS:json\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\n\\\\n// Calculations\\\\nreturn (user.mat * 0.75) + (user.mdf * 0.25);\\\"\"}","{\"ParamName:str\":\"Wisdom\",\"Abbreviation:str\":\"wis\",\"Icon:num\":\"72\",\"Type:str\":\"integer\",\"ValueJS:json\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\n\\\\n// Calculations\\\\nreturn (user.mdf * 0.75) + (user.luk * 0.25);\\\"\"}","{\"ParamName:str\":\"Charisma\",\"Abbreviation:str\":\"cha\",\"Icon:num\":\"84\",\"Type:str\":\"integer\",\"ValueJS:json\":\"\\\"// Declare Constants\\\\nconst user = this;\\\\n\\\\n// Calculations\\\\nreturn (user.luk * 0.75) + (user.agi * 0.25);\\\"\"}"] + * + * @param ScreenResolution:struct + * @text Screen Resolution Settings + * @type struct + * @desc Alter various properties to make the game look better for varying screen resolutions. + * @default {"Troops":"","RepositionActors:eval":"true","RepositionEnemies:eval":"true","RepositionEnemies130:eval":"false"} + * + * @param ScreenShake:struct + * @text Screen Shake Settings + * @type struct + * @desc Get more screen shake effects into your game! + * @default {"DefaultStyle:str":"random","originalJS:func":"\"// Calculation\\nthis.x += Math.round($gameScreen.shake());\"","randomJS:func":"\"// Calculation\\n// Original Formula by Aries of Sheratan\\nconst power = $gameScreen._shakePower * 0.75;\\nconst speed = $gameScreen._shakeSpeed * 0.60;\\nconst duration = $gameScreen._shakeDuration;\\nthis.x += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);\\nthis.y += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);\"","horzJS:func":"\"// Calculation\\n// Original Formula by Aries of Sheratan\\nconst power = $gameScreen._shakePower * 0.75;\\nconst speed = $gameScreen._shakeSpeed * 0.60;\\nconst duration = $gameScreen._shakeDuration;\\nthis.x += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);\"","vertJS:func":"\"// Calculation\\n// Original Formula by Aries of Sheratan\\nconst power = $gameScreen._shakePower * 0.75;\\nconst speed = $gameScreen._shakeSpeed * 0.60;\\nconst duration = $gameScreen._shakeDuration;\\nthis.y += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);\""} + * + * @param TitleCommandList:arraystruct + * @text Title Command List + * @type struct[] + * @desc Window commands used by the title screen. + * Add new commands here. + * @default ["{\"Symbol:str\":\"newGame\",\"TextStr:str\":\"Untitled\",\"TextJS:func\":\"\\\"return TextManager.newGame;\\\"\",\"ShowJS:func\":\"\\\"return true;\\\"\",\"EnableJS:func\":\"\\\"return true;\\\"\",\"ExtJS:func\":\"\\\"return null;\\\"\",\"CallHandlerJS:func\":\"\\\"SceneManager._scene.commandNewGame();\\\"\"}","{\"Symbol:str\":\"continue\",\"TextStr:str\":\"Untitled\",\"TextJS:func\":\"\\\"return TextManager.continue_;\\\"\",\"ShowJS:func\":\"\\\"return true;\\\"\",\"EnableJS:func\":\"\\\"return DataManager.isAnySavefileExists();\\\"\",\"ExtJS:func\":\"\\\"return null;\\\"\",\"CallHandlerJS:func\":\"\\\"SceneManager._scene.commandContinue();\\\"\"}","{\"Symbol:str\":\"options\",\"TextStr:str\":\"Untitled\",\"TextJS:func\":\"\\\"return TextManager.options;\\\"\",\"ShowJS:func\":\"\\\"return true;\\\"\",\"EnableJS:func\":\"\\\"return true;\\\"\",\"ExtJS:func\":\"\\\"return null;\\\"\",\"CallHandlerJS:func\":\"\\\"SceneManager._scene.commandOptions();\\\"\"}","{\"Symbol:str\":\"shutdown\",\"TextStr:str\":\"Untitled\",\"TextJS:func\":\"\\\"return TextManager.gameEnd;\\\"\",\"ShowJS:func\":\"\\\"return Utils.isNwjs();\\\"\",\"EnableJS:func\":\"\\\"return true;\\\"\",\"ExtJS:func\":\"\\\"return null;\\\"\",\"CallHandlerJS:func\":\"\\\"SceneManager.exit();\\\\n\\\\n// Note!\\\\n// Do NOT use this command with mobile devices or\\\\n// browser games. All it does is cause the game to\\\\n// display a blank, black canvas which the player\\\\n// is unable to do anything with. It does NOT force\\\\n// close the browser tab nor the app.\\\"\"}"] + * + * @param TitlePicButtons:arraystruct + * @text Title Picture Buttons + * @type struct[] + * @desc Buttons that can be inserted into the title screen. + * Add new title buttons here. + * @default [] + * + * @param UI:struct + * @text UI Settings + * @type struct + * @desc Change up various in-game UI aspects. + * @default {"UIArea":"","FadeSpeed:num":"24","BoxMargin:num":"4","CommandWidth:num":"240","BottomHelp:eval":"false","RightMenus:eval":"true","ShowButtons:eval":"true","cancelShowButton:eval":"true","menuShowButton:eval":"true","pagedownShowButton:eval":"true","numberShowButton:eval":"true","ButtonHeight:num":"52","BottomButtons:eval":"false","SideButtons:eval":"true","MenuObjects":"","LvExpGauge:eval":"true","ParamArrow:str":"→","TextCodeSupport":"","TextCodeClassNames:eval":"true","TextCodeNicknames:eval":"true"} + * + * @param Window:struct + * @text Window Settings + * @type struct + * @desc Adjust various in-game window settings. + * @default {"WindowDefaults":"","EnableMasking:eval":"false","LineHeight:num":"36","SelectableItems":"","ShowItemBackground:eval":"true","ItemHeight:num":"8","DrawItemBackgroundJS:func":"\"const rect = arguments[0];\\nconst c1 = ColorManager.itemBackColor1();\\nconst c2 = ColorManager.itemBackColor2();\\nconst x = rect.x;\\nconst y = rect.y;\\nconst w = rect.width;\\nconst h = rect.height;\\nthis.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true);\\nthis.contentsBack.strokeRect(x, y, w, h, c1);\"","ItemPadding:num":"8","BackOpacity:num":"192","TranslucentOpacity:num":"160","OpenSpeed:num":"32","ColSpacing:num":"8","RowSpacing:num":"4"} + * + * @param jsQuickFunc:arraystruct + * @text JS: Quick Functions + * @type struct[] + * @desc Create quick JavaScript functions available from the + * global namespace. Use with caution and moderation!!! + * @default ["{\"FunctionName:str\":\"Example\",\"CodeJS:json\":\"\\\"// Insert this as a function anywhere you can input code\\\\n// such as Script Calls or Conditional Branch Scripts.\\\\n\\\\n// Process Code\\\\nreturn 'Example';\\\"\"}","{\"FunctionName:str\":\"Bad Code Name\",\"CodeJS:json\":\"\\\"// If a function name has spaces in them, the spaces will\\\\n// be removed. \\\\\\\"Bad Code Name\\\\\\\" becomes \\\\\\\"BadeCodeName\\\\\\\".\\\\n\\\\n// Process Code\\\\nOhNoItsBadCode()\\\\n\\\\n// If a function has bad code, a fail safe will catch the\\\\n// error and display it in the console.\\\"\"}","{\"FunctionName:str\":\"RandomNumber\",\"CodeJS:json\":\"\\\"// This generates a random number from 0 to itself.\\\\n// Example: RandomNumber(10)\\\\n\\\\n// Process Code\\\\nconst number = (arguments[0] || 0) + 1;\\\\nreturn Math.floor(number * Math.random());\\\"\"}","{\"FunctionName:str\":\"RandomBetween\",\"CodeJS:json\":\"\\\"// This generates a random number between two arguments.\\\\n// Example: RandomNumber(5, 10)\\\\n\\\\n// Process Code\\\\nlet min = Math.min(arguments[0] || 0, arguments[1] || 0);\\\\nlet max = Math.max(arguments[0] || 0, arguments[1] || 0);\\\\nreturn Math.floor(Math.random() * (max - min + 1) + min);\\\"\"}","{\"FunctionName:str\":\"RandomFrom\",\"CodeJS:json\":\"\\\"// Selects a number from the list of inserted numbers.\\\\n// Example: RandomFrom(5, 10, 15, 20)\\\\n\\\\n// Process Code\\\\nreturn arguments[Math.randomInt(arguments.length)];\\\"\"}"] + * + * @param BreakEnd1 + * @text -------------------------- + * @default ---------------------------------- + * + * @param End Of + * @default Plugin Parameters + * + * @param BreakEnd2 + * @text -------------------------- + * @default ---------------------------------- + * + */ +/* ---------------------------------------------------------------------------- + * Quality of Life Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~QoLSettings: + * + * @param PlayTest + * @text Play Test + * + * @param NewGameBoot:eval + * @text New Game on Boot + * @parent PlayTest + * @type boolean + * @on Start New Game + * @off Keep Title Screen + * @desc Automatically start a new game on Play Test? + * Only enabled during Play Test. + * @default false + * + * @param ForceNoPlayTest:eval + * @text No Play Test Mode + * @parent PlayTest + * @type boolean + * @on Cancel Play Test + * @off Keep Play Test + * @desc Force the game to be out of Play Test mode when play testing. + * @default false + * + * @param OpenConsole:eval + * @text Open Console on Boot + * @parent PlayTest + * @type boolean + * @on Open + * @off Don't Open + * @desc Open the Debug Console upon booting up your game? + * Only enabled during Play Test. + * @default true + * + * @param F6key:eval + * @text F6: Toggle Sound + * @parent PlayTest + * @type boolean + * @on Enable + * @off Don't + * @desc F6 Key Function: Turn on all sound to 100% or to 0%, + * toggling between the two. + * @default true + * + * @param F7key:eval + * @text F7: Toggle Fast Mode + * @parent PlayTest + * @type boolean + * @on Enable + * @off Don't + * @desc F7 Key Function: Toggle fast mode. + * @default true + * + * @param NewGameCommonEvent:num + * @text NewGame > CommonEvent + * @parent PlayTest + * @type common_event + * @desc Runs a common event each time a new game during play test + * session is started. + * @default 0 + * + * @param BattleTest + * @text Battle Test + * + * @param BTestItems:eval + * @text Add Item Type + * @parent BattleTest + * @type boolean + * @on Add + * @off Don't + * @desc Add copies of each database item? + * Effective only during battle test. + * @default true + * + * @param BTestWeapons:eval + * @text Add Weapon Type + * @parent BattleTest + * @type boolean + * @on Add + * @off Don't + * @desc Add copies of each database weapon? + * Effective only during battle test. + * @default true + * + * @param BTestArmors:eval + * @text Add Armor Type + * @parent BattleTest + * @type boolean + * @on Add + * @off Don't + * @desc Add copies of each database armor? + * Effective only during battle test. + * @default true + * + * @param BTestAddedQuantity:num + * @text Added Quantity + * @parent BattleTest + * @type number + * @min 1 + * @desc Determines how many items are added during a battle test instead of the maximum amount. + * @default 90 + * + * @param DigitGrouping + * @text Digit Grouping + * + * @param DigitGroupingStandardText:eval + * @text Standard Text + * @parent DigitGrouping + * @type boolean + * @on Enable + * @off Disable + * @desc Make numbers like 1234567 appear like 1,234,567 for + * standard text inside windows? + * @default true + * + * @param DigitGroupingExText:eval + * @text Ex Text + * @parent DigitGrouping + * @type boolean + * @on Enable + * @off Disable + * @desc Make numbers like 1234567 appear like 1,234,567 for + * ex text, written through drawTextEx (like messages)? + * @default true + * + * @param DigitGroupingDamageSprites:eval + * @text Damage Sprites + * @parent DigitGrouping + * @type boolean + * @on Enable + * @off Disable + * @desc Make numbers like 1234567 appear like 1,234,567 for + * in-battle damage sprites? + * @default true + * + * @param DigitGroupingGaugeSprites:eval + * @text Gauge Sprites + * @parent DigitGrouping + * @type boolean + * @on Enable + * @off Disable + * @desc Make numbers like 1234567 appear like 1,234,567 for + * visible gauge sprites such as HP, MP, and TP gauges? + * @default true + * + * @param DigitGroupingLocale:str + * @text Country/Locale + * @parent DigitGrouping + * @type combo + * @option ar-SA + * @option bn-BD + * @option bn-IN + * @option cs-CZ + * @option da-DK + * @option de-AT + * @option de-CH + * @option de-DE + * @option el-GR + * @option en-AU + * @option en-CA + * @option en-GB + * @option en-IE + * @option en-IN + * @option en-NZ + * @option en-US + * @option en-ZA + * @option es-AR + * @option es-CL + * @option es-CO + * @option es-ES + * @option es-MX + * @option es-US + * @option fi-FI + * @option fr-BE + * @option fr-CA + * @option fr-CH + * @option fr-FR + * @option he-IL + * @option hi-IN + * @option hu-HU + * @option id-ID + * @option it-CH + * @option it-IT + * @option jp-JP + * @option ko-KR + * @option nl-BE + * @option nl-NL + * @option no-NO + * @option pl-PL + * @option pt-BR + * @option pt-PT + * @option ro-RO + * @option ru-RU + * @option sk-SK + * @option sv-SE + * @option ta-IN + * @option ta-LK + * @option th-TH + * @option tr-TR + * @option zh-CN + * @option zh-HK + * @option zh-TW + * @desc Base the digit grouping on which country/locale? + * @default en-US + * + * @param PlayerBenefit + * @text Player Benefit + * + * @param EncounterRateMinimum:num + * @text Encounter Rate Min + * @parent PlayerBenefit + * @min 1 + * @desc Minimum number of steps the player can take without any random encounters. + * @default 10 + * + * @param EscapeAlways:eval + * @text Escape Always + * @parent PlayerBenefit + * @type boolean + * @on Always + * @off Default + * @desc If the player wants to escape a battle, let them escape the battle with 100% chance. + * @default true + * + * @param ImprovedAccuracySystem:eval + * @text Accuracy Formula + * @parent PlayerBenefit + * @type boolean + * @on Improve + * @off Default + * @desc Accuracy formula calculation change to + * Skill Hit% * (User HIT - Target EVA) for better results. + * @default true + * + * @param AccuracyBoost:eval + * @text Accuracy Boost + * @parent PlayerBenefit + * @type boolean + * @on Boost + * @off Default + * @desc Boost HIT and EVA rates in favor of the player. + * @default true + * + * @param LevelUpFullHp:eval + * @text Level Up -> Full HP + * @parent PlayerBenefit + * @type boolean + * @on Heal + * @off Default + * @desc Recovers full HP when an actor levels up. + * @default true + * + * @param LevelUpFullMp:eval + * @text Level Up -> Full MP + * @parent PlayerBenefit + * @type boolean + * @on Heal + * @off Default + * @desc Recovers full MP when an actor levels up. + * @default true + * + * @param Pictures + * @text Picture-Related + * + * @param AntiZoomPictures:eval + * @text Anti-Zoom Pictures + * @parent Pictures + * @type boolean + * @on Anti-Zoom + * @off Normal + * @desc If on, prevents pictures from being affected by zoom. + * @default true + * + * @param PictureContainers + * @text Picture Containers + * @parent Pictures + * + * @param DetachBattlePictureContainer:eval + * @text Detach in Battle + * @parent PictureContainers + * @type boolean + * @on Detach + * @off Normal + * @desc If detached, picture container will be separated from + * the spriteset while on the battle scene. + * @default false + * + * @param DetachMapPictureContainer:eval + * @text Detach in Map + * @parent PictureContainers + * @type boolean + * @on Detach + * @off Normal + * @desc If detached, picture container will be separated from + * the spriteset while on the map scene. + * @default false + * + * @param Misc + * @text Misc + * + * @param AnimationMirrorOffset:eval + * @text Ani: Mirror Offset + * @parent Misc + * @type boolean + * @on Mirror + * @off Don't Mirror + * @desc When animations are mirrored, + * mirror their Offset X values, too. + * @default false + * + * @param AutoStretch:str + * @text Auto-Stretch + * @parent Misc + * @type select + * @option Default + * @value default + * @option Stretch + * @value stretch + * @option Normal + * @value normal + * @desc Automatically stretch the game to fit the size of the client? + * @default default + * + * @param FontShadows:eval + * @text Font Shadows + * @parent Misc + * @type boolean + * @on Shadows + * @off Outlines + * @desc If on, text uses shadows instead of outlines. + * @default false + * + * @param FontSmoothing:eval + * @text Font Smoothing + * @parent Misc + * @type boolean + * @on Smooth + * @off None + * @desc If on, smoothes fonts shown in-game. + * @default true + * + * @param FontWidthFix:eval + * @text Font Width Fix + * @parent Misc + * @type boolean + * @on Fix + * @off Default + * @desc Fixes the font width issue with instant display + * non-monospaced fonts in the Message Window. + * @default true + * + * @param KeyItemProtect:eval + * @text Key Item Protection + * @parent Misc + * @type boolean + * @on Unsellable + * @off Sellable + * @desc If on, prevents Key Items from being able to be sold and from being able to be consumed. + * @default true + * + * @param ModernControls:eval + * @text Modern Controls + * @parent Misc + * @type boolean + * @on Enable + * @off Default + * @desc If on, allows usage of the Home/End buttons as well as other modern configs. Affects other VisuStella plugins. + * @default true + * + * @param MvAnimationRate:num + * @text MV Animation Rate + * @parent Misc + * @min 1 + * @max 10 + * @desc Adjusts the rate at which MV animations play. + * Default: 4. Lower for faster. Higher for slower. + * @default 4 + * + * @param NewGameCommonEventAll:num + * @text NewGame > CommonEvent + * @parent Misc + * @type common_event + * @desc Runs a common event each time a new game during any session is started. + * @default 0 + * + * @param NoTileShadows:eval + * @text No Tile Shadows + * @parent Misc + * @type boolean + * @on Disable Tile Shadows + * @off Default + * @desc Removes tile shadows from being displayed in-game. + * @default false + * + * @param PixelateImageRendering:eval + * @text Pixel Image Rendering + * @parent Misc + * @type boolean + * @on Pixelate + * @off Smooth + * @desc If on, pixelates the image rendering (for pixel games). + * @default false + * + * @param RequireFocus:eval + * @text Require Focus? + * @parent Misc + * @type boolean + * @on Require + * @off No Requirement + * @desc Requires the game to be focused? If the game isn't + * focused, it will pause if it's not the active window. + * @default true + * + * @param ShortcutScripts:eval + * @text Shortcut Scripts + * @parent Misc + * @type boolean + * @on Enable + * @off Disable + * @desc Enables shortcut-based scripts. + * View the helpfile for more information. + * @default true + * + * @param SmartEventCollisionPriority:eval + * @text Smart Event Collision + * @parent Misc + * @type boolean + * @on Only Same Level + * @off Default + * @desc Makes events only able to collide with one another if they're 'Same as characters' priority. + * @default true + * + * @param SubfolderParse:eval + * @text Subfolder Name Purge + * @parent Misc + * @type boolean + * @on Purge Subfolders Names + * @off Don't Purge Name + * @desc Purge subfolder name from Plugin Parameters when reading + * data to let Plugin Commands work properly. + * @default true + * + */ +/* ---------------------------------------------------------------------------- + * Color Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Color: + * + * @param BasicColors + * @text Basic Colors + * + * @param ColorNormal:str + * @text Normal + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 0 + * + * @param ColorSystem:str + * @text System + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 16 + * + * @param ColorCrisis:str + * @text Crisis + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 17 + * + * @param ColorDeath:str + * @text Death + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 18 + * + * @param ColorGaugeBack:str + * @text Gauge Back + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 19 + * + * @param ColorHPGauge1:str + * @text HP Gauge 1 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 20 + * + * @param ColorHPGauge2:str + * @text HP Gauge 2 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 21 + * + * @param ColorMPGauge1:str + * @text MP Gauge 1 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 22 + * + * @param ColorMPGauge2:str + * @text MP Gauge 2 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 23 + * + * @param ColorMPCost:str + * @text MP Cost + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 23 + * + * @param ColorPowerUp:str + * @text Power Up + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 24 + * + * @param ColorPowerDown:str + * @text Power Down + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 25 + * + * @param ColorCTGauge1:str + * @text CT Gauge 1 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 26 + * + * @param ColorCTGauge2:str + * @text CT Gauge 2 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 27 + * + * @param ColorTPGauge1:str + * @text TP Gauge 1 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 28 + * + * @param ColorTPGauge2:str + * @text TP Gauge 2 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 29 + * + * @param ColorTPCost:str + * @text TP Cost + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 29 + * + * @param ColorPending:str + * @text Pending Color + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default #2a847d + * + * @param ColorExpGauge1:str + * @text EXP Gauge 1 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 30 + * + * @param ColorExpGauge2:str + * @text EXP Gauge 2 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 31 + * + * @param ColorMaxLvGauge1:str + * @text MaxLv Gauge 1 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 14 + * + * @param ColorMaxLvGauge2:str + * @text MaxLv Gauge 2 + * @parent BasicColors + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 6 + * + * @param AlphaColors + * @text Alpha Colors + * + * @param OutlineColor:str + * @text Window Font Outline + * @parent AlphaColors + * @desc Colors with a bit of alpha settings. + * Format rgba(0-255, 0-255, 0-255, 0-1) + * @default rgba(0, 0, 0, 0.6) + * + * @param OutlineColorGauge:str + * @text Gauge Number Outline + * @parent AlphaColors + * @desc Colors with a bit of alpha settings. + * Format rgba(0-255, 0-255, 0-255, 0-1) + * @default rgba(0, 0, 0, 1.0) + * + * @param DimColor1:str + * @text Dim Color 1 + * @parent AlphaColors + * @desc Colors with a bit of alpha settings. + * Format rgba(0-255, 0-255, 0-255, 0-1) + * @default rgba(0, 0, 0, 0.6) + * + * @param DimColor2:str + * @text Dim Color 2 + * @parent AlphaColors + * @desc Colors with a bit of alpha settings. + * Format rgba(0-255, 0-255, 0-255, 0-1) + * @default rgba(0, 0, 0, 0) + * + * @param ItemBackColor1:str + * @text Item Back Color 1 + * @parent AlphaColors + * @desc Colors with a bit of alpha settings. + * Format rgba(0-255, 0-255, 0-255, 0-1) + * @default rgba(32, 32, 32, 0.5) + * + * @param ItemBackColor2:str + * @text Item Back Color 2 + * @parent AlphaColors + * @desc Colors with a bit of alpha settings. + * Format rgba(0-255, 0-255, 0-255, 0-1) + * @default rgba(0, 0, 0, 0.5) + * + * @param ConditionalColors + * @text Conditional Colors + * + * @param ActorHPColor:func + * @text JS: Actor HP Color + * @type note + * @parent ConditionalColors + * @desc Code used for determining what HP color to use for actors. + * @default "// Set the variables used in this function.\nlet actor = arguments[0];\n\n// Check if the actor exists. If not, return normal.\nif (!actor) {\n return this.normalColor();\n\n// If the actor is dead, return death color.\n} else if (actor.isDead()) {\n return this.deathColor();\n\n// If the actor is dying, return crisis color.\n} else if (actor.isDying()) {\n return this.crisisColor();\n\n// Otherwise, return the normal color.\n} else {\n return this.normalColor();\n}" + * + * @param ActorMPColor:func + * @text JS: Actor MP Color + * @type note + * @parent ConditionalColors + * @desc Code used for determining what MP color to use for actors. + * @default "// Set the variables used in this function.\nlet actor = arguments[0];\n\n// Check if the actor exists. If not, return normal.\nif (!actor) {\n return this.normalColor();\n\n// If MP rate is below 25%, return crisis color.\n} else if (actor.mpRate() < 0.25) {\n return this.crisisColor();\n\n// Otherwise, return the normal color.\n} else {\n return this.normalColor();\n}" + * + * @param ActorTPColor:func + * @text JS: Actor TP Color + * @type note + * @parent ConditionalColors + * @desc Code used for determining what TP color to use for actors. + * @default "// Set the variables used in this function.\nlet actor = arguments[0];\n\n// Check if the actor exists. If not, return normal.\nif (!actor) {\n return this.normalColor();\n\n// If TP rate is below 25%, return crisis color.\n} else if (actor.tpRate() < 0.25) {\n return this.crisisColor();\n\n// Otherwise, return the normal color.\n} else {\n return this.normalColor();\n}" + * + * @param ParamChange:func + * @text JS: Parameter Change + * @type note + * @parent ConditionalColors + * @desc Code used for determining whatcolor to use for parameter changes. + * @default "// Set the variables used in this function.\nlet change = arguments[0];\n\n// If a positive change, use power up color.\nif (change > 0) {\n return this.powerUpColor();\n\n// If a negative change, use power down color.\n} else if (change < 0) {\n return this.powerDownColor();\n\n// Otherwise, return the normal color.\n} else {\n return this.normalColor();\n}" + * + * @param DamageColor:func + * @text JS: Damage Colors + * @type note + * @parent ConditionalColors + * @desc Code used for determining what color to use for damage types. + * @default "// Set the variables used in this function.\nlet colorType = arguments[0];\n\n// Check the value of the color type\n// and return an appropriate color.\nswitch (colorType) {\n\n case 0: // HP damage\n return \"#ffffff\";\n\n case 1: // HP recover\n return \"#b9ffb5\";\n\n case 2: // MP damage\n return \"#bb88bb\";\n\n case 3: // MP recover\n return \"#80b0ff\";\n\n default:\n return \"#808080\";\n}" + */ +/* ---------------------------------------------------------------------------- + * Gold Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Gold: + * + * @param GoldMax:num + * @text Gold Max + * @type num + * @min 1 + * @desc Maximum amount of Gold the party can hold. + * Default 99999999 + * @default 99999999 + * + * @param GoldFontSize:num + * @text Gold Font Size + * @type number + * @min 1 + * @desc Font size used for displaying Gold inside Gold Windows. + * Default: 26 + * @default 24 + * + * @param GoldIcon:num + * @text Gold Icon + * @desc Icon used to represent Gold. + * Use 0 for no icon. + * @default 314 + * + * @param GoldOverlap:str + * @text Gold Overlap + * @desc Text used too much Gold to fit in the window. + * @default A Lot + * + * @param ItemStyle:eval + * @text Item Style + * @type boolean + * @on Enable + * @off Normal + * @desc Draw gold in the item style? + * ie: Icon, Label, Value + * @default true + * + */ +/* ---------------------------------------------------------------------------- + * Image Loading Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ImgLoad: + * + * @param animations:arraystr + * @text img/animations/ + * @type file[] + * @dir img/animations/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param battlebacks1:arraystr + * @text img/battlebacks1/ + * @type file[] + * @dir img/battlebacks1/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param battlebacks2:arraystr + * @text img/battlebacks2/ + * @type file[] + * @dir img/battlebacks2/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param characters:arraystr + * @text img/characters/ + * @type file[] + * @dir img/characters/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param enemies:arraystr + * @text img/enemies/ + * @type file[] + * @dir img/enemies/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param faces:arraystr + * @text img/faces/ + * @type file[] + * @dir img/faces/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param parallaxes:arraystr + * @text img/parallaxes/ + * @type file[] + * @dir img/parallaxes/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param pictures:arraystr + * @text img/pictures/ + * @type file[] + * @dir img/pictures/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param sv_actors:arraystr + * @text img/sv_actors/ + * @type file[] + * @dir img/sv_actors/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param sv_enemies:arraystr + * @text img/sv_enemies/ + * @type file[] + * @dir img/sv_enemies/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param system:arraystr + * @text img/system/ + * @type file[] + * @dir img/system/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default ["Balloon","IconSet"] + * + * @param tilesets:arraystr + * @text img/tilesets/ + * @type file[] + * @dir img/tilesets/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param titles1:arraystr + * @text img/titles1/ + * @type file[] + * @dir img/titles1/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + * @param titles2:arraystr + * @text img/titles2/ + * @type file[] + * @dir img/titles2/ + * @desc Which files do you wish to load from this directory upon + * starting up the game? + * @default [] + * + */ +/* ---------------------------------------------------------------------------- + * Keyboard Input Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~KeyboardInput: + * + * @param Controls + * + * @param WASD:eval + * @text WASD Movement + * @parent Controls + * @type boolean + * @on Enable + * @off Disable + * @desc Enables or disables WASD movement for your game project. + * Moves the W page down button to E. + * @default false + * + * @param DashToggleR:eval + * @text R Button: Dash Toggle + * @parent Controls + * @type boolean + * @on Enable + * @off Disable + * @desc Enables or disables R button as an Always Dash option toggle. + * @default false + * + * @param NameInput + * @text Name Input + * + * @param EnableNameInput:eval + * @text Enable? + * @parent NameInput + * @type boolean + * @on Enable + * @off Disable + * @desc Enables keyboard input for name entry. + * Only tested with English keyboards. + * @default true + * + * @param DefaultMode:str + * @text Default Mode + * @parent NameInput + * @type select + * @option Default - Uses Arrow Keys to select letters. + * @value default + * @option Keyboard - Uses Keyboard to type in letters. + * @value keyboard + * @desc Select default mode when entering the scene. + * @default keyboard + * + * @param QwertyLayout:eval + * @text QWERTY Layout + * @parent NameInput + * @type boolean + * @on QWERTY Layout + * @off ABCDEF Layout + * @desc Uses the QWERTY layout for manual entry. + * @default true + * + * @param NameInputMessage:eval + * @text Keyboard Message + * @parent NameInput + * @type note + * @desc The message displayed when allowing keyboard entry. + * You may use text codes here. + * @default "Type in this character's name.\nPress \\c[5]ENTER\\c[0] when you're done.\n\n-or-\n\nPress \\c[5]arrow keys\\c[0]/\\c[5]TAB\\c[0] to switch\nto manual character entry.\n\nPress \\c[5]ESC\\c[0]/\\c[5]TAB\\c[0] to use to keyboard." + * + * @param BannedWords:arraystr + * @text Banned Words + * @parent NameInput + * @type string[] + * @desc Players cannot use these words for names. + * These include words inside the names. + * @default [] + * + * @param NumberInput + * @text Number Input + * + * @param EnableNumberInput:eval + * @text Enable? + * @parent NumberInput + * @type boolean + * @on Enable + * @off Disable + * @desc Enables keyboard input for number entry. + * Only tested with English keyboards. + * @default true + * + * @param ButtonAssist + * @text Button Assist + * + * @param Keyboard:str + * @text Switch To Keyboard + * @parent ButtonAssist + * @desc Text used to describe the keyboard switch. + * @default Keyboard + * + * @param Manual:str + * @text Switch To Manual + * @parent ButtonAssist + * @desc Text used to describe the manual entry switch. + * @default Manual + * + */ +/* ---------------------------------------------------------------------------- + * Menu Background Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~MenuBg: + * + * @param Scene_Menu:struct + * @text Scene_Menu + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_Item:struct + * @text Scene_Item + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_Skill:struct + * @text Scene_Skill + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_Equip:struct + * @text Scene_Equip + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_Status:struct + * @text Scene_Status + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_Options:struct + * @text Scene_Options + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_Save:struct + * @text Scene_Save + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_Load:struct + * @text Scene_Load + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_GameEnd:struct + * @text Scene_GameEnd + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"128","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_Shop:struct + * @text Scene_Shop + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_Name:struct + * @text Scene_Name + * @type struct + * @desc The individual background settings for this scene. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Scene_Unlisted:struct + * @text Scene_Unlisted + * @type struct + * @desc The individual background settings for any scenes that aren't listed here. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + */ +/* ---------------------------------------------------------------------------- + * Background Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~BgSettings: + * + * @param SnapshotOpacity:num + * @text Snapshop Opacity + * @type number + * @min 0 + * @max 255 + * @desc Snapshot opacity for the scene. + * @default 192 + * + * @param BgFilename1:str + * @text Background 1 + * @type file + * @dir img/titles1/ + * @desc Filename used for the bottom background image. + * Leave empty if you don't wish to use one. + * @default + * + * @param BgFilename2:str + * @text Background 2 + * @type file + * @dir img/titles2/ + * @desc Filename used for the upper background image. + * Leave empty if you don't wish to use one. + * @default + * + */ +/* ---------------------------------------------------------------------------- + * Menu Button Assist Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ButtonAssist: + * + * @param General + * + * @param Enable:eval + * @text Enable + * @parent General + * @type boolean + * @on Use + * @off Don't Use + * @desc Enable the Menu Button Assist Window. + * @default true + * + * @param Location:str + * @text Location + * @parent General + * @type select + * @option Top of Screen + * @value top + * @option Bottom of Screen + * @value bottom + * @desc Determine the location of the Button Assist Window. + * Requires Plugin Parameters => UI => Side Buttons ON. + * @default bottom + * + * @param BgType:num + * @text Background Type + * @parent General + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param Text + * + * @param TextFmt:str + * @text Text Format + * @parent Text + * @desc Format on how the buttons are displayed. + * Text codes allowed. %1 - Key, %2 - Text + * @default %1:%2 + * + * @param MultiKeyFmt:str + * @text Multi-Key Format + * @parent Text + * @desc Format for actions with multiple keys. + * Text codes allowed. %1 - Key 1, %2 - Key 2 + * @default %1/%2 + * + * @param OkText:str + * @text OK Text + * @parent Text + * @desc Default text used to display OK Key Action. + * Text codes allowed. + * @default Select + * + * @param CancelText:str + * @text Cancel Text + * @parent Text + * @desc Default text used to display Cancel Key Action. + * Text codes allowed. + * @default Back + * + * @param SwitchActorText:str + * @text Switch Actor Text + * @parent Text + * @desc Default text used to display Switch Actor Action. + * Text codes allowed. + * @default Switch Ally + * + * @param Keys + * + * @param KeyUnlisted:str + * @text Key: Unlisted Format + * @parent Keys + * @desc If a key is not listed below, use this format. + * Text codes allowed. %1 - Key + * @default \}❪%1❫\{ + * + * @param KeyUP:str + * @text Key: Up + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default ^ + * + * @param KeyDOWN:str + * @text Key: Down + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default v + * + * @param KeyLEFT:str + * @text Key: Left + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default << + * + * @param KeyRIGHT:str + * @text Key: Right + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default >> + * + * @param KeySHIFT:str + * @text Key: Shift + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default \}❪SHIFT❫\{ + * + * @param KeyTAB:str + * @text Key: Tab + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default \}❪TAB❫\{ + * + * @param KeyA:str + * @text Key: A + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default A + * + * @param KeyB:str + * @text Key: B + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default B + * + * @param KeyC:str + * @text Key: C + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default C + * + * @param KeyD:str + * @text Key: D + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default D + * + * @param KeyE:str + * @text Key: E + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default E + * + * @param KeyF:str + * @text Key: F + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default F + * + * @param KeyG:str + * @text Key: G + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default G + * + * @param KeyH:str + * @text Key: H + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default H + * + * @param KeyI:str + * @text Key: I + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default I + * + * @param KeyJ:str + * @text Key: J + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default J + * + * @param KeyK:str + * @text Key: K + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default K + * + * @param KeyL:str + * @text Key: L + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default L + * + * @param KeyM:str + * @text Key: M + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default M + * + * @param KeyN:str + * @text Key: N + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default N + * + * @param KeyO:str + * @text Key: O + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default O + * + * @param KeyP:str + * @text Key: P + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default P + * + * @param KeyQ:str + * @text Key: Q + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default Q + * + * @param KeyR:str + * @text Key: R + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default R + * + * @param KeyS:str + * @text Key: S + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default S + * + * @param KeyT:str + * @text Key: T + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default T + * + * @param KeyU:str + * @text Key: U + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default U + * + * @param KeyV:str + * @text Key: V + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default V + * + * @param KeyW:str + * @text Key: W + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default W + * + * @param KeyX:str + * @text Key: X + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default X + * + * @param KeyY:str + * @text Key: Y + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default Y + * + * @param KeyZ:str + * @text Key: Z + * @parent Keys + * @desc How this key is shown in-game. + * Text codes allowed. + * @default Z + * + */ +/* ---------------------------------------------------------------------------- + * Menu Layout Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~MenuLayout: + * + * @param Title:struct + * @text Scene_Title + * @parent SceneSettings + * @type struct + * @desc Various options on adjusting the Title Scene. + * @default {"TitleScreen":"","DocumentTitleFmt:str":"%1: %2 - Version %3","Subtitle:str":"Subtitle","Version:str":"0.00","drawGameTitle:func":"\"const x = 20;\\nconst y = Graphics.height / 4;\\nconst maxWidth = Graphics.width - x * 2;\\nconst text = $dataSystem.gameTitle;\\nconst bitmap = this._gameTitleSprite.bitmap;\\nbitmap.fontFace = $gameSystem.mainFontFace();\\nbitmap.outlineColor = \\\"black\\\";\\nbitmap.outlineWidth = 8;\\nbitmap.fontSize = 72;\\nbitmap.drawText(text, x, y, maxWidth, 48, \\\"center\\\");\"","drawGameSubtitle:func":"\"const x = 20;\\nconst y = Graphics.height / 4 + 72;\\nconst maxWidth = Graphics.width - x * 2;\\nconst text = Scene_Title.subtitle;\\nconst bitmap = this._gameTitleSprite.bitmap;\\nbitmap.fontFace = $gameSystem.mainFontFace();\\nbitmap.outlineColor = \\\"black\\\";\\nbitmap.outlineWidth = 6;\\nbitmap.fontSize = 48;\\nbitmap.drawText(text, x, y, maxWidth, 48, \\\"center\\\");\"","drawGameVersion:func":"\"const bitmap = this._gameTitleSprite.bitmap;\\nconst x = 0;\\nconst y = Graphics.height - 20;\\nconst width = Math.round(Graphics.width / 4);\\nconst height = 20;\\nconst c1 = ColorManager.dimColor1();\\nconst c2 = ColorManager.dimColor2();\\nconst text = 'Version ' + Scene_Title.version;\\nbitmap.gradientFillRect(x, y, width, height, c1, c2);\\nbitmap.fontFace = $gameSystem.mainFontFace();\\nbitmap.outlineColor = \\\"black\\\";\\nbitmap.outlineWidth = 3;\\nbitmap.fontSize = 16;\\nbitmap.drawText(text, x + 4, y, Graphics.width, height, \\\"left\\\");\"","CommandRect:func":"\"const offsetX = $dataSystem.titleCommandWindow.offsetX;\\nconst offsetY = $dataSystem.titleCommandWindow.offsetY;\\nconst rows = this.commandWindowRows();\\nconst width = this.mainCommandWidth();\\nconst height = this.calcWindowHeight(rows, true);\\nconst x = (Graphics.boxWidth - width) / 2 + offsetX;\\nconst y = Graphics.boxHeight - height - 96 + offsetY;\\nreturn new Rectangle(x, y, width, height);\"","ButtonFadeSpeed:num":"4"} + * + * @param MainMenu:struct + * @text Scene_Menu + * @parent SceneSettings + * @type struct<MainMenu> + * @desc Various options on adjusting the Main Menu Scene. + * @default {"CommandWindow":"","CommandBgType:num":"0","CommandRect:func":"\"const width = this.mainCommandWidth();\\nconst height = this.mainAreaHeight() - this.goldWindowRect().height;\\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\\nconst y = this.mainAreaTop();\\nreturn new Rectangle(x, y, width, height);\"","GoldWindow":"","GoldBgType:num":"0","GoldRect:func":"\"const rows = 1;\\nconst width = this.mainCommandWidth();\\nconst height = this.calcWindowHeight(rows, true);\\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\\nconst y = this.mainAreaBottom() - height;\\nreturn new Rectangle(x, y, width, height);\"","StatusWindow":"","StatusBgType:num":"0","StatusRect:func":"\"const width = Graphics.boxWidth - this.mainCommandWidth();\\nconst height = this.mainAreaHeight();\\nconst x = this.isRightInputMode() ? 0 : Graphics.boxWidth - width;\\nconst y = this.mainAreaTop();\\nreturn new Rectangle(x, y, width, height);\""} + * + * @param ItemMenu:struct + * @text Scene_Item + * @parent SceneSettings + * @type struct<ItemMenu> + * @desc Various options on adjusting the Item Menu Scene. + * @default {"HelpWindow":"","HelpBgType:num":"0","HelpRect:func":"\"const x = 0;\\nconst y = this.helpAreaTop();\\nconst width = Graphics.boxWidth;\\nconst height = this.helpAreaHeight();\\nreturn new Rectangle(x, y, width, height);\"","CategoryWindow":"","CategoryBgType:num":"0","CategoryRect:func":"\"const x = 0;\\nconst y = this.mainAreaTop();\\nconst rows = 1;\\nconst width = Graphics.boxWidth;\\nconst height = this.calcWindowHeight(rows, true);\\nreturn new Rectangle(x, y, width, height);\"","ItemWindow":"","ItemBgType:num":"0","ItemRect:func":"\"const x = 0;\\nconst y = this._categoryWindow.y + this._categoryWindow.height;\\nconst width = Graphics.boxWidth;\\nconst height = this.mainAreaBottom() - y;\\nreturn new Rectangle(x, y, width, height);\"","ActorWindow":"","ActorBgType:num":"0","ActorRect:func":"\"const x = 0;\\nconst y = this.mainAreaTop();\\nconst width = Graphics.boxWidth;\\nconst height = this.mainAreaHeight();\\nreturn new Rectangle(x, y, width, height);\""} + * + * @param SkillMenu:struct + * @text Scene_Skill + * @parent SceneSettings + * @type struct<SkillMenu> + * @desc Various options on adjusting the Skill Menu Scene. + * @default {"HelpWindow":"","HelpBgType:num":"0","HelpRect:func":"\"const x = 0;\\nconst y = this.helpAreaTop();\\nconst width = Graphics.boxWidth;\\nconst height = this.helpAreaHeight();\\nreturn new Rectangle(x, y, width, height);\"","SkillTypeWindow":"","SkillTypeBgType:num":"0","SkillTypeRect:func":"\"const rows = 3;\\nconst width = this.mainCommandWidth();\\nconst height = this.calcWindowHeight(rows, true);\\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\\nconst y = this.mainAreaTop();\\nreturn new Rectangle(x, y, width, height);\"","StatusWindow":"","StatusBgType:num":"0","StatusRect:func":"\"const width = Graphics.boxWidth - this.mainCommandWidth();\\nconst height = this._skillTypeWindow.height;\\nconst x = this.isRightInputMode() ? 0 : Graphics.boxWidth - width;\\nconst y = this.mainAreaTop();\\nreturn new Rectangle(x, y, width, height);\"","ItemWindow":"","ItemBgType:num":"0","ItemRect:func":"\"const x = 0;\\nconst y = this._statusWindow.y + this._statusWindow.height;\\nconst width = Graphics.boxWidth;\\nconst height = this.mainAreaHeight() - this._statusWindow.height;\\nreturn new Rectangle(x, y, width, height);\"","ActorWindow":"","ActorBgType:num":"0","ActorRect:func":"\"const x = 0;\\nconst y = this.mainAreaTop();\\nconst width = Graphics.boxWidth;\\nconst height = this.mainAreaHeight();\\nreturn new Rectangle(x, y, width, height);\""} + * + * @param EquipMenu:struct + * @text Scene_Equip + * @parent SceneSettings + * @type struct<EquipMenu> + * @desc Various options on adjusting the Equip Menu Scene. + * @default {"HelpWindow":"","HelpBgType:num":"0","HelpRect:func":"\"const x = 0;\\nconst y = this.helpAreaTop();\\nconst width = Graphics.boxWidth;\\nconst height = this.helpAreaHeight();\\nreturn new Rectangle(x, y, width, height);\"","StatusWindow":"","StatusBgType:num":"0","StatusRect:func":"\"const x = 0;\\nconst y = this.mainAreaTop();\\nconst width = this.statusWidth();\\nconst height = this.mainAreaHeight();\\nreturn new Rectangle(x, y, width, height);\"","CommandWindow":"","CommandBgType:num":"0","CommandRect:func":"\"const x = this.statusWidth();\\nconst y = this.mainAreaTop();\\nconst rows = 1;\\nconst width = Graphics.boxWidth - this.statusWidth();\\nconst height = this.calcWindowHeight(rows, true);\\nreturn new Rectangle(x, y, width, height);\"","SlotWindow":"","SlotBgType:num":"0","SlotRect:func":"\"const commandWindowRect = this.commandWindowRect();\\nconst x = this.statusWidth();\\nconst y = commandWindowRect.y + commandWindowRect.height;\\nconst width = Graphics.boxWidth - this.statusWidth();\\nconst height = this.mainAreaHeight() - commandWindowRect.height;\\nreturn new Rectangle(x, y, width, height);\"","ItemWindow":"","ItemBgType:num":"0","ItemRect:func":"\"return this.slotWindowRect();\""} + * + * @param StatusMenu:struct + * @text Scene_Status + * @parent SceneSettings + * @type struct<StatusMenu> + * @desc Various options on adjusting the Status Menu Scene. + * @default {"ProfileWindow":"","ProfileBgType:num":"0","ProfileRect:func":"\"const width = Graphics.boxWidth;\\nconst height = this.profileHeight();\\nconst x = 0;\\nconst y = this.mainAreaBottom() - height;\\nreturn new Rectangle(x, y, width, height);\"","StatusWindow":"","StatusBgType:num":"0","StatusRect:func":"\"const x = 0;\\nconst y = this.mainAreaTop();\\nconst width = Graphics.boxWidth;\\nconst height = this.statusParamsWindowRect().y - y;\\nreturn new Rectangle(x, y, width, height);\"","StatusParamsWindow":"","StatusParamsBgType:num":"0","StatusParamsRect:func":"\"const width = this.statusParamsWidth();\\nconst height = this.statusParamsHeight();\\nconst x = 0;\\nconst y = this.mainAreaBottom() - this.profileHeight() - height;\\nreturn new Rectangle(x, y, width, height);\"","StatusEquipWindow":"","StatusEquipBgType:num":"0","StatusEquipRect:func":"\"const width = Graphics.boxWidth - this.statusParamsWidth();\\nconst height = this.statusParamsHeight();\\nconst x = this.statusParamsWidth();\\nconst y = this.mainAreaBottom() - this.profileHeight() - height;\\nreturn new Rectangle(x, y, width, height);\""} + * + * @param OptionsMenu:struct + * @text Scene_Options + * @parent SceneSettings + * @type struct<OptionsMenu> + * @desc Various options on adjusting the Options Menu Scene. + * @default {"OptionsWindow":"","OptionsBgType:num":"0","OptionsRect:func":"\"const n = Math.min(this.maxCommands(), this.maxVisibleCommands());\\nconst width = 400;\\nconst height = this.calcWindowHeight(n, true);\\nconst x = (Graphics.boxWidth - width) / 2;\\nconst y = (Graphics.boxHeight - height) / 2;\\nreturn new Rectangle(x, y, width, height);\""} + * + * @param SaveMenu:struct + * @text Scene_Save + * @parent SceneSettings + * @type struct<SaveMenu> + * @desc Various options on adjusting the Save Menu Scene. + * @default {"HelpWindow":"","HelpBgType:num":"0","HelpRect:func":"\"const x = 0;\\nconst y = this.mainAreaTop();\\nconst rows = 1;\\nconst width = Graphics.boxWidth;\\nconst height = this.calcWindowHeight(rows, false);\\nreturn new Rectangle(x, y, width, height);\"","ListWindow":"","ListBgType:num":"0","ListRect:func":"\"const x = 0;\\nconst y = this.mainAreaTop() + this._helpWindow.height;\\nconst width = Graphics.boxWidth;\\nconst height = this.mainAreaHeight() - this._helpWindow.height;\\nreturn new Rectangle(x, y, width, height);\""} + * + * @param LoadMenu:struct + * @text Scene_Load + * @parent SceneSettings + * @type struct<LoadMenu> + * @desc Various options on adjusting the Load Menu Scene. + * @default {"HelpWindow":"","HelpBgType:num":"0","HelpRect:func":"\"const x = 0;\\nconst y = this.mainAreaTop();\\nconst rows = 1;\\nconst width = Graphics.boxWidth;\\nconst height = this.calcWindowHeight(rows, false);\\nreturn new Rectangle(x, y, width, height);\"","ListWindow":"","ListBgType:num":"0","ListRect:func":"\"const x = 0;\\nconst y = this.mainAreaTop() + this._helpWindow.height;\\nconst width = Graphics.boxWidth;\\nconst height = this.mainAreaHeight() - this._helpWindow.height;\\nreturn new Rectangle(x, y, width, height);\""} + * + * @param GameEnd:struct + * @text Scene_GameEnd + * @parent SceneSettings + * @type struct<GameEnd> + * @desc Various options on adjusting the Game End Scene. + * @default {"CommandList:arraystruct":"[\"{\\\"Symbol:str\\\":\\\"toTitle\\\",\\\"TextStr:str\\\":\\\"Untitled\\\",\\\"TextJS:func\\\":\\\"\\\\\\\"return TextManager.toTitle;\\\\\\\"\\\",\\\"ShowJS:func\\\":\\\"\\\\\\\"return true;\\\\\\\"\\\",\\\"EnableJS:func\\\":\\\"\\\\\\\"return true;\\\\\\\"\\\",\\\"ExtJS:func\\\":\\\"\\\\\\\"return null;\\\\\\\"\\\",\\\"CallHandlerJS:func\\\":\\\"\\\\\\\"SceneManager._scene.commandToTitle();\\\\\\\"\\\"}\",\"{\\\"Symbol:str\\\":\\\"cancel\\\",\\\"TextStr:str\\\":\\\"Untitled\\\",\\\"TextJS:func\\\":\\\"\\\\\\\"return TextManager.cancel;\\\\\\\"\\\",\\\"ShowJS:func\\\":\\\"\\\\\\\"return true;\\\\\\\"\\\",\\\"EnableJS:func\\\":\\\"\\\\\\\"return true;\\\\\\\"\\\",\\\"ExtJS:func\\\":\\\"\\\\\\\"return null;\\\\\\\"\\\",\\\"CallHandlerJS:func\\\":\\\"\\\\\\\"SceneManager._scene.popScene();\\\\\\\"\\\"}\"]","CommandBgType:num":"0","CommandRect:func":"\"const rows = 2;\\nconst width = this.mainCommandWidth();\\nconst height = this.calcWindowHeight(rows, true);\\nconst x = (Graphics.boxWidth - width) / 2;\\nconst y = (Graphics.boxHeight - height) / 2;\\nreturn new Rectangle(x, y, width, height);\""} + * + * @param ShopMenu:struct + * @text Scene_Shop + * @parent SceneSettings + * @type struct<ShopMenu> + * @desc Various options on adjusting the Shop Menu Scene. + * @default {"HelpWindow":"","HelpBgType:num":"0","HelpRect:func":"\"const wx = 0;\\nconst wy = this.helpAreaTop();\\nconst ww = Graphics.boxWidth;\\nconst wh = this.helpAreaHeight();\\nreturn new Rectangle(wx, wy, ww, wh);\"","GoldWindow":"","GoldBgType:num":"0","GoldRect:func":"\"const rows = 1;\\nconst width = this.mainCommandWidth();\\nconst height = this.calcWindowHeight(rows, true);\\nconst x = Graphics.boxWidth - width;\\nconst y = this.mainAreaTop();\\nreturn new Rectangle(x, y, width, height);\"","CommandWindow":"","CommandBgType:num":"0","CommandRect:func":"\"const x = 0;\\nconst y = this.mainAreaTop();\\nconst rows = 1;\\nconst width = this._goldWindow.x;\\nconst height = this.calcWindowHeight(rows, true);\\nreturn new Rectangle(x, y, width, height);\"","DummyWindow":"","DummyBgType:num":"0","DummyRect:func":"\"const x = 0;\\nconst y = this._commandWindow.y + this._commandWindow.height;\\nconst width = Graphics.boxWidth;\\nconst height = this.mainAreaHeight() - this._commandWindow.height;\\nreturn new Rectangle(x, y, width, height);\"","NumberWindow":"","NumberBgType:num":"0","NumberRect:func":"\"const x = 0;\\nconst y = this._dummyWindow.y;\\nconst width = Graphics.boxWidth - this.statusWidth();\\nconst height = this._dummyWindow.height;\\nreturn new Rectangle(x, y, width, height);\"","StatusWindow":"","StatusBgType:num":"0","StatusRect:func":"\"const width = this.statusWidth();\\nconst height = this._dummyWindow.height;\\nconst x = Graphics.boxWidth - width;\\nconst y = this._dummyWindow.y;\\nreturn new Rectangle(x, y, width, height);\"","BuyWindow":"","BuyBgType:num":"0","BuyRect:func":"\"const x = 0;\\nconst y = this._dummyWindow.y;\\nconst width = Graphics.boxWidth - this.statusWidth();\\nconst height = this._dummyWindow.height;\\nreturn new Rectangle(x, y, width, height);\"","CategoryWindow":"","CategoryBgType:num":"0","CategoryRect:func":"\"const x = 0;\\nconst y = this._dummyWindow.y;\\nconst rows = 1;\\nconst width = Graphics.boxWidth;\\nconst height = this.calcWindowHeight(rows, true);\\nreturn new Rectangle(x, y, width, height);\"","SellWindow":"","SellBgType:num":"0","SellRect:func":"\"const x = 0;\\nconst y = this._categoryWindow.y + this._categoryWindow.height;\\nconst width = Graphics.boxWidth;\\nconst height =\\n this.mainAreaHeight() -\\n this._commandWindow.height -\\n this._categoryWindow.height;\\nreturn new Rectangle(x, y, width, height);\""} + * + * @param NameMenu:struct + * @text Scene_Name + * @parent SceneSettings + * @type struct<NameMenu> + * @desc Various options on adjusting the Actor Rename Scene. + * @default {"EditWindow":"","EditBgType:num":"0","EditRect:func":"\"const rows = 9;\\nconst inputWindowHeight = this.calcWindowHeight(rows, true);\\nconst padding = $gameSystem.windowPadding();\\nconst width = 600;\\nconst height = Math.min(ImageManager.faceHeight + padding * 2, this.mainAreaHeight() - inputWindowHeight);\\nconst x = (Graphics.boxWidth - width) / 2;\\nconst y = (this.mainAreaHeight() - (height + inputWindowHeight)) / 2 + this.mainAreaTop();\\nreturn new Rectangle(x, y, width, height);\"","InputWindow":"","InputBgType:num":"0","InputRect:func":"\"const x = this._editWindow.x;\\nconst y = this._editWindow.y + this._editWindow.height;\\nconst rows = 9;\\nconst width = this._editWindow.width;\\nconst height = this.calcWindowHeight(rows, true);\\nreturn new Rectangle(x, y, width, height);\""} + * + */ +/* ---------------------------------------------------------------------------- + * Main Menu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~MainMenu: + * + * @param CommandWindow + * @text Command Window + * + * @param CommandBgType:num + * @text Background Type + * @parent CommandWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param CommandRect:func + * @text JS: X, Y, W, H + * @parent CommandWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const width = this.mainCommandWidth();\nconst height = this.mainAreaHeight() - this.goldWindowRect().height;\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\nconst y = this.mainAreaTop();\nreturn new Rectangle(x, y, width, height);" + * + * @param GoldWindow + * @text Gold Window + * + * @param GoldBgType:num + * @text Background Type + * @parent GoldWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param GoldRect:func + * @text JS: X, Y, W, H + * @parent GoldWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const rows = 1;\nconst width = this.mainCommandWidth();\nconst height = this.calcWindowHeight(rows, true);\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\nconst y = this.mainAreaBottom() - height;\nreturn new Rectangle(x, y, width, height);" + * + * @param StatusWindow + * @text Status Window + * + * @param StatusBgType:num + * @text Background Type + * @parent StatusWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param StatusRect:func + * @text JS: X, Y, W, H + * @parent StatusWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const width = Graphics.boxWidth - this.mainCommandWidth();\nconst height = this.mainAreaHeight();\nconst x = this.isRightInputMode() ? 0 : Graphics.boxWidth - width;\nconst y = this.mainAreaTop();\nreturn new Rectangle(x, y, width, height);" + * + */ +/* ---------------------------------------------------------------------------- + * Item Menu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ItemMenu: + * + * @param HelpWindow + * @text Help Window + * + * @param HelpBgType:num + * @text Background Type + * @parent HelpWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param HelpRect:func + * @text JS: X, Y, W, H + * @parent HelpWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.helpAreaTop();\nconst width = Graphics.boxWidth;\nconst height = this.helpAreaHeight();\nreturn new Rectangle(x, y, width, height);" + * + * @param CategoryWindow + * @text Category Window + * + * @param CategoryBgType:num + * @text Background Type + * @parent CategoryWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param CategoryRect:func + * @text JS: X, Y, W, H + * @parent CategoryWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.mainAreaTop();\nconst rows = 1;\nconst width = Graphics.boxWidth;\nconst height = this.calcWindowHeight(rows, true);\nreturn new Rectangle(x, y, width, height);" + * + * @param ItemWindow + * @text Item Window + * + * @param ItemBgType:num + * @text Background Type + * @parent ItemWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param ItemRect:func + * @text JS: X, Y, W, H + * @parent ItemWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this._categoryWindow.y + this._categoryWindow.height;\nconst width = Graphics.boxWidth;\nconst height = this.mainAreaBottom() - y;\nreturn new Rectangle(x, y, width, height);" + * + * @param ActorWindow + * @text Actor Window + * + * @param ActorBgType:num + * @text Background Type + * @parent ActorWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param ActorRect:func + * @text JS: X, Y, W, H + * @parent ActorWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.mainAreaTop();\nconst width = Graphics.boxWidth;\nconst height = this.mainAreaHeight();\nreturn new Rectangle(x, y, width, height);" + * + */ +/* ---------------------------------------------------------------------------- + * Skill Menu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~SkillMenu: + * + * @param HelpWindow + * @text Help Window + * + * @param HelpBgType:num + * @text Background Type + * @parent HelpWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param HelpRect:func + * @text JS: X, Y, W, H + * @parent HelpWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.helpAreaTop();\nconst width = Graphics.boxWidth;\nconst height = this.helpAreaHeight();\nreturn new Rectangle(x, y, width, height);" + * + * @param SkillTypeWindow + * @text Skill Type Window + * + * @param SkillTypeBgType:num + * @text Background Type + * @parent SkillTypeWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param SkillTypeRect:func + * @text JS: X, Y, W, H + * @parent SkillTypeWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const rows = 3;\nconst width = this.mainCommandWidth();\nconst height = this.calcWindowHeight(rows, true);\nconst x = this.isRightInputMode() ? Graphics.boxWidth - width : 0;\nconst y = this.mainAreaTop();\nreturn new Rectangle(x, y, width, height);" + * + * @param StatusWindow + * @text Status Window + * + * @param StatusBgType:num + * @text Background Type + * @parent StatusWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param StatusRect:func + * @text JS: X, Y, W, H + * @parent StatusWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const width = Graphics.boxWidth - this.mainCommandWidth();\nconst height = this._skillTypeWindow.height;\nconst x = this.isRightInputMode() ? 0 : Graphics.boxWidth - width;\nconst y = this.mainAreaTop();\nreturn new Rectangle(x, y, width, height);" + * + * @param ItemWindow + * @text Item Window + * + * @param ItemBgType:num + * @text Background Type + * @parent ItemWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param ItemRect:func + * @text JS: X, Y, W, H + * @parent ItemWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this._statusWindow.y + this._statusWindow.height;\nconst width = Graphics.boxWidth;\nconst height = this.mainAreaHeight() - this._statusWindow.height;\nreturn new Rectangle(x, y, width, height);" + * + * @param ActorWindow + * @text Actor Window + * + * @param ActorBgType:num + * @text Background Type + * @parent ActorWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param ActorRect:func + * @text JS: X, Y, W, H + * @parent ActorWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.mainAreaTop();\nconst width = Graphics.boxWidth;\nconst height = this.mainAreaHeight();\nreturn new Rectangle(x, y, width, height);" + * + */ +/* ---------------------------------------------------------------------------- + * Equip Menu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~EquipMenu: + * + * @param HelpWindow + * @text Help Window + * + * @param HelpBgType:num + * @text Background Type + * @parent HelpWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param HelpRect:func + * @text JS: X, Y, W, H + * @parent HelpWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.helpAreaTop();\nconst width = Graphics.boxWidth;\nconst height = this.helpAreaHeight();\nreturn new Rectangle(x, y, width, height);" + * + * @param StatusWindow + * @text Status Window + * + * @param StatusBgType:num + * @text Background Type + * @parent StatusWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param StatusRect:func + * @text JS: X, Y, W, H + * @parent StatusWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.mainAreaTop();\nconst width = this.statusWidth();\nconst height = this.mainAreaHeight();\nreturn new Rectangle(x, y, width, height);" + * + * @param CommandWindow + * @text Command Window + * + * @param CommandBgType:num + * @text Background Type + * @parent CommandWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param CommandRect:func + * @text JS: X, Y, W, H + * @parent CommandWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = this.statusWidth();\nconst y = this.mainAreaTop();\nconst rows = 1;\nconst width = Graphics.boxWidth - this.statusWidth();\nconst height = this.calcWindowHeight(rows, true);\nreturn new Rectangle(x, y, width, height);" + * + * @param SlotWindow + * @text Slot Window + * + * @param SlotBgType:num + * @text Background Type + * @parent SlotWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param SlotRect:func + * @text JS: X, Y, W, H + * @parent SlotWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const commandWindowRect = this.commandWindowRect();\nconst x = this.statusWidth();\nconst y = commandWindowRect.y + commandWindowRect.height;\nconst width = Graphics.boxWidth - this.statusWidth();\nconst height = this.mainAreaHeight() - commandWindowRect.height;\nreturn new Rectangle(x, y, width, height);" + * + * @param ItemWindow + * @text Item Window + * + * @param ItemBgType:num + * @text Background Type + * @parent ItemWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param ItemRect:func + * @text JS: X, Y, W, H + * @parent ItemWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "return this.slotWindowRect();" + * + */ +/* ---------------------------------------------------------------------------- + * Status Menu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~StatusMenu: + * + * @param ProfileWindow + * @text Profile Window + * + * @param ProfileBgType:num + * @text Background Type + * @parent ProfileWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param ProfileRect:func + * @text JS: X, Y, W, H + * @parent ProfileWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const width = Graphics.boxWidth;\nconst height = this.profileHeight();\nconst x = 0;\nconst y = this.mainAreaBottom() - height;\nreturn new Rectangle(x, y, width, height);" + * + * @param StatusWindow + * @text Status Window + * + * @param StatusBgType:num + * @text Background Type + * @parent StatusWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param StatusRect:func + * @text JS: X, Y, W, H + * @parent StatusWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.mainAreaTop();\nconst width = Graphics.boxWidth;\nconst height = this.statusParamsWindowRect().y - y;\nreturn new Rectangle(x, y, width, height);" + * + * @param StatusParamsWindow + * @text Parameters Window + * + * @param StatusParamsBgType:num + * @text Background Type + * @parent StatusParamsWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param StatusParamsRect:func + * @text JS: X, Y, W, H + * @parent StatusParamsWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const width = this.statusParamsWidth();\nconst height = this.statusParamsHeight();\nconst x = 0;\nconst y = this.mainAreaBottom() - this.profileHeight() - height;\nreturn new Rectangle(x, y, width, height);" + * + * @param StatusEquipWindow + * @text Equipment Window + * + * @param StatusEquipBgType:num + * @text Background Type + * @parent StatusEquipWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param StatusEquipRect:func + * @text JS: X, Y, W, H + * @parent StatusEquipWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const width = Graphics.boxWidth - this.statusParamsWidth();\nconst height = this.statusParamsHeight();\nconst x = this.statusParamsWidth();\nconst y = this.mainAreaBottom() - this.profileHeight() - height;\nreturn new Rectangle(x, y, width, height);" + * + */ +/* ---------------------------------------------------------------------------- + * Options Menu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~OptionsMenu: + * + * @param OptionsWindow + * @text Options Window + * + * @param OptionsBgType:num + * @text Background Type + * @parent OptionsWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param OptionsRect:func + * @text JS: X, Y, W, H + * @parent OptionsWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const n = Math.min(this.maxCommands(), this.maxVisibleCommands());\nconst width = 400;\nconst height = this.calcWindowHeight(n, true);\nconst x = (Graphics.boxWidth - width) / 2;\nconst y = (Graphics.boxHeight - height) / 2;\nreturn new Rectangle(x, y, width, height);" + * + */ +/* ---------------------------------------------------------------------------- + * Save Menu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~SaveMenu: + * + * @param HelpWindow + * @text Help Window + * + * @param HelpBgType:num + * @text Background Type + * @parent HelpWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param HelpRect:func + * @text JS: X, Y, W, H + * @parent HelpWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.mainAreaTop();\nconst rows = 1;\nconst width = Graphics.boxWidth;\nconst height = this.calcWindowHeight(rows, false);\nreturn new Rectangle(x, y, width, height);" + * + * @param ListWindow + * @text List Window + * + * @param ListBgType:num + * @text Background Type + * @parent ListWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param ListRect:func + * @text JS: X, Y, W, H + * @parent ListWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.mainAreaTop() + this._helpWindow.height;\nconst width = Graphics.boxWidth;\nconst height = this.mainAreaHeight() - this._helpWindow.height;\nreturn new Rectangle(x, y, width, height);" + * + */ +/* ---------------------------------------------------------------------------- + * Load Menu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~LoadMenu: + * + * @param HelpWindow + * @text Help Window + * + * @param HelpBgType:num + * @text Background Type + * @parent HelpWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param HelpRect:func + * @text JS: X, Y, W, H + * @parent HelpWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.mainAreaTop();\nconst rows = 1;\nconst width = Graphics.boxWidth;\nconst height = this.calcWindowHeight(rows, false);\nreturn new Rectangle(x, y, width, height);" + * + * @param ListWindow + * @text List Window + * + * @param ListBgType:num + * @text Background Type + * @parent ListWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param ListRect:func + * @text JS: X, Y, W, H + * @parent ListWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.mainAreaTop() + this._helpWindow.height;\nconst width = Graphics.boxWidth;\nconst height = this.mainAreaHeight() - this._helpWindow.height;\nreturn new Rectangle(x, y, width, height);" + * + */ +/* ---------------------------------------------------------------------------- + * Game End Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~GameEnd: + * + * @param CommandList:arraystruct + * @text Command Window List + * @type struct<Command>[] + * @desc Window commands used by the Game End screen. + * Add new commands here. + * @default ["{\"Symbol:str\":\"toTitle\",\"TextStr:str\":\"Untitled\",\"TextJS:func\":\"\\\"return TextManager.toTitle;\\\"\",\"ShowJS:func\":\"\\\"return true;\\\"\",\"EnableJS:func\":\"\\\"return true;\\\"\",\"ExtJS:func\":\"\\\"return null;\\\"\",\"CallHandlerJS:func\":\"\\\"SceneManager._scene.commandToTitle();\\\"\"}","{\"Symbol:str\":\"cancel\",\"TextStr:str\":\"Untitled\",\"TextJS:func\":\"\\\"return TextManager.cancel;\\\"\",\"ShowJS:func\":\"\\\"return true;\\\"\",\"EnableJS:func\":\"\\\"return true;\\\"\",\"ExtJS:func\":\"\\\"return null;\\\"\",\"CallHandlerJS:func\":\"\\\"SceneManager._scene.popScene();\\\"\"}"] + * + * @param CommandBgType:num + * @text Background Type + * @parent CommandList:arraystruct + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param CommandRect:func + * @text JS: X, Y, W, H + * @parent CommandList:arraystruct + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const rows = 2;\nconst width = this.mainCommandWidth();\nconst height = this.calcWindowHeight(rows, true);\nconst x = (Graphics.boxWidth - width) / 2;\nconst y = (Graphics.boxHeight - height) / 2;\nreturn new Rectangle(x, y, width, height);" + * + */ +/* ---------------------------------------------------------------------------- + * Shop Menu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ShopMenu: + * + * @param HelpWindow + * @text Help Window + * + * @param HelpBgType:num + * @text Background Type + * @parent HelpWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param HelpRect:func + * @text JS: X, Y, W, H + * @parent HelpWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const wx = 0;\nconst wy = this.helpAreaTop();\nconst ww = Graphics.boxWidth;\nconst wh = this.helpAreaHeight();\nreturn new Rectangle(wx, wy, ww, wh);" + * + * @param GoldWindow + * @text Gold Window + * + * @param GoldBgType:num + * @text Background Type + * @parent GoldWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param GoldRect:func + * @text JS: X, Y, W, H + * @parent GoldWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const rows = 1;\nconst width = this.mainCommandWidth();\nconst height = this.calcWindowHeight(rows, true);\nconst x = Graphics.boxWidth - width;\nconst y = this.mainAreaTop();\nreturn new Rectangle(x, y, width, height);" + * + * @param CommandWindow + * @text Command Window + * + * @param CommandBgType:num + * @text Background Type + * @parent CommandWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param CommandRect:func + * @text JS: X, Y, W, H + * @parent CommandWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this.mainAreaTop();\nconst rows = 1;\nconst width = this._goldWindow.x;\nconst height = this.calcWindowHeight(rows, true);\nreturn new Rectangle(x, y, width, height);" + * + * @param DummyWindow + * @text Dummy Window + * + * @param DummyBgType:num + * @text Background Type + * @parent DummyWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param DummyRect:func + * @text JS: X, Y, W, H + * @parent DummyWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this._commandWindow.y + this._commandWindow.height;\nconst width = Graphics.boxWidth;\nconst height = this.mainAreaHeight() - this._commandWindow.height;\nreturn new Rectangle(x, y, width, height);" + * + * @param NumberWindow + * @text Number Window + * + * @param NumberBgType:num + * @text Background Type + * @parent NumberWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param NumberRect:func + * @text JS: X, Y, W, H + * @parent NumberWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this._dummyWindow.y;\nconst width = Graphics.boxWidth - this.statusWidth();\nconst height = this._dummyWindow.height;\nreturn new Rectangle(x, y, width, height);" + * + * @param StatusWindow + * @text Status Window + * + * @param StatusBgType:num + * @text Background Type + * @parent StatusWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param StatusRect:func + * @text JS: X, Y, W, H + * @parent StatusWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const width = this.statusWidth();\nconst height = this._dummyWindow.height;\nconst x = Graphics.boxWidth - width;\nconst y = this._dummyWindow.y;\nreturn new Rectangle(x, y, width, height);" + * + * @param BuyWindow + * @text Buy Window + * + * @param BuyBgType:num + * @text Background Type + * @parent BuyWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param BuyRect:func + * @text JS: X, Y, W, H + * @parent BuyWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this._dummyWindow.y;\nconst width = Graphics.boxWidth - this.statusWidth();\nconst height = this._dummyWindow.height;\nreturn new Rectangle(x, y, width, height);" + * + * @param CategoryWindow + * @text Category Window + * + * @param CategoryBgType:num + * @text Background Type + * @parent CategoryWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param CategoryRect:func + * @text JS: X, Y, W, H + * @parent CategoryWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this._dummyWindow.y;\nconst rows = 1;\nconst width = Graphics.boxWidth;\nconst height = this.calcWindowHeight(rows, true);\nreturn new Rectangle(x, y, width, height);" + * + * @param SellWindow + * @text Sell Window + * + * @param SellBgType:num + * @text Background Type + * @parent SellWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param SellRect:func + * @text JS: X, Y, W, H + * @parent SellWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = 0;\nconst y = this._categoryWindow.y + this._categoryWindow.height;\nconst width = Graphics.boxWidth;\nconst height =\n this.mainAreaHeight() -\n this._commandWindow.height -\n this._categoryWindow.height;\nreturn new Rectangle(x, y, width, height);" + * + */ +/* ---------------------------------------------------------------------------- + * Name Menu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~NameMenu: + * + * @param EditWindow + * @text Edit Window + * + * @param EditBgType:num + * @text Background Type + * @parent EditWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param EditRect:func + * @text JS: X, Y, W, H + * @parent EditWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const rows = 9;\nconst inputWindowHeight = this.calcWindowHeight(rows, true);\nconst padding = $gameSystem.windowPadding();\nconst width = 600;\nconst height = Math.min(ImageManager.faceHeight + padding * 2, this.mainAreaHeight() - inputWindowHeight);\nconst x = (Graphics.boxWidth - width) / 2;\nconst y = (this.mainAreaHeight() - (height + inputWindowHeight)) / 2 + this.mainAreaTop();\nreturn new Rectangle(x, y, width, height);" + * + * @param InputWindow + * @text Input Window + * + * @param InputBgType:num + * @text Background Type + * @parent InputWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param InputRect:func + * @text JS: X, Y, W, H + * @parent InputWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const x = this._editWindow.x;\nconst y = this._editWindow.y + this._editWindow.height;\nconst rows = 9;\nconst width = this._editWindow.width;\nconst height = this.calcWindowHeight(rows, true);\nreturn new Rectangle(x, y, width, height);" + * + */ +/* ---------------------------------------------------------------------------- + * Title Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Title: + * + * @param TitleScreen + * @text Title Screen + * + * @param DocumentTitleFmt:str + * @text Document Title Format + * @parent TitleScreen + * @desc Format to display text in document title. + * %1 - Main Title, %2 - Subtitle, %3 - Version + * @default %1: %2 - Version %3 + * + * @param Subtitle:str + * @text Subtitle + * @parent TitleScreen + * @desc Subtitle to be displayed under the title name. + * @default Subtitle + * + * @param Version:str + * @text Version + * @parent TitleScreen + * @desc Version to be display in the title screen corner. + * @default 0.00 + * + * @param drawGameTitle:func + * @text JS: Draw Title + * @type note + * @parent TitleScreen + * @desc Code used to draw the game title. + * @default "const x = 20;\nconst y = Graphics.height / 4;\nconst maxWidth = Graphics.width - x * 2;\nconst text = $dataSystem.gameTitle;\nconst bitmap = this._gameTitleSprite.bitmap;\nbitmap.fontFace = $gameSystem.mainFontFace();\nbitmap.outlineColor = \"black\";\nbitmap.outlineWidth = 8;\nbitmap.fontSize = 72;\nbitmap.drawText(text, x, y, maxWidth, 48, \"center\");" + * + * @param drawGameSubtitle:func + * @text JS: Draw Subtitle + * @type note + * @parent TitleScreen + * @desc Code used to draw the game subtitle. + * @default "const x = 20;\nconst y = Graphics.height / 4 + 72;\nconst maxWidth = Graphics.width - x * 2;\nconst text = Scene_Title.subtitle;\nconst bitmap = this._gameTitleSprite.bitmap;\nbitmap.fontFace = $gameSystem.mainFontFace();\nbitmap.outlineColor = \"black\";\nbitmap.outlineWidth = 6;\nbitmap.fontSize = 48;\nbitmap.drawText(text, x, y, maxWidth, 48, \"center\");" + * + * @param drawGameVersion:func + * @text JS: Draw Version + * @type note + * @parent TitleScreen + * @desc Code used to draw the game version. + * @default "const bitmap = this._gameTitleSprite.bitmap;\nconst x = 0;\nconst y = Graphics.height - 20;\nconst width = Math.round(Graphics.width / 4);\nconst height = 20;\nconst c1 = ColorManager.dimColor1();\nconst c2 = ColorManager.dimColor2();\nconst text = 'Version ' + Scene_Title.version;\nbitmap.gradientFillRect(x, y, width, height, c1, c2);\nbitmap.fontFace = $gameSystem.mainFontFace();\nbitmap.outlineColor = \"black\";\nbitmap.outlineWidth = 3;\nbitmap.fontSize = 16;\nbitmap.drawText(text, x + 4, y, Graphics.width, height, \"left\");" + * + * @param CommandRect:func + * @text JS: X, Y, W, H + * @parent TitleScreen + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const offsetX = $dataSystem.titleCommandWindow.offsetX;\nconst offsetY = $dataSystem.titleCommandWindow.offsetY;\nconst rows = this.commandWindowRows();\nconst width = this.mainCommandWidth();\nconst height = this.calcWindowHeight(rows, true);\nconst x = (Graphics.boxWidth - width) / 2 + offsetX;\nconst y = Graphics.boxHeight - height - 96 + offsetY;\nreturn new Rectangle(x, y, width, height);" + * + * @param ButtonFadeSpeed:num + * @text Button Fade Speed + * @parent TitleScreen + * @type number + * @min 1 + * @max 255 + * @desc Speed at which the buttons fade in at (1-255). + * @default 4 + * + */ +/* ---------------------------------------------------------------------------- + * Parameter Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Param: + * + * @param DisplayedParams:arraystr + * @text Displayed Parameters + * @type combo[] + * @option MaxHP + * @option MaxMP + * @option ATK + * @option DEF + * @option MAT + * @option MDF + * @option AGI + * @option LUK + * @option HIT + * @option EVA + * @option CRI + * @option CEV + * @option MEV + * @option MRF + * @option CNT + * @option HRG + * @option MRG + * @option TRG + * @option TGR + * @option GRD + * @option REC + * @option PHA + * @option MCR + * @option TCR + * @option PDR + * @option MDR + * @option FDR + * @option EXR + * @desc A list of the parameters that will be displayed in-game. + * @default ["ATK","DEF","MAT","MDF","AGI","LUK"] + * + * @param ExtDisplayedParams:arraystr + * @text Extended Parameters + * @parent DisplayedParams:arraystr + * @type combo[] + * @option MaxHP + * @option MaxMP + * @option ATK + * @option DEF + * @option MAT + * @option MDF + * @option AGI + * @option LUK + * @option HIT + * @option EVA + * @option CRI + * @option CEV + * @option MEV + * @option MRF + * @option CNT + * @option HRG + * @option MRG + * @option TRG + * @option TGR + * @option GRD + * @option REC + * @option PHA + * @option MCR + * @option TCR + * @option PDR + * @option MDR + * @option FDR + * @option EXR + * @desc The list shown in extended scenes (for other VisuStella plugins). + * @default ["MaxHP","MaxMP","ATK","DEF","MAT","MDF","AGI","LUK"] + * + * @param BasicParameters + * @text Basic Parameters + * + * @param CrisisRate:num + * @text HP Crisis Rate + * @parent BasicParameters + * @desc HP Ratio at which a battler can be considered in crisis mode. + * @default 0.25 + * + * @param BasicParameterFormula:func + * @text JS: Formula + * @parent BasicParameters + * @type note + * @desc Formula used to determine the total value all 8 basic parameters: MaxHP, MaxMP, ATK, DEF, MAT, MDF, AGI, LUK. + * @default "// Determine the variables used in this calculation.\nlet paramId = arguments[0];\nlet base = this.paramBase(paramId);\nlet plus = this.paramPlus(paramId);\nlet paramRate = this.paramRate(paramId);\nlet buffRate = this.paramBuffRate(paramId);\nlet flatBonus = this.paramFlatBonus(paramId);\n\n// Formula to determine total parameter value.\nlet value = (base + plus) * paramRate * buffRate + flatBonus;\n\n// Determine the limits\nconst maxValue = this.paramMax(paramId);\nconst minValue = this.paramMin(paramId);\n\n// Final value\nreturn Math.round(value.clamp(minValue, maxValue));" + * + * @param BasicParamCaps + * @text Parameter Caps + * @parent BasicParameters + * + * @param BasicActorParamCaps + * @text Actors + * @parent BasicParamCaps + * + * @param BasicActorParamMax0:str + * @text MaxHP Cap + * @parent BasicActorParamCaps + * @desc Formula used to determine MaxHP cap. + * Use 0 if you don't want a cap for this parameter. + * @default 9999 + * + * @param BasicActorParamMax1:str + * @text MaxMP Cap + * @parent BasicActorParamCaps + * @desc Formula used to determine MaxMP cap. + * Use 0 if you don't want a cap for this parameter. + * @default 9999 + * + * @param BasicActorParamMax2:str + * @text ATK Cap + * @parent BasicActorParamCaps + * @desc Formula used to determine ATK cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicActorParamMax3:str + * @text DEF Cap + * @parent BasicActorParamCaps + * @desc Formula used to determine DEF cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicActorParamMax4:str + * @text MAT Cap + * @parent BasicActorParamCaps + * @desc Formula used to determine MAT cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicActorParamMax5:str + * @text MDF Cap + * @parent BasicActorParamCaps + * @desc Formula used to determine MDF cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicActorParamMax6:str + * @text AGI Cap + * @parent BasicActorParamCaps + * @desc Formula used to determine AGI cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicActorParamMax7:str + * @text LUK Cap + * @parent BasicActorParamCaps + * @desc Formula used to determine LUK cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicEnemyParamCaps + * @text Enemies + * @parent BasicParamCaps + * + * @param BasicEnemyParamMax0:str + * @text MaxHP Cap + * @parent BasicEnemyParamCaps + * @desc Formula used to determine MaxHP cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999999 + * + * @param BasicEnemyParamMax1:str + * @text MaxMP Cap + * @parent BasicEnemyParamCaps + * @desc Formula used to determine MaxMP cap. + * Use 0 if you don't want a cap for this parameter. + * @default 9999 + * + * @param BasicEnemyParamMax2:str + * @text ATK Cap + * @parent BasicEnemyParamCaps + * @desc Formula used to determine ATK cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicEnemyParamMax3:str + * @text DEF Cap + * @parent BasicEnemyParamCaps + * @desc Formula used to determine DEF cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicEnemyParamMax4:str + * @text MAT Cap + * @parent BasicEnemyParamCaps + * @desc Formula used to determine MAT cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicEnemyParamMax5:str + * @text MDF Cap + * @parent BasicEnemyParamCaps + * @desc Formula used to determine MDF cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicEnemyParamMax6:str + * @text AGI Cap + * @parent BasicEnemyParamCaps + * @desc Formula used to determine AGI cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param BasicEnemyParamMax7:str + * @text LUK Cap + * @parent BasicEnemyParamCaps + * @desc Formula used to determine LUK cap. + * Use 0 if you don't want a cap for this parameter. + * @default 999 + * + * @param XParameters + * @text X Parameters + * + * @param XParameterFormula:func + * @text JS: Formula + * @parent XParameters + * @type note + * @desc Formula used to determine the total value all 10 X parameters: HIT, EVA, CRI, CEV, MEV, MRF, CNT, HRG, MRG, TRG. + * @default "// Determine the variables used in this calculation.\nlet xparamId = arguments[0];\nlet base = this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId);\nlet plus = this.xparamPlus(xparamId);\nlet paramRate = this.xparamRate(xparamId);\nlet flatBonus = this.xparamFlatBonus(xparamId);\n\n// Formula to determine total parameter value.\nlet value = (base + plus) * paramRate + flatBonus;\n\n// Final value\nreturn value;" + * + * @param XParamVocab + * @text Vocabulary + * @parent XParameters + * + * @param XParamVocab0:str + * @text HIT + * @parent XParamVocab + * @desc The in-game vocabulary used for this X Parameter. + * @default Hit + * + * @param XParamVocab1:str + * @text EVA + * @parent XParamVocab + * @desc The in-game vocabulary used for this X Parameter. + * @default Evasion + * + * @param XParamVocab2:str + * @text CRI + * @parent XParamVocab + * @desc The in-game vocabulary used for this X Parameter. + * @default Crit.Rate + * + * @param XParamVocab3:str + * @text CEV + * @parent XParamVocab + * @desc The in-game vocabulary used for this X Parameter. + * @default Crit.Evade + * + * @param XParamVocab4:str + * @text MEV + * @parent XParamVocab + * @desc The in-game vocabulary used for this X Parameter. + * @default Magic Evade + * + * @param XParamVocab5:str + * @text MRF + * @parent XParamVocab + * @desc The in-game vocabulary used for this X Parameter. + * @default Magic Reflect + * + * @param XParamVocab6:str + * @text CNT + * @parent XParamVocab + * @desc The in-game vocabulary used for this X Parameter. + * @default Counter + * + * @param XParamVocab7:str + * @text HRG + * @parent XParamVocab + * @desc The in-game vocabulary used for this X Parameter. + * @default HP Regen + * + * @param XParamVocab8:str + * @text MRG + * @parent XParamVocab + * @desc The in-game vocabulary used for this X Parameter. + * @default MP Regen + * + * @param XParamVocab9:str + * @text TRG + * @parent XParamVocab + * @desc The in-game vocabulary used for this X Parameter. + * @default TP Regen + * + * @param SParameters + * @text S Parameters + * + * @param SParameterFormula:func + * @text JS: Formula + * @parent SParameters + * @type note + * @desc Formula used to determine the total value all 10 S parameters: TGR, GRD, REC, PHA, MCR, TCR, PDR, MDR, FDR, EXR. + * @default "// Determine the variables used in this calculation.\nlet sparamId = arguments[0];\nlet base = this.traitsPi(Game_BattlerBase.TRAIT_SPARAM, sparamId);\nlet plus = this.sparamPlus(sparamId);\nlet paramRate = this.sparamRate(sparamId);\nlet flatBonus = this.sparamFlatBonus(sparamId);\n\n// Formula to determine total parameter value.\nlet value = (base + plus) * paramRate + flatBonus;\n\n// Final value\nreturn value;" + * + * @param SParamVocab + * @text Vocabulary + * @parent SParameters + * + * @param SParamVocab0:str + * @text TGR + * @parent SParamVocab + * @desc The in-game vocabulary used for this S Parameter. + * @default Aggro + * + * @param SParamVocab1:str + * @text GRD + * @parent SParamVocab + * @desc The in-game vocabulary used for this S Parameter. + * @default Guard + * + * @param SParamVocab2:str + * @text REC + * @parent SParamVocab + * @desc The in-game vocabulary used for this S Parameter. + * @default Recovery + * + * @param SParamVocab3:str + * @text PHA + * @parent SParamVocab + * @desc The in-game vocabulary used for this S Parameter. + * @default Item Effect + * + * @param SParamVocab4:str + * @text MCR + * @parent SParamVocab + * @desc The in-game vocabulary used for this S Parameter. + * @default MP Cost + * + * @param SParamVocab5:str + * @text TCR + * @parent SParamVocab + * @desc The in-game vocabulary used for this S Parameter. + * @default TP Charge + * + * @param SParamVocab6:str + * @text PDR + * @parent SParamVocab + * @desc The in-game vocabulary used for this S Parameter. + * @default Physical DMG + * + * @param SParamVocab7:str + * @text MDR + * @parent SParamVocab + * @desc The in-game vocabulary used for this S Parameter. + * @default Magical DMG + * + * @param SParamVocab8:str + * @text FDR + * @parent SParamVocab + * @desc The in-game vocabulary used for this S Parameter. + * @default Floor DMG + * + * @param SParamVocab9:str + * @text EXR + * @parent SParamVocab + * @desc The in-game vocabulary used for this S Parameter. + * @default EXP Gain + * + * @param Icons + * @text Icons + * + * @param DrawIcons:eval + * @text Draw Icons? + * @parent Icons + * @type boolean + * @on Draw + * @off Don't Draw + * @desc Draw icons next to parameter names? + * @default true + * + * @param IconParam0:str + * @text MaxHP + * @parent Icons + * @desc Icon used for this parameter. + * @default 84 + * + * @param IconParam1:str + * @text MaxMP + * @parent Icons + * @desc Icon used for this parameter. + * @default 165 + * + * @param IconParam2:str + * @text ATK + * @parent Icons + * @desc Icon used for this parameter. + * @default 76 + * + * @param IconParam3:str + * @text DEF + * @parent Icons + * @desc Icon used for this parameter. + * @default 81 + * + * @param IconParam4:str + * @text MAT + * @parent Icons + * @desc Icon used for this parameter. + * @default 101 + * + * @param IconParam5:str + * @text MDF + * @parent Icons + * @desc Icon used for this parameter. + * @default 133 + * + * @param IconParam6:str + * @text AGI + * @parent Icons + * @desc Icon used for this parameter. + * @default 140 + * + * @param IconParam7:str + * @text LUK + * @parent Icons + * @desc Icon used for this parameter. + * @default 87 + * + * @param IconXParam0:str + * @text HIT + * @parent Icons + * @desc Icon used for this parameter. + * @default 102 + * + * @param IconXParam1:str + * @text EVA + * @parent Icons + * @desc Icon used for this parameter. + * @default 82 + * + * @param IconXParam2:str + * @text CRI + * @parent Icons + * @desc Icon used for this parameter. + * @default 78 + * + * @param IconXParam3:str + * @text CEV + * @parent Icons + * @desc Icon used for this parameter. + * @default 82 + * + * @param IconXParam4:str + * @text MEV + * @parent Icons + * @desc Icon used for this parameter. + * @default 171 + * + * @param IconXParam5:str + * @text MRF + * @parent Icons + * @desc Icon used for this parameter. + * @default 222 + * + * @param IconXParam6:str + * @text CNT + * @parent Icons + * @desc Icon used for this parameter. + * @default 77 + * + * @param IconXParam7:str + * @text HRG + * @parent Icons + * @desc Icon used for this parameter. + * @default 72 + * + * @param IconXParam8:str + * @text MRG + * @parent Icons + * @desc Icon used for this parameter. + * @default 72 + * + * @param IconXParam9:str + * @text TRG + * @parent Icons + * @desc Icon used for this parameter. + * @default 72 + * + * @param IconSParam0:str + * @text TGR + * @parent Icons + * @desc Icon used for this parameter. + * @default 5 + * + * @param IconSParam1:str + * @text GRD + * @parent Icons + * @desc Icon used for this parameter. + * @default 128 + * + * @param IconSParam2:str + * @text REC + * @parent Icons + * @desc Icon used for this parameter. + * @default 72 + * + * @param IconSParam3:str + * @text PHA + * @parent Icons + * @desc Icon used for this parameter. + * @default 176 + * + * @param IconSParam4:str + * @text MCR + * @parent Icons + * @desc Icon used for this parameter. + * @default 165 + * + * @param IconSParam5:str + * @text TCR + * @parent Icons + * @desc Icon used for this parameter. + * @default 164 + * + * @param IconSParam6:str + * @text PDR + * @parent Icons + * @desc Icon used for this parameter. + * @default 76 + * + * @param IconSParam7:str + * @text MDR + * @parent Icons + * @desc Icon used for this parameter. + * @default 79 + * + * @param IconSParam8:str + * @text FDR + * @parent Icons + * @desc Icon used for this parameter. + * @default 141 + * + * @param IconSParam9:str + * @text EXR + * @parent Icons + * @desc Icon used for this parameter. + * @default 73 + * + */ +/* ---------------------------------------------------------------------------- + * Commands Struct + * ---------------------------------------------------------------------------- + */ +/*~struct~Command: + * + * @param Symbol:str + * @text Symbol + * @desc The symbol used for this command. + * @default Symbol + * + * @param TextStr:str + * @text STR: Text + * @desc Displayed text used for this title command. + * If this has a value, ignore the JS: Text version. + * @default Untitled + * + * @param TextJS:func + * @text JS: Text + * @type note + * @desc JavaScript code used to determine string used for the displayed name. + * @default "return 'Text';" + * + * @param ShowJS:func + * @text JS: Show + * @type note + * @desc JavaScript code used to determine if the item is shown or not. + * @default "return true;" + * + * @param EnableJS:func + * @text JS: Enable + * @type note + * @desc JavaScript code used to determine if the item is enabled or not. + * @default "return true;" + * + * @param ExtJS:func + * @text JS: Ext + * @type note + * @desc JavaScript code used to determine any ext data that should be added. + * @default "return null;" + * + * @param CallHandlerJS:func + * @text JS: Run Code + * @type note + * @desc JavaScript code that runs once this command is selected. + * @default "" + * + */ +/* ---------------------------------------------------------------------------- + * Title Picture Buttons + * ---------------------------------------------------------------------------- + */ +/*~struct~TitlePictureButton: + * + * @param PictureFilename:str + * @text Picture's Filename + * @type file + * @dir img/pictures/ + * @desc Filename used for the picture. + * @default + * + * @param ButtonURL:str + * @text Button URL + * @desc URL for the button to go to upon being clicked. + * @default https://www.google.com/ + * + * @param PositionJS:func + * @text JS: Position + * @type note + * @desc JavaScript code that helps determine the button's Position. + * @default "this.x = Graphics.width - this.bitmap.width - 20;\nthis.y = Graphics.height - this.bitmap.height - 20;" + * + * @param OnLoadJS:func + * @text JS: On Load + * @type note + * @desc JavaScript code that runs once this button bitmap is loaded. + * @default "this.opacity = 0;\nthis.visible = true;" + * + * @param CallHandlerJS:func + * @text JS: Run Code + * @type note + * @desc JavaScript code that runs once this button is pressed. + * @default "const url = this._data.ButtonURL;\nVisuMZ.openURL(url);" + * + */ +/* ---------------------------------------------------------------------------- + * UI Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~UI: + * + * @param UIArea + * @text UI Area + * + * @param FadeSpeed:num + * @text Fade Speed + * @parent UIArea + * @desc Default fade speed for transitions. + * @default 24 + * + * @param BoxMargin:num + * @text Box Margin + * @parent UIArea + * @type number + * @min 0 + * @desc Set the margin in pixels for the screen borders. + * Default: 4 + * @default 4 + * + * @param CommandWidth:num + * @text Command Window Width + * @parent UIArea + * @type number + * @min 1 + * @desc Sets the width for standard Command Windows. + * Default: 240 + * @default 240 + * + * @param BottomHelp:eval + * @text Bottom Help Window + * @parent UIArea + * @type boolean + * @on Bottom + * @off Top + * @desc Put the Help Window at the bottom of the screen? + * @default false + * + * @param RightMenus:eval + * @text Right Aligned Menus + * @parent UIArea + * @type boolean + * @on Right + * @off Left + * @desc Put most command windows to the right side of the screen. + * @default true + * + * @param ShowButtons:eval + * @text Show Buttons + * @parent UIArea + * @type boolean + * @on Show + * @off Hide + * @desc Show clickable buttons in your game? + * This will affect all buttons. + * @default true + * + * @param cancelShowButton:eval + * @text Show Cancel Button + * @parent ShowButtons:eval + * @type boolean + * @on Show + * @off Hide + * @desc Show cancel button? + * If 'Show Buttons' is false, this will be hidden. + * @default true + * + * @param menuShowButton:eval + * @text Show Menu Button + * @parent ShowButtons:eval + * @type boolean + * @on Show + * @off Hide + * @desc Show main menu button from the map scene? + * If 'Show Buttons' is false, this will be hidden. + * @default true + * + * @param pagedownShowButton:eval + * @text Show Page Up/Down + * @parent ShowButtons:eval + * @type boolean + * @on Show + * @off Hide + * @desc Show page up/down buttons? + * If 'Show Buttons' is false, this will be hidden. + * @default true + * + * @param numberShowButton:eval + * @text Show Number Buttons + * @parent ShowButtons:eval + * @type boolean + * @on Show + * @off Hide + * @desc Show number adjustment buttons? + * If 'Show Buttons' is false, this will be hidden. + * @default true + * + * @param ButtonHeight:num + * @text Button Area Height + * @parent UIArea + * @type number + * @min 1 + * @desc Sets the height for the button area. + * Default: 52 + * @default 52 + * + * @param BottomButtons:eval + * @text Bottom Buttons + * @parent UIArea + * @type boolean + * @on Bottom + * @off Top + * @desc Put the buttons at the bottom of the screen? + * @default false + * + * @param SideButtons:eval + * @text Side Buttons + * @parent UIArea + * @type boolean + * @on Side + * @off Normal + * @desc Push buttons to the side of the UI if there is room. + * @default true + * + * @param MenuObjects + * @text Menu Objects + * + * @param LvExpGauge:eval + * @text Level -> EXP Gauge + * @parent MenuObjects + * @type boolean + * @on Draw Gauge + * @off Keep As Is + * @desc Draw an EXP Gauge under the drawn level. + * @default true + * + * @param ParamArrow:str + * @text Parameter Arrow + * @parent MenuObjects + * @desc The arrow used to show changes in the parameter values. + * @default → + * + * @param TextCodeSupport + * @text Text Code Support + * + * @param TextCodeClassNames:eval + * @text Class Names + * @parent TextCodeSupport + * @type boolean + * @on Suport Text Codes + * @off Normal Text + * @desc Make class names support text codes? + * @default true + * + * @param TextCodeNicknames:eval + * @text Nicknames + * @parent TextCodeSupport + * @type boolean + * @on Suport Text Codes + * @off Normal Text + * @desc Make nicknames support text codes? + * @default true + * + */ +/* ---------------------------------------------------------------------------- + * Window Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Window: + * + * @param WindowDefaults + * @text Defaults + * + * @param EnableMasking:eval + * @text Enable Masking + * @parent WindowDefaults + * @type boolean + * @on Masking On + * @off Masking Off + * @desc Enable window masking (windows hide other windows behind + * them)? WARNING: Turning it on can obscure data. + * @default false + * + * @param LineHeight:num + * @text Line Height + * @parent WindowDefaults + * @desc Default line height used for standard windows. + * Default: 36 + * @default 36 + * + * @param ItemPadding:num + * @text Item Padding + * @parent WindowDefaults + * @desc Default line padding used for standard windows. + * Default: 8 + * @default 8 + * + * @param BackOpacity:num + * @text Back Opacity + * @parent WindowDefaults + * @desc Default back opacity used for standard windows. + * Default: 192 + * @default 192 + * + * @param TranslucentOpacity:num + * @text Translucent Opacity + * @parent WindowDefaults + * @desc Default translucent opacity used for standard windows. + * Default: 160 + * @default 160 + * + * @param OpenSpeed:num + * @text Window Opening Speed + * @parent WindowDefaults + * @desc Default open speed used for standard windows. + * Default: 32 (Use a number between 0-255) + * @default 32 + * @default 24 + * + * @param ColSpacing:num + * @text Column Spacing + * @parent WindowDefaults + * @desc Default column spacing for selectable windows. + * Default: 8 + * @default 8 + * + * @param RowSpacing:num + * @text Row Spacing + * @parent WindowDefaults + * @desc Default row spacing for selectable windows. + * Default: 4 + * @default 4 + * + * @param SelectableItems + * @text Selectable Items + * + * @param ShowItemBackground:eval + * @text Show Background? + * @parent SelectableItems + * @type boolean + * @on Show Backgrounds + * @off No backgrounds. + * @desc Selectable menu items have dark boxes behind them. Show them? + * @default true + * + * @param ItemHeight:num + * @text Item Height Padding + * @parent SelectableItems + * @desc Default padding for selectable items. + * Default: 8 + * @default 8 + * + * @param DrawItemBackgroundJS:func + * @text JS: Draw Background + * @parent SelectableItems + * @type note + * @desc Code used to draw the background rectangle behind clickable menu objects + * @default "const rect = arguments[0];\nconst c1 = ColorManager.itemBackColor1();\nconst c2 = ColorManager.itemBackColor2();\nconst x = rect.x;\nconst y = rect.y;\nconst w = rect.width;\nconst h = rect.height;\nthis.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true);\nthis.contentsBack.strokeRect(x, y, w, h, c1);" + */ +/* ---------------------------------------------------------------------------- + * Screen Resolution Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ScreenResolution: + * + * @param Troops + * + * @param RepositionActors:eval + * @text Reposition Actors + * @parent Troops + * @type boolean + * @on Reposition + * @off Keep As Is + * @desc Update the position of actors in battle if the screen resolution has changed. Ignore if using Battle Core. + * @default true + * + * @param RepositionEnemies:eval + * @text Reposition Enemies + * @parent Troops + * @type boolean + * @on Reposition + * @off Keep As Is + * @desc Update the position of enemies in battle if the screen resolution has changed. + * @default true + * + * @param RepositionEnemies130:eval + * @text For MZ 1.3.0+? + * @parent RepositionEnemies:eval + * @type boolean + * @on Reposition + * @off Keep As Is + * @desc Both this parameter and its parent parameter need to be on when using RPG Maker MZ 1.3.0+. + * @default false + * + */ +/* ---------------------------------------------------------------------------- + * Screen Shake Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ScreenShake: + * + * @param DefaultStyle:str + * @text Default Style + * @type select + * @option Original + * @value original + * @option Random + * @value random + * @option Horizontal + * @value horizontal + * @option Vertical + * @value vertical + * @desc The default style used for screen shakes. + * @default random + * + * @param originalJS:func + * @text JS: Original Style + * @type note + * @desc This code gives you control over screen shake for this + * screen shake style. + * @default "// Calculation\nthis.x += Math.round($gameScreen.shake());" + * + * @param randomJS:func + * @text JS: Random Style + * @type note + * @desc This code gives you control over screen shake for this + * screen shake style. + * @default "// Calculation\n// Original Formula by Aries of Sheratan\nconst power = $gameScreen._shakePower * 0.75;\nconst speed = $gameScreen._shakeSpeed * 0.60;\nconst duration = $gameScreen._shakeDuration;\nthis.x += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);\nthis.y += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);" + * + * @param horzJS:func + * @text JS: Horizontal Style + * @type note + * @desc This code gives you control over screen shake for this + * screen shake style. + * @default "// Calculation\n// Original Formula by Aries of Sheratan\nconst power = $gameScreen._shakePower * 0.75;\nconst speed = $gameScreen._shakeSpeed * 0.60;\nconst duration = $gameScreen._shakeDuration;\nthis.x += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);" + * + * @param vertJS:func + * @text JS: Vertical Style + * @type note + * @desc This code gives you control over screen shake for this + * screen shake style. + * @default "// Calculation\n// Original Formula by Aries of Sheratan\nconst power = $gameScreen._shakePower * 0.75;\nconst speed = $gameScreen._shakeSpeed * 0.60;\nconst duration = $gameScreen._shakeDuration;\nthis.y += Math.round(Math.randomInt(power) - Math.randomInt(speed)) * (Math.min(duration, 30) * 0.5);" + * + */ +/* ---------------------------------------------------------------------------- + * Custom Parameter Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~CustomParam: + * + * @param ParamName:str + * @text Parameter Name + * @desc What's the parameter's name? + * Used for VisuStella MZ menus. + * @default Untitled + * + * @param Abbreviation:str + * @text Abbreviation + * @parent ParamName:str + * @desc What abbreviation do you want to use for the parameter? + * Do not use special characters. Avoid numbers if possible. + * @default unt + * + * @param Icon:num + * @text Icon + * @parent ParamName:str + * @desc What icon do you want to use to represent this parameter? + * Used for VisuStella MZ menus. + * @default 160 + * + * @param Type:str + * @text Type + * @parent ParamName:str + * @type select + * @option Integer (Whole Numbers Only) + * @value integer + * @option Float (Decimals are Allowed) + * @value float + * @desc What kind of number value will be returned with this parameter? + * @default integer + * + * @param ValueJS:json + * @text JS: Value + * @type note + * @desc Run this code when this parameter is to be returned. + * @default "// Declare Constants\nconst user = this;\n\n// Calculations\nreturn 1;" + * + */ +/* ---------------------------------------------------------------------------- + * Show Picture Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ShowPicture: + * + * @param Position + * + * @param Origin:num + * @text Origin + * @parent Position + * @type select + * @option 0 - Upper Left + * @value 0 + * @option 1 - Center + * @value 1 + * @desc What is the origin of this picture icon? + * @default 0 + * + * @param PositionX:eval + * @text Position X + * @parent Position + * @desc X coordinate of the picture. + * You may use JavaScript code. + * @default 0 + * + * @param PositionY:eval + * @text Position Y + * @parent Position + * @desc Y coordinate of the picture. + * You may use JavaScript code. + * @default 0 + * + * @param Scale + * + * @param ScaleX:eval + * @text Width % + * @parent Scale + * @desc Horizontal scale of the picture. + * You may use JavaScript code. + * @default 100 + * + * @param ScaleY:eval + * @text Height % + * @parent Scale + * @desc Vertical scale of the picture. + * You may use JavaScript code. + * @default 100 + * + * @param Blend + * + * @param Opacity:eval + * @text Opacity + * @parent Blend + * @desc Insert a number to determine opacity level. Use a + * number between 0 and 255. You may use JavaScript code. + * @default 255 + * + * @param BlendMode:num + * @text Blend Mode + * @parent Blend + * @type select + * @option 0 - Normal + * @value 0 + * @option 1 - Additive + * @value 1 + * @option 2 - Multiply + * @value 2 + * @option 3 - Screen + * @value 3 + * @desc What kind of blend mode do you wish to apply to the picture? + * @default 0 + * + */ +/* ---------------------------------------------------------------------------- + * JS Quick Function Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~jsQuickFunc: + * + * @param FunctionName:str + * @text Function Name + * @desc The function's name in the global namespace. + * Will not overwrite functions/variables of the same name. + * @default Untitled + * + * @param CodeJS:json + * @text JS: Code + * @type note + * @desc Run this code when using the function. + * @default "// Insert this as a function anywhere you can input code\n// such as Script Calls or Conditional Branch Scripts.\n\n// Process Code\n" + * + */ +//============================================================================= + +const _0x54167d=_0x4d17;(function(_0x421162,_0x6f84ea){const _0x46360d=_0x4d17,_0x3708cd=_0x421162();while(!![]){try{const _0x3e4012=parseInt(_0x46360d(0x24f))/0x1+-parseInt(_0x46360d(0x37b))/0x2*(-parseInt(_0x46360d(0x390))/0x3)+parseInt(_0x46360d(0x34c))/0x4*(-parseInt(_0x46360d(0x32e))/0x5)+parseInt(_0x46360d(0x2b0))/0x6+-parseInt(_0x46360d(0x219))/0x7*(-parseInt(_0x46360d(0x387))/0x8)+-parseInt(_0x46360d(0x889))/0x9*(parseInt(_0x46360d(0x488))/0xa)+parseInt(_0x46360d(0x80e))/0xb*(parseInt(_0x46360d(0x94c))/0xc);if(_0x3e4012===_0x6f84ea)break;else _0x3708cd['push'](_0x3708cd['shift']());}catch(_0x50f9aa){_0x3708cd['push'](_0x3708cd['shift']());}}}(_0x2505,0x57955));var label='CoreEngine',tier=tier||0x0,dependencies=[],pluginData=$plugins[_0x54167d(0x64f)](function(_0x29b46c){const _0x23b8a5=_0x54167d;return _0x29b46c[_0x23b8a5(0x32f)]&&_0x29b46c['description']['includes']('['+label+']');})[0x0];VisuMZ[label][_0x54167d(0x331)]=VisuMZ[label]['Settings']||{},VisuMZ[_0x54167d(0x683)]=function(_0x4a0aa8,_0x59526a){const _0x543377=_0x54167d;for(const _0x457b39 in _0x59526a){if(_0x543377(0x2a7)!=='UzvEz'){if(_0x457b39['match'](/(.*):(.*)/i)){const _0x39fb6f=String(RegExp['$1']),_0x3d5bef=String(RegExp['$2'])[_0x543377(0x8dd)]()[_0x543377(0x314)]();let _0x56913e,_0x46176a,_0x35a8c8;switch(_0x3d5bef){case _0x543377(0x991):_0x56913e=_0x59526a[_0x457b39]!==''?Number(_0x59526a[_0x457b39]):0x0;break;case _0x543377(0x76e):_0x46176a=_0x59526a[_0x457b39]!==''?JSON[_0x543377(0x7c7)](_0x59526a[_0x457b39]):[],_0x56913e=_0x46176a['map'](_0x515b2d=>Number(_0x515b2d));break;case _0x543377(0x370):_0x56913e=_0x59526a[_0x457b39]!==''?eval(_0x59526a[_0x457b39]):null;break;case _0x543377(0x24a):_0x46176a=_0x59526a[_0x457b39]!==''?JSON[_0x543377(0x7c7)](_0x59526a[_0x457b39]):[],_0x56913e=_0x46176a[_0x543377(0x90c)](_0x99de00=>eval(_0x99de00));break;case'JSON':_0x56913e=_0x59526a[_0x457b39]!==''?JSON[_0x543377(0x7c7)](_0x59526a[_0x457b39]):'';break;case _0x543377(0x5fc):_0x46176a=_0x59526a[_0x457b39]!==''?JSON[_0x543377(0x7c7)](_0x59526a[_0x457b39]):[],_0x56913e=_0x46176a[_0x543377(0x90c)](_0x9a0629=>JSON[_0x543377(0x7c7)](_0x9a0629));break;case _0x543377(0x4af):_0x56913e=_0x59526a[_0x457b39]!==''?new Function(JSON['parse'](_0x59526a[_0x457b39])):new Function(_0x543377(0x3f6));break;case'ARRAYFUNC':_0x46176a=_0x59526a[_0x457b39]!==''?JSON[_0x543377(0x7c7)](_0x59526a[_0x457b39]):[],_0x56913e=_0x46176a[_0x543377(0x90c)](_0x27f03a=>new Function(JSON[_0x543377(0x7c7)](_0x27f03a)));break;case'STR':_0x56913e=_0x59526a[_0x457b39]!==''?String(_0x59526a[_0x457b39]):'';break;case _0x543377(0x651):_0x46176a=_0x59526a[_0x457b39]!==''?JSON[_0x543377(0x7c7)](_0x59526a[_0x457b39]):[],_0x56913e=_0x46176a['map'](_0x26673b=>String(_0x26673b));break;case _0x543377(0x4e1):_0x35a8c8=_0x59526a[_0x457b39]!==''?JSON['parse'](_0x59526a[_0x457b39]):{},_0x4a0aa8[_0x39fb6f]={},VisuMZ[_0x543377(0x683)](_0x4a0aa8[_0x39fb6f],_0x35a8c8);continue;case _0x543377(0x923):_0x46176a=_0x59526a[_0x457b39]!==''?JSON[_0x543377(0x7c7)](_0x59526a[_0x457b39]):[],_0x56913e=_0x46176a['map'](_0x17dd7b=>VisuMZ['ConvertParams']({},JSON[_0x543377(0x7c7)](_0x17dd7b)));break;default:continue;}_0x4a0aa8[_0x39fb6f]=_0x56913e;}}else _0x1f1f35['x']=_0xe98d0[_0x543377(0x3ad)](_0x212d50['x']),_0x381a71['y']=_0x5e6107[_0x543377(0x3ad)](_0x3d6d6e['y']),_0x34f61b[_0x543377(0x281)]=_0x186676[_0x543377(0x3ad)](_0x59d7bc[_0x543377(0x281)]),_0xcf41c7[_0x543377(0x3e1)]=_0x4e2717['round'](_0x216507['height']),this[_0x543377(0x3e9)](),_0x4f5fee['CoreEngine'][_0x543377(0x6b7)][_0x543377(0x204)](this,_0x502c1c),this[_0x543377(0x383)]();}return _0x4a0aa8;},VisuMZ['CoreEngine'][_0x54167d(0x5ef)]=SceneManager[_0x54167d(0x4fc)],SceneManager[_0x54167d(0x4fc)]=function(){const _0x2be842=_0x54167d;VisuMZ[_0x2be842(0x940)]['SceneManager_exit'][_0x2be842(0x204)](this);if(Utils[_0x2be842(0x20a)]>='1.4.4'){if('lkOUn'!==_0x2be842(0x9e1))for(const _0x46f15a of _0x5d72fb[_0x2be842(0x921)]){if(_0x46f15a['ShowJS'][_0x2be842(0x204)](this)){const _0x5dd7dc=_0x46f15a[_0x2be842(0x221)];let _0x4527bc=_0x46f15a[_0x2be842(0x20d)];if(['',_0x2be842(0x916)][_0x2be842(0x9ef)](_0x4527bc))_0x4527bc=_0x46f15a[_0x2be842(0x424)]['call'](this);const _0x487ef5=_0x46f15a[_0x2be842(0x338)][_0x2be842(0x204)](this),_0x56ac74=_0x46f15a[_0x2be842(0x5c8)][_0x2be842(0x204)](this);this[_0x2be842(0x771)](_0x4527bc,_0x5dd7dc,_0x487ef5,_0x56ac74),this[_0x2be842(0x60e)](_0x5dd7dc,_0x46f15a[_0x2be842(0x406)][_0x2be842(0x6ac)](this,_0x56ac74));}}else{if(typeof nw==='object')nw[_0x2be842(0x4c8)]['quit']();}}},(_0x56e6c3=>{const _0x396162=_0x54167d,_0x258d1a=_0x56e6c3[_0x396162(0x614)];for(const _0x3c0811 of dependencies){if('IFQRX'!==_0x396162(0x8c5)){if(!Imported[_0x3c0811]){if(_0x396162(0x26d)===_0x396162(0x26d)){alert(_0x396162(0x654)[_0x396162(0x482)](_0x258d1a,_0x3c0811)),SceneManager[_0x396162(0x4fc)]();break;}else{if(_0x4215da[_0x396162(0x48d)][_0x396162(0x204)](this)){const _0x1bcb02=_0x3005e3[_0x396162(0x221)];let _0x2c9305=_0x3e7be5['TextStr'];if(['','Untitled']['includes'](_0x2c9305))_0x2c9305=_0x3443e2[_0x396162(0x424)][_0x396162(0x204)](this);const _0x36f3c2=_0x4230fc[_0x396162(0x338)][_0x396162(0x204)](this),_0x54bf76=_0x5b1f9a[_0x396162(0x5c8)][_0x396162(0x204)](this);this[_0x396162(0x771)](_0x2c9305,_0x1bcb02,_0x36f3c2,_0x54bf76),this[_0x396162(0x60e)](_0x1bcb02,_0x55538b[_0x396162(0x406)][_0x396162(0x6ac)](this,_0x54bf76));}}}}else _0x5a2bb8['_x']=_0x58f751['_x'],_0x20a4e2['_y']=_0x395aa2['_y'];}const _0x1e8d0b=_0x56e6c3['description'];if(_0x1e8d0b['match'](/\[Version[ ](.*?)\]/i)){const _0x168e35=Number(RegExp['$1']);_0x168e35!==VisuMZ[label][_0x396162(0x553)]&&(_0x396162(0x3a3)==='AkROb'?(alert(_0x396162(0x21e)['format'](_0x258d1a,_0x168e35)),SceneManager[_0x396162(0x4fc)]()):this['_menuButton']['x']=_0x526107[_0x396162(0x497)]+0x4);}if(_0x1e8d0b['match'](/\[Tier[ ](\d+)\]/i)){if(_0x396162(0x375)===_0x396162(0x375)){const _0x31615a=Number(RegExp['$1']);_0x31615a<tier?(alert(_0x396162(0x864)[_0x396162(0x482)](_0x258d1a,_0x31615a,tier)),SceneManager[_0x396162(0x4fc)]()):tier=Math[_0x396162(0x350)](_0x31615a,tier);}else{if(_0x15cd85['ParseAllNotetags'])return;}}VisuMZ[_0x396162(0x683)](VisuMZ[label][_0x396162(0x331)],_0x56e6c3[_0x396162(0x733)]);})(pluginData),((()=>{const _0x28b3d4=_0x54167d;if(VisuMZ['CoreEngine'][_0x28b3d4(0x331)]['QoL'][_0x28b3d4(0x670)]??!![])for(const _0x33f781 in $plugins){if(_0x28b3d4(0x5f5)!=='Mabdk')this['_forcedBattleSys']=0x2;else{const _0x36b4af=$plugins[_0x33f781];_0x36b4af[_0x28b3d4(0x614)][_0x28b3d4(0x59b)](/(.*)\/(.*)/i)&&(_0x36b4af[_0x28b3d4(0x614)]=String(RegExp['$2'][_0x28b3d4(0x314)]()));}}})()),PluginManager['registerCommand'](pluginData[_0x54167d(0x614)],_0x54167d(0x363),_0xffdbb0=>{const _0x549574=_0x54167d;if(!SceneManager['_scene'])return;if(!SceneManager[_0x549574(0x4ce)][_0x549574(0x6ae)])return;VisuMZ['ConvertParams'](_0xffdbb0,_0xffdbb0);const _0x41da03=Math[_0x549574(0x3ad)](_0xffdbb0[_0x549574(0x766)]),_0x5ea3c7=Math[_0x549574(0x3ad)](_0xffdbb0[_0x549574(0x9cf)]);$gameTemp[_0x549574(0x8f9)](_0x41da03,_0x5ea3c7,_0xffdbb0['AnimationID'],_0xffdbb0[_0x549574(0x665)],_0xffdbb0['Mute']);}),PluginManager['registerCommand'](pluginData[_0x54167d(0x614)],_0x54167d(0x3ee),_0x5c5b59=>{const _0x2bb70d=_0x54167d;if(!$gameTemp[_0x2bb70d(0x562)]())return;if(!Utils[_0x2bb70d(0x303)]())return;SceneManager['_scene'][_0x2bb70d(0x2bc)]=![],VisuMZ[_0x2bb70d(0x940)][_0x2bb70d(0x23b)]();}),PluginManager[_0x54167d(0x8f5)](pluginData[_0x54167d(0x614)],_0x54167d(0x51b),_0x4a729b=>{const _0x140d44=_0x54167d;if(!$gameTemp[_0x140d44(0x562)]())return;if(!Utils[_0x140d44(0x303)]())return;SceneManager[_0x140d44(0x4ce)][_0x140d44(0x2bc)]=![],VisuMZ['CoreEngine'][_0x140d44(0x726)]();}),PluginManager['registerCommand'](pluginData['name'],_0x54167d(0x6cd),_0x19a54a=>{const _0x8143a=_0x54167d;if(!$gameTemp['isPlaytest']())return;if(!Utils[_0x8143a(0x303)]())return;if(!$gameMap)return;if($gameMap['mapId']()<=0x0)return;VisuMZ['ConvertParams'](_0x19a54a,_0x19a54a);const _0x445749=_0x8143a(0x2eb)[_0x8143a(0x482)]($gameMap['mapId']()['padZero'](0x3)),_0x104408=VisuMZ['CoreEngine'][_0x8143a(0x6a6)]($gameMap['mapId']());VisuMZ['CoreEngine']['ExportString'](_0x104408,_0x445749,!![]);}),PluginManager['registerCommand'](pluginData[_0x54167d(0x614)],_0x54167d(0x645),_0x5cb7fc=>{const _0x5460d0=_0x54167d;if(!$gameTemp['isPlaytest']())return;if(!Utils[_0x5460d0(0x303)]())return;if(!$gameParty[_0x5460d0(0x540)]())return;VisuMZ[_0x5460d0(0x683)](_0x5cb7fc,_0x5cb7fc);const _0x2b440c=_0x5460d0(0x3d4)[_0x5460d0(0x482)]($gameTroop['_troopId'][_0x5460d0(0x3c7)](0x4)),_0x28adf2=VisuMZ[_0x5460d0(0x940)][_0x5460d0(0x78a)]($gameTroop['_troopId']);VisuMZ[_0x5460d0(0x940)][_0x5460d0(0x207)](_0x28adf2,_0x2b440c,!![]);}),VisuMZ['CoreEngine']['ExportString']=function(_0x87ec69,_0x2809a7,_0x53e616){const _0x3c5f61=_0x54167d,_0x2b29a0=require('fs');let _0x1b29db='Exported_Script_%1.txt'[_0x3c5f61(0x482)](_0x2809a7||'0');_0x2b29a0[_0x3c5f61(0x8d8)](_0x1b29db,_0x87ec69,_0x2cf9f8=>{const _0x1d87dc=_0x3c5f61;if(_0x2cf9f8){if('ZnbGC'===_0x1d87dc(0x75a)){if(_0x417a2c instanceof _0x489df1)this[_0x1d87dc(0x246)](_0x45c8fc);else _0x16f7b0 instanceof _0x2733f3&&_0x24bfc7[0x0]===_0x1d87dc(0x401)?this[_0x1d87dc(0x96e)](_0x13e091):this['catchUnknownError'](_0x1f0f15);this['stop']();}else throw err;}else _0x53e616&&alert('Saved\x20file\x20as\x20%1\x20in\x20project\x20folder.'[_0x1d87dc(0x482)](_0x1b29db));});},VisuMZ[_0x54167d(0x940)][_0x54167d(0x23b)]=function(){const _0x426225=_0x54167d,_0x1c1720=[];for(const _0x11de93 of $dataMapInfos){if(!_0x11de93)continue;_0x1c1720['push'](_0x11de93['id']);}const _0x9d5bff=_0x1c1720[_0x426225(0x95b)]*0x64+Math[_0x426225(0x549)](0x64);alert(_0x426225(0x782)[_0x426225(0x482)](_0x9d5bff)),this[_0x426225(0x5cc)]=[],this['_currentMap']=$dataMap;for(const _0x39e9bf of _0x1c1720){if('QPZsD'!==_0x426225(0x9ae))VisuMZ[_0x426225(0x940)]['loadMapData'](_0x39e9bf);else return _0x1329e1['CoreEngine'][_0x426225(0x331)][_0x426225(0x2e9)][_0x426225(0x413)];}setTimeout(VisuMZ[_0x426225(0x940)][_0x426225(0x93f)]['bind'](this),_0x9d5bff);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x71c)]=function(_0x51d868){const _0x4adbcc=_0x54167d,_0x20775c=_0x4adbcc(0x397)['format'](_0x51d868['padZero'](0x3)),_0x24c3f3=new XMLHttpRequest(),_0x4dcbc2=_0x4adbcc(0x30f)+_0x20775c;_0x24c3f3['open'](_0x4adbcc(0x7c8),_0x4dcbc2),_0x24c3f3['overrideMimeType'](_0x4adbcc(0x26c)),_0x24c3f3[_0x4adbcc(0x2ac)]=()=>this[_0x4adbcc(0x7eb)](_0x24c3f3,_0x51d868,_0x20775c,_0x4dcbc2),_0x24c3f3[_0x4adbcc(0x67f)]=()=>DataManager[_0x4adbcc(0x813)](_0x4adbcc(0x2ed),_0x20775c,_0x4dcbc2),_0x24c3f3[_0x4adbcc(0x7e3)]();},VisuMZ['CoreEngine'][_0x54167d(0x7eb)]=function(_0x22144a,_0x462cc8,_0x55a7a,_0xfc9145){const _0x24fade=_0x54167d;$dataMap=JSON[_0x24fade(0x7c7)](_0x22144a[_0x24fade(0x335)]),DataManager[_0x24fade(0x7a1)]($dataMap),this[_0x24fade(0x5cc)][_0x462cc8]=VisuMZ[_0x24fade(0x940)][_0x24fade(0x6a6)](_0x462cc8),$dataMap=this[_0x24fade(0x6e9)];},VisuMZ[_0x54167d(0x940)][_0x54167d(0x93f)]=function(){const _0x33fb07=_0x54167d,_0x378b9d=_0x33fb07(0x732);this[_0x33fb07(0x5cc)][_0x33fb07(0x233)](undefined)['remove']('')['remove'](null);const _0x114ba1=this[_0x33fb07(0x5cc)][_0x33fb07(0x53d)](_0x33fb07(0x96c))['trim']();VisuMZ['CoreEngine'][_0x33fb07(0x207)](_0x114ba1,_0x378b9d,!![]),SceneManager[_0x33fb07(0x4ce)]['_active']=!![];},VisuMZ[_0x54167d(0x940)][_0x54167d(0x6a6)]=function(_0x4e1c27){const _0x25b72c=_0x54167d;if(!$dataMap)return'';let _0x52c839='█'[_0x25b72c(0x779)](0x46)+'\x0a\x0a',_0x12d0d8='═'[_0x25b72c(0x779)](0x46)+'\x0a\x0a',_0x3000f5='';this[_0x25b72c(0x582)]=0x0;for(const _0x464212 of $dataMap[_0x25b72c(0x437)]){if(!_0x464212)continue;let _0x381a22=_0x464212['id'],_0x1a9545=_0x464212['name'],_0x7b8c6d=_0x464212[_0x25b72c(0x6e0)];for(const _0x4d321d of _0x7b8c6d){const _0x3996de=_0x7b8c6d[_0x25b72c(0x63e)](_0x4d321d)+0x1;let _0x3fe3ab=_0x12d0d8+_0x25b72c(0x41e),_0x4676ee=VisuMZ[_0x25b72c(0x940)][_0x25b72c(0x8b2)](_0x4d321d[_0x25b72c(0x9d7)]);if(_0x4676ee[_0x25b72c(0x95b)]>0x0){if(_0x25b72c(0x6dd)!==_0x25b72c(0x53f)){if(_0x3000f5[_0x25b72c(0x95b)]>0x0){if(_0x25b72c(0x44c)!=='kJaza')_0x3000f5+=_0x12d0d8+_0x25b72c(0x96c);else{const _0x488a8d=_0x1a4f18['width']-_0x2e539e[_0x25b72c(0x497)]-_0x2cf2af[_0x25b72c(0x940)][_0x25b72c(0x331)]['UI'][_0x25b72c(0x3a0)]*0x2,_0x344ac8=_0xc71823[_0x25b72c(0x4ec)][_0x25b72c(0x468)][_0x25b72c(0x204)](this)*0x4;if(_0x488a8d>=_0x344ac8)_0x40df45[_0x25b72c(0x87d)](!![]);}}else{const _0xafab9=$dataMapInfos[_0x4e1c27][_0x25b72c(0x614)];_0x3000f5+=_0x52c839+_0x25b72c(0x388)['format'](_0x4e1c27,_0xafab9||_0x25b72c(0x678))+_0x52c839;}_0x3000f5+=_0x3fe3ab[_0x25b72c(0x482)](_0x381a22,_0x1a9545,_0x3996de,_0x4676ee);}else return this['isMapScrollLinked']()?this[_0x25b72c(0x36c)]():_0x44e74e[_0x25b72c(0x940)]['Game_Picture_x']['call'](this);}}}if(_0x3000f5[_0x25b72c(0x95b)]>0x0){if('EINQq'===_0x25b72c(0x945))_0x3000f5+=_0x12d0d8;else{_0x816e2f+=_0x1a8f4e;if(_0x3e28b9>=_0x342c9f)_0x643b7a=_0x38b0b5-0x1;this[_0x25b72c(0x63f)](_0x34d29a);}}return _0x3000f5;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x726)]=function(){const _0x170f60=_0x54167d,_0x5dce89=$dataTroops[_0x170f60(0x95b)]*0xa+Math[_0x170f60(0x549)](0xa);alert(_0x170f60(0xa02)[_0x170f60(0x482)](_0x5dce89));const _0x3feaf6=[];for(const _0x2fb694 of $dataTroops){if('Nhenn'===_0x170f60(0x212)){const _0x2c6281=_0x170f60(0x560);this[_0x170f60(0x961)]=this['_colorCache']||{};if(this[_0x170f60(0x961)][_0x2c6281])return this['_colorCache'][_0x2c6281];const _0x3fc813=_0x3b60e9['CoreEngine']['Settings'][_0x170f60(0x530)]['ColorNormal'];return this[_0x170f60(0x731)](_0x2c6281,_0x3fc813);}else{if(!_0x2fb694)continue;const _0x1bb4d2=_0x2fb694['id'];_0x3feaf6[_0x1bb4d2]=VisuMZ['CoreEngine'][_0x170f60(0x78a)](_0x1bb4d2);}}setTimeout(VisuMZ['CoreEngine'][_0x170f60(0x628)][_0x170f60(0x6ac)](this,_0x3feaf6),_0x5dce89);},VisuMZ['CoreEngine']['ExtractStrFromTroop']=function(_0x1317b2){const _0x366aeb=_0x54167d;if(!$dataTroops[_0x1317b2])return'';let _0x4947a5='█'[_0x366aeb(0x779)](0x46)+'\x0a\x0a',_0x29b322='═'[_0x366aeb(0x779)](0x46)+'\x0a\x0a',_0x9525f2='';this[_0x366aeb(0x582)]=0x0;const _0x1ff14a=$dataTroops[_0x1317b2];let _0x4365aa=_0x1ff14a[_0x366aeb(0x6e0)];for(const _0xbb6002 of _0x4365aa){if(_0x366aeb(0x5af)!==_0x366aeb(0x30d)){const _0x1f02e7=_0x4365aa['indexOf'](_0xbb6002)+0x1;let _0x1ec86d=_0x29b322+_0x366aeb(0x7a4),_0x547c93=VisuMZ[_0x366aeb(0x940)]['ExtractStrFromList'](_0xbb6002['list']);if(_0x547c93['length']>0x0){if(_0x9525f2[_0x366aeb(0x95b)]>0x0){if(_0x366aeb(0x444)===_0x366aeb(0x444))_0x9525f2+=_0x29b322+_0x366aeb(0x96c);else{const _0xd8ff57=_0x2bf427[_0x366aeb(0x497)],_0x5ac46f=_0x570f5b[_0x366aeb(0x4ec)][_0x366aeb(0x7c4)](),_0x253557=0x0;let _0x5aaf6f=0x0;return this[_0x366aeb(0x6e7)]()==='top'?_0x5aaf6f=0x0:_0x5aaf6f=_0x452646[_0x366aeb(0x996)]-_0x5ac46f,new _0x410672(_0x253557,_0x5aaf6f,_0xd8ff57,_0x5ac46f);}}else'qZvAk'!=='qZvAk'?this[_0x366aeb(0x308)]():_0x9525f2+=_0x4947a5+_0x366aeb(0x90e)[_0x366aeb(0x482)](_0x1317b2,_0x1ff14a['name']||_0x366aeb(0x678))+_0x4947a5;_0x9525f2+=_0x1ec86d[_0x366aeb(0x482)](_0x1f02e7,_0x547c93);}}else _0x33b1cf[_0x366aeb(0x940)][_0x366aeb(0x775)][_0x366aeb(0x204)](this,_0x3cbeae,_0x30d7f2,_0x51b643,_0x42cad3),this['markCoreEngineModified']();}return _0x9525f2['length']>0x0&&(_0x9525f2+=_0x29b322),_0x9525f2;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x628)]=function(_0x590c61){const _0x154919=_0x54167d,_0x460787=_0x154919(0x983);_0x590c61[_0x154919(0x233)](undefined)['remove']('')['remove'](null);const _0x24232f=_0x590c61['join']('\x0a\x0a\x0a\x0a\x0a')[_0x154919(0x314)]();VisuMZ[_0x154919(0x940)][_0x154919(0x207)](_0x24232f,_0x460787,!![]),SceneManager[_0x154919(0x4ce)][_0x154919(0x2bc)]=!![];},VisuMZ[_0x54167d(0x940)][_0x54167d(0x8b2)]=function(_0x314db0){const _0x3ea5c6=_0x54167d;let _0x543384='\x0a'+'─'[_0x3ea5c6(0x779)](0x46)+'\x0a',_0x3e5ce6='\x0a'+'┄'['repeat'](0x46)+'\x0a',_0x2a554f='';for(const _0x5584b2 of _0x314db0){if(_0x3ea5c6(0x68f)!==_0x3ea5c6(0x79c)){if(!_0x5584b2)continue;if(_0x5584b2[_0x3ea5c6(0x28c)]===0x65)_0x2a554f+=_0x543384+'\x0a',_0x2a554f+=_0x3ea5c6(0x741),_0x5584b2[_0x3ea5c6(0x733)][0x4]!==''&&_0x5584b2[_0x3ea5c6(0x733)][0x4]!==undefined&&(_0x3ea5c6(0x44b)==='DjrMS'?_0x4b5a3a[_0x3ea5c6(0x940)][_0x3ea5c6(0x347)]['call'](this,_0x14348b):_0x2a554f+=_0x3ea5c6(0x810)['format'](_0x5584b2['parameters'][0x4]));else{if(_0x5584b2[_0x3ea5c6(0x28c)]===0x191){if(_0x3ea5c6(0x443)!==_0x3ea5c6(0x836))_0x2a554f+=_0x3ea5c6(0x5f8)['format'](_0x5584b2['parameters'][0x0]);else{const _0x3091f1=0x90,_0x58c10f=0x60,_0x1593a8=0x18;this[_0x3ea5c6(0x561)]['bitmap']=this[_0x3ea5c6(0x23a)],this[_0x3ea5c6(0x561)]['anchor']['x']=0.5,this[_0x3ea5c6(0x561)]['anchor']['y']=0x1,this[_0x3ea5c6(0x561)][_0x3ea5c6(0x35d)](_0x12dc60[_0x3ea5c6(0x3ad)](this[_0x3ea5c6(0x376)]/0x2),this[_0x3ea5c6(0x79d)]),this[_0x3ea5c6(0x561)][_0x3ea5c6(0x2bf)](_0x3091f1,_0x58c10f,_0x1593a8,_0x1593a8),this[_0x3ea5c6(0x561)]['alpha']=0xff;}}else{if(_0x5584b2[_0x3ea5c6(0x28c)]===0x192)_0x2a554f+=_0x543384,_0x2a554f+=_0x3ea5c6(0x720)[_0x3ea5c6(0x482)](_0x3e5ce6,_0x5584b2['parameters'][0x0]+0x1,_0x5584b2[_0x3ea5c6(0x733)][0x1]);else{if(_0x5584b2[_0x3ea5c6(0x28c)]===0x193)_0x2a554f+=_0x543384,_0x2a554f+=_0x3ea5c6(0x7bb)[_0x3ea5c6(0x482)](_0x3e5ce6);else{if(_0x5584b2['code']===0x194)'ngofv'===_0x3ea5c6(0x88d)?_0x2762bb=_0x3a5c3b[_0x3ea5c6(0x940)]['Scene_MenuBase_mainAreaHeight'][_0x3ea5c6(0x204)](this):(_0x2a554f+=_0x543384,_0x2a554f+=_0x3ea5c6(0x8f2)[_0x3ea5c6(0x482)](_0x3e5ce6));else{if(_0x5584b2['code']===0x69)_0x2a554f+=_0x543384+'\x0a',_0x2a554f+='〘Scrolling\x20Text〙\x0a';else{if(_0x5584b2['code']===0x6c)_0x2a554f+=_0x543384+'\x0a',_0x2a554f+=_0x3ea5c6(0x835)['format'](_0x5584b2[_0x3ea5c6(0x733)][0x0]);else{if(_0x5584b2['code']===0x198)_0x2a554f+=_0x3ea5c6(0x5f8)['format'](_0x5584b2[_0x3ea5c6(0x733)][0x0]);else{if(_0x5584b2[_0x3ea5c6(0x28c)]===0x75){const _0x5b3887=$dataCommonEvents[_0x5584b2['parameters'][0x0]];if(_0x5b3887&&this['_commonEventLayers']<=0xa){if(_0x3ea5c6(0x5a4)!==_0x3ea5c6(0x9bf)){this['_commonEventLayers']++;let _0x2d2148=VisuMZ[_0x3ea5c6(0x940)][_0x3ea5c6(0x8b2)](_0x5b3887['list']);_0x2d2148[_0x3ea5c6(0x95b)]>0x0&&(_0x2a554f+=_0x543384,_0x2a554f+=_0x3e5ce6,_0x2a554f+=_0x3ea5c6(0x6ee)[_0x3ea5c6(0x482)](_0x5b3887['id'],_0x5b3887[_0x3ea5c6(0x614)]),_0x2a554f+=_0x3e5ce6,_0x2a554f+=_0x2d2148,_0x2a554f+=_0x3e5ce6,_0x2a554f+=_0x3ea5c6(0x501)[_0x3ea5c6(0x482)](_0x5b3887['id'],_0x5b3887[_0x3ea5c6(0x614)]),_0x2a554f+=_0x3e5ce6),this['_commonEventLayers']--;}else return _0x59c890?_0x1de704(_0x876d1f[_0x3ea5c6(0x3ad)](_0x24d293*0x64))+'%':_0x643fa9;}}}}}}}}}}}else{const _0x4b0de5=this[_0x3ea5c6(0x50c)]()[_0x3ea5c6(0x9b7)][_0x49d131][0x63],_0x1c2bf3=this[_0x3ea5c6(0x50c)]()[_0x3ea5c6(0x9b7)][_0x2b7daf][0x62];return _0x4b0de5+(_0x4b0de5-_0x1c2bf3)*(this[_0x3ea5c6(0x472)]-0x63);}}return _0x2a554f['length']>0x0&&(_0x2a554f+=_0x543384),_0x2a554f;},PluginManager['registerCommand'](pluginData[_0x54167d(0x614)],'OpenURL',_0x3f2e81=>{const _0x96944a=_0x54167d;VisuMZ[_0x96944a(0x683)](_0x3f2e81,_0x3f2e81);const _0x1b8c58=_0x3f2e81[_0x96944a(0x334)];VisuMZ[_0x96944a(0x24c)](_0x1b8c58);}),PluginManager[_0x54167d(0x8f5)](pluginData['name'],_0x54167d(0x3a2),_0x51e706=>{const _0x307005=_0x54167d;VisuMZ[_0x307005(0x683)](_0x51e706,_0x51e706);const _0x46ec59=_0x51e706[_0x307005(0x570)]||0x0;$gameParty['gainGold'](_0x46ec59);}),PluginManager[_0x54167d(0x8f5)](pluginData[_0x54167d(0x614)],'MapOnceParallel',_0x1d7a93=>{const _0x36f601=_0x54167d;if(!SceneManager[_0x36f601(0x8c0)]())return;VisuMZ[_0x36f601(0x683)](_0x1d7a93,_0x1d7a93);const _0x4bfa20=_0x1d7a93[_0x36f601(0x2d0)];SceneManager[_0x36f601(0x4ce)]['playOnceParallelInterpreter'](_0x4bfa20);}),PluginManager[_0x54167d(0x8f5)](pluginData['name'],'PictureCoordinatesMode',_0x3ab8ae=>{const _0x28ab3b=_0x54167d;if(!$gameTemp[_0x28ab3b(0x562)]())return;if(!Utils[_0x28ab3b(0x303)]())return;VisuMZ['ConvertParams'](_0x3ab8ae,_0x3ab8ae);const _0x23834d=_0x3ab8ae[_0x28ab3b(0x77e)]||0x1;$gameTemp[_0x28ab3b(0x9eb)]=_0x23834d;}),PluginManager[_0x54167d(0x8f5)](pluginData['name'],'PictureEasingType',_0x4e2a77=>{const _0x88463d=_0x54167d;VisuMZ[_0x88463d(0x683)](_0x4e2a77,_0x4e2a77);const _0x16855f=_0x4e2a77[_0x88463d(0x907)]||0x1,_0x5a59bb=_0x4e2a77[_0x88463d(0x7b7)]||_0x88463d(0x33c),_0x58e01e=$gameScreen[_0x88463d(0x217)](_0x16855f);_0x58e01e&&(_0x88463d(0x2fd)!==_0x88463d(0x2fd)?this[_0x88463d(0x698)]=0x0:_0x58e01e[_0x88463d(0xa18)](_0x5a59bb));}),PluginManager['registerCommand'](pluginData[_0x54167d(0x614)],'PictureEraseAll',_0x4dfecf=>{for(let _0x18d6ed=0x1;_0x18d6ed<=0x64;_0x18d6ed++){$gameScreen['erasePicture'](_0x18d6ed);}}),PluginManager[_0x54167d(0x8f5)](pluginData[_0x54167d(0x614)],_0x54167d(0x22c),_0x468197=>{const _0x5d0b4d=_0x54167d;VisuMZ['ConvertParams'](_0x468197,_0x468197);const _0x2c4316=Math['min'](_0x468197['StartID'],_0x468197[_0x5d0b4d(0x241)]),_0x2c4ecc=Math[_0x5d0b4d(0x350)](_0x468197[_0x5d0b4d(0x3d3)],_0x468197[_0x5d0b4d(0x241)]);for(let _0x3b47ab=_0x2c4316;_0x3b47ab<=_0x2c4ecc;_0x3b47ab++){if('IXqRB'!==_0x5d0b4d(0x3e8))$gameScreen['erasePicture'](_0x3b47ab);else return _0x27648f[_0x5d0b4d(0x45a)](_0x4bf15a,'','');}}),PluginManager['registerCommand'](pluginData['name'],_0x54167d(0x6f5),_0x388b49=>{const _0x52cf01=_0x54167d;VisuMZ['ConvertParams'](_0x388b49,_0x388b49);const _0x476d8c=Math[_0x52cf01(0x3ad)](_0x388b49['PictureID'])[_0x52cf01(0x29b)](0x1,0x64),_0x393dfd=_0x388b49['Settings'],_0x12ca25=_0x393dfd[_0x52cf01(0x84a)][_0x52cf01(0x29b)](0x0,0x1),_0x3bd22d=Math['round'](_0x393dfd[_0x52cf01(0x677)]||0x0),_0x1c002a=Math[_0x52cf01(0x3ad)](_0x393dfd[_0x52cf01(0x7f5)]||0x0),_0x557b3e=Math[_0x52cf01(0x3ad)](_0x393dfd['ScaleX']||0x0),_0x3dfc66=Math[_0x52cf01(0x3ad)](_0x393dfd[_0x52cf01(0x9c6)]||0x0),_0x345357=Math['round'](_0x393dfd[_0x52cf01(0x3e3)])[_0x52cf01(0x29b)](0x0,0xff),_0xe156bd=_0x393dfd[_0x52cf01(0x5f0)],_0x2cf069=_0x52cf01(0x993),_0x201411=_0x388b49[_0x52cf01(0x495)]?_0x52cf01(0x495):_0x52cf01(0x992),_0x4b48c4=_0x2cf069[_0x52cf01(0x482)](_0x388b49[_0x52cf01(0x3bf)],_0x201411);$gameScreen['showPicture'](_0x476d8c,_0x4b48c4,_0x12ca25,_0x3bd22d,_0x1c002a,_0x557b3e,_0x3dfc66,_0x345357,_0xe156bd);}),PluginManager[_0x54167d(0x8f5)](pluginData[_0x54167d(0x614)],_0x54167d(0x5c9),_0x571e5b=>{const _0x3b7dd6=_0x54167d;VisuMZ[_0x3b7dd6(0x683)](_0x571e5b,_0x571e5b);const _0x4aa097=_0x571e5b['Type']||_0x3b7dd6(0x206),_0x58717e=_0x571e5b[_0x3b7dd6(0x699)][_0x3b7dd6(0x29b)](0x1,0x9),_0x560b71=_0x571e5b[_0x3b7dd6(0x717)][_0x3b7dd6(0x29b)](0x1,0x9),_0x45b0fd=_0x571e5b['Duration']||0x1,_0x466182=_0x571e5b[_0x3b7dd6(0x7da)];$gameScreen['setCoreEngineScreenShakeStyle'](_0x4aa097),$gameScreen[_0x3b7dd6(0x669)](_0x58717e,_0x560b71,_0x45b0fd);if(_0x466182){const _0x27fda8=$gameTemp['getLastPluginCommandInterpreter']();if(_0x27fda8)_0x27fda8[_0x3b7dd6(0x660)](_0x45b0fd);}}),PluginManager[_0x54167d(0x8f5)](pluginData['name'],_0x54167d(0xa0f),_0x3f5c76=>{const _0x4217aa=_0x54167d;VisuMZ[_0x4217aa(0x683)](_0x3f5c76,_0x3f5c76);const _0x47d80d=_0x3f5c76[_0x4217aa(0x447)]||0x1;$gameSystem[_0x4217aa(0x358)](_0x47d80d);}),PluginManager['registerCommand'](pluginData['name'],_0x54167d(0x900),_0x6e6b38=>{const _0x4b9a3b=_0x54167d;if($gameParty[_0x4b9a3b(0x540)]())return;VisuMZ[_0x4b9a3b(0x683)](_0x6e6b38,_0x6e6b38);const _0x31914b=_0x6e6b38[_0x4b9a3b(0x447)];if(_0x31914b[_0x4b9a3b(0x59b)](/Front/i)){if(_0x4b9a3b(0x374)!==_0x4b9a3b(0x374))return this[_0x4b9a3b(0x8da)]||this;else $gameSystem[_0x4b9a3b(0x8ac)](![]);}else{if(_0x31914b[_0x4b9a3b(0x59b)](/Side/i)){if('jFlQB'!==_0x4b9a3b(0x4c5))$gameSystem[_0x4b9a3b(0x8ac)](!![]);else return _0x477c08['CoreEngine'][_0x4b9a3b(0x331)][_0x4b9a3b(0x530)][_0x4b9a3b(0x972)];}else $gameSystem[_0x4b9a3b(0x8ac)](!$gameSystem[_0x4b9a3b(0x22e)]());}}),PluginManager[_0x54167d(0x8f5)](pluginData[_0x54167d(0x614)],_0x54167d(0x258),_0x2c00f2=>{const _0x31d1ec=_0x54167d;if($gameParty[_0x31d1ec(0x540)]())return;VisuMZ[_0x31d1ec(0x683)](_0x2c00f2,_0x2c00f2);const _0x21230f=[_0x31d1ec(0x9d2),_0x31d1ec(0x91f),'me','se'];for(const _0x396885 of _0x21230f){if('NHZWb'!==_0x31d1ec(0x752))this[_0x31d1ec(0x432)]&&(this['openness']+=this[_0x31d1ec(0x473)](),this[_0x31d1ec(0x88f)]()&&(this[_0x31d1ec(0x432)]=![]));else{const _0x5edb7d=_0x2c00f2[_0x396885],_0x53b980='%1/'[_0x31d1ec(0x482)](_0x396885);for(const _0x487100 of _0x5edb7d){if(_0x31d1ec(0x47e)!==_0x31d1ec(0x38a))AudioManager['createBuffer'](_0x53b980,_0x487100);else{_0x367728=_0x52453e(_0x3f9231||'')[_0x31d1ec(0x8dd)]();const _0x12d377=_0xd4009c[_0x31d1ec(0x940)][_0x31d1ec(0x331)][_0x31d1ec(0x3fa)];if(_0x1b7252===_0x31d1ec(0x578))return _0x3ac472[_0x31d1ec(0x722)]['params'][0x0];if(_0x2f0ca1===_0x31d1ec(0x784))return _0x304668[_0x31d1ec(0x722)][_0x31d1ec(0x9b7)][0x1];if(_0x24df06==='ATK')return _0x32c789[_0x31d1ec(0x722)][_0x31d1ec(0x9b7)][0x2];if(_0x18fcbe===_0x31d1ec(0x3ce))return _0x509931['terms']['params'][0x3];if(_0x3b16d8===_0x31d1ec(0x203))return _0x3ac1de[_0x31d1ec(0x722)][_0x31d1ec(0x9b7)][0x4];if(_0xb06693===_0x31d1ec(0x7e8))return _0x4779ae['terms'][_0x31d1ec(0x9b7)][0x5];if(_0x1adaa6===_0x31d1ec(0x778))return _0x1b1eac['terms'][_0x31d1ec(0x9b7)][0x6];if(_0x30c5a8==='LUK')return _0x45db40[_0x31d1ec(0x722)][_0x31d1ec(0x9b7)][0x7];if(_0x29b986===_0x31d1ec(0x8a9))return _0x12d377[_0x31d1ec(0xa04)];if(_0x67c800==='EVA')return _0x12d377[_0x31d1ec(0x449)];if(_0x17dfe5==='CRI')return _0x12d377['XParamVocab2'];if(_0x428669==='CEV')return _0x12d377[_0x31d1ec(0x3bc)];if(_0x5b2eae==='MEV')return _0x12d377['XParamVocab4'];if(_0x4cd6d2===_0x31d1ec(0x603))return _0x12d377['XParamVocab5'];if(_0x5759c4===_0x31d1ec(0x81e))return _0x12d377['XParamVocab6'];if(_0xe0eb1c==='HRG')return _0x12d377[_0x31d1ec(0x535)];if(_0x3cfe2d===_0x31d1ec(0x9de))return _0x12d377[_0x31d1ec(0x77c)];if(_0x17c08d==='TRG')return _0x12d377[_0x31d1ec(0x461)];if(_0x8d0c97===_0x31d1ec(0x7b3))return _0x12d377[_0x31d1ec(0x7cb)];if(_0x41d368===_0x31d1ec(0xa0d))return _0x12d377[_0x31d1ec(0x417)];if(_0x1afb87==='REC')return _0x12d377[_0x31d1ec(0x6f3)];if(_0x2042c1===_0x31d1ec(0x66d))return _0x12d377['SParamVocab3'];if(_0x2e1676===_0x31d1ec(0x43f))return _0x12d377[_0x31d1ec(0x736)];if(_0x570500===_0x31d1ec(0x5c3))return _0x12d377[_0x31d1ec(0x700)];if(_0x5eff92===_0x31d1ec(0x70a))return _0x12d377[_0x31d1ec(0x396)];if(_0x30b7be==='MDR')return _0x12d377['SParamVocab7'];if(_0x3067b0===_0x31d1ec(0x4b5))return _0x12d377[_0x31d1ec(0x746)];if(_0x57165d==='EXR')return _0x12d377[_0x31d1ec(0x400)];if(_0x53e209[_0x31d1ec(0x940)][_0x31d1ec(0x7d1)][_0x1b2bbb])return _0x9516c3[_0x31d1ec(0x940)][_0x31d1ec(0x7d1)][_0x3fa1d8];return'';}}}}}),PluginManager[_0x54167d(0x8f5)](pluginData['name'],_0x54167d(0x971),_0x2a5b92=>{const _0xe21bbd=_0x54167d;if($gameParty[_0xe21bbd(0x540)]())return;VisuMZ[_0xe21bbd(0x683)](_0x2a5b92,_0x2a5b92);const _0x319751=[_0xe21bbd(0x265),_0xe21bbd(0x2e7),_0xe21bbd(0x514),_0xe21bbd(0xa16),_0xe21bbd(0x515),'faces',_0xe21bbd(0x37c),'pictures',_0xe21bbd(0x564),'sv_enemies',_0xe21bbd(0x32b),_0xe21bbd(0x72a),_0xe21bbd(0x3ac),'titles2'];for(const _0x2f2339 of _0x319751){const _0x34ebc6=_0x2a5b92[_0x2f2339],_0x4886cd='img/%1/'[_0xe21bbd(0x482)](_0x2f2339);for(const _0x542003 of _0x34ebc6){ImageManager[_0xe21bbd(0x4e3)](_0x4886cd,_0x542003);}}}),PluginManager['registerCommand'](pluginData['name'],_0x54167d(0x789),_0x14fc05=>{const _0x186eb4=_0x54167d;if($gameParty['inBattle']())return;VisuMZ['ConvertParams'](_0x14fc05,_0x14fc05);const _0x34b7fe=_0x14fc05['IDs'],_0x408cd4=(_0x14fc05[_0x186eb4(0x526)]||0x0)/0x64;for(const _0x524aba of _0x34b7fe){if(_0x186eb4(0x919)!=='yeDkC')_0x564b1e[_0x186eb4(0x5fe)](_0x5f4674);else{const _0x4eb511=Math['random']()<=_0x408cd4;$gameSwitches[_0x186eb4(0x667)](_0x524aba,_0x4eb511);}}}),PluginManager['registerCommand'](pluginData[_0x54167d(0x614)],_0x54167d(0x91b),_0x376b1c=>{const _0x41da98=_0x54167d;if($gameParty[_0x41da98(0x540)]())return;VisuMZ[_0x41da98(0x683)](_0x376b1c,_0x376b1c);const _0x54d29a=Math['min'](_0x376b1c[_0x41da98(0x3d3)],_0x376b1c[_0x41da98(0x241)]),_0xaedcf4=Math[_0x41da98(0x350)](_0x376b1c[_0x41da98(0x3d3)],_0x376b1c[_0x41da98(0x241)]),_0x43fca2=(_0x376b1c[_0x41da98(0x526)]||0x0)/0x64;for(let _0x43bff7=_0x54d29a;_0x43bff7<=_0xaedcf4;_0x43bff7++){const _0x3bda30=Math[_0x41da98(0x206)]()<=_0x43fca2;$gameSwitches['setValue'](_0x43bff7,_0x3bda30);}}),PluginManager[_0x54167d(0x8f5)](pluginData[_0x54167d(0x614)],_0x54167d(0x25c),_0x1e150b=>{const _0x43bed9=_0x54167d;if($gameParty[_0x43bed9(0x540)]())return;VisuMZ[_0x43bed9(0x683)](_0x1e150b,_0x1e150b);const _0x19e99c=_0x1e150b[_0x43bed9(0x528)];for(const _0x408bd2 of _0x19e99c){if('jllmJ'===_0x43bed9(0x76f))this[_0x43bed9(0x532)]=[];else{const _0x26f9d7=$gameSwitches['value'](_0x408bd2);$gameSwitches[_0x43bed9(0x667)](_0x408bd2,!_0x26f9d7);}}}),PluginManager[_0x54167d(0x8f5)](pluginData[_0x54167d(0x614)],'SwitchToggleRange',_0x24f724=>{const _0x3b8ecf=_0x54167d;if($gameParty['inBattle']())return;VisuMZ[_0x3b8ecf(0x683)](_0x24f724,_0x24f724);const _0x2f44d9=Math[_0x3b8ecf(0x3e0)](_0x24f724[_0x3b8ecf(0x3d3)],_0x24f724[_0x3b8ecf(0x241)]),_0x2b7066=Math[_0x3b8ecf(0x350)](_0x24f724['StartID'],_0x24f724[_0x3b8ecf(0x241)]);for(let _0x2b6b96=_0x2f44d9;_0x2b6b96<=_0x2b7066;_0x2b6b96++){const _0x496175=$gameSwitches[_0x3b8ecf(0x570)](_0x2b6b96);$gameSwitches[_0x3b8ecf(0x667)](_0x2b6b96,!_0x496175);}}),PluginManager[_0x54167d(0x8f5)](pluginData[_0x54167d(0x614)],_0x54167d(0x962),_0x29b53e=>{const _0x3af6ba=_0x54167d;if($gameParty['inBattle']())return;VisuMZ['ConvertParams'](_0x29b53e,_0x29b53e);const _0x271623=_0x29b53e[_0x3af6ba(0x447)][_0x3af6ba(0x8dd)]()[_0x3af6ba(0x314)](),_0x87cde6=VisuMZ[_0x3af6ba(0x940)][_0x3af6ba(0x7bc)](_0x271623);$gameSystem[_0x3af6ba(0x59d)](_0x87cde6);}),VisuMZ[_0x54167d(0x940)][_0x54167d(0x7bc)]=function(_0x9a80aa){const _0x26afeb=_0x54167d;_0x9a80aa=_0x9a80aa||_0x26afeb(0x92b),_0x9a80aa=String(_0x9a80aa)[_0x26afeb(0x8dd)]()[_0x26afeb(0x314)]();switch(_0x9a80aa){case'DTB':return 0x0;case'TPB\x20ACTIVE':Imported[_0x26afeb(0x6ec)]&&(ConfigManager[_0x26afeb(0x9ec)]=!![]);return 0x1;case _0x26afeb(0x5ed):Imported[_0x26afeb(0x6ec)]&&(ConfigManager[_0x26afeb(0x9ec)]=![]);return 0x2;case _0x26afeb(0x9f3):if(Imported[_0x26afeb(0x285)])return _0x26afeb(0x9f3);break;case _0x26afeb(0x470):if(Imported[_0x26afeb(0x448)]){if(_0x26afeb(0x6eb)===_0x26afeb(0x6eb))return'STB';else this[_0x26afeb(0x710)]();}break;case _0x26afeb(0x9aa):if(Imported[_0x26afeb(0x721)])return'BTB';break;case _0x26afeb(0x39a):if(Imported[_0x26afeb(0x4e7)])return _0x26afeb(0x7f1)!==_0x26afeb(0x2ce)?_0x26afeb(0x39a):_0x32e94c['CoreEngine'][_0x26afeb(0x7fb)][_0x26afeb(0x204)](this);break;case _0x26afeb(0x332):if(Imported['VisuMZ_2_BattleSystemOTB']){if(_0x26afeb(0x81b)===_0x26afeb(0x81b))return _0x26afeb(0x332);else this['_backgroundFilter']=new _0x20a7f3[(_0x26afeb(0x6f6))][(_0x26afeb(0x98b))](_0x2b3647=!![]),this['_backgroundSprite']=new _0x4d3b92(),this['_backgroundSprite']['bitmap']=_0x15e024[_0x26afeb(0x67d)](),this[_0x26afeb(0x420)][_0x26afeb(0x6f6)]=[this[_0x26afeb(0x214)]],this[_0x26afeb(0x8fe)][_0x26afeb(0x45f)](this[_0x26afeb(0x420)]);}break;case _0x26afeb(0x965):if(Imported[_0x26afeb(0x80b)])return _0x26afeb(0x965);break;case _0x26afeb(0x92c):if(Imported[_0x26afeb(0x3fd)])return _0x26afeb(0x92c);break;}return $dataSystem[_0x26afeb(0x9e8)];},PluginManager['registerCommand'](pluginData['name'],_0x54167d(0x84e),_0x4399a5=>{const _0x347b3c=_0x54167d;VisuMZ[_0x347b3c(0x683)](_0x4399a5,_0x4399a5);const _0x164fc7=_0x4399a5[_0x347b3c(0x447)]||0x1;$gameSystem['setWindowPadding'](_0x164fc7);}),VisuMZ[_0x54167d(0x940)]['Scene_Boot_onDatabaseLoaded']=Scene_Boot[_0x54167d(0x4ec)][_0x54167d(0x34e)],Scene_Boot['prototype'][_0x54167d(0x34e)]=function(){const _0x586b67=_0x54167d;VisuMZ['CoreEngine'][_0x586b67(0x305)][_0x586b67(0x204)](this),this[_0x586b67(0x9e7)](),this[_0x586b67(0x3ba)](),this[_0x586b67(0x44d)](),this[_0x586b67(0x95a)](),this[_0x586b67(0x946)](),VisuMZ['ParseAllNotetags']();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x364)]={},Scene_Boot[_0x54167d(0x4ec)]['process_VisuMZ_CoreEngine_RegExp']=function(){const _0x24509d=_0x54167d,_0x2c63d6=[_0x24509d(0x578),_0x24509d(0x784),_0x24509d(0x6ea),'DEF','MAT','MDF',_0x24509d(0x778),_0x24509d(0x7cf)],_0x207906=[_0x24509d(0x8a9),_0x24509d(0x2d9),'CRI',_0x24509d(0x891),_0x24509d(0x8b1),_0x24509d(0x603),_0x24509d(0x81e),_0x24509d(0x293),_0x24509d(0x9de),_0x24509d(0x627)],_0x44551e=[_0x24509d(0x7b3),_0x24509d(0xa0d),_0x24509d(0x3ab),_0x24509d(0x66d),_0x24509d(0x43f),_0x24509d(0x5c3),_0x24509d(0x70a),_0x24509d(0x90d),_0x24509d(0x4b5),_0x24509d(0x282)],_0x115138=[_0x2c63d6,_0x207906,_0x44551e],_0x5b4349=[_0x24509d(0x8dc),'Plus1',_0x24509d(0x662),_0x24509d(0x82c),_0x24509d(0x9cc),_0x24509d(0x538),'Rate2',_0x24509d(0x68a),_0x24509d(0x42e),_0x24509d(0x963)];for(const _0x47f29c of _0x115138){let _0x128d12='';if(_0x47f29c===_0x2c63d6)_0x128d12=_0x24509d(0x594);if(_0x47f29c===_0x207906)_0x128d12=_0x24509d(0x904);if(_0x47f29c===_0x44551e)_0x128d12=_0x24509d(0x652);for(const _0x576781 of _0x5b4349){let _0x4359b0=_0x24509d(0x25f)[_0x24509d(0x482)](_0x128d12,_0x576781);VisuMZ['CoreEngine'][_0x24509d(0x364)][_0x4359b0]=[],VisuMZ['CoreEngine']['RegExp'][_0x4359b0+'JS']=[];let _0x351bf1=_0x24509d(0x37a);if([_0x24509d(0x8dc),'Flat'][_0x24509d(0x9ef)](_0x576781))_0x351bf1+=_0x24509d(0x659);else{if(['Plus1',_0x24509d(0x42e)][_0x24509d(0x9ef)](_0x576781))_0x351bf1+=_0x24509d(0x366);else{if([_0x24509d(0x662),'Flat2'][_0x24509d(0x9ef)](_0x576781))_0x351bf1+=_0x24509d(0x936);else{if(_0x576781===_0x24509d(0x82c)){if(_0x24509d(0xa00)!=='TyyOD')_0x351bf1+='(\x5cd+)>';else{const _0x4c210c=this['isMVAnimation'](_0x502f89),_0x5df5b8=new(_0x4c210c?_0x1d2890:_0x1e0624)();_0x5df5b8['targetObjects']=_0x2d66ec,_0x5df5b8['setup'](_0x32ed63,_0x4ac1ed,_0x1da65f,_0x2ab424),_0x5df5b8[_0x24509d(0x20f)](_0x1335b4),this[_0x24509d(0x84c)][_0x24509d(0x45f)](_0x5df5b8),this[_0x24509d(0x4dc)][_0x24509d(0x398)](_0x5df5b8);}}else{if(_0x576781===_0x24509d(0x538))_0x351bf1+=_0x24509d(0x61a);else{if(_0x576781===_0x24509d(0x727)){if(_0x24509d(0x2f0)!=='wqdiq'){const _0x4a6183=new _0xa1414b['BaseTexture']();_0x4a6183[_0x24509d(0x328)](0x800,0x800),_0x33c622[_0x24509d(0x940)]['Settings']['QoL'][_0x24509d(0x777)]&&(_0x4a6183['scaleMode']=_0x109a11[_0x24509d(0x767)][_0x24509d(0x72f)]),this[_0x24509d(0x54e)]['push'](_0x4a6183);}else _0x351bf1+=_0x24509d(0x89d);}}}}}}for(const _0x160b17 of _0x47f29c){let _0x4cd3dc=_0x576781['replace'](/[\d+]/g,'')[_0x24509d(0x8dd)]();const _0x41a869=_0x351bf1['format'](_0x160b17,_0x4cd3dc);VisuMZ[_0x24509d(0x940)][_0x24509d(0x364)][_0x4359b0]['push'](new RegExp(_0x41a869,'i'));const _0x501b74=_0x24509d(0x523)[_0x24509d(0x482)](_0x160b17,_0x4cd3dc);VisuMZ[_0x24509d(0x940)][_0x24509d(0x364)][_0x4359b0+'JS']['push'](new RegExp(_0x501b74,'i'));}}}},Scene_Boot['prototype']['process_VisuMZ_CoreEngine_Notetags']=function(){if(VisuMZ['ParseAllNotetags'])return;},Scene_Boot[_0x54167d(0x4ec)][_0x54167d(0x44d)]=function(){const _0x4151d5=_0x54167d,_0xae914d=VisuMZ['CoreEngine']['Settings'];_0xae914d[_0x4151d5(0x2e9)][_0x4151d5(0x21a)]&&VisuMZ['ShowDevTools'](!![]);_0xae914d[_0x4151d5(0x2e9)][_0x4151d5(0x62f)]&&(Input[_0x4151d5(0x21f)][0x23]='end',Input[_0x4151d5(0x21f)][0x24]=_0x4151d5(0x588));if(_0xae914d['ButtonAssist']){const _0x2c0411=_0xae914d[_0x4151d5(0x464)];_0x2c0411[_0x4151d5(0x504)]=_0x2c0411[_0x4151d5(0x504)]||'\x5c}❪SHIFT❫\x5c{',_0x2c0411[_0x4151d5(0x8fb)]=_0x2c0411[_0x4151d5(0x8fb)]||_0x4151d5(0x657);}if(_0xae914d[_0x4151d5(0x8a6)][_0x4151d5(0x8e6)]){if(_0x4151d5(0x6f9)!==_0x4151d5(0x6f9))return _0x1aaea0[_0x4151d5(0x556)][_0x4151d5(0x7fe)][_0x4151d5(0x204)](this);else Input[_0x4151d5(0x21f)][0x57]='up',Input['keyMapper'][0x41]='left',Input['keyMapper'][0x53]=_0x4151d5(0x83a),Input[_0x4151d5(0x21f)][0x44]=_0x4151d5(0x231),Input[_0x4151d5(0x21f)][0x45]=_0x4151d5(0x316);}_0xae914d[_0x4151d5(0x8a6)]['DashToggleR']&&(Input['keyMapper'][0x52]=_0x4151d5(0x5cd)),_0xae914d['Param'][_0x4151d5(0x70d)]=_0xae914d['Param'][_0x4151d5(0x70d)]['map'](_0x367797=>_0x367797['toUpperCase']()[_0x4151d5(0x314)]()),_0xae914d[_0x4151d5(0x3fa)][_0x4151d5(0x886)]=_0xae914d[_0x4151d5(0x3fa)]['ExtDisplayedParams'][_0x4151d5(0x90c)](_0x306bc8=>_0x306bc8[_0x4151d5(0x8dd)]()[_0x4151d5(0x314)]());},Scene_Boot['prototype'][_0x54167d(0x95a)]=function(){const _0x437a54=_0x54167d;this[_0x437a54(0x744)]();},Scene_Boot[_0x54167d(0x4ec)]['process_VisuMZ_CoreEngine_jsQuickFunctions']=function(){const _0x214f58=_0x54167d,_0x2a1dfb=VisuMZ[_0x214f58(0x940)][_0x214f58(0x331)][_0x214f58(0x873)];for(const _0xee5a84 of _0x2a1dfb){const _0x14dfb6=_0xee5a84[_0x214f58(0x806)][_0x214f58(0x3ed)](/[ ]/g,''),_0x1062a5=_0xee5a84[_0x214f58(0x563)];VisuMZ['CoreEngine'][_0x214f58(0x895)](_0x14dfb6,_0x1062a5);}},VisuMZ[_0x54167d(0x940)]['createJsQuickFunction']=function(_0x132b99,_0x2bd9cf){const _0x597a73=_0x54167d;if(!!window[_0x132b99]){if($gameTemp[_0x597a73(0x562)]())console[_0x597a73(0x262)](_0x597a73(0x6b4)[_0x597a73(0x482)](_0x132b99));}const _0x14e15c=_0x597a73(0x704)[_0x597a73(0x482)](_0x132b99,_0x2bd9cf);window[_0x132b99]=new Function(_0x14e15c);},Scene_Boot[_0x54167d(0x4ec)][_0x54167d(0x946)]=function(){const _0x146725=_0x54167d,_0x148508=VisuMZ[_0x146725(0x940)]['Settings']['CustomParam'];if(!_0x148508)return;for(const _0x2f1ae9 of _0x148508){if(!_0x2f1ae9)continue;VisuMZ[_0x146725(0x940)]['createCustomParameter'](_0x2f1ae9);}},VisuMZ[_0x54167d(0x940)][_0x54167d(0x7d1)]={},VisuMZ[_0x54167d(0x940)]['CustomParamIcons']={},VisuMZ[_0x54167d(0x940)][_0x54167d(0x6dc)]={},VisuMZ[_0x54167d(0x940)][_0x54167d(0x450)]={},VisuMZ[_0x54167d(0x940)]['createCustomParameter']=function(_0x591c4c){const _0x31855d=_0x54167d,_0x178679=_0x591c4c[_0x31855d(0x3e5)],_0x17b192=_0x591c4c[_0x31855d(0x6fc)],_0x1eb3da=_0x591c4c[_0x31855d(0x685)],_0x3e25da=_0x591c4c[_0x31855d(0x89a)],_0x1a0de6=new Function(_0x591c4c[_0x31855d(0x508)]);VisuMZ[_0x31855d(0x940)][_0x31855d(0x7d1)][_0x178679[_0x31855d(0x8dd)]()['trim']()]=_0x17b192,VisuMZ[_0x31855d(0x940)][_0x31855d(0x377)][_0x178679[_0x31855d(0x8dd)]()[_0x31855d(0x314)]()]=_0x1eb3da,VisuMZ['CoreEngine']['CustomParamType'][_0x178679[_0x31855d(0x8dd)]()[_0x31855d(0x314)]()]=_0x3e25da,VisuMZ[_0x31855d(0x940)][_0x31855d(0x450)][_0x178679[_0x31855d(0x8dd)]()[_0x31855d(0x314)]()]=_0x178679,Object[_0x31855d(0x201)](Game_BattlerBase[_0x31855d(0x4ec)],_0x178679,{'get'(){const _0x1f8ce6=_0x31855d,_0x1a0ba6=_0x1a0de6['call'](this);return _0x3e25da==='integer'?Math[_0x1f8ce6(0x3ad)](_0x1a0ba6):_0x1a0ba6;}});},VisuMZ['ParseAllNotetags']=function(){const _0x4ac35d=_0x54167d;for(const _0x26f832 of $dataActors){if(_0x4ac35d(0x576)==='kVFjY'){if(_0x26f832)VisuMZ[_0x4ac35d(0x276)](_0x26f832);}else this['makeDocumentTitle']();}for(const _0x11c674 of $dataClasses){if(_0x11c674)VisuMZ['ParseClassNotetags'](_0x11c674);}for(const _0x67a16a of $dataSkills){if(_0x4ac35d(0x294)!=='cibUW'){const _0x299d64=_0x52290f[_0x536db8],_0x876d28='%1/'[_0x4ac35d(0x482)](_0x5871e4);for(const _0x2cad94 of _0x299d64){_0x460d28[_0x4ac35d(0x9bb)](_0x876d28,_0x2cad94);}}else{if(_0x67a16a)VisuMZ[_0x4ac35d(0x5b9)](_0x67a16a);}}for(const _0x5e7be6 of $dataItems){if(_0x4ac35d(0x381)!==_0x4ac35d(0x381)){if(_0x54f2c1[_0x4ac35d(0x562)]()){const _0x18a3db=_0x56a624[_0x4ac35d(0x940)][_0x4ac35d(0x331)][_0x4ac35d(0x2e9)][_0x4ac35d(0x54a)];if(_0x18a3db>0x0)_0x3817c8[_0x4ac35d(0x42d)](_0x18a3db);}}else{if(_0x5e7be6)VisuMZ[_0x4ac35d(0x321)](_0x5e7be6);}}for(const _0x4eaa45 of $dataWeapons){if(_0x4ac35d(0x62b)!=='MdAwc'){if(_0x4eaa45)VisuMZ[_0x4ac35d(0x67b)](_0x4eaa45);}else return-0.5*(_0x4e1985[_0x4ac35d(0x9ba)](0x2,0xa*_0x34323c)*_0x4ea4c4[_0x4ac35d(0x98c)]((_0x48df82-_0xd3b4b)*(0x2*_0x1180ea['PI'])/_0x79b950));}for(const _0x2f7a82 of $dataArmors){if(_0x4ac35d(0x770)!==_0x4ac35d(0x770))this['_helpWindow'][_0x4ac35d(0x6d0)](_0x246984[_0x4ac35d(0x556)][_0x4ac35d(0x536)]);else{if(_0x2f7a82)VisuMZ[_0x4ac35d(0x7b5)](_0x2f7a82);}}for(const _0x5ec43d of $dataEnemies){if(_0x5ec43d)VisuMZ[_0x4ac35d(0x7ca)](_0x5ec43d);}for(const _0x7fbea7 of $dataStates){if(_0x7fbea7)VisuMZ['ParseStateNotetags'](_0x7fbea7);}for(const _0x4a3188 of $dataTilesets){if('rzcdk'!==_0x4ac35d(0x941)){if(_0x4a3188)VisuMZ[_0x4ac35d(0x653)](_0x4a3188);}else this['_x']=this['_targetX'],this['_y']=this[_0x4ac35d(0x537)],this[_0x4ac35d(0x8c2)]=this[_0x4ac35d(0x816)],this['_scaleY']=this[_0x4ac35d(0x242)],this[_0x4ac35d(0x2d4)]=this[_0x4ac35d(0x360)],this[_0x4ac35d(0x6d2)]&&(this[_0x4ac35d(0x6d2)]['x']=this[_0x4ac35d(0x53e)]['x'],this[_0x4ac35d(0x6d2)]['y']=this[_0x4ac35d(0x53e)]['y']);}},VisuMZ['ParseActorNotetags']=function(_0x105c8c){},VisuMZ['ParseClassNotetags']=function(_0x357bc6){},VisuMZ['ParseSkillNotetags']=function(_0x4d65e8){},VisuMZ[_0x54167d(0x321)]=function(_0x25f66e){},VisuMZ[_0x54167d(0x67b)]=function(_0x32d574){},VisuMZ[_0x54167d(0x7b5)]=function(_0x167092){},VisuMZ[_0x54167d(0x7ca)]=function(_0x39ee7f){},VisuMZ[_0x54167d(0x820)]=function(_0x17fed5){},VisuMZ[_0x54167d(0x653)]=function(_0x1ce90e){},VisuMZ[_0x54167d(0x940)][_0x54167d(0x276)]=VisuMZ[_0x54167d(0x276)],VisuMZ[_0x54167d(0x276)]=function(_0x3a87ba){const _0x45c3eb=_0x54167d;VisuMZ['CoreEngine'][_0x45c3eb(0x276)][_0x45c3eb(0x204)](this,_0x3a87ba);const _0x4453b6=_0x3a87ba[_0x45c3eb(0x31a)];if(_0x4453b6[_0x45c3eb(0x59b)](/<MAX LEVEL:[ ](\d+)>/i)){if('qHtAX'!==_0x45c3eb(0x253)){this['contents']['clear']();for(let _0x5e2989=0x1;_0x5e2989<=0x5;_0x5e2989++){this[_0x45c3eb(0x558)](_0x5e2989);}}else{_0x3a87ba[_0x45c3eb(0x902)]=Number(RegExp['$1']);if(_0x3a87ba['maxLevel']===0x0)_0x3a87ba[_0x45c3eb(0x902)]=Number[_0x45c3eb(0x4a8)];}}_0x4453b6[_0x45c3eb(0x59b)](/<INITIAL LEVEL:[ ](\d+)>/i)&&(_0x3a87ba[_0x45c3eb(0x351)]=Math[_0x45c3eb(0x3e0)](Number(RegExp['$1']),_0x3a87ba['maxLevel']));},VisuMZ['CoreEngine']['ParseClassNotetags']=VisuMZ[_0x54167d(0x61c)],VisuMZ['ParseClassNotetags']=function(_0x223a7f){const _0x54c9bd=_0x54167d;VisuMZ['CoreEngine'][_0x54c9bd(0x61c)]['call'](this,_0x223a7f);if(_0x223a7f[_0x54c9bd(0x908)])for(const _0x1b0374 of _0x223a7f['learnings']){'KGEUq'===_0x54c9bd(0x4bf)?_0x1b0374['note'][_0x54c9bd(0x59b)](/<LEARN AT LEVEL:[ ](\d+)>/i)&&(_0x1b0374[_0x54c9bd(0x472)]=Math[_0x54c9bd(0x350)](Number(RegExp['$1']),0x1)):this[_0x54c9bd(0x69c)](_0x2dbc17);}},VisuMZ['CoreEngine'][_0x54167d(0x7ca)]=VisuMZ[_0x54167d(0x7ca)],VisuMZ['ParseEnemyNotetags']=function(_0x5362b6){const _0x444e0f=_0x54167d;VisuMZ['CoreEngine'][_0x444e0f(0x7ca)]['call'](this,_0x5362b6),_0x5362b6[_0x444e0f(0x472)]=0x1;const _0x518ab7=_0x5362b6[_0x444e0f(0x31a)];if(_0x518ab7[_0x444e0f(0x59b)](/<LEVEL:[ ](\d+)>/i))_0x5362b6['level']=Number(RegExp['$1']);if(_0x518ab7['match'](/<MAXHP:[ ](\d+)>/i))_0x5362b6[_0x444e0f(0x9b7)][0x0]=Number(RegExp['$1']);if(_0x518ab7[_0x444e0f(0x59b)](/<MAXMP:[ ](\d+)>/i))_0x5362b6[_0x444e0f(0x9b7)][0x1]=Number(RegExp['$1']);if(_0x518ab7[_0x444e0f(0x59b)](/<ATK:[ ](\d+)>/i))_0x5362b6[_0x444e0f(0x9b7)][0x2]=Number(RegExp['$1']);if(_0x518ab7[_0x444e0f(0x59b)](/<DEF:[ ](\d+)>/i))_0x5362b6[_0x444e0f(0x9b7)][0x3]=Number(RegExp['$1']);if(_0x518ab7['match'](/<MAT:[ ](\d+)>/i))_0x5362b6[_0x444e0f(0x9b7)][0x4]=Number(RegExp['$1']);if(_0x518ab7['match'](/<MDF:[ ](\d+)>/i))_0x5362b6['params'][0x5]=Number(RegExp['$1']);if(_0x518ab7['match'](/<AGI:[ ](\d+)>/i))_0x5362b6[_0x444e0f(0x9b7)][0x6]=Number(RegExp['$1']);if(_0x518ab7[_0x444e0f(0x59b)](/<LUK:[ ](\d+)>/i))_0x5362b6[_0x444e0f(0x9b7)][0x7]=Number(RegExp['$1']);if(_0x518ab7['match'](/<EXP:[ ](\d+)>/i))_0x5362b6[_0x444e0f(0x9ea)]=Number(RegExp['$1']);if(_0x518ab7[_0x444e0f(0x59b)](/<GOLD:[ ](\d+)>/i))_0x5362b6[_0x444e0f(0x8b4)]=Number(RegExp['$1']);},VisuMZ['CoreEngine'][_0x54167d(0x8c7)]=Graphics[_0x54167d(0x44e)],Graphics['_defaultStretchMode']=function(){const _0x5838db=_0x54167d;switch(VisuMZ[_0x5838db(0x940)]['Settings'][_0x5838db(0x2e9)][_0x5838db(0x709)]){case'stretch':return!![];case _0x5838db(0x8a5):return![];default:return VisuMZ[_0x5838db(0x940)]['Graphics_defaultStretchMode']['call'](this);}},VisuMZ['CoreEngine'][_0x54167d(0x517)]=Graphics['printError'],Graphics[_0x54167d(0x93c)]=function(_0x3032eb,_0x3c3feb,_0x5c76b8=null){const _0x7394c6=_0x54167d;VisuMZ[_0x7394c6(0x940)][_0x7394c6(0x517)][_0x7394c6(0x204)](this,_0x3032eb,_0x3c3feb,_0x5c76b8),VisuMZ[_0x7394c6(0x4c7)](![]);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x280)]=Graphics[_0x54167d(0x763)],Graphics['_centerElement']=function(_0x57e9b7){const _0x1e44b3=_0x54167d;VisuMZ['CoreEngine'][_0x1e44b3(0x280)]['call'](this,_0x57e9b7),this[_0x1e44b3(0x66a)](_0x57e9b7);},Graphics[_0x54167d(0x66a)]=function(_0x1da430){const _0x53cd7d=_0x54167d;if(VisuMZ[_0x53cd7d(0x940)]['Settings'][_0x53cd7d(0x2e9)][_0x53cd7d(0x9c5)]){if(_0x53cd7d(0x394)===_0x53cd7d(0x9ab)){const _0x3ebd6b=_0x413e63[_0x53cd7d(0x940)][_0x53cd7d(0x331)][_0x53cd7d(0x5c9)];this[_0x53cd7d(0x21d)]=_0x3ebd6b?.[_0x53cd7d(0x4fe)]||'random';}else _0x1da430[_0x53cd7d(0x460)]['font-smooth']=_0x53cd7d(0x3a4);}VisuMZ[_0x53cd7d(0x940)][_0x53cd7d(0x331)][_0x53cd7d(0x2e9)][_0x53cd7d(0x777)]&&(_0x1da430[_0x53cd7d(0x460)][_0x53cd7d(0x36a)]='pixelated');const _0x29895a=Math[_0x53cd7d(0x350)](0x0,Math[_0x53cd7d(0x42f)](_0x1da430[_0x53cd7d(0x281)]*this[_0x53cd7d(0x3f0)])),_0x4a9992=Math['max'](0x0,Math[_0x53cd7d(0x42f)](_0x1da430[_0x53cd7d(0x3e1)]*this[_0x53cd7d(0x3f0)]));_0x1da430[_0x53cd7d(0x460)][_0x53cd7d(0x281)]=_0x29895a+'px',_0x1da430[_0x53cd7d(0x460)][_0x53cd7d(0x3e1)]=_0x4a9992+'px';},VisuMZ['CoreEngine'][_0x54167d(0x76d)]=Bitmap[_0x54167d(0x4ec)]['initialize'],Bitmap[_0x54167d(0x4ec)][_0x54167d(0x8d7)]=function(_0xc17414,_0x51dccf){const _0x472386=_0x54167d;VisuMZ[_0x472386(0x940)][_0x472386(0x76d)][_0x472386(0x204)](this,_0xc17414,_0x51dccf),this[_0x472386(0x8e8)]=!(VisuMZ[_0x472386(0x940)][_0x472386(0x331)][_0x472386(0x2e9)]['PixelateImageRendering']??!![]);},Bitmap[_0x54167d(0x4ec)]['markCoreEngineModified']=function(){this['_customModified']=!![];},VisuMZ[_0x54167d(0x940)][_0x54167d(0x4b0)]=Sprite[_0x54167d(0x4ec)][_0x54167d(0x954)],Sprite[_0x54167d(0x4ec)]['destroy']=function(){const _0x156752=_0x54167d;VisuMZ[_0x156752(0x940)][_0x156752(0x4b0)][_0x156752(0x204)](this),this[_0x156752(0x8d0)]();},Sprite[_0x54167d(0x4ec)]['destroyCoreEngineMarkedBitmaps']=function(){const _0x5b11fc=_0x54167d;if(!this[_0x5b11fc(0x228)])return;if(!this[_0x5b11fc(0x228)][_0x5b11fc(0x380)])return;this[_0x5b11fc(0x228)][_0x5b11fc(0x3d2)]&&!this[_0x5b11fc(0x554)][_0x5b11fc(0x3d2)]['destroyed']&&(_0x5b11fc(0x27d)==='PlhGt'?_0x154d4c[_0x5b11fc(0x940)]['Game_Interpreter_command355'][_0x5b11fc(0x204)](this):this[_0x5b11fc(0x228)][_0x5b11fc(0x954)]());},VisuMZ['CoreEngine'][_0x54167d(0x833)]=Bitmap[_0x54167d(0x4ec)]['resize'],Bitmap[_0x54167d(0x4ec)][_0x54167d(0x776)]=function(_0x304469,_0x206b55){const _0x6b96a3=_0x54167d;VisuMZ['CoreEngine'][_0x6b96a3(0x833)][_0x6b96a3(0x204)](this,_0x304469,_0x206b55),this[_0x6b96a3(0x7f7)]();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x5ac)]=Bitmap['prototype']['blt'],Bitmap[_0x54167d(0x4ec)][_0x54167d(0x46f)]=function(_0x1e7289,_0x2f35ea,_0x5f0044,_0x3fff6e,_0x17e1cd,_0x2ca952,_0x50ae3f,_0x385fde,_0x639a7f){const _0x30e8bf=_0x54167d;_0x2f35ea=Math[_0x30e8bf(0x3ad)](_0x2f35ea),_0x5f0044=Math['round'](_0x5f0044),_0x3fff6e=Math[_0x30e8bf(0x3ad)](_0x3fff6e),_0x17e1cd=Math['round'](_0x17e1cd),_0x2ca952=Math[_0x30e8bf(0x3ad)](_0x2ca952),_0x50ae3f=Math[_0x30e8bf(0x3ad)](_0x50ae3f),VisuMZ[_0x30e8bf(0x940)][_0x30e8bf(0x5ac)][_0x30e8bf(0x204)](this,_0x1e7289,_0x2f35ea,_0x5f0044,_0x3fff6e,_0x17e1cd,_0x2ca952,_0x50ae3f,_0x385fde,_0x639a7f),this[_0x30e8bf(0x7f7)]();},VisuMZ['CoreEngine'][_0x54167d(0x775)]=Bitmap['prototype'][_0x54167d(0x915)],Bitmap[_0x54167d(0x4ec)][_0x54167d(0x915)]=function(_0x3e105b,_0x32d8ac,_0x388bbc,_0x44e605){const _0xfc6d41=_0x54167d;VisuMZ[_0xfc6d41(0x940)][_0xfc6d41(0x775)][_0xfc6d41(0x204)](this,_0x3e105b,_0x32d8ac,_0x388bbc,_0x44e605),this[_0xfc6d41(0x7f7)]();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x85f)]=Bitmap[_0x54167d(0x4ec)][_0x54167d(0x434)],Bitmap[_0x54167d(0x4ec)][_0x54167d(0x434)]=function(_0x3de557,_0x21f6a5,_0x37f1a5,_0x541578,_0x52eeda){const _0x4f90f3=_0x54167d;VisuMZ[_0x4f90f3(0x940)][_0x4f90f3(0x85f)]['call'](this,_0x3de557,_0x21f6a5,_0x37f1a5,_0x541578,_0x52eeda),this['markCoreEngineModified']();},VisuMZ['CoreEngine'][_0x54167d(0x5e0)]=Bitmap[_0x54167d(0x4ec)][_0x54167d(0x3cf)],Bitmap['prototype']['strokeRect']=function(_0x1ed27f,_0x5ce87,_0x158379,_0x21e804,_0x375fc4){const _0x55bd24=_0x54167d;VisuMZ[_0x55bd24(0x940)][_0x55bd24(0x5e0)][_0x55bd24(0x204)](this,_0x1ed27f,_0x5ce87,_0x158379,_0x21e804,_0x375fc4),this[_0x55bd24(0x7f7)]();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x3da)]=Bitmap[_0x54167d(0x4ec)]['gradientFillRect'],Bitmap[_0x54167d(0x4ec)]['gradientFillRect']=function(_0x4ab1c4,_0x52b079,_0x5b27fe,_0xf243ab,_0x146bf9,_0x36266b,_0x20e300){const _0x49a3da=_0x54167d;VisuMZ[_0x49a3da(0x940)][_0x49a3da(0x3da)][_0x49a3da(0x204)](this,_0x4ab1c4,_0x52b079,_0x5b27fe,_0xf243ab,_0x146bf9,_0x36266b,_0x20e300),this['markCoreEngineModified']();},VisuMZ[_0x54167d(0x940)]['Bitmap_drawCircle']=Bitmap[_0x54167d(0x4ec)][_0x54167d(0x566)],Bitmap['prototype'][_0x54167d(0x566)]=function(_0x2c3dbb,_0xcd4c1a,_0x5f397c,_0x3e712f){const _0x631f9e=_0x54167d;_0x2c3dbb=Math['round'](_0x2c3dbb),_0xcd4c1a=Math['round'](_0xcd4c1a),_0x5f397c=Math[_0x631f9e(0x3ad)](_0x5f397c),VisuMZ[_0x631f9e(0x940)][_0x631f9e(0x298)][_0x631f9e(0x204)](this,_0x2c3dbb,_0xcd4c1a,_0x5f397c,_0x3e712f),this[_0x631f9e(0x7f7)]();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x28e)]=Bitmap['prototype'][_0x54167d(0x330)],Bitmap[_0x54167d(0x4ec)][_0x54167d(0x330)]=function(_0xaa5b48){const _0x46a5c2=_0x54167d;return Math['ceil'](VisuMZ[_0x46a5c2(0x940)][_0x46a5c2(0x28e)][_0x46a5c2(0x204)](this,_0xaa5b48));},VisuMZ[_0x54167d(0x940)]['Bitmap_drawText']=Bitmap['prototype'][_0x54167d(0x2cc)],Bitmap[_0x54167d(0x4ec)][_0x54167d(0x2cc)]=function(_0x4400d0,_0x14a905,_0x3828d3,_0x4bf612,_0x38e5ee,_0x1ab238){const _0xfe13=_0x54167d;_0x14a905=Math[_0xfe13(0x3ad)](_0x14a905),_0x3828d3=Math[_0xfe13(0x3ad)](_0x3828d3),_0x4bf612=Math['round'](_0x4bf612),_0x38e5ee=Math[_0xfe13(0x3ad)](_0x38e5ee),VisuMZ[_0xfe13(0x940)][_0xfe13(0x2e4)][_0xfe13(0x204)](this,_0x4400d0,_0x14a905,_0x3828d3,_0x4bf612,_0x38e5ee,_0x1ab238),this['markCoreEngineModified']();},VisuMZ['CoreEngine']['Bitmap_drawTextOutline']=Bitmap['prototype'][_0x54167d(0x4b4)],Bitmap[_0x54167d(0x4ec)][_0x54167d(0x4b4)]=function(_0x44446d,_0x547e14,_0x51c0b0,_0xf7e9c7){const _0x21fdb4=_0x54167d;VisuMZ[_0x21fdb4(0x940)][_0x21fdb4(0x331)][_0x21fdb4(0x2e9)][_0x21fdb4(0x9e0)]?_0x21fdb4(0x73f)===_0x21fdb4(0x73f)?this['_drawTextShadow'](_0x44446d,_0x547e14,_0x51c0b0,_0xf7e9c7):_0x393dd6['CoreEngine'][_0x21fdb4(0x9d8)]['call'](this):VisuMZ['CoreEngine'][_0x21fdb4(0x4ff)][_0x21fdb4(0x204)](this,_0x44446d,_0x547e14,_0x51c0b0,_0xf7e9c7);},Bitmap[_0x54167d(0x4ec)]['_drawTextShadow']=function(_0x2f1561,_0x201bef,_0x5b31d,_0x2d29bd){const _0x31eb52=_0x54167d,_0x38fc6a=this['context'];_0x38fc6a['fillStyle']=this[_0x31eb52(0x431)],_0x38fc6a[_0x31eb52(0x70c)](_0x2f1561,_0x201bef+0x2,_0x5b31d+0x2,_0x2d29bd);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x638)]=Input[_0x54167d(0x531)],Input['clear']=function(){const _0x24b2a1=_0x54167d;VisuMZ[_0x24b2a1(0x940)]['Input_clear'][_0x24b2a1(0x204)](this),this['_inputString']=undefined,this[_0x24b2a1(0x912)]=undefined,this[_0x24b2a1(0x88b)]=Input['keyRepeatWait'];},VisuMZ[_0x54167d(0x940)][_0x54167d(0x91e)]=Input[_0x54167d(0x3b5)],Input[_0x54167d(0x3b5)]=function(){const _0x5ce9f5=_0x54167d;VisuMZ[_0x5ce9f5(0x940)][_0x5ce9f5(0x91e)][_0x5ce9f5(0x204)](this);if(this[_0x5ce9f5(0x88b)])this[_0x5ce9f5(0x88b)]--;},VisuMZ['CoreEngine'][_0x54167d(0x4d1)]=Input[_0x54167d(0x898)],Input['_pollGamepads']=function(){const _0x4a6325=_0x54167d;if(this['_gamepadWait'])return;VisuMZ[_0x4a6325(0x940)][_0x4a6325(0x4d1)][_0x4a6325(0x204)](this);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x8f0)]=Input[_0x54167d(0x454)],Input[_0x54167d(0x454)]=function(){const _0x47253e=_0x54167d;VisuMZ['CoreEngine'][_0x47253e(0x8f0)][_0x47253e(0x204)](this),document['addEventListener'](_0x47253e(0x51a),this[_0x47253e(0x95d)][_0x47253e(0x6ac)](this));},VisuMZ[_0x54167d(0x940)][_0x54167d(0x5ec)]=Input['_onKeyDown'],Input['_onKeyDown']=function(_0x588a46){const _0x1c13c3=_0x54167d;this[_0x1c13c3(0x912)]=_0x588a46[_0x1c13c3(0x6e5)],VisuMZ['CoreEngine'][_0x1c13c3(0x5ec)][_0x1c13c3(0x204)](this,_0x588a46);},Input[_0x54167d(0x95d)]=function(_0x11d26d){const _0x43130e=_0x54167d;this[_0x43130e(0x93a)](_0x11d26d);},Input[_0x54167d(0x93a)]=function(_0x5ad27f){const _0x12b736=_0x54167d;this['_inputSpecialKeyCode']=_0x5ad27f[_0x12b736(0x6e5)];let _0x4053ef=String['fromCharCode'](_0x5ad27f[_0x12b736(0x5a6)]);this[_0x12b736(0x2f6)]===undefined?this[_0x12b736(0x2f6)]=_0x4053ef:this[_0x12b736(0x2f6)]+=_0x4053ef;},VisuMZ[_0x54167d(0x940)]['Input_shouldPreventDefault']=Input[_0x54167d(0x58c)],Input[_0x54167d(0x58c)]=function(_0x355a09){const _0x369b09=_0x54167d;if(_0x355a09===0x8)return![];return VisuMZ[_0x369b09(0x940)][_0x369b09(0x6e6)][_0x369b09(0x204)](this,_0x355a09);},Input[_0x54167d(0x623)]=function(_0x15c187){const _0x279d76=_0x54167d;if(_0x15c187[_0x279d76(0x59b)](/backspace/i))return this[_0x279d76(0x912)]===0x8;if(_0x15c187[_0x279d76(0x59b)](/enter/i))return this[_0x279d76(0x912)]===0xd;if(_0x15c187['match'](/escape/i))return this[_0x279d76(0x912)]===0x1b;},Input[_0x54167d(0x8e3)]=function(){return[0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39]['contains'](this['_inputSpecialKeyCode']);},Input['isArrowPressed']=function(){const _0x4b77ef=_0x54167d;return[0x25,0x26,0x27,0x28]['contains'](this[_0x4b77ef(0x912)]);},Input[_0x54167d(0x599)]=function(){const _0x1f76dd=_0x54167d;if(navigator[_0x1f76dd(0x42b)]){const _0x2ea322=navigator[_0x1f76dd(0x42b)]();if(_0x2ea322)for(const _0x535733 of _0x2ea322){if(_0x535733&&_0x535733[_0x1f76dd(0x74a)])return!![];}}return![];},Input[_0x54167d(0x40e)]=function(){const _0x1e779a=_0x54167d;if(navigator['getGamepads']){const _0x1b6973=navigator[_0x1e779a(0x42b)]();if(_0x1b6973){if(_0x1e779a(0x65c)!==_0x1e779a(0x2c8))for(const _0x496517 of _0x1b6973){if(_0x496517&&_0x496517[_0x1e779a(0x74a)]){if(this['isGamepadButtonPressed'](_0x496517))return!![];}}else _0x1d4741('%1\x27s\x20version\x20does\x20not\x20match\x20plugin\x27s.\x20Please\x20update\x20it\x20in\x20the\x20Plugin\x20Manager.'['format'](_0x4d5494,_0x258c5a)),_0x2e608e[_0x1e779a(0x4fc)]();}}return![];},Input[_0x54167d(0x649)]=function(_0x196d83){const _0x5db403=_0x54167d,_0x48adce=_0x196d83[_0x5db403(0x277)];for(let _0x64b41e=0x0;_0x64b41e<_0x48adce[_0x5db403(0x95b)];_0x64b41e++){if(_0x48adce[_0x64b41e]['pressed'])return!![];}return![];},VisuMZ[_0x54167d(0x940)]['Tilemap_addShadow']=Tilemap['prototype'][_0x54167d(0x37e)],Tilemap[_0x54167d(0x4ec)][_0x54167d(0x37e)]=function(_0x3befb6,_0x27ff5a,_0x7725f5,_0x4e72e4){const _0x4b0e6c=_0x54167d;if($gameMap&&$gameMap['areTileShadowsHidden']())return;VisuMZ['CoreEngine'][_0x4b0e6c(0x5a9)]['call'](this,_0x3befb6,_0x27ff5a,_0x7725f5,_0x4e72e4);},Tilemap['Renderer'][_0x54167d(0x4ec)][_0x54167d(0x581)]=function(){const _0x3f81ea=_0x54167d;this['_destroyInternalTextures']();for(let _0xc7435f=0x0;_0xc7435f<Tilemap[_0x3f81ea(0x824)]['MAX_GL_TEXTURES'];_0xc7435f++){const _0x531663=new PIXI[(_0x3f81ea(0x7e2))]();_0x531663[_0x3f81ea(0x328)](0x800,0x800);if(VisuMZ[_0x3f81ea(0x940)][_0x3f81ea(0x331)][_0x3f81ea(0x2e9)]['PixelateImageRendering']){if('LoEcc'===_0x3f81ea(0x6ad))_0x531663[_0x3f81ea(0x768)]=PIXI[_0x3f81ea(0x767)][_0x3f81ea(0x72f)];else return _0x5a6d18['layoutSettings'][_0x3f81ea(0x68d)][_0x3f81ea(0x204)](this);}this[_0x3f81ea(0x54e)]['push'](_0x531663);}},WindowLayer[_0x54167d(0x4ec)][_0x54167d(0x53b)]=function(){const _0x44d3ac=_0x54167d;if(SceneManager&&SceneManager['_scene']){if('fbdwC'!=='fbdwC')_0x59b0ee[_0x44d3ac(0x940)][_0x44d3ac(0x9d1)][_0x44d3ac(0x204)](this);else return SceneManager['_scene'][_0x44d3ac(0x507)]();}else return!![];},VisuMZ[_0x54167d(0x940)]['WindowLayer_render']=WindowLayer[_0x54167d(0x4ec)][_0x54167d(0x47b)],WindowLayer['prototype'][_0x54167d(0x47b)]=function render(_0x574591){const _0x5455c6=_0x54167d;if(this['isMaskingEnabled']())_0x5455c6(0x6be)!==_0x5455c6(0x2e3)?VisuMZ[_0x5455c6(0x940)]['WindowLayer_render'][_0x5455c6(0x204)](this,_0x574591):this['_commandWindow'][_0x5455c6(0x6d0)](_0x4dd2f5[_0x5455c6(0x556)][_0x5455c6(0x626)]);else{if('mHJtB'===_0x5455c6(0x589))this[_0x5455c6(0x951)](_0x574591);else return _0x11a0b8[_0x5455c6(0x556)][_0x5455c6(0x8af)][_0x5455c6(0x204)](this);}},WindowLayer['prototype'][_0x54167d(0x951)]=function render(_0x41abe6){const _0x49881d=_0x54167d;if(!this['visible'])return;const _0xf976b6=new PIXI[(_0x49881d(0x842))](),_0x5c46c7=_0x41abe6['gl'],_0x9c32a0=this[_0x49881d(0xa1b)]['clone']();_0x41abe6[_0x49881d(0x999)][_0x49881d(0x33e)](),_0xf976b6['transform']=this[_0x49881d(0x4ac)],_0x41abe6[_0x49881d(0x266)][_0x49881d(0x49a)](),_0x5c46c7[_0x49881d(0x1f3)](_0x5c46c7[_0x49881d(0x867)]);while(_0x9c32a0[_0x49881d(0x95b)]>0x0){const _0x415599=_0x9c32a0[_0x49881d(0x843)]();_0x415599[_0x49881d(0x803)]&&_0x415599[_0x49881d(0x572)]&&_0x415599[_0x49881d(0x51c)]>0x0&&(_0x5c46c7[_0x49881d(0x7f4)](_0x5c46c7[_0x49881d(0x2f3)],0x0,~0x0),_0x5c46c7[_0x49881d(0x2ef)](_0x5c46c7[_0x49881d(0x760)],_0x5c46c7[_0x49881d(0x760)],_0x5c46c7[_0x49881d(0x760)]),_0x415599[_0x49881d(0x47b)](_0x41abe6),_0x41abe6[_0x49881d(0x266)]['flush'](),_0xf976b6['clear'](),_0x5c46c7['stencilFunc'](_0x5c46c7[_0x49881d(0x9d3)],0x1,~0x0),_0x5c46c7[_0x49881d(0x2ef)](_0x5c46c7[_0x49881d(0x319)],_0x5c46c7[_0x49881d(0x319)],_0x5c46c7[_0x49881d(0x319)]),_0x5c46c7['blendFunc'](_0x5c46c7[_0x49881d(0xa14)],_0x5c46c7[_0x49881d(0x6bb)]),_0xf976b6[_0x49881d(0x47b)](_0x41abe6),_0x41abe6['batch'][_0x49881d(0x49a)](),_0x5c46c7[_0x49881d(0x7e7)](_0x5c46c7['ONE'],_0x5c46c7[_0x49881d(0x899)]));}_0x5c46c7['disable'](_0x5c46c7[_0x49881d(0x867)]),_0x5c46c7[_0x49881d(0x531)](_0x5c46c7['STENCIL_BUFFER_BIT']),_0x5c46c7[_0x49881d(0x855)](0x0),_0x41abe6[_0x49881d(0x266)]['flush']();for(const _0x51e979 of this[_0x49881d(0xa1b)]){!_0x51e979[_0x49881d(0x803)]&&_0x51e979[_0x49881d(0x572)]&&_0x51e979[_0x49881d(0x47b)](_0x41abe6);}_0x41abe6[_0x49881d(0x266)]['flush']();},DataManager[_0x54167d(0x98f)]=function(_0x315239){const _0x319d33=_0x54167d;return this[_0x319d33(0x7c1)](_0x315239)&&_0x315239[_0x319d33(0x50d)]===0x2;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x6f2)]=DataManager[_0x54167d(0x952)],DataManager[_0x54167d(0x952)]=function(){const _0x5f09e8=_0x54167d;VisuMZ[_0x5f09e8(0x940)][_0x5f09e8(0x6f2)][_0x5f09e8(0x204)](this),this[_0x5f09e8(0x422)](),this[_0x5f09e8(0x586)]();},DataManager['reservePlayTestNewGameCommonEvent']=function(){const _0x43d25c=_0x54167d;if($gameTemp[_0x43d25c(0x562)]()){const _0x396d18=VisuMZ[_0x43d25c(0x940)]['Settings'][_0x43d25c(0x2e9)]['NewGameCommonEvent'];if(_0x396d18>0x0)$gameTemp['reserveCommonEvent'](_0x396d18);}},DataManager[_0x54167d(0x586)]=function(){const _0x319fce=_0x54167d,_0x1ece8a=VisuMZ[_0x319fce(0x940)][_0x319fce(0x331)]['QoL']['NewGameCommonEventAll']||0x0;if(_0x1ece8a>0x0)$gameTemp['reserveCommonEvent'](_0x1ece8a);},DataManager[_0x54167d(0x910)]=function(_0x462a2f){const _0x2d112c=_0x54167d,_0x427c53=$dataTroops[_0x462a2f];if(!_0x427c53)return'';let _0x382d6d='';_0x382d6d+=_0x427c53[_0x2d112c(0x614)];for(const _0x317d42 of _0x427c53[_0x2d112c(0x6e0)]){if(_0x2d112c(0x2c6)!=='LMxRv')_0x453812[_0x2d112c(0x940)]['Scene_Boot_updateDocumentTitle'][_0x2d112c(0x204)](this);else for(const _0x3bee75 of _0x317d42[_0x2d112c(0x9d7)]){[0x6c,0x198][_0x2d112c(0x9ef)](_0x3bee75['code'])&&(_0x382d6d+='\x0a',_0x382d6d+=_0x3bee75[_0x2d112c(0x733)][0x0]);}}return _0x382d6d;};function _0x2505(){const _0x1c99ff=['xparam','VcUnz','BACK_SLASH','pictureId','learnings','_stored_powerDownColor','Spriteset_Battle_createEnemies','Game_Action_setAttack','map','MDR','〖〖〖\x20Troop\x20%1:\x20%2\x20Script\x20〗〗〗\x0a\x0a','Scene_Status_create','createTroopNote','_moveEasingType','_inputSpecialKeyCode','split','drawGameTitle','clearRect','Untitled','INBACK','ListRect','yeDkC','Window_StatusBase_drawActorSimpleStatus','SwitchRandomizeRange','OPEN_CURLY_BRACKET','Window_Base_drawIcon','Input_update','bgs','Scene_Map_update','_commandList','displayY','ARRAYSTRUCT','focus','currencyUnit','button','Window_NameInput_initialize','Game_Screen_initialize','GoldFontSize','CLEAR','DATABASE','PTB','NUMPAD6','command105','VQUrP','key%1','test','Scene_Map_updateMain','BottomHelp','buttonAssistText5','active','([\x5c+\x5c-]\x5cd+\x5c.?\x5cd+)>','FanvW','NUMPAD8','setClickHandler','_registerKeyInput','successRate','printError','VNUAB','Game_Event_isCollidedWithEvents','exportAllMapStrings','CoreEngine','Hqrsg','NeYuL','updateWaitMode','paramMaxJS','EINQq','process_VisuMZ_CoreEngine_CustomParameters','Scene_Skill_create','paramWidth','TRAIT_PARAM','playCancel','OptionsRect','5052KpFimA','isSceneBattle','switchModes','result','_pageupButton','renderNoMask','setupNewGame','xparamPlus','destroy','oHUKx','createDimmerSprite','DIVIDE','translucentOpacity','_stored_tpGaugeColor1','process_VisuMZ_CoreEngine_Functions','length','znoYG','_onKeyPress','Game_Interpreter_command355','mpGaugeColor1','startNormalGame','_colorCache','SystemSetBattleSystem','Flat2','paramFlatJS','ETB','isArrowPressed','movePageButtonSideButtonLayout','LILnL','bNstv','ColorMPCost','WIN_ICO_00','\x0a\x0a\x0a\x0a\x0a','mpGaugeColor2','catchLoadError','_screenY','levelUpRecovery','SystemLoadImages','DimColor1','rQcQb','WIN_OEM_WSCTRL','itemHit','processCursorHomeEndTrigger','sparamFlat2','GoldRect','_battlerName','GetParamIcon','wGMqN','CazGT','itemHeight','WIN_OEM_JUMP','keyboard','LoadMenu','F17','buttonAssistKey2','AllTroops','DECIMAL','XParamVocab6','removeOnceParallelInterpreter','aaesO','buttonAssistKey4','_rate','COLON','BlurFilter','sin','_helpWindow','AnimationMirrorOffset','isKeyItem','Window_Base_drawFace','NUM','Pixelated','VisuMZ\x20CoreEngine\x20PictureIcon\x20%1\x20%2','IdERg','IconSParam1','boxHeight','_targetOffsetY','Center','framebuffer','Scene_Map_updateMainMultiply','XUxtd','uKvOu','kcSXf','Window_Gold_refresh','Game_System_initialize','cksYN','paramMax','Scene_Map_createSpritesetFix','contents','ESttR','adjustBoxSize','Upper\x20Left','cancel','_movementDuration','IconXParam1','BTB','CcAnY','hefLs','VBKJm','wtQRC','iJLvH','anchor','HbWYa','vertJS','onNameOk','XNJNb','bitmapHeight','NumberBgType','params','NUMPAD0','checkSubstitute','pow','createBuffer','getBattleSystem','ListBgType','isPointAnimationPlaying','MGhEp','pictureButtons','YhnOD','drawFace','NffsF','cursorUp','FontSmoothing','ScaleY','targetX','YJtZd','NONCONVERT','Scene_Title_drawGameTitle','contentsBack','Rate','_mainSprite','MODECHANGE','pointY','defaultInputMode','Window_NumberInput_processDigitChange','bgm','ALWAYS','showFauxAnimations','ApplyEasing','VdGuQ','list','Scene_Name_onInputOk','iDxdd','QUOTE','vXufJ','KPXUP','_clientArea','MRG','originalJS','FontShadows','lkOUn','encounterStep','Conditional\x20Branch\x20Script\x20Error','Window_Selectable_cursorUp','MCTtb','isRepeated','process_VisuMZ_CoreEngine_RegExp','battleSystem','seVolume','exp','_pictureCoordinatesMode','atbActive','VzeeA','addLoadListener','includes','Scene_GameEnd_createBackground','_hovered','isBottomButtonMode','CTB','guardSkillId','cursorPageup','runCombinedScrollingTextAsCode','OPEN_PAREN','VOLUME_DOWN','calcCoreEasing','bgsVolume','isTpb','commandWindowRect','getInputButtonString','isInstanceOfSceneMap','WIN_OEM_PA3','ahPKK','Enemy','Export\x20Troop\x20Text\x20operation\x20will\x20finish\x20in\x20%1\x20ms(s)','_downArrowSprite','XParamVocab0','TjMIh','_buttonAssistWindow','TimeProgress','_pressed','_encounterCount','statusParamsWindowRect','_stored_expGaugeColor2','volume','GRD','cursorLeft','SystemSetFontSize','ceil','targetOpacity','repositionEnemiesByResolution','setAction','ZERO','animationNextDelay','characters','position','setEasingType','_shakeDuration','setTargetAnchor','children','GYNsf','ForceNoPlayTest','enable','loadGameImagesCoreEngine','_refreshArrows','useFontWidthFix','_origin','advanced','RowSpacing','updateBackOpacity','isSmartEventCollisionOn','CONTEXT_MENU','BTestAddedQuantity','title','_hideButtons','StatusEquipBgType','defineProperty','initBasic','MAT','call','ENTER','random','ExportString','KdjKP','DrawIcons','RPGMAKER_VERSION','BuyBgType','PAUSE','TextStr','faceWidth','setMute','EXCLAMATION','updatePositionCoreEngine','dherO','cXtST','_backgroundFilter','pxkHA','tpCostColor','picture','SceneManager_onKeyDown','218743SPhJfQ','OpenConsole','processKeyboardBackspace','processHandling','_coreEngineShakeStyle','%1\x27s\x20version\x20does\x20not\x20match\x20plugin\x27s.\x20Please\x20update\x20it\x20in\x20the\x20Plugin\x20Manager.','keyMapper','updatePlayTestF7','Symbol','YWMJw','NUMPAD4','F22','targetObjects','determineSideButtonLayoutValid','smallParamFontSize','bitmap','updateMove','scaleSprite','LevelUpFullHp','PictureEraseRange','buttonAssistText%1','isSideView','anchorCoreEasing','Sprite_Animation_processSoundTimings','right','drawTextTopAligned','remove','isBottomHelpMode','isMapScrollLinked','paramRateJS','JeQGi','exec','createChildSprite','_windowskin','ExportStrFromAllMaps','hideButtonFromView','MSsCh','_dummyWindow','updateTransform','INQUINT','EndingID','_targetScaleY','SHIFT','Scene_Unlisted','setupBattleTestItems','catchNormalError','paramName','Game_Map_setup','outlineColorGauge','ARRAYEVAL','isEnemy','openURL','IconParam5','contentsOpacity','139250anJBYC','ecJKR','IconXParam6','WIN_OEM_AUTO','qHtAX','makeDocumentTitle','createCommandWindow','_storedStack','EnableNameInput','SystemLoadAudio','_mirror','TaUlC','\x20Origin:\x20%1','SwitchToggleOne','platform','concat','%1%2','isUseModernControls','optSideView','log','INCUBIC','mMnXL','animations','batch','WIqrq','_cacheScaleX','processPointAnimationRequests','HELP','VyoMZ','application/json','ORKWv','updateShadow','ActorMPColor','MclQH','EREOF','initialBattleSystem','Scene_Battle_createSpriteset','buttonAssistOffset1','NumberRect','ParseActorNotetags','buttons','Sprite_Battler_startMove','IQOVo','Script\x20Call\x20Error','gainSilentTp','END','OLrsT','SnAxz','mMMOB','Graphics_centerElement','width','EXR','ButtonHeight','titleCommandWindow','VisuMZ_2_BattleSystemCTB','MIN_SAFE_INTEGER','inputWindowRect','isFullDocumentTitle','forceOutOfPlaytest','ShowButtons','iconWidth','code','buttonY','Bitmap_measureTextWidth','GREATER_THAN','rgba(0,\x200,\x200,\x200.7)','listWindowRect','pixelated','HRG','cibUW','kHvwD','VisuMZ_2_BattleSystemOTB','nah','Bitmap_drawCircle','IconXParam7','removeAllFauxAnimations','clamp','doesNameContainBannedWords','_stored_pendingColor','_itemWindow','updatePositionCoreEngineShakeHorz','IconXParam2','ALTGR','addWindow','XParamVocab4','nw.gui','drawGauge','F6key','PLgWm','FVLri','iQhkM','createButtonAssistWindow','hpGaugeColor2','onload','origin','NewGameBoot','0.00','1884450GzkPUW','ItemRect','zwVSL','playTestCtrlT','loadPicture','HRhOz','Sprite_Gauge_gaugeRate','get','Window_Base_drawCharacter','BannedWords','setupCustomRateCoreEngine','drawActorLevel','_active','buttonAssistWindowButtonRect','Window_NameInput_refresh','setFrame','PIPE','AntiZoomPictures','yHcsT','darwin','xparamPlus1','Scene_Battle_update','LMxRv','BhqSY','DFHIS','Window_NameInput_processTouch','getLastPluginCommandInterpreter','stringKeyMap','drawText','drawGameVersion','TQQmY','DummyRect','CommonEventID','\x5c}❪SHIFT❫\x5c{','veKze','ppNpG','_opacity','INOUTQUART','processTimingData','INOUTCIRC','enableDigitGrouping','EVA','PRESERVCONVERSION(%1)','damageColor','loadIconBitmap','updatePictureCoordinates','textHeight','updateCoreEasing','Sprite_AnimationMV_processTimingData','Scene_Base_create','ActorRect','NKauJ','Bitmap_drawText','drawActorClass','setCommonEvent','battlebacks1','Window_Base_createTextState','QoL','paramFlatBonus','Map%1','helpAreaHeight','$dataMap','mirror','stencilOp','wqdiq','meVolume','dimColor1','EQUAL','_skillTypeWindow','isGameActive','_inputString','OutlineColor','zTbhL','_list','drawGameSubtitle','targetScaleX','shake','DXkTu','bgmVolume','moveRelativeToResolutionChange','save','xparamFlatJS','INOUTQUINT','isNwjs','jYqsH','Scene_Boot_onDatabaseLoaded','F11','mhp','moveMenuButtonSideButtonLayout','_targets','ColorExpGauge1','ColorMaxLvGauge1','LevelUpFullMp','HaUlW','createTitleButtons','data/','CancelText','iIvPx','TitleCommandList','tpColor','trim','_tempActor','pagedown','CLOSE_BRACKET','isCursorMovable','REPLACE','note','isAnimationOffsetXMirrored','tFYlL','targetScaleY','IconParam3','playEscape','ParamArrow','ParseItemNotetags','buttonAssistText1','paramRate2','_battleField','mJmpI','aDOHF','HbfeQ','setSize','loadSystemImages','_stored_tpGaugeColor2','system','resetTextColor','BasicParameterFormula','13435FdhcJe','status','measureTextWidth','Settings','OTB','pop','URL','responseText','LEFT','type','EnableJS','Scene_Menu_create','BTestWeapons','GoldMax','Linear','WIN_OEM_FJ_TOUROKU','forceStencil','JUNJA','SkillTypeRect','createCustomBackgroundImages','StatusBgType','paramFlat','animationShouldMirror','BzwDu','pxhrr','Game_Character_processMoveCommand','aEubW','setActorHome','_playtestF7Looping','Window_EquipItem_isEnabled','740qjculp','Lspfg','onDatabaseLoaded','OutlineColorGauge','max','initialLevel','wXAVc','QsZcI','SwitchActorText','nBSks','qpMXe','sv_enemies','setMainFontSize','WIN_OEM_BACKTAB','HANJA','EditBgType','setupCoreEngine','move','#%1','SELECT','_targetOpacity','CONVERT','gaugeLineHeight','AnimationPoint','RegExp','setMoveEasingType','([\x5c+\x5c-]\x5cd+)([%%])>','WIN_OEM_FJ_JISHO','Window_NameInput_cursorLeft','Hkzcg','image-rendering','WIN_OEM_FINISH','xScrollLinkedOffset','itemHitImprovedAccuracy','_timerSprite','HYhSx','EVAL','showPointAnimations','xIvve','Spriteset_Base_isAnimationPlaying','DqPdA','jvIXM','_width','CustomParamIcons','changeTextColor','ColorGaugeBack','<%1\x20%2:[\x20]','8mcmAIs','parallaxes','itemLineRect','_addShadow','_sellWindow','_customModified','bAvnW','toFixed','initCoreEasing','yScrollLinkedOffset','_cacheScaleY','xparamFlat1','32nxsRAX','〖〖〖\x20Map\x20%1:\x20%2\x20Script\x20〗〗〗\x0a\x0a','OWbCB','jhcPl','WRqgj','updateOpacity','EvUkg','onButtonImageLoad','sparamPlus2','62253IVRcEH','Game_Troop_setup','ColorTPGauge1','usableSkills','vepFG','_stored_mpCostColor','SParamVocab6','Map%1.json','push','hit','FTB','goldWindowRect','LESS_THAN','GameEnd','IconXParam5','drawValue','BoxMargin','oLfiQ','GoldChange','AkROb','none','makeCommandList','Nlgtu','Title','_slotWindow','PRINT','dummyWindowRect','REC','titles1','round','BottomButtons','xpZTL','_clickHandler','Game_Picture_y','IconParam0','INBOUNCE','areButtonsOutsideMainUI','update','Window','ctrlKey','drawParamText','INOUTSINE','process_VisuMZ_CoreEngine_Notetags','buttonAssistKey%1','XParamVocab3','JYgfI','FNVpm','IconIndex','rMSqt','child_process','WIN_OEM_FJ_LOYA','rgba(0,\x200,\x200,\x201.0)','ColorDeath','_stored_powerUpColor','command357','padZero','_stored_maxLvGaugeColor1','escape','subjectHitRate','EaLiN','statusEquipWindowRect','SPACE','DEF','strokeRect','_editWindow','Sprite_Picture_loadBitmap','_baseTexture','StartID','Troop%1','mute','clearForcedGameTroopSettingsCoreEngine','Game_Actor_changeClass','Window_NameInput_cursorDown','number','Bitmap_gradientFillRect','yrvBl','helpAreaBottom','IconSParam8','alwaysDash','catchException','min','height','_goldWindow','Opacity','MultiKeyFmt','Abbreviation','INOUTBOUNCE','_mapNameWindow','OQZjM','initDigitGrouping','equips','Window_StatusBase_drawActorLevel','jVEiE','replace','ExportAllMapText','repositionCancelButtonSideButtonLayout','_realScale','performEscape','setCoreEngineScreenShakeStyle','paramBaseAboveLevel99','_subject','Window_NumberInput_start','return\x200','updateData','yKrOQ','Scene_Base_terminate','Param','nextLevelExp','showDevTools','VisuMZ_2_BattleSystemPTB','Scene_Boot_startNormalGame','ColorTPGauge2','SParamVocab9','LoadError','_movementWholeDuration','outlineColorDmg','drawIconBySize','pEEZl','CallHandlerJS','INQUAD','buttonAssistText4','IconSet','PLAY','YgPsp','Total','Scene_MenuBase_helpAreaTop','isGamepadTriggered','BattleManager_checkSubstitute','EAprN','SkillMenu','_maxDigits','SmartEventCollisionPriority','ctGaugeColor1','iTMFT','font','SParamVocab1','ACCEPT','makeDeepCopy','CommandRect','HOME','thZly','mmp','《《《\x20Event\x20%1:\x20%2,\x20Page\x20%3\x20》》》\x0a%4\x0a','getCoreEngineScreenShakeStyle','_backgroundSprite','mainAreaHeight','reservePlayTestNewGameCommonEvent','textColor','TextJS','WIN_OEM_ENLW','currentLevelExp','PRINTSCREEN','profileWindowRect','Keyboard','_lastOrigin','getGamepads','mIuJC','reserveCommonEvent','Flat1','floor','processCursorMove','outlineColor','_opening','select','fillRect','HASH','_backSprite1','events','evaded','qoDDp','isItemStyle','currentExp','WlEeG','OUTEXPO','Scene_Map_createSpriteset_detach','MCR','Scene_Base_createWindowLayer','mbFww','EQUALS','PPTsc','DvgCp','xparamFlat2','initCoreEngineScreenShake','option','VisuMZ_2_BattleSystemSTB','XParamVocab1','hHwHv','rPHnx','lfRva','process_VisuMZ_CoreEngine_Settings','_defaultStretchMode','retrieveFauxAnimation','CustomParamAbb','members','UAOWf','playTestF7','_setupEventHandlers','paramRate','DamageColor','INOUTELASTIC','YeJYm','numberWindowRect','PreserveNumbers','tkwau','_listWindow','ColorCTGauge1','BGKPD','addChild','style','XParamVocab9','getBackgroundOpacity','Scene_Map_updateScene','ButtonAssist','cursorRight','playBuzzer','Spriteset_Base_updatePosition','blockWidth','sparamRate1','itemPadding','retrievePointAnimation','setAttack','CIRCUMFLEX','missed','blt','STB','isClosed','level','openingSpeed','IconSParam5','_digitGroupingEx','clearZoom','DigitGroupingLocale','_pictureCoordinatesWindow','oniEs','ayhwP','render','menu','refreshDimmerBitmap','iLmyQ','OUTSINE','skillTypeWindowRect','ROYtK','format','gTLiZ','_stored_hpGaugeColor2','_stored_systemColor','isCollidedWithEvents','textAlign','1030ZYnuhN','uiAreaWidth','createFauxAnimationSprite','ShortcutScripts','applyCoreEasing','ShowJS','ProfileBgType','itemBackColor2','startAnimation','expGaugeColor1','addChildToBack','pvyvx','CsZcv','Smooth','cnIDD','boxWidth','loadSystem','innerWidth','flush','makeFontSmaller','ItemHeight','command111','buttonAssistOffset%1','canUse','Game_Party_consumeItem','menuShowButton','updatePosition','NkUHk','DigitGroupingGaugeSprites','QJITM','initMembers','BgType','MAX_SAFE_INTEGER','constructor','onInputBannedWords','rowSpacing','transform','setGuard','lTpVN','FUNC','Sprite_destroy','VrfJe','X:\x20%1','backspace','_drawTextOutline','FDR','CvggE','isEnabled','alphabetic','consumeItem','uSREI','vertical','getCustomBackgroundSettings','Game_Picture_updateMove','EXEyA','KGEUq','_sideButtonLayout','jnQMW','EXECUTE','buttonAssistText2','removeChild','sTsSG','INSINE','ShowDevTools','App','updateOrigin','nAkmR','sparamFlat1','NUM_LOCK','This\x20scene\x20cannot\x20utilize\x20a\x20Once\x20Parallel!','_scene','restore','smooth','Input_pollGamepads','OUTQUART','_backSprite','ctGaugeColor2','measureTextWidthNoRounding','F21','checkCacheKey','hpColor','sSOKm','ShowItemBackground','Window_Base_update','_pointAnimationSprites','end','subject','NUMPAD7','ImprovedAccuracySystem','STRUCT','alpha','loadBitmap','paramValueByName','WkDdu','SParameterFormula','VisuMZ_2_BattleSystemFTB','buttonAssistKey1','onInputOk','_hideTileShadows','BgFilename2','prototype','oeJCm','_duration','_data','_buttonType','calcEasing','SPsWC','_hp','_updateFilterArea','Basic','isActor','WlMER','_muteSound','INSERT','hide','VReHx','exit','KCScy','DefaultStyle','Bitmap_drawTextOutline','egwaO','〘Common\x20Event\x20%1:\x20%2〙\x20End','offsetX','getPointAnimationLayer','KeySHIFT','deselect','ActorTPColor','isWindowMaskingEnabled','ValueJS','vZzWb','ColorHPGauge2','_stored_gaugeBackColor','currentClass','itypeId','_actorWindow','setViewportCoreEngineFix','string','updatePadding','gaugeRate','setupValueFont','battlebacks2','enemies','createMenuButton','Graphics_printError','OPEN_BRACKET','getCombinedScrollingText','keypress','ExportAllTroopText','openness','sparamPlusJS','_mode','Window_Selectable_processTouch','expGaugeColor2','_actor','yXCGh','<JS\x20%1\x20%2:[\x20](.*)>','KWupN','yPVqh','Chance','Scene_Battle_createSpritesetFix','IDs','MenuLayout','MhzLQ','VLUXl','mainCommandWidth','_number','updateEffekseer','Scene_MenuBase_mainAreaHeight','Color','clear','_fauxAnimationQueue','Game_Picture_calcEasing','EVdVa','XParamVocab7','HelpBgType','_targetY','Rate1','_changingClass','itemBackColor1','isMaskingEnabled','helpAreaTopSideButtonLayout','join','_targetAnchor','xmlmN','inBattle','toLocaleString','_playTestFastMode','awNnV','AccuracyBoost','drawTextEx','WIN_OEM_RESET','Sprite_AnimationMV_updatePosition','SLASH','randomInt','NewGameCommonEvent','isTriggered','Subtitle','Location','_internalTextures','_pagedownButton','qolaj','DETACH_PICTURE_CONTAINER','expRate','version','_bitmap','_repositioned','layoutSettings','WSvSv','drawSegment','TranslucentOpacity','EtJuT','initCoreEngine','itemEva','createWindowLayer','_pictureName','COMMA','_stored_normalColor','_pauseSignSprite','isPlaytest','CodeJS','sv_actors','_targetOffsetX','drawCircle','_stored_deathColor','GoldOverlap','_animationQueue','RIGHT','pjQME','DPTKq','clearOnceParallelInterpreters','Game_Actor_levelUp','makeActionList','value','Sprite_Button_initialize','visible','itemWindowRect','ImgLoad','RepositionEnemies','kVFjY','cTTgu','MAXHP','GoldBgType','_pictureContainer','mJyxh','onClick','changeClass','YDdZg','updatePositionCoreEngineShakeOriginal','Game_Action_itemEva','_createInternalTextures','_commonEventLayers','qJMOH','canAttack','ItemBgType','reserveNewGameCommonEvent','cxXfe','home','mHJtB','parseForcedGameTroopSettingsCoreEngine','CTnYP','_shouldPreventDefault','initVisuMZCoreEngine','isMVAnimation','KUBBm','adjustSprite','Scene_Equip_create','open','TDfmI','param','DetachBattlePictureContainer','Sprite_Actor_setActorHome','PGDN','IconSParam9','isGamepadConnected','MULTIPLY','match','SceneManager_initialize','setBattleSystem','dimColor2','WpXzw','createBackground','pictures','drawRightArrow','show','VkJEn','BTestItems','charCode','helpWindowRect','lpPEz','Tilemap_addShadow','OLrKf','CategoryRect','Bitmap_blt','_offsetX','pageup','CLFCN','isMagical','_stored_maxLvGaugeColor2','updateDocumentTitle','nEdzo','NUMPAD5','ltBSm','EnableNumberInput','_coreEasing','eva','ParseSkillNotetags','ftJrJ','SceneManager_isGameActive','coxRC','sparamFlatJS','hpGaugeColor1','Game_Interpreter_PluginCommand','ETtpT','processTouchModernControls','targetY','TCR','Game_Interpreter_command105','ckNuz','BattleSystem','VoiUx','ExtJS','ScreenShake','_stored_expGaugeColor1','bitmapWidth','_storedMapText','dashToggle','categoryWindowRect','gPJsb','buttonAssistOffset2','FTmma','eventsXyNt','vlGvU','CLOSE_CURLY_BRACKET','powerUpColor','targetBackOpacity','ItemBackColor1','setHome','playOk','GroupDigits','Scene_Battle_createCancelButton','maxCols','command355','isMaxLevel','Game_Interpreter_updateWaitMode','Bitmap_strokeRect','UNDERSCORE','maxLvGaugeColor2','Scene_Battle_createSpriteset_detach','F24','command122','ColorPowerUp','redraw','Scene_Options_create','add','displayX','createPointAnimationQueue','Input_onKeyDown','TPB\x20WAIT','isInputting','SceneManager_exit','BlendMode','sellWindowRect','clearCachedKeys','BattleManager_processEscape','BDYok','Mabdk','Game_Interpreter_command122','upXDl','%1\x0a','_isPlaytest','SaveMenu','UEyVL','ARRAYJSON','JPwIl','playOnceParallelInterpreter','IconSParam7','buttonAssistSwitch','useDigitGroupingEx','YPeTN','MRF','subtitle','stypeId','processKeyboardHandling','charAt','buttonAssistKey5','isPlaying','_makeFontNameText','InputBgType','skills','SParamVocab7','setHandler','CategoryBgType','xdg-open','sparamFlatBonus','PERIOD','WIN_ICO_HELP','name','drawAllParams','createPointAnimation','RevertPreserveNumbers','DELETE','isEventRunning','(\x5cd+)([%%])>','playLoad','ParseClassNotetags','context','Scene_Map_createSpriteset','Game_Action_updateLastTarget','RightMenus','processBack','wYTgW','isSpecialCode','updateKeyText','buyWindowRect','CommandBgType','TRG','exportAllTroopStrings','_onceParallelInterpreters','WIN_OEM_PA1','BQvji','_blank','EscapeAlways','ESC','ModernControls','EXSEL','updateFauxAnimations','BattleManager_update','processKeyboardEnd','NUMPAD3','_closing','systemColor','OUTELASTIC','Input_clear','ytfFF','IconParam2','ZOOM','_dimmerSprite','PZuLI','indexOf','smoothSelect','ParamMax','nickname','VTwPB','updateMain','buttonAssistCancel','ExportCurTroopText','default','Spriteset_Base_destroy','QiKmO','isGamepadButtonPressed','updateClose','createPointAnimationSprite','requestFauxAnimation','ColorManager_loadWindowskin','createPageButtons','filter','DwHzu','ARRAYSTR','sparam','ParseTilesetNotetags','%1\x20is\x20missing\x20a\x20required\x20plugin.\x0aPlease\x20install\x20%2\x20into\x20the\x20Plugin\x20Manager.','VOLUME_MUTE','getColor','\x5c}❪TAB❫\x5c{','IconXParam3','([\x5c+\x5c-]\x5cd+)>','setupCoreEasing','isHandled','WuyyS','SLKOv','fadeSpeed','targets','wait','paramchangeTextColor','Plus2','cursorDown','processFauxAnimationRequests','Mirror','OnLoadJS','setValue','gaugeHeight','startShake','_centerElementCoreEngine','create','SnapshotOpacity','PHA','_isButtonHidden','tiUzD','SubfolderParse','QFWwE','xhYiI','buttonAssistKey3','maxBattleMembers','rpasX','TextFmt','PositionX','Unnamed','Game_Action_itemHit','IfNOR','ParseWeaponNotetags','Gold','backgroundBitmap','OUTQUAD','onerror','kGqAB','editWindowRect','KANA','ConvertParams','mToyr','Icon','getInputMultiButtonStrings','RepositionActors','processSoundTimings','F19','Flat','center','isBusy','HelpRect','ColorMaxLvGauge2','etURi','buttonAssistWindowSideRect','Sprite_Gauge_currentValue','StatusParamsRect','FoaZJ','buttonAreaHeight','Game_Picture_show','Scene_MenuBase_createPageButtons','CRSEL','_forcedBattleSys','Power','commandWindowRows','isOptionValid','setSkill','index','processCursorMoveModernControls','sqrt','uyaXN','cancelShowButton','Manual','updateCurrentEvent','_lastY','DigitGroupingExText','ExtractStrFromMap','maxLvGaugeColor1','nAjzA','RadJA','toLowerCase','makeTargetSprites','bind','LoEcc','_spriteset','_CoreEngineSettings','oEGnS','Window_Selectable_cursorDown','apply','_lastX','WARNING:\x20%1\x20has\x20already\x20been\x20declared\x0aand\x20cannot\x20be\x20used\x20as\x20a\x20Quick\x20JS\x20Function','CANCEL','Scene_MenuBase_createCancelButton','Window_Base_initialize','ItemPadding','kcXXm','tpGaugeColor2','ONE','DigitGroupingStandardText','ButtonFadeSpeed','eNsph','INOUTCUBIC','IconParam4','attackSkillId','slice','QUESTION_MARK','colSpacing','processEscape','numRepeats','_windowLayer','Saved\x20file\x20as\x20%1\x20in\x20project\x20folder.','popScene','IconSParam3','EditRect','YhXVI','ExportCurMapText','Window_NameInput_cursorUp','MenuBg','setBackgroundType','_targetX','_anchor','PnbQz','horzJS','playTestF6','actor','SellBgType','BTestArmors','isExpGaugeDrawn','F16','_margin','CustomParamType','XUYHP','Actor','_stored_hpGaugeColor1','pages','_animation','isCancelled','LINEAR','outbounce','keyCode','Input_shouldPreventDefault','getButtonAssistLocation','CRI','_currentMap','ATK','SsaBu','VisuMZ_1_OptionsCore','paramBase','〘Common\x20Event\x20%1:\x20%2〙\x20Start','initMembersCoreEngine','ItemMenu','ColSpacing','DataManager_setupNewGame','SParamVocab2','GoldIcon','PictureShowIcon','filters','mfqZs','_buyWindow','BppAz','cos','inbounce','ParamName','PkKAm','setupRate','bYjxR','SParamVocab5','DummyBgType','Window_Base_drawText','Window_NameInput_cursorRight','\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%2\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20($gameTemp.isPlaytest())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27JS\x20Quick\x20Function\x20\x22%1\x22\x20Error!\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(e);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20','textWidth','isActiveTpb','YPBJM','Game_BattlerBase_initMembers','AutoStretch','PDR','drawCharacter','fillText','DisplayedParams','KmbOp','onKeyDownKeysF6F7','startAutoNewGame','playCursor','isNextScene','Game_Actor_paramBase','_stored_mpGaugeColor1','YjNvh','mapId','Speed','YGlxF','updateLastTarget','rPvYp','up2','loadMapData','Sprite_Button_updateOpacity','altKey','WIN_ICO_CLEAR','%1〘Choice\x20%2〙\x20%3%1','VisuMZ_2_BattleSystemBTB','terms','resetFontSettings','paramPlus','startMove','ExportStrFromAllTroops','Rate2','asin','animationId','tilesets','Duration','IconXParam9','_coreEasingType','makeAutoBattleActions','NEAREST','xparamPlus2','getColorDataFromPluginParameters','AllMaps','parameters','_lastPluginCommandInterpreter','OpenSpeed','SParamVocab4','actorWindowRect','PERCENT','drawGoldItemStyle','BiHrF','deWjN','htxph','PictureFilename','buttonAssistOffset4','sZGwA','TextCodeNicknames','〘Show\x20Text〙\x0a','updatePositionCoreEngineShakeRand','TAB','process_VisuMZ_CoreEngine_jsQuickFunctions','Xyyzv','SParamVocab8','Scene_Base_terminateAnimationClearBugFix','setAnchor','tpGaugeColor1','connected','HYPHEN_MINUS','_cache','skipBranch','Window_Selectable_processCursorMove','integer','left','blRJM','NHZWb','levelUp','VOLUME_UP','_fauxAnimationSprites','drawActorNickname','vJdEC','UTWnc','RQVlp','queqh','getLevel','sparamPlus1','KeyItemProtect','Window_NameInput_cursorPageup','skillId','KEEP','FhhGa','SideButtons','_centerElement','isPhysical','loadTitle1','pointX','SCALE_MODES','scaleMode','processDigitChange','_context','applyForcedGameTroopSettingsCoreEngine','allowShiftScrolling','Bitmap_initialize','ARRAYNUM','gxBih','GjTrD','addCommand','processKeyboardDigitChange','start','ConvertNumberToString','Bitmap_clearRect','resize','PixelateImageRendering','AGI','repeat','paramX','powerDownColor','XParamVocab8','enableDigitGroupingEx','PictureID','_backSprite2','img/%1/','numberShowButton','Export\x20Map\x20Text\x20operation\x20will\x20finish\x20in\x20%1\x20ms(s)','XParamVocab2','MAXMP','createPointAnimationTargets','updatePictureAntiZoom','item','WSXhW','SwitchRandomizeOne','ExtractStrFromTroop','ColorPowerDown','mainAreaTopSideButtonLayout','makeInputButtonString','Scene_Shop_create','vRoTx','ADD','isDying','uiAreaHeight','drawItem','_digitGrouping','loadTitle2','useDigitGrouping','TJeBC','BACKSPACE','INEXPO','globalAlpha','ActorBgType','MaxUx','_height','traitObjects','fontSize','EGndI','onLoad','setActionState','bXtFV','《《《\x20Page\x20%1\x20》》》\x0a%2\x0a','_balloonQueue','F20','_statusParamsWindow','rightArrowWidth','cursorPagedown','skillTypes','INCIRC','endAnimation','top','_index','YqSxn','makeCoreEngineCommandList','drawActorSimpleStatus','TextManager_param','TGR','maxItems','ParseArmorNotetags','Spriteset_Base_update','easingType','_forcedTroopView','BACK_QUOTE','evade','%1〘Choice\x20Cancel〙%1','CreateBattleSystemID','backOpacity','TextCodeClassNames','pnczI','BgFilename1','isItem','CommandWidth','filterArea','lineHeight','alignBottom','F7key','parse','GET','Control\x20Variables\x20Script\x20Error','ParseEnemyNotetags','SParamVocab0','windowRect','NoTileShadows','ByawF','LUK','checkSmartEventCollision','CustomParamNames','isPressed','StatusMenu','ONoNM','UXGGo','_offsetY','hXIzH','setBackgroundOpacity','updateMainMultiply','Wait','OUTBACK','optionsWindowRect','refresh','opacity','ColorTPCost','original','_screenX','BaseTexture','send','Y:\x20%1','updatePointAnimations','Scene_Name_create','blendFunc','MDF','LmylF','LATIN1','storeMapData','waiting','adjustPictureAntiZoom','padding','Game_Picture_move','createSpriteset','tLkBm','XuYWs','buttonAssistText3','stencilFunc','PositionY','DetachMapPictureContainer','markCoreEngineModified','imageSmoothingEnabled','duration','OutlineColorDmg','Game_Picture_x','CrisisRate','Game_Temp_initialize','StatusRect','DimColor2','sceneTerminationClearEffects','_refreshBack','updateScene','_isWindow','textBaseline','GHfXQ','FunctionName','fXkce','SEMICOLON','canEquip','FontWidthFix','VisuMZ_2_BattleSystemETB','ASTERISK','applyEasing','5093SJLFSQ','XZacm','【%1】\x0a','EGODr','WIN_OEM_CUSEL','onXhrError','iconHeight','_target','_targetScaleX','yYuli','INELASTIC','ItemStyle','scale','hzcAF','setViewport','reduce','CNT','wtwVH','ParseStateNotetags','updateMotion','down2','setLastPluginCommandInterpreter','Layer','en-US','StatusParamsBgType','statusWindowRect','processAlwaysEscape','EncounterRateMinimum','xparamRate1','F23','Max','setup','IconParam1','pQojK','drawActorExpGauge','UpdatePictureCoordinates','setupFont','Bitmap_resize','setupButtonImage','》Comment《\x0a%1\x0a','BnWXX','%1:\x20Exit\x20','InputRect','Fxdtc','down','FotoT','background','measureText','createCancelButton','zDJoK','windowOpacity','createEnemies','Graphics','shift','_cancelButton','tVttM','tab','ColorMPGauge2','IconSParam6','isAnimationForEach','Origin','WOZqw','_effectsContainer','drawIcon','SystemSetWindowPadding','isAlive','_categoryWindow','isForFriend','setColorTone','Window_ShopSell_isEnabled','NUMPAD2','clearStencil','onEscapeSuccess','VaxtH','currentValue','processMoveCommand','OUTQUINT','LQJXY','_stored_crisisColor','WIN_OEM_FJ_MASSHOU','randomJS','Bitmap_fillRect','_stored_ctGaugeColor1','SideView','targetEvaRate','FINAL','%1\x20is\x20incorrectly\x20placed\x20on\x20the\x20plugin\x20list.\x0aIt\x20is\x20a\x20Tier\x20%2\x20plugin\x20placed\x20over\x20other\x20Tier\x20%3\x20plugins.\x0aPlease\x20reorder\x20the\x20plugin\x20list\x20from\x20smallest\x20to\x20largest\x20tier\x20numbers.','ZHHCK','_optionsWindow','STENCIL_TEST','gsnnN','innerHeight','horizontal','blMOV','faceHeight','ColorHPGauge1','XjoCG','helpAreaTop','DefaultMode','WIN_OEM_FJ_ROYA','FontSize','jsQuickFunc','removePointAnimation','deathColor','XUCVl','IconSParam2','OS_KEY','_shakeSpeed','_refreshPauseSign','mainAreaHeightSideButtonLayout','Scene_Boot_updateDocumentTitle','setSideButtonLayout','dFtmQ','yDQYW','ETuiq','FadeSpeed','removeFauxAnimation','StatusEquipRect','maxTp','updateAnchor','ExtDisplayedParams','NUMPAD1','mainAreaTop','36pmbBHu','F13','_gamepadWait','EquipMenu','UUAHm','YetZM','isOpen','_scaleY','CEV','DOUBLE_QUOTE','requestMotion','_viewportSize','createJsQuickFunction','EnableMasking','_commandWindow','_pollGamepads','ONE_MINUS_SRC_ALPHA','Type','Show\x20Scrolling\x20Text\x20Script\x20Error','mainFontSize','(\x5cd+\x5c.?\x5cd+)>','_pointAnimationQueue','makeFontBigger','dnFpJ','updatePositionCoreEngineShakeVert','terminate','Game_Interpreter_command111','areButtonsHidden','normal','KeyboardInput','encounterStepsMinimum','_statusEquipWindow','HIT','resetBattleSystem','_shakePower','setSideView','itemRect','pZTrZ','SlotRect','drawNewParam','MEV','ExtractStrFromList','MvAnimationRate','gold','_statusWindow','ZWpbJ','paramRate1','buttonAssistOk','ukTmz','otfqx','yZsMT','isFauxAnimationPlaying','faces','gainItem','abs','isSceneMap','WIN_OEM_COPY','_scaleX','initButtonHidden','valueOutlineColor','zrDQy','dIrBB','Graphics_defaultStretchMode','zaHFT','IconParam6','Game_Picture_initBasic','XParameterFormula','RepositionEnemies130','stop','fpVxp','retreat','destroyCoreEngineMarkedBitmaps','_inputWindow','ShopMenu','onKeyDown','Scene_Map_createMenuButton','DocumentTitleFmt','DBwVI','initialize','writeFile','setCoreEngineUpdateWindowBg','_tilemap','_drawTextBody','Plus','toUpperCase','updateOnceParallelInterpreters','isMenuButtonAssistEnabled','_upArrowSprite','isTouchedInsideFrame','ScreenResolution','isNumpadPressed','offsetY','isAnimationPlaying','WASD','win32','_smooth','addOnceParallelInterpreter','sparamRate','animationBaseDelay','Cxddq','needsUpdate','maxGold','isSideButtonLayout','Input_setupEventHandlers','_menuButton','%1〘End\x20Choice\x20Selection〙%1','Scene_Boot_loadSystemImages','moveCancelButtonSideButtonLayout','registerCommand','EISU','EmqSv','updateDashToggle','requestPointAnimation','processTouch','KeyTAB','processKeyboardDelete','PorrG','_baseSprite','_profileWindow','SystemSetSideView','SInIe','maxLevel','removeAllPointAnimations'];_0x2505=function(){return _0x1c99ff;};return _0x2505();}(VisuMZ['CoreEngine'][_0x54167d(0x331)][_0x54167d(0x2e9)][_0x54167d(0x48b)]??!![])&&($scene=null,VisuMZ[_0x54167d(0x940)][_0x54167d(0x2e1)]=Scene_Base['prototype'][_0x54167d(0x66b)],Scene_Base['prototype'][_0x54167d(0x66b)]=function(){const _0x46767d=_0x54167d;VisuMZ[_0x46767d(0x940)][_0x46767d(0x2e1)][_0x46767d(0x204)](this),$scene=this;},$spriteset=null,VisuMZ['CoreEngine']['Scene_Map_createSpriteset']=Scene_Map[_0x54167d(0x4ec)]['createSpriteset'],Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x7f0)]=function(){const _0x256097=_0x54167d;VisuMZ[_0x256097(0x940)][_0x256097(0x61e)][_0x256097(0x204)](this),$spriteset=this[_0x256097(0x6ae)];},VisuMZ['CoreEngine'][_0x54167d(0x273)]=Scene_Battle[_0x54167d(0x4ec)][_0x54167d(0x7f0)],Scene_Battle[_0x54167d(0x4ec)][_0x54167d(0x7f0)]=function(){const _0x1e6052=_0x54167d;VisuMZ[_0x1e6052(0x940)][_0x1e6052(0x273)]['call'](this),$spriteset=this[_0x1e6052(0x6ae)];},VisuMZ['CoreEngine']['Scene_Base_terminate']=Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x8a2)],Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x8a2)]=function(){const _0x168762=_0x54167d;VisuMZ[_0x168762(0x940)][_0x168762(0x3f9)][_0x168762(0x204)](this),$spriteset=null,$subject=null,$targets=null,$target=null;},$subject=null,$targets=null,$target=null,VisuMZ[_0x54167d(0x940)][_0x54167d(0x632)]=BattleManager['update'],BattleManager[_0x54167d(0x3b5)]=function(_0x13d3c7){const _0x22229f=_0x54167d;VisuMZ[_0x22229f(0x940)][_0x22229f(0x632)][_0x22229f(0x204)](this,_0x13d3c7),$subject=this[_0x22229f(0x3f4)],$targets=this[_0x22229f(0x309)],$target=this[_0x22229f(0x815)]||this[_0x22229f(0x309)][0x0];},$event=null,VisuMZ[_0x54167d(0x940)]['Game_Event_start']=Game_Event[_0x54167d(0x4ec)][_0x54167d(0x773)],Game_Event[_0x54167d(0x4ec)][_0x54167d(0x773)]=function(){const _0x26b545=_0x54167d;VisuMZ[_0x26b545(0x940)]['Game_Event_start'][_0x26b545(0x204)](this),$event=this;},VisuMZ['CoreEngine'][_0x54167d(0x920)]=Scene_Map[_0x54167d(0x4ec)]['update'],Scene_Map[_0x54167d(0x4ec)]['update']=function(){const _0x2d4dcc=_0x54167d;VisuMZ[_0x2d4dcc(0x940)][_0x2d4dcc(0x920)][_0x2d4dcc(0x204)](this),$gameMap[_0x2d4dcc(0x6a3)]();},Game_Map[_0x54167d(0x4ec)][_0x54167d(0x6a3)]=function(){const _0x4ac0c4=_0x54167d;!this[_0x4ac0c4(0x619)]()&&$event!==null&&($event=null);},$commonEvent=function(_0x3c70b9){if($gameTemp)$gameTemp['reserveCommonEvent'](_0x3c70b9);},$onceParallel=function(_0x1ae8c5){const _0x4056b8=_0x54167d;if(SceneManager['isSceneMap']())$scene['playOnceParallelInterpreter'](_0x1ae8c5);else{if(SceneManager[_0x4056b8(0x94d)]()){if(Imported['VisuMZ_1_BattleCore'])$scene[_0x4056b8(0x5fe)](_0x1ae8c5);else $gameTemp&&$gameTemp[_0x4056b8(0x562)]()&&alert('Once\x20Parallel\x20for\x20Battle\x20requires\x20VisuMZ_1_BattleCore!');}else $gameTemp&&$gameTemp[_0x4056b8(0x562)]()&&('nQGZX'!==_0x4056b8(0x295)?alert(_0x4056b8(0x4cd)):_0x55a261[_0x4056b8(0x9bb)](_0xa4773c,_0x250f7b));}});function _0x4d17(_0xa4214b,_0x18f1db){const _0x250546=_0x2505();return _0x4d17=function(_0x4d17b5,_0x4dfc44){_0x4d17b5=_0x4d17b5-0x1f1;let _0x4dc7cb=_0x250546[_0x4d17b5];return _0x4dc7cb;},_0x4d17(_0xa4214b,_0x18f1db);};StorageManager['jsonToZip']=function(_0x1c906d){return new Promise((_0x19a961,_0x26ea84)=>{const _0x216770=_0x4d17;if('qdfZo'!==_0x216770(0x4f2))try{if(_0x216770(0x3be)===_0x216770(0x788)){_0x22544a&&_0x141811&&_0x579c31['note']&&this['parseForcedGameTroopSettingsCoreEngine'](_0x306a49[_0x216770(0x31a)]);const _0x5a2421=_0x12211d[_0x43c123];if(_0x5a2421){let _0x273272=_0x4f01e9['createTroopNote'](_0x5a2421['id']);this[_0x216770(0x58a)](_0x273272);}}else{const _0x41fdd1=pako['deflate'](_0x1c906d,{'to':_0x216770(0x510),'level':0x1});if(_0x41fdd1[_0x216770(0x95b)]>=0xc350){}_0x19a961(_0x41fdd1);}}catch(_0x3fb0c8){_0x26ea84(_0x3fb0c8);}else return this['enemy']()['level'];});},TextManager['stringKeyMap']=['','','',_0x54167d(0x6b5),'','',_0x54167d(0x26a),'',_0x54167d(0x798),_0x54167d(0x743),'','',_0x54167d(0x92a),_0x54167d(0x205),'ENTER_SPECIAL','',_0x54167d(0x243),'CTRL','ALT',_0x54167d(0x20c),'CAPSLOCK',_0x54167d(0x682),_0x54167d(0x8f6),_0x54167d(0x33f),_0x54167d(0x863),_0x54167d(0x35a),'',_0x54167d(0x62e),_0x54167d(0x361),_0x54167d(0x9c9),_0x54167d(0x418),_0x54167d(0x9ce),_0x54167d(0x3cd),'PGUP',_0x54167d(0x597),_0x54167d(0x27c),_0x54167d(0x41b),_0x54167d(0x336),'UP',_0x54167d(0x56a),'DOWN',_0x54167d(0x35f),_0x54167d(0x3a9),_0x54167d(0x4c2),_0x54167d(0x427),_0x54167d(0x4f9),_0x54167d(0x618),'','0','1','2','3','4','5','6','7','8','9',_0x54167d(0x98a),_0x54167d(0x808),_0x54167d(0x39c),_0x54167d(0x442),_0x54167d(0x28f),_0x54167d(0x6c3),'AT','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',_0x54167d(0x878),'',_0x54167d(0x1fc),'','SLEEP',_0x54167d(0x9b8),_0x54167d(0x887),_0x54167d(0x854),_0x54167d(0x634),_0x54167d(0x223),_0x54167d(0x5b4),_0x54167d(0x92d),_0x54167d(0x4df),_0x54167d(0x938),'NUMPAD9',_0x54167d(0x59a),_0x54167d(0x790),'SEPARATOR','SUBTRACT',_0x54167d(0x984),_0x54167d(0x957),'F1','F2','F3','F4','F5','F6','F7','F8','F9','F10',_0x54167d(0x306),'F12',_0x54167d(0x88a),'F14','F15',_0x54167d(0x6da),_0x54167d(0x981),'F18',_0x54167d(0x689),_0x54167d(0x7a6),_0x54167d(0x4d6),_0x54167d(0x224),_0x54167d(0x82b),_0x54167d(0x5e4),'','','','','','','','',_0x54167d(0x4cc),'SCROLL_LOCK',_0x54167d(0x367),_0x54167d(0x85d),_0x54167d(0x33d),_0x54167d(0x3c2),_0x54167d(0x871),'','','','','','','','','',_0x54167d(0x46d),_0x54167d(0x210),_0x54167d(0x892),_0x54167d(0x435),'DOLLAR',_0x54167d(0x738),'AMPERSAND',_0x54167d(0x5e1),_0x54167d(0x9f7),'CLOSE_PAREN',_0x54167d(0x80c),'PLUS',_0x54167d(0x2c0),_0x54167d(0x74b),_0x54167d(0x91c),_0x54167d(0x5d4),'TILDE','','','','',_0x54167d(0x655),_0x54167d(0x9f8),_0x54167d(0x754),'','',_0x54167d(0x808),'EQUALS',_0x54167d(0x55f),'MINUS',_0x54167d(0x612),_0x54167d(0x548),_0x54167d(0x7b9),'','','','','','','','','','','','','','','','','','','','','','','','','','',_0x54167d(0x518),_0x54167d(0x906),_0x54167d(0x317),_0x54167d(0x9da),'','META',_0x54167d(0x2a1),'',_0x54167d(0x613),_0x54167d(0x96b),'',_0x54167d(0x71f),'','',_0x54167d(0x546),_0x54167d(0x97e),_0x54167d(0x62a),'WIN_OEM_PA2',_0x54167d(0x9ff),_0x54167d(0x974),_0x54167d(0x812),'WIN_OEM_ATTN',_0x54167d(0x36b),_0x54167d(0x8c1),_0x54167d(0x252),_0x54167d(0x425),_0x54167d(0x359),'ATTN',_0x54167d(0x697),_0x54167d(0x630),_0x54167d(0x271),_0x54167d(0x40a),_0x54167d(0x63b),'','PA1','WIN_OEM_CLEAR',''],TextManager[_0x54167d(0x8b8)]=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)]['ButtonAssist']['OkText'],TextManager[_0x54167d(0x644)]=VisuMZ['CoreEngine'][_0x54167d(0x331)]['ButtonAssist'][_0x54167d(0x310)],TextManager['buttonAssistSwitch']=VisuMZ['CoreEngine'][_0x54167d(0x331)][_0x54167d(0x464)][_0x54167d(0x354)],VisuMZ[_0x54167d(0x940)][_0x54167d(0x7b2)]=TextManager[_0x54167d(0x594)],TextManager[_0x54167d(0x594)]=function(_0x45d392){const _0x52f380=_0x54167d;return typeof _0x45d392===_0x52f380(0x3d9)?VisuMZ[_0x52f380(0x940)]['TextManager_param'][_0x52f380(0x204)](this,_0x45d392):_0x52f380(0x9dc)!=='KPXUP'?_0x2207df[_0x52f380(0x556)][_0x52f380(0x692)][_0x52f380(0x204)](this):this[_0x52f380(0x247)](_0x45d392);},TextManager[_0x54167d(0x247)]=function(_0x499f1e){const _0x91bfc0=_0x54167d;_0x499f1e=String(_0x499f1e||'')[_0x91bfc0(0x8dd)]();const _0x175930=VisuMZ['CoreEngine'][_0x91bfc0(0x331)][_0x91bfc0(0x3fa)];if(_0x499f1e===_0x91bfc0(0x578))return $dataSystem[_0x91bfc0(0x722)][_0x91bfc0(0x9b7)][0x0];if(_0x499f1e===_0x91bfc0(0x784))return $dataSystem[_0x91bfc0(0x722)][_0x91bfc0(0x9b7)][0x1];if(_0x499f1e===_0x91bfc0(0x6ea))return $dataSystem[_0x91bfc0(0x722)][_0x91bfc0(0x9b7)][0x2];if(_0x499f1e===_0x91bfc0(0x3ce))return $dataSystem['terms']['params'][0x3];if(_0x499f1e==='MAT')return $dataSystem[_0x91bfc0(0x722)]['params'][0x4];if(_0x499f1e===_0x91bfc0(0x7e8))return $dataSystem[_0x91bfc0(0x722)][_0x91bfc0(0x9b7)][0x5];if(_0x499f1e===_0x91bfc0(0x778))return $dataSystem[_0x91bfc0(0x722)][_0x91bfc0(0x9b7)][0x6];if(_0x499f1e===_0x91bfc0(0x7cf))return $dataSystem[_0x91bfc0(0x722)][_0x91bfc0(0x9b7)][0x7];if(_0x499f1e==='HIT')return _0x175930[_0x91bfc0(0xa04)];if(_0x499f1e===_0x91bfc0(0x2d9))return _0x175930[_0x91bfc0(0x449)];if(_0x499f1e===_0x91bfc0(0x6e8))return _0x175930[_0x91bfc0(0x783)];if(_0x499f1e==='CEV')return _0x175930[_0x91bfc0(0x3bc)];if(_0x499f1e===_0x91bfc0(0x8b1))return _0x175930[_0x91bfc0(0x2a3)];if(_0x499f1e==='MRF')return _0x175930['XParamVocab5'];if(_0x499f1e===_0x91bfc0(0x81e))return _0x175930[_0x91bfc0(0x985)];if(_0x499f1e==='HRG')return _0x175930[_0x91bfc0(0x535)];if(_0x499f1e===_0x91bfc0(0x9de))return _0x175930[_0x91bfc0(0x77c)];if(_0x499f1e===_0x91bfc0(0x627))return _0x175930[_0x91bfc0(0x461)];if(_0x499f1e===_0x91bfc0(0x7b3))return _0x175930[_0x91bfc0(0x7cb)];if(_0x499f1e===_0x91bfc0(0xa0d))return _0x175930[_0x91bfc0(0x417)];if(_0x499f1e===_0x91bfc0(0x3ab))return _0x175930['SParamVocab2'];if(_0x499f1e===_0x91bfc0(0x66d))return _0x175930['SParamVocab3'];if(_0x499f1e===_0x91bfc0(0x43f))return _0x175930['SParamVocab4'];if(_0x499f1e===_0x91bfc0(0x5c3))return _0x175930[_0x91bfc0(0x700)];if(_0x499f1e===_0x91bfc0(0x70a))return _0x175930['SParamVocab6'];if(_0x499f1e===_0x91bfc0(0x90d))return _0x175930[_0x91bfc0(0x60d)];if(_0x499f1e==='FDR')return _0x175930[_0x91bfc0(0x746)];if(_0x499f1e===_0x91bfc0(0x282))return _0x175930[_0x91bfc0(0x400)];if(VisuMZ[_0x91bfc0(0x940)][_0x91bfc0(0x7d1)][_0x499f1e])return VisuMZ[_0x91bfc0(0x940)][_0x91bfc0(0x7d1)][_0x499f1e];return'';},TextManager[_0x54167d(0x9fd)]=function(_0xd21d99){const _0x2348f7=_0x54167d;if(_0xd21d99===_0x2348f7(0x9a7))_0xd21d99='escape';let _0x231809=[];for(let _0x4489da in Input['keyMapper']){_0x4489da=Number(_0x4489da);if(_0x4489da>=0x60&&_0x4489da<=0x69)continue;if([0x12,0x20][_0x2348f7(0x9ef)](_0x4489da))continue;_0xd21d99===Input[_0x2348f7(0x21f)][_0x4489da]&&_0x231809['push'](_0x4489da);}for(let _0x256b0e=0x0;_0x256b0e<_0x231809['length'];_0x256b0e++){if(_0x2348f7(0x9c8)!==_0x2348f7(0x9c8)){if(!_0x38fed2['isPlaytest']())return;if(!_0x54053d[_0x2348f7(0x303)]())return;_0x14831f['_scene'][_0x2348f7(0x2bc)]=![],_0x59ea0e[_0x2348f7(0x940)]['ExportStrFromAllMaps']();}else _0x231809[_0x256b0e]=TextManager[_0x2348f7(0x2cb)][_0x231809[_0x256b0e]];}return this[_0x2348f7(0x78d)](_0x231809);},TextManager[_0x54167d(0x78d)]=function(_0x309647){const _0xb7b5f5=_0x54167d,_0x12418f=VisuMZ[_0xb7b5f5(0x940)][_0xb7b5f5(0x331)][_0xb7b5f5(0x464)],_0x3c9e9a=_0x12418f['KeyUnlisted'],_0x48fabd=_0x309647[_0xb7b5f5(0x333)](),_0x5c66e5='Key%1'['format'](_0x48fabd);return _0x12418f[_0x5c66e5]?_0x12418f[_0x5c66e5]:_0x3c9e9a[_0xb7b5f5(0x482)](_0x48fabd);},TextManager[_0x54167d(0x686)]=function(_0x2d9795,_0x1d9596){const _0x3e264e=_0x54167d,_0x3c401e=VisuMZ[_0x3e264e(0x940)][_0x3e264e(0x331)][_0x3e264e(0x464)],_0x275c2a=_0x3c401e[_0x3e264e(0x3e4)],_0x1a1bc9=this[_0x3e264e(0x9fd)](_0x2d9795),_0x5c881e=this[_0x3e264e(0x9fd)](_0x1d9596);return _0x275c2a[_0x3e264e(0x482)](_0x1a1bc9,_0x5c881e);},VisuMZ['CoreEngine'][_0x54167d(0x64d)]=ColorManager['loadWindowskin'],ColorManager['loadWindowskin']=function(){const _0xe8b6c9=_0x54167d;VisuMZ[_0xe8b6c9(0x940)][_0xe8b6c9(0x64d)][_0xe8b6c9(0x204)](this),this[_0xe8b6c9(0x961)]=this[_0xe8b6c9(0x961)]||{};},ColorManager[_0x54167d(0x731)]=function(_0x5ce7b9,_0x47ef59){const _0x448e4e=_0x54167d;return _0x47ef59=String(_0x47ef59),this[_0x448e4e(0x961)]=this['_colorCache']||{},_0x47ef59['match'](/#(.*)/i)?this[_0x448e4e(0x961)][_0x5ce7b9]='#%1'[_0x448e4e(0x482)](String(RegExp['$1'])):_0x448e4e(0x27f)===_0x448e4e(0x27f)?this[_0x448e4e(0x961)][_0x5ce7b9]=this['textColor'](Number(_0x47ef59)):_0x5e81aa('This\x20scene\x20cannot\x20utilize\x20a\x20Once\x20Parallel!'),this[_0x448e4e(0x961)][_0x5ce7b9];},ColorManager[_0x54167d(0x656)]=function(_0x3efaef){const _0x15fc4a=_0x54167d;return _0x3efaef=String(_0x3efaef),_0x3efaef[_0x15fc4a(0x59b)](/#(.*)/i)?_0x15fc4a(0x35e)[_0x15fc4a(0x482)](String(RegExp['$1'])):this[_0x15fc4a(0x423)](Number(_0x3efaef));},ColorManager[_0x54167d(0x5f2)]=function(){this['_colorCache']={};},ColorManager['normalColor']=function(){const _0x1c3702=_0x54167d,_0x2fd0ed=_0x1c3702(0x560);this[_0x1c3702(0x961)]=this[_0x1c3702(0x961)]||{};if(this[_0x1c3702(0x961)][_0x2fd0ed])return this[_0x1c3702(0x961)][_0x2fd0ed];const _0x2e6564=VisuMZ[_0x1c3702(0x940)][_0x1c3702(0x331)][_0x1c3702(0x530)]['ColorNormal'];return this[_0x1c3702(0x731)](_0x2fd0ed,_0x2e6564);},ColorManager['systemColor']=function(){const _0x5aec6a=_0x54167d,_0x46ec8a=_0x5aec6a(0x485);this[_0x5aec6a(0x961)]=this[_0x5aec6a(0x961)]||{};if(this[_0x5aec6a(0x961)][_0x46ec8a])return this[_0x5aec6a(0x961)][_0x46ec8a];const _0x5152f8=VisuMZ[_0x5aec6a(0x940)][_0x5aec6a(0x331)]['Color']['ColorSystem'];return this[_0x5aec6a(0x731)](_0x46ec8a,_0x5152f8);},ColorManager['crisisColor']=function(){const _0x5114bc=_0x54167d,_0x42265f=_0x5114bc(0x85c);this[_0x5114bc(0x961)]=this[_0x5114bc(0x961)]||{};if(this[_0x5114bc(0x961)][_0x42265f])return this[_0x5114bc(0x961)][_0x42265f];const _0x292fdc=VisuMZ['CoreEngine'][_0x5114bc(0x331)][_0x5114bc(0x530)]['ColorCrisis'];return this[_0x5114bc(0x731)](_0x42265f,_0x292fdc);},ColorManager[_0x54167d(0x875)]=function(){const _0x213e62=_0x54167d,_0x2fbdfa=_0x213e62(0x567);this[_0x213e62(0x961)]=this[_0x213e62(0x961)]||{};if(this[_0x213e62(0x961)][_0x2fbdfa])return this[_0x213e62(0x961)][_0x2fbdfa];const _0x557539=VisuMZ[_0x213e62(0x940)][_0x213e62(0x331)]['Color'][_0x213e62(0x3c4)];return this[_0x213e62(0x731)](_0x2fbdfa,_0x557539);},ColorManager['gaugeBackColor']=function(){const _0x5612ff=_0x54167d,_0x13549e=_0x5612ff(0x50b);this['_colorCache']=this[_0x5612ff(0x961)]||{};if(this[_0x5612ff(0x961)][_0x13549e])return this[_0x5612ff(0x961)][_0x13549e];const _0xa15e93=VisuMZ[_0x5612ff(0x940)][_0x5612ff(0x331)][_0x5612ff(0x530)][_0x5612ff(0x379)];return this['getColorDataFromPluginParameters'](_0x13549e,_0xa15e93);},ColorManager[_0x54167d(0x5be)]=function(){const _0x19b7e5=_0x54167d,_0x325a3b=_0x19b7e5(0x6df);this['_colorCache']=this[_0x19b7e5(0x961)]||{};if(this['_colorCache'][_0x325a3b])return this[_0x19b7e5(0x961)][_0x325a3b];const _0x28e009=VisuMZ['CoreEngine']['Settings'][_0x19b7e5(0x530)][_0x19b7e5(0x86d)];return this[_0x19b7e5(0x731)](_0x325a3b,_0x28e009);},ColorManager[_0x54167d(0x2ab)]=function(){const _0x231442=_0x54167d,_0x4f7d05=_0x231442(0x484);this['_colorCache']=this[_0x231442(0x961)]||{};if(this[_0x231442(0x961)][_0x4f7d05])return this[_0x231442(0x961)][_0x4f7d05];const _0xd9e62f=VisuMZ[_0x231442(0x940)][_0x231442(0x331)][_0x231442(0x530)][_0x231442(0x50a)];return this['getColorDataFromPluginParameters'](_0x4f7d05,_0xd9e62f);},ColorManager[_0x54167d(0x95f)]=function(){const _0x272f29=_0x54167d,_0x148373=_0x272f29(0x714);this[_0x272f29(0x961)]=this[_0x272f29(0x961)]||{};if(this[_0x272f29(0x961)][_0x148373])return this['_colorCache'][_0x148373];const _0x40aef7=VisuMZ[_0x272f29(0x940)][_0x272f29(0x331)][_0x272f29(0x530)]['ColorMPGauge1'];return this[_0x272f29(0x731)](_0x148373,_0x40aef7);},ColorManager[_0x54167d(0x96d)]=function(){const _0x99260a=_0x54167d,_0x51157f='_stored_mpGaugeColor2';this[_0x99260a(0x961)]=this[_0x99260a(0x961)]||{};if(this['_colorCache'][_0x51157f])return this['_colorCache'][_0x51157f];const _0x2b67b0=VisuMZ['CoreEngine']['Settings']['Color'][_0x99260a(0x847)];return this['getColorDataFromPluginParameters'](_0x51157f,_0x2b67b0);},ColorManager['mpCostColor']=function(){const _0xacc995=_0x54167d,_0x16d27a=_0xacc995(0x395);this['_colorCache']=this['_colorCache']||{};if(this[_0xacc995(0x961)][_0x16d27a])return this[_0xacc995(0x961)][_0x16d27a];const _0x211ae9=VisuMZ[_0xacc995(0x940)]['Settings'][_0xacc995(0x530)][_0xacc995(0x96a)];return this[_0xacc995(0x731)](_0x16d27a,_0x211ae9);},ColorManager[_0x54167d(0x5d5)]=function(){const _0x4d61b3=_0x54167d,_0x52ff54=_0x4d61b3(0x3c5);this['_colorCache']=this[_0x4d61b3(0x961)]||{};if(this['_colorCache'][_0x52ff54])return this[_0x4d61b3(0x961)][_0x52ff54];const _0x4de8a3=VisuMZ['CoreEngine']['Settings'][_0x4d61b3(0x530)][_0x4d61b3(0x5e6)];return this['getColorDataFromPluginParameters'](_0x52ff54,_0x4de8a3);},ColorManager[_0x54167d(0x77b)]=function(){const _0x54be6e=_0x54167d,_0x370178=_0x54be6e(0x909);this['_colorCache']=this['_colorCache']||{};if(this['_colorCache'][_0x370178])return this[_0x54be6e(0x961)][_0x370178];const _0x2a7db3=VisuMZ['CoreEngine'][_0x54be6e(0x331)]['Color'][_0x54be6e(0x78b)];return this[_0x54be6e(0x731)](_0x370178,_0x2a7db3);},ColorManager[_0x54167d(0x414)]=function(){const _0x1bca77=_0x54167d,_0xf1498d=_0x1bca77(0x860);this[_0x1bca77(0x961)]=this[_0x1bca77(0x961)]||{};if(this['_colorCache'][_0xf1498d])return this[_0x1bca77(0x961)][_0xf1498d];const _0x1b4bb5=VisuMZ['CoreEngine'][_0x1bca77(0x331)][_0x1bca77(0x530)][_0x1bca77(0x45d)];return this['getColorDataFromPluginParameters'](_0xf1498d,_0x1b4bb5);},ColorManager[_0x54167d(0x4d4)]=function(){const _0x19419f=_0x54167d,_0x4609c4='_stored_ctGaugeColor2';this[_0x19419f(0x961)]=this[_0x19419f(0x961)]||{};if(this[_0x19419f(0x961)][_0x4609c4])return this[_0x19419f(0x961)][_0x4609c4];const _0x325d0d=VisuMZ[_0x19419f(0x940)][_0x19419f(0x331)][_0x19419f(0x530)]['ColorCTGauge2'];return this['getColorDataFromPluginParameters'](_0x4609c4,_0x325d0d);},ColorManager[_0x54167d(0x749)]=function(){const _0x1575b7=_0x54167d,_0x59e5fb=_0x1575b7(0x959);this['_colorCache']=this[_0x1575b7(0x961)]||{};if(this[_0x1575b7(0x961)][_0x59e5fb])return this[_0x1575b7(0x961)][_0x59e5fb];const _0x4390c1=VisuMZ[_0x1575b7(0x940)][_0x1575b7(0x331)][_0x1575b7(0x530)][_0x1575b7(0x392)];return this[_0x1575b7(0x731)](_0x59e5fb,_0x4390c1);},ColorManager[_0x54167d(0x6ba)]=function(){const _0x3624fb=_0x54167d,_0x1cec54=_0x3624fb(0x32a);this[_0x3624fb(0x961)]=this['_colorCache']||{};if(this[_0x3624fb(0x961)][_0x1cec54])return this[_0x3624fb(0x961)][_0x1cec54];const _0x5aa55d=VisuMZ[_0x3624fb(0x940)][_0x3624fb(0x331)][_0x3624fb(0x530)][_0x3624fb(0x3ff)];return this['getColorDataFromPluginParameters'](_0x1cec54,_0x5aa55d);},ColorManager[_0x54167d(0x216)]=function(){const _0x459ce8=_0x54167d,_0x4cf1eb='_stored_tpCostColor';this[_0x459ce8(0x961)]=this['_colorCache']||{};if(this[_0x459ce8(0x961)][_0x4cf1eb])return this[_0x459ce8(0x961)][_0x4cf1eb];const _0x18383b=VisuMZ['CoreEngine'][_0x459ce8(0x331)][_0x459ce8(0x530)][_0x459ce8(0x7df)];return this['getColorDataFromPluginParameters'](_0x4cf1eb,_0x18383b);},ColorManager['pendingColor']=function(){const _0x432ddf=_0x54167d,_0x13257c=_0x432ddf(0x29d);this[_0x432ddf(0x961)]=this[_0x432ddf(0x961)]||{};if(this[_0x432ddf(0x961)][_0x13257c])return this[_0x432ddf(0x961)][_0x13257c];const _0x32068b=VisuMZ[_0x432ddf(0x940)][_0x432ddf(0x331)][_0x432ddf(0x530)][_0x432ddf(0x7df)];return this[_0x432ddf(0x731)](_0x13257c,_0x32068b);},ColorManager[_0x54167d(0x491)]=function(){const _0x27e254=_0x54167d,_0x9f8f73=_0x27e254(0x5ca);this[_0x27e254(0x961)]=this[_0x27e254(0x961)]||{};if(this[_0x27e254(0x961)][_0x9f8f73])return this[_0x27e254(0x961)][_0x9f8f73];const _0x16973b=VisuMZ[_0x27e254(0x940)][_0x27e254(0x331)][_0x27e254(0x530)][_0x27e254(0x30a)];return this[_0x27e254(0x731)](_0x9f8f73,_0x16973b);},ColorManager[_0x54167d(0x520)]=function(){const _0x480eb6=_0x54167d,_0x4b5d00=_0x480eb6(0xa0b);this[_0x480eb6(0x961)]=this[_0x480eb6(0x961)]||{};if(this[_0x480eb6(0x961)][_0x4b5d00])return this[_0x480eb6(0x961)][_0x4b5d00];const _0x586a5a=VisuMZ['CoreEngine'][_0x480eb6(0x331)]['Color']['ColorExpGauge2'];return this[_0x480eb6(0x731)](_0x4b5d00,_0x586a5a);},ColorManager[_0x54167d(0x6a7)]=function(){const _0x3f84e2=_0x54167d,_0x11f0e0=_0x3f84e2(0x3c8);this['_colorCache']=this[_0x3f84e2(0x961)]||{};if(this['_colorCache'][_0x11f0e0])return this[_0x3f84e2(0x961)][_0x11f0e0];const _0x2edc64=VisuMZ[_0x3f84e2(0x940)][_0x3f84e2(0x331)][_0x3f84e2(0x530)][_0x3f84e2(0x30b)];return this[_0x3f84e2(0x731)](_0x11f0e0,_0x2edc64);},ColorManager['maxLvGaugeColor2']=function(){const _0x1c6433=_0x54167d,_0xe07ec8=_0x1c6433(0x5b1);this[_0x1c6433(0x961)]=this['_colorCache']||{};if(this[_0x1c6433(0x961)][_0xe07ec8])return this['_colorCache'][_0xe07ec8];const _0x2d94c5=VisuMZ['CoreEngine'][_0x1c6433(0x331)][_0x1c6433(0x530)]['ColorMaxLvGauge2'];return this[_0x1c6433(0x731)](_0xe07ec8,_0x2d94c5);},ColorManager[_0x54167d(0x4d8)]=function(_0x5e1009){const _0x4c0120=_0x54167d;return VisuMZ[_0x4c0120(0x940)]['Settings'][_0x4c0120(0x530)]['ActorHPColor'][_0x4c0120(0x204)](this,_0x5e1009);},ColorManager['mpColor']=function(_0x4322fc){const _0x21d1f0=_0x54167d;return VisuMZ[_0x21d1f0(0x940)][_0x21d1f0(0x331)]['Color'][_0x21d1f0(0x26f)][_0x21d1f0(0x204)](this,_0x4322fc);},ColorManager[_0x54167d(0x313)]=function(_0x11499c){const _0x5c84a1=_0x54167d;return VisuMZ[_0x5c84a1(0x940)]['Settings'][_0x5c84a1(0x530)][_0x5c84a1(0x506)][_0x5c84a1(0x204)](this,_0x11499c);},ColorManager[_0x54167d(0x661)]=function(_0x2840e3){const _0x115504=_0x54167d;return VisuMZ[_0x115504(0x940)]['Settings']['Color']['ParamChange'][_0x115504(0x204)](this,_0x2840e3);},ColorManager[_0x54167d(0x2db)]=function(_0x5b5019){const _0x399b12=_0x54167d;return VisuMZ[_0x399b12(0x940)][_0x399b12(0x331)][_0x399b12(0x530)]['DamageColor'][_0x399b12(0x204)](this,_0x5b5019);},ColorManager[_0x54167d(0x431)]=function(){const _0x57a778=_0x54167d;return VisuMZ['CoreEngine'][_0x57a778(0x331)][_0x57a778(0x530)][_0x57a778(0x2f7)];},ColorManager[_0x54167d(0x403)]=function(){const _0x3959c1=_0x54167d;return VisuMZ['CoreEngine'][_0x3959c1(0x331)]['Color']['OutlineColorDmg']||_0x3959c1(0x290);},ColorManager[_0x54167d(0x249)]=function(){const _0x45ad87=_0x54167d;return VisuMZ['CoreEngine'][_0x45ad87(0x331)][_0x45ad87(0x530)][_0x45ad87(0x34f)]||_0x45ad87(0x3c3);},ColorManager[_0x54167d(0x2f2)]=function(){const _0xb8b4c6=_0x54167d;return VisuMZ[_0xb8b4c6(0x940)][_0xb8b4c6(0x331)]['Color'][_0xb8b4c6(0x972)];},ColorManager['dimColor2']=function(){const _0x183a2d=_0x54167d;return VisuMZ[_0x183a2d(0x940)][_0x183a2d(0x331)][_0x183a2d(0x530)][_0x183a2d(0x7ff)];},ColorManager['itemBackColor1']=function(){const _0x1ef015=_0x54167d;return VisuMZ['CoreEngine']['Settings']['Color'][_0x1ef015(0x5d7)];},ColorManager[_0x54167d(0x48f)]=function(){const _0x4dbdbf=_0x54167d;return VisuMZ['CoreEngine'][_0x4dbdbf(0x331)][_0x4dbdbf(0x530)]['ItemBackColor2'];},SceneManager[_0x54167d(0x256)]=[],SceneManager[_0x54167d(0x94d)]=function(){const _0x3d15fb=_0x54167d;return this[_0x3d15fb(0x4ce)]&&this[_0x3d15fb(0x4ce)][_0x3d15fb(0x4a9)]===Scene_Battle;},SceneManager[_0x54167d(0x8c0)]=function(){const _0x8051bd=_0x54167d;return this[_0x8051bd(0x4ce)]&&this[_0x8051bd(0x4ce)][_0x8051bd(0x4a9)]===Scene_Map;},SceneManager[_0x54167d(0x9fe)]=function(){const _0xe0b53f=_0x54167d;return this[_0xe0b53f(0x4ce)]&&this[_0xe0b53f(0x4ce)]instanceof Scene_Map;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x59c)]=SceneManager[_0x54167d(0x8d7)],SceneManager[_0x54167d(0x8d7)]=function(){const _0xbda408=_0x54167d;VisuMZ[_0xbda408(0x940)][_0xbda408(0x59c)][_0xbda408(0x204)](this),this[_0xbda408(0x58d)]();},VisuMZ['CoreEngine'][_0x54167d(0x218)]=SceneManager['onKeyDown'],SceneManager[_0x54167d(0x8d3)]=function(_0x53d026){const _0x28b1b0=_0x54167d;if($gameTemp)this[_0x28b1b0(0x70f)](_0x53d026);VisuMZ[_0x28b1b0(0x940)]['SceneManager_onKeyDown']['call'](this,_0x53d026);},SceneManager[_0x54167d(0x70f)]=function(_0x51d92b){const _0x2d2a0b=_0x54167d;if(!_0x51d92b[_0x2d2a0b(0x3b7)]&&!_0x51d92b[_0x2d2a0b(0x71e)])switch(_0x51d92b[_0x2d2a0b(0x6e5)]){case 0x54:this['playTestCtrlT']();break;case 0x75:this[_0x2d2a0b(0x6d5)]();break;case 0x76:if(Input[_0x2d2a0b(0x7d2)](_0x2d2a0b(0x843))||Input[_0x2d2a0b(0x7d2)]('ctrl'))return;this['playTestF7']();break;}},SceneManager[_0x54167d(0x6d5)]=function(){const _0x59be71=_0x54167d;if($gameTemp[_0x59be71(0x562)]()&&VisuMZ[_0x59be71(0x940)][_0x59be71(0x331)][_0x59be71(0x2e9)][_0x59be71(0x2a6)]){ConfigManager[_0x59be71(0x9e9)]!==0x0?(ConfigManager[_0x59be71(0x2fe)]=0x0,ConfigManager[_0x59be71(0x9fa)]=0x0,ConfigManager['meVolume']=0x0,ConfigManager['seVolume']=0x0):(ConfigManager['bgmVolume']=0x64,ConfigManager[_0x59be71(0x9fa)]=0x64,ConfigManager[_0x59be71(0x2f1)]=0x64,ConfigManager['seVolume']=0x64);ConfigManager[_0x59be71(0x300)]();if(this[_0x59be71(0x4ce)][_0x59be71(0x4a9)]===Scene_Options){if(_0x59be71(0x5b5)==='nMUpV'){if(_0x3bf4e8)_0x26b8ca['ParseWeaponNotetags'](_0x3d55af);}else{if(this[_0x59be71(0x4ce)][_0x59be71(0x866)])this[_0x59be71(0x4ce)]['_optionsWindow'][_0x59be71(0x7dd)]();if(this[_0x59be71(0x4ce)][_0x59be71(0x45c)])this['_scene'][_0x59be71(0x45c)]['refresh']();}}}},SceneManager[_0x54167d(0x453)]=function(){const _0x1d19d7=_0x54167d;$gameTemp['isPlaytest']()&&VisuMZ[_0x1d19d7(0x940)][_0x1d19d7(0x331)][_0x1d19d7(0x2e9)][_0x1d19d7(0x7c6)]&&($gameTemp['_playTestFastMode']=!$gameTemp[_0x1d19d7(0x542)]);},SceneManager[_0x54167d(0x2b3)]=function(){const _0x4d1bce=_0x54167d;if(!$gameTemp[_0x4d1bce(0x562)]())return;if(!SceneManager[_0x4d1bce(0x94d)]())return;for(const _0x13ff7b of $gameParty[_0x4d1bce(0x451)]()){if(!_0x13ff7b)continue;_0x13ff7b[_0x4d1bce(0x27b)](_0x13ff7b[_0x4d1bce(0x884)]());}},SceneManager[_0x54167d(0x58d)]=function(){const _0x304201=_0x54167d;this[_0x304201(0x4c0)]=![],this[_0x304201(0x1ff)]=!VisuMZ[_0x304201(0x940)]['Settings']['UI'][_0x304201(0x28a)];},SceneManager[_0x54167d(0x87d)]=function(_0x399041){const _0x159f5b=_0x54167d;VisuMZ[_0x159f5b(0x940)][_0x159f5b(0x331)]['UI']['SideButtons']&&(this[_0x159f5b(0x4c0)]=_0x399041);},SceneManager[_0x54167d(0x8ef)]=function(){const _0x51dc95=_0x54167d;return this[_0x51dc95(0x4c0)];},SceneManager[_0x54167d(0x8a4)]=function(){const _0x5ad746=_0x54167d;return this[_0x5ad746(0x1ff)];},SceneManager[_0x54167d(0x3b4)]=function(){const _0x42a46b=_0x54167d;return this['areButtonsHidden']()||this[_0x42a46b(0x8ef)]();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x5bb)]=SceneManager[_0x54167d(0x2f5)],SceneManager[_0x54167d(0x2f5)]=function(){const _0x8e48c7=_0x54167d;return VisuMZ[_0x8e48c7(0x940)][_0x8e48c7(0x331)]['QoL']['RequireFocus']?VisuMZ[_0x8e48c7(0x940)][_0x8e48c7(0x5bb)][_0x8e48c7(0x204)](this):'uHlLE'==='uHlLE'?!![]:0x1;},SceneManager[_0x54167d(0x3df)]=function(_0xc1e5ca){const _0x42b864=_0x54167d;if(_0xc1e5ca instanceof Error)_0x42b864(0x9ac)!==_0x42b864(0x550)?this['catchNormalError'](_0xc1e5ca):this[_0x42b864(0x433)](0x0);else{if(_0xc1e5ca instanceof Array&&_0xc1e5ca[0x0]==='LoadError'){if(_0x42b864(0x6fd)!==_0x42b864(0x6fd))return _0x234717[_0x42b864(0x940)]['CustomParamNames'][_0x1be010];else this[_0x42b864(0x96e)](_0xc1e5ca);}else this['catchUnknownError'](_0xc1e5ca);}this[_0x42b864(0x8cd)]();},VisuMZ['CoreEngine'][_0x54167d(0x5f3)]=BattleManager[_0x54167d(0x6c5)],BattleManager[_0x54167d(0x6c5)]=function(){const _0x1446a2=_0x54167d;if(VisuMZ[_0x1446a2(0x940)][_0x1446a2(0x331)][_0x1446a2(0x2e9)][_0x1446a2(0x62d)]){if(_0x1446a2(0x817)===_0x1446a2(0x817))this[_0x1446a2(0x828)]();else return 0x0;}else return VisuMZ[_0x1446a2(0x940)][_0x1446a2(0x5f3)]['call'](this);},BattleManager[_0x54167d(0x828)]=function(){const _0x5c5564=_0x54167d;return $gameParty[_0x5c5564(0x3f1)](),SoundManager[_0x5c5564(0x31f)](),this[_0x5c5564(0x856)](),!![];},BattleManager[_0x54167d(0x9fb)]=function(){const _0x390f61=_0x54167d;return $gameSystem[_0x390f61(0x9bc)]()>=0x1;},BattleManager[_0x54167d(0x706)]=function(){const _0x2c53d9=_0x54167d;return $gameSystem[_0x2c53d9(0x9bc)]()===0x1;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x7fd)]=Game_Temp['prototype'][_0x54167d(0x8d7)],Game_Temp['prototype']['initialize']=function(){const _0x191997=_0x54167d;VisuMZ[_0x191997(0x940)][_0x191997(0x7fd)]['call'](this),this[_0x191997(0x289)](),this['createFauxAnimationQueue'](),this[_0x191997(0x5eb)]();},Game_Temp['prototype'][_0x54167d(0x289)]=function(){const _0x592682=_0x54167d;VisuMZ[_0x592682(0x940)][_0x592682(0x331)]['QoL'][_0x592682(0x1f2)]&&(this[_0x592682(0x5f9)]=![]);},Game_Temp[_0x54167d(0x4ec)]['setLastPluginCommandInterpreter']=function(_0x20da50){const _0xb5507b=_0x54167d;this[_0xb5507b(0x734)]=_0x20da50;},Game_Temp['prototype'][_0x54167d(0x2ca)]=function(){const _0xc78194=_0x54167d;return this[_0xc78194(0x734)];},Game_Temp['prototype'][_0x54167d(0x3d6)]=function(){const _0x3981b5=_0x54167d;this[_0x3981b5(0x7b8)]=undefined,this['_forcedBattleSys']=undefined;},Game_Temp[_0x54167d(0x4ec)][_0x54167d(0x76b)]=function(_0x2a6e5a){const _0x3a2c2f=_0x54167d;$gameMap&&$dataMap&&$dataMap[_0x3a2c2f(0x31a)]&&this['parseForcedGameTroopSettingsCoreEngine']($dataMap[_0x3a2c2f(0x31a)]);const _0xf89f82=$dataTroops[_0x2a6e5a];if(_0xf89f82){if(_0x3a2c2f(0x78f)!==_0x3a2c2f(0x880)){let _0x545207=DataManager[_0x3a2c2f(0x910)](_0xf89f82['id']);this[_0x3a2c2f(0x58a)](_0x545207);}else{const _0x15e896=_0x53dcec[_0x19e6bd];_0x15e896[_0x3a2c2f(0x614)][_0x3a2c2f(0x59b)](/(.*)\/(.*)/i)&&(_0x15e896[_0x3a2c2f(0x614)]=_0x4ac54c(_0x479f7a['$2']['trim']()));}}},Game_Temp[_0x54167d(0x4ec)][_0x54167d(0x58a)]=function(_0x458665){const _0x3e2a4e=_0x54167d;if(!_0x458665)return;if(_0x458665[_0x3e2a4e(0x59b)](/<(?:FRONTVIEW|FRONT VIEW|FV)>/i))this['_forcedTroopView']='FV';else{if(_0x458665[_0x3e2a4e(0x59b)](/<(?:SIDEVIEW|SIDE VIEW|SV)>/i))this[_0x3e2a4e(0x7b8)]='SV';else{if(_0x458665[_0x3e2a4e(0x59b)](/<(?:BATTLEVIEW|BATTLE VIEW):[ ](.*)>/i)){const _0x2ebde=String(RegExp['$1']);if(_0x2ebde[_0x3e2a4e(0x59b)](/(?:FRONTVIEW|FRONT VIEW|FV)/i))_0x3e2a4e(0x758)!==_0x3e2a4e(0x4a3)?this[_0x3e2a4e(0x7b8)]='FV':_0x33cf44['prototype'][_0x3e2a4e(0x430)][_0x3e2a4e(0x204)](this);else{if(_0x2ebde[_0x3e2a4e(0x59b)](/(?:SIDEVIEW|SIDE VIEW|SV)/i)){if('pMPKH'===_0x3e2a4e(0x52a))return _0x56cbe5['layoutSettings']['StatusRect'][_0x3e2a4e(0x204)](this);else this[_0x3e2a4e(0x7b8)]='SV';}}}}}if(_0x458665[_0x3e2a4e(0x59b)](/<(?:DTB)>/i))this[_0x3e2a4e(0x698)]=0x0;else{if(_0x458665['match'](/<(?:TPB|ATB)[ ]ACTIVE>/i))this[_0x3e2a4e(0x698)]=0x1;else{if(_0x458665['match'](/<(?:TPB|ATB)[ ]WAIT>/i))this[_0x3e2a4e(0x698)]=0x2;else{if(_0x458665['match'](/<(?:CTB)>/i))'jVEiE'===_0x3e2a4e(0x3ec)?Imported[_0x3e2a4e(0x285)]&&(this[_0x3e2a4e(0x698)]=_0x3e2a4e(0x9f3)):this['setViewportCoreEngineFix'](_0xae1a42);else{if(_0x458665['match'](/<(?:STB)>/i))Imported[_0x3e2a4e(0x448)]&&(this[_0x3e2a4e(0x698)]=_0x3e2a4e(0x470));else{if(_0x458665[_0x3e2a4e(0x59b)](/<(?:BTB)>/i)){if(_0x3e2a4e(0x7d4)!==_0x3e2a4e(0x7d4))return _0x53bfc7['CoreEngine'][_0x3e2a4e(0x331)][_0x3e2a4e(0x529)][_0x3e2a4e(0x3a7)][_0x3e2a4e(0x41a)][_0x3e2a4e(0x204)](this);else Imported[_0x3e2a4e(0x721)]&&(_0x3e2a4e(0x99b)!==_0x3e2a4e(0x99b)?(_0x2aa038['CoreEngine'][_0x3e2a4e(0x90f)][_0x3e2a4e(0x204)](this),this[_0x3e2a4e(0x8d9)]()):this['_forcedBattleSys']=_0x3e2a4e(0x9aa));}else{if(_0x458665[_0x3e2a4e(0x59b)](/<(?:FTB)>/i)){if(_0x3e2a4e(0x639)===_0x3e2a4e(0x639))Imported[_0x3e2a4e(0x4e7)]&&(this['_forcedBattleSys']=_0x3e2a4e(0x39a));else return _0x2a5746[_0x3e2a4e(0x556)][_0x3e2a4e(0x68d)][_0x3e2a4e(0x204)](this);}else{if(_0x458665[_0x3e2a4e(0x59b)](/<(?:OTB)>/i))Imported[_0x3e2a4e(0x296)]&&(this['_forcedBattleSys']='OTB');else{if(_0x458665[_0x3e2a4e(0x59b)](/<(?:ETB)>/i)){if(Imported['VisuMZ_2_BattleSystemETB']){if(_0x3e2a4e(0x57e)!==_0x3e2a4e(0x45e))this[_0x3e2a4e(0x698)]=_0x3e2a4e(0x965);else{const _0x5da744=_0x3e2a4e(0x5b1);this['_colorCache']=this[_0x3e2a4e(0x961)]||{};if(this[_0x3e2a4e(0x961)][_0x5da744])return this['_colorCache'][_0x5da744];const _0x2c2599=_0x3483de['CoreEngine']['Settings'][_0x3e2a4e(0x530)][_0x3e2a4e(0x68e)];return this[_0x3e2a4e(0x731)](_0x5da744,_0x2c2599);}}}else{if(_0x458665['match'](/<(?:PTB)>/i))'lCdja'===_0x3e2a4e(0x994)?_0x9f357e[_0x3e2a4e(0x4e7)]&&(this[_0x3e2a4e(0x698)]=_0x3e2a4e(0x39a)):Imported[_0x3e2a4e(0x3fd)]&&(this[_0x3e2a4e(0x698)]=_0x3e2a4e(0x92c));else{if(_0x458665['match'](/<(?:BATTLEVIEW|BATTLE VIEW):[ ](.*)>/i)){const _0x3ceaba=String(RegExp['$1']);if(_0x3ceaba['match'](/DTB/i))_0x3e2a4e(0x56c)==='evrfa'?this['playCursorSound']():this['_forcedBattleSys']=0x0;else{if(_0x3ceaba[_0x3e2a4e(0x59b)](/(?:TPB|ATB)[ ]ACTIVE/i))this[_0x3e2a4e(0x698)]=0x1;else{if(_0x3ceaba[_0x3e2a4e(0x59b)](/(?:TPB|ATB)[ ]WAIT/i))this[_0x3e2a4e(0x698)]=0x2;else{if(_0x3ceaba[_0x3e2a4e(0x59b)](/CTB/i)){if(_0x3e2a4e(0x4fb)!==_0x3e2a4e(0x4fb)){if(_0x259513[_0x3e2a4e(0x698)]!==_0x30a919)return _0x598391[_0x3e2a4e(0x698)];if(this[_0x3e2a4e(0x6af)]===_0x40d426)this['initCoreEngine']();if(this['_CoreEngineSettings']['BattleSystem']===_0x4479d6)this['resetBattleSystem']();return this['_CoreEngineSettings']['BattleSystem'];}else Imported['VisuMZ_2_BattleSystemCTB']&&(this[_0x3e2a4e(0x698)]=_0x3e2a4e(0x9f3));}else{if(_0x3ceaba['match'](/STB/i)){if(Imported[_0x3e2a4e(0x448)]){if(_0x3e2a4e(0x6d3)!==_0x3e2a4e(0x87f))this[_0x3e2a4e(0x698)]=_0x3e2a4e(0x470);else{if(this[_0x3e2a4e(0x4ea)]===_0x5a40d0)this['setupCoreEngine']();return this[_0x3e2a4e(0x4ea)];}}}else{if(_0x3ceaba['match'](/BTB/i))Imported[_0x3e2a4e(0x721)]&&(this['_forcedBattleSys']=_0x3e2a4e(0x9aa));else{if(_0x3ceaba[_0x3e2a4e(0x59b)](/FTB/i))Imported[_0x3e2a4e(0x4e7)]&&(_0x3e2a4e(0x97b)!==_0x3e2a4e(0x97b)?_0x43a88a['isPlaytest']()&&(_0x184eb9[_0x3e2a4e(0x262)](_0x3e2a4e(0x27a)),_0x6c664[_0x3e2a4e(0x262)](_0x19c64d)):this[_0x3e2a4e(0x698)]=_0x3e2a4e(0x39a));else{if(_0x3ceaba[_0x3e2a4e(0x59b)](/OTB/i))_0x3e2a4e(0x86e)!==_0x3e2a4e(0x86e)?(this['_pageupButton']['x']=-0x1*(this[_0x3e2a4e(0x950)][_0x3e2a4e(0x281)]+this[_0x3e2a4e(0x54f)]['width']+0x8),this[_0x3e2a4e(0x54f)]['x']=-0x1*(this['_pagedownButton'][_0x3e2a4e(0x281)]+0x4)):Imported[_0x3e2a4e(0x296)]&&(this[_0x3e2a4e(0x698)]=_0x3e2a4e(0x332));else{if(_0x3ceaba[_0x3e2a4e(0x59b)](/ETB/i))_0x3e2a4e(0x7af)!==_0x3e2a4e(0x602)?Imported[_0x3e2a4e(0x80b)]&&(_0x3e2a4e(0x355)!==_0x3e2a4e(0x355)?this['switchModes'](_0x3e2a4e(0x646)):this[_0x3e2a4e(0x698)]=_0x3e2a4e(0x965)):this[_0x3e2a4e(0x433)](-0x1);else _0x3ceaba[_0x3e2a4e(0x59b)](/PTB/i)&&(Imported[_0x3e2a4e(0x3fd)]&&('tZQkA'!=='tZQkA'?this['_listWindow'][_0x3e2a4e(0x6d0)](_0x281222[_0x3e2a4e(0x556)][_0x3e2a4e(0x9bd)]):this[_0x3e2a4e(0x698)]='PTB'));}}}}}}}}}}}}}}}}}}}},Game_Temp[_0x54167d(0x4ec)]['createFauxAnimationQueue']=function(){const _0xdbe9d1=_0x54167d;this[_0xdbe9d1(0x532)]=[];},Game_Temp['prototype'][_0x54167d(0x64c)]=function(_0x13222c,_0x1ee8a3,_0x5aa329,_0x40556d){const _0x175236=_0x54167d;if(!this['showFauxAnimations']())return;_0x5aa329=_0x5aa329||![],_0x40556d=_0x40556d||![];if($dataAnimations[_0x1ee8a3]){const _0x5c4ccb={'targets':_0x13222c,'animationId':_0x1ee8a3,'mirror':_0x5aa329,'mute':_0x40556d};this['_fauxAnimationQueue']['push'](_0x5c4ccb);for(const _0x2901df of _0x13222c){_0x2901df[_0x175236(0x490)]&&_0x2901df[_0x175236(0x490)]();}}},Game_Temp[_0x54167d(0x4ec)][_0x54167d(0x9d4)]=function(){return!![];},Game_Temp[_0x54167d(0x4ec)][_0x54167d(0x44f)]=function(){const _0x111705=_0x54167d;return this[_0x111705(0x532)]['shift']();},Game_Temp[_0x54167d(0x4ec)][_0x54167d(0x5eb)]=function(){const _0xe2dd3=_0x54167d;this[_0xe2dd3(0x89e)]=[];},Game_Temp[_0x54167d(0x4ec)]['requestPointAnimation']=function(_0x29f923,_0x498cd4,_0x27e29c,_0xe48697,_0x34f2a7){const _0x4ff748=_0x54167d;if(!this[_0x4ff748(0x371)]())return;_0xe48697=_0xe48697||![],_0x34f2a7=_0x34f2a7||![];if($dataAnimations[_0x27e29c]){const _0x1510f4={'x':_0x29f923,'y':_0x498cd4,'animationId':_0x27e29c,'mirror':_0xe48697,'mute':_0x34f2a7};this[_0x4ff748(0x89e)]['push'](_0x1510f4);}},Game_Temp[_0x54167d(0x4ec)]['showPointAnimations']=function(){return!![];},Game_Temp[_0x54167d(0x4ec)]['retrievePointAnimation']=function(){const _0x57672d=_0x54167d;return this['_pointAnimationQueue'][_0x57672d(0x843)]();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x99f)]=Game_System['prototype'][_0x54167d(0x8d7)],Game_System[_0x54167d(0x4ec)][_0x54167d(0x8d7)]=function(){const _0x1ca701=_0x54167d;VisuMZ[_0x1ca701(0x940)][_0x1ca701(0x99f)][_0x1ca701(0x204)](this),this[_0x1ca701(0x55b)]();},Game_System['prototype']['initCoreEngine']=function(){const _0x50fee6=_0x54167d;this['_CoreEngineSettings']={'SideView':$dataSystem[_0x50fee6(0x261)],'BattleSystem':this[_0x50fee6(0x272)](),'FontSize':$dataSystem['advanced'][_0x50fee6(0x79f)],'Padding':0xc};},Game_System[_0x54167d(0x4ec)]['isSideView']=function(){const _0x5d2b0e=_0x54167d;if($gameTemp[_0x5d2b0e(0x7b8)]==='SV'){if(_0x5d2b0e(0x311)==='iIvPx')return!![];else{var _0x1b570d=_0x21144a(_0x11c713['$1']);_0x44118e+=_0x1b570d;}}else{if($gameTemp['_forcedTroopView']==='FV')return![];}if(this[_0x5d2b0e(0x6af)]===undefined)this[_0x5d2b0e(0x55b)]();if(this['_CoreEngineSettings'][_0x5d2b0e(0x861)]===undefined)this[_0x5d2b0e(0x55b)]();return this[_0x5d2b0e(0x6af)]['SideView'];},Game_System[_0x54167d(0x4ec)][_0x54167d(0x8ac)]=function(_0x5c7647){const _0x20b9a6=_0x54167d;if(this[_0x20b9a6(0x6af)]===undefined)this[_0x20b9a6(0x55b)]();if(this[_0x20b9a6(0x6af)][_0x20b9a6(0x861)]===undefined)this[_0x20b9a6(0x55b)]();this['_CoreEngineSettings'][_0x20b9a6(0x861)]=_0x5c7647;},Game_System[_0x54167d(0x4ec)][_0x54167d(0x8aa)]=function(){const _0x46668f=_0x54167d;if(this[_0x46668f(0x6af)]===undefined)this['initCoreEngine']();this['_CoreEngineSettings'][_0x46668f(0x5c6)]=this['initialBattleSystem']();},Game_System[_0x54167d(0x4ec)][_0x54167d(0x272)]=function(){const _0x37e36f=_0x54167d,_0x14a5ca=(VisuMZ[_0x37e36f(0x940)]['Settings'][_0x37e36f(0x5c6)]||'DATABASE')['toUpperCase']()[_0x37e36f(0x314)]();return VisuMZ['CoreEngine']['CreateBattleSystemID'](_0x14a5ca);},Game_System['prototype'][_0x54167d(0x9bc)]=function(){const _0x1f81a7=_0x54167d;if($gameTemp['_forcedBattleSys']!==undefined)return $gameTemp[_0x1f81a7(0x698)];if(this[_0x1f81a7(0x6af)]===undefined)this[_0x1f81a7(0x55b)]();if(this['_CoreEngineSettings'][_0x1f81a7(0x5c6)]===undefined)this[_0x1f81a7(0x8aa)]();return this['_CoreEngineSettings']['BattleSystem'];},Game_System['prototype'][_0x54167d(0x59d)]=function(_0x54d5f6){const _0x1bd928=_0x54167d;if(this[_0x1bd928(0x6af)]===undefined)this[_0x1bd928(0x55b)]();if(this[_0x1bd928(0x6af)][_0x1bd928(0x5c6)]===undefined)this[_0x1bd928(0x8aa)]();this['_CoreEngineSettings'][_0x1bd928(0x5c6)]=_0x54d5f6;},Game_System[_0x54167d(0x4ec)][_0x54167d(0x89c)]=function(){const _0x431f0c=_0x54167d;if(this[_0x431f0c(0x6af)]===undefined)this['initCoreEngine']();if(this['_CoreEngineSettings']['FontSize']===undefined)this[_0x431f0c(0x55b)]();return this[_0x431f0c(0x6af)]['FontSize'];},Game_System[_0x54167d(0x4ec)]['setMainFontSize']=function(_0x3b56b2){const _0x29e8de=_0x54167d;if(this[_0x29e8de(0x6af)]===undefined)this[_0x29e8de(0x55b)]();if(this[_0x29e8de(0x6af)]['TimeProgress']===undefined)this[_0x29e8de(0x55b)]();this[_0x29e8de(0x6af)][_0x29e8de(0x872)]=_0x3b56b2;},Game_System[_0x54167d(0x4ec)]['windowPadding']=function(){const _0x3035bb=_0x54167d;if(this['_CoreEngineSettings']===undefined)this[_0x3035bb(0x55b)]();if(this['_CoreEngineSettings']['Padding']===undefined)this[_0x3035bb(0x55b)]();return this['_CoreEngineSettings']['Padding'];},Game_System[_0x54167d(0x4ec)]['setWindowPadding']=function(_0x369332){const _0x4e9210=_0x54167d;if(this[_0x4e9210(0x6af)]===undefined)this['initCoreEngine']();if(this[_0x4e9210(0x6af)][_0x4e9210(0xa07)]===undefined)this[_0x4e9210(0x55b)]();this['_CoreEngineSettings']['Padding']=_0x369332;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x928)]=Game_Screen[_0x54167d(0x4ec)][_0x54167d(0x8d7)],Game_Screen['prototype'][_0x54167d(0x8d7)]=function(){VisuMZ['CoreEngine']['Game_Screen_initialize']['call'](this),this['initCoreEngineScreenShake']();},Game_Screen[_0x54167d(0x4ec)][_0x54167d(0x446)]=function(){const _0x4c9da4=_0x54167d,_0x268459=VisuMZ[_0x4c9da4(0x940)]['Settings'][_0x4c9da4(0x5c9)];this['_coreEngineShakeStyle']=_0x268459?.[_0x4c9da4(0x4fe)]||_0x4c9da4(0x206);},Game_Screen[_0x54167d(0x4ec)][_0x54167d(0x41f)]=function(){const _0xab4790=_0x54167d;if(this[_0xab4790(0x21d)]===undefined)this[_0xab4790(0x446)]();return this['_coreEngineShakeStyle'];},Game_Screen['prototype']['setCoreEngineScreenShakeStyle']=function(_0x438b51){const _0x1833de=_0x54167d;if(this[_0x1833de(0x21d)]===undefined)this[_0x1833de(0x446)]();this[_0x1833de(0x21d)]=_0x438b51[_0x1833de(0x6aa)]()['trim']();},Game_Picture[_0x54167d(0x4ec)][_0x54167d(0x235)]=function(){const _0x45031e=_0x54167d;if($gameParty[_0x45031e(0x540)]())return![];return this[_0x45031e(0x614)]()&&this[_0x45031e(0x614)]()[_0x45031e(0x607)](0x0)==='!';},VisuMZ[_0x54167d(0x940)]['Game_Picture_x']=Game_Picture[_0x54167d(0x4ec)]['x'],Game_Picture[_0x54167d(0x4ec)]['x']=function(){const _0x218370=_0x54167d;if(this[_0x218370(0x235)]())return this['xScrollLinkedOffset']();else{if('KCScy'===_0x218370(0x4fd))return VisuMZ[_0x218370(0x940)][_0x218370(0x7fb)][_0x218370(0x204)](this);else this['coreEngineRepositionEnemies']()&&this[_0x218370(0xa12)](),_0x3f1629[_0x218370(0x940)]['Spriteset_Battle_createEnemies'][_0x218370(0x204)](this);}},Game_Picture[_0x54167d(0x4ec)][_0x54167d(0x36c)]=function(){const _0x47bee0=_0x54167d,_0x22d38a=$gameMap[_0x47bee0(0x5ea)]()*$gameMap['tileWidth']();return this['_x']-_0x22d38a;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x3b1)]=Game_Picture[_0x54167d(0x4ec)]['y'],Game_Picture[_0x54167d(0x4ec)]['y']=function(){const _0x2fcf0b=_0x54167d;if(this[_0x2fcf0b(0x235)]()){if(_0x2fcf0b(0x500)!==_0x2fcf0b(0x500))this[_0x2fcf0b(0x46c)]();else return this[_0x2fcf0b(0x384)]();}else{if('CsZcv'===_0x2fcf0b(0x494))return VisuMZ[_0x2fcf0b(0x940)][_0x2fcf0b(0x3b1)][_0x2fcf0b(0x204)](this);else _0x4673d8[_0x2fcf0b(0x940)][_0x2fcf0b(0x920)][_0x2fcf0b(0x204)](this),_0x5b3e5d[_0x2fcf0b(0x6a3)]();}},Game_Picture[_0x54167d(0x4ec)][_0x54167d(0x384)]=function(){const _0x23bb8f=_0x54167d,_0x19a837=$gameMap[_0x23bb8f(0x922)]()*$gameMap['tileHeight']();return this['_y']-_0x19a837;},Game_Picture[_0x54167d(0x4ec)][_0x54167d(0xa18)]=function(_0x40bf05){this['_coreEasingType']=_0x40bf05;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x533)]=Game_Picture[_0x54167d(0x4ec)][_0x54167d(0x4f1)],Game_Picture[_0x54167d(0x4ec)]['calcEasing']=function(_0x45d58e){const _0x3285c4=_0x54167d;return this[_0x3285c4(0x72d)]=this[_0x3285c4(0x72d)]||0x0,[0x0,0x1,0x2,0x3][_0x3285c4(0x9ef)](this['_coreEasingType'])?VisuMZ[_0x3285c4(0x940)][_0x3285c4(0x533)][_0x3285c4(0x204)](this,_0x45d58e):VisuMZ[_0x3285c4(0x9d5)](_0x45d58e,this[_0x3285c4(0x72d)]);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x679)]=Game_Action['prototype'][_0x54167d(0x975)],Game_Action[_0x54167d(0x4ec)]['itemHit']=function(_0xdf2e61){const _0x5a5dcd=_0x54167d;if(VisuMZ['CoreEngine'][_0x5a5dcd(0x331)]['QoL'][_0x5a5dcd(0x4e0)]){if('kuzyw'==='kuzyw')return this[_0x5a5dcd(0x36d)](_0xdf2e61);else this[_0x5a5dcd(0x2cc)](_0x2fc154,_0x45bde7,_0x1c0a8d,_0x3e5b00,'right');}else return VisuMZ['CoreEngine'][_0x5a5dcd(0x679)][_0x5a5dcd(0x204)](this,_0xdf2e61);},Game_Action[_0x54167d(0x4ec)][_0x54167d(0x36d)]=function(_0x27eb38){const _0x1d863a=this['itemSuccessRate'](_0x27eb38),_0x46e3cf=this['subjectHitRate'](_0x27eb38),_0xf45621=this['targetEvaRate'](_0x27eb38);return _0x1d863a*(_0x46e3cf-_0xf45621);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x580)]=Game_Action[_0x54167d(0x4ec)]['itemEva'],Game_Action[_0x54167d(0x4ec)]['itemEva']=function(_0x5b59de){const _0x327579=_0x54167d;if(VisuMZ[_0x327579(0x940)][_0x327579(0x331)][_0x327579(0x2e9)][_0x327579(0x4e0)])return 0x0;else{if(_0x327579(0x34d)==='TKxDU')_0x33259b[_0x327579(0x940)][_0x327579(0x833)][_0x327579(0x204)](this,_0x39f495,_0x34c54c),this[_0x327579(0x7f7)]();else return VisuMZ['CoreEngine'][_0x327579(0x580)]['call'](this,_0x5b59de);}},Game_Action['prototype']['itemSuccessRate']=function(_0x5ea2dd){const _0x4a05e9=_0x54167d;return this[_0x4a05e9(0x787)]()[_0x4a05e9(0x93b)]*0.01;},Game_Action[_0x54167d(0x4ec)][_0x54167d(0x3ca)]=function(_0x52d6f6){const _0x1ebfaa=_0x54167d;if(VisuMZ['CoreEngine'][_0x1ebfaa(0x331)][_0x1ebfaa(0x2e9)]['AccuracyBoost']&&this[_0x1ebfaa(0x7c1)]())return 0x1;if(this[_0x1ebfaa(0x764)]()){if(_0x1ebfaa(0x8f7)==='EmqSv'){if(VisuMZ[_0x1ebfaa(0x940)][_0x1ebfaa(0x331)][_0x1ebfaa(0x2e9)][_0x1ebfaa(0x544)]&&this['subject']()[_0x1ebfaa(0x4f6)]()){if(_0x1ebfaa(0x9c3)!==_0x1ebfaa(0x9c3)){if(!_0x98387c[_0x1ebfaa(0x562)]())return;if(!_0x56abc0['isNwjs']())return;if(!_0x167035)return;if(_0x416eab[_0x1ebfaa(0x716)]()<=0x0)return;_0x11bd8d['ConvertParams'](_0x2c4a9a,_0x32ad95);const _0x57630c='Map%1'['format'](_0x46f2f9['mapId']()['padZero'](0x3)),_0x11ab0e=_0x4fa0a3[_0x1ebfaa(0x940)][_0x1ebfaa(0x6a6)](_0x4b6b0f[_0x1ebfaa(0x716)]());_0x46ed9c[_0x1ebfaa(0x940)][_0x1ebfaa(0x207)](_0x11ab0e,_0x57630c,!![]);}else return this[_0x1ebfaa(0x4de)]()[_0x1ebfaa(0x399)]+0.05;}else return this['subject']()[_0x1ebfaa(0x399)];}else return _0xdeb781['CoreEngine']['Game_Action_numRepeats'][_0x1ebfaa(0x204)](this);}else return 0x1;},Game_Action[_0x54167d(0x4ec)][_0x54167d(0x862)]=function(_0xa88e05){const _0x3bd4d1=_0x54167d;if(this[_0x3bd4d1(0x4de)]()['isActor']()===_0xa88e05[_0x3bd4d1(0x4f6)]())return 0x0;if(this[_0x3bd4d1(0x764)]()){if(_0x3bd4d1(0x6a9)===_0x3bd4d1(0x6a9))return VisuMZ[_0x3bd4d1(0x940)][_0x3bd4d1(0x331)][_0x3bd4d1(0x2e9)][_0x3bd4d1(0x544)]&&_0xa88e05[_0x3bd4d1(0x24b)]()?_0xa88e05[_0x3bd4d1(0x5b8)]-0.05:_0xa88e05[_0x3bd4d1(0x5b8)];else _0x345e5e=_0x37a29c['concat'](_0x59904e);}else return this[_0x3bd4d1(0x5b0)]()?_0xa88e05['mev']:0x0;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x61f)]=Game_Action['prototype'][_0x54167d(0x719)],Game_Action[_0x54167d(0x4ec)]['updateLastTarget']=function(_0x56e2e6){const _0x18b97f=_0x54167d;VisuMZ[_0x18b97f(0x940)][_0x18b97f(0x61f)]['call'](this,_0x56e2e6);if(VisuMZ[_0x18b97f(0x940)][_0x18b97f(0x331)][_0x18b97f(0x2e9)]['ImprovedAccuracySystem'])return;const _0x3df33d=_0x56e2e6[_0x18b97f(0x94f)]();if(_0x3df33d[_0x18b97f(0x46e)]){if(_0x18b97f(0x6ff)!==_0x18b97f(0x6ff))return _0x213948[_0x18b97f(0x556)][_0x18b97f(0x918)][_0x18b97f(0x204)](this);else 0x1-this[_0x18b97f(0x55c)](_0x56e2e6)>this[_0x18b97f(0x975)](_0x56e2e6)&&(_0x3df33d[_0x18b97f(0x46e)]=![],_0x3df33d[_0x18b97f(0x438)]=!![]);}},VisuMZ['CoreEngine'][_0x54167d(0x708)]=Game_BattlerBase['prototype']['initMembers'],Game_BattlerBase['prototype'][_0x54167d(0x4a6)]=function(){const _0x4dc3d3=_0x54167d;this[_0x4dc3d3(0x74c)]={},VisuMZ['CoreEngine'][_0x4dc3d3(0x708)]['call'](this);},VisuMZ[_0x54167d(0x940)]['Game_BattlerBase_refresh']=Game_BattlerBase['prototype'][_0x54167d(0x7dd)],Game_BattlerBase[_0x54167d(0x4ec)]['refresh']=function(){const _0x53a5b6=_0x54167d;this[_0x53a5b6(0x74c)]={},VisuMZ[_0x53a5b6(0x940)]['Game_BattlerBase_refresh']['call'](this);},Game_BattlerBase[_0x54167d(0x4ec)][_0x54167d(0x4d7)]=function(_0x6a265c){const _0x1bf3ed=_0x54167d;return this['_cache']=this[_0x1bf3ed(0x74c)]||{},this['_cache'][_0x6a265c]!==undefined;},Game_BattlerBase[_0x54167d(0x4ec)][_0x54167d(0x724)]=function(_0x394846){const _0x234f75=_0x54167d,_0x1610a8=(_0x4b5c1a,_0x56d503)=>{const _0x139d6d=_0x4d17;if(!_0x56d503)return _0x4b5c1a;if(_0x56d503[_0x139d6d(0x31a)][_0x139d6d(0x59b)](VisuMZ[_0x139d6d(0x940)][_0x139d6d(0x364)][_0x139d6d(0x724)][_0x394846])){var _0x20e616=Number(RegExp['$1']);_0x4b5c1a+=_0x20e616;}if(_0x56d503['note']['match'](VisuMZ[_0x139d6d(0x940)][_0x139d6d(0x364)]['paramPlusJS'][_0x394846])){if(_0x139d6d(0x2c2)!==_0x139d6d(0x2c2))return 0x0;else{var _0x346381=String(RegExp['$1']);try{'TjMIh'!==_0x139d6d(0xa05)?(_0x194714[_0x139d6d(0x4ec)][_0x139d6d(0x8a2)][_0x139d6d(0x204)](this),!_0x31bf1e['isNextScene'](_0x34edda)&&(this['_spriteset']['update'](),this['_mapNameWindow'][_0x139d6d(0x4fa)](),this[_0x139d6d(0x6c7)]['visible']=![],_0x209a8f['snapForBackground']()),_0x1caaee['clearZoom'](),this[_0x139d6d(0x56d)]()):_0x4b5c1a+=eval(_0x346381);}catch(_0x5f1088){if($gameTemp[_0x139d6d(0x562)]())console[_0x139d6d(0x262)](_0x5f1088);}}}return _0x4b5c1a;};return this[_0x234f75(0x79e)]()[_0x234f75(0x81d)](_0x1610a8,this['_paramPlus'][_0x394846]);},Game_BattlerBase['prototype']['paramMax']=function(_0x47ccdf){const _0x48eacc=_0x54167d;var _0x34368e=_0x48eacc(0x4f5)+(this[_0x48eacc(0x4f6)]()?_0x48eacc(0x6de):_0x48eacc(0xa01))+_0x48eacc(0x640)+_0x47ccdf;if(this[_0x48eacc(0x4d7)](_0x34368e))return this[_0x48eacc(0x74c)][_0x34368e];this[_0x48eacc(0x74c)][_0x34368e]=eval(VisuMZ[_0x48eacc(0x940)]['Settings'][_0x48eacc(0x3fa)][_0x34368e]);const _0xeda5b3=(_0x5405f6,_0x2e21d2)=>{const _0x4572ab=_0x48eacc;if(!_0x2e21d2)return _0x5405f6;if(_0x2e21d2['note'][_0x4572ab(0x59b)](VisuMZ[_0x4572ab(0x940)][_0x4572ab(0x364)][_0x4572ab(0x9a1)][_0x47ccdf])){var _0x310aff=Number(RegExp['$1']);if(_0x310aff===0x0)_0x310aff=Number[_0x4572ab(0x4a8)];_0x5405f6=Math[_0x4572ab(0x350)](_0x5405f6,_0x310aff);}if(_0x2e21d2[_0x4572ab(0x31a)][_0x4572ab(0x59b)](VisuMZ[_0x4572ab(0x940)][_0x4572ab(0x364)][_0x4572ab(0x944)][_0x47ccdf])){var _0xfbdd41=String(RegExp['$1']);try{if('ScAFD'===_0x4572ab(0x41c)){return _0x4972e3[_0x4572ab(0x4ec)][_0x4572ab(0x97d)][_0x4572ab(0x204)](this)+_0x1b4282[_0x4572ab(0x940)][_0x4572ab(0x331)][_0x4572ab(0x3b6)][_0x4572ab(0x49c)];;}else _0x5405f6=Math[_0x4572ab(0x350)](_0x5405f6,Number(eval(_0xfbdd41)));}catch(_0x5bfc85){if($gameTemp[_0x4572ab(0x562)]())console[_0x4572ab(0x262)](_0x5bfc85);}}return _0x5405f6;};if(this[_0x48eacc(0x74c)][_0x34368e]===0x0)this[_0x48eacc(0x74c)][_0x34368e]=Number['MAX_SAFE_INTEGER'];return this[_0x48eacc(0x74c)][_0x34368e]=this['traitObjects']()['reduce'](_0xeda5b3,this[_0x48eacc(0x74c)][_0x34368e]),this[_0x48eacc(0x74c)][_0x34368e];},Game_BattlerBase[_0x54167d(0x4ec)][_0x54167d(0x455)]=function(_0x1ecc4c){const _0x2e2d79=_0x54167d,_0x3f79f1=this['traitsPi'](Game_BattlerBase[_0x2e2d79(0x949)],_0x1ecc4c),_0x172752=(_0x973df,_0x45aef1)=>{const _0x148448=_0x2e2d79;if(!_0x45aef1)return _0x973df;if(_0x45aef1[_0x148448(0x31a)][_0x148448(0x59b)](VisuMZ[_0x148448(0x940)][_0x148448(0x364)][_0x148448(0x8b7)][_0x1ecc4c])){if(_0x148448(0x3f8)===_0x148448(0x3f8)){var _0x34fc23=Number(RegExp['$1'])/0x64;_0x973df*=_0x34fc23;}else this[_0x148448(0x5c1)]();}if(_0x45aef1[_0x148448(0x31a)][_0x148448(0x59b)](VisuMZ[_0x148448(0x940)][_0x148448(0x364)][_0x148448(0x323)][_0x1ecc4c])){if(_0x148448(0x92f)!==_0x148448(0x92f))return this['helpAreaBottom']();else{var _0x34fc23=Number(RegExp['$1']);_0x973df*=_0x34fc23;}}if(_0x45aef1[_0x148448(0x31a)]['match'](VisuMZ[_0x148448(0x940)][_0x148448(0x364)][_0x148448(0x236)][_0x1ecc4c])){if(_0x148448(0x58f)!==_0x148448(0x8bb)){var _0x917a08=String(RegExp['$1']);try{_0x973df*=eval(_0x917a08);}catch(_0x17e7e0){if($gameTemp[_0x148448(0x562)]())console[_0x148448(0x262)](_0x17e7e0);}}else return _0x21c1a8[_0x148448(0x429)]||'Keyboard';}return _0x973df;};return this[_0x2e2d79(0x79e)]()[_0x2e2d79(0x81d)](_0x172752,_0x3f79f1);},Game_BattlerBase[_0x54167d(0x4ec)][_0x54167d(0x2ea)]=function(_0x37ab30){const _0x56baff=_0x54167d,_0x5a3a11=(_0x331488,_0x3287a2)=>{const _0x47f907=_0x4d17;if(!_0x3287a2)return _0x331488;if(_0x3287a2[_0x47f907(0x31a)][_0x47f907(0x59b)](VisuMZ['CoreEngine'][_0x47f907(0x364)][_0x47f907(0x343)][_0x37ab30])){if(_0x47f907(0x67a)!==_0x47f907(0x67a)){if(_0x5c5d41['match'](/backspace/i))return this[_0x47f907(0x912)]===0x8;if(_0x1d7755[_0x47f907(0x59b)](/enter/i))return this[_0x47f907(0x912)]===0xd;if(_0x5c031d[_0x47f907(0x59b)](/escape/i))return this[_0x47f907(0x912)]===0x1b;}else{var _0x27f07a=Number(RegExp['$1']);_0x331488+=_0x27f07a;}}if(_0x3287a2[_0x47f907(0x31a)][_0x47f907(0x59b)](VisuMZ[_0x47f907(0x940)][_0x47f907(0x364)][_0x47f907(0x964)][_0x37ab30])){if(_0x47f907(0x73c)===_0x47f907(0x1f1))return this[_0x47f907(0x9f6)](_0x6ab79f);else{var _0x441998=String(RegExp['$1']);try{if(_0x47f907(0x279)===_0x47f907(0x279))_0x331488+=eval(_0x441998);else{_0x37e8ab[_0x47f907(0x683)](_0x14550c,_0x3f9c3a);const _0x1e4e2c=_0xf93876[_0x47f907(0x89a)]||_0x47f907(0x206),_0xbd2094=_0xfc5126[_0x47f907(0x699)]['clamp'](0x1,0x9),_0x2598bf=_0x194ff9[_0x47f907(0x717)][_0x47f907(0x29b)](0x1,0x9),_0x48f203=_0x5b53df[_0x47f907(0x72b)]||0x1,_0x2aa7c1=_0x1e7aaf['Wait'];_0x21228e[_0x47f907(0x3f2)](_0x1e4e2c),_0x1e73c8[_0x47f907(0x669)](_0xbd2094,_0x2598bf,_0x48f203);if(_0x2aa7c1){const _0xa6545d=_0x396dcb[_0x47f907(0x2ca)]();if(_0xa6545d)_0xa6545d[_0x47f907(0x660)](_0x48f203);}}}catch(_0x3f55ad){if($gameTemp[_0x47f907(0x562)]())console['log'](_0x3f55ad);}}}return _0x331488;};return this[_0x56baff(0x79e)]()[_0x56baff(0x81d)](_0x5a3a11,0x0);},Game_BattlerBase[_0x54167d(0x4ec)][_0x54167d(0x594)]=function(_0x37c076){const _0x1d65b0=_0x54167d;let _0x486b3a=_0x1d65b0(0x594)+_0x37c076+_0x1d65b0(0x40c);if(this[_0x1d65b0(0x4d7)](_0x486b3a))return this['_cache'][_0x486b3a];return this['_cache'][_0x486b3a]=Math['round'](VisuMZ[_0x1d65b0(0x940)][_0x1d65b0(0x331)][_0x1d65b0(0x3fa)][_0x1d65b0(0x32d)][_0x1d65b0(0x204)](this,_0x37c076)),this[_0x1d65b0(0x74c)][_0x486b3a];},Game_BattlerBase[_0x54167d(0x4ec)][_0x54167d(0x953)]=function(_0x37e3d2){const _0xd460ce=_0x54167d,_0x1343d8=(_0x324af0,_0x543177)=>{const _0x149c7f=_0x4d17;if(!_0x543177)return _0x324af0;if(_0x543177[_0x149c7f(0x31a)]['match'](VisuMZ[_0x149c7f(0x940)]['RegExp'][_0x149c7f(0x2c4)][_0x37e3d2])){if(_0x149c7f(0x83b)!=='ydDGG'){var _0x22e3d3=Number(RegExp['$1'])/0x64;_0x324af0+=_0x22e3d3;}else this['_forcedBattleSys']=_0x149c7f(0x39a);}if(_0x543177[_0x149c7f(0x31a)][_0x149c7f(0x59b)](VisuMZ['CoreEngine'][_0x149c7f(0x364)][_0x149c7f(0x730)][_0x37e3d2])){if(_0x149c7f(0x483)!==_0x149c7f(0x9c1)){var _0x22e3d3=Number(RegExp['$1']);_0x324af0+=_0x22e3d3;}else this[_0x149c7f(0x4ef)]={},_0x14a35a[_0x149c7f(0x4ec)][_0x149c7f(0x8d7)][_0x149c7f(0x204)](this,_0x4ce2a3),this[_0x149c7f(0x6d0)](_0x146d06[_0x149c7f(0x940)]['Settings'][_0x149c7f(0x464)][_0x149c7f(0x4a7)]||0x0),this[_0x149c7f(0x7dd)]();}if(_0x543177['note'][_0x149c7f(0x59b)](VisuMZ[_0x149c7f(0x940)][_0x149c7f(0x364)]['xparamPlusJS'][_0x37e3d2])){var _0x2aaee5=String(RegExp['$1']);try{_0x149c7f(0x745)!==_0x149c7f(0x745)?(this['_playtestF7Looping']=!![],this['update'](),_0xdddc69[_0x149c7f(0x52e)](),this[_0x149c7f(0x34a)]=![]):_0x324af0+=eval(_0x2aaee5);}catch(_0x287751){if(_0x149c7f(0x56b)!==_0x149c7f(0x56b))this['drawIcon'](_0x39d19e,_0x1831be+0x2,_0x4224ef+0x2),_0x14049a-=_0x23b1e4[_0x149c7f(0x28b)]+0x4,_0x1f140c+=_0xd9ea8[_0x149c7f(0x28b)]+0x4;else{if($gameTemp[_0x149c7f(0x562)]())console[_0x149c7f(0x262)](_0x287751);}}}return _0x324af0;};return this[_0xd460ce(0x79e)]()[_0xd460ce(0x81d)](_0x1343d8,0x0);},Game_BattlerBase[_0x54167d(0x4ec)]['xparamRate']=function(_0x16e32e){const _0x2e6f65=_0x54167d,_0x50a715=(_0x31bc74,_0x5ac27d)=>{const _0x1d5b78=_0x4d17;if(!_0x5ac27d)return _0x31bc74;if(_0x5ac27d[_0x1d5b78(0x31a)]['match'](VisuMZ['CoreEngine'][_0x1d5b78(0x364)][_0x1d5b78(0x82a)][_0x16e32e])){if('hQnPa'!=='xJKPK'){var _0x14d01e=Number(RegExp['$1'])/0x64;_0x31bc74*=_0x14d01e;}else _0x4ed3ff[_0x1d5b78(0x3fd)]&&(this[_0x1d5b78(0x698)]=_0x1d5b78(0x92c));}if(_0x5ac27d['note'][_0x1d5b78(0x59b)](VisuMZ[_0x1d5b78(0x940)][_0x1d5b78(0x364)]['xparamRate2'][_0x16e32e])){if(_0x1d5b78(0x81f)===_0x1d5b78(0x81f)){var _0x14d01e=Number(RegExp['$1']);_0x31bc74*=_0x14d01e;}else{if(this[_0x1d5b78(0x21d)]===_0x5d556a)this[_0x1d5b78(0x446)]();return this[_0x1d5b78(0x21d)];}}if(_0x5ac27d[_0x1d5b78(0x31a)][_0x1d5b78(0x59b)](VisuMZ[_0x1d5b78(0x940)][_0x1d5b78(0x364)]['xparamRateJS'][_0x16e32e])){var _0x4b7530=String(RegExp['$1']);try{'Rijkj'!==_0x1d5b78(0x345)?_0x31bc74*=eval(_0x4b7530):(_0xee4aa4[_0x1d5b78(0x940)][_0x1d5b78(0x8d4)][_0x1d5b78(0x204)](this),_0x740c1e['isSideButtonLayout']()&&this['moveMenuButtonSideButtonLayout']());}catch(_0x42ac54){if($gameTemp[_0x1d5b78(0x562)]())console[_0x1d5b78(0x262)](_0x42ac54);}}return _0x31bc74;};return this[_0x2e6f65(0x79e)]()[_0x2e6f65(0x81d)](_0x50a715,0x1);},Game_BattlerBase[_0x54167d(0x4ec)]['xparamFlatBonus']=function(_0x5db099){const _0x48676a=_0x54167d,_0x7cc6fc=(_0x160570,_0x3afa65)=>{const _0x3d73e2=_0x4d17;if(!_0x3afa65)return _0x160570;if(_0x3afa65[_0x3d73e2(0x31a)]['match'](VisuMZ[_0x3d73e2(0x940)][_0x3d73e2(0x364)][_0x3d73e2(0x386)][_0x5db099])){if('ecqxA'===_0x3d73e2(0x3a1))_0x235175=_0x3c0041[_0x3d73e2(0x350)](_0x20e770,_0x3830c4);else{var _0x22e91b=Number(RegExp['$1'])/0x64;_0x160570+=_0x22e91b;}}if(_0x3afa65[_0x3d73e2(0x31a)][_0x3d73e2(0x59b)](VisuMZ[_0x3d73e2(0x940)][_0x3d73e2(0x364)][_0x3d73e2(0x445)][_0x5db099])){var _0x22e91b=Number(RegExp['$1']);_0x160570+=_0x22e91b;}if(_0x3afa65[_0x3d73e2(0x31a)][_0x3d73e2(0x59b)](VisuMZ[_0x3d73e2(0x940)]['RegExp'][_0x3d73e2(0x301)][_0x5db099])){var _0x29b5ef=String(RegExp['$1']);try{'szsnA'!=='szsnA'?this[_0x3d73e2(0x98d)][_0x3d73e2(0x6d0)](_0x41156a[_0x3d73e2(0x556)][_0x3d73e2(0x536)]):_0x160570+=eval(_0x29b5ef);}catch(_0x3b397b){if(_0x3d73e2(0x4ae)!==_0x3d73e2(0x4ae))this['_digitGrouping']=_0x13a608[_0x3d73e2(0x940)][_0x3d73e2(0x331)]['QoL']['DigitGroupingStandardText'],this[_0x3d73e2(0x475)]=_0x12b50d[_0x3d73e2(0x940)][_0x3d73e2(0x331)][_0x3d73e2(0x2e9)]['DigitGroupingExText'];else{if($gameTemp[_0x3d73e2(0x562)]())console[_0x3d73e2(0x262)](_0x3b397b);}}}return _0x160570;};return this['traitObjects']()[_0x48676a(0x81d)](_0x7cc6fc,0x0);},Game_BattlerBase[_0x54167d(0x4ec)]['xparam']=function(_0x25d9b0){const _0x3cb614=_0x54167d;let _0x482a0d=_0x3cb614(0x904)+_0x25d9b0+_0x3cb614(0x40c);if(this['checkCacheKey'](_0x482a0d))return this[_0x3cb614(0x74c)][_0x482a0d];return this[_0x3cb614(0x74c)][_0x482a0d]=VisuMZ[_0x3cb614(0x940)][_0x3cb614(0x331)][_0x3cb614(0x3fa)][_0x3cb614(0x8cb)]['call'](this,_0x25d9b0),this[_0x3cb614(0x74c)][_0x482a0d];},Game_BattlerBase[_0x54167d(0x4ec)]['sparamPlus']=function(_0x5b9a72){const _0x5e5bef=_0x54167d,_0x546889=(_0x5affda,_0x2339c4)=>{const _0x52934a=_0x4d17;if(_0x52934a(0x2a9)!==_0x52934a(0x2a9))return this[_0x52934a(0x7dd)]();else{if(!_0x2339c4)return _0x5affda;if(_0x2339c4['note'][_0x52934a(0x59b)](VisuMZ['CoreEngine'][_0x52934a(0x364)][_0x52934a(0x75c)][_0x5b9a72])){var _0x5ce011=Number(RegExp['$1'])/0x64;_0x5affda+=_0x5ce011;}if(_0x2339c4[_0x52934a(0x31a)]['match'](VisuMZ[_0x52934a(0x940)][_0x52934a(0x364)][_0x52934a(0x38f)][_0x5b9a72])){var _0x5ce011=Number(RegExp['$1']);_0x5affda+=_0x5ce011;}if(_0x2339c4[_0x52934a(0x31a)]['match'](VisuMZ['CoreEngine'][_0x52934a(0x364)][_0x52934a(0x51d)][_0x5b9a72])){var _0xbad130=String(RegExp['$1']);try{_0x5affda+=eval(_0xbad130);}catch(_0x5b0425){if(_0x52934a(0x42c)!=='MVbuW'){if($gameTemp['isPlaytest']())console[_0x52934a(0x262)](_0x5b0425);}else this[_0x52934a(0x89e)]=[];}}return _0x5affda;}};return this[_0x5e5bef(0x79e)]()[_0x5e5bef(0x81d)](_0x546889,0x0);},Game_BattlerBase['prototype'][_0x54167d(0x8ea)]=function(_0xa6aa7f){const _0x1bcda4=_0x54167d,_0x4e2a2c=(_0x5275a4,_0xa5eeae)=>{const _0x210288=_0x4d17;if(!_0xa5eeae)return _0x5275a4;if(_0xa5eeae['note'][_0x210288(0x59b)](VisuMZ['CoreEngine'][_0x210288(0x364)][_0x210288(0x469)][_0xa6aa7f])){var _0x1f0945=Number(RegExp['$1'])/0x64;_0x5275a4*=_0x1f0945;}if(_0xa5eeae[_0x210288(0x31a)][_0x210288(0x59b)](VisuMZ[_0x210288(0x940)][_0x210288(0x364)]['sparamRate2'][_0xa6aa7f])){var _0x1f0945=Number(RegExp['$1']);_0x5275a4*=_0x1f0945;}if(_0xa5eeae['note'][_0x210288(0x59b)](VisuMZ[_0x210288(0x940)][_0x210288(0x364)]['sparamRateJS'][_0xa6aa7f])){var _0x42918d=String(RegExp['$1']);try{_0x5275a4*=eval(_0x42918d);}catch(_0x56cf6f){if(_0x210288(0x2a8)!==_0x210288(0x2a8))return _0x27ca1f[_0x210288(0x940)][_0x210288(0x331)][_0x210288(0x2e9)]['EncounterRateMinimum'];else{if($gameTemp[_0x210288(0x562)]())console['log'](_0x56cf6f);}}}return _0x5275a4;};return this['traitObjects']()[_0x1bcda4(0x81d)](_0x4e2a2c,0x1);},Game_BattlerBase['prototype'][_0x54167d(0x611)]=function(_0x2d599d){const _0x20c467=_0x54167d,_0x22beef=(_0x343888,_0x5e046a)=>{const _0x58658e=_0x4d17;if(!_0x5e046a)return _0x343888;if(_0x5e046a[_0x58658e(0x31a)]['match'](VisuMZ[_0x58658e(0x940)][_0x58658e(0x364)][_0x58658e(0x4cb)][_0x2d599d])){if('qqSBC'===_0x58658e(0x327)){if(_0x1039f2)_0xcb0d9d[_0x58658e(0x5b9)](_0x272009);}else{var _0x328da2=Number(RegExp['$1'])/0x64;_0x343888+=_0x328da2;}}if(_0x5e046a[_0x58658e(0x31a)]['match'](VisuMZ['CoreEngine'][_0x58658e(0x364)][_0x58658e(0x977)][_0x2d599d])){var _0x328da2=Number(RegExp['$1']);_0x343888+=_0x328da2;}if(_0x5e046a[_0x58658e(0x31a)][_0x58658e(0x59b)](VisuMZ[_0x58658e(0x940)][_0x58658e(0x364)][_0x58658e(0x5bd)][_0x2d599d])){var _0x10e289=String(RegExp['$1']);try{'SnAxz'!==_0x58658e(0x27e)?(_0x5a43f3+=_0x44eccf+'\x0a',_0x906c5+=_0x58658e(0x741),_0x39e96e[_0x58658e(0x733)][0x4]!==''&&_0x5b7b7a[_0x58658e(0x733)][0x4]!==_0x4c512c&&(_0x4bdbe1+=_0x58658e(0x810)['format'](_0xfc2a9a[_0x58658e(0x733)][0x4]))):_0x343888+=eval(_0x10e289);}catch(_0x1d61d3){if(_0x58658e(0x8ce)===_0x58658e(0x8ce)){if($gameTemp[_0x58658e(0x562)]())console[_0x58658e(0x262)](_0x1d61d3);}else this[_0x58658e(0x43a)]()?this[_0x58658e(0x739)]():_0x5a4b1c['CoreEngine']['Window_Gold_refresh'][_0x58658e(0x204)](this);}}return _0x343888;};return this[_0x20c467(0x79e)]()[_0x20c467(0x81d)](_0x22beef,0x0);},Game_BattlerBase[_0x54167d(0x4ec)][_0x54167d(0x652)]=function(_0x49070b){const _0x56e436=_0x54167d;let _0x2247a1=_0x56e436(0x652)+_0x49070b+_0x56e436(0x40c);if(this[_0x56e436(0x4d7)](_0x2247a1))return this[_0x56e436(0x74c)][_0x2247a1];return this[_0x56e436(0x74c)][_0x2247a1]=VisuMZ[_0x56e436(0x940)][_0x56e436(0x331)][_0x56e436(0x3fa)][_0x56e436(0x4e6)]['call'](this,_0x49070b),this[_0x56e436(0x74c)][_0x2247a1];},Game_BattlerBase['prototype'][_0x54167d(0x4e4)]=function(_0x4a38f7,_0x3efc84){const _0x1b339a=_0x54167d;if(typeof paramId===_0x1b339a(0x3d9))return this[_0x1b339a(0x594)](_0x4a38f7);_0x4a38f7=String(_0x4a38f7||'')['toUpperCase']();if(_0x4a38f7===_0x1b339a(0x578))return this[_0x1b339a(0x594)](0x0);if(_0x4a38f7===_0x1b339a(0x784))return this['param'](0x1);if(_0x4a38f7===_0x1b339a(0x6ea))return this[_0x1b339a(0x594)](0x2);if(_0x4a38f7===_0x1b339a(0x3ce))return this[_0x1b339a(0x594)](0x3);if(_0x4a38f7===_0x1b339a(0x203))return this[_0x1b339a(0x594)](0x4);if(_0x4a38f7===_0x1b339a(0x7e8))return this[_0x1b339a(0x594)](0x5);if(_0x4a38f7===_0x1b339a(0x778))return this[_0x1b339a(0x594)](0x6);if(_0x4a38f7==='LUK')return this[_0x1b339a(0x594)](0x7);if(_0x4a38f7===_0x1b339a(0x8a9))return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this['xparam'](0x0)*0x64))+'%':this[_0x1b339a(0x904)](0x0);if(_0x4a38f7===_0x1b339a(0x2d9))return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this['xparam'](0x1)*0x64))+'%':this[_0x1b339a(0x904)](0x1);if(_0x4a38f7===_0x1b339a(0x6e8))return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this[_0x1b339a(0x904)](0x2)*0x64))+'%':this[_0x1b339a(0x904)](0x2);if(_0x4a38f7==='CEV')return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this[_0x1b339a(0x904)](0x3)*0x64))+'%':this[_0x1b339a(0x904)](0x3);if(_0x4a38f7==='MEV')return _0x3efc84?String(Math['round'](this[_0x1b339a(0x904)](0x4)*0x64))+'%':this[_0x1b339a(0x904)](0x4);if(_0x4a38f7===_0x1b339a(0x603))return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this[_0x1b339a(0x904)](0x5)*0x64))+'%':this['xparam'](0x5);if(_0x4a38f7===_0x1b339a(0x81e))return _0x3efc84?String(Math['round'](this[_0x1b339a(0x904)](0x6)*0x64))+'%':this['xparam'](0x6);if(_0x4a38f7==='HRG')return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this['xparam'](0x7)*0x64))+'%':this[_0x1b339a(0x904)](0x7);if(_0x4a38f7===_0x1b339a(0x9de))return _0x3efc84?String(Math['round'](this[_0x1b339a(0x904)](0x8)*0x64))+'%':this[_0x1b339a(0x904)](0x8);if(_0x4a38f7==='TRG')return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this[_0x1b339a(0x904)](0x9)*0x64))+'%':this[_0x1b339a(0x904)](0x9);if(_0x4a38f7===_0x1b339a(0x7b3))return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this[_0x1b339a(0x652)](0x0)*0x64))+'%':this[_0x1b339a(0x652)](0x0);if(_0x4a38f7===_0x1b339a(0xa0d))return _0x3efc84?String(Math['round'](this[_0x1b339a(0x652)](0x1)*0x64))+'%':this[_0x1b339a(0x652)](0x1);if(_0x4a38f7===_0x1b339a(0x3ab))return _0x3efc84?String(Math['round'](this[_0x1b339a(0x652)](0x2)*0x64))+'%':this[_0x1b339a(0x652)](0x2);if(_0x4a38f7===_0x1b339a(0x66d))return _0x3efc84?String(Math['round'](this['sparam'](0x3)*0x64))+'%':this[_0x1b339a(0x652)](0x3);if(_0x4a38f7===_0x1b339a(0x43f))return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this[_0x1b339a(0x652)](0x4)*0x64))+'%':this[_0x1b339a(0x652)](0x4);if(_0x4a38f7==='TCR')return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this[_0x1b339a(0x652)](0x5)*0x64))+'%':this[_0x1b339a(0x652)](0x5);if(_0x4a38f7===_0x1b339a(0x70a))return _0x3efc84?String(Math['round'](this['sparam'](0x6)*0x64))+'%':this['sparam'](0x6);if(_0x4a38f7===_0x1b339a(0x90d))return _0x3efc84?String(Math['round'](this[_0x1b339a(0x652)](0x7)*0x64))+'%':this[_0x1b339a(0x652)](0x7);if(_0x4a38f7===_0x1b339a(0x4b5))return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this[_0x1b339a(0x652)](0x8)*0x64))+'%':this[_0x1b339a(0x652)](0x8);if(_0x4a38f7==='EXR')return _0x3efc84?String(Math[_0x1b339a(0x3ad)](this[_0x1b339a(0x652)](0x9)*0x64))+'%':this[_0x1b339a(0x652)](0x9);if(VisuMZ[_0x1b339a(0x940)]['CustomParamAbb'][_0x4a38f7]){if(_0x1b339a(0x901)===_0x1b339a(0x680)){if(!this[_0x1b339a(0x5b7)])return _0x187850;return _0x20b485['ApplyEasing'](_0x11739a,this[_0x1b339a(0x5b7)][_0x1b339a(0x337)]||_0x1b339a(0x6e3));}else{const _0x53dc40=VisuMZ[_0x1b339a(0x940)][_0x1b339a(0x450)][_0x4a38f7],_0x3736a7=this[_0x53dc40];return VisuMZ[_0x1b339a(0x940)][_0x1b339a(0x6dc)][_0x4a38f7]==='integer'?_0x3736a7:_0x3efc84?String(Math[_0x1b339a(0x3ad)](_0x3736a7*0x64))+'%':_0x3736a7;}}return'';},Game_BattlerBase['prototype'][_0x54167d(0x791)]=function(){const _0xebe91a=_0x54167d;return this[_0xebe91a(0x84f)]()&&this[_0xebe91a(0x4f3)]<this[_0xebe91a(0x307)]*VisuMZ[_0xebe91a(0x940)]['Settings']['Param'][_0xebe91a(0x7fc)];},Game_Battler[_0x54167d(0x4ec)]['performMiss']=function(){const _0x3ae010=_0x54167d;SoundManager['playMiss'](),this[_0x3ae010(0x893)](_0x3ae010(0x7ba));},VisuMZ[_0x54167d(0x940)][_0x54167d(0x713)]=Game_Actor[_0x54167d(0x4ec)][_0x54167d(0x6ed)],Game_Actor[_0x54167d(0x4ec)][_0x54167d(0x6ed)]=function(_0x1f3c91){const _0x29bc75=_0x54167d;if(this[_0x29bc75(0x472)]>0x63)return this[_0x29bc75(0x3f3)](_0x1f3c91);return VisuMZ['CoreEngine']['Game_Actor_paramBase'][_0x29bc75(0x204)](this,_0x1f3c91);},Game_Actor[_0x54167d(0x4ec)][_0x54167d(0x3f3)]=function(_0x40a89d){const _0x48f8f9=_0x54167d,_0x1bd693=this[_0x48f8f9(0x50c)]()[_0x48f8f9(0x9b7)][_0x40a89d][0x63],_0x2e9eb5=this['currentClass']()[_0x48f8f9(0x9b7)][_0x40a89d][0x62];return _0x1bd693+(_0x1bd693-_0x2e9eb5)*(this['level']-0x63);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x3d7)]=Game_Actor[_0x54167d(0x4ec)][_0x54167d(0x57d)],Game_Actor['prototype'][_0x54167d(0x57d)]=function(_0x29337b,_0x3c4c9c){const _0x582263=_0x54167d;$gameTemp['_changingClass']=!![],VisuMZ['CoreEngine'][_0x582263(0x3d7)][_0x582263(0x204)](this,_0x29337b,_0x3c4c9c),$gameTemp[_0x582263(0x539)]=undefined;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x56e)]=Game_Actor[_0x54167d(0x4ec)][_0x54167d(0x753)],Game_Actor[_0x54167d(0x4ec)]['levelUp']=function(){const _0x125478=_0x54167d;VisuMZ[_0x125478(0x940)][_0x125478(0x56e)][_0x125478(0x204)](this);if(!$gameTemp[_0x125478(0x539)])this[_0x125478(0x970)]();},Game_Actor['prototype']['levelUpRecovery']=function(){const _0x3ab816=_0x54167d;this['_cache']={};if(VisuMZ[_0x3ab816(0x940)]['Settings'][_0x3ab816(0x2e9)][_0x3ab816(0x22b)])this[_0x3ab816(0x4f3)]=this['mhp'];if(VisuMZ['CoreEngine'][_0x3ab816(0x331)][_0x3ab816(0x2e9)][_0x3ab816(0x30c)])this['_mp']=this[_0x3ab816(0x41d)];},Game_Actor[_0x54167d(0x4ec)][_0x54167d(0x552)]=function(){const _0x19a62e=_0x54167d;if(this[_0x19a62e(0x5de)]())return 0x1;const _0x4474e2=this[_0x19a62e(0x3fb)]()-this['currentLevelExp'](),_0x25dac0=this[_0x19a62e(0x43b)]()-this[_0x19a62e(0x426)]();return(_0x25dac0/_0x4474e2)[_0x19a62e(0x29b)](0x0,0x1);},Game_Actor[_0x54167d(0x4ec)][_0x54167d(0x79e)]=function(){const _0x5b9848=_0x54167d,_0x2e8d54=Game_Battler[_0x5b9848(0x4ec)]['traitObjects']['call'](this);for(const _0xd61abd of this[_0x5b9848(0x3ea)]()){_0xd61abd&&_0x2e8d54[_0x5b9848(0x398)](_0xd61abd);}return _0x2e8d54[_0x5b9848(0x398)](this[_0x5b9848(0x50c)](),this['actor']()),_0x2e8d54;},Object[_0x54167d(0x201)](Game_Enemy[_0x54167d(0x4ec)],_0x54167d(0x472),{'get':function(){const _0x1e6fab=_0x54167d;return this[_0x1e6fab(0x75b)]();},'configurable':!![]}),Game_Enemy[_0x54167d(0x4ec)][_0x54167d(0x75b)]=function(){return this['enemy']()['level'];},Game_Enemy['prototype'][_0x54167d(0x2ff)]=function(){const _0xeecf88=_0x54167d;if(!this[_0xeecf88(0x555)]){if(_0xeecf88(0x5cf)!==_0xeecf88(0x5cf)){if(_0x6ba19c)_0x57b2e4['ParseActorNotetags'](_0x17469d);}else this[_0xeecf88(0x96f)]+=Math[_0xeecf88(0x3ad)]((Graphics[_0xeecf88(0x3e1)]-0x270)/0x2),this[_0xeecf88(0x96f)]-=Math[_0xeecf88(0x42f)]((Graphics[_0xeecf88(0x3e1)]-Graphics[_0xeecf88(0x996)])/0x2),$gameSystem[_0xeecf88(0x22e)]()?this['_screenX']-=Math[_0xeecf88(0x42f)]((Graphics['width']-Graphics['boxWidth'])/0x2):this[_0xeecf88(0x7e1)]+=Math[_0xeecf88(0x3ad)]((Graphics['boxWidth']-0x330)/0x2);}this[_0xeecf88(0x555)]=!![];},Game_Party[_0x54167d(0x4ec)][_0x54167d(0x8ee)]=function(){const _0x2ea6b7=_0x54167d;return VisuMZ[_0x2ea6b7(0x940)]['Settings'][_0x2ea6b7(0x67c)][_0x2ea6b7(0x33b)];},VisuMZ['CoreEngine'][_0x54167d(0x4a0)]=Game_Party[_0x54167d(0x4ec)]['consumeItem'],Game_Party[_0x54167d(0x4ec)][_0x54167d(0x4b9)]=function(_0x148c9d){const _0x192d09=_0x54167d;if(VisuMZ['CoreEngine'][_0x192d09(0x331)]['QoL'][_0x192d09(0x75d)]&&DataManager[_0x192d09(0x98f)](_0x148c9d))return;VisuMZ['CoreEngine'][_0x192d09(0x4a0)]['call'](this,_0x148c9d);},Game_Party[_0x54167d(0x4ec)][_0x54167d(0x245)]=function(){const _0x390a8b=_0x54167d,_0x26af98=VisuMZ['CoreEngine'][_0x390a8b(0x331)]['QoL'],_0x482b0a=_0x26af98[_0x390a8b(0x1fd)]??0x63;let _0x2aa8bc=[];(_0x26af98[_0x390a8b(0x5a5)]??!![])&&(_0x2aa8bc=_0x2aa8bc['concat']($dataItems));(_0x26af98[_0x390a8b(0x33a)]??!![])&&(_0x2aa8bc=_0x2aa8bc[_0x390a8b(0x25e)]($dataWeapons));(_0x26af98[_0x390a8b(0x6d8)]??!![])&&(_0x390a8b(0x6b9)!==_0x390a8b(0x876)?_0x2aa8bc=_0x2aa8bc[_0x390a8b(0x25e)]($dataArmors):(_0x519024['CoreEngine']['Scene_Options_create'][_0x390a8b(0x204)](this),this[_0x390a8b(0x8d9)]()));for(const _0x2e8bff of _0x2aa8bc){if(!_0x2e8bff)continue;if(_0x2e8bff['name'][_0x390a8b(0x314)]()<=0x0)continue;if(_0x2e8bff['name'][_0x390a8b(0x59b)](/-----/i))continue;this[_0x390a8b(0x8be)](_0x2e8bff,_0x482b0a);}},VisuMZ[_0x54167d(0x940)][_0x54167d(0x391)]=Game_Troop['prototype'][_0x54167d(0x82d)],Game_Troop[_0x54167d(0x4ec)]['setup']=function(_0x3ee125){const _0x48878d=_0x54167d;$gameTemp[_0x48878d(0x3d6)](),$gameTemp[_0x48878d(0x76b)](_0x3ee125),VisuMZ[_0x48878d(0x940)][_0x48878d(0x391)][_0x48878d(0x204)](this,_0x3ee125);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x248)]=Game_Map[_0x54167d(0x4ec)][_0x54167d(0x82d)],Game_Map[_0x54167d(0x4ec)]['setup']=function(_0x1abe24){const _0x25a83f=_0x54167d;VisuMZ[_0x25a83f(0x940)][_0x25a83f(0x248)]['call'](this,_0x1abe24),this[_0x25a83f(0x35c)](_0x1abe24);},Game_Map['prototype'][_0x54167d(0x35c)]=function(){const _0x874a6b=_0x54167d;this[_0x874a6b(0x4ea)]=VisuMZ[_0x874a6b(0x940)][_0x874a6b(0x331)][_0x874a6b(0x2e9)][_0x874a6b(0x7cd)]||![];if($dataMap&&$dataMap[_0x874a6b(0x31a)]){if(_0x874a6b(0x525)===_0x874a6b(0x63d)){if(this[_0x874a6b(0x51e)]===_0x874a6b(0x97f)&&!_0x53bd5d[_0x874a6b(0x966)]())return;if(_0x498654[_0x874a6b(0x8e3)]())return;_0x3e6a4c['CoreEngine'][_0x874a6b(0x3d8)][_0x874a6b(0x204)](this,_0x204531),this[_0x874a6b(0x94e)]('default');}else{if($dataMap['note']['match'](/<SHOW TILE SHADOWS>/i))this[_0x874a6b(0x4ea)]=![];if($dataMap[_0x874a6b(0x31a)][_0x874a6b(0x59b)](/<HIDE TILE SHADOWS>/i))this[_0x874a6b(0x4ea)]=!![];}}},Game_Map['prototype']['areTileShadowsHidden']=function(){const _0x29c613=_0x54167d;if(this['_hideTileShadows']===undefined)this['setupCoreEngine']();return this[_0x29c613(0x4ea)];},VisuMZ['CoreEngine'][_0x54167d(0x347)]=Game_Character[_0x54167d(0x4ec)][_0x54167d(0x859)],Game_Character[_0x54167d(0x4ec)]['processMoveCommand']=function(_0x3d0efe){const _0x2e401f=_0x54167d;try{VisuMZ[_0x2e401f(0x940)][_0x2e401f(0x347)][_0x2e401f(0x204)](this,_0x3d0efe);}catch(_0x5146c4){if($gameTemp[_0x2e401f(0x562)]())console['log'](_0x5146c4);}},Game_Player['prototype']['makeEncounterCount']=function(){const _0x3887ce=_0x54167d,_0x5bfe64=$gameMap[_0x3887ce(0x9e2)]();this[_0x3887ce(0xa09)]=Math[_0x3887ce(0x549)](_0x5bfe64)+Math[_0x3887ce(0x549)](_0x5bfe64)+this['encounterStepsMinimum']();},Game_Player[_0x54167d(0x4ec)][_0x54167d(0x8a7)]=function(){const _0x398c18=_0x54167d;return $dataMap&&$dataMap['note']&&$dataMap[_0x398c18(0x31a)][_0x398c18(0x59b)](/<MINIMUM ENCOUNTER STEPS:[ ](\d+)>/i)?Number(RegExp['$1']):VisuMZ['CoreEngine'][_0x398c18(0x331)][_0x398c18(0x2e9)][_0x398c18(0x829)];},VisuMZ[_0x54167d(0x940)][_0x54167d(0x93e)]=Game_Event[_0x54167d(0x4ec)][_0x54167d(0x486)],Game_Event[_0x54167d(0x4ec)]['isCollidedWithEvents']=function(_0x2fea72,_0x54cac4){const _0x1ca064=_0x54167d;if(this[_0x1ca064(0x1fb)]()){if(_0x1ca064(0x237)!=='hOFRa')return this[_0x1ca064(0x7d0)](_0x2fea72,_0x54cac4);else this['moveCancelButtonSideButtonLayout']();}else return VisuMZ[_0x1ca064(0x940)][_0x1ca064(0x93e)][_0x1ca064(0x204)](this,_0x2fea72,_0x54cac4);},Game_Event[_0x54167d(0x4ec)][_0x54167d(0x1fb)]=function(){const _0x36fb87=_0x54167d;return VisuMZ[_0x36fb87(0x940)][_0x36fb87(0x331)][_0x36fb87(0x2e9)]['SmartEventCollisionPriority'];},Game_Event['prototype'][_0x54167d(0x7d0)]=function(_0x4de39e,_0xf091e3){const _0x155978=_0x54167d;if(!this['isNormalPriority']())return![];else{const _0x5f2ffa=$gameMap[_0x155978(0x5d2)](_0x4de39e,_0xf091e3)[_0x155978(0x64f)](_0x21e691=>_0x21e691['isNormalPriority']());return _0x5f2ffa[_0x155978(0x95b)]>0x0;}},VisuMZ[_0x54167d(0x940)][_0x54167d(0x5c4)]=Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x92e)],Game_Interpreter[_0x54167d(0x4ec)]['command105']=function(_0x5d6c34){const _0x343973=_0x54167d,_0x36f732=this[_0x343973(0x519)]();if(_0x36f732[_0x343973(0x59b)](/\/\/[ ]SCRIPT[ ]CALL/i)){if(_0x343973(0x8b9)===_0x343973(0x8b9))return this[_0x343973(0x9f6)](_0x36f732);else _0x7419ee[_0x343973(0x472)]=_0x580f17[_0x343973(0x350)](_0x3c16ea(_0x20491a['$1']),0x1);}else return VisuMZ['CoreEngine']['Game_Interpreter_command105'][_0x343973(0x204)](this,_0x5d6c34);},Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x519)]=function(){const _0x1ff27f=_0x54167d;let _0x411cab='',_0x3c7b1e=this[_0x1ff27f(0x7ae)]+0x1;while(this[_0x1ff27f(0x2f9)][_0x3c7b1e]&&this['_list'][_0x3c7b1e][_0x1ff27f(0x28c)]===0x195){_0x1ff27f(0x973)!=='rQcQb'?this[_0x1ff27f(0x64b)](_0x25b74a,_0x5baa4e,_0x2d9905,_0x1b0658,_0x43f4a1):(_0x411cab+=this[_0x1ff27f(0x2f9)][_0x3c7b1e][_0x1ff27f(0x733)][0x0]+'\x0a',_0x3c7b1e++);}return _0x411cab;},Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x9f6)]=function(_0x419dfe){const _0x453e66=_0x54167d;try{eval(_0x419dfe);}catch(_0x2587d2){if($gameTemp[_0x453e66(0x562)]()){if(_0x453e66(0x642)==='VTwPB')console[_0x453e66(0x262)](_0x453e66(0x89b)),console[_0x453e66(0x262)](_0x2587d2);else return _0x58328b[_0x453e66(0x9bc)]()===0x1;}}return!![];},VisuMZ[_0x54167d(0x940)][_0x54167d(0x8a3)]=Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x49d)],Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x49d)]=function(_0x587e53){const _0xe81a45=_0x54167d;try{VisuMZ['CoreEngine'][_0xe81a45(0x8a3)]['call'](this,_0x587e53);}catch(_0x5d497d){if(_0xe81a45(0x23d)!==_0xe81a45(0x23d))_0x36e7c6=_0x2b0ff0[_0xe81a45(0x996)]-_0x4f438f;else{if($gameTemp[_0xe81a45(0x562)]()){if(_0xe81a45(0x55a)!==_0xe81a45(0x5f4))console[_0xe81a45(0x262)](_0xe81a45(0x9e3)),console[_0xe81a45(0x262)](_0x5d497d);else{if(_0x3c5662)_0x28f5f5[_0xe81a45(0x42d)](_0x298afa);}}this[_0xe81a45(0x74d)]();}}return!![];},VisuMZ['CoreEngine'][_0x54167d(0x5f6)]=Game_Interpreter['prototype'][_0x54167d(0x5e5)],Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x5e5)]=function(_0x4b8efd){const _0x262fc8=_0x54167d;try{if(_0x262fc8(0x3bd)===_0x262fc8(0x3bd))VisuMZ['CoreEngine'][_0x262fc8(0x5f6)][_0x262fc8(0x204)](this,_0x4b8efd);else return 0x0;}catch(_0x6c9d35){if(_0x262fc8(0x40b)===_0x262fc8(0x543))return _0x3398ee[_0x262fc8(0x556)]['ProfileRect'][_0x262fc8(0x204)](this);else $gameTemp[_0x262fc8(0x562)]()&&(console['log'](_0x262fc8(0x7c9)),console[_0x262fc8(0x262)](_0x6c9d35));}return!![];},VisuMZ[_0x54167d(0x940)][_0x54167d(0x95e)]=Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x5dd)],Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x5dd)]=function(){const _0x1315ba=_0x54167d;try{VisuMZ[_0x1315ba(0x940)][_0x1315ba(0x95e)]['call'](this);}catch(_0x5e0c45){'TkJpo'!==_0x1315ba(0x88e)?$gameTemp[_0x1315ba(0x562)]()&&(_0x1315ba(0x4ed)!==_0x1315ba(0x4ed)?_0xc0454d['VisuMZ_2_BattleSystemSTB']&&(this[_0x1315ba(0x698)]=_0x1315ba(0x470)):(console[_0x1315ba(0x262)]('Script\x20Call\x20Error'),console[_0x1315ba(0x262)](_0x5e0c45))):this[_0x1315ba(0x911)]=_0x52f763;}return!![];},VisuMZ[_0x54167d(0x940)][_0x54167d(0x5bf)]=Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x3c6)],Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x3c6)]=function(_0x24f1d7){const _0x1faf79=_0x54167d;return $gameTemp[_0x1faf79(0x823)](this),VisuMZ[_0x1faf79(0x940)][_0x1faf79(0x5bf)][_0x1faf79(0x204)](this,_0x24f1d7);},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x65e)]=function(){const _0x349e25=_0x54167d;return VisuMZ[_0x349e25(0x940)][_0x349e25(0x331)]['UI'][_0x349e25(0x881)];},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x234)]=function(){const _0x2e9cf7=_0x54167d;return VisuMZ[_0x2e9cf7(0x940)]['Settings']['UI'][_0x2e9cf7(0x933)];},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x9f2)]=function(){const _0x50023b=_0x54167d;return VisuMZ[_0x50023b(0x940)][_0x50023b(0x331)]['UI'][_0x50023b(0x3ae)];},Scene_Base[_0x54167d(0x4ec)]['isRightInputMode']=function(){const _0x130da7=_0x54167d;return VisuMZ[_0x130da7(0x940)][_0x130da7(0x331)]['UI'][_0x130da7(0x620)];},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x52c)]=function(){const _0x4bc4c8=_0x54167d;return VisuMZ['CoreEngine'][_0x4bc4c8(0x331)]['UI'][_0x4bc4c8(0x7c2)];},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x694)]=function(){const _0x3c2006=_0x54167d;return VisuMZ[_0x3c2006(0x940)][_0x3c2006(0x331)]['UI'][_0x3c2006(0x283)];},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x507)]=function(){const _0x2f4303=_0x54167d;return VisuMZ[_0x2f4303(0x940)][_0x2f4303(0x331)][_0x2f4303(0x3b6)][_0x2f4303(0x896)];},VisuMZ[_0x54167d(0x940)][_0x54167d(0x440)]=Scene_Base[_0x54167d(0x4ec)]['createWindowLayer'],Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x55d)]=function(){const _0x56229b=_0x54167d;VisuMZ[_0x56229b(0x940)][_0x56229b(0x440)][_0x56229b(0x204)](this),this[_0x56229b(0x2aa)](),this['_windowLayer']['x']=Math['round'](this['_windowLayer']['x']),this[_0x56229b(0x6c7)]['y']=Math[_0x56229b(0x3ad)](this[_0x56229b(0x6c7)]['y']);},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x2aa)]=function(){},Scene_Base[_0x54167d(0x4ec)]['buttonAssistKey1']=function(){const _0x415321=_0x54167d;return TextManager[_0x415321(0x686)](_0x415321(0x5ae),_0x415321(0x316));},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x982)]=function(){return TextManager['getInputButtonString']('tab');},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x673)]=function(){const _0x461d21=_0x54167d;return TextManager[_0x461d21(0x9fd)](_0x461d21(0x843));},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x988)]=function(){return TextManager['getInputButtonString']('ok');},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x608)]=function(){const _0x38da80=_0x54167d;return TextManager[_0x38da80(0x9fd)](_0x38da80(0x9a7));},Scene_Base['prototype']['buttonAssistText1']=function(){const _0x73aabe=_0x54167d;if(this[_0x73aabe(0x950)]&&this[_0x73aabe(0x950)][_0x73aabe(0x572)]){if(_0x73aabe(0x707)!=='YPBJM')return;else return TextManager[_0x73aabe(0x600)];}else return'';},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x4c3)]=function(){return'';},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x7f3)]=function(){return'';},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x408)]=function(){const _0x5d768d=_0x54167d;return TextManager[_0x5d768d(0x8b8)];},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x934)]=function(){return TextManager['buttonAssistCancel'];},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x274)]=function(){return 0x0;},Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x5d0)]=function(){return 0x0;},Scene_Base[_0x54167d(0x4ec)]['buttonAssistOffset3']=function(){return 0x0;},Scene_Base['prototype'][_0x54167d(0x73e)]=function(){return 0x0;},Scene_Base['prototype']['buttonAssistOffset5']=function(){return 0x0;},VisuMZ['CoreEngine'][_0x54167d(0x8f3)]=Scene_Boot['prototype'][_0x54167d(0x329)],Scene_Boot['prototype'][_0x54167d(0x329)]=function(){const _0x3ac6f0=_0x54167d;VisuMZ['CoreEngine'][_0x3ac6f0(0x8f3)][_0x3ac6f0(0x204)](this),this[_0x3ac6f0(0x1f4)]();},Scene_Boot['prototype'][_0x54167d(0x1f4)]=function(){const _0x340c9f=_0x54167d,_0x472387=[_0x340c9f(0x265),_0x340c9f(0x2e7),_0x340c9f(0x514),_0x340c9f(0xa16),_0x340c9f(0x515),_0x340c9f(0x8bd),_0x340c9f(0x37c),'pictures',_0x340c9f(0x564),_0x340c9f(0x357),_0x340c9f(0x32b),_0x340c9f(0x72a),_0x340c9f(0x3ac),'titles2'];for(const _0x3a785e of _0x472387){const _0x170ad5=VisuMZ[_0x340c9f(0x940)][_0x340c9f(0x331)]['ImgLoad'][_0x3a785e],_0x52a184=_0x340c9f(0x780)['format'](_0x3a785e);for(const _0x2244f9 of _0x170ad5){ImageManager['loadBitmap'](_0x52a184,_0x2244f9);}}},VisuMZ[_0x54167d(0x940)][_0x54167d(0x3fe)]=Scene_Boot['prototype'][_0x54167d(0x960)],Scene_Boot[_0x54167d(0x4ec)][_0x54167d(0x960)]=function(){const _0x106185=_0x54167d;if(Utils[_0x106185(0x69b)](_0x106185(0x931))&&VisuMZ[_0x106185(0x940)][_0x106185(0x331)]['QoL'][_0x106185(0x2ae)])this[_0x106185(0x710)]();else{if(_0x106185(0x7a3)!==_0x106185(0x7a3))return _0x3af122[_0x106185(0xa10)](_0x4b4a5a[_0x106185(0x940)][_0x106185(0x28e)][_0x106185(0x204)](this,_0x230d0e));else VisuMZ[_0x106185(0x940)][_0x106185(0x3fe)][_0x106185(0x204)](this);}},Scene_Boot[_0x54167d(0x4ec)][_0x54167d(0x710)]=function(){DataManager['setupNewGame'](),SceneManager['goto'](Scene_Map);},Scene_Boot['prototype'][_0x54167d(0x9a5)]=function(){const _0x444782=_0x54167d,_0x3c76e7=$dataSystem[_0x444782(0x1f8)][_0x444782(0x489)],_0x693f20=$dataSystem[_0x444782(0x1f8)][_0x444782(0x792)],_0x8ccd89=VisuMZ[_0x444782(0x940)]['Settings']['UI'][_0x444782(0x3a0)];Graphics[_0x444782(0x497)]=_0x3c76e7-_0x8ccd89*0x2,Graphics[_0x444782(0x996)]=_0x693f20-_0x8ccd89*0x2,this[_0x444782(0x226)]();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x87c)]=Scene_Boot[_0x54167d(0x4ec)]['updateDocumentTitle'],Scene_Boot[_0x54167d(0x4ec)][_0x54167d(0x5b2)]=function(){const _0x15181a=_0x54167d;if(this[_0x15181a(0x288)]())this[_0x15181a(0x254)]();else{if(_0x15181a(0x2f8)!=='pvEMq')VisuMZ[_0x15181a(0x940)][_0x15181a(0x87c)][_0x15181a(0x204)](this);else{if(_0x133b2e[_0x15181a(0x562)]())_0x211e6f[_0x15181a(0x262)](_0x166036);}}},Scene_Boot[_0x54167d(0x4ec)][_0x54167d(0x288)]=function(){const _0x5221e4=_0x54167d;if(Scene_Title['subtitle']==='')return![];if(Scene_Title[_0x5221e4(0x604)]===_0x5221e4(0x54c))return![];if(Scene_Title['version']==='')return![];if(Scene_Title[_0x5221e4(0x553)]===_0x5221e4(0x2af))return![];return!![];},Scene_Boot[_0x54167d(0x4ec)][_0x54167d(0x254)]=function(){const _0x4d21cf=_0x54167d,_0x31838d=$dataSystem['gameTitle'],_0x326e18=Scene_Title[_0x4d21cf(0x604)]||'',_0x40acc4=Scene_Title[_0x4d21cf(0x553)]||'',_0x2beb77=VisuMZ[_0x4d21cf(0x940)][_0x4d21cf(0x331)]['MenuLayout']['Title'][_0x4d21cf(0x8d5)],_0x13fd68=_0x2beb77[_0x4d21cf(0x482)](_0x31838d,_0x326e18,_0x40acc4);document[_0x4d21cf(0x1fe)]=_0x13fd68;},Scene_Boot[_0x54167d(0x4ec)][_0x54167d(0x226)]=function(){const _0x18abc2=_0x54167d;if(VisuMZ[_0x18abc2(0x940)][_0x18abc2(0x331)]['UI'][_0x18abc2(0x762)]){if('xxNCY'!=='FXJnT'){const _0x4c498e=Graphics[_0x18abc2(0x281)]-Graphics[_0x18abc2(0x497)]-VisuMZ[_0x18abc2(0x940)][_0x18abc2(0x331)]['UI'][_0x18abc2(0x3a0)]*0x2,_0x39b0f3=Sprite_Button[_0x18abc2(0x4ec)][_0x18abc2(0x468)][_0x18abc2(0x204)](this)*0x4;if(_0x4c498e>=_0x39b0f3)SceneManager[_0x18abc2(0x87d)](!![]);}else{const _0x2ad2e4=this[_0x18abc2(0x77a)]()-this[_0x18abc2(0x46a)]()*0x2;this[_0x18abc2(0x3b8)](_0x4944ec,_0x334d62,_0x2ad2e4,_0x1e9467,![]);}}},Scene_Title[_0x54167d(0x604)]=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)][_0x54167d(0x529)][_0x54167d(0x3a7)][_0x54167d(0x54c)],Scene_Title[_0x54167d(0x553)]=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)]['MenuLayout'][_0x54167d(0x3a7)]['Version'],Scene_Title[_0x54167d(0x9c0)]=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)]['TitlePicButtons'],VisuMZ[_0x54167d(0x940)][_0x54167d(0x9ca)]=Scene_Title[_0x54167d(0x4ec)][_0x54167d(0x914)],Scene_Title[_0x54167d(0x4ec)][_0x54167d(0x914)]=function(){const _0x411895=_0x54167d;VisuMZ[_0x411895(0x940)][_0x411895(0x331)][_0x411895(0x529)][_0x411895(0x3a7)][_0x411895(0x914)]['call'](this);if(Scene_Title[_0x411895(0x604)]!==''&&Scene_Title[_0x411895(0x604)]!==_0x411895(0x54c))this[_0x411895(0x2fa)]();if(Scene_Title[_0x411895(0x553)]!==''&&Scene_Title[_0x411895(0x553)]!=='0.00')this['drawGameVersion']();},Scene_Title[_0x54167d(0x4ec)][_0x54167d(0x2fa)]=function(){const _0x272ad5=_0x54167d;VisuMZ[_0x272ad5(0x940)][_0x272ad5(0x331)][_0x272ad5(0x529)][_0x272ad5(0x3a7)][_0x272ad5(0x2fa)]['call'](this);},Scene_Title[_0x54167d(0x4ec)]['drawGameVersion']=function(){const _0x294ebc=_0x54167d;VisuMZ[_0x294ebc(0x940)][_0x294ebc(0x331)]['MenuLayout'][_0x294ebc(0x3a7)][_0x294ebc(0x2cd)][_0x294ebc(0x204)](this);},Scene_Title[_0x54167d(0x4ec)][_0x54167d(0x255)]=function(){const _0x39b339=_0x54167d;this[_0x39b339(0x30e)]();const _0x118996=$dataSystem[_0x39b339(0x284)][_0x39b339(0x83c)],_0x360a67=this[_0x39b339(0x9fc)]();this[_0x39b339(0x897)]=new Window_TitleCommand(_0x360a67),this['_commandWindow'][_0x39b339(0x6d0)](_0x118996);const _0x38bec2=this[_0x39b339(0x9fc)]();this['_commandWindow'][_0x39b339(0x35d)](_0x38bec2['x'],_0x38bec2['y'],_0x38bec2[_0x39b339(0x281)],_0x38bec2[_0x39b339(0x3e1)]),this[_0x39b339(0x2a2)](this[_0x39b339(0x897)]);},Scene_Title[_0x54167d(0x4ec)][_0x54167d(0x69a)]=function(){const _0x542e4e=_0x54167d;return this[_0x542e4e(0x897)]?this[_0x542e4e(0x897)][_0x542e4e(0x7b4)]():VisuMZ[_0x542e4e(0x940)][_0x542e4e(0x331)]['TitleCommandList']['length'];},Scene_Title[_0x54167d(0x4ec)][_0x54167d(0x9fc)]=function(){const _0x25e7f0=_0x54167d;return VisuMZ[_0x25e7f0(0x940)]['Settings'][_0x25e7f0(0x529)][_0x25e7f0(0x3a7)][_0x25e7f0(0x41a)][_0x25e7f0(0x204)](this);},Scene_Title[_0x54167d(0x4ec)][_0x54167d(0x30e)]=function(){const _0x305acb=_0x54167d;for(const _0x138222 of Scene_Title['pictureButtons']){const _0x492b75=new Sprite_TitlePictureButton(_0x138222);this[_0x305acb(0x45f)](_0x492b75);}},VisuMZ['CoreEngine']['Scene_Map_initialize']=Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x8d7)],Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x8d7)]=function(){const _0x13069c=_0x54167d;VisuMZ[_0x13069c(0x940)]['Scene_Map_initialize'][_0x13069c(0x204)](this),$gameTemp['clearForcedGameTroopSettingsCoreEngine'](),this[_0x13069c(0x56d)]();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x99a)]=Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x7d9)],Scene_Map['prototype'][_0x54167d(0x7d9)]=function(){const _0x3dc70a=_0x54167d;VisuMZ[_0x3dc70a(0x940)][_0x3dc70a(0x99a)][_0x3dc70a(0x204)](this),$gameTemp[_0x3dc70a(0x542)]&&!$gameMessage[_0x3dc70a(0x68c)]()&&(this['updateMain'](),SceneManager[_0x3dc70a(0x52e)]());},Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x8a2)]=function(){const _0x4a1c58=_0x54167d;Scene_Message[_0x4a1c58(0x4ec)][_0x4a1c58(0x8a2)][_0x4a1c58(0x204)](this),!SceneManager[_0x4a1c58(0x712)](Scene_Battle)&&(this[_0x4a1c58(0x6ae)]['update'](),this[_0x4a1c58(0x3e7)][_0x4a1c58(0x4fa)](),this[_0x4a1c58(0x6c7)][_0x4a1c58(0x572)]=![],SceneManager['snapForBackground']()),$gameScreen[_0x4a1c58(0x476)](),this['clearOnceParallelInterpreters']();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x8d4)]=Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x516)],Scene_Map['prototype']['createMenuButton']=function(){const _0x42275e=_0x54167d;VisuMZ[_0x42275e(0x940)][_0x42275e(0x8d4)]['call'](this),SceneManager['isSideButtonLayout']()&&this['moveMenuButtonSideButtonLayout']();},Scene_Map['prototype'][_0x54167d(0x308)]=function(){const _0x51ba16=_0x54167d;this[_0x51ba16(0x8f1)]['x']=Graphics[_0x51ba16(0x497)]+0x4;},VisuMZ['CoreEngine'][_0x54167d(0x463)]=Scene_Map[_0x54167d(0x4ec)]['updateScene'],Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x802)]=function(){const _0x369bf6=_0x54167d;VisuMZ[_0x369bf6(0x940)][_0x369bf6(0x463)][_0x369bf6(0x204)](this),this[_0x369bf6(0x8f8)]();},Scene_Map['prototype'][_0x54167d(0x8f8)]=function(){const _0x3fd102=_0x54167d;if(Input[_0x3fd102(0x54b)](_0x3fd102(0x5cd))){if(_0x3fd102(0x9b4)!==_0x3fd102(0x5d1))ConfigManager[_0x3fd102(0x3de)]=!ConfigManager[_0x3fd102(0x3de)],ConfigManager[_0x3fd102(0x300)]();else{_0x5e34b4['ConvertParams'](_0x49ec86,_0x3562c7);const _0x2c8210=_0x4e0e52['option']||0x1;_0x1b8315['setWindowPadding'](_0x2c8210);}}},VisuMZ[_0x54167d(0x940)][_0x54167d(0x932)]=Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x643)],Scene_Map['prototype'][_0x54167d(0x643)]=function(){const _0x414a20=_0x54167d;VisuMZ[_0x414a20(0x940)][_0x414a20(0x932)]['call'](this),this[_0x414a20(0x8de)]();},Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x56d)]=function(){const _0xfea61b=_0x54167d;this[_0xfea61b(0x629)]=[];},Scene_Map['prototype'][_0x54167d(0x8de)]=function(){const _0xacb15a=_0x54167d;if(!this[_0xacb15a(0x629)])return;for(const _0x51a88b of this[_0xacb15a(0x629)]){_0xacb15a(0x415)==='iTMFT'?_0x51a88b&&(_0xacb15a(0x8d6)!=='Hyrkc'?_0x51a88b[_0xacb15a(0x3b5)]():_0x30e538[_0xacb15a(0x940)][_0xacb15a(0x2c9)][_0xacb15a(0x204)](this)):_0xce9f6&&_0x3bed5f[_0xacb15a(0x398)](_0x17df62);}},Scene_Map[_0x54167d(0x4ec)]['playOnceParallelInterpreter']=function(_0x304e73){const _0x1d8c3a=_0x54167d,_0x520924=$dataCommonEvents[_0x304e73];if(!_0x520924)return;const _0x55d5ff=new Game_OnceParallelInterpreter();this['addOnceParallelInterpreter'](_0x55d5ff),_0x55d5ff[_0x1d8c3a(0x2e6)](_0x304e73);},Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x8e9)]=function(_0x512c16){const _0x59aa61=_0x54167d;this[_0x59aa61(0x629)]=this[_0x59aa61(0x629)]||[],this['_onceParallelInterpreters'][_0x59aa61(0x398)](_0x512c16);},Scene_Map[_0x54167d(0x4ec)]['removeOnceParallelInterpreter']=function(_0x397dab){const _0xdcbaf9=_0x54167d;this[_0xdcbaf9(0x629)]=this[_0xdcbaf9(0x629)]||[],this['_onceParallelInterpreters'][_0xdcbaf9(0x233)](_0x397dab);};function Game_OnceParallelInterpreter(){const _0x1225d9=_0x54167d;this[_0x1225d9(0x8d7)](...arguments);}Game_OnceParallelInterpreter[_0x54167d(0x4ec)]=Object[_0x54167d(0x66b)](Game_Interpreter['prototype']),Game_OnceParallelInterpreter[_0x54167d(0x4ec)][_0x54167d(0x4a9)]=Game_OnceParallelInterpreter,Game_OnceParallelInterpreter[_0x54167d(0x4ec)][_0x54167d(0x2e6)]=function(_0x2a79ce){const _0x103eac=_0x54167d,_0x5bc94d=$dataCommonEvents[_0x2a79ce];_0x5bc94d?this[_0x103eac(0x82d)](_0x5bc94d[_0x103eac(0x9d7)],0x0):this[_0x103eac(0x8a2)]();},Game_OnceParallelInterpreter[_0x54167d(0x4ec)][_0x54167d(0x8a2)]=function(){const _0x5299d9=_0x54167d;if(!SceneManager[_0x5299d9(0x8c0)]())return;SceneManager[_0x5299d9(0x4ce)][_0x5299d9(0x986)](this),Game_Interpreter[_0x5299d9(0x4ec)]['terminate'][_0x5299d9(0x204)](this);},VisuMZ[_0x54167d(0x940)]['Scene_MenuBase_helpAreaTop']=Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x86f)],Scene_MenuBase[_0x54167d(0x4ec)]['helpAreaTop']=function(){const _0x32efbb=_0x54167d;let _0x43d19e=0x0;SceneManager[_0x32efbb(0x3b4)]()?_0x32efbb(0x8ec)===_0x32efbb(0x5b3)?this[_0x32efbb(0x9a3)][_0x32efbb(0x79f)]+=0x6:_0x43d19e=this[_0x32efbb(0x53c)]():_0x43d19e=VisuMZ[_0x32efbb(0x940)][_0x32efbb(0x40d)][_0x32efbb(0x204)](this);if(this[_0x32efbb(0x8df)]()&&this[_0x32efbb(0x6e7)]()===_0x32efbb(0x7ad)){if(_0x32efbb(0x44a)===_0x32efbb(0x7ce)){_0x5411c5-=_0x747446;if(_0x410f28<=0x0)_0x2d587b=0x0;this[_0x32efbb(0x63f)](_0x3b0a09);}else _0x43d19e+=Window_ButtonAssist['prototype'][_0x32efbb(0x7c4)]();}return _0x43d19e;},Scene_MenuBase['prototype'][_0x54167d(0x53c)]=function(){const _0x453f94=_0x54167d;if(this[_0x453f94(0x234)]()){if(_0x453f94(0x622)!==_0x453f94(0x622))_0x25c43e+=_0x4a2008(_0x2c6eb6);else return this['mainAreaBottom']();}else{if('gsnnN'===_0x453f94(0x868))return 0x0;else _0x729a48(_0x453f94(0x6c8)[_0x453f94(0x482)](_0x5f1bf0));}},VisuMZ['CoreEngine']['Scene_MenuBase_mainAreaTop']=Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x888)],Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x888)]=function(){const _0x11a372=_0x54167d;if(SceneManager[_0x11a372(0x3b4)]())return this[_0x11a372(0x78c)]();else{if(_0x11a372(0x797)!==_0x11a372(0x797))this[_0x11a372(0x698)]=_0x11a372(0x92c);else return VisuMZ[_0x11a372(0x940)]['Scene_MenuBase_mainAreaTop'][_0x11a372(0x204)](this);}},Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x78c)]=function(){const _0x12e30b=_0x54167d;if(!this[_0x12e30b(0x234)]()){if(_0x12e30b(0x751)!==_0x12e30b(0x751))!_0x556e94['isPlaying']()&&this['removePointAnimation'](_0x3d2e39);else return this[_0x12e30b(0x3dc)]();}else return 0x0;},VisuMZ['CoreEngine'][_0x54167d(0x52f)]=Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x421)],Scene_MenuBase['prototype']['mainAreaHeight']=function(){const _0xf6a450=_0x54167d;let _0x7ac443=0x0;return SceneManager[_0xf6a450(0x3b4)]()?_0x7ac443=this['mainAreaHeightSideButtonLayout']():_0x7ac443=VisuMZ['CoreEngine'][_0xf6a450(0x52f)]['call'](this),this['isMenuButtonAssistEnabled']()&&this[_0xf6a450(0x6e7)]()!==_0xf6a450(0x926)&&(_0x7ac443-=Window_ButtonAssist['prototype'][_0xf6a450(0x7c4)]()),_0x7ac443;},Scene_MenuBase['prototype'][_0x54167d(0x87b)]=function(){const _0x23893d=_0x54167d;return Graphics[_0x23893d(0x996)]-this[_0x23893d(0x2ec)]();},VisuMZ[_0x54167d(0x940)]['Scene_MenuBase_createBackground']=Scene_MenuBase['prototype']['createBackground'],Scene_MenuBase['prototype']['createBackground']=function(){const _0x25eef6=_0x54167d;this['_backgroundFilter']=new PIXI[(_0x25eef6(0x6f6))][(_0x25eef6(0x98b))](clamp=!![]),this[_0x25eef6(0x420)]=new Sprite(),this['_backgroundSprite'][_0x25eef6(0x228)]=SceneManager[_0x25eef6(0x67d)](),this['_backgroundSprite'][_0x25eef6(0x6f6)]=[this[_0x25eef6(0x214)]],this[_0x25eef6(0x45f)](this['_backgroundSprite']),this[_0x25eef6(0x7d8)](0xc0),this[_0x25eef6(0x7d8)](this[_0x25eef6(0x462)]()),this[_0x25eef6(0x341)]();},Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x462)]=function(){const _0x26385d=_0x54167d,_0x471295=String(this[_0x26385d(0x4a9)]['name']),_0x8b7cff=this['getCustomBackgroundSettings'](_0x471295);return _0x8b7cff?_0x8b7cff[_0x26385d(0x66c)]:0xc0;},Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x341)]=function(){const _0x50a3f8=_0x54167d,_0x22790b=String(this['constructor'][_0x50a3f8(0x614)]),_0x2d3811=this[_0x50a3f8(0x4bc)](_0x22790b);if(_0x2d3811&&(_0x2d3811[_0x50a3f8(0x7c0)]!==''||_0x2d3811[_0x50a3f8(0x4eb)]!=='')){if(_0x50a3f8(0x8c8)!==_0x50a3f8(0x8c8))return _0x177483['mev'];else this[_0x50a3f8(0x436)]=new Sprite(ImageManager[_0x50a3f8(0x765)](_0x2d3811[_0x50a3f8(0x7c0)])),this[_0x50a3f8(0x77f)]=new Sprite(ImageManager[_0x50a3f8(0x795)](_0x2d3811['BgFilename2'])),this[_0x50a3f8(0x45f)](this[_0x50a3f8(0x436)]),this[_0x50a3f8(0x45f)](this['_backSprite2']),this[_0x50a3f8(0x436)]['bitmap']['addLoadListener'](this[_0x50a3f8(0x590)][_0x50a3f8(0x6ac)](this,this[_0x50a3f8(0x436)])),this['_backSprite2']['bitmap'][_0x50a3f8(0x9ee)](this[_0x50a3f8(0x590)][_0x50a3f8(0x6ac)](this,this['_backSprite2']));}},Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x4bc)]=function(_0xfd9fd6){const _0x36c75f=_0x54167d;return VisuMZ[_0x36c75f(0x940)][_0x36c75f(0x331)][_0x36c75f(0x6cf)][_0xfd9fd6]||VisuMZ[_0x36c75f(0x940)][_0x36c75f(0x331)][_0x36c75f(0x6cf)][_0x36c75f(0x244)];},Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x590)]=function(_0x16e97a){const _0x5a7039=_0x54167d;this[_0x5a7039(0x22a)](_0x16e97a),this['centerSprite'](_0x16e97a);},VisuMZ[_0x54167d(0x940)]['Scene_MenuBase_createCancelButton']=Scene_MenuBase['prototype'][_0x54167d(0x83e)],Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x83e)]=function(){const _0x1f6797=_0x54167d;VisuMZ['CoreEngine'][_0x1f6797(0x6b6)][_0x1f6797(0x204)](this),SceneManager['isSideButtonLayout']()&&this['moveCancelButtonSideButtonLayout']();},Scene_MenuBase['prototype'][_0x54167d(0x8f4)]=function(){const _0x101855=_0x54167d;this[_0x101855(0x844)]['x']=Graphics[_0x101855(0x497)]+0x4;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x696)]=Scene_MenuBase[_0x54167d(0x4ec)]['createPageButtons'],Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x64e)]=function(){const _0x21edac=_0x54167d;VisuMZ[_0x21edac(0x940)][_0x21edac(0x696)][_0x21edac(0x204)](this);if(SceneManager[_0x21edac(0x8ef)]()){if('honCf'!==_0x21edac(0x8c6))this[_0x21edac(0x967)]();else{if(!this['showPointAnimations']())return;_0x2ac7ca=_0x4adaa4||![],_0xa83789=_0x4e9b05||![];if(_0x4bd52a[_0x5c701f]){const _0x56efc4={'x':_0x54f112,'y':_0x2eba21,'animationId':_0x48488b,'mirror':_0x15e75d,'mute':_0x114941};this['_pointAnimationQueue']['push'](_0x56efc4);}}}},Scene_MenuBase[_0x54167d(0x4ec)]['movePageButtonSideButtonLayout']=function(){const _0x3c506d=_0x54167d;this['_pageupButton']['x']=-0x1*(this[_0x3c506d(0x950)][_0x3c506d(0x281)]+this[_0x3c506d(0x54f)][_0x3c506d(0x281)]+0x8),this[_0x3c506d(0x54f)]['x']=-0x1*(this[_0x3c506d(0x54f)][_0x3c506d(0x281)]+0x4);},Scene_MenuBase[_0x54167d(0x4ec)]['isMenuButtonAssistEnabled']=function(){const _0x4ba5ee=_0x54167d;return VisuMZ[_0x4ba5ee(0x940)][_0x4ba5ee(0x331)]['ButtonAssist']['Enable'];},Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x6e7)]=function(){const _0x23204d=_0x54167d;return SceneManager['isSideButtonLayout']()||SceneManager['areButtonsHidden']()?VisuMZ[_0x23204d(0x940)][_0x23204d(0x331)]['ButtonAssist'][_0x23204d(0x54d)]:'button';},Scene_MenuBase['prototype'][_0x54167d(0x2aa)]=function(){const _0x494272=_0x54167d;if(!this[_0x494272(0x8df)]())return;const _0x3c2f61=this['buttonAssistWindowRect']();this[_0x494272(0xa06)]=new Window_ButtonAssist(_0x3c2f61),this['addWindow'](this[_0x494272(0xa06)]);},Scene_MenuBase['prototype']['buttonAssistWindowRect']=function(){const _0x36e065=_0x54167d;if(this[_0x36e065(0x6e7)]()===_0x36e065(0x926))return this[_0x36e065(0x2bd)]();else{if(_0x36e065(0x5c0)===_0x36e065(0x73b))_0x4ba1c6[_0x36e065(0x940)][_0x36e065(0x248)]['call'](this,_0x2b9834),this['setupCoreEngine'](_0x567578);else return this[_0x36e065(0x690)]();}},Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x2bd)]=function(){const _0x147099=_0x54167d,_0x486180=ConfigManager['touchUI']?(Sprite_Button[_0x147099(0x4ec)][_0x147099(0x468)]()+0x6)*0x2:0x0,_0x5996fc=this[_0x147099(0x28d)](),_0x13f0ed=Graphics[_0x147099(0x497)]-_0x486180*0x2,_0x49183e=this[_0x147099(0x694)]();return new Rectangle(_0x486180,_0x5996fc,_0x13f0ed,_0x49183e);},Scene_MenuBase[_0x54167d(0x4ec)][_0x54167d(0x690)]=function(){const _0x2edad9=_0x54167d,_0x40659b=Graphics[_0x2edad9(0x497)],_0x2a3cc9=Window_ButtonAssist['prototype'][_0x2edad9(0x7c4)](),_0x4be083=0x0;let _0x3fd095=0x0;return this['getButtonAssistLocation']()===_0x2edad9(0x7ad)?_0x3fd095=0x0:_0x3fd095=Graphics[_0x2edad9(0x996)]-_0x2a3cc9,new Rectangle(_0x4be083,_0x3fd095,_0x40659b,_0x2a3cc9);},Scene_Menu['layoutSettings']=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)][_0x54167d(0x529)]['MainMenu'],VisuMZ[_0x54167d(0x940)][_0x54167d(0x339)]=Scene_Menu['prototype'][_0x54167d(0x66b)],Scene_Menu[_0x54167d(0x4ec)][_0x54167d(0x66b)]=function(){const _0x21e03b=_0x54167d;VisuMZ['CoreEngine'][_0x21e03b(0x339)]['call'](this),this['setCoreEngineUpdateWindowBg']();},Scene_Menu[_0x54167d(0x4ec)][_0x54167d(0x8d9)]=function(){const _0x3280cc=_0x54167d;this[_0x3280cc(0x897)]&&this['_commandWindow']['setBackgroundType'](Scene_Menu[_0x3280cc(0x556)]['CommandBgType']);if(this[_0x3280cc(0x3e2)]){if(_0x3280cc(0x66f)===_0x3280cc(0x9d9)){var _0x10d819=_0x44b0bb(_0x2adf1d['$1']);try{_0x15aea0+=_0x8e58ab(_0x10d819);}catch(_0x4f29b1){if(_0x59f5d4['isPlaytest']())_0x41451b[_0x3280cc(0x262)](_0x4f29b1);}}else this[_0x3280cc(0x3e2)][_0x3280cc(0x6d0)](Scene_Menu[_0x3280cc(0x556)]['GoldBgType']);}this[_0x3280cc(0x8b5)]&&(_0x3280cc(0x452)===_0x3280cc(0x8fd)?this[_0x3280cc(0x698)]=_0x3280cc(0x965):this['_statusWindow']['setBackgroundType'](Scene_Menu[_0x3280cc(0x556)][_0x3280cc(0x342)]));},Scene_Menu[_0x54167d(0x4ec)][_0x54167d(0x9fc)]=function(){const _0x1d7882=_0x54167d;return Scene_Menu['layoutSettings'][_0x1d7882(0x41a)][_0x1d7882(0x204)](this);},Scene_Menu['prototype'][_0x54167d(0x39b)]=function(){const _0x30d984=_0x54167d;return Scene_Menu[_0x30d984(0x556)]['GoldRect'][_0x30d984(0x204)](this);},Scene_Menu[_0x54167d(0x4ec)]['statusWindowRect']=function(){const _0x49a859=_0x54167d;return Scene_Menu[_0x49a859(0x556)][_0x49a859(0x7fe)]['call'](this);},Scene_Item[_0x54167d(0x556)]=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)][_0x54167d(0x529)][_0x54167d(0x6f0)],VisuMZ['CoreEngine']['Scene_Item_create']=Scene_Item[_0x54167d(0x4ec)][_0x54167d(0x66b)],Scene_Item[_0x54167d(0x4ec)]['create']=function(){const _0x35f583=_0x54167d;VisuMZ['CoreEngine']['Scene_Item_create'][_0x35f583(0x204)](this),this[_0x35f583(0x8d9)]();},Scene_Item[_0x54167d(0x4ec)][_0x54167d(0x8d9)]=function(){const _0xb76591=_0x54167d;this[_0xb76591(0x98d)]&&this[_0xb76591(0x98d)][_0xb76591(0x6d0)](Scene_Item[_0xb76591(0x556)][_0xb76591(0x536)]);this[_0xb76591(0x850)]&&this[_0xb76591(0x850)][_0xb76591(0x6d0)](Scene_Item[_0xb76591(0x556)][_0xb76591(0x60f)]);if(this[_0xb76591(0x29e)]){if(_0xb76591(0x493)===_0xb76591(0x493))this[_0xb76591(0x29e)]['setBackgroundType'](Scene_Item[_0xb76591(0x556)]['ItemBgType']);else return _0x55611f['layoutSettings']['ActorRect']['call'](this);}if(this['_actorWindow']){if('WyyRM'===_0xb76591(0x2d3))return 0xc0;else this[_0xb76591(0x50e)][_0xb76591(0x6d0)](Scene_Item['layoutSettings']['ActorBgType']);}},Scene_Item[_0x54167d(0x4ec)]['helpWindowRect']=function(){const _0x13f22d=_0x54167d;return Scene_Item[_0x13f22d(0x556)][_0x13f22d(0x68d)][_0x13f22d(0x204)](this);},Scene_Item[_0x54167d(0x4ec)][_0x54167d(0x5ce)]=function(){return Scene_Item['layoutSettings']['CategoryRect']['call'](this);},Scene_Item['prototype']['itemWindowRect']=function(){const _0x499501=_0x54167d;return Scene_Item[_0x499501(0x556)][_0x499501(0x2b1)][_0x499501(0x204)](this);},Scene_Item['prototype'][_0x54167d(0x737)]=function(){const _0x470731=_0x54167d;return Scene_Item[_0x470731(0x556)]['ActorRect']['call'](this);},Scene_Skill[_0x54167d(0x556)]=VisuMZ['CoreEngine']['Settings'][_0x54167d(0x529)][_0x54167d(0x411)],VisuMZ[_0x54167d(0x940)][_0x54167d(0x947)]=Scene_Skill[_0x54167d(0x4ec)][_0x54167d(0x66b)],Scene_Skill[_0x54167d(0x4ec)][_0x54167d(0x66b)]=function(){const _0x3d8387=_0x54167d;VisuMZ[_0x3d8387(0x940)][_0x3d8387(0x947)][_0x3d8387(0x204)](this),this[_0x3d8387(0x8d9)]();},Scene_Skill[_0x54167d(0x4ec)][_0x54167d(0x8d9)]=function(){const _0x7d1159=_0x54167d;if(this[_0x7d1159(0x98d)]){if('uJZOs'!=='tZjcu')this[_0x7d1159(0x98d)][_0x7d1159(0x6d0)](Scene_Skill[_0x7d1159(0x556)][_0x7d1159(0x536)]);else return _0x56f4b4[_0x7d1159(0x940)]['Settings'][_0x7d1159(0x530)]['ActorTPColor']['call'](this,_0x4ec9e1);}this['_skillTypeWindow']&&this[_0x7d1159(0x2f4)][_0x7d1159(0x6d0)](Scene_Skill[_0x7d1159(0x556)]['SkillTypeBgType']);this[_0x7d1159(0x8b5)]&&this[_0x7d1159(0x8b5)]['setBackgroundType'](Scene_Skill[_0x7d1159(0x556)][_0x7d1159(0x342)]);if(this[_0x7d1159(0x29e)]){if(_0x7d1159(0x937)==='zsrKy')return 0x0;else this[_0x7d1159(0x29e)][_0x7d1159(0x6d0)](Scene_Skill[_0x7d1159(0x556)]['ItemBgType']);}this['_actorWindow']&&this[_0x7d1159(0x50e)][_0x7d1159(0x6d0)](Scene_Skill['layoutSettings'][_0x7d1159(0x79b)]);},Scene_Skill[_0x54167d(0x4ec)][_0x54167d(0x5a7)]=function(){const _0x2b6428=_0x54167d;return Scene_Skill[_0x2b6428(0x556)][_0x2b6428(0x68d)][_0x2b6428(0x204)](this);},Scene_Skill[_0x54167d(0x4ec)][_0x54167d(0x480)]=function(){const _0x42901a=_0x54167d;return Scene_Skill[_0x42901a(0x556)][_0x42901a(0x340)][_0x42901a(0x204)](this);},Scene_Skill[_0x54167d(0x4ec)]['statusWindowRect']=function(){const _0x161168=_0x54167d;return Scene_Skill['layoutSettings'][_0x161168(0x7fe)][_0x161168(0x204)](this);},Scene_Skill[_0x54167d(0x4ec)]['itemWindowRect']=function(){const _0x5da9e3=_0x54167d;return Scene_Skill[_0x5da9e3(0x556)][_0x5da9e3(0x2b1)]['call'](this);},Scene_Skill[_0x54167d(0x4ec)][_0x54167d(0x737)]=function(){const _0x4ade97=_0x54167d;return Scene_Skill['layoutSettings'][_0x4ade97(0x2e2)]['call'](this);},Scene_Equip[_0x54167d(0x556)]=VisuMZ[_0x54167d(0x940)]['Settings']['MenuLayout'][_0x54167d(0x88c)],VisuMZ['CoreEngine'][_0x54167d(0x591)]=Scene_Equip['prototype'][_0x54167d(0x66b)],Scene_Equip['prototype'][_0x54167d(0x66b)]=function(){const _0x1dfcfa=_0x54167d;VisuMZ['CoreEngine'][_0x1dfcfa(0x591)][_0x1dfcfa(0x204)](this),this['setCoreEngineUpdateWindowBg']();},Scene_Equip[_0x54167d(0x4ec)][_0x54167d(0x8d9)]=function(){const _0x185757=_0x54167d;this[_0x185757(0x98d)]&&this[_0x185757(0x98d)][_0x185757(0x6d0)](Scene_Equip[_0x185757(0x556)][_0x185757(0x536)]);this['_statusWindow']&&this[_0x185757(0x8b5)][_0x185757(0x6d0)](Scene_Equip['layoutSettings'][_0x185757(0x342)]);this[_0x185757(0x897)]&&this[_0x185757(0x897)][_0x185757(0x6d0)](Scene_Equip[_0x185757(0x556)][_0x185757(0x626)]);if(this[_0x185757(0x3a8)]){if('bbLGr'!=='mYHHe')this[_0x185757(0x3a8)][_0x185757(0x6d0)](Scene_Equip[_0x185757(0x556)]['SlotBgType']);else var _0x2e211d=_0x4a4c69[_0x185757(0x9d5)](_0x374964*0x2-0x1,'outbounce')*0.5+0.5;}this[_0x185757(0x29e)]&&('YFjbb'==='LczAt'?this[_0x185757(0x633)]():this['_itemWindow']['setBackgroundType'](Scene_Equip['layoutSettings'][_0x185757(0x585)]));},Scene_Equip[_0x54167d(0x4ec)][_0x54167d(0x5a7)]=function(){const _0x20b8c4=_0x54167d;return Scene_Equip[_0x20b8c4(0x556)][_0x20b8c4(0x68d)][_0x20b8c4(0x204)](this);},Scene_Equip['prototype'][_0x54167d(0x827)]=function(){const _0x3ae68f=_0x54167d;return Scene_Equip[_0x3ae68f(0x556)]['StatusRect'][_0x3ae68f(0x204)](this);},Scene_Equip[_0x54167d(0x4ec)][_0x54167d(0x9fc)]=function(){const _0x2bb454=_0x54167d;return Scene_Equip[_0x2bb454(0x556)]['CommandRect']['call'](this);},Scene_Equip[_0x54167d(0x4ec)]['slotWindowRect']=function(){const _0x312a1f=_0x54167d;return Scene_Equip[_0x312a1f(0x556)][_0x312a1f(0x8af)]['call'](this);},Scene_Equip['prototype'][_0x54167d(0x573)]=function(){const _0x4020b1=_0x54167d;return Scene_Equip[_0x4020b1(0x556)]['ItemRect'][_0x4020b1(0x204)](this);},Scene_Status[_0x54167d(0x556)]=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)][_0x54167d(0x529)][_0x54167d(0x7d3)],VisuMZ[_0x54167d(0x940)][_0x54167d(0x90f)]=Scene_Status[_0x54167d(0x4ec)]['create'],Scene_Status[_0x54167d(0x4ec)][_0x54167d(0x66b)]=function(){const _0x1a47ba=_0x54167d;VisuMZ[_0x1a47ba(0x940)][_0x1a47ba(0x90f)][_0x1a47ba(0x204)](this),this[_0x1a47ba(0x8d9)]();},Scene_Status['prototype'][_0x54167d(0x8d9)]=function(){const _0x158d41=_0x54167d;this['_profileWindow']&&this[_0x158d41(0x8ff)][_0x158d41(0x6d0)](Scene_Status['layoutSettings'][_0x158d41(0x48e)]),this[_0x158d41(0x8b5)]&&this['_statusWindow'][_0x158d41(0x6d0)](Scene_Status[_0x158d41(0x556)]['StatusBgType']),this[_0x158d41(0x7a7)]&&(_0x158d41(0x86b)==='FZPjo'?this[_0x158d41(0x7b8)]='FV':this[_0x158d41(0x7a7)][_0x158d41(0x6d0)](Scene_Status[_0x158d41(0x556)][_0x158d41(0x826)])),this[_0x158d41(0x8a8)]&&(_0x158d41(0x865)==='ZHHCK'?this[_0x158d41(0x8a8)][_0x158d41(0x6d0)](Scene_Status['layoutSettings'][_0x158d41(0x200)]):this[_0x158d41(0x8d7)](...arguments));},Scene_Status[_0x54167d(0x4ec)][_0x54167d(0x428)]=function(){const _0xb9f234=_0x54167d;return Scene_Status[_0xb9f234(0x556)]['ProfileRect'][_0xb9f234(0x204)](this);},Scene_Status[_0x54167d(0x4ec)][_0x54167d(0x827)]=function(){const _0x4cc2bd=_0x54167d;return Scene_Status['layoutSettings']['StatusRect'][_0x4cc2bd(0x204)](this);},Scene_Status[_0x54167d(0x4ec)][_0x54167d(0xa0a)]=function(){const _0x347930=_0x54167d;return Scene_Status['layoutSettings'][_0x347930(0x692)][_0x347930(0x204)](this);},Scene_Status[_0x54167d(0x4ec)][_0x54167d(0x3cc)]=function(){const _0x5c4e57=_0x54167d;return Scene_Status[_0x5c4e57(0x556)][_0x5c4e57(0x883)]['call'](this);},Scene_Options['layoutSettings']=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)][_0x54167d(0x529)]['OptionsMenu'],VisuMZ['CoreEngine']['Scene_Options_create']=Scene_Options['prototype'][_0x54167d(0x66b)],Scene_Options[_0x54167d(0x4ec)]['create']=function(){const _0x33c68b=_0x54167d;VisuMZ[_0x33c68b(0x940)][_0x33c68b(0x5e8)][_0x33c68b(0x204)](this),this[_0x33c68b(0x8d9)]();},Scene_Options['prototype'][_0x54167d(0x8d9)]=function(){const _0x1f3258=_0x54167d;this[_0x1f3258(0x866)]&&(_0x1f3258(0x9d6)!==_0x1f3258(0x857)?this[_0x1f3258(0x866)][_0x1f3258(0x6d0)](Scene_Options[_0x1f3258(0x556)]['OptionsBgType']):_0x1daebc(_0x552061));},Scene_Options['prototype'][_0x54167d(0x7dc)]=function(){const _0x31aef2=_0x54167d;return Scene_Options[_0x31aef2(0x556)][_0x31aef2(0x94b)][_0x31aef2(0x204)](this);},Scene_Save['layoutSettings']=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)][_0x54167d(0x529)][_0x54167d(0x5fa)],Scene_Save[_0x54167d(0x4ec)][_0x54167d(0x66b)]=function(){const _0x3e9e6b=_0x54167d;Scene_File[_0x3e9e6b(0x4ec)][_0x3e9e6b(0x66b)]['call'](this),this[_0x3e9e6b(0x8d9)]();},Scene_Save['prototype'][_0x54167d(0x8d9)]=function(){const _0x3b11ea=_0x54167d;if(this['_helpWindow']){if(_0x3b11ea(0x4b1)!=='VrfJe'){const _0x17cf5b=_0x38905e['value'](_0xd885e9);_0x4c6591['setValue'](_0x4980d4,!_0x17cf5b);}else this['_helpWindow']['setBackgroundType'](Scene_Save['layoutSettings'][_0x3b11ea(0x536)]);}if(this[_0x3b11ea(0x45c)]){if(_0x3b11ea(0x684)===_0x3b11ea(0x4ca))return _0x40098a[_0x3b11ea(0x940)][_0x3b11ea(0x331)]['TitleCommandList'][_0x3b11ea(0x95b)];else this[_0x3b11ea(0x45c)][_0x3b11ea(0x6d0)](Scene_Save[_0x3b11ea(0x556)][_0x3b11ea(0x9bd)]);}},Scene_Save[_0x54167d(0x4ec)][_0x54167d(0x5a7)]=function(){const _0x1b9a84=_0x54167d;return Scene_Save[_0x1b9a84(0x556)][_0x1b9a84(0x68d)]['call'](this);},Scene_Save[_0x54167d(0x4ec)][_0x54167d(0x291)]=function(){const _0x205935=_0x54167d;return Scene_Save[_0x205935(0x556)]['ListRect'][_0x205935(0x204)](this);},Scene_Load[_0x54167d(0x556)]=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)]['MenuLayout'][_0x54167d(0x980)],Scene_Load[_0x54167d(0x4ec)][_0x54167d(0x66b)]=function(){const _0x3017bd=_0x54167d;Scene_File[_0x3017bd(0x4ec)][_0x3017bd(0x66b)]['call'](this),this[_0x3017bd(0x8d9)]();},Scene_Load['prototype'][_0x54167d(0x8d9)]=function(){const _0x48d17e=_0x54167d;this[_0x48d17e(0x98d)]&&this['_helpWindow']['setBackgroundType'](Scene_Load['layoutSettings'][_0x48d17e(0x536)]),this[_0x48d17e(0x45c)]&&this[_0x48d17e(0x45c)]['setBackgroundType'](Scene_Load[_0x48d17e(0x556)][_0x48d17e(0x9bd)]);},Scene_Load[_0x54167d(0x4ec)][_0x54167d(0x5a7)]=function(){const _0x3faa2d=_0x54167d;return Scene_Load[_0x3faa2d(0x556)][_0x3faa2d(0x68d)]['call'](this);},Scene_Load[_0x54167d(0x4ec)][_0x54167d(0x291)]=function(){const _0x1f43b3=_0x54167d;return Scene_Load[_0x1f43b3(0x556)][_0x1f43b3(0x918)][_0x1f43b3(0x204)](this);},Scene_GameEnd[_0x54167d(0x556)]=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)][_0x54167d(0x529)][_0x54167d(0x39d)],VisuMZ[_0x54167d(0x940)][_0x54167d(0x9f0)]=Scene_GameEnd[_0x54167d(0x4ec)][_0x54167d(0x5a0)],Scene_GameEnd[_0x54167d(0x4ec)][_0x54167d(0x5a0)]=function(){const _0x459a99=_0x54167d;Scene_MenuBase[_0x459a99(0x4ec)][_0x459a99(0x5a0)][_0x459a99(0x204)](this);},Scene_GameEnd['prototype'][_0x54167d(0x255)]=function(){const _0x40858d=_0x54167d,_0x2e1700=this[_0x40858d(0x9fc)]();this[_0x40858d(0x897)]=new Window_GameEnd(_0x2e1700),this[_0x40858d(0x897)]['setHandler']('cancel',this[_0x40858d(0x6c9)][_0x40858d(0x6ac)](this)),this[_0x40858d(0x2a2)](this['_commandWindow']),this[_0x40858d(0x897)][_0x40858d(0x6d0)](Scene_GameEnd[_0x40858d(0x556)]['CommandBgType']);},Scene_GameEnd['prototype'][_0x54167d(0x9fc)]=function(){const _0x58cacf=_0x54167d;return Scene_GameEnd[_0x58cacf(0x556)]['CommandRect'][_0x58cacf(0x204)](this);},Scene_Shop[_0x54167d(0x556)]=VisuMZ[_0x54167d(0x940)]['Settings'][_0x54167d(0x529)][_0x54167d(0x8d2)],VisuMZ[_0x54167d(0x940)][_0x54167d(0x78e)]=Scene_Shop[_0x54167d(0x4ec)][_0x54167d(0x66b)],Scene_Shop[_0x54167d(0x4ec)]['create']=function(){const _0x3c1cd4=_0x54167d;VisuMZ['CoreEngine'][_0x3c1cd4(0x78e)][_0x3c1cd4(0x204)](this),this['setCoreEngineUpdateWindowBg']();},Scene_Shop[_0x54167d(0x4ec)][_0x54167d(0x8d9)]=function(){const _0x8e576e=_0x54167d;this[_0x8e576e(0x98d)]&&this[_0x8e576e(0x98d)][_0x8e576e(0x6d0)](Scene_Shop[_0x8e576e(0x556)][_0x8e576e(0x536)]);this[_0x8e576e(0x3e2)]&&(_0x8e576e(0x987)!==_0x8e576e(0x987)?this[_0x8e576e(0x606)]():this['_goldWindow'][_0x8e576e(0x6d0)](Scene_Shop[_0x8e576e(0x556)][_0x8e576e(0x579)]));this['_commandWindow']&&this['_commandWindow'][_0x8e576e(0x6d0)](Scene_Shop[_0x8e576e(0x556)][_0x8e576e(0x626)]);if(this['_dummyWindow']){if(_0x8e576e(0x26b)!==_0x8e576e(0x496))this[_0x8e576e(0x23e)][_0x8e576e(0x6d0)](Scene_Shop[_0x8e576e(0x556)][_0x8e576e(0x701)]);else return _0x68254e[_0x8e576e(0x940)][_0x8e576e(0x331)]['Window'][_0x8e576e(0x896)];}this['_numberWindow']&&(_0x8e576e(0x6f7)===_0x8e576e(0x6f7)?this['_numberWindow'][_0x8e576e(0x6d0)](Scene_Shop[_0x8e576e(0x556)][_0x8e576e(0x9b6)]):this[_0x8e576e(0x3d0)][_0x8e576e(0x6d0)](_0xb83232['layoutSettings'][_0x8e576e(0x35b)]));this[_0x8e576e(0x8b5)]&&this[_0x8e576e(0x8b5)][_0x8e576e(0x6d0)](Scene_Shop['layoutSettings'][_0x8e576e(0x342)]);this[_0x8e576e(0x6f8)]&&this['_buyWindow'][_0x8e576e(0x6d0)](Scene_Shop[_0x8e576e(0x556)][_0x8e576e(0x20b)]);this[_0x8e576e(0x850)]&&this[_0x8e576e(0x850)][_0x8e576e(0x6d0)](Scene_Shop['layoutSettings'][_0x8e576e(0x60f)]);if(this['_sellWindow']){if(_0x8e576e(0x372)!=='oTJUZ')this[_0x8e576e(0x37f)][_0x8e576e(0x6d0)](Scene_Shop[_0x8e576e(0x556)][_0x8e576e(0x6d7)]);else{this['resetFontSettings'](),this['contents'][_0x8e576e(0x531)](),this[_0x8e576e(0x9a3)][_0x8e576e(0x79f)]=_0xbcd317[_0x8e576e(0x940)][_0x8e576e(0x331)][_0x8e576e(0x67c)]['GoldFontSize'];const _0x5ca68f=_0x4a051c[_0x8e576e(0x940)][_0x8e576e(0x331)][_0x8e576e(0x67c)][_0x8e576e(0x6f4)],_0x23f6b7=this['itemLineRect'](0x0);if(_0x5ca68f>0x0){const _0x49e119=_0x23f6b7['y']+(this[_0x8e576e(0x7c4)]()-_0x57258c['iconHeight'])/0x2;this[_0x8e576e(0x84d)](_0x5ca68f,_0x23f6b7['x'],_0x49e119);const _0x27f6f1=_0x5a4905[_0x8e576e(0x28b)]+0x4;_0x23f6b7['x']+=_0x27f6f1,_0x23f6b7[_0x8e576e(0x281)]-=_0x27f6f1;}this[_0x8e576e(0x378)](_0x1a0e6e[_0x8e576e(0x636)]()),this[_0x8e576e(0x2cc)](this[_0x8e576e(0x925)](),_0x23f6b7['x'],_0x23f6b7['y'],_0x23f6b7['width'],_0x8e576e(0x750));const _0x5b91b7=this['textWidth'](this[_0x8e576e(0x925)]())+0x6;;_0x23f6b7['x']+=_0x5b91b7,_0x23f6b7[_0x8e576e(0x281)]-=_0x5b91b7,this[_0x8e576e(0x32c)]();const _0x161b72=this['value'](),_0x5640ba=this['textWidth'](this[_0x8e576e(0x794)]?_0x2627eb[_0x8e576e(0x5da)](this['value']()):this[_0x8e576e(0x570)]());_0x5640ba>_0x23f6b7[_0x8e576e(0x281)]?this[_0x8e576e(0x2cc)](_0x1a31c3[_0x8e576e(0x940)]['Settings'][_0x8e576e(0x67c)][_0x8e576e(0x568)],_0x23f6b7['x'],_0x23f6b7['y'],_0x23f6b7[_0x8e576e(0x281)],_0x8e576e(0x231)):this[_0x8e576e(0x2cc)](this[_0x8e576e(0x570)](),_0x23f6b7['x'],_0x23f6b7['y'],_0x23f6b7['width'],_0x8e576e(0x231)),this[_0x8e576e(0x723)]();}}},Scene_Shop['prototype']['helpWindowRect']=function(){const _0x5cd457=_0x54167d;return Scene_Shop[_0x5cd457(0x556)][_0x5cd457(0x68d)][_0x5cd457(0x204)](this);},Scene_Shop['prototype'][_0x54167d(0x39b)]=function(){const _0x2f2dfa=_0x54167d;return Scene_Shop[_0x2f2dfa(0x556)][_0x2f2dfa(0x978)][_0x2f2dfa(0x204)](this);},Scene_Shop[_0x54167d(0x4ec)][_0x54167d(0x9fc)]=function(){const _0x4009b5=_0x54167d;return Scene_Shop[_0x4009b5(0x556)][_0x4009b5(0x41a)][_0x4009b5(0x204)](this);},Scene_Shop[_0x54167d(0x4ec)][_0x54167d(0x3aa)]=function(){const _0x3c5c3e=_0x54167d;return Scene_Shop[_0x3c5c3e(0x556)][_0x3c5c3e(0x2cf)][_0x3c5c3e(0x204)](this);},Scene_Shop[_0x54167d(0x4ec)][_0x54167d(0x459)]=function(){const _0x3fcc28=_0x54167d;return Scene_Shop[_0x3fcc28(0x556)][_0x3fcc28(0x275)]['call'](this);},Scene_Shop[_0x54167d(0x4ec)][_0x54167d(0x827)]=function(){const _0x5a37e8=_0x54167d;return Scene_Shop[_0x5a37e8(0x556)][_0x5a37e8(0x7fe)][_0x5a37e8(0x204)](this);},Scene_Shop[_0x54167d(0x4ec)][_0x54167d(0x625)]=function(){const _0x513cd2=_0x54167d;return Scene_Shop['layoutSettings']['BuyRect'][_0x513cd2(0x204)](this);},Scene_Shop['prototype']['categoryWindowRect']=function(){const _0x37f4d9=_0x54167d;return Scene_Shop[_0x37f4d9(0x556)][_0x37f4d9(0x5ab)]['call'](this);},Scene_Shop[_0x54167d(0x4ec)][_0x54167d(0x5f1)]=function(){const _0x555aeb=_0x54167d;return Scene_Shop[_0x555aeb(0x556)]['SellRect']['call'](this);},Scene_Name['layoutSettings']=VisuMZ['CoreEngine']['Settings'][_0x54167d(0x529)]['NameMenu'],VisuMZ[_0x54167d(0x940)][_0x54167d(0x7e6)]=Scene_Name['prototype'][_0x54167d(0x66b)],Scene_Name[_0x54167d(0x4ec)][_0x54167d(0x66b)]=function(){const _0x304b67=_0x54167d;VisuMZ[_0x304b67(0x940)][_0x304b67(0x7e6)]['call'](this),this[_0x304b67(0x8d9)]();},Scene_Name[_0x54167d(0x4ec)][_0x54167d(0x8d9)]=function(){const _0x3cdaa9=_0x54167d;this[_0x3cdaa9(0x3d0)]&&this[_0x3cdaa9(0x3d0)][_0x3cdaa9(0x6d0)](Scene_Name[_0x3cdaa9(0x556)][_0x3cdaa9(0x35b)]),this[_0x3cdaa9(0x8d1)]&&this[_0x3cdaa9(0x8d1)]['setBackgroundType'](Scene_Name[_0x3cdaa9(0x556)][_0x3cdaa9(0x60b)]);},Scene_Name[_0x54167d(0x4ec)]['helpAreaHeight']=function(){return 0x0;},Scene_Name[_0x54167d(0x4ec)][_0x54167d(0x681)]=function(){const _0x5dc4be=_0x54167d;return Scene_Name[_0x5dc4be(0x556)][_0x5dc4be(0x6cb)][_0x5dc4be(0x204)](this);},Scene_Name[_0x54167d(0x4ec)][_0x54167d(0x287)]=function(){const _0x362726=_0x54167d;return Scene_Name['layoutSettings'][_0x362726(0x838)]['call'](this);},Scene_Name[_0x54167d(0x4ec)][_0x54167d(0x257)]=function(){const _0x1c6468=_0x54167d;if(!this['_inputWindow'])return![];return VisuMZ[_0x1c6468(0x940)][_0x1c6468(0x331)]['KeyboardInput'][_0x1c6468(0x257)];},Scene_Name[_0x54167d(0x4ec)][_0x54167d(0x4e8)]=function(){const _0x203ca7=_0x54167d;if(this[_0x203ca7(0x257)]()){if(_0x203ca7(0x672)!==_0x203ca7(0x4d9))return TextManager[_0x203ca7(0x9fd)](_0x203ca7(0x846));else this['createFauxAnimation'](_0x5a30ab);}else return Scene_MenuBase[_0x203ca7(0x4ec)][_0x203ca7(0x4e8)][_0x203ca7(0x204)](this);},Scene_Name['prototype'][_0x54167d(0x322)]=function(){const _0x4cdc71=_0x54167d;if(this[_0x4cdc71(0x257)]()){if('HFWnn'===_0x4cdc71(0x439)){if(_0x5ee684[_0x4cdc71(0x48d)][_0x4cdc71(0x204)](this)){const _0xc6a880=_0x4e36c1[_0x4cdc71(0x221)];let _0x1252d8=_0x5df453['TextStr'];if(['',_0x4cdc71(0x916)][_0x4cdc71(0x9ef)](_0x1252d8))_0x1252d8=_0x5cd9c6[_0x4cdc71(0x424)][_0x4cdc71(0x204)](this);const _0x5bd723=_0x354ad9[_0x4cdc71(0x338)][_0x4cdc71(0x204)](this),_0x1eaf5f=_0x5ed5b4[_0x4cdc71(0x5c8)][_0x4cdc71(0x204)](this);this['addCommand'](_0x1252d8,_0xc6a880,_0x5bd723,_0x1eaf5f),this['setHandler'](_0xc6a880,_0x5520ad[_0x4cdc71(0x406)][_0x4cdc71(0x6ac)](this,_0x1eaf5f));}}else{const _0x5955c6=VisuMZ[_0x4cdc71(0x940)][_0x4cdc71(0x331)][_0x4cdc71(0x8a6)];return this['_inputWindow'][_0x4cdc71(0x51e)]===_0x4cdc71(0x97f)?_0x4cdc71(0x410)===_0x4cdc71(0x410)?_0x5955c6[_0x4cdc71(0x429)]||_0x4cdc71(0x429):_0x1b9046(_0x209a65)[_0x4cdc71(0x541)](_0x5d3fe0,_0x57455f)+',':_0x5955c6[_0x4cdc71(0x6a2)]||_0x4cdc71(0x6a2);}}else return Scene_MenuBase[_0x4cdc71(0x4ec)]['buttonAssistText1']['call'](this);},VisuMZ['CoreEngine'][_0x54167d(0x9d8)]=Scene_Name[_0x54167d(0x4ec)][_0x54167d(0x4e9)],Scene_Name[_0x54167d(0x4ec)][_0x54167d(0x4e9)]=function(){const _0x34967b=_0x54167d;if(this[_0x34967b(0x29c)]()){if(_0x34967b(0x479)!=='oniEs')return _0x56529f[_0x34967b(0x8ef)]()||_0x2443f0[_0x34967b(0x8a4)]()?_0x3364e4[_0x34967b(0x940)][_0x34967b(0x331)][_0x34967b(0x464)][_0x34967b(0x54d)]:_0x34967b(0x926);else this[_0x34967b(0x4aa)]();}else VisuMZ['CoreEngine'][_0x34967b(0x9d8)]['call'](this);},Scene_Name[_0x54167d(0x4ec)][_0x54167d(0x29c)]=function(){const _0x264a8a=_0x54167d,_0x5f087e=VisuMZ[_0x264a8a(0x940)][_0x264a8a(0x331)][_0x264a8a(0x8a6)];if(!_0x5f087e)return![];const _0x260b0a=_0x5f087e[_0x264a8a(0x2b9)];if(!_0x260b0a)return![];const _0x24082a=this[_0x264a8a(0x3d0)][_0x264a8a(0x614)]()[_0x264a8a(0x6aa)]();for(const _0x56ff0d of _0x260b0a){if(_0x264a8a(0x3c0)!==_0x264a8a(0x3c0))this[_0x264a8a(0x228)][_0x264a8a(0x954)]();else{if(_0x24082a[_0x264a8a(0x9ef)](_0x56ff0d[_0x264a8a(0x6aa)]()))return!![];}}return![];},Scene_Name[_0x54167d(0x4ec)][_0x54167d(0x4aa)]=function(){SoundManager['playBuzzer']();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x2c5)]=Scene_Battle['prototype'][_0x54167d(0x3b5)],Scene_Battle['prototype'][_0x54167d(0x3b5)]=function(){const _0x153610=_0x54167d;VisuMZ[_0x153610(0x940)][_0x153610(0x2c5)][_0x153610(0x204)](this);if($gameTemp[_0x153610(0x542)])this[_0x153610(0x220)]();},Scene_Battle[_0x54167d(0x4ec)][_0x54167d(0x220)]=function(){const _0x1deb02=_0x54167d;!BattleManager[_0x1deb02(0x5ee)]()&&!this[_0x1deb02(0x34a)]&&!$gameMessage[_0x1deb02(0x68c)]()&&(this[_0x1deb02(0x34a)]=!![],this[_0x1deb02(0x3b5)](),SceneManager['updateEffekseer'](),this[_0x1deb02(0x34a)]=![]);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x5db)]=Scene_Battle[_0x54167d(0x4ec)][_0x54167d(0x83e)],Scene_Battle['prototype'][_0x54167d(0x83e)]=function(){const _0x23be9a=_0x54167d;VisuMZ[_0x23be9a(0x940)][_0x23be9a(0x5db)][_0x23be9a(0x204)](this),SceneManager[_0x23be9a(0x8ef)]()&&this[_0x23be9a(0x3ef)]();},Scene_Battle[_0x54167d(0x4ec)][_0x54167d(0x3ef)]=function(){const _0x5b36ca=_0x54167d;this['_cancelButton']['x']=Graphics['boxWidth']+0x4,this[_0x5b36ca(0x9f2)]()?this[_0x5b36ca(0x844)]['y']=Graphics[_0x5b36ca(0x996)]-this[_0x5b36ca(0x694)]():_0x5b36ca(0x6a0)!==_0x5b36ca(0x6a0)?this[_0x5b36ca(0x545)](_0x5b8877[_0x5b36ca(0x50c)]()['name'],_0x20ac89,_0x1ce885,_0x2cc8bd):this[_0x5b36ca(0x844)]['y']=0x0;},VisuMZ['CoreEngine']['Sprite_Button_initialize']=Sprite_Button[_0x54167d(0x4ec)][_0x54167d(0x8d7)],Sprite_Button[_0x54167d(0x4ec)]['initialize']=function(_0x1f6bfc){const _0x4ab647=_0x54167d;VisuMZ['CoreEngine'][_0x4ab647(0x571)][_0x4ab647(0x204)](this,_0x1f6bfc),this['initButtonHidden']();},Sprite_Button[_0x54167d(0x4ec)][_0x54167d(0x8c3)]=function(){const _0xf45f37=_0x54167d,_0x236d34=VisuMZ[_0xf45f37(0x940)][_0xf45f37(0x331)]['UI'];this[_0xf45f37(0x66e)]=![];switch(this[_0xf45f37(0x4f0)]){case'cancel':this[_0xf45f37(0x66e)]=!_0x236d34[_0xf45f37(0x6a1)];break;case _0xf45f37(0x5ae):case _0xf45f37(0x316):this['_isButtonHidden']=!_0x236d34['pagedownShowButton'];break;case _0xf45f37(0x83a):case'up':case _0xf45f37(0x822):case _0xf45f37(0x71b):case'ok':this['_isButtonHidden']=!_0x236d34[_0xf45f37(0x781)];break;case _0xf45f37(0x47c):this['_isButtonHidden']=!_0x236d34[_0xf45f37(0x4a1)];break;}},VisuMZ['CoreEngine'][_0x54167d(0x71d)]=Sprite_Button[_0x54167d(0x4ec)][_0x54167d(0x38c)],Sprite_Button[_0x54167d(0x4ec)][_0x54167d(0x38c)]=function(){const _0xb92a3b=_0x54167d;SceneManager[_0xb92a3b(0x8a4)]()||this['_isButtonHidden']?this['hideButtonFromView']():VisuMZ['CoreEngine']['Sprite_Button_updateOpacity']['call'](this);},Sprite_Button['prototype'][_0x54167d(0x23c)]=function(){const _0x3b670b=_0x54167d;this[_0x3b670b(0x572)]=![],this[_0x3b670b(0x7de)]=0x0,this['x']=Graphics[_0x3b670b(0x281)]*0xa,this['y']=Graphics[_0x3b670b(0x3e1)]*0xa;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x278)]=Sprite_Battler[_0x54167d(0x4ec)][_0x54167d(0x725)],Sprite_Battler[_0x54167d(0x4ec)][_0x54167d(0x725)]=function(_0x180166,_0x190b2e,_0x4b7bd1){const _0x2c7cbe=_0x54167d;(this[_0x2c7cbe(0x565)]!==_0x180166||this[_0x2c7cbe(0x997)]!==_0x190b2e)&&(this[_0x2c7cbe(0x365)](_0x2c7cbe(0x33c)),this[_0x2c7cbe(0x402)]=_0x4b7bd1),VisuMZ['CoreEngine'][_0x2c7cbe(0x278)][_0x2c7cbe(0x204)](this,_0x180166,_0x190b2e,_0x4b7bd1);},Sprite_Battler[_0x54167d(0x4ec)]['setMoveEasingType']=function(_0xcef5d7){const _0x365656=_0x54167d;this[_0x365656(0x911)]=_0xcef5d7;},Sprite_Battler[_0x54167d(0x4ec)][_0x54167d(0x229)]=function(){const _0x106512=_0x54167d;if(this[_0x106512(0x9a8)]<=0x0)return;const _0x23006d=this['_movementDuration'],_0x581281=this[_0x106512(0x402)],_0x302c2f=this['_moveEasingType'];this['_offsetX']=this[_0x106512(0x80d)](this[_0x106512(0x5ad)],this[_0x106512(0x565)],_0x23006d,_0x581281,_0x302c2f),this[_0x106512(0x7d6)]=this[_0x106512(0x80d)](this['_offsetY'],this[_0x106512(0x997)],_0x23006d,_0x581281,_0x302c2f),this[_0x106512(0x9a8)]--;if(this[_0x106512(0x9a8)]<=0x0)this['onMoveEnd']();},Sprite_Battler['prototype'][_0x54167d(0x80d)]=function(_0x276b6f,_0x35995e,_0x3f6652,_0x17cde2,_0x185024){const _0x5ee23d=_0x54167d,_0x5c6bc1=VisuMZ[_0x5ee23d(0x9d5)]((_0x17cde2-_0x3f6652)/_0x17cde2,_0x185024||_0x5ee23d(0x33c)),_0x22d2c9=VisuMZ[_0x5ee23d(0x9d5)]((_0x17cde2-_0x3f6652+0x1)/_0x17cde2,_0x185024||_0x5ee23d(0x33c)),_0x2b2954=(_0x276b6f-_0x35995e*_0x5c6bc1)/(0x1-_0x5c6bc1);return _0x2b2954+(_0x35995e-_0x2b2954)*_0x22d2c9;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x596)]=Sprite_Actor['prototype'][_0x54167d(0x349)],Sprite_Actor[_0x54167d(0x4ec)]['setActorHome']=function(_0x398313){const _0x560a2c=_0x54167d;if(VisuMZ[_0x560a2c(0x940)][_0x560a2c(0x331)]['UI'][_0x560a2c(0x687)]){if(_0x560a2c(0x369)!==_0x560a2c(0x369))return _0x537c32[_0x560a2c(0x556)][_0x560a2c(0x41a)][_0x560a2c(0x204)](this);else this['setActorHomeRepositioned'](_0x398313);}else{if(_0x560a2c(0x3a6)!==_0x560a2c(0x3a6))return![];else VisuMZ[_0x560a2c(0x940)][_0x560a2c(0x596)][_0x560a2c(0x204)](this,_0x398313);}},Sprite_Actor[_0x54167d(0x4ec)]['setActorHomeRepositioned']=function(_0x3755ec){const _0x4c5d0b=_0x54167d;let _0x36f407=Math['round'](Graphics[_0x4c5d0b(0x281)]/0x2+0xc0);_0x36f407-=Math[_0x4c5d0b(0x42f)]((Graphics[_0x4c5d0b(0x281)]-Graphics[_0x4c5d0b(0x497)])/0x2),_0x36f407+=_0x3755ec*0x20;let _0x2f9a39=Graphics[_0x4c5d0b(0x3e1)]-0xc8-$gameParty[_0x4c5d0b(0x674)]()*0x30;_0x2f9a39-=Math[_0x4c5d0b(0x42f)]((Graphics['height']-Graphics['boxHeight'])/0x2),_0x2f9a39+=_0x3755ec*0x30,this[_0x4c5d0b(0x5d8)](_0x36f407,_0x2f9a39);},Sprite_Actor[_0x54167d(0x4ec)][_0x54167d(0x8cf)]=function(){const _0x6aabf3=_0x54167d;this[_0x6aabf3(0x725)](0x4b0,0x0,0x78);},Sprite_Animation[_0x54167d(0x4ec)][_0x54167d(0x20f)]=function(_0x5b5758){const _0x3c3bfb=_0x54167d;this[_0x3c3bfb(0x4f8)]=_0x5b5758;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x230)]=Sprite_Animation[_0x54167d(0x4ec)]['processSoundTimings'],Sprite_Animation['prototype'][_0x54167d(0x688)]=function(){const _0x163ab9=_0x54167d;if(this[_0x163ab9(0x4f8)])return;VisuMZ[_0x163ab9(0x940)][_0x163ab9(0x230)][_0x163ab9(0x204)](this);},VisuMZ[_0x54167d(0x940)]['Sprite_Animation_setViewport']=Sprite_Animation[_0x54167d(0x4ec)][_0x54167d(0x81c)],Sprite_Animation[_0x54167d(0x4ec)]['setViewport']=function(_0x3ca743){const _0x594736=_0x54167d;this[_0x594736(0x31b)]()?_0x594736(0x52b)!==_0x594736(0x8b6)?this['setViewportCoreEngineFix'](_0x3ca743):this[_0x594736(0x4ad)]():VisuMZ[_0x594736(0x940)]['Sprite_Animation_setViewport'][_0x594736(0x204)](this,_0x3ca743);},Sprite_Animation['prototype'][_0x54167d(0x31b)]=function(){const _0x99650a=_0x54167d;if(!this[_0x99650a(0x6e1)])return![];const _0x485d31=this[_0x99650a(0x6e1)][_0x99650a(0x614)]||'';if(_0x485d31[_0x99650a(0x59b)](/<MIRROR OFFSET X>/i))return!![];if(_0x485d31[_0x99650a(0x59b)](/<NO MIRROR OFFSET X>/i))return![];return VisuMZ[_0x99650a(0x940)][_0x99650a(0x331)][_0x99650a(0x2e9)][_0x99650a(0x98e)];},Sprite_Animation[_0x54167d(0x4ec)][_0x54167d(0x50f)]=function(_0x42962a){const _0x3a1726=_0x54167d,_0x2a7395=this['_viewportSize'],_0x13f24f=this[_0x3a1726(0x894)],_0x233117=this[_0x3a1726(0x6e1)][_0x3a1726(0x502)]*(this[_0x3a1726(0x259)]?-0x1:0x1)-_0x2a7395/0x2,_0x4154cf=this['_animation'][_0x3a1726(0x8e4)]-_0x13f24f/0x2,_0x2a6d59=this['targetPosition'](_0x42962a);_0x42962a['gl']['viewport'](_0x233117+_0x2a6d59['x'],_0x4154cf+_0x2a6d59['y'],_0x2a7395,_0x13f24f);},Sprite_Animation['prototype']['targetSpritePosition']=function(_0x4f58c0){const _0x1c21e3=_0x54167d;if(_0x4f58c0[_0x1c21e3(0x9cd)]){}const _0x1b0ae5=this[_0x1c21e3(0x6e1)]['name'];let _0x4712d4=_0x4f58c0[_0x1c21e3(0x3e1)]*_0x4f58c0[_0x1c21e3(0x81a)]['y'],_0xbe422a=0x0,_0xd6df38=-_0x4712d4/0x2;if(_0x1b0ae5[_0x1c21e3(0x59b)](/<(?:HEAD|HEADER|TOP)>/i))_0xd6df38=-_0x4712d4;if(_0x1b0ae5['match'](/<(?:FOOT|FOOTER|BOTTOM)>/i))_0xd6df38=0x0;if(this[_0x1c21e3(0x6e1)][_0x1c21e3(0x7c5)])_0xd6df38=0x0;if(_0x1b0ae5[_0x1c21e3(0x59b)](/<(?:LEFT)>/i))_0xbe422a=-_0x4f58c0[_0x1c21e3(0x281)]/0x2;if(_0x1b0ae5[_0x1c21e3(0x59b)](/<(?:RIGHT)>/i))_0xbe422a=_0x4f58c0[_0x1c21e3(0x281)]/0x2;if(_0x1b0ae5[_0x1c21e3(0x59b)](/<ANCHOR X:[ ](\d+\.?\d*)>/i)){if('WSvSv'!==_0x1c21e3(0x557)){if(!this[_0x1c21e3(0x8ed)]())return;this['refresh']();}else _0xbe422a=Number(RegExp['$1'])*_0x4f58c0[_0x1c21e3(0x281)];}_0x1b0ae5[_0x1c21e3(0x59b)](/<ANCHOR Y:[ ](\d+\.?\d*)>/i)&&(_0xd6df38=(0x1-Number(RegExp['$1']))*-_0x4712d4);_0x1b0ae5[_0x1c21e3(0x59b)](/<ANCHOR:[ ](\d+\.?\d*),[ ](\d+\.?\d*)>/i)&&(_0xbe422a=Number(RegExp['$1'])*_0x4f58c0[_0x1c21e3(0x281)],_0xd6df38=(0x1-Number(RegExp['$2']))*-_0x4712d4);if(_0x1b0ae5['match'](/<OFFSET X:[ ]([\+\-]\d+)>/i))_0xbe422a+=Number(RegExp['$1']);if(_0x1b0ae5[_0x1c21e3(0x59b)](/<OFFSET Y:[ ]([\+\-]\d+)>/i))_0xd6df38+=Number(RegExp['$1']);_0x1b0ae5['match'](/<OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i)&&(_0xbe422a+=Number(RegExp['$1']),_0xd6df38+=Number(RegExp['$2']));const _0x28de73=new Point(_0xbe422a,_0xd6df38);return _0x4f58c0[_0x1c21e3(0x23f)](),_0x4f58c0['worldTransform'][_0x1c21e3(0x6b2)](_0x28de73);},Sprite_AnimationMV[_0x54167d(0x4ec)][_0x54167d(0x6fe)]=function(){const _0x13e78a=_0x54167d;this[_0x13e78a(0x989)]=VisuMZ[_0x13e78a(0x940)][_0x13e78a(0x331)]['QoL'][_0x13e78a(0x8b3)]??0x4,this[_0x13e78a(0x2ba)](),this[_0x13e78a(0x989)]=this[_0x13e78a(0x989)]['clamp'](0x1,0xa);},Sprite_AnimationMV['prototype'][_0x54167d(0x2ba)]=function(){const _0x22ad83=_0x54167d;if(!this[_0x22ad83(0x6e1)]);const _0x36e555=this[_0x22ad83(0x6e1)][_0x22ad83(0x614)]||'';if(_0x36e555[_0x22ad83(0x59b)](/<RATE:[ ](\d+)>/i)){if('AYaIy'!==_0x22ad83(0x352))this[_0x22ad83(0x989)]=(Number(RegExp['$1'])||0x1)[_0x22ad83(0x29b)](0x1,0xa);else{const _0x20aac9=_0x503ae9(_0x28dfe9['$1']);_0x20aac9!==_0x235117[_0x30e110][_0x22ad83(0x553)]&&(_0x3d5784(_0x22ad83(0x21e)[_0x22ad83(0x482)](_0x5b2d40,_0x20aac9)),_0x2ffcd9[_0x22ad83(0x4fc)]());}}},Sprite_AnimationMV['prototype'][_0x54167d(0x20f)]=function(_0x5333b8){const _0x14710a=_0x54167d;this[_0x14710a(0x4f8)]=_0x5333b8;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x2e0)]=Sprite_AnimationMV[_0x54167d(0x4ec)]['processTimingData'],Sprite_AnimationMV['prototype'][_0x54167d(0x2d6)]=function(_0xc28449){const _0x2f0f1c=_0x54167d;this[_0x2f0f1c(0x4f8)]&&(_0xc28449=JsonEx[_0x2f0f1c(0x419)](_0xc28449),_0xc28449['se']&&(_0xc28449['se'][_0x2f0f1c(0xa0c)]=0x0)),VisuMZ['CoreEngine'][_0x2f0f1c(0x2e0)][_0x2f0f1c(0x204)](this,_0xc28449);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x547)]=Sprite_AnimationMV['prototype'][_0x54167d(0x4a2)],Sprite_AnimationMV[_0x54167d(0x4ec)][_0x54167d(0x4a2)]=function(){const _0x27aa4a=_0x54167d;VisuMZ['CoreEngine'][_0x27aa4a(0x547)]['call'](this);if(this[_0x27aa4a(0x6e1)][_0x27aa4a(0xa17)]===0x3){if(this['x']===0x0)this['x']=Math[_0x27aa4a(0x3ad)](Graphics[_0x27aa4a(0x281)]/0x2);if(this['y']===0x0)this['y']=Math[_0x27aa4a(0x3ad)](Graphics[_0x27aa4a(0x3e1)]/0x2);}},Sprite_Damage[_0x54167d(0x4ec)]['createDigits']=function(_0x3f2f8c){const _0x50f151=_0x54167d;let _0x30f155=Math[_0x50f151(0x8bf)](_0x3f2f8c)['toString']();if(this[_0x50f151(0x796)]()){if(_0x50f151(0x325)==='mJmpI')_0x30f155=VisuMZ[_0x50f151(0x5da)](_0x30f155);else return _0x111c65&&_0x5aa654['note']&&_0x1432b1[_0x50f151(0x31a)][_0x50f151(0x59b)](/<MINIMUM ENCOUNTER STEPS:[ ](\d+)>/i)?_0x2fc2c5(_0x5788dd['$1']):_0x47f588['CoreEngine'][_0x50f151(0x331)][_0x50f151(0x2e9)][_0x50f151(0x829)];}const _0x2fc73b=this[_0x50f151(0x79f)](),_0x60479f=Math[_0x50f151(0x42f)](_0x2fc73b*0.75);for(let _0x4f2daf=0x0;_0x4f2daf<_0x30f155[_0x50f151(0x95b)];_0x4f2daf++){const _0x524f93=this[_0x50f151(0x239)](_0x60479f,_0x2fc73b);_0x524f93['bitmap'][_0x50f151(0x2cc)](_0x30f155[_0x4f2daf],0x0,0x0,_0x60479f,_0x2fc73b,_0x50f151(0x68b)),_0x524f93['x']=(_0x4f2daf-(_0x30f155[_0x50f151(0x95b)]-0x1)/0x2)*_0x60479f,_0x524f93['dy']=-_0x4f2daf;}},Sprite_Damage[_0x54167d(0x4ec)][_0x54167d(0x796)]=function(){const _0x2a2a6e=_0x54167d;return VisuMZ[_0x2a2a6e(0x940)][_0x2a2a6e(0x331)]['QoL']['DigitGroupingDamageSprites'];},Sprite_Damage[_0x54167d(0x4ec)][_0x54167d(0x8c4)]=function(){const _0x229793=_0x54167d;return ColorManager[_0x229793(0x403)]();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x2b6)]=Sprite_Gauge['prototype'][_0x54167d(0x512)],Sprite_Gauge['prototype'][_0x54167d(0x512)]=function(){const _0x11f3a2=_0x54167d;return VisuMZ[_0x11f3a2(0x940)][_0x11f3a2(0x2b6)][_0x11f3a2(0x204)](this)['clamp'](0x0,0x1);},VisuMZ['CoreEngine'][_0x54167d(0x691)]=Sprite_Gauge['prototype'][_0x54167d(0x858)],Sprite_Gauge[_0x54167d(0x4ec)][_0x54167d(0x858)]=function(){const _0x4a00b1=_0x54167d;let _0x30eb6b=VisuMZ[_0x4a00b1(0x940)][_0x4a00b1(0x691)][_0x4a00b1(0x204)](this);return _0x30eb6b;},Sprite_Gauge[_0x54167d(0x4ec)][_0x54167d(0x39f)]=function(){const _0x49d03d=_0x54167d;let _0x553a19=this[_0x49d03d(0x858)]();if(this[_0x49d03d(0x796)]()){if(_0x49d03d(0x73a)===_0x49d03d(0x5ba))return!![];else _0x553a19=VisuMZ['GroupDigits'](_0x553a19);}const _0x126ed1=this[_0x49d03d(0x5cb)]()-0x1,_0x244163=this[_0x49d03d(0x2de)]?this[_0x49d03d(0x2de)]():this[_0x49d03d(0x9b5)]();this[_0x49d03d(0x513)](),this['bitmap']['drawText'](_0x553a19,0x0,0x0,_0x126ed1,_0x244163,_0x49d03d(0x231));},Sprite_Gauge['prototype']['valueOutlineWidth']=function(){return 0x3;},Sprite_Gauge[_0x54167d(0x4ec)][_0x54167d(0x796)]=function(){const _0xbb499=_0x54167d;return VisuMZ[_0xbb499(0x940)][_0xbb499(0x331)]['QoL'][_0xbb499(0x4a4)];},Sprite_Gauge['prototype'][_0x54167d(0x8c4)]=function(){const _0x5baa79=_0x54167d;return ColorManager[_0x5baa79(0x249)]();},VisuMZ[_0x54167d(0x940)]['Sprite_Picture_loadBitmap']=Sprite_Picture['prototype'][_0x54167d(0x4e3)],Sprite_Picture[_0x54167d(0x4ec)][_0x54167d(0x4e3)]=function(){const _0x595072=_0x54167d;if(this[_0x595072(0x55e)]['match'](/VisuMZ CoreEngine PictureIcon (\d+)/i)){if(_0x595072(0x83f)===_0x595072(0x7f2))return _0x2b770e[_0x595072(0x940)]['Settings'][_0x595072(0x2e9)][_0x595072(0x80a)]??!![];else this['loadIconBitmap'](Number(RegExp['$1']));}else VisuMZ[_0x595072(0x940)][_0x595072(0x3d1)][_0x595072(0x204)](this);},Sprite_Picture['prototype'][_0x54167d(0x2dc)]=function(_0x4c2ddd){const _0x42fbd8=_0x54167d,_0x23e40e=ImageManager[_0x42fbd8(0x28b)],_0x4d7011=ImageManager['iconHeight'],_0x28c7fb=this[_0x42fbd8(0x55e)][_0x42fbd8(0x59b)](/SMOOTH/i);this[_0x42fbd8(0x228)]=new Bitmap(_0x23e40e,_0x4d7011);const _0xb8f7b1=ImageManager['loadSystem'](_0x42fbd8(0x409)),_0x35a147=_0x4c2ddd%0x10*_0x23e40e,_0x4c5229=Math[_0x42fbd8(0x42f)](_0x4c2ddd/0x10)*_0x4d7011;this['bitmap'][_0x42fbd8(0x4d0)]=_0x28c7fb,this['bitmap'][_0x42fbd8(0x46f)](_0xb8f7b1,_0x35a147,_0x4c5229,_0x23e40e,_0x4d7011,0x0,0x0,_0x23e40e,_0x4d7011);};function Sprite_TitlePictureButton(){const _0x482244=_0x54167d;this[_0x482244(0x8d7)](...arguments);}Sprite_TitlePictureButton[_0x54167d(0x4ec)]=Object['create'](Sprite_Clickable[_0x54167d(0x4ec)]),Sprite_TitlePictureButton[_0x54167d(0x4ec)][_0x54167d(0x4a9)]=Sprite_TitlePictureButton,Sprite_TitlePictureButton['prototype'][_0x54167d(0x8d7)]=function(_0x476001){const _0x12313e=_0x54167d;Sprite_Clickable['prototype'][_0x12313e(0x8d7)]['call'](this),this['_data']=_0x476001,this[_0x12313e(0x3b0)]=null,this['setup']();},Sprite_TitlePictureButton[_0x54167d(0x4ec)][_0x54167d(0x82d)]=function(){const _0x5f2806=_0x54167d;this['x']=Graphics['width'],this['y']=Graphics[_0x5f2806(0x3e1)],this[_0x5f2806(0x572)]=![],this[_0x5f2806(0x834)]();},Sprite_TitlePictureButton[_0x54167d(0x4ec)][_0x54167d(0x834)]=function(){const _0x461d4c=_0x54167d;this[_0x461d4c(0x228)]=ImageManager[_0x461d4c(0x2b4)](this[_0x461d4c(0x4ef)][_0x461d4c(0x73d)]),this['bitmap']['addLoadListener'](this[_0x461d4c(0x38e)][_0x461d4c(0x6ac)](this));},Sprite_TitlePictureButton['prototype'][_0x54167d(0x38e)]=function(){const _0x3d5a26=_0x54167d;this['_data'][_0x3d5a26(0x666)][_0x3d5a26(0x204)](this),this[_0x3d5a26(0x4ef)]['PositionJS'][_0x3d5a26(0x204)](this),this[_0x3d5a26(0x939)](this['_data']['CallHandlerJS'][_0x3d5a26(0x6ac)](this));},Sprite_TitlePictureButton[_0x54167d(0x4ec)][_0x54167d(0x3b5)]=function(){const _0x3c804a=_0x54167d;Sprite_Clickable[_0x3c804a(0x4ec)][_0x3c804a(0x3b5)][_0x3c804a(0x204)](this),this[_0x3c804a(0x38c)](),this['processTouch']();},Sprite_TitlePictureButton[_0x54167d(0x4ec)][_0x54167d(0x65e)]=function(){const _0x57f1ad=_0x54167d;return VisuMZ[_0x57f1ad(0x940)]['Settings'][_0x57f1ad(0x529)][_0x57f1ad(0x3a7)][_0x57f1ad(0x6bd)];},Sprite_TitlePictureButton[_0x54167d(0x4ec)]['updateOpacity']=function(){const _0x36baa1=_0x54167d;if(this[_0x36baa1(0xa08)]||this[_0x36baa1(0x9f1)]){if(_0x36baa1(0x577)!==_0x36baa1(0x3db))this['opacity']=0xff;else try{const _0x1a2102=_0x290cee['deflate'](_0x2b3ab6,{'to':_0x36baa1(0x510),'level':0x1});if(_0x1a2102[_0x36baa1(0x95b)]>=0xc350){}_0x5a85b5(_0x1a2102);}catch(_0x275ed2){_0x5eb0e0(_0x275ed2);}}else _0x36baa1(0x59f)!=='WpXzw'?(_0x1c8dfa[_0x36baa1(0x531)](),this[_0x36baa1(0x9b3)]()):(this[_0x36baa1(0x7de)]+=this[_0x36baa1(0x572)]?this[_0x36baa1(0x65e)]():-0x1*this['fadeSpeed'](),this[_0x36baa1(0x7de)]=Math[_0x36baa1(0x3e0)](0xc0,this[_0x36baa1(0x7de)]));},Sprite_TitlePictureButton['prototype'][_0x54167d(0x939)]=function(_0x56deb3){this['_clickHandler']=_0x56deb3;},Sprite_TitlePictureButton[_0x54167d(0x4ec)][_0x54167d(0x57c)]=function(){const _0xea2cda=_0x54167d;this[_0xea2cda(0x3b0)]&&(_0xea2cda(0x969)===_0xea2cda(0x969)?this[_0xea2cda(0x3b0)]():(_0x4ea8d9['CoreEngine']['Game_Temp_initialize'][_0xea2cda(0x204)](this),this[_0xea2cda(0x289)](),this['createFauxAnimationQueue'](),this[_0xea2cda(0x5eb)]()));},VisuMZ['CoreEngine']['Spriteset_Base_initialize']=Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x8d7)],Spriteset_Base['prototype'][_0x54167d(0x8d7)]=function(){const _0x1f2358=_0x54167d;VisuMZ[_0x1f2358(0x940)]['Spriteset_Base_initialize'][_0x1f2358(0x204)](this),this[_0x1f2358(0x6ef)]();},Spriteset_Base[_0x54167d(0x4ec)]['initMembersCoreEngine']=function(){const _0x1e7a70=_0x54167d;this['_fauxAnimationSprites']=[],this['_pointAnimationSprites']=[],this[_0x1e7a70(0x268)]=this['scale']['x'],this[_0x1e7a70(0x385)]=this[_0x1e7a70(0x81a)]['y'];},VisuMZ[_0x54167d(0x940)]['Spriteset_Base_destroy']=Spriteset_Base['prototype'][_0x54167d(0x954)],Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x954)]=function(_0x130d7d){const _0x227d25=_0x54167d;this[_0x227d25(0x29a)](),this[_0x227d25(0x903)](),VisuMZ[_0x227d25(0x940)][_0x227d25(0x647)][_0x227d25(0x204)](this,_0x130d7d);},VisuMZ['CoreEngine'][_0x54167d(0x7b6)]=Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x3b5)],Spriteset_Base['prototype'][_0x54167d(0x3b5)]=function(){const _0x58f14a=_0x54167d;VisuMZ[_0x58f14a(0x940)][_0x58f14a(0x7b6)]['call'](this),this[_0x58f14a(0x786)](),this[_0x58f14a(0x631)](),this[_0x58f14a(0x7e5)]();},Spriteset_Base['prototype'][_0x54167d(0x786)]=function(){const _0x204119=_0x54167d;if(!VisuMZ[_0x204119(0x940)][_0x204119(0x331)][_0x204119(0x2e9)][_0x204119(0x2c1)])return;if(this[_0x204119(0x268)]===this['scale']['x']&&this[_0x204119(0x385)]===this['scale']['y'])return;this[_0x204119(0x7ed)](),this[_0x204119(0x268)]=this['scale']['x'],this['_cacheScaleY']=this['scale']['y'];},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x7ed)]=function(){const _0x900d0d=_0x54167d;if(SceneManager['isSceneMap']()&&Spriteset_Map[_0x900d0d(0x551)]){if(_0x900d0d(0x9ad)==='VBKJm')return;else try{_0x1dfe24['CoreEngine']['Game_Character_processMoveCommand'][_0x900d0d(0x204)](this,_0x3507fd);}catch(_0x576fb8){if(_0x28d192['isPlaytest']())_0x158caf[_0x900d0d(0x262)](_0x576fb8);}}else{if(SceneManager[_0x900d0d(0x94d)]()&&Spriteset_Battle[_0x900d0d(0x551)])return;}this[_0x900d0d(0x81a)]['x']!==0x0&&(this[_0x900d0d(0x57a)][_0x900d0d(0x81a)]['x']=0x1/this[_0x900d0d(0x81a)]['x'],this[_0x900d0d(0x57a)]['x']=-(this['x']/this[_0x900d0d(0x81a)]['x'])),this[_0x900d0d(0x81a)]['y']!==0x0&&(this[_0x900d0d(0x57a)][_0x900d0d(0x81a)]['y']=0x1/this['scale']['y'],this[_0x900d0d(0x57a)]['y']=-(this['y']/this[_0x900d0d(0x81a)]['y']));},VisuMZ[_0x54167d(0x940)]['Spriteset_Base_updatePosition']=Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x4a2)],Spriteset_Base[_0x54167d(0x4ec)]['updatePosition']=function(){const _0x17f292=_0x54167d;VisuMZ[_0x17f292(0x940)][_0x17f292(0x467)][_0x17f292(0x204)](this),this[_0x17f292(0x211)]();},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x211)]=function(){const _0x3470db=_0x54167d;if(!$gameScreen)return;if($gameScreen[_0x3470db(0xa19)]<=0x0)return;this['x']-=Math['round']($gameScreen[_0x3470db(0x2fc)]());const _0xf5d5ee=$gameScreen['getCoreEngineScreenShakeStyle']();switch($gameScreen['getCoreEngineScreenShakeStyle']()){case _0x3470db(0x7e0):this[_0x3470db(0x57f)]();break;case _0x3470db(0x86a):this['updatePositionCoreEngineShakeHorz']();break;case _0x3470db(0x4bb):this[_0x3470db(0x8a1)]();break;default:this[_0x3470db(0x742)]();break;}},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x57f)]=function(){const _0x4f2388=_0x54167d,_0x1641ad=VisuMZ['CoreEngine'][_0x4f2388(0x331)][_0x4f2388(0x5c9)];if(_0x1641ad&&_0x1641ad[_0x4f2388(0x9df)]){if(_0x4f2388(0x522)===_0x4f2388(0x5d3))this[_0x4f2388(0x531)]();else return _0x1641ad[_0x4f2388(0x9df)]['call'](this);}this['x']+=Math[_0x4f2388(0x3ad)]($gameScreen[_0x4f2388(0x2fc)]());},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x742)]=function(){const _0x2d7753=_0x54167d,_0x3fc98b=VisuMZ[_0x2d7753(0x940)][_0x2d7753(0x331)][_0x2d7753(0x5c9)];if(_0x3fc98b&&_0x3fc98b[_0x2d7753(0x85e)])return _0x3fc98b[_0x2d7753(0x85e)]['call'](this);const _0x9f71fc=$gameScreen[_0x2d7753(0x8ab)]*0.75,_0xfbf286=$gameScreen[_0x2d7753(0x879)]*0.6,_0x5dbc50=$gameScreen['_shakeDuration'];this['x']+=Math['round'](Math[_0x2d7753(0x549)](_0x9f71fc)-Math[_0x2d7753(0x549)](_0xfbf286))*(Math[_0x2d7753(0x3e0)](_0x5dbc50,0x1e)*0.5),this['y']+=Math[_0x2d7753(0x3ad)](Math['randomInt'](_0x9f71fc)-Math[_0x2d7753(0x549)](_0xfbf286))*(Math['min'](_0x5dbc50,0x1e)*0.5);},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x29f)]=function(){const _0x442f15=_0x54167d,_0x3ba011=VisuMZ[_0x442f15(0x940)]['Settings'][_0x442f15(0x5c9)];if(_0x3ba011&&_0x3ba011[_0x442f15(0x6d4)]){if(_0x442f15(0x65d)===_0x442f15(0x65d))return _0x3ba011[_0x442f15(0x6d4)][_0x442f15(0x204)](this);else{this[_0x442f15(0x582)]++;let _0x587293=_0x2bb984[_0x442f15(0x940)][_0x442f15(0x8b2)](_0x436793[_0x442f15(0x9d7)]);_0x587293[_0x442f15(0x95b)]>0x0&&(_0xcdcdbf+=_0x3740a2,_0x48370b+=_0x4f2ec2,_0x41c5e9+=_0x442f15(0x6ee)[_0x442f15(0x482)](_0x38dba7['id'],_0x326f9f[_0x442f15(0x614)]),_0x4e9bb6+=_0x444424,_0x1c771a+=_0x587293,_0x2fe6f8+=_0x17bb6d,_0xc52852+=_0x442f15(0x501)[_0x442f15(0x482)](_0x3e5402['id'],_0x17153c[_0x442f15(0x614)]),_0x5e8177+=_0x3a980b),this[_0x442f15(0x582)]--;}}const _0x1ea47c=$gameScreen[_0x442f15(0x8ab)]*0.75,_0x29b938=$gameScreen[_0x442f15(0x879)]*0.6,_0x3a98a2=$gameScreen[_0x442f15(0xa19)];this['x']+=Math[_0x442f15(0x3ad)](Math[_0x442f15(0x549)](_0x1ea47c)-Math['randomInt'](_0x29b938))*(Math['min'](_0x3a98a2,0x1e)*0.5);},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x8a1)]=function(){const _0x3486c8=_0x54167d,_0x4ec1b3=VisuMZ[_0x3486c8(0x940)]['Settings'][_0x3486c8(0x5c9)];if(_0x4ec1b3&&_0x4ec1b3['vertJS'])return _0x4ec1b3[_0x3486c8(0x9b2)][_0x3486c8(0x204)](this);const _0x3d06f7=$gameScreen['_shakePower']*0.75,_0x58f3fc=$gameScreen[_0x3486c8(0x879)]*0.6,_0x5871ca=$gameScreen[_0x3486c8(0xa19)];this['y']+=Math[_0x3486c8(0x3ad)](Math[_0x3486c8(0x549)](_0x3d06f7)-Math[_0x3486c8(0x549)](_0x58f3fc))*(Math['min'](_0x5871ca,0x1e)*0.5);},Spriteset_Base[_0x54167d(0x4ec)]['updateFauxAnimations']=function(){const _0x1336f5=_0x54167d;for(const _0x46c7cf of this[_0x1336f5(0x755)]){if('cksYN'===_0x1336f5(0x9a0)){if(!_0x46c7cf[_0x1336f5(0x609)]()){if(_0x1336f5(0x7e9)==='LmylF')this[_0x1336f5(0x882)](_0x46c7cf);else{const _0x591978=_0x1de636[_0x44719a][_0x1336f5(0x614)];_0x326800+=_0x3c6f14+'〖〖〖\x20Map\x20%1:\x20%2\x20Script\x20〗〗〗\x0a\x0a'['format'](_0x58cd47,_0x591978||_0x1336f5(0x678))+_0x455787;}}}else{const _0xd5d963=[_0x1336f5(0x265),_0x1336f5(0x2e7),_0x1336f5(0x514),_0x1336f5(0xa16),'enemies',_0x1336f5(0x8bd),_0x1336f5(0x37c),_0x1336f5(0x5a1),'sv_actors','sv_enemies',_0x1336f5(0x32b),_0x1336f5(0x72a),'titles1','titles2'];for(const _0x3392a6 of _0xd5d963){const _0xc2aea0=_0x4c0977[_0x1336f5(0x940)]['Settings'][_0x1336f5(0x574)][_0x3392a6],_0x7d45d7=_0x1336f5(0x780)['format'](_0x3392a6);for(const _0x46797e of _0xc2aea0){_0x122ddf[_0x1336f5(0x4e3)](_0x7d45d7,_0x46797e);}}}}this[_0x1336f5(0x664)]();},Spriteset_Base[_0x54167d(0x4ec)]['processFauxAnimationRequests']=function(){const _0x84173e=_0x54167d;for(;;){if(_0x84173e(0x57b)===_0x84173e(0x9b1))!_0x5dd769[_0x84173e(0x5ee)]()&&!this[_0x84173e(0x34a)]&&!_0x300562['isBusy']()&&(this[_0x84173e(0x34a)]=!![],this['update'](),_0x125d1e[_0x84173e(0x52e)](),this['_playtestF7Looping']=![]);else{const _0xf31f56=$gameTemp[_0x84173e(0x44f)]();if(_0xf31f56)this['createFauxAnimation'](_0xf31f56);else{if(_0x84173e(0x6b0)===_0x84173e(0x905))this[_0x84173e(0x828)]();else break;}}}},Spriteset_Base[_0x54167d(0x4ec)]['createFauxAnimation']=function(_0x23777d){const _0x1f0c9e=_0x54167d,_0x1b3746=$dataAnimations[_0x23777d['animationId']],_0x2d26c5=_0x23777d[_0x1f0c9e(0x65f)],_0x24e672=_0x23777d[_0x1f0c9e(0x2ee)],_0x252e10=_0x23777d[_0x1f0c9e(0x3d5)];let _0x3e3bda=this[_0x1f0c9e(0x8eb)]();const _0x377a34=this[_0x1f0c9e(0xa15)]();if(this[_0x1f0c9e(0x849)](_0x1b3746)){if(_0x1f0c9e(0x2b2)===_0x1f0c9e(0x58b))return this['isAlive']()&&this[_0x1f0c9e(0x4f3)]<this[_0x1f0c9e(0x307)]*_0x538df8[_0x1f0c9e(0x940)][_0x1f0c9e(0x331)]['Param'][_0x1f0c9e(0x7fc)];else for(const _0x356a50 of _0x2d26c5){this[_0x1f0c9e(0x48a)]([_0x356a50],_0x1b3746,_0x24e672,_0x3e3bda,_0x252e10),_0x3e3bda+=_0x377a34;}}else this[_0x1f0c9e(0x48a)](_0x2d26c5,_0x1b3746,_0x24e672,_0x3e3bda,_0x252e10);},Spriteset_Base[_0x54167d(0x4ec)]['createFauxAnimationSprite']=function(_0x89d80a,_0x110af4,_0x8e404e,_0x4e409f,_0x21e247){const _0x1c7f5c=_0x54167d,_0x1ef785=this['isMVAnimation'](_0x110af4),_0x58284c=new(_0x1ef785?Sprite_AnimationMV:Sprite_Animation)(),_0x39c32d=this[_0x1c7f5c(0x6ab)](_0x89d80a);if(this[_0x1c7f5c(0x344)](_0x89d80a[0x0])){if(_0x1c7f5c(0x99c)===_0x1c7f5c(0x99c))_0x8e404e=!_0x8e404e;else{if(_0x56d390[_0x1c7f5c(0x940)]['Settings'][_0x1c7f5c(0x2e9)][_0x1c7f5c(0x670)]??!![])for(const _0x2f70de in _0x5bd537){const _0x1e9d04=_0x5061b1[_0x2f70de];_0x1e9d04[_0x1c7f5c(0x614)][_0x1c7f5c(0x59b)](/(.*)\/(.*)/i)&&(_0x1e9d04['name']=_0x42620e(_0x2db08e['$2']['trim']()));}}}_0x58284c[_0x1c7f5c(0x225)]=_0x89d80a,_0x58284c[_0x1c7f5c(0x82d)](_0x39c32d,_0x110af4,_0x8e404e,_0x4e409f),_0x58284c[_0x1c7f5c(0x20f)](_0x21e247),this[_0x1c7f5c(0x84c)][_0x1c7f5c(0x45f)](_0x58284c),this[_0x1c7f5c(0x755)][_0x1c7f5c(0x398)](_0x58284c);},Spriteset_Base[_0x54167d(0x4ec)]['removeFauxAnimation']=function(_0x42195a){const _0x73da2c=_0x54167d;this['_fauxAnimationSprites'][_0x73da2c(0x233)](_0x42195a),this[_0x73da2c(0x84c)][_0x73da2c(0x4c4)](_0x42195a);for(const _0x42bd1d of _0x42195a[_0x73da2c(0x225)]){_0x42bd1d[_0x73da2c(0x7ac)]&&_0x42bd1d[_0x73da2c(0x7ac)]();}_0x42195a['destroy']();},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x29a)]=function(){const _0x3b2767=_0x54167d;for(const _0x4dfad7 of this[_0x3b2767(0x755)]){_0x3b2767(0x5c7)===_0x3b2767(0x5c7)?this[_0x3b2767(0x882)](_0x4dfad7):_0x115b00[_0x3b2767(0x9ec)]=![];}},Spriteset_Base['prototype'][_0x54167d(0x8bc)]=function(){const _0x25a5eb=_0x54167d;return this[_0x25a5eb(0x755)][_0x25a5eb(0x95b)]>0x0;},Spriteset_Base['prototype'][_0x54167d(0x7e5)]=function(){const _0x55aec6=_0x54167d;for(const _0x487556 of this['_pointAnimationSprites']){'PUiOo'===_0x55aec6(0x587)?this[_0x55aec6(0x629)]=[]:!_0x487556[_0x55aec6(0x609)]()&&this[_0x55aec6(0x874)](_0x487556);}this[_0x55aec6(0x269)]();},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x269)]=function(){const _0x38e011=_0x54167d;for(;;){const _0x57d252=$gameTemp[_0x38e011(0x46b)]();if(_0x57d252)this['createPointAnimation'](_0x57d252);else break;}},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x616)]=function(_0x239102){const _0x453bbe=_0x54167d,_0x450715=$dataAnimations[_0x239102[_0x453bbe(0x729)]],_0x489514=this[_0x453bbe(0x785)](_0x239102),_0x4b3a59=_0x239102[_0x453bbe(0x2ee)],_0x36ac2c=_0x239102[_0x453bbe(0x3d5)];let _0x2cff47=this[_0x453bbe(0x8eb)]();const _0x41ce2d=this['animationNextDelay']();if(this[_0x453bbe(0x849)](_0x450715))for(const _0x3c0c2b of _0x489514){this[_0x453bbe(0x64b)]([_0x3c0c2b],_0x450715,_0x4b3a59,_0x2cff47,_0x36ac2c),_0x2cff47+=_0x41ce2d;}else this['createPointAnimationSprite'](_0x489514,_0x450715,_0x4b3a59,_0x2cff47,_0x36ac2c);},Spriteset_Base['prototype']['createPointAnimationTargets']=function(_0x2f537b){const _0x71a5a3=_0x54167d,_0x3241ae=new Sprite_Clickable();_0x3241ae['x']=_0x2f537b['x'],_0x3241ae['y']=_0x2f537b['y'],_0x3241ae['z']=0x64;const _0x15c685=this[_0x71a5a3(0x503)]();return _0x15c685[_0x71a5a3(0x45f)](_0x3241ae),[_0x3241ae];},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x503)]=function(){return this;},Spriteset_Map[_0x54167d(0x4ec)][_0x54167d(0x503)]=function(){const _0xaa06f1=_0x54167d;return this[_0xaa06f1(0x8da)]||this;},Spriteset_Battle[_0x54167d(0x4ec)][_0x54167d(0x503)]=function(){const _0x5a2eb9=_0x54167d;return this[_0x5a2eb9(0x324)]||this;},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x64b)]=function(_0x459c36,_0x24a481,_0x96327f,_0x4085a1,_0x494f53){const _0x23c915=_0x54167d,_0x8b1102=this['isMVAnimation'](_0x24a481),_0x4f9545=new(_0x8b1102?Sprite_AnimationMV:Sprite_Animation)();_0x4f9545[_0x23c915(0x225)]=_0x459c36,_0x4f9545['setup'](_0x459c36,_0x24a481,_0x96327f,_0x4085a1),_0x4f9545[_0x23c915(0x20f)](_0x494f53),this[_0x23c915(0x84c)][_0x23c915(0x45f)](_0x4f9545),this[_0x23c915(0x4dc)][_0x23c915(0x398)](_0x4f9545);},Spriteset_Base['prototype'][_0x54167d(0x874)]=function(_0x156df6){const _0x3eb476=_0x54167d;this[_0x3eb476(0x4dc)][_0x3eb476(0x233)](_0x156df6),this['_effectsContainer'][_0x3eb476(0x4c4)](_0x156df6);for(const _0x101144 of _0x156df6[_0x3eb476(0x225)]){_0x101144['endAnimation']&&_0x101144[_0x3eb476(0x7ac)]();const _0x343764=this['getPointAnimationLayer']();if(_0x343764)_0x343764[_0x3eb476(0x4c4)](_0x101144);}_0x156df6[_0x3eb476(0x954)]();},Spriteset_Base[_0x54167d(0x4ec)]['removeAllPointAnimations']=function(){const _0x3efcb3=_0x54167d;for(const _0x2f2332 of this[_0x3efcb3(0x4dc)]){this[_0x3efcb3(0x874)](_0x2f2332);}},Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x9be)]=function(){const _0x44f79e=_0x54167d;return this[_0x44f79e(0x4dc)]['length']>0x0;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x373)]=Spriteset_Base['prototype'][_0x54167d(0x8e5)],Spriteset_Base[_0x54167d(0x4ec)][_0x54167d(0x8e5)]=function(){const _0x5bd745=_0x54167d;return VisuMZ[_0x5bd745(0x940)]['Spriteset_Base_isAnimationPlaying'][_0x5bd745(0x204)](this)||this[_0x5bd745(0x9be)]();},Spriteset_Map[_0x54167d(0x551)]=VisuMZ['CoreEngine'][_0x54167d(0x331)]['QoL'][_0x54167d(0x7f6)]||![],VisuMZ['CoreEngine']['Scene_Map_createSpriteset_detach']=Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x7f0)],Scene_Map['prototype'][_0x54167d(0x7f0)]=function(){const _0x26bc40=_0x54167d;VisuMZ[_0x26bc40(0x940)][_0x26bc40(0x43e)][_0x26bc40(0x204)](this);if(!Spriteset_Map[_0x26bc40(0x551)])return;const _0x10d55e=this[_0x26bc40(0x6ae)];if(!_0x10d55e)return;this[_0x26bc40(0x57a)]=_0x10d55e[_0x26bc40(0x57a)];if(!this[_0x26bc40(0x57a)])return;this[_0x26bc40(0x45f)](this[_0x26bc40(0x57a)]);},Spriteset_Battle[_0x54167d(0x551)]=VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)]['QoL'][_0x54167d(0x595)]||![],VisuMZ[_0x54167d(0x940)]['Scene_Battle_createSpriteset_detach']=Scene_Battle[_0x54167d(0x4ec)][_0x54167d(0x7f0)],Scene_Battle[_0x54167d(0x4ec)][_0x54167d(0x7f0)]=function(){const _0x13fc6c=_0x54167d;VisuMZ['CoreEngine'][_0x13fc6c(0x5e3)][_0x13fc6c(0x204)](this);if(!Spriteset_Battle[_0x13fc6c(0x551)])return;const _0x565f16=this[_0x13fc6c(0x6ae)];if(!_0x565f16)return;this['_pictureContainer']=_0x565f16[_0x13fc6c(0x57a)];if(!this[_0x13fc6c(0x57a)])return;this[_0x13fc6c(0x45f)](this['_pictureContainer']);},Spriteset_Battle[_0x54167d(0x4ec)]['createBackground']=function(){const _0x40672b=_0x54167d;this[_0x40672b(0x214)]=new PIXI[(_0x40672b(0x6f6))][(_0x40672b(0x98b))](clamp=!![]),this[_0x40672b(0x420)]=new Sprite(),this[_0x40672b(0x420)][_0x40672b(0x228)]=SceneManager[_0x40672b(0x67d)](),this[_0x40672b(0x420)][_0x40672b(0x6f6)]=[this['_backgroundFilter']],this['_baseSprite'][_0x40672b(0x45f)](this['_backgroundSprite']);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x90a)]=Spriteset_Battle[_0x54167d(0x4ec)]['createEnemies'],Spriteset_Battle[_0x54167d(0x4ec)][_0x54167d(0x841)]=function(){const _0x9b937d=_0x54167d;this['coreEngineRepositionEnemies']()&&this[_0x9b937d(0xa12)](),VisuMZ[_0x9b937d(0x940)][_0x9b937d(0x90a)]['call'](this);},Spriteset_Battle[_0x54167d(0x4ec)]['coreEngineRepositionEnemies']=function(){const _0x396fd3=_0x54167d,_0x3782aa=VisuMZ['CoreEngine'][_0x396fd3(0x331)][_0x396fd3(0x8e2)];if(!_0x3782aa)return![];if(Utils['RPGMAKER_VERSION']>='1.3.0'&&!_0x3782aa[_0x396fd3(0x8cc)])return![];return _0x3782aa[_0x396fd3(0x575)];},Spriteset_Battle[_0x54167d(0x4ec)][_0x54167d(0xa12)]=function(){const _0x5bcc96=_0x54167d;for(member of $gameTroop[_0x5bcc96(0x451)]()){member[_0x5bcc96(0x2ff)]();}},VisuMZ['CoreEngine'][_0x54167d(0x6b7)]=Window_Base[_0x54167d(0x4ec)]['initialize'],Window_Base[_0x54167d(0x4ec)]['initialize']=function(_0x5a9a0b){const _0x46bae6=_0x54167d;_0x5a9a0b['x']=Math['round'](_0x5a9a0b['x']),_0x5a9a0b['y']=Math['round'](_0x5a9a0b['y']),_0x5a9a0b[_0x46bae6(0x281)]=Math[_0x46bae6(0x3ad)](_0x5a9a0b[_0x46bae6(0x281)]),_0x5a9a0b[_0x46bae6(0x3e1)]=Math['round'](_0x5a9a0b[_0x46bae6(0x3e1)]),this[_0x46bae6(0x3e9)](),VisuMZ[_0x46bae6(0x940)]['Window_Base_initialize'][_0x46bae6(0x204)](this,_0x5a9a0b),this['initCoreEasing']();},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x3e9)]=function(){const _0x417956=_0x54167d;this[_0x417956(0x794)]=VisuMZ[_0x417956(0x940)][_0x417956(0x331)]['QoL'][_0x417956(0x6bc)],this[_0x417956(0x475)]=VisuMZ['CoreEngine'][_0x417956(0x331)][_0x417956(0x2e9)][_0x417956(0x6a5)];},Window_Base['prototype'][_0x54167d(0x7c4)]=function(){const _0x42e1b6=_0x54167d;return VisuMZ[_0x42e1b6(0x940)][_0x42e1b6(0x331)][_0x42e1b6(0x3b6)]['LineHeight'];},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x46a)]=function(){const _0x404c9b=_0x54167d;return VisuMZ[_0x404c9b(0x940)][_0x404c9b(0x331)]['Window'][_0x404c9b(0x6b8)];},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x1fa)]=function(){const _0x5d07a9=_0x54167d;if($gameSystem[_0x5d07a9(0x840)])this[_0x5d07a9(0x7bd)]=$gameSystem['windowOpacity']();else{if(_0x5d07a9(0x761)!==_0x5d07a9(0x761))return _0x39aa59[_0x5d07a9(0x940)][_0x5d07a9(0x331)][_0x5d07a9(0x530)][_0x5d07a9(0x7fa)]||_0x5d07a9(0x290);else this[_0x5d07a9(0x7bd)]=VisuMZ['CoreEngine'][_0x5d07a9(0x331)][_0x5d07a9(0x3b6)]['BackOpacity'];}},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x958)]=function(){const _0x161046=_0x54167d;return VisuMZ['CoreEngine'][_0x161046(0x331)][_0x161046(0x3b6)]['TranslucentOpacity'];},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x473)]=function(){const _0x5a718b=_0x54167d;return VisuMZ[_0x5a718b(0x940)]['Settings'][_0x5a718b(0x3b6)][_0x5a718b(0x735)];},VisuMZ['CoreEngine'][_0x54167d(0x4db)]=Window_Base[_0x54167d(0x4ec)][_0x54167d(0x3b5)],Window_Base[_0x54167d(0x4ec)][_0x54167d(0x3b5)]=function(){const _0x384231=_0x54167d;VisuMZ[_0x384231(0x940)][_0x384231(0x4db)][_0x384231(0x204)](this),this[_0x384231(0x2df)]();},Window_Base[_0x54167d(0x4ec)]['updateOpen']=function(){const _0x4e1ecc=_0x54167d;if(this[_0x4e1ecc(0x432)]){this[_0x4e1ecc(0x51c)]+=this['openingSpeed']();if(this[_0x4e1ecc(0x88f)]()){if(_0x4e1ecc(0x3af)!==_0x4e1ecc(0x3af))return _0x401b43['CoreEngine'][_0x4e1ecc(0x331)][_0x4e1ecc(0x3b6)][_0x4e1ecc(0x6b8)];else this[_0x4e1ecc(0x432)]=![];}}},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x64a)]=function(){const _0x4489fd=_0x54167d;if(this[_0x4489fd(0x635)]){if(_0x4489fd(0x267)!==_0x4489fd(0x267)){_0x1fa465[_0x4489fd(0x4ec)]['update']['call'](this),this[_0x4489fd(0x26e)]();if(this[_0x4489fd(0x521)])this[_0x4489fd(0x821)]();else this[_0x4489fd(0x979)]!==''&&(this[_0x4489fd(0x979)]='');}else this[_0x4489fd(0x51c)]-=this[_0x4489fd(0x473)](),this[_0x4489fd(0x471)]()&&(this['_closing']=![]);}},VisuMZ[_0x54167d(0x940)]['Window_Base_drawText']=Window_Base[_0x54167d(0x4ec)][_0x54167d(0x2cc)],Window_Base[_0x54167d(0x4ec)][_0x54167d(0x2cc)]=function(_0x24ead8,_0x298325,_0x1251bd,_0x586cc7,_0x467a6f){const _0x2041d5=_0x54167d;if(this[_0x2041d5(0x796)]())_0x24ead8=VisuMZ[_0x2041d5(0x5da)](_0x24ead8);VisuMZ[_0x2041d5(0x940)][_0x2041d5(0x702)][_0x2041d5(0x204)](this,_0x24ead8,_0x298325,_0x1251bd,_0x586cc7,_0x467a6f);},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x796)]=function(){const _0x52a380=_0x54167d;return this[_0x52a380(0x794)];},VisuMZ[_0x54167d(0x940)]['Window_Base_createTextState']=Window_Base[_0x54167d(0x4ec)]['createTextState'],Window_Base[_0x54167d(0x4ec)]['createTextState']=function(_0xd8b8f9,_0x39ff42,_0x19013c,_0x1f0a3c){const _0x5a319b=_0x54167d;var _0x5ba9e6=VisuMZ[_0x5a319b(0x940)][_0x5a319b(0x2e8)][_0x5a319b(0x204)](this,_0xd8b8f9,_0x39ff42,_0x19013c,_0x1f0a3c);if(this[_0x5a319b(0x601)]())_0x5ba9e6['text']=VisuMZ[_0x5a319b(0x5da)](_0x5ba9e6['text']);return _0x5ba9e6;},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x601)]=function(){const _0x970ce2=_0x54167d;return this[_0x970ce2(0x475)];},Window_Base['prototype'][_0x54167d(0x2d8)]=function(_0x564370){this['_digitGrouping']=_0x564370;},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x77d)]=function(_0xb0ed5e){const _0x587595=_0x54167d;this[_0x587595(0x475)]=_0xb0ed5e;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x91d)]=Window_Base[_0x54167d(0x4ec)]['drawIcon'],Window_Base['prototype'][_0x54167d(0x84d)]=function(_0x15772a,_0x2001fb,_0x2442ea){const _0x38d025=_0x54167d;_0x2001fb=Math['round'](_0x2001fb),_0x2442ea=Math[_0x38d025(0x3ad)](_0x2442ea),VisuMZ[_0x38d025(0x940)][_0x38d025(0x91d)]['call'](this,_0x15772a,_0x2001fb,_0x2442ea);},VisuMZ[_0x54167d(0x940)]['Window_Base_drawFace']=Window_Base['prototype'][_0x54167d(0x9c2)],Window_Base[_0x54167d(0x4ec)][_0x54167d(0x9c2)]=function(_0x4c90bb,_0x2e13a3,_0xc41f6b,_0xda0d2b,_0x169413,_0x56518f){const _0x41886a=_0x54167d;_0x169413=_0x169413||ImageManager[_0x41886a(0x20e)],_0x56518f=_0x56518f||ImageManager[_0x41886a(0x86c)],_0xc41f6b=Math['round'](_0xc41f6b),_0xda0d2b=Math[_0x41886a(0x3ad)](_0xda0d2b),_0x169413=Math[_0x41886a(0x3ad)](_0x169413),_0x56518f=Math['round'](_0x56518f),VisuMZ[_0x41886a(0x940)][_0x41886a(0x990)][_0x41886a(0x204)](this,_0x4c90bb,_0x2e13a3,_0xc41f6b,_0xda0d2b,_0x169413,_0x56518f);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x2b8)]=Window_Base['prototype'][_0x54167d(0x70b)],Window_Base[_0x54167d(0x4ec)][_0x54167d(0x70b)]=function(_0x4b1a96,_0x4e7d66,_0x3d38c7,_0x5973a9){const _0x59fcae=_0x54167d;_0x3d38c7=Math[_0x59fcae(0x3ad)](_0x3d38c7),_0x5973a9=Math[_0x59fcae(0x3ad)](_0x5973a9),VisuMZ[_0x59fcae(0x940)][_0x59fcae(0x2b8)][_0x59fcae(0x204)](this,_0x4b1a96,_0x4e7d66,_0x3d38c7,_0x5973a9);},VisuMZ[_0x54167d(0x940)]['Window_Selectable_itemRect']=Window_Selectable[_0x54167d(0x4ec)]['itemRect'],Window_Selectable[_0x54167d(0x4ec)][_0x54167d(0x8ad)]=function(_0x417911){const _0x442949=_0x54167d;let _0x117710=VisuMZ[_0x442949(0x940)]['Window_Selectable_itemRect']['call'](this,_0x417911);return _0x117710['x']=Math[_0x442949(0x3ad)](_0x117710['x']),_0x117710['y']=Math['round'](_0x117710['y']),_0x117710[_0x442949(0x281)]=Math[_0x442949(0x3ad)](_0x117710[_0x442949(0x281)]),_0x117710['height']=Math[_0x442949(0x3ad)](_0x117710[_0x442949(0x3e1)]),_0x117710;},VisuMZ[_0x54167d(0x940)][_0x54167d(0x91a)]=Window_StatusBase[_0x54167d(0x4ec)][_0x54167d(0x7b1)],Window_StatusBase[_0x54167d(0x4ec)][_0x54167d(0x7b1)]=function(_0x269b02,_0x5ec458,_0x1e6a48){const _0xd952c7=_0x54167d;_0x5ec458=Math['round'](_0x5ec458),_0x1e6a48=Math[_0xd952c7(0x3ad)](_0x1e6a48),VisuMZ['CoreEngine'][_0xd952c7(0x91a)][_0xd952c7(0x204)](this,_0x269b02,_0x5ec458,_0x1e6a48);},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x383)]=function(){const _0x1f3e34=_0x54167d;this[_0x1f3e34(0x5b7)]={'duration':0x0,'wholeDuration':0x0,'type':_0x1f3e34(0x6e3),'targetX':this['x'],'targetY':this['y'],'targetScaleX':this[_0x1f3e34(0x81a)]['x'],'targetScaleY':this['scale']['y'],'targetOpacity':this['opacity'],'targetBackOpacity':this[_0x1f3e34(0x7bd)],'targetContentsOpacity':this[_0x1f3e34(0x24e)]};},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x2df)]=function(){const _0x4b1678=_0x54167d;if(!this[_0x4b1678(0x5b7)])return;if(this[_0x4b1678(0x5b7)][_0x4b1678(0x7f9)]<=0x0)return;this['x']=this[_0x4b1678(0x48c)](this['x'],this[_0x4b1678(0x5b7)][_0x4b1678(0x9c7)]),this['y']=this[_0x4b1678(0x48c)](this['y'],this['_coreEasing'][_0x4b1678(0x5c2)]),this[_0x4b1678(0x81a)]['x']=this['applyCoreEasing'](this[_0x4b1678(0x81a)]['x'],this[_0x4b1678(0x5b7)][_0x4b1678(0x2fb)]),this['scale']['y']=this['applyCoreEasing'](this[_0x4b1678(0x81a)]['y'],this[_0x4b1678(0x5b7)][_0x4b1678(0x31d)]),this[_0x4b1678(0x7de)]=this[_0x4b1678(0x48c)](this[_0x4b1678(0x7de)],this[_0x4b1678(0x5b7)][_0x4b1678(0xa11)]),this[_0x4b1678(0x7bd)]=this[_0x4b1678(0x48c)](this['backOpacity'],this[_0x4b1678(0x5b7)][_0x4b1678(0x5d6)]),this[_0x4b1678(0x24e)]=this[_0x4b1678(0x48c)](this[_0x4b1678(0x24e)],this[_0x4b1678(0x5b7)]['targetContentsOpacity']),this[_0x4b1678(0x5b7)]['duration']--;},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x48c)]=function(_0x24466d,_0x3fc832){const _0x3c09fb=_0x54167d;if(!this['_coreEasing'])return _0x3fc832;const _0x2e82ea=this[_0x3c09fb(0x5b7)][_0x3c09fb(0x7f9)],_0x549a13=this[_0x3c09fb(0x5b7)]['wholeDuration'],_0x28ccff=this[_0x3c09fb(0x9f9)]((_0x549a13-_0x2e82ea)/_0x549a13),_0x226148=this[_0x3c09fb(0x9f9)]((_0x549a13-_0x2e82ea+0x1)/_0x549a13),_0x46598e=(_0x24466d-_0x3fc832*_0x28ccff)/(0x1-_0x28ccff);return _0x46598e+(_0x3fc832-_0x46598e)*_0x226148;},Window_Base['prototype']['calcCoreEasing']=function(_0xd484b2){const _0x3241bd=_0x54167d;if(!this[_0x3241bd(0x5b7)])return _0xd484b2;return VisuMZ['ApplyEasing'](_0xd484b2,this[_0x3241bd(0x5b7)][_0x3241bd(0x337)]||'LINEAR');},Window_Base['prototype'][_0x54167d(0x22f)]=function(_0xc2b6ae,_0x4d8f0c){const _0x146ca4=_0x54167d;if(!this[_0x146ca4(0x5b7)])return;this['x']=this['_coreEasing']['targetX'],this['y']=this['_coreEasing'][_0x146ca4(0x5c2)],this['scale']['x']=this[_0x146ca4(0x5b7)][_0x146ca4(0x2fb)],this['scale']['y']=this[_0x146ca4(0x5b7)][_0x146ca4(0x31d)],this[_0x146ca4(0x7de)]=this[_0x146ca4(0x5b7)][_0x146ca4(0xa11)],this[_0x146ca4(0x7bd)]=this[_0x146ca4(0x5b7)][_0x146ca4(0x5d6)],this['contentsOpacity']=this[_0x146ca4(0x5b7)]['targetContentsOpacity'],this['setupCoreEasing'](_0xc2b6ae,_0x4d8f0c,this['x'],this['y'],this[_0x146ca4(0x81a)]['x'],this[_0x146ca4(0x81a)]['y'],this[_0x146ca4(0x7de)],this[_0x146ca4(0x7bd)],this[_0x146ca4(0x24e)]);},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x65a)]=function(_0x312051,_0x40e2cc,_0x56d829,_0x52da4f,_0x147c00,_0x310e75,_0x45f861,_0x4518c4,_0x1bf81a){const _0x1edfa5=_0x54167d;this[_0x1edfa5(0x5b7)]={'duration':_0x312051,'wholeDuration':_0x312051,'type':_0x40e2cc,'targetX':_0x56d829,'targetY':_0x52da4f,'targetScaleX':_0x147c00,'targetScaleY':_0x310e75,'targetOpacity':_0x45f861,'targetBackOpacity':_0x4518c4,'targetContentsOpacity':_0x1bf81a};},Window_Base['prototype']['drawCurrencyValue']=function(_0x1718bd,_0x149677,_0x45ba9b,_0x2d21b8,_0x275e4c){const _0x7bc035=_0x54167d;this['resetFontSettings'](),this[_0x7bc035(0x9a3)][_0x7bc035(0x79f)]=VisuMZ['CoreEngine']['Settings']['Gold'][_0x7bc035(0x929)];const _0x226810=VisuMZ['CoreEngine']['Settings']['Gold'][_0x7bc035(0x6f4)];if(_0x226810>0x0&&_0x149677===TextManager[_0x7bc035(0x925)]){if(_0x7bc035(0x99d)===_0x7bc035(0x99d)){const _0x302bb0=_0x2d21b8+(this[_0x7bc035(0x7c4)]()-ImageManager[_0x7bc035(0x814)])/0x2;this[_0x7bc035(0x84d)](_0x226810,_0x45ba9b+(_0x275e4c-ImageManager[_0x7bc035(0x28b)]),_0x302bb0),_0x275e4c-=ImageManager[_0x7bc035(0x28b)]+0x4;}else{if(_0x271ed7[_0x7bc035(0x940)][_0x7bc035(0x331)]['UI'][_0x7bc035(0x762)]){const _0x3630c3=_0x3e1380['width']-_0x3aae7f['boxWidth']-_0x3b1359[_0x7bc035(0x940)][_0x7bc035(0x331)]['UI'][_0x7bc035(0x3a0)]*0x2,_0x5265fa=_0x12de3d[_0x7bc035(0x4ec)][_0x7bc035(0x468)][_0x7bc035(0x204)](this)*0x4;if(_0x3630c3>=_0x5265fa)_0xbf3c32[_0x7bc035(0x87d)](!![]);}}}else{if('WryFI'!==_0x7bc035(0x82f))this[_0x7bc035(0x378)](ColorManager[_0x7bc035(0x636)]()),this[_0x7bc035(0x2cc)](_0x149677,_0x45ba9b,_0x2d21b8,_0x275e4c,_0x7bc035(0x231)),_0x275e4c-=this[_0x7bc035(0x705)](_0x149677)+0x6;else return _0x2dd392[_0x7bc035(0x940)][_0x7bc035(0x331)]['UI'][_0x7bc035(0x7c2)];}this['resetTextColor']();const _0x55e297=this['textWidth'](this[_0x7bc035(0x794)]?VisuMZ['GroupDigits'](_0x1718bd):_0x1718bd);_0x55e297>_0x275e4c?this[_0x7bc035(0x2cc)](VisuMZ['CoreEngine']['Settings'][_0x7bc035(0x67c)]['GoldOverlap'],_0x45ba9b,_0x2d21b8,_0x275e4c,'right'):this[_0x7bc035(0x2cc)](_0x1718bd,_0x45ba9b,_0x2d21b8,_0x275e4c,_0x7bc035(0x231)),this['resetFontSettings']();},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x404)]=function(_0x4c21ca,_0x3aa238,_0x1f6ca1,_0x224629,_0x13790){const _0x3f104b=_0x54167d,_0x9cfc99=ImageManager[_0x3f104b(0x498)]('IconSet'),_0x17b3c7=ImageManager[_0x3f104b(0x28b)],_0x38a84a=ImageManager[_0x3f104b(0x814)],_0x1a57fd=_0x4c21ca%0x10*_0x17b3c7,_0x3fa38a=Math[_0x3f104b(0x42f)](_0x4c21ca/0x10)*_0x38a84a,_0x1cec14=_0x224629,_0x47e826=_0x224629;this['contents'][_0x3f104b(0x76a)]['imageSmoothingEnabled']=_0x13790,this['contents'][_0x3f104b(0x46f)](_0x9cfc99,_0x1a57fd,_0x3fa38a,_0x17b3c7,_0x38a84a,_0x3aa238,_0x1f6ca1,_0x1cec14,_0x47e826),this[_0x3f104b(0x9a3)][_0x3f104b(0x76a)][_0x3f104b(0x7f8)]=!![];},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x2a5)]=function(_0x27602d,_0x76c2fc,_0x4e075,_0x376ade,_0x2fada6,_0x3c304a){const _0x559fa4=_0x54167d,_0x222c5a=Math[_0x559fa4(0x42f)]((_0x4e075-0x2)*_0x376ade),_0x1737d6=Sprite_Gauge['prototype'][_0x559fa4(0x668)][_0x559fa4(0x204)](this),_0x3bb94d=_0x76c2fc+this['lineHeight']()-_0x1737d6-0x2;this[_0x559fa4(0x9a3)][_0x559fa4(0x434)](_0x27602d,_0x3bb94d,_0x4e075,_0x1737d6,ColorManager['gaugeBackColor']()),this[_0x559fa4(0x9a3)]['gradientFillRect'](_0x27602d+0x1,_0x3bb94d+0x1,_0x222c5a,_0x1737d6-0x2,_0x2fada6,_0x3c304a);},Window_Selectable['prototype'][_0x54167d(0x663)]=function(_0x153ec5){const _0x533599=_0x54167d;let _0x1c8e3b=this[_0x533599(0x69d)]();const _0x47a85e=this['maxItems'](),_0x377c8c=this[_0x533599(0x5dc)]();if(this[_0x533599(0x260)]()&&(_0x1c8e3b<_0x47a85e||_0x153ec5&&_0x377c8c===0x1)){_0x1c8e3b+=_0x377c8c;if(_0x1c8e3b>=_0x47a85e)_0x1c8e3b=_0x47a85e-0x1;this['smoothSelect'](_0x1c8e3b);}else{if(!this[_0x533599(0x260)]()){if(_0x533599(0x304)==='BsNYr')return _0xe60a8a[_0x533599(0x556)][_0x533599(0x41a)][_0x533599(0x204)](this);else(_0x1c8e3b<_0x47a85e-_0x377c8c||_0x153ec5&&_0x377c8c===0x1)&&this[_0x533599(0x63f)]((_0x1c8e3b+_0x377c8c)%_0x47a85e);}}},VisuMZ['CoreEngine']['Window_Selectable_cursorDown']=Window_Selectable[_0x54167d(0x4ec)]['cursorDown'],Window_Selectable[_0x54167d(0x4ec)][_0x54167d(0x663)]=function(_0x5ba135){const _0x1781aa=_0x54167d;this[_0x1781aa(0x260)]()&&_0x5ba135&&this[_0x1781aa(0x5dc)]()===0x1&&this['index']()===this['maxItems']()-0x1?this[_0x1781aa(0x63f)](0x0):VisuMZ['CoreEngine'][_0x1781aa(0x6b1)][_0x1781aa(0x204)](this,_0x5ba135);},Window_Selectable[_0x54167d(0x4ec)]['cursorUp']=function(_0x8704b){const _0x38bf5f=_0x54167d;let _0x5b30fd=Math[_0x38bf5f(0x350)](0x0,this['index']());const _0x457da9=this[_0x38bf5f(0x7b4)](),_0x4a2c0b=this['maxCols']();if(this['isUseModernControls']()&&_0x5b30fd>0x0||_0x8704b&&_0x4a2c0b===0x1){if(_0x38bf5f(0x38d)===_0x38bf5f(0x264))_0x2d8561[_0x38bf5f(0x940)][_0x38bf5f(0x280)]['call'](this,_0x233cc1),this[_0x38bf5f(0x66a)](_0x124e7a);else{_0x5b30fd-=_0x4a2c0b;if(_0x5b30fd<=0x0)_0x5b30fd=0x0;this[_0x38bf5f(0x63f)](_0x5b30fd);}}else!this[_0x38bf5f(0x260)]()&&((_0x5b30fd>=_0x4a2c0b||_0x8704b&&_0x4a2c0b===0x1)&&this[_0x38bf5f(0x63f)]((_0x5b30fd-_0x4a2c0b+_0x457da9)%_0x457da9));},VisuMZ[_0x54167d(0x940)][_0x54167d(0x9e4)]=Window_Selectable[_0x54167d(0x4ec)][_0x54167d(0x9c4)],Window_Selectable[_0x54167d(0x4ec)][_0x54167d(0x9c4)]=function(_0x18cf9f){const _0x3a6b0c=_0x54167d;this[_0x3a6b0c(0x260)]()&&_0x18cf9f&&this['maxCols']()===0x1&&this[_0x3a6b0c(0x69d)]()===0x0?this[_0x3a6b0c(0x63f)](this['maxItems']()-0x1):VisuMZ['CoreEngine'][_0x3a6b0c(0x9e4)]['call'](this,_0x18cf9f);},Window_Selectable[_0x54167d(0x4ec)][_0x54167d(0x260)]=function(){const _0x56726d=_0x54167d;return VisuMZ[_0x56726d(0x940)][_0x56726d(0x331)]['QoL']['ModernControls'];},VisuMZ['CoreEngine'][_0x54167d(0x74e)]=Window_Selectable['prototype']['processCursorMove'],Window_Selectable['prototype'][_0x54167d(0x430)]=function(){const _0x1e1578=_0x54167d;this[_0x1e1578(0x260)]()?(this['processCursorMoveModernControls'](),this[_0x1e1578(0x976)]()):_0x1e1578(0x524)!==_0x1e1578(0x9e5)?VisuMZ['CoreEngine'][_0x1e1578(0x74e)][_0x1e1578(0x204)](this):this['_forcedTroopView']='FV';},Window_Selectable[_0x54167d(0x4ec)][_0x54167d(0x76c)]=function(){return!![];},Window_Selectable[_0x54167d(0x4ec)][_0x54167d(0x69e)]=function(){const _0x5668d0=_0x54167d;if(this[_0x5668d0(0x318)]()){const _0x329e83=this[_0x5668d0(0x69d)]();Input[_0x5668d0(0x9e6)](_0x5668d0(0x83a))&&('yxfAK'!=='yxfAK'?_0x54003c[_0x5668d0(0x940)][_0x5668d0(0x596)][_0x5668d0(0x204)](this,_0x1da3c6):Input[_0x5668d0(0x7d2)](_0x5668d0(0x843))&&this[_0x5668d0(0x76c)]()?this['cursorPagedown']():this[_0x5668d0(0x663)](Input['isTriggered']('down')));if(Input[_0x5668d0(0x9e6)]('up')){if(_0x5668d0(0x5c5)===_0x5668d0(0x8ba)){if(_0x18d7ee===0x8)return![];return _0x2417ec[_0x5668d0(0x940)][_0x5668d0(0x6e6)]['call'](this,_0x1a17a8);}else Input['isPressed']('shift')&&this[_0x5668d0(0x76c)]()?_0x5668d0(0x7bf)===_0x5668d0(0x4a5)?this[_0x5668d0(0x45c)][_0x5668d0(0x6d0)](_0x1063d7[_0x5668d0(0x556)][_0x5668d0(0x9bd)]):this['cursorPageup']():this['cursorUp'](Input[_0x5668d0(0x54b)]('up'));}Input[_0x5668d0(0x9e6)]('right')&&this[_0x5668d0(0x465)](Input['isTriggered']('right')),Input[_0x5668d0(0x9e6)]('left')&&(_0x5668d0(0x650)===_0x5668d0(0x9ed)?_0x4d0415+=_0x581efb(_0x23e677):this[_0x5668d0(0xa0e)](Input['isTriggered'](_0x5668d0(0x750)))),!this[_0x5668d0(0x65b)]('pagedown')&&Input[_0x5668d0(0x9e6)](_0x5668d0(0x316))&&this[_0x5668d0(0x7a9)](),!this['isHandled'](_0x5668d0(0x5ae))&&Input[_0x5668d0(0x9e6)]('pageup')&&this[_0x5668d0(0x9f5)](),this[_0x5668d0(0x69d)]()!==_0x329e83&&this['playCursorSound']();}},Window_Selectable[_0x54167d(0x4ec)][_0x54167d(0x976)]=function(){const _0x53ff82=_0x54167d;if(this[_0x53ff82(0x318)]()){const _0x195e5c=this[_0x53ff82(0x69d)]();Input[_0x53ff82(0x54b)](_0x53ff82(0x588))&&this[_0x53ff82(0x63f)](Math[_0x53ff82(0x3e0)](this['index'](),0x0)),Input[_0x53ff82(0x54b)](_0x53ff82(0x4dd))&&('EdjjB'===_0x53ff82(0x95c)?(this[_0x53ff82(0x6ae)]['update'](),this[_0x53ff82(0x3e7)][_0x53ff82(0x4fa)](),this[_0x53ff82(0x6c7)][_0x53ff82(0x572)]=![],_0x2fa886['snapForBackground']()):this['smoothSelect'](Math[_0x53ff82(0x350)](this[_0x53ff82(0x69d)](),this[_0x53ff82(0x7b4)]()-0x1))),this[_0x53ff82(0x69d)]()!==_0x195e5c&&this['playCursorSound']();}},VisuMZ['CoreEngine'][_0x54167d(0x51f)]=Window_Selectable['prototype'][_0x54167d(0x8fa)],Window_Selectable['prototype']['processTouch']=function(){const _0x2dc8a8=_0x54167d;if(this[_0x2dc8a8(0x260)]())this[_0x2dc8a8(0x5c1)]();else{if('vXufJ'===_0x2dc8a8(0x9db))VisuMZ['CoreEngine'][_0x2dc8a8(0x51f)]['call'](this);else return _0x34dd11[_0x2dc8a8(0x85e)][_0x2dc8a8(0x204)](this);}},Window_Selectable[_0x54167d(0x4ec)][_0x54167d(0x5c1)]=function(){const _0x238592=_0x54167d;VisuMZ[_0x238592(0x940)][_0x238592(0x51f)]['call'](this);},Window_Selectable['prototype'][_0x54167d(0x6c4)]=function(){const _0x3e47f2=_0x54167d;return VisuMZ[_0x3e47f2(0x940)][_0x3e47f2(0x331)][_0x3e47f2(0x3b6)][_0x3e47f2(0x6f1)];},Window_Selectable[_0x54167d(0x4ec)][_0x54167d(0x4ab)]=function(){const _0x67b029=_0x54167d;return VisuMZ[_0x67b029(0x940)][_0x67b029(0x331)][_0x67b029(0x3b6)][_0x67b029(0x1f9)];},Window_Selectable[_0x54167d(0x4ec)]['itemHeight']=function(){const _0x287cf6=_0x54167d;return Window_Scrollable[_0x287cf6(0x4ec)][_0x287cf6(0x97d)][_0x287cf6(0x204)](this)+VisuMZ[_0x287cf6(0x940)]['Settings'][_0x287cf6(0x3b6)][_0x287cf6(0x49c)];;},VisuMZ[_0x54167d(0x940)]['Window_Selectable_drawBackgroundRect']=Window_Selectable['prototype']['drawBackgroundRect'],Window_Selectable[_0x54167d(0x4ec)]['drawBackgroundRect']=function(_0x4ebb30){const _0x514d1d=_0x54167d,_0x2db2a1=VisuMZ[_0x514d1d(0x940)][_0x514d1d(0x331)][_0x514d1d(0x3b6)];if(_0x2db2a1[_0x514d1d(0x4da)]===![])return;if(_0x2db2a1['DrawItemBackgroundJS']){if(_0x514d1d(0x839)===_0x514d1d(0x839))_0x2db2a1['DrawItemBackgroundJS'][_0x514d1d(0x204)](this,_0x4ebb30);else return _0x296a40;}else _0x514d1d(0x8ae)===_0x514d1d(0x8ae)?VisuMZ[_0x514d1d(0x940)]['Window_Selectable_drawBackgroundRect'][_0x514d1d(0x204)](this,_0x4ebb30):this[_0x514d1d(0x8b5)]['setBackgroundType'](_0x5b847a['layoutSettings'][_0x514d1d(0x342)]);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x99e)]=Window_Gold[_0x54167d(0x4ec)]['refresh'],Window_Gold[_0x54167d(0x4ec)][_0x54167d(0x7dd)]=function(){const _0x5096de=_0x54167d;this['isItemStyle']()?this[_0x5096de(0x739)]():'QjKWZ'===_0x5096de(0x9a4)?(_0x1ed905[_0x5096de(0x4ec)][_0x5096de(0x66b)][_0x5096de(0x204)](this),this[_0x5096de(0x8d9)]()):VisuMZ[_0x5096de(0x940)][_0x5096de(0x99e)][_0x5096de(0x204)](this);},Window_Gold[_0x54167d(0x4ec)]['isItemStyle']=function(){const _0x434c1b=_0x54167d;if(TextManager[_0x434c1b(0x925)]!==this[_0x434c1b(0x925)]())return![];return VisuMZ[_0x434c1b(0x940)][_0x434c1b(0x331)][_0x434c1b(0x67c)][_0x434c1b(0x819)];},Window_Gold[_0x54167d(0x4ec)]['drawGoldItemStyle']=function(){const _0x443d49=_0x54167d;this[_0x443d49(0x723)](),this[_0x443d49(0x9a3)][_0x443d49(0x531)](),this['contents'][_0x443d49(0x79f)]=VisuMZ[_0x443d49(0x940)][_0x443d49(0x331)][_0x443d49(0x67c)]['GoldFontSize'];const _0x2fefa4=VisuMZ[_0x443d49(0x940)][_0x443d49(0x331)][_0x443d49(0x67c)][_0x443d49(0x6f4)],_0x1fb479=this[_0x443d49(0x37d)](0x0);if(_0x2fefa4>0x0){if(_0x443d49(0x346)===_0x443d49(0x346)){const _0xe76650=_0x1fb479['y']+(this[_0x443d49(0x7c4)]()-ImageManager[_0x443d49(0x814)])/0x2;this[_0x443d49(0x84d)](_0x2fefa4,_0x1fb479['x'],_0xe76650);const _0x5a8d8f=ImageManager['iconWidth']+0x4;_0x1fb479['x']+=_0x5a8d8f,_0x1fb479['width']-=_0x5a8d8f;}else{var _0x513178=_0x11467b(_0x4d1608['$1']);_0x3247d5*=_0x513178;}}this['changeTextColor'](ColorManager['systemColor']()),this[_0x443d49(0x2cc)](this[_0x443d49(0x925)](),_0x1fb479['x'],_0x1fb479['y'],_0x1fb479['width'],'left');const _0x311e39=this[_0x443d49(0x705)](this[_0x443d49(0x925)]())+0x6;;_0x1fb479['x']+=_0x311e39,_0x1fb479[_0x443d49(0x281)]-=_0x311e39,this[_0x443d49(0x32c)]();const _0x4cc687=this[_0x443d49(0x570)](),_0x2c5f3b=this[_0x443d49(0x705)](this['_digitGrouping']?VisuMZ[_0x443d49(0x5da)](this[_0x443d49(0x570)]()):this[_0x443d49(0x570)]());_0x2c5f3b>_0x1fb479[_0x443d49(0x281)]?this[_0x443d49(0x2cc)](VisuMZ['CoreEngine'][_0x443d49(0x331)][_0x443d49(0x67c)]['GoldOverlap'],_0x1fb479['x'],_0x1fb479['y'],_0x1fb479[_0x443d49(0x281)],_0x443d49(0x231)):this[_0x443d49(0x2cc)](this[_0x443d49(0x570)](),_0x1fb479['x'],_0x1fb479['y'],_0x1fb479[_0x443d49(0x281)],_0x443d49(0x231)),this[_0x443d49(0x723)]();},Window_StatusBase[_0x54167d(0x4ec)][_0x54167d(0x3b8)]=function(_0xb9012,_0x5bf864,_0x49b129,_0x49e62e,_0x42b192){const _0x5d101d=_0x54167d;_0x49e62e=String(_0x49e62e||'')[_0x5d101d(0x8dd)]();if(VisuMZ[_0x5d101d(0x940)][_0x5d101d(0x331)]['Param'][_0x5d101d(0x209)]){if('WkDdu'!==_0x5d101d(0x4e5))return this[_0x5d101d(0x475)];else{const _0x75cea7=VisuMZ[_0x5d101d(0x97a)](_0x49e62e);_0x42b192?_0x5d101d(0x715)!=='YjNvh'?_0x1cf053[_0x5d101d(0x460)][_0x5d101d(0x36a)]=_0x5d101d(0x292):(this[_0x5d101d(0x404)](_0x75cea7,_0xb9012,_0x5bf864,this['gaugeLineHeight']()),_0x49b129-=this['gaugeLineHeight']()+0x2,_0xb9012+=this[_0x5d101d(0x362)]()+0x2):(this[_0x5d101d(0x84d)](_0x75cea7,_0xb9012+0x2,_0x5bf864+0x2),_0x49b129-=ImageManager[_0x5d101d(0x28b)]+0x4,_0xb9012+=ImageManager[_0x5d101d(0x28b)]+0x4);}}const _0x28a8fb=TextManager[_0x5d101d(0x594)](_0x49e62e);this['resetFontSettings'](),this[_0x5d101d(0x378)](ColorManager['systemColor']()),_0x42b192?_0x5d101d(0x2c7)!==_0x5d101d(0x811)?(this[_0x5d101d(0x9a3)][_0x5d101d(0x79f)]=this[_0x5d101d(0x227)](),this[_0x5d101d(0x9a3)][_0x5d101d(0x2cc)](_0x28a8fb,_0xb9012,_0x5bf864,_0x49b129,this['gaugeLineHeight'](),'left')):this[_0x5d101d(0x5b7)]={'duration':_0x271c32,'wholeDuration':_0x26cf78,'type':_0x2b1b49,'targetX':_0x3969c2,'targetY':_0x3fbc1c,'targetScaleX':_0x2b20a8,'targetScaleY':_0x1385a9,'targetOpacity':_0x1ea89e,'targetBackOpacity':_0x10688e,'targetContentsOpacity':_0x11cb41}:this[_0x5d101d(0x2cc)](_0x28a8fb,_0xb9012,_0x5bf864,_0x49b129),this[_0x5d101d(0x723)]();},Window_StatusBase[_0x54167d(0x4ec)][_0x54167d(0x227)]=function(){const _0x5f4ded=_0x54167d;return $gameSystem[_0x5f4ded(0x89c)]()-0x8;},Window_StatusBase['prototype'][_0x54167d(0x2e5)]=function(_0x2688b6,_0x1393b3,_0x394b47,_0x25e9fa){const _0x44a427=_0x54167d;_0x25e9fa=_0x25e9fa||0xa8,this['resetTextColor']();if(VisuMZ['CoreEngine'][_0x44a427(0x331)]['UI'][_0x44a427(0x7be)])this[_0x44a427(0x545)](_0x2688b6['currentClass']()[_0x44a427(0x614)],_0x1393b3,_0x394b47,_0x25e9fa);else{if(_0x44a427(0x845)!==_0x44a427(0x47a)){const _0x53d45d=_0x2688b6[_0x44a427(0x50c)]()[_0x44a427(0x614)][_0x44a427(0x3ed)](/\\I\[(\d+)\]/gi,'');this[_0x44a427(0x2cc)](_0x53d45d,_0x1393b3,_0x394b47,_0x25e9fa);}else _0x4145a0[_0x44a427(0x940)][_0x44a427(0x4b0)][_0x44a427(0x204)](this),this[_0x44a427(0x8d0)]();}},Window_StatusBase[_0x54167d(0x4ec)][_0x54167d(0x756)]=function(_0x25b34b,_0x1634b2,_0x493ab2,_0x178ecb){const _0x13d509=_0x54167d;_0x178ecb=_0x178ecb||0x10e,this[_0x13d509(0x32c)]();if(VisuMZ[_0x13d509(0x940)][_0x13d509(0x331)]['UI'][_0x13d509(0x740)])this[_0x13d509(0x545)](_0x25b34b[_0x13d509(0x641)](),_0x1634b2,_0x493ab2,_0x178ecb);else{if(_0x13d509(0x97c)==='CazGT'){const _0x48e7ae=_0x25b34b[_0x13d509(0x641)]()[_0x13d509(0x3ed)](/\\I\[(\d+)\]/gi,'');this['drawText'](_0x25b34b[_0x13d509(0x641)](),_0x1634b2,_0x493ab2,_0x178ecb);}else{var _0x36cb6b=_0xc854d1(_0x1721aa['$1']);try{_0x11961d+=_0x4bfb0c(_0x36cb6b);}catch(_0x155a75){if(_0x483c17[_0x13d509(0x562)]())_0x5b9eb3[_0x13d509(0x262)](_0x155a75);}}}},VisuMZ[_0x54167d(0x940)][_0x54167d(0x3eb)]=Window_StatusBase[_0x54167d(0x4ec)][_0x54167d(0x2bb)],Window_StatusBase[_0x54167d(0x4ec)][_0x54167d(0x2bb)]=function(_0x39609a,_0x3f39bc,_0xb9c0bf){const _0x4d8c68=_0x54167d;if(this[_0x4d8c68(0x6d9)]())this[_0x4d8c68(0x830)](_0x39609a,_0x3f39bc,_0xb9c0bf);VisuMZ[_0x4d8c68(0x940)][_0x4d8c68(0x3eb)][_0x4d8c68(0x204)](this,_0x39609a,_0x3f39bc,_0xb9c0bf);},Window_StatusBase[_0x54167d(0x4ec)]['isExpGaugeDrawn']=function(){const _0x55f984=_0x54167d;return VisuMZ[_0x55f984(0x940)][_0x55f984(0x331)]['UI']['LvExpGauge'];},Window_StatusBase[_0x54167d(0x4ec)][_0x54167d(0x830)]=function(_0x153d62,_0x4fe562,_0x5d73ba){const _0xad6a9d=_0x54167d;if(!_0x153d62)return;if(!_0x153d62['isActor']())return;const _0x33455d=0x80,_0x5a8079=_0x153d62[_0xad6a9d(0x552)]();let _0x3fedae=ColorManager[_0xad6a9d(0x491)](),_0x23c764=ColorManager['expGaugeColor2']();_0x5a8079>=0x1&&('nQJKx'!==_0xad6a9d(0x5a8)?(_0x3fedae=ColorManager[_0xad6a9d(0x6a7)](),_0x23c764=ColorManager[_0xad6a9d(0x5e2)]()):_0x3a89b5['playBuzzer']()),this[_0xad6a9d(0x2a5)](_0x4fe562,_0x5d73ba,_0x33455d,_0x5a8079,_0x3fedae,_0x23c764);},Window_EquipStatus['prototype'][_0x54167d(0x615)]=function(){const _0x1d1ea4=_0x54167d;let _0x4fffc3=0x0;for(const _0x567a9e of VisuMZ['CoreEngine'][_0x1d1ea4(0x331)][_0x1d1ea4(0x3fa)][_0x1d1ea4(0x70d)]){const _0x52e6ad=this[_0x1d1ea4(0x46a)](),_0x343583=this['paramY'](_0x4fffc3);this[_0x1d1ea4(0x793)](_0x52e6ad,_0x343583,_0x567a9e),_0x4fffc3++;}},Window_EquipStatus[_0x54167d(0x4ec)]['drawParamName']=function(_0xa0d154,_0x34cb05,_0x393fdb){const _0x576200=_0x54167d,_0x35bb8a=this['paramX']()-this[_0x576200(0x46a)]()*0x2;this[_0x576200(0x3b8)](_0xa0d154,_0x34cb05,_0x35bb8a,_0x393fdb,![]);},Window_EquipStatus[_0x54167d(0x4ec)]['drawCurrentParam']=function(_0x51b61d,_0x434e56,_0xbd041d){const _0x53321d=_0x54167d,_0x1f288a=this[_0x53321d(0x948)]();this['resetTextColor'](),this['drawText'](this[_0x53321d(0x521)][_0x53321d(0x4e4)](_0xbd041d,!![]),_0x51b61d,_0x434e56,_0x1f288a,'right');},Window_EquipStatus['prototype'][_0x54167d(0x5a2)]=function(_0x38632c,_0x35fe9c){const _0x93a18d=_0x54167d,_0x167a85=this[_0x93a18d(0x7a8)]();this[_0x93a18d(0x378)](ColorManager[_0x93a18d(0x636)]());const _0x35dec4=VisuMZ[_0x93a18d(0x940)][_0x93a18d(0x331)]['UI'][_0x93a18d(0x320)];this[_0x93a18d(0x2cc)](_0x35dec4,_0x38632c,_0x35fe9c,_0x167a85,_0x93a18d(0x68b));},Window_EquipStatus[_0x54167d(0x4ec)][_0x54167d(0x8b0)]=function(_0x27b2f1,_0x1bcf37,_0xb9ed40){const _0x2b7511=_0x54167d,_0x2e42b2=this[_0x2b7511(0x948)](),_0x20ee83=this[_0x2b7511(0x315)][_0x2b7511(0x4e4)](_0xb9ed40),_0x34e532=_0x20ee83-this['_actor'][_0x2b7511(0x4e4)](_0xb9ed40);this[_0x2b7511(0x378)](ColorManager['paramchangeTextColor'](_0x34e532)),this[_0x2b7511(0x2cc)](this[_0x2b7511(0x315)][_0x2b7511(0x4e4)](_0xb9ed40,!![]),_0x27b2f1,_0x1bcf37,_0x2e42b2,'right');},VisuMZ[_0x54167d(0x940)]['Window_EquipItem_isEnabled']=Window_EquipItem[_0x54167d(0x4ec)][_0x54167d(0x4b7)],Window_EquipItem['prototype'][_0x54167d(0x4b7)]=function(_0x4c9cf5){const _0x2c743a=_0x54167d;if(_0x4c9cf5&&this[_0x2c743a(0x521)])return this[_0x2c743a(0x521)][_0x2c743a(0x809)](_0x4c9cf5);else{if(_0x2c743a(0x759)!==_0x2c743a(0x759))_0x34b861=(0x1-_0x545f07(_0x484532['$1']))*-_0x7d9222;else return VisuMZ['CoreEngine'][_0x2c743a(0x34b)][_0x2c743a(0x204)](this,_0x4c9cf5);}},Window_StatusParams[_0x54167d(0x4ec)][_0x54167d(0x7b4)]=function(){const _0x10e0f6=_0x54167d;return VisuMZ[_0x10e0f6(0x940)][_0x10e0f6(0x331)][_0x10e0f6(0x3fa)][_0x10e0f6(0x70d)][_0x10e0f6(0x95b)];},Window_StatusParams[_0x54167d(0x4ec)][_0x54167d(0x793)]=function(_0x476208){const _0x3d51d1=_0x54167d,_0x1b1f78=this[_0x3d51d1(0x37d)](_0x476208),_0x397948=VisuMZ['CoreEngine'][_0x3d51d1(0x331)][_0x3d51d1(0x3fa)]['DisplayedParams'][_0x476208],_0x36e125=TextManager[_0x3d51d1(0x594)](_0x397948),_0x526cfc=this[_0x3d51d1(0x521)]['paramValueByName'](_0x397948,!![]);this[_0x3d51d1(0x3b8)](_0x1b1f78['x'],_0x1b1f78['y'],0xa0,_0x397948,![]),this[_0x3d51d1(0x32c)](),this[_0x3d51d1(0x2cc)](_0x526cfc,_0x1b1f78['x']+0xa0,_0x1b1f78['y'],0x3c,_0x3d51d1(0x231));};if(VisuMZ['CoreEngine']['Settings'][_0x54167d(0x8a6)][_0x54167d(0x257)]){VisuMZ[_0x54167d(0x940)][_0x54167d(0x331)][_0x54167d(0x8a6)]['QwertyLayout']&&(Window_NameInput[_0x54167d(0x7ea)]=['Q','W','E','R','T','Y','U','I','O','P','A','S','D','F','G','H','J','K','L','\x27','`','Z','X','C','V','B','N','M',',','.','q','w','e','r','t','y','u','i','o','p','a','s','d','f','g','h','j','k','l',':','~','z','x','c','v','b','n','m','\x22',';','1','2','3','4','5','6','7','8','9','0','!','@','#','$','%','^','&','*','(',')','<','>','[',']','-','_','/','\x20','Page','OK']);;VisuMZ[_0x54167d(0x940)][_0x54167d(0x927)]=Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x8d7)],Window_NameInput['prototype'][_0x54167d(0x8d7)]=function(_0x26f2b4){const _0x478c72=_0x54167d;this[_0x478c72(0x51e)]=this['defaultInputMode'](),VisuMZ[_0x478c72(0x940)][_0x478c72(0x927)][_0x478c72(0x204)](this,_0x26f2b4),this[_0x478c72(0x51e)]==='default'?this[_0x478c72(0x433)](0x0):_0x478c72(0x45b)!==_0x478c72(0x7d5)?(Input[_0x478c72(0x531)](),this[_0x478c72(0x505)]()):(_0x3cf783[_0x478c72(0x46e)]=![],_0x1e07fd[_0x478c72(0x438)]=!![]);},Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x9d0)]=function(){const _0x2e09aa=_0x54167d;if(Input[_0x2e09aa(0x599)]())return _0x2e09aa(0x646);return VisuMZ[_0x2e09aa(0x940)]['Settings'][_0x2e09aa(0x8a6)][_0x2e09aa(0x870)]||'keyboard';},VisuMZ[_0x54167d(0x940)]['Window_NameInput_processHandling']=Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x21c)],Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x21c)]=function(){const _0x26c603=_0x54167d;if(!this[_0x26c603(0x88f)]())return;if(!this[_0x26c603(0x935)])return;if(this[_0x26c603(0x51e)]===_0x26c603(0x97f)&&Input[_0x26c603(0x40e)]())'jnQMW'!==_0x26c603(0x4c1)?this['_inputWindow']['setBackgroundType'](_0x3cced1[_0x26c603(0x556)][_0x26c603(0x60b)]):this[_0x26c603(0x94e)]('default');else{if(Input['isSpecialCode']('backspace'))Input[_0x26c603(0x531)](),this[_0x26c603(0x621)]();else{if(Input['isTriggered'](_0x26c603(0x846))){Input['clear']();if(this['_mode']==='keyboard')'rXkAT'!=='rXkAT'?_0x330a43[_0x26c603(0x940)]['Game_Interpreter_command111'][_0x26c603(0x204)](this,_0x38cc97):this['switchModes'](_0x26c603(0x646));else{if(_0x26c603(0x458)!==_0x26c603(0x458)){const _0x26802a=this[_0x26c603(0x58e)](_0x2795af),_0x12e34e=new(_0x26802a?_0x14a061:_0xd11daa)(),_0x2562d3=this['makeTargetSprites'](_0xf45ddc);this['animationShouldMirror'](_0x3b0c55[0x0])&&(_0x525a79=!_0x229ae7),_0x12e34e[_0x26c603(0x225)]=_0xa0ce37,_0x12e34e[_0x26c603(0x82d)](_0x2562d3,_0x9c431a,_0x12d790,_0x55e9b0),_0x12e34e[_0x26c603(0x20f)](_0x214ad3),this['_effectsContainer'][_0x26c603(0x45f)](_0x12e34e),this[_0x26c603(0x755)][_0x26c603(0x398)](_0x12e34e);}else this[_0x26c603(0x94e)](_0x26c603(0x97f));}}else{if(this['_mode']==='keyboard'){if(_0x26c603(0x2b5)===_0x26c603(0x2b5))this[_0x26c603(0x606)]();else{if(!this[_0x26c603(0x629)])return;for(const _0x5bba67 of this[_0x26c603(0x629)]){_0x5bba67&&_0x5bba67[_0x26c603(0x3b5)]();}}}else Input[_0x26c603(0x623)](_0x26c603(0x3c9))?(Input['clear'](),this[_0x26c603(0x94e)](_0x26c603(0x97f))):_0x26c603(0x5fb)!==_0x26c603(0x5fb)?this[_0x26c603(0x53e)]=_0x4dae3b:VisuMZ[_0x26c603(0x940)]['Window_NameInput_processHandling'][_0x26c603(0x204)](this);}}}},VisuMZ[_0x54167d(0x940)][_0x54167d(0x2c9)]=Window_NameInput['prototype'][_0x54167d(0x8fa)],Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x8fa)]=function(){const _0x178075=_0x54167d;if(!this['isOpenAndActive']())return;if(this['_mode']==='keyboard'){if(TouchInput[_0x178075(0x54b)]()&&this[_0x178075(0x8e1)]()){if(_0x178075(0x36f)===_0x178075(0x36f))this['switchModes']('default');else{if(!_0x3a0894['isPlaytest']())return;if(!_0x2d073b[_0x178075(0x303)]())return;_0x4fa823['ConvertParams'](_0x1ac5c7,_0x537b28);const _0x202c0f=_0x572e2e[_0x178075(0x77e)]||0x1;_0x12336a[_0x178075(0x9eb)]=_0x202c0f;}}else TouchInput[_0x178075(0x6e2)]()&&(_0x178075(0x5fd)===_0x178075(0x5fd)?this['switchModes'](_0x178075(0x646)):this[_0x178075(0x29e)][_0x178075(0x6d0)](_0x35d247[_0x178075(0x556)][_0x178075(0x585)]));}else VisuMZ[_0x178075(0x940)]['Window_NameInput_processTouch'][_0x178075(0x204)](this);},Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x606)]=function(){const _0x56d4ae=_0x54167d;if(Input[_0x56d4ae(0x623)]('enter'))_0x56d4ae(0x87e)===_0x56d4ae(0x593)?this[_0x56d4ae(0x3d0)]['add'](_0x4433bb[_0x284df9])?_0x4178e7[_0x56d4ae(0x5d9)]():_0x5e330a[_0x56d4ae(0x466)]():(Input[_0x56d4ae(0x531)](),this[_0x56d4ae(0x9b3)]());else{if(Input[_0x56d4ae(0x2f6)]!==undefined){if('DIGsh'!=='PrYSl'){let _0x50cc7f=Input[_0x56d4ae(0x2f6)],_0x1b0989=_0x50cc7f[_0x56d4ae(0x95b)];for(let _0x101b5a=0x0;_0x101b5a<_0x1b0989;++_0x101b5a){if('Tiisj'!==_0x56d4ae(0x757)){if(this['_editWindow'][_0x56d4ae(0x5e9)](_0x50cc7f[_0x101b5a]))SoundManager['playOk']();else{if('uptqY'!==_0x56d4ae(0x222))SoundManager[_0x56d4ae(0x466)]();else{const _0x434369=this[_0x56d4ae(0x614)](),_0x167a16=this['bitmapWidth'](),_0x4d0a40=this[_0x56d4ae(0x9b5)]();this[_0x56d4ae(0x832)](),this[_0x56d4ae(0x228)][_0x56d4ae(0x531)](),this['bitmap'][_0x56d4ae(0x232)](_0x434369,0x0,0x0,_0x167a16,_0x4d0a40,_0x56d4ae(0x750));}}}else return!![];}Input['clear']();}else _0x312de3+=_0x56d4ae(0x61a);}}},Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x94e)]=function(_0xde45bf){const _0x2ac58f=_0x54167d;let _0x232127=this['_mode'];this[_0x2ac58f(0x51e)]=_0xde45bf,_0x232127!==this[_0x2ac58f(0x51e)]&&(this[_0x2ac58f(0x7dd)](),SoundManager[_0x2ac58f(0x5d9)](),this[_0x2ac58f(0x51e)]==='default'?this[_0x2ac58f(0x433)](0x0):this[_0x2ac58f(0x433)](-0x1));},VisuMZ['CoreEngine']['Window_NameInput_cursorDown']=Window_NameInput['prototype']['cursorDown'],Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x663)]=function(_0x352cce){const _0xcbbff3=_0x54167d;if(this[_0xcbbff3(0x51e)]===_0xcbbff3(0x97f)&&!Input[_0xcbbff3(0x966)]())return;if(Input[_0xcbbff3(0x8e3)]())return;VisuMZ[_0xcbbff3(0x940)][_0xcbbff3(0x3d8)][_0xcbbff3(0x204)](this,_0x352cce),this[_0xcbbff3(0x94e)](_0xcbbff3(0x646));},VisuMZ[_0x54167d(0x940)]['Window_NameInput_cursorUp']=Window_NameInput['prototype']['cursorUp'],Window_NameInput[_0x54167d(0x4ec)]['cursorUp']=function(_0xdf283f){const _0x2d35e1=_0x54167d;if(this[_0x2d35e1(0x51e)]===_0x2d35e1(0x97f)&&!Input[_0x2d35e1(0x966)]())return;if(Input[_0x2d35e1(0x8e3)]())return;VisuMZ[_0x2d35e1(0x940)][_0x2d35e1(0x6ce)][_0x2d35e1(0x204)](this,_0xdf283f),this[_0x2d35e1(0x94e)](_0x2d35e1(0x646));},VisuMZ[_0x54167d(0x940)][_0x54167d(0x703)]=Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x465)],Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x465)]=function(_0x182600){const _0x6d75d8=_0x54167d;if(this['_mode']===_0x6d75d8(0x97f)&&!Input[_0x6d75d8(0x966)]())return;if(Input[_0x6d75d8(0x8e3)]())return;VisuMZ['CoreEngine']['Window_NameInput_cursorRight'][_0x6d75d8(0x204)](this,_0x182600),this[_0x6d75d8(0x94e)](_0x6d75d8(0x646));},VisuMZ[_0x54167d(0x940)][_0x54167d(0x368)]=Window_NameInput['prototype']['cursorLeft'],Window_NameInput['prototype'][_0x54167d(0xa0e)]=function(_0x58a978){const _0x1b7390=_0x54167d;if(this[_0x1b7390(0x51e)]===_0x1b7390(0x97f)&&!Input[_0x1b7390(0x966)]())return;if(Input[_0x1b7390(0x8e3)]())return;VisuMZ['CoreEngine'][_0x1b7390(0x368)]['call'](this,_0x58a978),this[_0x1b7390(0x94e)](_0x1b7390(0x646));},VisuMZ[_0x54167d(0x940)]['Window_NameInput_cursorPagedown']=Window_NameInput['prototype'][_0x54167d(0x7a9)],Window_NameInput[_0x54167d(0x4ec)][_0x54167d(0x7a9)]=function(){const _0x65d1be=_0x54167d;if(this['_mode']===_0x65d1be(0x97f))return;if(Input[_0x65d1be(0x8e3)]())return;VisuMZ['CoreEngine']['Window_NameInput_cursorPagedown'][_0x65d1be(0x204)](this),this[_0x65d1be(0x94e)](_0x65d1be(0x646));},VisuMZ['CoreEngine'][_0x54167d(0x75e)]=Window_NameInput['prototype'][_0x54167d(0x9f5)],Window_NameInput[_0x54167d(0x4ec)]['cursorPageup']=function(){const _0x363913=_0x54167d;if(this[_0x363913(0x51e)]===_0x363913(0x97f))return;if(Input[_0x363913(0x8e3)]())return;VisuMZ[_0x363913(0x940)][_0x363913(0x75e)][_0x363913(0x204)](this),this[_0x363913(0x94e)](_0x363913(0x646));},VisuMZ[_0x54167d(0x940)]['Window_NameInput_refresh']=Window_NameInput[_0x54167d(0x4ec)]['refresh'],Window_NameInput[_0x54167d(0x4ec)]['refresh']=function(){const _0x477c56=_0x54167d;if(this[_0x477c56(0x51e)]===_0x477c56(0x97f)){this['contents'][_0x477c56(0x531)](),this[_0x477c56(0x9cb)]['clear'](),this[_0x477c56(0x32c)]();let _0x25c782=VisuMZ[_0x477c56(0x940)][_0x477c56(0x331)][_0x477c56(0x8a6)]['NameInputMessage'][_0x477c56(0x913)]('\x0a'),_0x5b137b=_0x25c782[_0x477c56(0x95b)],_0x2d0a4b=(this[_0x477c56(0x869)]-_0x5b137b*this[_0x477c56(0x7c4)]())/0x2;for(let _0x3634d2=0x0;_0x3634d2<_0x5b137b;++_0x3634d2){let _0x4bceb4=_0x25c782[_0x3634d2],_0x5c456a=this['textSizeEx'](_0x4bceb4)[_0x477c56(0x281)],_0x1bfe46=Math[_0x477c56(0x42f)]((this[_0x477c56(0x9a3)][_0x477c56(0x281)]-_0x5c456a)/0x2);this[_0x477c56(0x545)](_0x4bceb4,_0x1bfe46,_0x2d0a4b),_0x2d0a4b+=this[_0x477c56(0x7c4)]();}}else VisuMZ[_0x477c56(0x940)][_0x477c56(0x2be)][_0x477c56(0x204)](this);};};VisuMZ[_0x54167d(0x940)][_0x54167d(0x853)]=Window_ShopSell['prototype']['isEnabled'],Window_ShopSell[_0x54167d(0x4ec)]['isEnabled']=function(_0x28d941){const _0x4a176b=_0x54167d;return VisuMZ[_0x4a176b(0x940)][_0x4a176b(0x331)][_0x4a176b(0x2e9)][_0x4a176b(0x75d)]&&DataManager['isKeyItem'](_0x28d941)?![]:VisuMZ[_0x4a176b(0x940)]['Window_ShopSell_isEnabled'][_0x4a176b(0x204)](this,_0x28d941);},Window_NumberInput[_0x54167d(0x4ec)][_0x54167d(0x260)]=function(){return![];};VisuMZ[_0x54167d(0x940)]['Settings'][_0x54167d(0x8a6)][_0x54167d(0x5b6)]&&(VisuMZ[_0x54167d(0x940)]['Window_NumberInput_start']=Window_NumberInput[_0x54167d(0x4ec)][_0x54167d(0x773)],Window_NumberInput[_0x54167d(0x4ec)]['start']=function(){const _0x2e7074=_0x54167d;VisuMZ[_0x2e7074(0x940)][_0x2e7074(0x3f5)]['call'](this),this[_0x2e7074(0x433)](this[_0x2e7074(0x412)]-0x1),Input[_0x2e7074(0x531)]();},VisuMZ[_0x54167d(0x940)][_0x54167d(0x9d1)]=Window_NumberInput['prototype'][_0x54167d(0x769)],Window_NumberInput['prototype'][_0x54167d(0x769)]=function(){const _0x53d6e0=_0x54167d;if(!this['isOpenAndActive']())return;if(Input[_0x53d6e0(0x8e3)]())this['processKeyboardDigitChange']();else{if(Input[_0x53d6e0(0x623)](_0x53d6e0(0x4b3))){if(_0x53d6e0(0x4b6)!==_0x53d6e0(0x9af))this[_0x53d6e0(0x21b)]();else{if(_0x40e3a1)_0x55f900['ParseStateNotetags'](_0x3887af);}}else{if(Input[_0x53d6e0(0x912)]===0x2e){if('WkhCN'!==_0x53d6e0(0x5bc))this[_0x53d6e0(0x8fc)]();else{const _0x17744f=_0x5b3f04['platform']==_0x53d6e0(0x2c3)?_0x53d6e0(0x592):_0x29a5a9[_0x53d6e0(0x25d)]==_0x53d6e0(0x8e7)?_0x53d6e0(0x773):'xdg-open';_0x71a35f(_0x53d6e0(0x3c1))[_0x53d6e0(0x238)](_0x17744f+'\x20'+_0x1893ab);}}else{if(Input['_inputSpecialKeyCode']===0x24)this['processKeyboardHome']();else Input['_inputSpecialKeyCode']===0x23?this[_0x53d6e0(0x633)]():VisuMZ[_0x53d6e0(0x940)][_0x53d6e0(0x9d1)][_0x53d6e0(0x204)](this);}}}},Window_NumberInput[_0x54167d(0x4ec)]['processCursorMove']=function(){const _0x3aef86=_0x54167d;if(!this[_0x3aef86(0x318)]())return;if(Input[_0x3aef86(0x8e3)]()){if('YveEE'!=='DPGcJ')this['processKeyboardDigitChange']();else{const _0x5b0c7f=this[_0x3aef86(0x7a8)]();this[_0x3aef86(0x378)](_0x2dd463[_0x3aef86(0x636)]());const _0x2c018f=_0x3ea5d8[_0x3aef86(0x940)][_0x3aef86(0x331)]['UI'][_0x3aef86(0x320)];this['drawText'](_0x2c018f,_0x2e71d4,_0x3037ea,_0x5b0c7f,'center');}}else Window_Selectable['prototype'][_0x3aef86(0x430)][_0x3aef86(0x204)](this);},Window_NumberInput[_0x54167d(0x4ec)][_0x54167d(0x976)]=function(){},Window_NumberInput[_0x54167d(0x4ec)][_0x54167d(0x772)]=function(){const _0x1a00e4=_0x54167d;if(String(this[_0x1a00e4(0x52d)])[_0x1a00e4(0x95b)]>=this[_0x1a00e4(0x412)])return;const _0x56938e=Number(String(this[_0x1a00e4(0x52d)])+Input[_0x1a00e4(0x2f6)]);if(isNaN(_0x56938e))return;this['_number']=_0x56938e;const _0x8158aa='9'['repeat'](this[_0x1a00e4(0x412)]);this[_0x1a00e4(0x52d)]=this[_0x1a00e4(0x52d)][_0x1a00e4(0x29b)](0x0,_0x8158aa),Input[_0x1a00e4(0x531)](),this[_0x1a00e4(0x7dd)](),SoundManager[_0x1a00e4(0x711)](),this[_0x1a00e4(0x433)](this[_0x1a00e4(0x412)]-0x1);},Window_NumberInput['prototype'][_0x54167d(0x21b)]=function(){const _0x2bad8a=_0x54167d;this['_number']=Number(String(this[_0x2bad8a(0x52d)])[_0x2bad8a(0x6c2)](0x0,-0x1)),this[_0x2bad8a(0x52d)]=Math[_0x2bad8a(0x350)](0x0,this[_0x2bad8a(0x52d)]),Input['clear'](),this[_0x2bad8a(0x7dd)](),SoundManager[_0x2bad8a(0x711)](),this[_0x2bad8a(0x433)](this[_0x2bad8a(0x412)]-0x1);},Window_NumberInput['prototype'][_0x54167d(0x8fc)]=function(){const _0x5ef67c=_0x54167d;this[_0x5ef67c(0x52d)]=Number(String(this['_number'])['substring'](0x1)),this[_0x5ef67c(0x52d)]=Math['max'](0x0,this[_0x5ef67c(0x52d)]),Input[_0x5ef67c(0x531)](),this[_0x5ef67c(0x7dd)](),SoundManager[_0x5ef67c(0x711)](),this[_0x5ef67c(0x433)](this['_maxDigits']-0x1);});;Window_TitleCommand[_0x54167d(0x921)]=VisuMZ['CoreEngine'][_0x54167d(0x331)][_0x54167d(0x312)],Window_TitleCommand['prototype'][_0x54167d(0x3a5)]=function(){const _0x26e7c1=_0x54167d;this[_0x26e7c1(0x7b0)]();},Window_TitleCommand[_0x54167d(0x4ec)]['makeCoreEngineCommandList']=function(){const _0x1634a8=_0x54167d;for(const _0x216e0d of Window_TitleCommand[_0x1634a8(0x921)]){if(_0x216e0d[_0x1634a8(0x48d)][_0x1634a8(0x204)](this)){const _0x495e4a=_0x216e0d['Symbol'];let _0x46d2c0=_0x216e0d['TextStr'];if(['',_0x1634a8(0x916)][_0x1634a8(0x9ef)](_0x46d2c0))_0x46d2c0=_0x216e0d['TextJS'][_0x1634a8(0x204)](this);const _0x321401=_0x216e0d[_0x1634a8(0x338)][_0x1634a8(0x204)](this),_0x1de8df=_0x216e0d[_0x1634a8(0x5c8)][_0x1634a8(0x204)](this);this['addCommand'](_0x46d2c0,_0x495e4a,_0x321401,_0x1de8df),this['setHandler'](_0x495e4a,_0x216e0d[_0x1634a8(0x406)][_0x1634a8(0x6ac)](this,_0x1de8df));}}},Window_GameEnd[_0x54167d(0x921)]=VisuMZ['CoreEngine'][_0x54167d(0x331)][_0x54167d(0x529)][_0x54167d(0x39d)]['CommandList'],Window_GameEnd[_0x54167d(0x4ec)][_0x54167d(0x3a5)]=function(){const _0x50c0bc=_0x54167d;this[_0x50c0bc(0x7b0)]();},Window_GameEnd[_0x54167d(0x4ec)][_0x54167d(0x7b0)]=function(){const _0x5e1cfd=_0x54167d;for(const _0xc23907 of Window_GameEnd[_0x5e1cfd(0x921)]){if(_0xc23907[_0x5e1cfd(0x48d)]['call'](this)){if(_0x5e1cfd(0x4ba)!==_0x5e1cfd(0x583)){const _0x137476=_0xc23907[_0x5e1cfd(0x221)];let _0x30bced=_0xc23907[_0x5e1cfd(0x20d)];if(['',_0x5e1cfd(0x916)][_0x5e1cfd(0x9ef)](_0x30bced))_0x30bced=_0xc23907[_0x5e1cfd(0x424)][_0x5e1cfd(0x204)](this);const _0x3c5610=_0xc23907[_0x5e1cfd(0x338)]['call'](this),_0x33c87f=_0xc23907[_0x5e1cfd(0x5c8)][_0x5e1cfd(0x204)](this);this[_0x5e1cfd(0x771)](_0x30bced,_0x137476,_0x3c5610,_0x33c87f),this[_0x5e1cfd(0x60e)](_0x137476,_0xc23907[_0x5e1cfd(0x406)][_0x5e1cfd(0x6ac)](this,_0x33c87f));}else _0x529055[_0x5e1cfd(0x940)]['Game_Picture_show']['call'](this,_0x7d1c3a,_0x27ee7c,_0x1954fd,_0x37dc54,_0x473b4c,_0x4c158,_0x782547,_0x4eaa5a),this['setAnchor']([{'x':0x0,'y':0x0},{'x':0.5,'y':0.5}][_0x46c14b]||{'x':0x0,'y':0x0});}}};function Window_ButtonAssist(){const _0x81ee95=_0x54167d;this[_0x81ee95(0x8d7)](...arguments);}Window_ButtonAssist[_0x54167d(0x4ec)]=Object[_0x54167d(0x66b)](Window_Base[_0x54167d(0x4ec)]),Window_ButtonAssist[_0x54167d(0x4ec)][_0x54167d(0x4a9)]=Window_ButtonAssist,Window_ButtonAssist['prototype']['initialize']=function(_0x46fa02){const _0x30b4bf=_0x54167d;this[_0x30b4bf(0x4ef)]={},Window_Base['prototype'][_0x30b4bf(0x8d7)][_0x30b4bf(0x204)](this,_0x46fa02),this[_0x30b4bf(0x6d0)](VisuMZ[_0x30b4bf(0x940)]['Settings'][_0x30b4bf(0x464)][_0x30b4bf(0x4a7)]||0x0),this['refresh']();},Window_ButtonAssist['prototype'][_0x54167d(0x89f)]=function(){const _0x467eaa=_0x54167d;this[_0x467eaa(0x9a3)]['fontSize']<=0x60&&(this[_0x467eaa(0x9a3)]['fontSize']+=0x6);},Window_ButtonAssist[_0x54167d(0x4ec)][_0x54167d(0x49b)]=function(){const _0x125dae=_0x54167d;this['contents'][_0x125dae(0x79f)]>=0x18&&(this['contents']['fontSize']-=0x6);},Window_ButtonAssist[_0x54167d(0x4ec)]['update']=function(){const _0x16cc95=_0x54167d;Window_Base[_0x16cc95(0x4ec)][_0x16cc95(0x3b5)]['call'](this),this[_0x16cc95(0x624)]();},Window_ButtonAssist[_0x54167d(0x4ec)][_0x54167d(0x511)]=function(){const _0x5bbaad=_0x54167d;this['padding']=SceneManager[_0x5bbaad(0x4ce)]['getButtonAssistLocation']()!==_0x5bbaad(0x926)?0x0:0x8;},Window_ButtonAssist[_0x54167d(0x4ec)][_0x54167d(0x624)]=function(){const _0x47a501=_0x54167d,_0x3c7daa=SceneManager[_0x47a501(0x4ce)];for(let _0xfcf2fd=0x1;_0xfcf2fd<=0x5;_0xfcf2fd++){if(this[_0x47a501(0x4ef)][_0x47a501(0x930)[_0x47a501(0x482)](_0xfcf2fd)]!==_0x3c7daa[_0x47a501(0x3bb)[_0x47a501(0x482)](_0xfcf2fd)]()){if(_0x47a501(0x250)!=='pHUlQ')return this[_0x47a501(0x7dd)]();else this['makeCoreEngineCommandList']();}if(this['_data']['text%1'[_0x47a501(0x482)](_0xfcf2fd)]!==_0x3c7daa[_0x47a501(0x22d)[_0x47a501(0x482)](_0xfcf2fd)]())return this[_0x47a501(0x7dd)]();}},Window_ButtonAssist['prototype'][_0x54167d(0x7dd)]=function(){const _0x4db21c=_0x54167d;this[_0x4db21c(0x9a3)][_0x4db21c(0x531)]();for(let _0x3b2d2e=0x1;_0x3b2d2e<=0x5;_0x3b2d2e++){if(_0x4db21c(0x215)!=='JFUTB')this[_0x4db21c(0x558)](_0x3b2d2e);else return _0x27b756[_0x4db21c(0x9bc)]()>=0x1;}},Window_ButtonAssist[_0x54167d(0x4ec)][_0x54167d(0x558)]=function(_0x1f8174){const _0x55e2f6=_0x54167d,_0x16c740=this['innerWidth']/0x5,_0x5a1809=SceneManager[_0x55e2f6(0x4ce)],_0x163bba=_0x5a1809[_0x55e2f6(0x3bb)['format'](_0x1f8174)](),_0x59a860=_0x5a1809[_0x55e2f6(0x22d)[_0x55e2f6(0x482)](_0x1f8174)]();this[_0x55e2f6(0x4ef)][_0x55e2f6(0x930)[_0x55e2f6(0x482)](_0x1f8174)]=_0x163bba,this['_data']['text%1'[_0x55e2f6(0x482)](_0x1f8174)]=_0x59a860;if(_0x163bba==='')return;if(_0x59a860==='')return;const _0x38199a=_0x5a1809[_0x55e2f6(0x49e)[_0x55e2f6(0x482)](_0x1f8174)](),_0x54815e=this[_0x55e2f6(0x46a)](),_0x1d6ad4=_0x16c740*(_0x1f8174-0x1)+_0x54815e+_0x38199a,_0xe9a34d=VisuMZ['CoreEngine'][_0x55e2f6(0x331)][_0x55e2f6(0x464)][_0x55e2f6(0x676)];this[_0x55e2f6(0x545)](_0xe9a34d[_0x55e2f6(0x482)](_0x163bba,_0x59a860),_0x1d6ad4,0x0,_0x16c740-_0x54815e*0x2);},VisuMZ[_0x54167d(0x940)]['Game_Interpreter_updateWaitMode']=Game_Interpreter[_0x54167d(0x4ec)][_0x54167d(0x943)],Game_Interpreter['prototype'][_0x54167d(0x943)]=function(){const _0x5326b0=_0x54167d;if($gameTemp[_0x5326b0(0x9eb)]!==undefined){if(_0x5326b0(0x481)!==_0x5326b0(0x5f7))return VisuMZ[_0x5326b0(0x940)][_0x5326b0(0x831)]();else this[_0x5326b0(0x8b5)]['setBackgroundType'](_0x47a985[_0x5326b0(0x556)][_0x5326b0(0x342)]);}return VisuMZ[_0x5326b0(0x940)][_0x5326b0(0x5df)][_0x5326b0(0x204)](this);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x831)]=function(){const _0x23c343=_0x54167d,_0x4aa6d0=$gameTemp[_0x23c343(0x9eb)]||0x0;if(_0x4aa6d0<0x0||_0x4aa6d0>0x64||TouchInput[_0x23c343(0x6e2)]()||Input[_0x23c343(0x54b)]('cancel')){if(_0x23c343(0x955)===_0x23c343(0x955))$gameTemp[_0x23c343(0x9eb)]=undefined,Input[_0x23c343(0x531)](),TouchInput['clear']();else{const _0xa50be1=_0x5ade79[_0x23c343(0x464)];_0xa50be1[_0x23c343(0x504)]=_0xa50be1[_0x23c343(0x504)]||_0x23c343(0x2d1),_0xa50be1['KeyTAB']=_0xa50be1[_0x23c343(0x8fb)]||_0x23c343(0x657);}}const _0x4490de=$gameScreen['picture'](_0x4aa6d0);return _0x4490de&&(_0x23c343(0x509)===_0x23c343(0x38b)?_0x291bc9['isTriggered'](_0x23c343(0x5cd))&&(_0x29fbf0['alwaysDash']=!_0x27ad82[_0x23c343(0x3de)],_0x126be4[_0x23c343(0x300)]()):(_0x4490de['_x']=TouchInput['_x'],_0x4490de['_y']=TouchInput['_y'])),VisuMZ[_0x23c343(0x940)][_0x23c343(0x2dd)](),$gameTemp[_0x23c343(0x9eb)]!==undefined;},VisuMZ['CoreEngine'][_0x54167d(0x2dd)]=function(){const _0x12c9f8=_0x54167d,_0x41bd19=SceneManager['_scene'];if(!_0x41bd19)return;!_0x41bd19[_0x12c9f8(0x478)]&&(SoundManager[_0x12c9f8(0x61b)](),_0x41bd19['_pictureCoordinatesWindow']=new Window_PictureCoordinates(),_0x41bd19[_0x12c9f8(0x45f)](_0x41bd19[_0x12c9f8(0x478)])),$gameTemp[_0x12c9f8(0x9eb)]===undefined&&(SoundManager[_0x12c9f8(0x94a)](),_0x41bd19['removeChild'](_0x41bd19[_0x12c9f8(0x478)]),_0x41bd19[_0x12c9f8(0x478)]=undefined);};function Window_PictureCoordinates(){const _0x326076=_0x54167d;this[_0x326076(0x8d7)](...arguments);}Window_PictureCoordinates[_0x54167d(0x4ec)]=Object['create'](Window_Base[_0x54167d(0x4ec)]),Window_PictureCoordinates[_0x54167d(0x4ec)][_0x54167d(0x4a9)]=Window_PictureCoordinates,Window_PictureCoordinates['prototype']['initialize']=function(){const _0x1a7ef9=_0x54167d;this['_lastOrigin']='nah',this[_0x1a7ef9(0x6b3)]='nah',this[_0x1a7ef9(0x6a4)]=_0x1a7ef9(0x297);const _0x2fc07c=this[_0x1a7ef9(0x7cc)]();Window_Base[_0x1a7ef9(0x4ec)][_0x1a7ef9(0x8d7)][_0x1a7ef9(0x204)](this,_0x2fc07c),this[_0x1a7ef9(0x6d0)](0x2);},Window_PictureCoordinates[_0x54167d(0x4ec)][_0x54167d(0x7cc)]=function(){const _0x1eaba1=_0x54167d;let _0x40ef7c=0x0,_0x4ce83a=Graphics[_0x1eaba1(0x3e1)]-this['lineHeight'](),_0x2ac828=Graphics['width'],_0x1ca8d5=this[_0x1eaba1(0x7c4)]();return new Rectangle(_0x40ef7c,_0x4ce83a,_0x2ac828,_0x1ca8d5);},Window_PictureCoordinates['prototype'][_0x54167d(0x511)]=function(){this['padding']=0x0;},Window_PictureCoordinates[_0x54167d(0x4ec)]['update']=function(){const _0x1fad88=_0x54167d;Window_Base[_0x1fad88(0x4ec)][_0x1fad88(0x3b5)]['call'](this),this['updateData']();},Window_PictureCoordinates[_0x54167d(0x4ec)][_0x54167d(0x3f7)]=function(){const _0xaef205=_0x54167d;if(!this[_0xaef205(0x8ed)]())return;this[_0xaef205(0x7dd)]();},Window_PictureCoordinates['prototype'][_0x54167d(0x8ed)]=function(){const _0x4ca435=_0x54167d,_0x19aca9=$gameTemp[_0x4ca435(0x9eb)],_0x55e64a=$gameScreen[_0x4ca435(0x217)](_0x19aca9);if(_0x55e64a){if(_0x4ca435(0x389)!==_0x4ca435(0x4f7))return this['_lastOrigin']!==_0x55e64a[_0x4ca435(0x1f7)]||this[_0x4ca435(0x6b3)]!==_0x55e64a['_x']||this[_0x4ca435(0x6a4)]!==_0x55e64a['_y'];else _0xf30477[_0x4ca435(0x940)][_0x4ca435(0x3f9)][_0x4ca435(0x204)](this),_0x36b326=null,_0x838e0c=null,_0x31fb30=null,_0x5e232b=null;}else{if(_0x4ca435(0x7d7)===_0x4ca435(0x70e))_0x34d9cb[_0x4ca435(0x940)]['Input_clear'][_0x4ca435(0x204)](this),this['_inputString']=_0x110fd4,this['_inputSpecialKeyCode']=_0x25d372,this['_gamepadWait']=_0x358d8a['keyRepeatWait'];else return![];}},Window_PictureCoordinates[_0x54167d(0x4ec)]['refresh']=function(){const _0x561fa4=_0x54167d;this[_0x561fa4(0x9a3)][_0x561fa4(0x531)]();const _0x5a19df=$gameTemp[_0x561fa4(0x9eb)],_0x308817=$gameScreen[_0x561fa4(0x217)](_0x5a19df);if(!_0x308817)return;this[_0x561fa4(0x42a)]=_0x308817[_0x561fa4(0x1f7)],this[_0x561fa4(0x6b3)]=_0x308817['_x'],this['_lastY']=_0x308817['_y'];const _0x508dc0=ColorManager[_0x561fa4(0x53a)]();this[_0x561fa4(0x9a3)][_0x561fa4(0x434)](0x0,0x0,this[_0x561fa4(0x499)],this[_0x561fa4(0x869)],_0x508dc0);const _0x3e4f1f=_0x561fa4(0x25b)[_0x561fa4(0x482)](_0x308817[_0x561fa4(0x1f7)]===0x0?_0x561fa4(0x9a6):_0x561fa4(0x998)),_0xf6c04e=_0x561fa4(0x4b2)[_0x561fa4(0x482)](_0x308817['_x']),_0x5e5bea=_0x561fa4(0x7e4)['format'](_0x308817['_y']),_0x5f089f=_0x561fa4(0x837)[_0x561fa4(0x482)](TextManager[_0x561fa4(0x9fd)](_0x561fa4(0x9a7)));let _0x189242=Math[_0x561fa4(0x42f)](this['innerWidth']/0x4);this['drawText'](_0x3e4f1f,_0x189242*0x0,0x0,_0x189242),this['drawText'](_0xf6c04e,_0x189242*0x1,0x0,_0x189242,_0x561fa4(0x68b)),this['drawText'](_0x5e5bea,_0x189242*0x2,0x0,_0x189242,'center');const _0x4a79bc=this['textSizeEx'](_0x5f089f)[_0x561fa4(0x281)],_0x13660e=this[_0x561fa4(0x499)]-_0x4a79bc;this[_0x561fa4(0x545)](_0x5f089f,_0x13660e,0x0,_0x4a79bc);},VisuMZ['ShowDevTools']=function(_0x1ed590){const _0x3da71b=_0x54167d;if(Utils['isOptionValid'](_0x3da71b(0x931))){if(_0x3da71b(0x807)!==_0x3da71b(0x807))this[_0x3da71b(0x93a)](_0x507eec);else{var _0x541b98=require(_0x3da71b(0x2a4))[_0x3da71b(0x3b6)][_0x3da71b(0x2b7)]();SceneManager[_0x3da71b(0x3fc)]();if(_0x1ed590)setTimeout(_0x541b98[_0x3da71b(0x924)][_0x3da71b(0x6ac)](_0x541b98),0x190);}}},VisuMZ[_0x54167d(0x9d5)]=function(_0x16e342,_0xdf6e51){const _0x4fbe00=_0x54167d;_0xdf6e51=_0xdf6e51['toUpperCase']();var _0x54b3c0=1.70158,_0x321f76=0.7;switch(_0xdf6e51){case _0x4fbe00(0x6e3):return _0x16e342;case _0x4fbe00(0x4c6):return-0x1*Math[_0x4fbe00(0x6fa)](_0x16e342*(Math['PI']/0x2))+0x1;case _0x4fbe00(0x47f):return Math[_0x4fbe00(0x98c)](_0x16e342*(Math['PI']/0x2));case _0x4fbe00(0x3b9):return-0.5*(Math['cos'](Math['PI']*_0x16e342)-0x1);case _0x4fbe00(0x407):return _0x16e342*_0x16e342;case _0x4fbe00(0x67e):return _0x16e342*(0x2-_0x16e342);case'INOUTQUAD':return _0x16e342<0.5?0x2*_0x16e342*_0x16e342:-0x1+(0x4-0x2*_0x16e342)*_0x16e342;case _0x4fbe00(0x263):return _0x16e342*_0x16e342*_0x16e342;case'OUTCUBIC':var _0x357cad=_0x16e342-0x1;return _0x357cad*_0x357cad*_0x357cad+0x1;case _0x4fbe00(0x6bf):return _0x16e342<0.5?0x4*_0x16e342*_0x16e342*_0x16e342:(_0x16e342-0x1)*(0x2*_0x16e342-0x2)*(0x2*_0x16e342-0x2)+0x1;case'INQUART':return _0x16e342*_0x16e342*_0x16e342*_0x16e342;case _0x4fbe00(0x4d2):var _0x357cad=_0x16e342-0x1;return 0x1-_0x357cad*_0x357cad*_0x357cad*_0x357cad;case _0x4fbe00(0x2d5):var _0x357cad=_0x16e342-0x1;return _0x16e342<0.5?0x8*_0x16e342*_0x16e342*_0x16e342*_0x16e342:0x1-0x8*_0x357cad*_0x357cad*_0x357cad*_0x357cad;case _0x4fbe00(0x240):return _0x16e342*_0x16e342*_0x16e342*_0x16e342*_0x16e342;case _0x4fbe00(0x85a):var _0x357cad=_0x16e342-0x1;return 0x1+_0x357cad*_0x357cad*_0x357cad*_0x357cad*_0x357cad;case _0x4fbe00(0x302):var _0x357cad=_0x16e342-0x1;return _0x16e342<0.5?0x10*_0x16e342*_0x16e342*_0x16e342*_0x16e342*_0x16e342:0x1+0x10*_0x357cad*_0x357cad*_0x357cad*_0x357cad*_0x357cad;case _0x4fbe00(0x799):if(_0x16e342===0x0)return 0x0;return Math[_0x4fbe00(0x9ba)](0x2,0xa*(_0x16e342-0x1));case _0x4fbe00(0x43d):if(_0x16e342===0x1)return 0x1;return-Math['pow'](0x2,-0xa*_0x16e342)+0x1;case'INOUTEXPO':if(_0x16e342===0x0||_0x16e342===0x1){if(_0x4fbe00(0x405)===_0x4fbe00(0x405))return _0x16e342;else this['_profileWindow'][_0x4fbe00(0x6d0)](_0x580c49['layoutSettings'][_0x4fbe00(0x48e)]);}var _0x565460=_0x16e342*0x2,_0x5b61c7=_0x565460-0x1;if(_0x565460<0x1){if(_0x4fbe00(0x25a)!==_0x4fbe00(0x25a))_0x4e96cb[_0x4fbe00(0x940)][_0x4fbe00(0x591)]['call'](this),this[_0x4fbe00(0x8d9)]();else return 0.5*Math[_0x4fbe00(0x9ba)](0x2,0xa*_0x5b61c7);}return 0.5*(-Math[_0x4fbe00(0x9ba)](0x2,-0xa*_0x5b61c7)+0x2);case _0x4fbe00(0x7ab):var _0x565460=_0x16e342/0x1;return-0x1*(Math[_0x4fbe00(0x69f)](0x1-_0x565460*_0x16e342)-0x1);case'OUTCIRC':var _0x357cad=_0x16e342-0x1;return Math[_0x4fbe00(0x69f)](0x1-_0x357cad*_0x357cad);case _0x4fbe00(0x2d7):var _0x565460=_0x16e342*0x2,_0x5b61c7=_0x565460-0x2;if(_0x565460<0x1)return-0.5*(Math[_0x4fbe00(0x69f)](0x1-_0x565460*_0x565460)-0x1);return 0.5*(Math[_0x4fbe00(0x69f)](0x1-_0x5b61c7*_0x5b61c7)+0x1);case _0x4fbe00(0x917):return _0x16e342*_0x16e342*((_0x54b3c0+0x1)*_0x16e342-_0x54b3c0);case _0x4fbe00(0x7db):var _0x565460=_0x16e342/0x1-0x1;return _0x565460*_0x565460*((_0x54b3c0+0x1)*_0x565460+_0x54b3c0)+0x1;break;case'INOUTBACK':var _0x565460=_0x16e342*0x2,_0xcfa780=_0x565460-0x2,_0x152bca=_0x54b3c0*1.525;if(_0x565460<0x1)return 0.5*_0x565460*_0x565460*((_0x152bca+0x1)*_0x565460-_0x152bca);return 0.5*(_0xcfa780*_0xcfa780*((_0x152bca+0x1)*_0xcfa780+_0x152bca)+0x2);case _0x4fbe00(0x818):if(_0x16e342===0x0||_0x16e342===0x1)return _0x4fbe00(0x326)!==_0x4fbe00(0x8a0)?_0x16e342:![];var _0x565460=_0x16e342/0x1,_0x5b61c7=_0x565460-0x1,_0x29180b=0x1-_0x321f76,_0x152bca=_0x29180b/(0x2*Math['PI'])*Math['asin'](0x1);return-(Math[_0x4fbe00(0x9ba)](0x2,0xa*_0x5b61c7)*Math[_0x4fbe00(0x98c)]((_0x5b61c7-_0x152bca)*(0x2*Math['PI'])/_0x29180b));case _0x4fbe00(0x637):var _0x29180b=0x1-_0x321f76,_0x565460=_0x16e342*0x2;if(_0x16e342===0x0||_0x16e342===0x1)return _0x16e342;var _0x152bca=_0x29180b/(0x2*Math['PI'])*Math['asin'](0x1);return Math[_0x4fbe00(0x9ba)](0x2,-0xa*_0x565460)*Math[_0x4fbe00(0x98c)]((_0x565460-_0x152bca)*(0x2*Math['PI'])/_0x29180b)+0x1;case _0x4fbe00(0x457):var _0x29180b=0x1-_0x321f76;if(_0x16e342===0x0||_0x16e342===0x1)return _0x16e342;var _0x565460=_0x16e342*0x2,_0x5b61c7=_0x565460-0x1,_0x152bca=_0x29180b/(0x2*Math['PI'])*Math[_0x4fbe00(0x728)](0x1);if(_0x565460<0x1)return-0.5*(Math[_0x4fbe00(0x9ba)](0x2,0xa*_0x5b61c7)*Math[_0x4fbe00(0x98c)]((_0x5b61c7-_0x152bca)*(0x2*Math['PI'])/_0x29180b));return Math['pow'](0x2,-0xa*_0x5b61c7)*Math[_0x4fbe00(0x98c)]((_0x5b61c7-_0x152bca)*(0x2*Math['PI'])/_0x29180b)*0.5+0x1;case'OUTBOUNCE':var _0x565460=_0x16e342/0x1;if(_0x565460<0x1/2.75)return _0x4fbe00(0x85b)===_0x4fbe00(0x85b)?7.5625*_0x565460*_0x565460:_0x43990a[_0x4fbe00(0x556)][_0x4fbe00(0x2b1)]['call'](this);else{if(_0x565460<0x2/2.75){if(_0x4fbe00(0x671)!==_0x4fbe00(0x671))_0x366df0[_0x4fbe00(0x351)]=_0x5add88[_0x4fbe00(0x3e0)](_0x150de2(_0x1688eb['$1']),_0x257292['maxLevel']);else{var _0xcfa780=_0x565460-1.5/2.75;return 7.5625*_0xcfa780*_0xcfa780+0.75;}}else{if(_0x565460<2.5/2.75){var _0xcfa780=_0x565460-2.25/2.75;return 7.5625*_0xcfa780*_0xcfa780+0.9375;}else{var _0xcfa780=_0x565460-2.625/2.75;return 7.5625*_0xcfa780*_0xcfa780+0.984375;}}}case _0x4fbe00(0x3b3):var _0x1ceb9a=0x1-VisuMZ[_0x4fbe00(0x9d5)](0x1-_0x16e342,_0x4fbe00(0x6e4));return _0x1ceb9a;case _0x4fbe00(0x3e6):if(_0x16e342<0.5){if(_0x4fbe00(0x805)===_0x4fbe00(0x805))var _0x1ceb9a=VisuMZ[_0x4fbe00(0x9d5)](_0x16e342*0x2,_0x4fbe00(0x6fb))*0.5;else this['_colorCache'][_0x28753c]=this[_0x4fbe00(0x423)](_0x2fa561(_0x1d7dd2));}else{if('XZacm'===_0x4fbe00(0x80f))var _0x1ceb9a=VisuMZ[_0x4fbe00(0x9d5)](_0x16e342*0x2-0x1,_0x4fbe00(0x6e4))*0.5+0.5;else return _0x5a7233[_0x4fbe00(0x940)][_0x4fbe00(0x331)][_0x4fbe00(0x3b6)][_0x4fbe00(0x559)];}return _0x1ceb9a;default:return _0x16e342;}},VisuMZ[_0x54167d(0x97a)]=function(_0x282f31){const _0x482279=_0x54167d;_0x282f31=String(_0x282f31)[_0x482279(0x8dd)]();const _0x508bb4=VisuMZ[_0x482279(0x940)][_0x482279(0x331)][_0x482279(0x3fa)];if(_0x282f31===_0x482279(0x578))return _0x508bb4[_0x482279(0x3b2)];if(_0x282f31===_0x482279(0x784))return _0x508bb4[_0x482279(0x82e)];if(_0x282f31===_0x482279(0x6ea))return _0x508bb4[_0x482279(0x63a)];if(_0x282f31===_0x482279(0x3ce))return _0x508bb4[_0x482279(0x31e)];if(_0x282f31==='MAT')return _0x508bb4[_0x482279(0x6c0)];if(_0x282f31===_0x482279(0x7e8))return _0x508bb4[_0x482279(0x24d)];if(_0x282f31===_0x482279(0x778))return _0x508bb4[_0x482279(0x8c9)];if(_0x282f31==='LUK')return _0x508bb4['IconParam7'];if(_0x282f31===_0x482279(0x8a9))return _0x508bb4['IconXParam0'];if(_0x282f31===_0x482279(0x2d9))return _0x508bb4[_0x482279(0x9a9)];if(_0x282f31===_0x482279(0x6e8))return _0x508bb4[_0x482279(0x2a0)];if(_0x282f31==='CEV')return _0x508bb4[_0x482279(0x658)];if(_0x282f31==='MEV')return _0x508bb4['IconXParam4'];if(_0x282f31===_0x482279(0x603))return _0x508bb4[_0x482279(0x39e)];if(_0x282f31===_0x482279(0x81e))return _0x508bb4[_0x482279(0x251)];if(_0x282f31==='HRG')return _0x508bb4[_0x482279(0x299)];if(_0x282f31===_0x482279(0x9de))return _0x508bb4['IconXParam8'];if(_0x282f31==='TRG')return _0x508bb4[_0x482279(0x72c)];if(_0x282f31===_0x482279(0x7b3))return _0x508bb4['IconSParam0'];if(_0x282f31===_0x482279(0xa0d))return _0x508bb4[_0x482279(0x995)];if(_0x282f31==='REC')return _0x508bb4[_0x482279(0x877)];if(_0x282f31==='PHA')return _0x508bb4[_0x482279(0x6ca)];if(_0x282f31==='MCR')return _0x508bb4['IconSParam4'];if(_0x282f31===_0x482279(0x5c3))return _0x508bb4[_0x482279(0x474)];if(_0x282f31===_0x482279(0x70a))return _0x508bb4[_0x482279(0x848)];if(_0x282f31===_0x482279(0x90d))return _0x508bb4[_0x482279(0x5ff)];if(_0x282f31===_0x482279(0x4b5))return _0x508bb4[_0x482279(0x3dd)];if(_0x282f31===_0x482279(0x282))return _0x508bb4[_0x482279(0x598)];if(VisuMZ[_0x482279(0x940)][_0x482279(0x377)][_0x282f31]){if(_0x482279(0x6cc)!==_0x482279(0x6cc))_0x3073fe*=_0x19c376(_0x4771d2);else return VisuMZ[_0x482279(0x940)][_0x482279(0x377)][_0x282f31]||0x0;}return 0x0;},VisuMZ[_0x54167d(0x774)]=function(_0x404dae,_0x110b5d,_0x357a72){const _0x179e1a=_0x54167d;if(_0x357a72===undefined&&_0x404dae%0x1===0x0)return _0x404dae;if(_0x357a72!==undefined&&[_0x179e1a(0x578),_0x179e1a(0x784),_0x179e1a(0x6ea),_0x179e1a(0x3ce),'MAT',_0x179e1a(0x7e8),_0x179e1a(0x778),_0x179e1a(0x7cf)]['includes'](String(_0x357a72)[_0x179e1a(0x8dd)]()[_0x179e1a(0x314)]()))return _0x404dae;_0x110b5d=_0x110b5d||0x0;if(VisuMZ['CoreEngine'][_0x179e1a(0x450)][_0x357a72]){if(_0x179e1a(0x675)!==_0x179e1a(0x71a))return VisuMZ[_0x179e1a(0x940)]['CustomParamType'][_0x357a72]===_0x179e1a(0x74f)?_0x179e1a(0x93d)!==_0x179e1a(0x93d)?_0x2eec56[_0x179e1a(0x940)][_0x179e1a(0x331)]['UI']['BottomHelp']:_0x404dae:String((_0x404dae*0x64)[_0x179e1a(0x382)](_0x110b5d))+'%';else{var _0x353e28=_0x623ba1(_0x40efa4['$1'])/0x64;_0x4dd499+=_0x353e28;}}return String((_0x404dae*0x64)[_0x179e1a(0x382)](_0x110b5d))+'%';},VisuMZ['GroupDigits']=function(_0x13729d){const _0xe77e08=_0x54167d;_0x13729d=String(_0x13729d);if(!_0x13729d)return _0x13729d;if(typeof _0x13729d!==_0xe77e08(0x510))return _0x13729d;const _0x725994=VisuMZ[_0xe77e08(0x940)]['Settings'][_0xe77e08(0x2e9)][_0xe77e08(0x477)]||_0xe77e08(0x825),_0x3f22a3={'maximumFractionDigits':0x6};_0x13729d=_0x13729d[_0xe77e08(0x3ed)](/\[(.*?)\]/g,(_0x439aee,_0x411957)=>{const _0x3f3f8d=_0xe77e08;if(_0x3f3f8d(0x2d2)!=='wSzUL')return VisuMZ['PreserveNumbers'](_0x411957,'[',']');else{const _0x2aa916=_0x20dd2f['Abbreviation'],_0x1fbc19=_0x4e8886[_0x3f3f8d(0x6fc)],_0x378567=_0x5a5f99[_0x3f3f8d(0x685)],_0x579e57=_0x43e0d5[_0x3f3f8d(0x89a)],_0xe3093b=new _0x42f03d(_0x2befc4['ValueJS']);_0x30fa45[_0x3f3f8d(0x940)][_0x3f3f8d(0x7d1)][_0x2aa916['toUpperCase']()[_0x3f3f8d(0x314)]()]=_0x1fbc19,_0x5d785f[_0x3f3f8d(0x940)][_0x3f3f8d(0x377)][_0x2aa916[_0x3f3f8d(0x8dd)]()[_0x3f3f8d(0x314)]()]=_0x378567,_0x3a31cd['CoreEngine'][_0x3f3f8d(0x6dc)][_0x2aa916['toUpperCase']()[_0x3f3f8d(0x314)]()]=_0x579e57,_0xa8ba41['CoreEngine'][_0x3f3f8d(0x450)][_0x2aa916[_0x3f3f8d(0x8dd)]()[_0x3f3f8d(0x314)]()]=_0x2aa916,_0x47f42c['defineProperty'](_0x4ae88a[_0x3f3f8d(0x4ec)],_0x2aa916,{'get'(){const _0x296123=_0x3f3f8d,_0x4316dc=_0xe3093b['call'](this);return _0x579e57===_0x296123(0x74f)?_0x26d002[_0x296123(0x3ad)](_0x4316dc):_0x4316dc;}});}}),_0x13729d=_0x13729d[_0xe77e08(0x3ed)](/<(.*?)>/g,(_0x157612,_0x4363a3)=>{const _0x4098e3=_0xe77e08;if('zBLqV'!==_0x4098e3(0x84b))return VisuMZ[_0x4098e3(0x45a)](_0x4363a3,'<','>');else{if(_0x20ab2f(this[_0x4098e3(0x52d)])[_0x4098e3(0x95b)]>=this[_0x4098e3(0x412)])return;const _0x3d75ab=_0x216756(_0x3c36a8(this['_number'])+_0x2e46ab[_0x4098e3(0x2f6)]);if(_0x598611(_0x3d75ab))return;this[_0x4098e3(0x52d)]=_0x3d75ab;const _0x108511='9'[_0x4098e3(0x779)](this[_0x4098e3(0x412)]);this['_number']=this['_number'][_0x4098e3(0x29b)](0x0,_0x108511),_0x14f9da['clear'](),this[_0x4098e3(0x7dd)](),_0x10bfd6[_0x4098e3(0x711)](),this[_0x4098e3(0x433)](this[_0x4098e3(0x412)]-0x1);}}),_0x13729d=_0x13729d[_0xe77e08(0x3ed)](/\{\{(.*?)\}\}/g,(_0x427743,_0x283dd8)=>{const _0x5193b4=_0xe77e08;return VisuMZ[_0x5193b4(0x45a)](_0x283dd8,'','');}),_0x13729d=_0x13729d[_0xe77e08(0x3ed)](/(\d+\.?\d*)/g,(_0x3817c3,_0x4857ca)=>{const _0x503014=_0xe77e08;if(_0x503014(0x208)!==_0x503014(0x270)){let _0x4e1df0=_0x4857ca;if(_0x4e1df0[0x0]==='0')return _0x4e1df0;if(_0x4e1df0[_0x4e1df0[_0x503014(0x95b)]-0x1]==='.')return Number(_0x4e1df0)[_0x503014(0x541)](_0x725994,_0x3f22a3)+'.';else return _0x4e1df0[_0x4e1df0[_0x503014(0x95b)]-0x1]===','?Number(_0x4e1df0)[_0x503014(0x541)](_0x725994,_0x3f22a3)+',':Number(_0x4e1df0)[_0x503014(0x541)](_0x725994,_0x3f22a3);}else _0x38b3ed[_0x503014(0x4c7)](!![]);});let _0x6fc19a=0x3;while(_0x6fc19a--){if(_0xe77e08(0x4be)===_0xe77e08(0x693)){let _0x535fb0=_0xe77e08(0x904)+_0x125209+'Total';if(this['checkCacheKey'](_0x535fb0))return this['_cache'][_0x535fb0];return this[_0xe77e08(0x74c)][_0x535fb0]=_0x4dde48['CoreEngine'][_0xe77e08(0x331)][_0xe77e08(0x3fa)][_0xe77e08(0x8cb)][_0xe77e08(0x204)](this,_0x469cec),this[_0xe77e08(0x74c)][_0x535fb0];}else _0x13729d=VisuMZ[_0xe77e08(0x617)](_0x13729d);}return _0x13729d;},VisuMZ['PreserveNumbers']=function(_0x572e67,_0x3e2706,_0xea2ea0){const _0x96cfeb=_0x54167d;return _0x572e67=_0x572e67[_0x96cfeb(0x3ed)](/(\d)/gi,(_0x2abbb1,_0xc594ce)=>_0x96cfeb(0x2da)[_0x96cfeb(0x482)](Number(_0xc594ce))),'%2%1%3'['format'](_0x572e67,_0x3e2706,_0xea2ea0);},VisuMZ[_0x54167d(0x617)]=function(_0x11546f){return _0x11546f=_0x11546f['replace'](/PRESERVCONVERSION\((\d+)\)/gi,(_0x5a7a92,_0x5c3cb8)=>Number(parseInt(_0x5c3cb8))),_0x11546f;},VisuMZ[_0x54167d(0x24c)]=function(_0x3aa8b3){const _0x26471c=_0x54167d;SoundManager[_0x26471c(0x5d9)]();if(!Utils[_0x26471c(0x303)]()){const _0x437c63=window[_0x26471c(0x592)](_0x3aa8b3,_0x26471c(0x62c));}else{const _0x32122e=process[_0x26471c(0x25d)]==_0x26471c(0x2c3)?'open':process[_0x26471c(0x25d)]==_0x26471c(0x8e7)?_0x26471c(0x773):_0x26471c(0x610);require(_0x26471c(0x3c1))['exec'](_0x32122e+'\x20'+_0x3aa8b3);}},Game_Picture['prototype'][_0x54167d(0x9b0)]=function(){const _0x26d9e8=_0x54167d;return this[_0x26d9e8(0x6d2)];},VisuMZ['CoreEngine'][_0x54167d(0x8ca)]=Game_Picture['prototype'][_0x54167d(0x202)],Game_Picture[_0x54167d(0x4ec)][_0x54167d(0x202)]=function(){const _0x58d559=_0x54167d;VisuMZ['CoreEngine'][_0x58d559(0x8ca)]['call'](this),this['_anchor']={'x':0x0,'y':0x0},this[_0x58d559(0x53e)]={'x':0x0,'y':0x0};},VisuMZ[_0x54167d(0x940)][_0x54167d(0x4bd)]=Game_Picture[_0x54167d(0x4ec)]['updateMove'],Game_Picture[_0x54167d(0x4ec)][_0x54167d(0x229)]=function(){const _0x5817fa=_0x54167d;this[_0x5817fa(0x885)]();const _0x3fe337=this[_0x5817fa(0x4ee)];VisuMZ[_0x5817fa(0x940)][_0x5817fa(0x4bd)]['call'](this);if(_0x3fe337>0x0&&this[_0x5817fa(0x4ee)]<=0x0){this['_x']=this[_0x5817fa(0x6d1)],this['_y']=this['_targetY'],this[_0x5817fa(0x8c2)]=this['_targetScaleX'],this[_0x5817fa(0x890)]=this[_0x5817fa(0x242)],this['_opacity']=this[_0x5817fa(0x360)];if(this['_anchor']){if(_0x5817fa(0x7a0)!=='nyhPc')this['_anchor']['x']=this[_0x5817fa(0x53e)]['x'],this[_0x5817fa(0x6d2)]['y']=this['_targetAnchor']['y'];else{if(_0x2c2f9c['isTriggered']()&&this[_0x5817fa(0x8e1)]())this['switchModes'](_0x5817fa(0x646));else _0x3fd112[_0x5817fa(0x6e2)]()&&this[_0x5817fa(0x94e)]('default');}}}},VisuMZ[_0x54167d(0x940)][_0x54167d(0x695)]=Game_Picture[_0x54167d(0x4ec)][_0x54167d(0x5a3)],Game_Picture['prototype']['show']=function(_0x30d068,_0x3e7b4f,_0x3eeefd,_0x27c0af,_0x4376fe,_0x3124b0,_0x5c0e29,_0x51d653){const _0x2aa838=_0x54167d;VisuMZ[_0x2aa838(0x940)][_0x2aa838(0x695)][_0x2aa838(0x204)](this,_0x30d068,_0x3e7b4f,_0x3eeefd,_0x27c0af,_0x4376fe,_0x3124b0,_0x5c0e29,_0x51d653),this[_0x2aa838(0x748)]([{'x':0x0,'y':0x0},{'x':0.5,'y':0.5}][_0x3e7b4f]||{'x':0x0,'y':0x0});},VisuMZ[_0x54167d(0x940)][_0x54167d(0x7ef)]=Game_Picture[_0x54167d(0x4ec)][_0x54167d(0x35d)],Game_Picture[_0x54167d(0x4ec)][_0x54167d(0x35d)]=function(_0x4478d2,_0x5514fa,_0x365cd4,_0x5e04fa,_0x4d4f8c,_0x5ed94a,_0xd3d2e1,_0x316c49,_0x4cde29){const _0x8fd5b6=_0x54167d;VisuMZ['CoreEngine']['Game_Picture_move'][_0x8fd5b6(0x204)](this,_0x4478d2,_0x5514fa,_0x365cd4,_0x5e04fa,_0x4d4f8c,_0x5ed94a,_0xd3d2e1,_0x316c49,_0x4cde29),this[_0x8fd5b6(0xa1a)]([{'x':0x0,'y':0x0},{'x':0.5,'y':0.5}][_0x4478d2]||{'x':0x0,'y':0x0});},Game_Picture[_0x54167d(0x4ec)][_0x54167d(0x885)]=function(){const _0xfb9f57=_0x54167d;this[_0xfb9f57(0x4ee)]>0x0&&(this[_0xfb9f57(0x6d2)]['x']=this[_0xfb9f57(0x80d)](this[_0xfb9f57(0x6d2)]['x'],this['_targetAnchor']['x']),this['_anchor']['y']=this[_0xfb9f57(0x80d)](this[_0xfb9f57(0x6d2)]['y'],this['_targetAnchor']['y']));},Game_Picture['prototype']['setAnchor']=function(_0x34d7ef){const _0xe64550=_0x54167d;this[_0xe64550(0x6d2)]=_0x34d7ef,this[_0xe64550(0x53e)]=JsonEx[_0xe64550(0x419)](this[_0xe64550(0x6d2)]);},Game_Picture[_0x54167d(0x4ec)]['setTargetAnchor']=function(_0xeb460b){const _0x1bd5b6=_0x54167d;this[_0x1bd5b6(0x53e)]=_0xeb460b;},VisuMZ[_0x54167d(0x940)]['Sprite_Picture_updateOrigin']=Sprite_Picture[_0x54167d(0x4ec)][_0x54167d(0x4c9)],Sprite_Picture[_0x54167d(0x4ec)][_0x54167d(0x4c9)]=function(){const _0x1e456=_0x54167d,_0x1ddd4d=this['picture']();!_0x1ddd4d[_0x1e456(0x9b0)]()?VisuMZ[_0x1e456(0x940)]['Sprite_Picture_updateOrigin'][_0x1e456(0x204)](this):(this[_0x1e456(0x9b0)]['x']=_0x1ddd4d[_0x1e456(0x9b0)]()['x'],this['anchor']['y']=_0x1ddd4d[_0x1e456(0x9b0)]()['y']);},Game_Action[_0x54167d(0x4ec)]['setEnemyAction']=function(_0x4263c6){const _0x47112e=_0x54167d;if(_0x4263c6){if(_0x47112e(0x353)!==_0x47112e(0x968)){const _0x3b9d07=_0x4263c6[_0x47112e(0x75f)];if(_0x3b9d07===0x1&&this['subject']()[_0x47112e(0x6c1)]()!==0x1)this[_0x47112e(0x46c)]();else _0x3b9d07===0x2&&this['subject']()[_0x47112e(0x9f4)]()!==0x2?this[_0x47112e(0x4ad)]():this[_0x47112e(0x69c)](_0x3b9d07);}else this[_0x47112e(0x23e)][_0x47112e(0x6d0)](_0x351ef6[_0x47112e(0x556)][_0x47112e(0x701)]);}else{if(_0x47112e(0x6a8)!==_0x47112e(0x6a8))return 0x0;else this[_0x47112e(0x531)]();}},Game_Actor[_0x54167d(0x4ec)][_0x54167d(0x393)]=function(){const _0x5c86ba=_0x54167d;return this[_0x5c86ba(0x60c)]()[_0x5c86ba(0x64f)](_0x4f45b4=>this['canUse'](_0x4f45b4)&&this[_0x5c86ba(0x7aa)]()['includes'](_0x4f45b4[_0x5c86ba(0x605)]));},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x956)]=function(){const _0x25de50=_0x54167d;this[_0x25de50(0x63c)]=new Sprite(),this[_0x25de50(0x63c)][_0x25de50(0x228)]=new Bitmap(0x0,0x0),this[_0x25de50(0x63c)]['x']=0x0,this[_0x25de50(0x492)](this[_0x25de50(0x63c)]);},Window_Base[_0x54167d(0x4ec)][_0x54167d(0x47d)]=function(){const _0x4658cc=_0x54167d;if(this['_dimmerSprite']){if(_0x4658cc(0x31c)!==_0x4658cc(0x348)){const _0x53d68b=this[_0x4658cc(0x63c)][_0x4658cc(0x228)],_0x9d2c61=this['width'],_0x8e973a=this[_0x4658cc(0x3e1)],_0x13dbf2=this[_0x4658cc(0x7ee)],_0x250813=ColorManager['dimColor1'](),_0x4e7e81=ColorManager[_0x4658cc(0x59e)]();_0x53d68b[_0x4658cc(0x776)](_0x9d2c61,_0x8e973a),_0x53d68b['gradientFillRect'](0x0,0x0,_0x9d2c61,_0x13dbf2,_0x4e7e81,_0x250813,!![]),_0x53d68b['fillRect'](0x0,_0x13dbf2,_0x9d2c61,_0x8e973a-_0x13dbf2*0x2,_0x250813),_0x53d68b['gradientFillRect'](0x0,_0x8e973a-_0x13dbf2,_0x9d2c61,_0x13dbf2,_0x250813,_0x4e7e81,!![]),this[_0x4658cc(0x63c)][_0x4658cc(0x2bf)](0x0,0x0,_0x9d2c61,_0x8e973a);}else{const _0x4b8521=this[_0x4658cc(0x519)]();return _0x4b8521[_0x4658cc(0x59b)](/\/\/[ ]SCRIPT[ ]CALL/i)?this[_0x4658cc(0x9f6)](_0x4b8521):_0x39192b[_0x4658cc(0x940)][_0x4658cc(0x5c4)][_0x4658cc(0x204)](this,_0x1ede1f);}}},Game_Actor['prototype'][_0x54167d(0x72e)]=function(){const _0x22ac25=_0x54167d;for(let _0x436a39=0x0;_0x436a39<this['numActions']();_0x436a39++){const _0x42bce1=this[_0x22ac25(0x56f)]();let _0x4b2d37=Number[_0x22ac25(0x286)];this['setAction'](_0x436a39,_0x42bce1[0x0]);for(const _0x354f5b of _0x42bce1){const _0x44f312=_0x354f5b['evaluate']();_0x44f312>_0x4b2d37&&(_0x4b2d37=_0x44f312,this[_0x22ac25(0xa13)](_0x436a39,_0x354f5b));}}this[_0x22ac25(0x7a2)](_0x22ac25(0x7ec));},Window_BattleItem[_0x54167d(0x4ec)][_0x54167d(0x4b7)]=function(_0x5c6073){const _0x3ceeba=_0x54167d;if(BattleManager[_0x3ceeba(0x6d6)]()){if(_0x3ceeba(0x648)!==_0x3ceeba(0x718))return BattleManager[_0x3ceeba(0x6d6)]()[_0x3ceeba(0x49f)](_0x5c6073);else{if(!!_0x4448e7[_0x40c14e]){if(_0x5a45dc[_0x3ceeba(0x562)]())_0x482cee['log'](_0x3ceeba(0x6b4)[_0x3ceeba(0x482)](_0x34b14c));}const _0x2aa61e='\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%2\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20($gameTemp.isPlaytest())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27JS\x20Quick\x20Function\x20\x22%1\x22\x20Error!\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(e);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20'['format'](_0x251983,_0x2e62bf);_0x16b5e1[_0x4862a8]=new _0x493d2f(_0x2aa61e);}}else return Window_ItemList[_0x3ceeba(0x4ec)][_0x3ceeba(0x4b7)]['call'](this,_0x5c6073);},VisuMZ[_0x54167d(0x940)]['Scene_Map_createSpritesetFix']=Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x7f0)],Scene_Map[_0x54167d(0x4ec)][_0x54167d(0x7f0)]=function(){const _0x41114f=_0x54167d;VisuMZ[_0x41114f(0x940)][_0x41114f(0x9a2)]['call'](this);const _0x34d399=this[_0x41114f(0x6ae)][_0x41114f(0x36e)];if(_0x34d399)this['addChild'](_0x34d399);},VisuMZ[_0x54167d(0x940)][_0x54167d(0x527)]=Scene_Battle[_0x54167d(0x4ec)]['createSpriteset'],Scene_Battle[_0x54167d(0x4ec)][_0x54167d(0x7f0)]=function(){const _0x300ca1=_0x54167d;VisuMZ['CoreEngine'][_0x300ca1(0x527)][_0x300ca1(0x204)](this);const _0x3f7af1=this[_0x300ca1(0x6ae)]['_timerSprite'];if(_0x3f7af1)this['addChild'](_0x3f7af1);},Sprite_Actor[_0x54167d(0x4ec)][_0x54167d(0x3b5)]=function(){const _0x837dbd=_0x54167d;Sprite_Battler[_0x837dbd(0x4ec)]['update'][_0x837dbd(0x204)](this),this[_0x837dbd(0x26e)]();if(this[_0x837dbd(0x521)]){if(_0x837dbd(0x43c)!==_0x837dbd(0x43c)){var _0x41d8b9=_0x42ac62(_0x10cb9c['$1']);try{_0x40f73a+=_0x67629b(_0x41d8b9);}catch(_0xbbfc7e){if(_0x147e71[_0x837dbd(0x562)]())_0x167fc2[_0x837dbd(0x262)](_0xbbfc7e);}}else this[_0x837dbd(0x821)]();}else{if(this[_0x837dbd(0x979)]!==''){if(_0x837dbd(0x3cb)!==_0x837dbd(0x213))this[_0x837dbd(0x979)]='';else return _0x128918[_0x837dbd(0x940)][_0x837dbd(0x331)][_0x837dbd(0x2e9)][_0x837dbd(0x4a4)];}}},Window[_0x54167d(0x4ec)][_0x54167d(0x1f5)]=function(){const _0x332ad8=_0x54167d,_0x106184=this[_0x332ad8(0x376)],_0x303dc0=this['_height'],_0x2d9bb3=0x18,_0x18f5ce=_0x2d9bb3/0x2,_0x4237a1=0x60+_0x2d9bb3,_0x4ee4dd=0x0+_0x2d9bb3;this[_0x332ad8(0xa03)]['bitmap']=this[_0x332ad8(0x23a)],this['_downArrowSprite'][_0x332ad8(0x9b0)]['x']=0.5,this[_0x332ad8(0xa03)][_0x332ad8(0x9b0)]['y']=0.5,this[_0x332ad8(0xa03)][_0x332ad8(0x2bf)](_0x4237a1+_0x18f5ce,_0x4ee4dd+_0x18f5ce+_0x2d9bb3,_0x2d9bb3,_0x18f5ce),this[_0x332ad8(0xa03)][_0x332ad8(0x35d)](Math[_0x332ad8(0x3ad)](_0x106184/0x2),Math[_0x332ad8(0x3ad)](_0x303dc0-_0x18f5ce)),this[_0x332ad8(0x8e0)]['bitmap']=this[_0x332ad8(0x23a)],this[_0x332ad8(0x8e0)][_0x332ad8(0x9b0)]['x']=0.5,this[_0x332ad8(0x8e0)][_0x332ad8(0x9b0)]['y']=0.5,this['_upArrowSprite'][_0x332ad8(0x2bf)](_0x4237a1+_0x18f5ce,_0x4ee4dd,_0x2d9bb3,_0x18f5ce),this[_0x332ad8(0x8e0)][_0x332ad8(0x35d)](Math[_0x332ad8(0x3ad)](_0x106184/0x2),Math['round'](_0x18f5ce));},Window[_0x54167d(0x4ec)][_0x54167d(0x87a)]=function(){const _0x7a8bda=_0x54167d,_0x15f263=0x90,_0x1dc253=0x60,_0x4bd2d5=0x18;this[_0x7a8bda(0x561)][_0x7a8bda(0x228)]=this[_0x7a8bda(0x23a)],this[_0x7a8bda(0x561)][_0x7a8bda(0x9b0)]['x']=0.5,this[_0x7a8bda(0x561)][_0x7a8bda(0x9b0)]['y']=0x1,this[_0x7a8bda(0x561)]['move'](Math[_0x7a8bda(0x3ad)](this[_0x7a8bda(0x376)]/0x2),this[_0x7a8bda(0x79d)]),this[_0x7a8bda(0x561)][_0x7a8bda(0x2bf)](_0x15f263,_0x1dc253,_0x4bd2d5,_0x4bd2d5),this[_0x7a8bda(0x561)][_0x7a8bda(0x4e2)]=0xff;},Window[_0x54167d(0x4ec)][_0x54167d(0x4f4)]=function(){const _0x3c67a8=_0x54167d,_0x47fcf2=this[_0x3c67a8(0x9dd)]['worldTransform']['apply'](new Point(0x0,0x0)),_0x4fa598=this[_0x3c67a8(0x9dd)][_0x3c67a8(0x7c3)];_0x4fa598['x']=_0x47fcf2['x']+this[_0x3c67a8(0x2ad)]['x'],_0x4fa598['y']=_0x47fcf2['y']+this[_0x3c67a8(0x2ad)]['y'],_0x4fa598[_0x3c67a8(0x281)]=Math[_0x3c67a8(0xa10)](this[_0x3c67a8(0x499)]*this[_0x3c67a8(0x81a)]['x']),_0x4fa598[_0x3c67a8(0x3e1)]=Math['ceil'](this[_0x3c67a8(0x869)]*this[_0x3c67a8(0x81a)]['y']);},Window[_0x54167d(0x4ec)][_0x54167d(0x801)]=function(){const _0x36c514=_0x54167d,_0x2fa46d=this[_0x36c514(0x6db)],_0x6abe70=Math['max'](0x0,this[_0x36c514(0x376)]-_0x2fa46d*0x2),_0x159e8c=Math[_0x36c514(0x350)](0x0,this[_0x36c514(0x79d)]-_0x2fa46d*0x2),_0x3ad146=this[_0x36c514(0x4d3)],_0x2df427=_0x3ad146[_0x36c514(0xa1b)][0x0];_0x3ad146[_0x36c514(0x228)]=this[_0x36c514(0x23a)],_0x3ad146[_0x36c514(0x2bf)](0x0,0x0,0x60,0x60),_0x3ad146[_0x36c514(0x35d)](_0x2fa46d,_0x2fa46d),_0x3ad146['scale']['x']=_0x6abe70/0x60,_0x3ad146[_0x36c514(0x81a)]['y']=_0x159e8c/0x60,_0x2df427[_0x36c514(0x228)]=this[_0x36c514(0x23a)],_0x2df427[_0x36c514(0x2bf)](0x0,0x60,0x60,0x60),_0x2df427['move'](0x0,0x0,_0x6abe70,_0x159e8c),_0x2df427['scale']['x']=0x1/_0x3ad146['scale']['x'],_0x2df427[_0x36c514(0x81a)]['y']=0x1/_0x3ad146[_0x36c514(0x81a)]['y'],_0x3ad146[_0x36c514(0x852)](this['_colorTone']);},Game_Temp[_0x54167d(0x4ec)][_0x54167d(0x800)]=function(){const _0x418e3b=_0x54167d;this[_0x418e3b(0x569)]=[],this[_0x418e3b(0x532)]=[],this[_0x418e3b(0x89e)]=[],this[_0x418e3b(0x7a5)]=[];},VisuMZ['CoreEngine'][_0x54167d(0x747)]=Scene_Base[_0x54167d(0x4ec)][_0x54167d(0x8a2)],Scene_Base['prototype'][_0x54167d(0x8a2)]=function(){const _0x2ec46d=_0x54167d;if($gameTemp)$gameTemp[_0x2ec46d(0x800)]();VisuMZ['CoreEngine'][_0x2ec46d(0x747)]['call'](this);},Bitmap[_0x54167d(0x4ec)][_0x54167d(0x4d5)]=function(_0x397eef){const _0x24c79c=_0x54167d,_0x5b17a3=this['context'];_0x5b17a3['save'](),_0x5b17a3[_0x24c79c(0x416)]=this[_0x24c79c(0x60a)]();const _0x19b05b=_0x5b17a3[_0x24c79c(0x83d)](_0x397eef)['width'];return _0x5b17a3[_0x24c79c(0x4cf)](),_0x19b05b;},Window_Message['prototype'][_0x54167d(0x705)]=function(_0x3bc0de){const _0x315ded=_0x54167d;return this[_0x315ded(0x1f6)]()?this[_0x315ded(0x9a3)][_0x315ded(0x4d5)](_0x3bc0de):_0x315ded(0x441)===_0x315ded(0x356)?_0x35c2ca[_0x315ded(0x940)][_0x315ded(0x331)][_0x315ded(0x530)][_0x315ded(0x456)][_0x315ded(0x204)](this,_0x2f6750):Window_Base[_0x315ded(0x4ec)]['textWidth'][_0x315ded(0x204)](this,_0x3bc0de);},Window_Message[_0x54167d(0x4ec)][_0x54167d(0x1f6)]=function(){const _0x304bbc=_0x54167d;return VisuMZ[_0x304bbc(0x940)]['Settings'][_0x304bbc(0x2e9)]['FontWidthFix']??!![];},VisuMZ[_0x54167d(0x940)]['Game_Action_numRepeats']=Game_Action[_0x54167d(0x4ec)]['numRepeats'],Game_Action[_0x54167d(0x4ec)][_0x54167d(0x6c6)]=function(){const _0x10d137=_0x54167d;return this[_0x10d137(0x787)]()?'IIjnP'!==_0x10d137(0x5aa)?VisuMZ[_0x10d137(0x940)]['Game_Action_numRepeats'][_0x10d137(0x204)](this):_0x5adf1e&&this[_0x10d137(0x521)]?this[_0x10d137(0x521)]['canEquip'](_0x3b8f94):_0x2d1096[_0x10d137(0x940)][_0x10d137(0x34b)][_0x10d137(0x204)](this,_0x3baaef):_0x10d137(0x942)===_0x10d137(0x942)?0x0:this['item']()[_0x10d137(0x93b)]*0.01;},VisuMZ['CoreEngine'][_0x54167d(0x90b)]=Game_Action['prototype']['setAttack'],Game_Action[_0x54167d(0x4ec)][_0x54167d(0x46c)]=function(){const _0x3f9ff4=_0x54167d;this[_0x3f9ff4(0x4de)]()&&this[_0x3f9ff4(0x4de)]()[_0x3f9ff4(0x584)]()?_0x3f9ff4(0x534)===_0x3f9ff4(0x534)?VisuMZ[_0x3f9ff4(0x940)][_0x3f9ff4(0x90b)][_0x3f9ff4(0x204)](this):this[_0x3f9ff4(0x8d7)](...arguments):this[_0x3f9ff4(0x531)]();},Sprite_Name[_0x54167d(0x4ec)][_0x54167d(0x9b5)]=function(){return 0x24;},Sprite_Name[_0x54167d(0x4ec)][_0x54167d(0x5e7)]=function(){const _0x332a01=_0x54167d,_0x161866=this[_0x332a01(0x614)](),_0x36835b=this['bitmapWidth'](),_0x5d5ff0=this[_0x332a01(0x9b5)]();this['setupFont'](),this[_0x332a01(0x228)][_0x332a01(0x531)](),this[_0x332a01(0x228)]['drawTextTopAligned'](_0x161866,0x0,0x0,_0x36835b,_0x5d5ff0,_0x332a01(0x750));},Bitmap[_0x54167d(0x4ec)][_0x54167d(0x232)]=function(_0x32364a,_0x20c8c2,_0x27e8ab,_0x586f71,_0x3cc14e,_0x54ba6f){const _0x5e554d=_0x54167d,_0x1853bf=this[_0x5e554d(0x61d)],_0x2a49c4=_0x1853bf[_0x5e554d(0x79a)];_0x586f71=_0x586f71||0xffffffff;let _0xc60ed5=_0x20c8c2,_0x3dba8d=Math['round'](_0x27e8ab+0x18/0x2+this[_0x5e554d(0x79f)]*0.35);_0x54ba6f===_0x5e554d(0x68b)&&(_0xc60ed5+=_0x586f71/0x2),_0x54ba6f===_0x5e554d(0x231)&&(_0xc60ed5+=_0x586f71),_0x1853bf['save'](),_0x1853bf['font']=this[_0x5e554d(0x60a)](),_0x1853bf[_0x5e554d(0x487)]=_0x54ba6f,_0x1853bf[_0x5e554d(0x804)]=_0x5e554d(0x4b8),_0x1853bf['globalAlpha']=0x1,this[_0x5e554d(0x4b4)](_0x32364a,_0xc60ed5,_0x3dba8d,_0x586f71),_0x1853bf['globalAlpha']=_0x2a49c4,this[_0x5e554d(0x8db)](_0x32364a,_0xc60ed5,_0x3dba8d,_0x586f71),_0x1853bf['restore'](),this[_0x5e554d(0x3d2)][_0x5e554d(0x3b5)]();},VisuMZ['CoreEngine'][_0x54167d(0x40f)]=BattleManager['checkSubstitute'],BattleManager[_0x54167d(0x9b9)]=function(_0x56e46){const _0x355992=_0x54167d;if(this['_action'][_0x355992(0x851)]())return![];return VisuMZ[_0x355992(0x940)][_0x355992(0x40f)][_0x355992(0x204)](this,_0x56e46);}; \ No newline at end of file diff --git a/js/plugins/VisuMZ_1_BattleCore.js b/js/plugins/VisuMZ_1_BattleCore.js new file mode 100644 index 0000000..582441d --- /dev/null +++ b/js/plugins/VisuMZ_1_BattleCore.js @@ -0,0 +1,17276 @@ +//============================================================================= +// VisuStella MZ - Battle Core +// VisuMZ_1_BattleCore.js +//============================================================================= + +var Imported = Imported || {}; +Imported.VisuMZ_1_BattleCore = true; + +var VisuMZ = VisuMZ || {}; +VisuMZ.BattleCore = VisuMZ.BattleCore || {}; +VisuMZ.BattleCore.version = 1.60; + +//============================================================================= + /*: + * @target MZ + * @plugindesc [RPG Maker MZ] [Tier 1] [Version 1.60] [BattleCore] + * @author VisuStella + * @url http://www.yanfly.moe/wiki/Battle_Core_VisuStella_MZ + * @orderAfter VisuMZ_0_CoreEngine + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * The Battle Core plugin revamps the battle engine provided by RPG Maker MZ to + * become more flexible, streamlined, and support a variety of features. The + * updated battle engine allows for custom Action Sequences, battle layout + * styles, and a lot of control over the battle mechanics, too. + * + * Features include all (but not limited to) the following: + * + * * Action Sequence Plugin Commands to give you full control over what happens + * during the course of a skill or item. + * * Animated Sideview Battler support for enemies! + * * Auto Battle options for party-wide and actor-only instances. + * * Base Troop Events to quickly streamline events for all Troop events. + * * Battle Command control to let you change which commands appear for actors. + * * Battle Layout styles to change the way the battle scene looks. + * * Casting animation support for skills. + * * Critical Hit control over the success rate formula and damage multipliers. + * * Custom target scopes added for skills and items. + * * Damage formula control, including Damage Styles. + * * Damage caps, both hard caps and soft caps. + * * Damage traits such Armor Penetration/Reduction to bypass defenses. + * * Elements & Status Menu Core support for traits. + * * Multitude of JavaScript notetags and global Plugin Parameters to let you + * make a variety of effects across various instances during battle. + * * Party Command window can be skipped/disabled entirely. + * * Weather effects now show in battle. + * * Streamlined Battle Log to remove redundant information and improve the + * flow of battle. + * * Visual HP Gauges can be displayed above the heads of actors and/or enemies + * with a possible requirement for enemies to be defeated at least once first + * in order for them to show. + * + * ============================================================================ + * Requirements + * ============================================================================ + * + * This plugin is made for RPG Maker MZ. This will not work in other iterations + * of RPG Maker. + * + * ------ Tier 1 ------ + * + * This plugin is a Tier 1 plugin. Place it under other plugins of lower tier + * value on your Plugin Manager list (ie: 0, 1, 2, 3, 4, 5). This is to ensure + * that your plugins will have the best compatibility with the rest of the + * VisuStella MZ library. + * + * ============================================================================ + * Major Changes + * ============================================================================ + * + * This plugin will overwrite some core parts of the RPG Maker MZ base code in + * order to ensure the Battle Core plugin will work at full capacity. The + * following are explanations of what has been changed. + * + * --- + * + * Action Sequences + * + * - Action sequences are now done either entirely by the Battle Log Window or + * through common events if the <Custom Action Sequence> notetag is used. + * In RPG Maker MZ by default, Action Sequences would be a mixture of using the + * Battle Log Window, the Battle Manager, and the Battle Scene, making it hard + * to fully grab control of the situation. + * + * --- + * + * Action Speed + * + * - Action speeds determine the turn order in the default battle system. The + * AGI of a battle unit is also taken into consideration. However, the random + * variance applied to the action speed system makes the turn order extremely + * chaotic and hard for the player to determine. Thus, the random variance + * aspect of it has been turned off. This can be reenabled by default through + * Plugin Parameters => Mechanics Settings => Allow Random Speed? + * + * --- + * + * Animated Sideview Battler Support For Enemies + * + * - Enemies can now use Sideview Actor sprites for themselves! They will + * behave like actors and can even carry their own set of weapons for physical + * attacks. These must be set up using notetags. More information can be found + * in the notetag section. + * + * - As the sprites are normally used for actors, some changes have been made + * to Sprite_Actor to be able to support both actors and enemies. These changes + * should have minimal impact on other plugins. + * + * --- + * + * Battle Sprite Updates + * + * - A lot of functions in Sprite_Battler, Sprite_Actor, and Sprite_Enemy have + * been overwritten to make the new Action Sequence system added by this plugin + * possible. These changes make it possible for the sprites to move anywhere on + * the screen, jump, float, change visibility, and more. + * + * --- + * + * Change Battle Back in Battle + * + * - By default, the Change Battle Back event command does not work in battle. + * Any settings made to it will only reflect in the following battle. Now, if + * the battle back event command is used during battle, it will reflect upon + * any new changes immediately. + * + * --- + * + * Critical Hit - LUK Influence + * + * - The LUK Buffs now affect the critical hit rate based off how the formula + * is now calculated. Each stack of a LUK Buff will double the critical hit + * rate and compound upon that. That means a x1 LUK Buff stack will raise it by + * x2, a x2 LUK Buff stack will raise the critical hit rate by x4, a x3 LUK + * Buff Stack will raise the critical hit rate stack by x8, and so on. + * + * - LUK also plays a role in how much damage is dealt with critical hits. The + * default critical hit multiplier has been reduced from x3 to x2. However, a + * percentage of LUK will added on (based off the user's CRI rate) onto the + * finalized critical damage. If the user's CRI rate is 4%, then 4% of the user + * LUK value will also be added onto the damage. + * + * - This change can be altered through Plugin Parameters => Damage Settings => + * Critical Hits => JS: Rate Formula and JS: Damage Formula. + * + * --- + * + * Damage Popups + * + * - Damage popups are now formatted with + and - to determine healing and + * damage. MP Damage will also include "MP" at the back. This is to make it + * clearer what each colored variant of the damage popup means as well as help + * color blind players read the on-screen data properly. + * + * - Damage popups have also been rewritten to show all changed aspects instead + * of just one. Previously with RPG Maker MZ, if an action would deal both HP + * and MP damage, only one of them would show. Now, everything is separated and + * both HP and MP changes will at a time. + * + * --- + * + * Dual Wielding + * + * - Previously, RPG Maker MZ had "Dual Wielding" attack using both weapon + * animations at once, with the combined ATK of each weapon. It's confusing to + * look at and does not portray the nature of "Dual Wielding". + * + * - Dual Wielding, or in the case of users adding in third and fourth weapons, + * Multi Wielding is now changed. Each weapon is displayed individually, each + * producing its own attack animation, showing each weapon type, and applying + * only that weapon's ATK, Traits, and related effects. It is no longer a + * combined effect to display everything at once like RPG Maker MZ default. + * + * - If an actor has multiple weapon slots but some of them are unequipped, + * then the action will treat the attack as a single attack. There will be no + * barehanded attack to add on top of it. This is to match RPG Maker MZ's + * decision to omit a second animation if the same scenario is applied. + * + * --- + * + * Force Action + * + * - Previously, Forced Actions would interrupt the middle of an event to + * perform an action. However, with the addition of more flexible Action + * Sequences, the pre-existing Force Action system would not be able to exist + * and would require being remade. + * + * - Forced Actions now are instead, added to a separate queue from the action + * battler list. Whenever an action and/or common event is completed, then if + * there's a Forced Action battler queued, then the Forced Action battler will + * have its turn. This is the cleanest method available and avoids the most + * conflicts possible. + * + * - This means if you planned to make cinematic sequences with Forced Actions, + * you will need to account for the queued Force Actions. However, in the case + * of battle cinematics, we would highly recommend that you use the newly added + * Action Sequence Plugin Commands instead as those give you more control than + * any Force Action ever could. + * + * --- + * + * Random Scope + * + * - The skill and item targeting scopes for Random Enemy, 2 Random Enemies, + * 3 Random Enemies, 4 Random Enemies will now ignore TGR and utilize true + * randomness. + * + * --- + * + * Spriteset_Battle Update + * + * - The spriteset now has extra containers to separate battlers (actors and + * enemies), animations, and damage. This is to make actors and enemy battler + * sprites more efficient to sort (if enabled), so that animations won't + * interfere with and cover damage sprites, and to make sure damage sprites are + * unaffected by screen tints in order to ensure the player will always have a + * clear read on the information relaying sprites. + * + * --- + * + * TPB/ATB Active Battle Actor Shifting + * + * - Pressing cancel on the Actor Command Window no longer switches between + * actors with a full TPB/ATB gauge before reaching the Party Command Window. + * This is to accomplish a couple of things: 1) reduce the number of button + * presses to reach the Party Command Window and 2) to prevent motion resets + * and disrupting action sequences. If this feature is vital to your battle + * system, we recommend that you do not use this plugin or any of the Battle + * Core-required plugins. + * + * --- + * + * Weather Displayed in Battle + * + * - Previously, weather has not been displayed in battle. This means that any + * weather effects placed on the map do not transfer over to battle and causes + * a huge disconnect for players. The Battle Core plugin will add weather + * effects to match the map's weather conditions. Any changes made to weather + * through event commands midway through battle will also be reflected. + * + * --- + * + * ============================================================================ + * Base Troops + * ============================================================================ + * + * Base Troops can be found, declared, and modified in the Plugin Parameters => + * Mechanics Settings => Base Troop ID's. All of the listed Troop ID's here + * will have their page events replicated and placed under all other troops + * found in the database. + * + * --- + * + * This means that if you have an event that runs on Turn 1 of a Base Troop, + * then for every troop out there, that same event will also run on Turn 1, + * as well. This is useful for those who wish to customize their battle system + * further and to reduce the amount of work needed to copy/paste said event + * pages into every database troop object manually. + * + * --- + * + * ============================================================================ + * Damage Styles + * ============================================================================ + * + * Damage Styles are a new feature added through the Battle Core plugin. When + * using certain Battle Styles, you can completely ignore typing in the whole + * damage formula inside the damage formula input box, and instead, insert + * either a power amount or a multiplier depending on the Damage Style. The + * plugin will then automatically calculate damage using that value factoring + * in ATK, DEF, MAT, MDF values. + * + * --- + * + * Here is a list of the Damage Styles that come with this plugin by default. + * You can add in your own and even edit them to your liking. + * Or just remove them if you want. + * + * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Style Use Formula As PH/MA Disparity Stat Scale Damage Scale + * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Standard Formula No Varies Varies + * ArmorScaling Formula No Varies Varies + * CT Multiplier Yes Low Normal + * D4 Multiplier No High Normal + * DQ Multiplier No Low Low + * FF7 Power Yes Low High + * FF8 Power Yes Medium Normal + * FF9 Power Yes Low Normal + * FF10 Power Yes Medium High + * MK Multiplier No Medium Low + * MOBA Multiplier No Medium Normal + * PKMN Power No Low Normal + * + * Use the above chart to figure out which Damage Style best fits your game, + * if you plan on using them. + * + * The 'Standard' style is the same as the 'Manual' formula input, except that + * it allows for the support of <Armor Penetration> and <Armor Reduction> + * notetags. + * + * The 'Armor Scaling' style allows you to type in the base damage calculation + * without the need to type in any defending modifiers. + * + * NOTE: While these are based off the damage formulas found in other games, + * not all of them are exact replicas. Many of them are adapted for use in + * RPG Maker MZ since not all RPG's use the same set of parameters and not all + * external multipliers function the same way as RPG Maker MZ. + * + * --- + * + * Style: + * - This is what the Damage Style is. + * + * Use Formula As: + * - This is what you insert into the formula box. + * - Formula: Type in the formula for the action just as you would normally. + * - Multiplier: Type in the multiplier for the action. + * Use float values. This means 250% is typed out as 2.50 + * - Power: Type in the power constant for the action. + * Use whole numbers. Type in something like 16 for a power constant. + * + * PH/MA Disparity: + * - Is there a disparity between how Physical Attacks and Magical Attacks + * are calculated? + * - If yes, then physical attacks and magical attacks will have different + * formulas used. + * - If no, then physical attacks and magical attacks will share similar + * formulas for how they're calculated. + * + * Stat Scale: + * - How much should stats scale throughout the game? + * - Low: Keep them under 100 for the best results. + * - Medium: Numbers work from low to mid 400's for best results. + * - High: The numbers really shine once they're higher. + * + * Damage Scale: + * - How much does damage vary depending on small parameter changes? + * - Low: Very little increase from parameter changes. + * - Normal: Damage scales close to proportionally with parameter changes. + * - High: Damage can boost itself drastically with parameter changes. + * + * --- + * + * To determine what kind of parameters are used for the Damage Styles, they + * will depend on two things: the action's 'Hit Type' (ie Physical Attack, + * Magical Attack, and Certain Hit) and the action's 'Damage Type' (ie. Damage, + * Recovery, or Drain). + * + * Certain Hit tends to use whichever value is higher: ATK or MAT, and then + * ignores the target's defense values. Use Certain Hits for 'True Damage'. + * + * Use the chart below to figure out everything else: + * + * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Hit Type Damage Type Attacker Parameter Defender Parameter + * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Physical Damage ATK DEF + * Magical Damage MAT MDF + * Certain Hit Damage Larger (ATK, MAT) -Ignores- + * Physical Recover DEF -Ignores- + * Magical Recover MDF -Ignores- + * Certain Hit Recover Larger (ATK, MAT) -Ignores- + * Physical Drain ATK DEF + * Magical Drain MAT MDF + * Certain Hit Drain Larger (ATK, MAT) -Ignores- + * + * These can be modified within the Plugin Parameters in the individual + * Damage Styles themselves. + * + * --- + * + * Skills and Items can use different Damage Styles from the setting you've + * selected in the Plugin Parameters. They can be altered to have different + * Damage Styles through the usage of a notetag: + * + * <Damage Style: name> + * + * This will use whichever style is found in the Plugin Parameters. + * + * If "Manual" is used, then no style will be used and all calculations will be + * made strictly based off the formula found inside the formula box. + * + * --- + * + * ============================================================================ + * VisuStella MZ Compatibility + * ============================================================================ + * + * While this plugin is compatible with the majority of the VisuStella MZ + * plugin library, it is not compatible with specific plugins or specific + * features. This section will highlight the main plugins/features that will + * not be compatible with this plugin or put focus on how the make certain + * features compatible. + * + * --- + * + * VisuMZ_1_BattleCore + * + * When using Action Sequences, Boost effects for damage, turn extensions, + * analyze, etc. will not occur for anything other than the Action Sequence: + * "MECH: Action Effect" in order to maintain controlled effects. However, if + * you do want to apply bonuses for Boosts, utilize "MECH: Boost Store Data" to + * store inside a variable how many times Boosts were used. This can be used + * however which way you want it to as long as it is manageable through events + * and Common Events. + * + * --- + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * The following are notetags that have been added through this plugin. These + * notetags will not work with your game if this plugin is OFF or not present. + * + * === HP Gauge-Related Notetags === + * + * The following notetags allow you to set whether or not HP Gauges can be + * displayed by enemies regardless of Plugin Parameter settings. + * + * --- + * + * <Show HP Gauge> + * + * - Used for: Enemy Notetags + * - Will always show the HP Gauge for the enemy regardless of the defeat + * requirement setting. + * - This does not bypass the player's Options preferences. + * - This does not bypass disabling enemy HP Gauges as a whole. + * + * --- + * + * <Hide HP Gauge> + * + * - Used for: Enemy Notetags + * - Will always hide the HP Gauge for the enemy regardless of the defeat + * requirement setting. + * - This does not bypass the player's Options preferences. + * + * --- + * + * <Battle UI Offset: +x, +y> + * <Battle UI Offset: -x, -y> + * + * <Battle UI Offset X: +x> + * <Battle UI Offset X: -x> + * + * <Battle UI Offset Y: +y> + * <Battle UI Offset Y: -y> + * + * - Used for: Actor and Enemy Notetags + * - Adjusts the offset of HP Gauges and State Icons above the heads of actors + * and enemies. + * - Replace 'x' with a number value that offsets the x coordinate. + * - Negative x values offset left. Positive x values offset right. + * - Replace 'y' with a number value that offsets the y coordinate. + * - Negative y values offset up. Positive x values offset down. + * + * --- + * + * === Animation-Related Notetags === + * + * The following notetags allow you to set animations to play at certain + * instances and/or conditions. + * + * --- + * + * <Slip Animation: x> + * + * - Requires VisuMZ_0_CoreEngine! + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - During the phase at which the user regenerates HP, MP, or TP, this + * animation will play as long as the user is alive and visible. + * - Replace 'x' with a number value representing the Animation ID to play. + * + * --- + * + * <Cast Animation: x> + * + * - Used for: Skill Notetags + * - Plays a battle animation at the start of the skill. + * - Replace 'x' with a number value representing the Animation ID to play. + * + * --- + * + * <Attack Animation: x> + * + * - Used for: Enemy Notetags + * - Gives an enemy an attack animation to play for its basic attack. + * - Replace 'x' with a number value representing the Animation ID to play. + * + * --- + * + * === Battleback-Related Notetags === + * + * You can apply these notetags to have some control over the battlebacks that + * appear in different regions of the map for random or touch encounters. + * + * --- + * + * <Region x Battleback1: filename> + * <Region x Battleback2: filename> + * + * - Used for: Map Notetags + * - If the player starts a battle while standing on 'x' region, then the + * 'filename' battleback will be used. + * - Replace 'x' with a number representing the region ID you wish to use. + * - Replace 'filename' with the filename of the graphic to use. Do not insert + * any extensions. This means the file 'Castle1.png' will be only inserted + * as 'Castle1' without the '.png' at the end. + * - *NOTE: This will override any specified battleback settings. + * + * --- + * + * === Battle Command-Related Notetags === + * + * You can use notetags to change how the battle commands of playable + * characters appear in battle as well as whether or not they can be used. + * + * --- + * + * <Seal Attack> + * <Seal Guard> + * <Seal Item> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Prevents specific battle commands from being able to be used. + * + * --- + * + * <Battle Commands> + * Attack + * Skills + * SType: x + * SType: name + * All Skills + * Skill: x + * Skill: name + * Guard + * Item + * Party + * Escape + * Auto Battle + * Combat Log + * Talk + * Weapon Swap + * </Battle Commands> + * + * - Used for: Class Notetags + * - Changes which commands appear in the Actor Command Window in battle. + * If this notetag is not used, then the default commands determined in + * Plugin Parameters => Actor Command Window => Command List will be used. + * - Add/remove/modify entries as needed. + * + * - Attack + * - Adds the basic attack command. + * + * - Skills + * - Displays all the skill types available to the actor. + * + * - SType: x + * - Stype: name + * - Adds in a specific skill type. + * - Replace 'x' with the ID of the skill type. + * - Replace 'name' with the name of the skill type (without text codes). + * + * - All Skills + * - Adds all usable battle skills as individual actions. + * + * - Skill: x + * - Skill: name + * - Adds in a specific skill as a usable action. + * - Replace 'x' with the ID of the skill. + * - Replace 'name' with the name of the skill. + * + * - Guard + * - Adds the basic guard command. + * + * - Item + * - Adds the basic item command. + * + * - Party + * - Requires VisuMZ_2_PartySystem. + * - Allows this actor to switch out with a different party member. + * + * - Escape + * - Adds the escape command. + * + * - Auto Battle + * - Adds the auto battle command. + * + * - Combat Log + * - Requires VisuMZ_4_CombatLog. + * - Opens up the combat log. + * + * - Talk + * - Requires VisuMZ_3_BattleCmdTalk! + * - Shows talk command if applicable. + * + * - Weapon Swap + * - Requires VisuMZ_2_WeaponSwapSystem. + * - Swaps the current weapon. + * + * Example: + * + * <Battle Commands> + * Attack + * Skill: Heal + * Skills + * Guard + * Item + * Escape + * </Battle Commands> + * + * --- + * + * <Command Text: x> + * + * - Used for: Skill Notetags + * - When a skill is used in a <Battle Commands> notetag set, you can change + * the skill name text that appears to something else. + * - Replace 'x' with the skill's name you want to shown in the Actor Battle + * Command window. + * - Recommended Usage: Shorten skill names that are otherwise too big to fit + * inside of the Actor Battle Command window. + * + * --- + * + * <Command Icon: x> + * + * - Used for: Skill Notetags + * - When a skill is used in a <Battle Commands> notetag set, you can change + * the skill icon that appears to something else. + * - Replace 'x' with the ID of icon you want shown in the Actor Battle Command + * window to represent the skill. + * + * --- + * + * <Command Require Learn> + * + * - Used for: Skill Notetags + * - Determines if a battle command is visible or not by whether the actor has + * learned the skill. + * - Learning the skill is a requirement. Acquiring the skill through traits + * does not count as learning the skill. + * + * --- + * + * <Command Require Access> + * + * - Used for: Skill Notetags + * - Determines if a battle command is visible or not by whether the actor has + * access to the skill. + * - Having access to the skill can come through either learning the skill or + * temporarily acquiring it through trait objects. + * + * --- + * + * <Command Show Switch: x> + * + * <Command Show All Switches: x,x,x> + * <Command Show Any Switches: x,x,x> + * + * - Used for: Skill Notetags + * - Determines if a battle command is visible or not through switches. + * - Replace 'x' with the switch ID to determine the skill's visibility. + * - If 'All' notetag variant is used, item will be hidden until all + * switches are ON. Then, it would be shown. + * - If 'Any' notetag variant is used, item will be shown if any of the + * switches are ON. Otherwise, it would be hidden. + * - This can be applied to Attack and Guard commands, too. + * + * --- + * + * <Command Hide Switch: x> + * + * <Command Hide All Switches: x,x,x> + * <Command Hide Any Switches: x,x,x> + * + * - Used for: Skill Notetags + * - Determines if a battle command is visible or not through switches. + * - Replace 'x' with the switch ID to determine the skill's visibility. + * - If 'All' notetag variant is used, item will be shown until all + * switches are ON. Then, it would be hidden. + * - If 'Any' notetag variant is used, item will be hidden if any of the + * switches are ON. Otherwise, it would be shown. + * - This can be applied to Attack and Guard commands, too. + * + * --- + * + * <Battle Portrait: filename> + * + * - Used for: Actor + * - This is used with the "Portrait" Battle Layout. + * - Sets the battle portrait image for the actor to 'filename'. + * - Replace 'filename' with a picture found within your game project's + * img/pictures/ folder. Filenames are case sensitive. Leave out the filename + * extension from the notetag. + * - This will override any menu images used for battle only. + * + * --- + * + * <Battle Portrait Offset: +x, +y> + * <Battle Portrait Offset: -x, -y> + * + * <Battle Portrait Offset X: +x> + * <Battle Portrait Offset X: -x> + * + * <Battle Portrait Offset Y: +y> + * <Battle Portrait Offset Y: -y> + * + * - Used for: Actor + * - This is used with the "Portrait" and "Border" Battle Layouts. + * - Offsets the X and Y coordinates for the battle portrait. + * - Replace 'x' with a number value that offsets the x coordinate. + * - Negative x values offset left. Positive x values offset right. + * - Replace 'y' with a number value that offsets the y coordinate. + * - Negative y values offset up. Positive x values offset down. + * + * --- + * + * === JavaScript Notetag: Battle Command-Related === + * + * The following are notetags made for users with JavaScript knowledge to + * determine if skill-based battle commands are visible or hidden. + * + * --- + * + * <JS Command Visible> + * code + * code + * visible = code; + * </JS Command Visible> + * + * - Used for: Skill Notetags + * - The 'visible' variable is the final returned variable to determine the + * skill's visibility in the Battle Command Window. + * - Replace 'code' with JavaScript code to determine the skill's visibility in + * the Battle Command Window. + * - The 'user' variable represents the user who will perform the skill. + * - The 'skill' variable represents the skill to be used. + * + * --- + * + * === Targeting-Related Notetags === + * + * The following notetags are related to the targeting aspect of skills and + * items and may adjust the scope of how certain skills/items work. + * + * --- + * + * <Always Hit> + * + * <Always Hit Rate: x%> + * + * - Used for: Skill, Item Notetags + * - Causes the action to always hit or to always have a hit rate of exactly + * the marked x%. + * - Replace 'x' with a number value representing the hit success percentage. + * + * --- + * + * <Repeat Hits: x> + * + * - Used for: Skill, Item Notetags + * - Changes the number of hits the action will produce. + * - Replace 'x' with a number value representing the number of hits to incur. + * + * --- + * + * <Target: x Random Any> + * + * - Used for: Skill, Item Notetags + * - Makes the skill pick 'x' random targets when used. + * - Targets can be both actors and enemies. + * - Replace 'x' with a number value representing the number of random targets. + * + * --- + * + * <Target: x Random Enemies> + * + * - Used for: Skill, Item Notetags + * - Makes the skill pick 'x' random targets when used. + * - Targets are only enemies. + * - Replace 'x' with a number value representing the number of random targets. + * + * --- + * + * <Target: x Random Allies> + * + * - Used for: Skill, Item Notetags + * - Makes the skill pick 'x' random targets when used. + * - Targets are only actors. + * - Replace 'x' with a number value representing the number of random targets. + * + * --- + * + * <Target: All Allies But User> + * + * - Used for: Skill, Item Notetags + * - Targets all allies with the exception of the user. + * + * --- + * + * === JavaScript Notetag: Targeting-Related === + * + * --- + * + * <JS Targets> + * code + * code + * targets = [code]; + * </JS Targets> + * + * - Used for: Skill, Item Notetags + * - The 'targets' variable is an array that is returned to be used as a + * container for all the valid action targets. + * - The 'targets' variable will include the original set of targets determined + * by the skill/item's original scale. + * - If you wish to clear it out, simply do 'targets = []' first. + * - Replace 'code' with JavaScript code to determine valid targets. + * + * --- + * + * === Damage-Related Notetags === + * + * --- + * + * <Damage Style: name> + * + * - Used for: Skill, Item Notetags + * - Replace 'name' with a Damage Style name to change the way calculations are + * made using the damage formula input box. + * - Names can be found in Plugin Parameters => Damage Settings => Style List + * + * --- + * + * <Armor Reduction: x> + * <Armor Reduction: x%> + * - Used for: Actor, Class, Skill, Item, Weapon, Armor, Enemy, State Notetags + * - If used on skills and/or items, sets the current skill/item's armor + * reduction properties to 'x' and/or 'x%'. + * - If used on trait objects, adds 'x' and/or 'x%' armor reduction properties + * when calculating one's own armor. + * - This applies to physical attacks. + * - Use the 'x' notetag variant to determine a flat reduction value. + * - Use the 'x%' notetag variant to determine a percentile reduction value. + * + * --- + * + * <Armor Penetration: x> + * <Armor Penetration: x%> + * - Used for: Actor, Class, Skill, Item, Weapon, Armor, Enemy, State Notetags + * - If used on skills and/or items, sets the current skill/item's armor + * penetration properties to 'x' and/or 'x%'. + * - If used on trait objects, adds 'x' and/or 'x%' armor penetration + * properties when calculating a target's armor. + * - This applies to physical attacks. + * - Use the 'x' notetag variant to determine a flat penetration value. + * - Use the 'x%' notetag variant to determine a percentile penetration value. + * + * --- + * + * <Magic Reduction: x> + * <Magic Reduction: x%> + * - Used for: Actor, Class, Skill, Item, Weapon, Armor, Enemy, State Notetags + * - If used on skills and/or items, sets the current skill/item's armor + * reduction properties to 'x' and/or 'x%'. + * - If used on trait objects, adds 'x' and/or 'x%' armor reduction properties + * when calculating one's own armor. + * - This applies to magical attacks. + * - Use the 'x' notetag variant to determine a flat reduction value. + * - Use the 'x%' notetag variant to determine a percentile reduction value. + * + * --- + * + * <Magic Penetration: x> + * <Magic Penetration: x%> + * - Used for: Actor, Class, Skill, Item, Weapon, Armor, Enemy, State Notetags + * - If used on skills and/or items, sets the current skill/item's armor + * penetration properties to 'x' and/or 'x%'. + * - If used on trait objects, adds 'x' and/or 'x%' armor penetration + * properties when calculating a target's armor. + * - This applies to magical attacks. + * - Use the 'x' notetag variant to determine a flat penetration value. + * - Use the 'x%' notetag variant to determine a percentile penetration value. + * + * --- + * + * <Bypass Damage Cap> + * + * - Used for: Actor, Class, Skill, Item, Weapon, Armor, Enemy, State Notetags + * - If used on skills and/or items, this will cause the action to never have + * its damage capped. + * - If used on trait objects, this will cause the affected unit to never have + * its damage capped. + * + * --- + * + * <Damage Cap: x> + * + * - Used for: Actor, Class, Skill, Item, Weapon, Armor, Enemy, State Notetags + * - If used on skills and/or items, this will declare the hard damage cap to + * be the 'x' value. + * - If used on trait objects, this will raise the affect unit's hard damage + * cap to 'x' value. If another trait object has a higher value, use that + * value instead. + * + * --- + * + * <Bypass Soft Damage Cap> + * + * - Used for: Actor, Class, Skill, Item, Weapon, Armor, Enemy, State Notetags + * - If used on skills and/or items, this will cause the action to never have + * its damage scaled downward to the soft cap. + * - If used on trait objects, this will cause the affected unit to never have + * its damage scaled downward to the soft cap. + * + * --- + * + * <Soft Damage Cap: +x%> + * <Soft Damage Cap: -x%> + * + * - Used for: Actor, Class, Skill, Item, Weapon, Armor, Enemy, State Notetags + * - If used on skills and/or items, this will increase/decrease the action's + * soft cap by x% where 'x' is a percentage value representing the increment + * changed by the hard cap value. + * - If used on trait objects, this will raise the affect unit's soft damage + * limit by x% where 'x' is a percentage value representing the increment + * changed by the hard cap value. + * + * --- + * + * <Unblockable> + * + * - Used for: Skill, Item Notetags + * - Using "Guard" against this skill will not reduce any damage. + * + * --- + * + * === Critical-Related Notetags === + * + * The following notetags affect skill and item critical hit rates and the + * critical damage multiplier. + * + * --- + * + * <Always Critical> + * + * - Used for: Skill, Item Notetags + * - This skill/item will always land a critical hit regardless of the + * user's CRI parameter value. + * + * --- + * + * <Set Critical Rate: x%> + * + * - Used for: Skill, Item Notetags + * - This skill/item will always have a x% change to land a critical hit + * regardless of user's CRI parameter value. + * - Replace 'x' with a percerntage value representing the success rate. + * + * --- + * + * <Modify Critical Rate: x%> + * <Modify Critical Rate: +x%> + * <Modify Critical Rate: -x%> + * + * - Used for: Skill, Item Notetags + * - Modifies the user's CRI parameter calculation for this skill/item. + * - The 'x%' notetag variant will multiply the user's CRI parameter value + * for this skill/item. + * - The '+x%' and '-x%' notetag variants will incremenetally increase/decrease + * the user's CRI parameter value for this skill/item. + * + * --- + * + * <Modify Critical Multiplier: x%> + * <Modify Critical Multiplier: +x%> + * <Modify Critical Multiplier: -x%> + * + * - Used for: Skill, Item Notetags + * - These notetags determine the damage multiplier when a critical hit lands. + * - The 'x%' notetag variant multiply the multiplier to that exact percentage. + * - The '+x%' and '-x%' notetag variants will change the multiplier with an + * incremenetal rate for this skill/item. + * + * --- + * + * <Modify Critical Bonus Damage: x%> + * <Modify Critical Bonus Damage: +x%> + * <Modify Critical Bonus Damage: -x%> + * + * - Used for: Skill, Item Notetags + * - These notetags determine the bonus damage added when a critical hit lands. + * - The 'x%' notetag variant multiply the damage to that exact percentage. + * - The '+x%' and '-x%' notetag variants will change the bonus damage with an + * incremenetal rate for this skill/item. + * + * --- + * + * === JavaScript Notetags: Critical-Related === + * + * The following are notetags made for users with JavaScript knowledge to + * determine how critical hit-related aspects are calculated. + * + * --- + * + * <JS Critical Rate> + * code + * code + * rate = code; + * </JS Critical Rate> + * + * - Used for: Skill, Item Notetags + * - The 'rate' variable is the final returned amount to determine the + * critical hit success rate. + * - Replace 'code' with JavaScript code to determine the final 'rate' to be + * returned as the critical hit success rate. + * - The 'user' variable represents the one using the skill/item. + * - The 'target' variable represents the one receiving the skill/item hit. + * + * --- + * + * <JS Critical Damage> + * code + * code + * multiplier = code; + * bonusDamage = code; + * </JS Critical Damage> + * + * - Used for: Skill, Item Notetags + * - The 'multiplier' variable is returned later and used as the damage + * multiplier used to amplify the critical damage amount. + * - The 'bonusDamage' variable is returned later and used as extra added + * damage for the critical damage amount. + * - Replace 'code' with JavaScript code to determine how the 'multiplier' and + * 'bonusDamage' variables are calculated. + * - The 'user' variable represents the one using the skill/item. + * - The 'target' variable represents the one receiving the skill/item hit. + * + * --- + * + * === Action Sequence-Related Notetags === + * + * Action Sequences allow you full control over how a skill and/or item plays + * through its course. These notetags give you control over various aspects of + * those Action Sequences. More information is found in the Action Sequences + * help section. + * + * --- + * + * <Custom Action Sequence> + * + * - Used for: Skill, Item Notetags + * - Removes all automated Action Sequence parts from the skill. + * - Everything Action Sequence-related will be done by Common Events. + * - Insert Common Event(s) into the skill/item's effects list to make use of + * the Custom Action Sequences. + * - This will prevent common events from loading in the Item Scene and Skill + * Scene when used outside of battle. + * + * --- + * + * <Auto Action Sequence> + * + * - Used for: Skill, Item Notetags + * - If the Action Sequence Plugin Parameter "Auto Notetag" is enabled, this + * plugin will prevent custom action sequences from happening for the skill + * or item, and instead, use an Automatic Action Sequence instead. + * - Ignore this if you have "Auto Notetag" disabled or set to false. By + * default, this setting is set to false. Please be aware of the changes + * you've made to your game before using it. + * + * --- + * + * <Bypass Auto Action Sequence> + * + * - Used for: Skill, Item Notetags + * - This notetag is used for the game devs that have the Action Sequence + * Plugin Parameter "Auto Notetag" on for applying <Custom Action Sequence> + * to everything. + * - This will allow items and skills to be able to launch their common + * events from the menu scene regardless of the inherent restriction to + * prevent action sequence based skills/items with common events from + * launching. + * - Ignore this if you have "Auto Notetag" disabled or set to false. By + * default, this setting is set to false. Please be aware of the changes + * you've made to your game before using it. + * + * --- + * + * <Common Event: name> + * + * - Used for: Skill, Item Notetags + * - Battle only: calls forth a Common Event of a matching name. + * - Replace 'name' with the name of a Common Event to call from when this + * skill/item is used in battle. + * - Remove any \I[x] in the name. + * - Insert multiple notetags to call multiple Common Events in succession. + * - This will occur after any Common Event Trait Effects for the skill/item's + * database entry. + * - This is primarily used for users who are reorganizing around their Common + * Events and would still like to have their skills/items perform the correct + * Action Sequences in case the ID's are different. + * + * --- + * + * <Display Icon: x> + * <Display Text: string> + * + * - Used for: Skill, Item Notetags + * - When displaying the skill/item name in the Action Sequence, determine the + * icon and/or text displayed. + * - Replace 'x' with a number value representing the icon ID to be displayed. + * - Replace 'string' with a text value representing the displayed name. + * + * --- + * + * <Common Event Key: name> + * <Common Event Keys: name, name, name> + * + * <Common Event Keys> + * key + * key + * key + * </Common Event Keys> + * + * - Used for: Skill, Item Notetags + * - Will generate Common Events for the skill/item with a corresponding key. + * - Replace 'name' with the name of the Common Event's key that you want to + * reference. That key will be converted into a Common Event effect for the + * skill/item and be treated as an action sequence. + * - The notetag variants that use multiple keys will have the keys added in + * the order they are listed. + * - If keys do not reference any Common Events, no Common Events will be + * added for that key. + * - To mark a Common Event with a key, insert inside a Common Event's name the + * [ and ] brackets around the text that will be used as the Common Event's + * key text. + * - For example, if Common Event's name is "Penta Slash [PENTA]", then the + * key used is "PENTA" without the quotes. + * - This key could then be referenced by <Common Event Key: PENTA> notetag. + * - Do not use commas (,) inside the key text as it will be automatically + * removed for the sake of consistency. + * - This feature is made for make the process of sharing Action Sequences to + * become easier without needing to line up Common Event ID's. + * + * --- + * + * === Animated Sideview Battler-Related Notetags === + * + * Enemies can use Animated Sideview Actor graphics thanks to this plugin. + * These notetags give you control over that aspect. Some of these also affect + * actors in addition to enemies. + * + * --- + * + * <Sideview Battler: filename> + * + * <Sideview Battlers> + * filename: weight + * filename: weight + * filename: weight + * </Sideview Battlers> + * + * - Used for: Enemy Notetags + * - Replaces the enemy's battler graphic with an animated Sideview Actor + * graphic found in the img/sv_actors/ folder. + * - Replace 'filename' with the filename of the graphic to use. Do not insert + * any extensions. This means the file 'Actor1_1.png' will be only inserted + * as 'Actor1_1' without the '.png' at the end. + * - If the multiple notetag vaiant is used, then a random filename is selected + * from the list upon the enemy's creation. + * - Replace 'weight' with a number value representing how often the 'filename' + * would come up. The higher the weight, the more often. You may omit this + * and the colon(:) and just type in the 'filename' instead. + * - Add/remove lines as you see fit. + * + * Example: + * + * <Sideview Battlers> + * Actor1_1: 25 + * Actor1_3: 10 + * Actor1_5 + * Actor1_7 + * </Sideview Battlers> + * + * --- + * + * <Sideview Anchor: x, y> + * + * - Used for: Actor, Enemy Notetags + * - Sets the sprite anchor positions for the sideview sprite. + * - Replace 'x' and 'y' with numbers depicting where the anchors should be for + * the sideview sprite. + * - By default, the x and y anchors are 0.5 and 1.0. + * + * --- + * + * <Sideview Home Offset: +x, +y> + * <Sideview Home Offset: -x, -y> + * + * - Used for: Actor, Class, Weapon, Armor, State Notetags + * - Offsets the sideview actor sprite's home position by +/-x, +/-y. + * - Replace 'x' and 'y' with numbers depicting how much to offset each of the + * coordinates by. For '0' values, use +0 or -0. + * - This notetag will not work if you remove it from the JavaScript code in + * Plugin Parameters > Actor > JS: Home Position + * + * --- + * + * <Sideview Weapon Offset: +x, +y> + * <Sideview Weapon Offset: -x, -y> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy State Notetags + * - Offsets the sideview weapon sprite's position by +/-x, +/-y. + * - Replace 'x' and 'y' with numbers depicting how much to offset each of the + * coordinates by. For '0' values, use +0 or -0. + * + * --- + * + * <Sideview Show Shadow> + * <Sideview Hide Shadow> + * + * - Used for: Actor, Enemy Notetags + * - Sets it so the sideview battler's shadow will be visible or hidden. + * + * --- + * + * <Sideview Shadow Scale: x%> + * <Sideview Shadow Scale: x.y> + * + * - Used for: Actor, Enemy Notetags + * - Adjusts the scaling size of the sideview battler's shadow. + * - This affects both the X and Y scale. + * + * --- + * + * <Sideview Shadow Scale X: x%> + * <Sideview Shadow Scale X: x.y> + * + * <Sideview Shadow Scale Y: x%> + * <Sideview Shadow Scale Y: x.y> + * + * - Used for: Actor, Enemy Notetags + * - Adjusts the scaling size of the sideview battler's shadow. + * - These affect their respective X and Y scales separately. + * + * --- + * + * <Sideview Collapse> + * <Sideview No Collapse> + * + * - Used for: Enemy Notetags + * - Either shows the collapse graphic or does not show the collapse graphic. + * - Collapse graphic means the enemy will 'fade away' once it's defeated. + * - No collapse graphic means the enemy's corpse will remain on the screen. + * + * --- + * + * <Sideview Idle Motion: name> + * + * <Sideview Idle Motions> + * name: weight + * name: weight + * name: weight + * </Sideview Idle Motions> + * + * - Used for: Enemy Notetags + * - Changes the default idle motion for the enemy. + * - Replace 'name' with any of the following motion names: + * - 'walk', 'wait', 'chant', 'guard', 'damage', 'evade', 'thrust', 'swing', + * 'missile', 'skill', 'spell', 'item', 'escape', 'victory', 'dying', + * 'abnormal', 'sleep', 'dead' + * - If the multiple notetag vaiant is used, then a random motion name is + * selected from the list upon the enemy's creation. + * - Replace 'weight' with a number value representing how often the 'name' + * would come up. The higher the weight, the more often. You may omit this + * and the colon(:) and just type in the 'name' instead. + * - Add/remove lines as you see fit. + * + * Example: + * + * <Sideview Idle Motions> + * walk: 25 + * wait: 50 + * guard + * victory + * abnormal + * </Sideview Idle Motions> + * + * --- + * + * <Sideview Size: width, height> + * + * - Used for: Enemy Notetags + * - When using a sideview battler, its width and height will default to the + * setting made in Plugin Parameters => Enemy Settings => Size: Width/Height. + * - This notetag lets you change that value to something else. + * - Replace 'width' and 'height' with numbers representing how many pixels + * wide/tall the sprite will be treated as. + * - This does NOT change the image size. This only changes the HITBOX size. + * + * --- + * + * <Sideview Weapon: weapontype> + * + * <Sideview Weapons> + * weapontype: weight + * weapontype: weight + * weapontype: weight + * </Sideview Weapons> + * + * - Used for: Enemy Notetags + * - Give your sideview enemies weapons to use. + * - Replace 'weapontype' with the name of the weapon type found under the + * Database => Types => Weapon Types list (without text codes). + * - If the multiple notetag vaiant is used, then a random weapon type is + * selected from the list upon the enemy's creation. + * - Replace 'weight' with a number value representing how often the weapontype + * would come up. The higher the weight, the more often. You may omit this + * and the colon(:) and just type in the 'weapontype' instead. + * - Add/remove lines as you see fit. + * + * Example: + * + * <Sideview Weapons> + * Dagger: 25 + * Sword: 25 + * Axe + * </Sideview Weapons> + * + * --- + * + * <traitname Sideview Battler: filename> + * + * <traitname Sideview Battlers> + * filename: weight + * filename: weight + * filename: weight + * </traitname Sideview Battlers> + * + * - Used for: Enemy Notetags + * - Requires VisuMZ_1_ElementStatusCore + * - Allows certain Trait Sets to cause battlers to have a unique appearance. + * - Replace 'filename' with the filename of the graphic to use. Do not insert + * any extensions. This means the file 'Actor1_1.png' will be only inserted + * as 'Actor1_1' without the '.png' at the end. + * - If the multiple notetag vaiant is used, then a random filename is selected + * from the list upon the enemy's creation. + * - Replace 'weight' with a number value representing how often the 'filename' + * would come up. The higher the weight, the more often. You may omit this + * and the colon(:) and just type in the 'filename' instead. + * - Add/remove lines as you see fit. + * + * Examples: + * + * <Male Sideview Battlers> + * Actor1_1: 25 + * Actor1_3: 10 + * Actor1_5 + * Actor1_7 + * </Male Sideview Battlers> + * + * <Female Sideview Battlers> + * Actor1_2: 25 + * Actor1_4: 10 + * Actor1_6 + * Actor1_8 + * </Female Sideview Battlers> + * + * --- + * + * <traitname Sideview Idle Motion: name> + * + * <traitname Sideview Idle Motions> + * name: weight + * name: weight + * name: weight + * </traitname Sideview Idle Motions> + * + * - Used for: Enemy Notetags + * - Requires VisuMZ_1_ElementStatusCore + * - Allows certain Trait Sets to cause battlers to have unique idle motions. + * - Replace 'name' with any of the following motion names: + * - 'walk', 'wait', 'chant', 'guard', 'damage', 'evade', 'thrust', 'swing', + * 'missile', 'skill', 'spell', 'item', 'escape', 'victory', 'dying', + * 'abnormal', 'sleep', 'dead' + * - If the multiple notetag vaiant is used, then a random motion name is + * selected from the list upon the enemy's creation. + * - Replace 'weight' with a number value representing how often the 'name' + * would come up. The higher the weight, the more often. You may omit this + * and the colon(:) and just type in the 'name' instead. + * - Add/remove lines as you see fit. + * + * Examples: + * + * <Jolly Sideview Idle Motions> + * wait: 25 + * victory: 10 + * walk + * </Jolly Sideview Idle Motions> + * + * <Serious Sideview Idle Motions> + * walk: 25 + * guard: 10 + * wait + * </Jolly Sideview Idle Motions> + * + * --- + * + * <traitname Sideview Weapon: weapontype> + * + * <traitname Sideview Weapons> + * weapontype: weight + * weapontype: weight + * weapontype: weight + * </traitname Sideview Weapons> + * + * - Used for: Enemy Notetags + * - Requires VisuMZ_1_ElementStatusCore + * - Allows certain Trait Sets to cause battlers to have unique weapons. + * - Replace 'weapontype' with the name of the weapon type found under the + * Database => Types => Weapon Types list (without text codes). + * - If the multiple notetag vaiant is used, then a random weapon type is + * selected from the list upon the enemy's creation. + * - Replace 'weight' with a number value representing how often the weapontype + * would come up. The higher the weight, the more often. You may omit this + * and the colon(:) and just type in the 'weapontype' instead. + * - Add/remove lines as you see fit. + * + * Examples: + * + * <Male Sideview Weapons> + * Dagger: 25 + * Sword: 25 + * Axe + * </Male Sideview Weapons> + * + * <Female Sideview Weapons> + * Dagger: 25 + * Spear: 25 + * Cane + * </Female Sideview Weapons> + * + * --- + * + * === Enemy-Related Notetags === + * + * --- + * + * <Battler Sprite Cannot Move> + * + * - Used for: Enemy Notetags + * - Prevents the enemy from being able to move, jump, and/or float due to + * Action Sequences. Useful for rooted enemies. + * + * --- + * + * <Battler Sprite Grounded> + * + * - Used for: Enemy Notetags + * - Prevents the enemy from being able to jumping and/or floating due to + * Action Sequences but still able to move. Useful for rooted enemies. + * + * --- + * + * <Swap Enemies> + * name: weight + * name: weight + * name: weight + * </Swap Enemies> + * + * - Used for: Enemy Notetags + * - Causes this enemy database object to function as a randomizer for any of + * the listed enemies inside the notetag. When the enemy is loaded into the + * battle scene, the enemy is immediately replaced with one of the enemies + * listed. The randomization is based off the 'weight' given to each of the + * enemy 'names'. + * - Replace 'name' with the database enemy of the enemy you wish to replace + * the enemy with. + * - Replace 'weight' with a number value representing how often the 'name' + * would come up. The higher the weight, the more often. You may omit this + * and the colon(:) and just type in the 'name' instead. + * - Add/remove lines as you see fit. + * + * Example: + * + * <Swap Enemies> + * Bat: 50 + * Slime: 25 + * Orc + * Minotaur + * </Swap Enemies> + * + * --- + * + * === JavaScript Notetags: Mechanics-Related === + * + * These JavaScript notetags allow you to run code at specific instances during + * battle provided that the unit has that code associated with them in a trait + * object (actor, class, weapon, armor, enemy, or state). How you use these is + * entirely up to you and will depend on your ability to understand the code + * used and driven for each case. + * + * --- + * + * <JS Pre-Start Battle> + * code + * code + * code + * </JS Pre-Start Battle> + * + * <JS Post-Start Battle> + * code + * code + * code + * </JS Post-Start Battle> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code at the start of battle aimed at the function: + * BattleManager.startBattle() + * - 'Pre' runs before the function runs. + * - 'Post' runs after the function runs. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * <JS Pre-Start Turn> + * code + * code + * code + * </JS Pre-Start Turn> + * + * <JS Post-Start Turn> + * code + * code + * code + * </JS Post-Start Turn> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code at the start of a turn aimed at the function: + * BattleManager.startTurn() + * - 'Pre' runs before the function runs. + * - 'Post' runs after the function runs. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * <JS Pre-Start Action> + * code + * code + * code + * </JS Pre-Start Action> + * + * <JS Post-Start Action> + * code + * code + * code + * </JS Post-Start Action> + * + * - Used for: Actor, Class, Skill, Item, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code at the start of an action aimed at the function: + * BattleManager.startAction() + * - 'Pre' runs before the function runs. + * - 'Post' runs after the function runs. + * - If used on skills and/or items, this will only apply to the skill/item + * being used and does not affect other skills and items. + * - If used on trait objects, this will apply to any skills/items used as long + * as the unit affected by the trait object has access to the trait object. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * <JS Pre-Apply> + * code + * code + * code + * </JS Pre-Apply> + * + * - Used for: Skill, Item Notetags + * - Runs JavaScript code at the start of an action hit aimed at the function: + * Game_Action.prototype.apply() + * - 'Pre' runs before the function runs. + * - If used on skills and/or items, this will only apply to the skill/item + * being used and does not affect other skills and items. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one using the skill/item. + * - The 'target' variable represents the one receiving the skill/item hit. + * + * --- + * + * <JS Pre-Apply as User> + * code + * code + * code + * </JS Pre-Apply as User> + * + * <JS Pre-Apply as Target> + * code + * code + * code + * </JS Pre-Apply as Target> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code at the start of an action hit aimed at the function: + * Game_Action.prototype.apply() + * - 'Pre' runs before the function runs. + * - If used on trait objects, this will apply to any skills/items used as long + * as the unit affected by the trait object has access to the trait object. + * - If the 'as User' notetag variant is used, this code will be run as a + * response to the action from the action user end. + * - If the 'as Target' notetag variant is used, this code will be run as a + * response to the action from the action target end. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one using the skill/item. + * - The 'target' variable represents the one receiving the skill/item hit. + * + * --- + * + * <JS Pre-Damage> + * code + * code + * code + * </JS Pre-Damage> + * + * - Used for: Skill, Item Notetags + * - Runs JavaScript code before damage is dealt aimed at the function: + * Game_Action.prototype.executeDamage() + * - 'Pre' runs before the function runs. + * - If used on skills and/or items, this will only apply to the skill/item + * being used and does not affect other skills and items. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one using the skill/item. + * - The 'target' variable represents the one receiving the skill/item hit. + * + * --- + * + * <JS Pre-Damage as User> + * code + * code + * code + * </JS Pre-Damage as User> + * + * <JS Pre-Damage as Target> + * code + * code + * code + * </JS Pre-Damage as Target> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code before damage is dealt aimed at the function: + * Game_Action.prototype.executeDamage() + * - 'Pre' runs before the function runs. + * - If used on trait objects, this will apply to any skills/items used as long + * as the unit affected by the trait object has access to the trait object. + * - If the 'as User' notetag variant is used, this code will be run as a + * response to the action from the action user end. + * - If the 'as Target' notetag variant is used, this code will be run as a + * response to the action from the action target end. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one using the skill/item. + * - The 'target' variable represents the one receiving the skill/item hit. + * + * --- + * + * <JS Post-Damage> + * code + * code + * code + * </JS Post-Damage> + * + * - Used for: Skill, Item Notetags + * - Runs JavaScript code after damage is dealt aimed at the function: + * Game_Action.prototype.executeDamage() + * - 'Post' runs after the function runs. + * - If used on skills and/or items, this will only apply to the skill/item + * being used and does not affect other skills and items. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one using the skill/item. + * - The 'target' variable represents the one receiving the skill/item hit. + * + * --- + * + * <JS Post-Damage as User> + * code + * code + * code + * </JS Post-Damage as User> + * + * <JS Post-Damage as Target> + * code + * code + * code + * </JS Post-Damage as Target> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code after damage is dealt aimed at the function: + * Game_Action.prototype.executeDamage() + * - 'Post' runs after the function runs. + * - If used on trait objects, this will apply to any skills/items used as long + * as the unit affected by the trait object has access to the trait object. + * - If the 'as User' notetag variant is used, this code will be run as a + * response to the action from the action user end. + * - If the 'as Target' notetag variant is used, this code will be run as a + * response to the action from the action target end. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one using the skill/item. + * - The 'target' variable represents the one receiving the skill/item hit. + * + * --- + * + * <JS Post-Apply> + * code + * code + * code + * </JS Post-Apply> + * + * - Used for: Skill, Item Notetags + * - Runs JavaScript code at the end of an action hit aimed at the function: + * Game_Action.prototype.apply() + * - 'Post' runs after the function runs. + * - If used on skills and/or items, this will only apply to the skill/item + * being used and does not affect other skills and items. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one using the skill/item. + * - The 'target' variable represents the one receiving the skill/item hit. + * + * --- + * + * <JS Post-Apply as User> + * code + * code + * code + * </JS Post-Apply as User> + * + * <JS Post-Apply as Target> + * code + * code + * code + * </JS Post-Apply as Target> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code at the end of an action hit aimed at the function: + * Game_Action.prototype.apply() + * - 'Post' runs after the function runs. + * - If used on trait objects, this will apply to any skills/items used as long + * as the unit affected by the trait object has access to the trait object. + * - If the 'as User' notetag variant is used, this code will be run as a + * response to the action from the action user end. + * - If the 'as Target' notetag variant is used, this code will be run as a + * response to the action from the action target end. + * - Replace 'code' with JavaScript code to run desired effects. + * + * --- + * + * <JS Pre-End Action> + * code + * code + * code + * </JS Pre-End Action> + * + * <JS Post-End Action> + * code + * code + * code + * </JS Post-End Action> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code at the end of an action aimed at the function: + * BattleManager.endAction() + * - 'Pre' runs before the function runs. + * - 'Post' runs after the function runs. + * - If used on trait objects, this will apply to any skills/items used as long + * as the unit affected by the trait object has access to the trait object. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * <JS Pre-End Turn> + * code + * code + * code + * </JS Pre-End Turn> + * + * <JS Post-End Turn> + * code + * code + * code + * </JS Post-End Turn> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code at the end of a turn aimed at the function: + * Game_Battler.prototype.onTurnEnd() + * - 'Pre' runs before the function runs. + * - 'Post' runs after the function runs. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * <JS Pre-Regenerate> + * code + * code + * code + * </JS Pre-Regenerate> + * + * <JS Post-Regenerate> + * code + * code + * code + * </JS Post-Regenerate> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code when a unit regenerates HP/MP aimed at the function: + * Game_Battler.prototype.regenerateAll() + * - 'Pre' runs before the function runs. + * - 'Post' runs after the function runs. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * <JS Battle Victory> + * code + * code + * code + * </JS Battle Victory> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code when a battle is won aimed at the function: + * BattleManager.processVictory() + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * <JS Escape Success> + * code + * code + * code + * </JS Escape Success> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code when escaping succeeds aimed at the function: + * BattleManager.onEscapeSuccess() + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * <JS Escape Failure> + * code + * code + * code + * </JS Escape Failure> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code when escaping fails aimed at the function: + * BattleManager.onEscapeFailure() + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * <JS Battle Defeat> + * code + * code + * code + * </JS Battle Defeat> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code when a battle is lost aimed at the function: + * BattleManager.processDefeat() + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * <JS Pre-End Battle> + * code + * code + * code + * </JS Pre-End Battle> + * + * <JS Post-End Battle> + * code + * code + * code + * </JS Post-End Battle> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - Runs JavaScript code when the battle is over aimed at the function: + * BattleManager.endBattle() + * - 'Pre' runs before the function runs. + * - 'Post' runs after the function runs. + * - Replace 'code' with JavaScript code to run desired effects. + * - The 'user' variable represents the one affected by the trait object. + * + * --- + * + * === Battle Layout-Related Notetags === + * + * These tags will change the battle layout for a troop regardless of how the + * plugin parameters are set up normally. Insert these tags in either the + * noteboxes of maps or the names of troops for them to take effect. If both + * are present for a specific battle, then priority goes to the setting found + * in the troop name. + * + * --- + * + * <Layout: type> + * <Battle Layout: type> + * + * - Used for: Map Notetags, Troop Name Tags, and Troop Comment Tags + * - Changes the battle layout style used for this specific map or battle. + * - Replace 'type' with 'default', 'list', 'xp', 'portrait', or 'border'. + * - If using Troop Comment Tags, then as long as the tag appears in a comment + * found on any of the Troop's pages (even if they don't run), the tag will + * be considered in effect. + * + * --- + * + * === Troop Comment Tags === + * + * Place these tags inside of a comment found in a troop page's event list. + * + * --- + * + * <Once Parallel When Start Battle> + * + * - Used for: Troop Page Comment Tags + * - Causes the troop page to immediately load the moment the battle scene + * begins to fade in (not after it fades in). This is faster than a turn 0 + * condition troop page. Troop page conditions are ignored. + * - This can be used for things like the Action Sequence Camera plugin, the + * Visual Battle Environment plugin, and/or initial battle poses and such in + * order to provide a near seamless battle transition experience. + * - This does NOT trigger when coming out of the options menu or party menu. + * - This WILL trigger when going from battle to battle nonstop via plugins + * like VisuStella MZ's Chain Battles. + * - When actors are moving towards their home positions, it will take around + * 30 frames by default. Use this information however you like. + * + * --- + * + * ============================================================================ + * Action Sequence - Plugin Commands + * ============================================================================ + * + * Skills and items, when used in battle, have a pre-determined series of + * actions to display to the player as a means of representing what's going on + * with the action. For some game devs, this may not be enough and they would + * like to get more involved with the actions themselves. + * + * Action Sequences, added through this plugin, enable this. To give a skill or + * item a Custom Action Sequence, a couple of steps must be followed: + * + * --- + * + * 1. Insert the <Custom Action Sequence> notetag into the skill or item's + * notebox (or else this would not work as intended). + * 2. Give that skill/item a Common Event through the Effects box. The selected + * Common Event will contain all the Action Sequence data. + * 3. Create the Common Event with Action Sequence Plugin Commands and/or event + * commands to make the skill/item do what you want it to do. + * + * --- + * + * The Plugin Commands added through the Battle Core plugin focus entirely on + * Action Sequences. However, despite the fact that they're made for skills and + * items, some of these Action Sequence Plugin Commands can still be used for + * regular Troop events and Common Events. + * + * --- + * + * === Action Sequence - Action Sets === + * + * Action Sequence Action Sets are groups of commonly used + * Action Sequence Commands put together for more efficient usage. + * + * --- + * + * ACSET: Setup Action Set + * - The generic start to most actions. + * + * Display Action: + * Immortal: On: + * Battle Step: + * Wait For Movement: + * Cast Animation: + * Wait For Animation: + * - Use this part of the action sequence? + * + * --- + * + * ACSET: All Targets Action Set + * - Affects all targets simultaneously performing the following. + * + * Dual/Multi Wield? + * - Add times struck based on weapon quantity equipped? + * + * Perform Action: + * Wait Count: + * Action Animation: + * Wait For Animation: + * Action Effect: + * Immortal: Off: + * - Use this part of the action sequence? + * - Insert values for the Wait Count(s). + * + * --- + * + * ACSET: Each Target Action Set + * - Goes through each target one by one to perform the following. + * + * Dual/Multi Wield? + * - Add times struck based on weapon quantity equipped? + * + * Perform Action: + * Wait Count: + * Action Animation: + * Wait Count: + * Action Effect: + * Immortal: Off: + * - Use this part of the action sequence? + * - Insert values for the Wait Count(s). + * + * --- + * + * ACSET: Finish Action + * - The generic ending to most actions. + * + * Wait For New Line: + * Wait For Effects: + * Clear Battle Log: + * Home Reset: + * Wait For Movement: + * - Use this part of the action sequence? + * + * --- + * + * === Action Sequences - Angle === + * + * These action sequences allow you to have control over the camera angle. + * Requires VisuMZ_3_ActSeqCamera! + * + * --- + * + * ANGLE: Change Angle + * - Changes the camera angle. + * - Requires VisuMZ_3_ActSeqCamera! + * + * Angle: + * - Change the camera angle to this many degrees. + * + * Duration: + * - Duration in frames to change camera angle. + * + * Angle Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Angle?: + * - Wait for angle changes to complete before performing next command? + * + * --- + * + * ANGLE: Reset Angle + * - Reset any angle settings. + * - Requires VisuMZ_3_ActSeqCamera! + * + * Duration: + * - Duration in frames to reset camera angle. + * + * Angle Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Angle?: + * - Wait for angle changes to complete before performing next command? + * + * --- + * + * ANGLE: Wait For Angle + * - Waits for angle changes to complete before performing next command. + * - Requires VisuMZ_3_ActSeqCamera! + * + * --- + * + * === Action Sequences - Animations === + * + * These Action Sequences are related to the 'Animations' that can be found in + * the Animations tab of the Database. + * + * --- + * + * ANIM: Action Animation + * - Plays the animation associated with the action. + * + * Targets: + * - Select unit(s) to play the animation on. + * + * Mirror Animation: + * - Mirror the animation? + * + * Wait For Animation?: + * - Wait for animation to complete before performing next command? + * + * --- + * + * ANIM: Attack Animation + * - Plays the animation associated with the user's weapon. + * + * Targets: + * - Select unit(s) to play the animation on. + * + * Mirror Animation: + * - Mirror the animation? + * + * Wait For Animation?: + * - Wait for animation to complete before performing next command? + * + * --- + * + * ANIM: Attack Animation 2+ + * - Plays the animation associated with the user's other weapons. + * - Plays nothing if there is no other weapon equipped. + * + * Targets: + * - Select unit(s) to play the animation on. + * + * Slot: + * - Which weapon slot to get this data from? + * - Main-hand weapon is weapon slot 1. + * + * Mirror Animation: + * - Mirror the animation? + * + * Wait For Animation?: + * - Wait for animation to complete before performing next command? + * + * --- + * + * ANIM: Cast Animation + * - Plays the cast animation associated with the action. + * + * Targets: + * - Select unit(s) to play the animation on. + * + * Mirror Animation: + * - Mirror the animation? + * + * Wait For Animation?: + * - Wait for animation to complete before performing next command? + * + * --- + * + * ANIM: Change Battle Portrait + * - Changes the battle portrait of the actor (if it's an actor). + * - Can be used outside of battle/action sequences. + * + * Targets: + * - Select unit(s) to play the animation on. + * - Valid units can only be actors. + * + * Filename: + * - Select the file to change the actor's portrait to. + * + * --- + * + * ANIM: Play at Coordinate + * - Plays an animation on the screen at a specific x, y coordinate. + * - Requires VisuMZ_0_CoreEngine! + * + * Animation ID: + * - Plays this animation. + * + * Coordinates: + * + * X: + * Y: + * - X/Y coordinate used for the animation. + * You may use JavaScript code. + * + * Mirror Animation?: + * - Mirror the animation? + * + * Mute Animation?: + * - Mute the animation? + * + * Wait for Completion?: + * - Wait the animation to finish before continuing? + * + * --- + * + * ANIM: Show Animation + * - Plays the a specific animation on unit(s). + * + * Targets: + * - Select unit(s) to play the animation on. + * + * Animation ID: + * - Select which animation to play on unit(s). + * + * Mirror Animation: + * - Mirror the animation? + * + * Wait For Animation?: + * - Wait for animation to complete before performing next command? + * + * --- + * + * ANIM: Wait For Animation + * - Causes the interpreter to wait for any animation(s) to finish. + * + * --- + * + * === Action Sequences - Battle Log === + * + * These Action Sequences are related to the Battle Log Window, the window + * found at the top of the battle screen. + * + * --- + * + * BTLOG: Add Text + * - Adds a new line of text into the Battle Log. + * + * Text: + * - Add this text into the Battle Log. + * - Text codes allowed. + * + * Copy to Combat Log?: + * - Copies text to the Combat Log. + * - Requires VisuMZ_4_CombatLog + * + * Combat Log Icon: + * - What icon would you like to bind to this entry? + * - Requires VisuMZ_4_CombatLog + * + * --- + * + * BTLOG: Clear Battle Log + * - Clears all the text in the Battle Log. + * + * --- + * + * BTLOG: Display Action + * - plays the current action in the Battle Log. + * + * --- + * + * BTLOG: Pop Base Line + * - Removes the Battle Log's last added base line and all text up to its + * former location. + * + * --- + * + * BTLOG: Push Base Line + * - Adds a new base line to where the Battle Log currently is at. + * + * --- + * + * BTLOG: Refresh Battle Log + * - Refreshes the Battle Log. + * + * --- + * + * BTLOG: UI Show/Hide + * - Shows or hides the Battle UI (including the Battle Log). + * + * Show/Hide?: + * - Shows/hides the Battle UI. + * + * --- + * + * BTLOG: Wait For Battle Log + * - Causes the interpreter to wait for the Battle Log to finish. + * + * --- + * + * BTLOG: Wait For New Line + * - Causes the interpreter to wait for a new line in the Battle Log. + * + * --- + * + * === Action Sequences - Camera === + * + * These Action Sequences are battle camera-related. + * Requires VisuMZ_3_ActSeqCamera! + * + * --- + * + * CAMERA: Clamp ON/OFF + * - Turns battle camera clamping on/off. + * - Requires VisuMZ_3_ActSeqCamera! + * + * Setting: + * - Turns camera clamping on/off. + * + * --- + * + * CAMERA: Focus Point + * - Focus the battle camera on a certain point in the screen. + * - Requires VisuMZ_3_ActSeqCamera! + * + * X Coordinate: + * - Insert the point to focus the camera on. + * - You may use JavaScript code. + * + * Y Coordinate: + * - Insert the point to focus the camera on. + * - You may use JavaScript code. + * + * Duration: + * - Duration in frames for camera focus change. + * + * Camera Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Camera? + * - Wait for camera changes to complete before performing next command? + * + * --- + * + * CAMERA: Focus Target(s) + * - Focus the battle camera on certain battler target(s). + * - Requires VisuMZ_3_ActSeqCamera! + * + * Targets: + * - Select unit(s) to focus the battle camera on. + * + * Duration: + * - Duration in frames for camera focus change. + * + * Camera Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Camera? + * - Wait for camera changes to complete before performing next command? + * + * --- + * + * CAMERA: Offset + * - Offset the battle camera from the focus target. + * - Requires VisuMZ_3_ActSeqCamera! + * + * Offset X: + * - How much to offset the camera X by. + * - Negative: left. Positive: right. + * + * Offset Y: + * - How much to offset the camera Y by. + * - Negative: up. Positive: down. + * + * Duration: + * - Duration in frames for offset change. + * + * Camera Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Camera? + * - Wait for camera changes to complete before performing next command? + * + * --- + * + * CAMERA: Reset + * - Reset the battle camera settings. + * - Requires VisuMZ_3_ActSeqCamera! + * + * Reset Focus?: + * - Reset the focus point? + * + * Reset Offset?: + * - Reset the camera offset? + * + * Duration: + * - Duration in frames for reset change. + * + * Camera Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Camera? + * - Wait for camera changes to complete before performing next command? + * + * --- + * + * CAMERA: Wait For Camera + * - Waits for camera changes to complete before performing next command. + * - Requires VisuMZ_3_ActSeqCamera! + * + * --- + * + * === Action Sequences - Dragonbones === + * + * These Action Sequences are Dragonbones-related. + * Requires VisuMZ_2_DragonbonesUnion! + * + * --- + * + * DB: Dragonbones Animation + * - Causes the unit(s) to play a Dragonbones motion animation. + * - Requires VisuMZ_2_DragonbonesUnion! + * + * Targets: + * - Select which unit(s) to perform a motion animation. + * + * Motion Animation: + * - What is the name of the Dragonbones motion animation you wish to play? + * + * --- + * + * DB: Dragonbones Time Scale + * - Causes the unit(s) to change their Dragonbones time scale. + * - Requires VisuMZ_2_DragonbonesUnion! + * + * Targets: + * - Select which unit(s) to perform a motion animation. + * + * Time Scale: + * - Change the value of the Dragonbones time scale to this. + * + * --- + * + * === Action Sequences - Elements === + * + * These Action Sequences can change up the element(s) used for the action's + * damage calculation midway through an action. + * + * They also require the VisuMZ_1_ElementStatusCore plugin to be present in + * order for them to work. + * + * --- + * + * ELE: Add Elements + * - Adds element(s) to be used when calculating damage. + * - Requires VisuMZ_1_ElementStatusCore! + * + * Elements: + * - Select which element ID to add onto the action. + * - Insert multiple element ID's to add multiple at once. + * + * --- + * + * ELE: Clear Element Changes + * - Clears all element changes made through Action Sequences. + * - Requires VisuMZ_1_ElementStatusCore! + * + * --- + * + * ELE: Force Elements + * - Forces only specific element(s) when calculating damage. + * - Requires VisuMZ_1_ElementStatusCore! + * + * Elements: + * - Select which element ID to force in the action. + * - Insert multiple element ID's to force multiple at once. + * + * --- + * + * ELE: Null Element + * - Forces no element to be used when calculating damage. + * - Requires VisuMZ_1_ElementStatusCore! + * + * --- + * + * === Action Sequences - Horror Effects === + * + * These Action Sequences are Horror Effects-related. + * Requires VisuMZ_2_HorrorEffects! + * + * --- + * + * HORROR: Clear All Filters + * - Clear all Horror Effects filters on the target battler(s). + * + * Targets: + * - Select unit(s) to remove Horror Effects for. + * + * --- + * + * HORROR: Glitch Create + * - Creates the glitch effect on the target battler(s). + * + * Targets: + * - Select unit(s) to create the Horror Effect for. + * + * Glitch Slices: + * - Glitch slices to be used with the target. + * + * Glitch Offset: + * - Default offset value. + * + * Glitch Animated?: + * - Animate the glitch effect? + * + * Glitch Frequency: + * - If animated, how frequent to make the glitch effect? + * - Lower = often Higher = rarer + * + * Glitch Strength: + * - If animated, how strong is the glitch effect? + * - Lower = weaker Higher = stronger + * + * --- + * + * HORROR: Glitch Remove + * - Removes the glitch effect on the target battler(s). + * + * Targets: + * - Select unit(s) to remove the Horror Effect for. + * + * --- + * + * HORROR: Noise Create + * - Creates the noise effect on the target battler(s). + * + * Targets: + * - Select unit(s) to create the Horror Effect for. + * + * Noise Rate: + * - Noise rate to be used with the target. + * + * Noise Animated: + * - Animate the noise for the target? + * + * --- + * + * HORROR: Noise Remove + * - Removes the noise effect on the target battler(s). + * + * Targets: + * - Select unit(s) to remove the Horror Effect for. + * + * --- + * + * HORROR: TV Create + * - Creates the TV effect on the target battler(s). + * + * Targets: + * - Select unit(s) to create the Horror Effect for. + * + * TV Line Thickness: + * - Default TV line thickness + * - Lower = thinner Higher = thicker + * + * TV Corner Size: + * - Default TV line corner size + * - Lower = smaller Higher = bigger + * + * TV Animated: + * - Animate the TV? + * + * TV Speed: + * - Speed used to animate the TV if animated + * - Lower = slower Higher = faster + * + * --- + * + * HORROR: TV Remove + * - Removes the TV effect on the target battler(s). + * + * Targets: + * - Select unit(s) to remove the Horror Effect for. + * + * --- + * + * === Action Sequences - Impact === + * + * These Action Sequences are related to creating impact. + * Requires VisuMZ_3_ActSeqImpact! + * + * --- + * + * IMPACT: Color Break + * - Breaks the colors on the screen before reassembling. + * - Requires VisuMZ_3_ActSeqImpact! + * + * Intensity: + * - What is the intensity of the color break effect? + * + * Duration: + * - What is the duration of the color break effect? + * + * Easing Type: + * - Select which easing type you wish to apply. + * + * --- + * + * IMPACT: Motion Blur Screen + * - Creates a motion blur on the whole screen. + * - Requires VisuMZ_3_ActSeqImpact! + * + * Angle: + * - Determine what angle to make the motion blur at. + * + * Intensity Rate: + * - This determines intensity rate of the motion blur. + * - Use a number between 0 and 1. + * + * Duration: + * - How many frames should the motion blur last? + * - What do you want to be its duration? + * + * Easing Type: + * - Select which easing type you wish to apply. + * + * --- + * + * IMPACT: Motion Blur Target(s) + * - Creates a motion blur on selected target(s). + * - Requires VisuMZ_3_ActSeqImpact! + * + * Targets: + * - Select unit(s) to create motion blur effects for. + * + * Angle: + * - Determine what angle to make the motion blur at. + * + * Intensity Rate: + * - This determines intensity rate of the motion blur. + * - Use a number between 0 and 1. + * + * Duration: + * - How many frames should the motion blur last? + * - What do you want to be its duration? + * + * Easing Type: + * - Select which easing type you wish to apply. + * + * --- + * + * IMPACT: Motion Trail Create + * - Creates a motion trail effect for the target(s). + * - Requires VisuMZ_3_ActSeqImpact! + * + * Targets: + * - Select unit(s) to create motion trail effects for. + * + * Delay: + * - How many frames to delay by when creating a motion trail? + * - The higher the delay, the less motion trails there are. + * + * Duration: + * - How many frames should the motion trail last? + * - What do you want to be its duration? + * + * Hue: + * - What do you want to be the hue for the motion trail? + * + * Starting Opacity: + * - What starting opacity value do you want for the motion trail? + * - Opacity values decrease over time. + * + * Tone: + * - What tone do you want for the motion trail? + * - Format: [Red, Green, Blue, Gray] + * + * --- + * + * IMPACT: Motion Trail Remove + * - Removes the motion trail effect from the target(s). + * - Requires VisuMZ_3_ActSeqImpact! + * + * Targets: + * - Select unit(s) to clear motion trail effects for. + * + * --- + * + * IMPACT: Shockwave at Point + * - Creates a shockwave at the designated coordinates. + * - Requires VisuMZ_3_ActSeqImpact! + * + * Point: X: + * Point: Y: + * - What x/y coordinate do you want to create a shockwave at? + * - You can use JavaScript code. + * + * Amplitude: + * - What is the aplitude of the shockwave effect? + * + * Wavelength: + * - What is the wavelength of the shockwave effect? + * + * Duration: + * - What is the duration of the shockwave? + * + * --- + * + * IMPACT: Shockwave from Each Target(s) + * - Creates a shockwave at each of the target(s) location(s). + * - Requires VisuMZ_3_ActSeqImpact! + * + * Targets: + * - Select unit(s) to start a shockwave from. + * + * Target Location: + * - Select which part target group to start a shockwave from. + * + * Offset X: + * Offset Y: + * - How much to offset the shockwave X/Y point by. + * + * Amplitude: + * - What is the aplitude of the shockwave effect? + * + * Wavelength: + * - What is the wavelength of the shockwave effect? + * + * Duration: + * - What is the duration of the shockwave? + * + * --- + * + * IMPACT: Shockwave from Target(s) Center + * - Creates a shockwave from the center of the target(s). + * - Requires VisuMZ_3_ActSeqImpact! + * + * Targets: + * - Select unit(s) to start a shockwave from. + * + * Target Location: + * - Select which part target group to start a shockwave from. + * + * Offset X: + * Offset Y: + * - How much to offset the shockwave X/Y point by. + * + * Amplitude: + * - What is the aplitude of the shockwave effect? + * + * Wavelength: + * - What is the wavelength of the shockwave effect? + * + * Duration: + * - What is the duration of the shockwave? + * + * --- + * + * IMPACT: Zoom Blur at Point + * - Creates a zoom blur at the designated coordinates. + * - Requires VisuMZ_3_ActSeqImpact! + * + * Point: X: + * Point: Y: + * - What x/y coordinate do you want to focus the zoom at? + * - You can use JavaScript code. + * + * Zoom Strength: + * - What is the strength of the zoom effect? + * - Use a number between 0 and 1. + * + * Visible Radius: + * - How much of a radius should be visible from the center? + * + * Duration: + * - What is the duration of the zoom blur? + * + * Easing Type: + * - Select which easing type you wish to apply. + * + * --- + * + * IMPACT: Zoom Blur at Target(s) Center + * - Creates a zoom blur at the center of targets. + * - Requires VisuMZ_3_ActSeqImpact! + * + * Targets: + * - Select unit(s) to start a zoom blur from. + * + * Target Location: + * - Select which part target group to start a zoom blur from. + * + * Offset X: + * Offset Y: + * - How much to offset the zoom blur X/Y point by. + * + * Zoom Strength: + * - What is the strength of the zoom effect? + * - Use a number between 0 and 1. + * + * Visible Radius: + * - How much of a radius should be visible from the center? + * + * Duration: + * - What is the duration of the zoom blur? + * + * Easing Type: + * - Select which easing type you wish to apply. + * + * --- + * + * === Action Sequences - Mechanics === + * + * These Action Sequences are related to various mechanics related to the + * battle system. + * + * --- + * + * MECH: Action Effect + * - Causes the unit(s) to take damage/healing from action and incurs any + * changes made such as buffs and states. + * + * Targets: + * - Select unit(s) to receive the current action's effects. + * + * --- + * + * MECH: Add Buff/Debuff + * - Adds buff(s)/debuff(s) to unit(s). + * - Determine which parameters are affected and their durations. + * + * Targets: + * - Select unit(s) to receive the buff(s) and/or debuff(s). + * + * Buff Parameters: + * - Select which parameter(s) to buff. + * - Insert a parameter multiple times to raise its stacks. + * + * Debuff Parameters: + * - Select which parameter(s) to debuff. + * - Insert a parameter multiple times to raise its stacks. + * + * Turns: + * - Number of turns to set the parameter(s) buffs to. + * - You may use JavaScript code. + * + * --- + * + * MECH: Add State + * - Adds state(s) to unit(s). + * + * Targets: + * - Select unit(s) to receive the buff(s). + * + * States: + * - Select which state ID(s) to add to unit(s). + * - Insert multiple state ID's to add multiple at once. + * + * --- + * + * MECH: Analyze Weakness + * - Reveal elemental weakness(es) from target(s). + * - Requires VisuMZ_3_WeaknessDisplay! + * + * Targets: + * - Select unit(s) to reveal elemental weaknesses for. + * + * Reveal: + * - How many elemental weaknesses do you wish to reveal? + * - You may use JavaScript code. + * + * --- + * + * MECH: Armor Penetration + * - Adds an extra layer of defensive penetration/reduction. + * - You may use JavaScript code for any of these. + * + * Armor/Magic Penetration: + * + * Rate: + * - Penetrates an extra multiplier of armor by this value. + * + * Flat: + * - Penetrates a flat amount of armor by this value. + * + * Armor/Magic Reduction: + * + * Rate: + * - Reduces an extra multiplier of armor by this value. + * + * Flat: + * - Reduces a flat amount of armor by this value. + * + * --- + * + * MECH: ATB Gauge + * - Alters the ATB/TPB Gauges. + * - Requires VisuMZ_2_BattleSystemATB! + * + * Targets: + * - Select unit(s) to alter the ATB/TPB Gauges for. + * + * Charging: + * + * Charge Rate: + * - Changes made to the ATB Gauge if it is currently charging. + * + * Casting: + * + * Cast Rate: + * - Changes made to the ATB Gauge if it is currently casting. + * + * Interrupt?: + * - Interrupt the ATB Gauge if it is currently casting? + * + * --- + * + * MECH: Boost Points Change + * - Changes Boost Points for target(s). + * - Requires VisuMZ_3_BoostAction! + * + * Targets: + * - Select unit(s) to alter the Boost Points for. + * + * Alter Boost Points By: + * - Alters the unit(s) Boost Points. + * - Positive for gaining points. Negative for losing points. + * + * --- + * + * MECH: Boost Store Data + * - Stores the number of Boosts used this action inside a variable. + * - Requires VisuMZ_3_BoostAction! + * + * Variable ID: + * - Which variable do you want to store the data inside? + * + * --- + * + * MECH: Break Shield Change + * - Changes Break Shields for target(s) if not Break Stunned. + * - Requires VisuMZ_4_BreakShields! + * + * Targets: + * - Select unit(s) to alter the Break Shields for. + * + * Alter Break Shields By: + * - Alters the unit(s) Break Shields. + * - Positive for gaining shields. Negative for losing shields. + * + * --- + * + * MECH: Break Shield Reset + * - Resets Break Shields for target(s) if not Break Stunned. + * - Requires VisuMZ_4_BreakShields! + * + * Targets: + * - Select unit(s) to reset the Break Shields for. + * + * --- + * + * MECH: BTB Brave Points + * - Alters the target(s) Brave Points to an exact value. + * - Requires VisuMZ_2_BattleSystemBTB! + * + * Targets: + * - Select unit(s) to alter the ATB/TPB Gauges for. + * + * Alter Brave Points By: + * - Alters the target(s) Brave Points. + * - Positive for gaining BP. + * - Negative for losing BP. + * + * --- + * + * MECH: Collapse + * - Causes the unit(s) to perform its collapse animation if the unit(s) + * has died. + * + * Targets: + * - Select unit(s) to process a death collapse. + * + * Force Death: + * - Force death even if the unit has not reached 0 HP? + * - This will remove immortality. + * + * Wait For Effect?: + * - Wait for the collapse effect to complete before performing next command? + * + * --- + * + * MECH: CTB Order + * - Alters the CTB Turn Order. + * - Requires VisuMZ_2_BattleSystemCTB! + * + * Targets: + * - Select unit(s) to alter the CTB Turn Order for. + * + * Change Order By: + * - Changes turn order for target(s) by this amount. + * - Positive increases wait. Negative decreases wait. + * + * --- + * + * MECH: CTB Speed + * - Alters the CTB Speed. + * - Requires VisuMZ_2_BattleSystemCTB! + * + * Targets: + * - Select unit(s) to alter the CTB Speed for. + * + * Charge Rate: + * - Changes made to the CTB Speed if it is currently charging. + * + * Cast Rate: + * - Changes made to the CTB Speed if it is currently casting. + * + * --- + * + * MECH: Custom Damage Formula + * - Changes the current action's damage formula to custom. + * - This will assume the MANUAL damage style. + * + * Formula: + * - Changes the current action's damage formula to custom. + * - Use 'default' to revert the damage formula. + * + * --- + * + * MECH: Damage Popup + * - Causes the unit(s) to display the current state of damage received + * or healed. + * + * Targets: + * - Select unit(s) to prompt a damage popup. + * + * --- + * + * MECH: Dead Label Jump + * - If the active battler is dead, jump to a specific label in the + * common event. + * + * Jump To Label: + * - If the active battler is dead, jump to this specific label in the + * common event. + * + * --- + * + * MECH: Enemy Escape + * - Causes the enemy unit(s) to escape. + * + * Targets: + * - Select unit(s) to escape. + * + * --- + * + * MECH: ETB Energy Count + * - Alters the subject team's available Energy Count. + * - Requires VisuMZ_2_BattleSystemETB! + * + * Energy Count: + * - Alters the subject team's available Energy Count. + * - Positive for gaining energy. Negative for losing energy. + * + * --- + * + * MECH: FTB Action Count + * - Alters the subject team's available Action Count. + * - Requires VisuMZ_2_BattleSystemFTB! + * + * Action Count: + * - Alters the subject team's available Action Count. + * - Positive for gaining actions. Negative for losing actions. + * + * --- + * + * MECH: HP, MP, TP + * - Alters the HP, MP, and TP values for unit(s). + * - Positive values for healing. Negative values for damage. + * + * Targets: + * - Select unit(s) to receive the current action's effects. + * + * HP, MP, TP: + * + * Rate: + * - Changes made to the parameter based on rate. + * - Positive values for healing. Negative values for damage. + * + * Flat: + * - Flat changes made to the parameter. + * - Positive values for healing. Negative values for damage. + * + * Damage Popup?: + * - Display a damage popup after? + * + * --- + * + * MECH: Immortal + * - Changes the immortal flag of targets. If immortal flag is removed and a + * unit would die, collapse that unit. + * + * Targets: + * - Alter the immortal flag of these groups. If immortal flag is removed and + * a unit would die, collapse that unit. + * + * Immortal: + * - Turn immortal flag for unit(s) on/off? + * + * --- + * + * MECH: Multipliers + * - Changes the multipliers for the current action. + * - You may use JavaScript code for any of these. + * + * Critical Hit%: + * + * Rate: + * - Affects chance to land a critical hit by this multiplier. + * + * Flat: + * - Affects chance to land a critical hit by this flat bonus. + * + * Critical Damage + * + * Rate: + * - Affects critical damage by this multiplier. + * + * Flat: + * - Affects critical damage by this flat bonus. + * + * Damage/Healing + * + * Rate: + * - Sets the damage/healing multiplier for current action. + * + * Flat: + * - Sets the damage/healing bonus for current action. + * + * Hit Rate + * + * Rate: + * - Affects chance to connect attack by this multiplier. + * + * Flat: + * - Affects chance to connect attack by this flat bonus. + * + * --- + * + * MECH: Once Parallel + * - Plays a Common Event parallel to the battle event once without repeating + * itself when done. + * + * Common Event ID: + * - The ID of the parallel Common Event to play. + * - Does NOT repeat itself when finished. + * - When exiting battle scene, all Once Parallels are cleared. + * - Once Parallels are not retained upon reentering the scene. + * - Once Parallels are not stored in memory and cannot be saved. + * + * --- + * + * MECH: OTB Order + * - Alters the OTB Turn Order. Best used with single targets. + * - Requires VisuMZ_2_BattleSystemOTB! + * + * Targets: + * - Select unit(s) to alter the OTB Turn Order for. + * + * Current Turn By: + * - Changes turn order for target(s) by this amount. + * - Positive increases wait. Negative decreases wait. + * + * Next Turn By: + * - Changes turn order for target(s) by this amount. + * - Positive increases wait. Negative decreases wait. + * + * Follow Turn By: + * - Changes turn order for target(s) by this amount. + * - Positive increases wait. Negative decreases wait. + * + * --- + * + * MECH: PTB Alter Cost + * - Alters the action's cost settings. + * - Requires VisuMZ_2_BattleSystemPTB! + * + * Override?: + * - Overrides any 'permanent' settings for Changeability? + * + * Alter Changeability: + * - Allow the cost type and value to be changeable? + * + * Alter Cost Type: + * - Change the cost type to this scenario. + * - Use 'Unchanged' for no changes. + * + * Alter Cost Value: + * - What is the default action cost for this scenario? + * + * Priority: + * - What is this scenario's priority? Scenario outcomes with equal or lower + * priorities cannot override types and costs. + * + * --- + * + * MECH: PTB Conversion + * - Converts full actions into half actions. + * - Requires VisuMZ_2_BattleSystemPTB! + * + * Conversion Count: + * - Converts full actions into half actions. + * - If not enough, consume half actions. + * + * --- + * + * MECH: PTB Full/Half Action(s) + * - Alters the subject team's available Full/Half Actions. + * - Requires VisuMZ_2_BattleSystemPTB! + * + * Full Actions: + * - Alters the subject team's available Full Actions. + * - Positive for gaining. Negative for losing. + * + * Half Actions: + * - Alters the subject team's available Half Actions. + * - Positive for gaining. Negative for losing. + * + * --- + * + * MECH: Remove Buff/Debuff + * - Removes buff(s)/debuff(s) from unit(s). + * - Determine which parameters are removed. + * + * Targets: + * - Select unit(s) to have the buff(s) and/or debuff(s) removed. + * + * Buff Parameters: + * - Select which buffed parameter(s) to remove. + * + * Debuff Parameters: + * - Select which debuffed parameter(s) to remove. + * + * --- + * + * MECH: Remove State + * - Remove state(s) from unit(s). + * + * Targets: + * - Select unit(s) to have states removed from. + * + * States: + * - Select which state ID(s) to remove from unit(s). + * - Insert multiple state ID's to remove multiple at once. + * + * --- + * + * MECH: STB Exploit Effect + * - Utilize the STB Exploitation mechanics! + * - Requires VisuMZ_2_BattleSystemSTB! + * + * Target(s) Exploited?: + * - Exploit the below targets? + * + * Targets: + * - Select unit(s) to become exploited. + * + * Force Exploitation: + * - Force the exploited status? + * + * User Exploiter?: + * - Allow the user to become the exploiter? + * + * Force Exploitation: + * - Force the exploiter status? + * + * --- + * + * MECH: STB Extra Action + * - Adds an extra action for the currently active battler. + * - Requires VisuMZ_2_BattleSystemSTB! + * + * Extra Actions: + * - How many extra actions should the active battler gain? + * - You may use JavaScript code. + * + * --- + * + * MECH: STB Remove Excess Actions + * - Removes excess actions from the active battler. + * - Requires VisuMZ_2_BattleSystemSTB! + * + * Remove Actions: + * - How many actions to remove from the active battler? + * - You may use JavaScript code. + * + * --- + * + * MECH: Swap Weapon + * - Causes the unit(s) to swap their weapon for another. + * - Requires VisuMZ_2_WeaponSwapSystem! + * + * Targets: + * - Select unit(s) to swap weapons for. + * + * Weapon Type ID: + * - Which weapon type to swap to? + * - This is NOT the weapon's ID. + * - It's the weapon TYPE. + * + * --- + * + * MECH: Text Popup + * - Causes the unit(s) to display a text popup. + * + * Targets: + * - Select unit(s) to prompt a text popup. + * + * Text: + * - What text do you wish to display? + * + * Text Color: + * - Use #rrggbb for custom colors or regular numbers for text colors from + * the Window Skin. + * + * Flash Color: + * - Adjust the popup's flash color. + * - Format: [red, green, blue, alpha] + * + * Flash Duration: + * - What is the frame duration of the flash effect? + * + * --- + * + * MECH: Variable Popup + * - Causes the unit(s) to display a popup using the data stored inside + * a variable. + * + * Targets: + * - Select unit(s) to prompt a text popup. + * + * Variable: + * - Get data from which variable to display as a popup? + * + * Digit Grouping: + * - Use digit grouping to separate numbers? + * - Requires VisuMZ_0_CoreEngine! + * + * Text Color: + * - Use #rrggbb for custom colors or regular numbers for text colors from + * the Window Skin. + * + * Flash Color: + * - Adjust the popup's flash color. + * - Format: [red, green, blue, alpha] + * + * Flash Duration: + * - What is the frame duration of the flash effect? + * + * --- + * + * MECH: Wait For Effect + * - Waits for the effects to complete before performing next command. + * + * --- + * + * === Action Sequences - Motion === + * + * These Action Sequences allow you the ability to control the motions of + * sideview sprites. + * + * --- + * + * MOTION: Clear Freeze Frame + * - Clears any freeze frames from the unit(s). + * + * Targets: + * - Select which unit(s) to clear freeze frames for. + * + * --- + * + * MOTION: Freeze Motion Frame + * - Forces a freeze frame instantly at the selected motion. + * - Automatically clears with a new motion. + * + * Targets: + * - Select which unit(s) to freeze motions for. + * + * Motion Type: + * - Freeze this motion for the unit(s). + * + * Frame Index: + * - Which frame do you want to freeze the motion on? + * - Frame index values start at 0. + * + * Show Weapon?: + * - If using 'attack', 'thrust', 'swing', or 'missile', display the + * weapon sprite? + * + * --- + * + * MOTION: Motion Type + * - Causes the unit(s) to play the selected motion. + * + * Targets: + * - Select which unit(s) to perform a motion. + * + * Motion Type: + * - Play this motion for the unit(s). + * + * Show Weapon?: + * - If using 'attack', 'thrust', 'swing', or 'missile', display the + * weapon sprite? + * + * --- + * + * MOTION: Perform Action + * - Causes the unit(s) to play the proper motion based on the current action. + * + * Targets: + * - Select which unit(s) to perform a motion. + * + * --- + * + * MOTION: Refresh Motion + * - Cancels any set motions unit(s) has to do and use their most natural + * motion at the moment. + * + * Targets: + * - Select which unit(s) to refresh their motion state. + * + * --- + * + * MOTION: Wait By Motion Frame + * - Creates a wait equal to the number of motion frames passing. + * - Time is based on Plugin Parameters => Actors => Motion Speed. + * + * Motion Frames to Wait?: + * - Each "frame" is equal to the value found in + * Plugin Parameters => Actors => Motion Speed + * + * --- + * + * === Action Sequences - Movement === + * + * These Action Sequences allow you the ability to control the sprites of + * actors and enemies in battle. + * + * --- + * + * MOVE: Battle Step + * - Causes the unit(s) to move forward past their home position to prepare + * for action. + * + * Targets: + * - Select which unit(s) to move. + * + * Wait For Movement?: + * - Wait for movement to complete before performing next command? + * + * --- + * + * MOVE: Change Home By Distance + * - Change unit(s)'s home position by a distance from their current home + * position(s). + * - Sideview-only! + * + * Targets: + * - Select which unit(s) to change home position(s) for. + * + * Distance Adjustment: + * - Makes adjustments to distance values to determine which direction to + * change by. + * - Normal - No adjustments made + * - Horizontal - Actors adjust left, Enemies adjust right + * - Vertical - Actors adjust Up, Enemies adjust down + * - Both - Applies both Horizontal and Vertical + * + * Distance: X: + * - Horizontal distance to move. + * - You may use JavaScript code. + * + * Distance: Y: + * - Vertical distance to move. + * - You may use JavaScript code. + * + * Duration: + * - Duration in frames for total change amount. + * + * Face Destination?: + * - Turn and face the destination? + * + * Movement Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Movement Motion: + * - Play this motion for the unit(s). + * + * Wait For Movement?: + * - Wait for movement to complete before performing next command? + * + * --- + * + * MOVE: Change Home To Point + * - Change home position(s) to a target point on the screen. + * - Sideview-only! Points based off Graphics.boxWidth/Height. + * + * Targets: + * - Select which unit(s) to change home position(s) for. + * + * Destination Point: + * - Select which point to face. + * - Center + * - Point X, Y + * - Replace 'x' and 'y' with coordinates + * + * Offset Adjustment: + * - Makes adjustments to offset values to determine which direction to + * adjust the destination by. + * + * Offset: X: + * - Horizontal offset to move. + * - You may use JavaScript code. + * + * Offset: Y: + * - Vertical offset to move. + * - You may use JavaScript code. + * + * Duration: + * - Duration in frames for total change amount. + * + * Face Destination?: + * - Turn and face the destination? + * + * Movement Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Movement Motion: + * - Play this motion for the unit(s). + * + * Wait For Movement?: + * - Wait for movement to complete before performing next command? + * + * --- + * + * MOVE: Change Home To Target(s) + * - Moves unit(s) to another unit(s) on the battle field. + * - Sideview-only! + * + * Targets (Moving): + * - Select which unit(s) to change home position(s) for. + * + * Targets (Destination): + * - Select which unit(s) to change home position to. + * + * Target Location: + * - Select which part target group to change home position to. + * - front head + * - front center + * - front base + * - middle head + * - middle center + * - middle base + * - back head + * - back center + * - back base + * + * Melee Distance: + * - The melee distance away from the target location in addition to the + * battler's width. + * + * Offset Adjustment: + * - Makes adjustments to offset values to determine which direction to + * adjust the destination by. + * + * Offset: X: + * - Horizontal offset to move. + * - You may use JavaScript code. + * + * Offset: Y: + * - Vertical offset to move. + * - You may use JavaScript code. + * + * Duration: + * - Duration in frames for total change amount. + * + * Face Destination?: + * - Turn and face the destination? + * + * Movement Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Movement Motion: + * - Play this motion for the unit(s). + * + * Wait For Movement?: + * - Wait for movement to complete before performing next command? + * + * --- + * + * MOVE: Face Direction + * - Causes the unit(s) to face forward or backward. + * - Sideview-only! + * + * Targets: + * - Select which unit(s) to change direction. + * + * Direction: + * - Select which direction to face. + * + * --- + * + * MOVE: Face Point + * - Causes the unit(s) to face a point on the screen. + * - Sideview-only! + * + * Targets: + * - Select which unit(s) to change direction. + * + * Point: + * - Select which point to face. + * - Home + * - Center + * - Point X, Y + * - Replace 'x' and 'y' with coordinates + * + * Face Away From?: + * - Face away from the point instead? + * + * --- + * + * MOVE: Face Target(s) + * - Causes the unit(s) to face other targets on the screen. + * - Sideview-only! + * + * Targets (facing): + * - Select which unit(s) to change direction. + * + * Targets (destination): + * - Select which unit(s) for the turning unit(s) to face. + * + * Face Away From?: + * - Face away from the unit(s) instead? + * + * --- + * + * MOVE: Float + * - Causes the unit(s) to float above the ground. + * - Sideview-only! + * + * Targets: + * - Select which unit(s) to make float. + * + * Desired Height: + * - Vertical distance to float upward. + * - You may use JavaScript code. + * + * Duration: + * - Duration in frames for total float amount. + * + * Float Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Float?: + * - Wait for floating to complete before performing next command? + * + * --- + * + * MOVE: Home Reset + * - Causes the unit(s) to move back to their home position(s) and face back to + * their original direction(s). + * + * Targets: + * - Select which unit(s) to move. + * + * Wait For Movement?: + * - Wait for movement to complete before performing next command? + * + * --- + * + * MOVE: Jump + * - Causes the unit(s) to jump into the air. + * - Sideview-only! + * + * Targets: + * - Select which unit(s) to make jump. + * + * Desired Height: + * - Max jump height to go above the ground + * - You may use JavaScript code. + * + * Duration: + * - Duration in frames for total jump amount. + * + * Wait For Jump?: + * - Wait for jumping to complete before performing next command? + * + * --- + * + * MOVE: Move Distance + * - Moves unit(s) by a distance from their current position(s). + * - Sideview-only! + * + * Targets: + * - Select which unit(s) to move. + * + * Distance Adjustment: + * - Makes adjustments to distance values to determine which direction to + * move unit(s). + * - Normal - No adjustments made + * - Horizontal - Actors adjust left, Enemies adjust right + * - Vertical - Actors adjust Up, Enemies adjust down + * - Both - Applies both Horizontal and Vertical + * + * Distance: X: + * - Horizontal distance to move. + * - You may use JavaScript code. + * + * Distance: Y: + * - Vertical distance to move. + * - You may use JavaScript code. + * + * Duration: + * - Duration in frames for total movement amount. + * + * Face Destination?: + * - Turn and face the destination? + * + * Movement Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Movement Motion: + * - Play this motion for the unit(s). + * + * Wait For Movement?: + * - Wait for movement to complete before performing next command? + * + * --- + * + * MOVE: Move To Point + * - Moves unit(s) to a designated point on the screen. + * - Sideview-only! Points based off Graphics.boxWidth/Height. + * + * Targets: + * - Select which unit(s) to move. + * + * Destination Point: + * - Select which point to face. + * - Home + * - Center + * - Point X, Y + * - Replace 'x' and 'y' with coordinates + * + * Offset Adjustment: + * - Makes adjustments to offset values to determine which direction to + * adjust the destination by. + * + * Offset: X: + * - Horizontal offset to move. + * - You may use JavaScript code. + * + * Offset: Y: + * - Vertical offset to move. + * - You may use JavaScript code. + * + * Duration: + * - Duration in frames for total movement amount. + * + * Face Destination?: + * - Turn and face the destination? + * + * Movement Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Movement Motion: + * - Play this motion for the unit(s). + * + * Wait For Movement?: + * - Wait for movement to complete before performing next command? + * + * --- + * + * MOVE: Move To Target(s) + * - Moves unit(s) to another unit(s) on the battle field. + * - Sideview-only! + * + * Targets (Moving): + * - Select which unit(s) to move. + * + * Targets (Destination): + * - Select which unit(s) to move to. + * + * Target Location: + * - Select which part target group to move to. + * - front head + * - front center + * - front base + * - middle head + * - middle center + * - middle base + * - back head + * - back center + * - back base + * + * Melee Distance: + * - The melee distance away from the target location in addition to the + * battler's width. + * + * Offset Adjustment: + * - Makes adjustments to offset values to determine which direction to + * adjust the destination by. + * + * Offset: X: + * - Horizontal offset to move. + * - You may use JavaScript code. + * + * Offset: Y: + * - Vertical offset to move. + * - You may use JavaScript code. + * + * Duration: + * - Duration in frames for total movement amount. + * + * Face Destination?: + * - Turn and face the destination? + * + * Movement Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Movement Motion: + * - Play this motion for the unit(s). + * + * Wait For Movement?: + * - Wait for movement to complete before performing next command? + * + * --- + * + * MOVE: Opacity + * - Causes the unit(s) to change opacity. + * - Sideview-only! + * + * Targets: + * - Select which unit(s) to change opacity. + * + * Desired Opacity: + * - Change to this opacity value. + * - You may use JavaScript code. + * + * Duration: + * - Duration in frames for opacity change. + * + * Opacity Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Opacity?: + * - Wait for opacity changes to complete before performing next command? + * + * --- + * + * MOVE: Scale/Grow/Shrink + * - Causes the unit(s) to scale, grow, or shrink?. + * - Sideview-only! + * + * Targets: + * - Select which unit(s) to change the scale of. + * + * Scale X: + * Scale Y: + * - What target scale value do you want? + * - 1.0 is normal size. + * + * Duration: + * - Duration in frames to scale for. + * + * Scale Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Scale?: + * - Wait for scaling to complete before performing next command? + * + * --- + * + * MOVE: Skew/Distort + * - Causes the unit(s) to skew. + * - Sideview-only! + * + * Targets: + * - Select which unit(s) to skew. + * + * Skew X: + * Skew Y: + * - What variance to skew? + * - Use small values for the best results. + * + * Duration: + * - Duration in frames to skew for. + * + * Skew Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Skew?: + * - Wait for skew to complete before performing next command? + * + * --- + * + * MOVE: Spin/Rotate + * - Causes the unit(s) to spin. + * - Sideview-only! + * + * Targets: + * - Select which unit(s) to spin. + * + * Angle: + * - How many degrees to spin? + * + * Duration: + * - Duration in frames to spin for. + * + * Spin Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Revert Angle on Finish: + * - Upon finishing the spin, revert the angle back to 0. + * + * Wait For Spin?: + * - Wait for spin to complete before performing next command? + * + * --- + * + * MOVE: Wait For Float + * - Waits for floating to complete before performing next command. + * + * --- + * + * MOVE: Wait For Jump + * - Waits for jumping to complete before performing next command. + * + * --- + * + * MOVE: Wait For Movement + * - Waits for movement to complete before performing next command. + * + * --- + * + * MOVE: Wait For Opacity + * - Waits for opacity changes to complete before performing next command. + * + * --- + * + * MOVE: Wait For Scale + * - Waits for scaling to complete before performing next command. + * + * --- + * + * MOVE: Wait For Skew + * - Waits for skewing to complete before performing next command. + * + * --- + * + * MOVE: Wait For Spin + * - Waits for spinning to complete before performing next command. + * + * --- + * + * === Action Sequences - Projectiles === + * + * Create projectiles on the screen and fire them off at a target. + * Requires VisuMZ_3_ActSeqProjectiles! + * + * --- + * + * PROJECTILE: Animation + * - Create an animation projectile and fire it at a target. + * - Requires VisuMZ_3_ActSeqProjectiles! + * + * Coordinates: + * + * Start Location: + * - Settings to determine where the projectile(s) start from. + * + * Type: + * - Select where the projectile should start from. + * - Target - Start from battler target(s) + * - Point - Start from a point on the screen + * + * Target(s): + * - Select which unit(s) to start the projectile from. + * + * Centralize: + * - Create one projectile at the center of the targets? + * - Or create a projectile for each target? + * + * Target Location: + * - Select which part of the target to send the projectile from. + * - front head + * - front center + * - front base + * - middle head + * - middle center + * - middle base + * - back head + * - back center + * - back base + * + * Point X: + * Point Y: + * - Insert the X/Y coordinate to start the projectile at. + * - You may use JavaScript code. + * + * Offset X: + * Offset Y: + * - Insert how many pixels to offset the X/Y coordinate by. + * - You may use JavaScript code. + * + * Goal Location: + * - Settings to determine where the projectile(s) start from. + * + * Type: + * - Select where the projectile should go to. + * - Target - Goal is battler target(s) + * - Point - Goal is a point on the screen + * + * Target(s): + * - Select which unit(s) for projectile to go to. + * + * Centralize: + * - Create one projectile at the center of the targets? + * - Or create a projectile for each target? + * + * Target Location: + * - Select which part of the target to send the projectile to. + * - front head + * - front center + * - front base + * - middle head + * - middle center + * - middle base + * - back head + * - back center + * - back base + * + * Point X: + * Point Y: + * - Insert the X/Y coordinate to send the projectile to. + * - You may use JavaScript code. + * + * Offset X: + * Offset Y: + * - Insert how many pixels to offset the X/Y coordinate by. + * - You may use JavaScript code. + * + * Settings: + * + * Animation ID: + * - Determine which animation to use as a projectile. + * + * Duration: + * - Duration for the projectile(s) to travel. + * + * Wait For Projectile?: + * - Wait for projectile(s) to reach their destination before going onto + * the next command? + * + * Wait For Animation?: + * - Wait for animation to finish before going to the next command? + * + * Extra Settings: + * - Add extra settings to the projectile? + * + * Auto Angle?: + * - Automatically angle the projectile to tilt the direction + * it's moving? + * + * Angle Offset: + * - Alter the projectile's tilt by this many degrees. + * + * Arc Peak: + * - This is the height of the project's trajectory arc in pixels. + * + * Easing: + * - Select which easing type to apply to the projectile's trajectory. + * + * Spin Speed: + * - Determine how much angle the projectile spins per frame. + * - Does not work well with "Auto Angle". + * + * --- + * + * PROJECTILE: Icon + * - Create an icon projectile and fire it at a target. + * - Requires VisuMZ_3_ActSeqProjectiles! + * + * Coordinates: + * + * Start Location: + * - Settings to determine where the projectile(s) start from. + * + * Type: + * - Select where the projectile should start from. + * - Target - Start from battler target(s) + * - Point - Start from a point on the screen + * + * Target(s): + * - Select which unit(s) to start the projectile from. + * + * Centralize: + * - Create one projectile at the center of the targets? + * - Or create a projectile for each target? + * + * Target Location: + * - Select which part of the target to send the projectile from. + * - front head + * - front center + * - front base + * - middle head + * - middle center + * - middle base + * - back head + * - back center + * - back base + * + * Point X: + * Point Y: + * - Insert the X/Y coordinate to start the projectile at. + * - You may use JavaScript code. + * + * Offset X: + * Offset Y: + * - Insert how many pixels to offset the X/Y coordinate by. + * - You may use JavaScript code. + * + * Goal Location: + * - Settings to determine where the projectile(s) start from. + * + * Type: + * - Select where the projectile should go to. + * - Target - Goal is battler target(s) + * - Point - Goal is a point on the screen + * + * Target(s): + * - Select which unit(s) for projectile to go to. + * + * Centralize: + * - Create one projectile at the center of the targets? + * - Or create a projectile for each target? + * + * Target Location: + * - Select which part of the target to send the projectile to. + * - front head + * - front center + * - front base + * - middle head + * - middle center + * - middle base + * - back head + * - back center + * - back base + * + * Point X: + * Point Y: + * - Insert the X/Y coordinate to send the projectile to. + * - You may use JavaScript code. + * + * Offset X: + * Offset Y: + * - Insert how many pixels to offset the X/Y coordinate by. + * - You may use JavaScript code. + * + * Settings: + * + * Icon: + * - Determine which icon to use as a projectile. + * - You may use JavaScript code. + * + * Duration: + * - Duration for the projectile(s) to travel. + * + * Wait For Projectile?: + * - Wait for projectile(s) to reach their destination before going onto + * the next command? + * + * Extra Settings: + * - Add extra settings to the projectile? + * + * Auto Angle?: + * - Automatically angle the projectile to tilt the direction + * it's moving? + * + * Angle Offset: + * - Alter the projectile's tilt by this many degrees. + * + * Arc Peak: + * - This is the height of the project's trajectory arc in pixels. + * + * Blend Mode: + * - What kind of blend mode do you wish to apply to the projectile? + * - Normal + * - Additive + * - Multiply + * - Screen + * + * Easing: + * - Select which easing type to apply to the projectile's trajectory. + * + * Hue: + * - Adjust the hue of the projectile. + * - Insert a number between 0 and 360. + * + * Scale: + * - Adjust the size scaling of the projectile. + * - Use decimals for exact control. + * + * Spin Speed: + * - Determine how much angle the projectile spins per frame. + * - Does not work well with "Auto Angle". + * + * --- + * + * PROJECTILE: Picture + * - Create a picture projectile and fire it at a target. + * - Requires VisuMZ_3_ActSeqProjectiles! + * + * Coordinates: + * + * Start Location: + * - Settings to determine where the projectile(s) start from. + * + * Type: + * - Select where the projectile should start from. + * - Target - Start from battler target(s) + * - Point - Start from a point on the screen + * + * Target(s): + * - Select which unit(s) to start the projectile from. + * + * Centralize: + * - Create one projectile at the center of the targets? + * - Or create a projectile for each target? + * + * Target Location: + * - Select which part of the target to send the projectile from. + * - front head + * - front center + * - front base + * - middle head + * - middle center + * - middle base + * - back head + * - back center + * - back base + * + * Point X: + * Point Y: + * - Insert the X/Y coordinate to start the projectile at. + * - You may use JavaScript code. + * + * Offset X: + * Offset Y: + * - Insert how many pixels to offset the X/Y coordinate by. + * - You may use JavaScript code. + * + * Goal Location: + * - Settings to determine where the projectile(s) start from. + * + * Type: + * - Select where the projectile should go to. + * - Target - Goal is battler target(s) + * - Point - Goal is a point on the screen + * + * Target(s): + * - Select which unit(s) for projectile to go to. + * + * Centralize: + * - Create one projectile at the center of the targets? + * - Or create a projectile for each target? + * + * Target Location: + * - Select which part of the target to send the projectile to. + * - front head + * - front center + * - front base + * - middle head + * - middle center + * - middle base + * - back head + * - back center + * - back base + * + * Point X: + * Point Y: + * - Insert the X/Y coordinate to send the projectile to. + * - You may use JavaScript code. + * + * Offset X: + * Offset Y: + * - Insert how many pixels to offset the X/Y coordinate by. + * - You may use JavaScript code. + * + * Settings: + * + * Picture Filename: + * - Determine which picture to use as a projectile. + * + * Duration: + * - Duration for the projectile(s) to travel. + * + * Wait For Projectile?: + * - Wait for projectile(s) to reach their destination before going onto + * the next command? + * + * Extra Settings: + * - Add extra settings to the projectile? + * + * Auto Angle?: + * - Automatically angle the projectile to tilt the direction + * it's moving? + * + * Angle Offset: + * - Alter the projectile's tilt by this many degrees. + * + * Arc Peak: + * - This is the height of the project's trajectory arc in pixels. + * + * Blend Mode: + * - What kind of blend mode do you wish to apply to the projectile? + * - Normal + * - Additive + * - Multiply + * - Screen + * + * Easing: + * - Select which easing type to apply to the projectile's trajectory. + * + * Hue: + * - Adjust the hue of the projectile. + * - Insert a number between 0 and 360. + * + * Scale: + * - Adjust the size scaling of the projectile. + * - Use decimals for exact control. + * + * Spin Speed: + * - Determine how much angle the projectile spins per frame. + * - Does not work well with "Auto Angle". + * + * --- + * + * === Action Sequences - Skew === + * + * These action sequences allow you to have control over the camera skew. + * Requires VisuMZ_3_ActSeqCamera! + * + * --- + * + * SKEW: Change Skew + * - Changes the camera skew. + * - Requires VisuMZ_3_ActSeqCamera! + * + * Skew X: + * - Change the camera skew X to this value. + * + * Skew Y: + * - Change the camera skew Y to this value. + * + * Duration: + * - Duration in frames to change camera skew. + * + * Skew Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Skew?: + * - Wait for skew changes to complete before performing next command? + * + * --- + * + * SKEW: Reset Skew + * - Reset any skew settings. + * - Requires VisuMZ_3_ActSeqCamera! + * + * Duration: + * - Duration in frames to reset camera skew. + * + * Skew Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Skew?: + * - Wait for skew changes to complete before performing next command? + * + * --- + * + * SKEW: Wait For Skew + * - Waits for skew changes to complete before performing next command. + * - Requires VisuMZ_3_ActSeqCamera! + * + * --- + * + * === Action Sequences - Target === + * + * If using a manual target by target Action Sequence, these commands will give + * you full control over its usage. + * + * --- + * + * TARGET: Current Index + * - Sets the current index to this value. + * - Then decide to jump to a label (optional). + * + * Set Index To: + * - Sets current targeting index to this value. + * - 0 is the starting index of a target group. + * + * Jump To Label: + * - If a target is found after the index change, jump to this label in the + * Common Event. + * + * --- + * + * TARGET: Next Target + * - Moves index forward by 1 to select a new current target. + * - Then decide to jump to a label (optional). + * + * Jump To Label: + * - If a target is found after the index change, jump to this label in the + * Common Event. + * + * --- + * + * TARGET: Previous Target + * - Moves index backward by 1 to select a new current target. + * - Then decide to jump to a label (optional). + * + * Jump To Label: + * - If a target is found after the index change, jump to this label in the + * Common Event. + * + * --- + * + * TARGET: Random Target + * - Sets index randomly to determine new currernt target. + * - Then decide to jump to a label (optional). + * + * Force Random?: + * - Index cannot be its previous index amount after random. + * + * Jump To Label: + * - If a target is found after the index change, jump to this label in the + * Common Event. + * + * --- + * + * === Action Sequences - Weapon === + * + * Allows for finer control over Dual/Multi Wielding actors. + * Only works for Actors. + * + * --- + * + * WEAPON: Clear Weapon Slot + * - Clears the active weapon slot (making others valid again). + * - Only works for Actors. + * + * Targets: + * - Select unit(s) to clear the active weapon slot for. + * + * --- + * + * WEAPON: Next Weapon Slot + * - Goes to next active weapon slot (making others invalid). + * - If next slot is weaponless, don't label jump. + * + * Targets: + * - Select unit(s) to change the next active weapon slot for. + * + * --- + * + * WEAPON: Set Weapon Slot + * - Sets the active weapon slot (making others invalid). + * - Only works for Actors. + * + * Targets: + * - Select unit(s) to change the active weapon slot for. + * + * Weapon Slot ID: + * - Select weapon slot to make active (making others invalid). + * - Use 0 to clear and normalize. You may use JavaScript code. + * + * --- + * + * === Action Sequences - Zoom === + * + * These Action Sequences are zoom-related. + * Requires VisuMZ_3_ActSeqCamera! + * + * --- + * + * ZOOM: Change Scale + * - Changes the zoom scale. + * - Requires VisuMZ_3_ActSeqCamera! + * + * Scale: + * - The zoom scale to change to. + * + * Duration: + * - Duration in frames to reset battle zoom. + * + * Zoom Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Zoom? + * - Wait for zoom changes to complete before performing next command? + * + * --- + * + * ZOOM: Reset Zoom + * - Reset any zoom settings. + * - Requires VisuMZ_3_ActSeqCamera! + * + * Duration: + * - Duration in frames to reset battle zoom. + * + * Zoom Easing: + * - Select which easing type you wish to apply. + * - Requires VisuMZ_0_CoreEngine. + * + * Wait For Zoom? + * - Wait for zoom changes to complete before performing next command? + * + * --- + * + * ZOOM: Wait For Zoom + * - Waits for zoom changes to complete before performing next command. + * Requires VisuMZ_3_ActSeqCamera! + * + * --- + * + * ============================================================================ + * Plugin Parameters: Auto Battle Settings + * ============================================================================ + * + * These Plugin Parameter settings allow you to change the aspects added by + * this plugin that support Auto Battle and the Auto Battle commands. + * + * Auto Battle commands can be added to the Party Command Window and/or Actor + * Command Window. The one used by the Party Command Window will cause the + * whole party to enter an Auto Battle state until stopped by a button input. + * The command used by the Actor Command Window, however, will cause the actor + * to select an action based off the Auto Battle A.I. once for the current turn + * instead. + * + * --- + * + * Battle Display + * + * Message: + * - Message that's displayed when Auto Battle is on. + * Text codes allowed. %1 - OK button, %2 - Cancel button + * + * OK Button: + * - Text used to represent the OK button. + * - If VisuMZ_0_CoreEngine is present, ignore this. + * + * Cancel Button: + * - Text used to represent the Cancel button. + * - If VisuMZ_0_CoreEngine is present, ignore this. + * + * Background Type: + * - Select background type for Auto Battle window. + * - 0 - Window + * - 1 - Dim + * - 2 - Transparent + * + * JS: X, Y, W, H: + * - Code used to determine the dimensions for this window. + * + * --- + * + * Options + * + * Add Option?: + * - Add the Auto Battle options to the Options menu? + * + * Adjust Window Height: + * - Automatically adjust the options window height? + * + * Startup Name: + * - Command name of the option. + * + * Style Name: + * - Command name of the option. + * + * OFF: + * - Text displayed when Auto Battle Style is OFF. + * + * ON: + * - Text displayed when Auto Battle Style is ON. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Damage Settings + * ============================================================================ + * + * These Plugin Parameters add a variety of things to how damage is handled in + * battle. These range from hard damage caps to soft damage caps to how damage + * popups appear, how the formulas for various aspects are handled and more. + * + * Damage Styles are also a feature added through this plugin. More information + * can be found in the help section above labeled 'Damage Styles'. + * + * --- + * + * Damage Styles + * + * Default Style: + * - Which Damage Style do you want to set as default? + * - Use 'Manual' to not use any styles at all. + * - The 'Manual' style will not support <Armor Penetration> notetags. + * - The 'Manual' style will not support <Armor Reduction> notetags. + * + * Style List: + * - A list of the damage styles available. + * - These are used to calculate base damage. + * + * Name: + * - Name of this Damage Style. + * -Used for notetags and such. + * + * JS: Formula: + * - The base formula for this Damage Style. + * + * Items & Equips Core: + * + * HP Damage: + * MP Damage: + * HP Recovery: + * MP Recovery: + * HP Drain: + * MP Drain: + * - Vocabulary used for this data entry. + * + * JS: Damage Display: + * - Code used the data displayed for this category. + * + * --- + * + * Damage Cap + * + * Enable Damage Cap?: + * - Put a maximum hard damage cap on how far damage can go? + * - This can be broken through the usage of notetags. + * + * Default Hard Cap: + * - The default hard damage cap used before applying damage. + * + * Enable Soft Cap?: + * - Soft caps ease in the damage values leading up to the hard damage cap. + * - Requires hard Damage Cap enabled. + * + * Base Soft Cap Rate: + * - The default soft damage cap used before applying damage. + * + * Soft Scale Constant: + * - The default soft damage cap used before applying damage. + * + * --- + * + * Popups + * + * Popup Duration: + * - Adjusts how many frames a popup stays visible. + * + * Newest Popups Bottom: + * - Puts the newest popups at the bottom. + * + * Offset X: + * Offset Y: + * - Sets how much to offset the sprites by horizontally/vertically. + * + * Shift X: + * Shift Y: + * - Sets how much to shift the sprites by horizontally/vertically. + * + * Shift Y: + * + * Critical Flash Color: + * - Adjust the popup's flash color. + * - Format: [red, green, blue, alpha] + * + * Critical Duration: + * - Adjusts how many frames a the flash lasts. + * + * --- + * + * Formulas + * + * JS: Overall Formula: + * - The overall formula used when calculating damage. + * + * JS: Variance Formula: + * - The formula used when damage variance. + * + * JS: Guard Formula: + * - The formula used when damage is guarded. + * + * --- + * + * Critical Hits + * + * JS: Rate Formula: + * - The formula used to calculate Critical Hit Rates. + * + * JS: Damage Formula: + * - The formula used to calculate Critical Hit Damage modification. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Mechanics Settings + * ============================================================================ + * + * Some of the base settings for the various mechanics found in the battle + * system can be altered here in these Plugin Parameters. Most of these will + * involve JavaScript code and require you to have to good understanding of + * how the RPG Maker MZ code works before tampering with it. + * + * --- + * + * Action Speed + * + * Allow Random Speed?: + * - Allow speed to be randomized base off the user's AGI? + * + * JS: Calculate: + * - Code used to calculate action speed. + * + * --- + * + * Base Troop + * + * Base Troop ID's: + * - Select the Troop ID(s) to duplicate page events from for all + * other troops. + * - More information can be found in the dedicated Help section above. + * + * --- + * + * Common Events (on Map) + * + * Pre-Battle Event: + * Post-Battle Event: + * Victory Event: + * Defeat Event: + * Escape Success Event: + * Escape Fail Event: + * - Queued Common Event to run upon meeting the condition. + * - Use to 0 to not run any Common Event at all. + * - "Post-Battle Event" will always run regardless. + * - If any events are running before the battle, they will continue running + * to the end first before the queued Common Events will run. + * - These common events only run on the map scene. They're not meant to run + * in the battle scene. + * - If the "Defeat Event" has a common event attached to it, then random + * encounters will be changed to allow defeat without being sent to the + * Game Over scene. Instead, the game will send the player to the map scene + * where the Defeat Event will run. + * + * --- + * + * Escape + * + * JS: Calc Escape Ratio: + * - Code used to calculate the escape success ratio. + * + * JS: Calc Escape Raise: + * - Code used to calculate how much the escape success ratio raises upon + * each failure. + * + * --- + * + * Switches + * + * Switch: Critical: + * - Turns switch ON if the action performs a critical hit. + * - Switch reverts to OFF whenever an action starts. + * - If multiple targets/hits are struck, as long as one hit lands a critical + * hit, then the switch will remain ON for the rest of the action. + * + * Switch: Miss/Evade: + * - Turns switch ON if the action misses/is evaded. + * - Switch reverts to OFF whenever an action starts. + * - If multiple targets/hits are struck, as long as one hit fails to land, + * then the switch will remain ON for the rest of the action. + * + * --- + * + * Variables + * + * Variable: Damage: + * - Variable records target damage during action. + * - Variable reverts to 0 whenever an action starts. + * - If multiple targets/hits are struck, the variable will record the total + * amount of damage done for the remainder of the action (unless manually + * reseting to 0 during an Action Sequence). + * + * Variable: Healing: + * - Variable records target healing during action. + * - Variable reverts to 0 whenever an action starts. + * - If multiple targets/hits are struck, the variable will record the total + * amount of healing done for the remainder of the action (unless manually + * reseting to 0 during an Action Sequence). + * + * --- + * + * JS: Battle-Related + * + * JS: Pre-Start Battle: + * - Target function: BattleManager.startBattle() + * - JavaScript code occurs before function is run. + * + * JS: Post-Start Battle: + * - Target function: BattleManager.startBattle() + * - JavaScript code occurs after function is run. + * + * JS: Battle Victory: + * - Target function: BattleManager.processVictory() + * - JavaScript code occurs before function is run. + * + * JS: Escape Success: + * - Target function: BattleManager.onEscapeSuccess() + * - JavaScript code occurs before function is run. + * + * JS: Escape Failure: + * - Target function: BattleManager.onEscapeFailure() + * - JavaScript code occurs before function is run. + * + * JS: Battle Defeat: + * - Target function: BattleManager.processDefeat() + * - JavaScript code occurs before function is run. + * + * JS: Pre-End Battle: + * - Target function: BattleManager.endBattle() + * - JavaScript code occurs before function is run. + * + * JS: Post-End Battle: + * - Target function: BattleManager.endBattle() + * - JavaScript code occurs after function is run. + * + * --- + * + * JS: Turn-Related + * + * JS: Pre-Start Turn: + * - Target function: BattleManager.startTurn() + * - JavaScript code occurs before function is run. + * + * JS: Post-Start Turn: + * - Target function: BattleManager.startTurn() + * - JavaScript code occurs after function is run. + * + * JS: Pre-End Turn: + * - Target function: Game_Battler.prototype.onTurnEnd() + * - JavaScript code occurs before function is run. + * + * JS: Post-End Turn: + * - Target function: Game_Battler.prototype.onTurnEnd() + * - JavaScript code occurs after function is run. + * + * JS: Pre-Regenerate: + * - Target function: Game_Battler.prototype.regenerateAll() + * - JavaScript code occurs before function is run. + * + * JS: Post-Regenerate: + * - Target function: Game_Battler.prototype.regenerateAll() + * - JavaScript code occurs after function is run. + * + * --- + * + * JS: Action-Related + * + * JS: Pre-Start Action: + * - Target function: BattleManager.startAction() + * - JavaScript code occurs before function is run. + * + * JS: Post-Start Action: + * - Target function: BattleManager.startAction() + * - JavaScript code occurs after function is run. + * + * JS: Pre-Apply: + * - Target function: Game_Action.prototype.apply() + * - JavaScript code occurs before function is run. + * + * JS: Pre-Damage: + * - Target function: Game_Action.prototype.executeDamage() + * - JavaScript code occurs before function is run. + * + * JS: Post-Damage: + * - Target function: Game_Action.prototype.executeDamage() + * - JavaScript code occurs after function is run. + * + * JS: Post-Apply: + * - Target function: Game_Action.prototype.apply() + * - JavaScript code occurs after function is run. + * + * JS: Pre-End Action: + * - Target function: BattleManager.endAction() + * - JavaScript code occurs before function is run. + * + * JS: Post-End Action: + * - DescriTarget function: BattleManager.endAction() + * - JavaScript code occurs after function is run. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Battle Layout Settings + * ============================================================================ + * + * The Battle Layout Settings Plugin Parameter gives you control over the look, + * style, and appearance of certain UI elements. These range from the way the + * Battle Status Window presents its information to the way certain windows + * like the Party Command Window and Actor Command Window appear. + * + * --- + * + * Battle Layout Style + * - The style used for the battle layout. + * + * Default: + * - Shows actor faces in Battle Status. + * + * List: + * - Lists actors in Battle Status. + * + * XP: + * - Shows actor battlers in a stretched Battle Status. + * + * Portrait: + * - Shows portraits in a stretched Battle Status. + * + * Border: + * - Displays windows around the screen border. + * + * --- + * + * List Style + * + * Show Faces: + * - Shows faces in List Style? + * + * Command Window Width: + * - Determine the window width for the Party and Actor Command Windows. + * - Affects Default and List Battle Layout styles. + * + * --- + * + * XP Style + * + * Command Lines: + * - Number of action lines in the Actor Command Window for the XP Style. + * + * Sprite Height: + * - Default sprite height used when if the sprite's height has not been + * determined yet. + * + * Sprite Base Location: + * - Determine where the sprite is located on the Battle Status Window. + * - Above Name - Sprite is located above the name. + * - Bottom - Sprite is located at the bottom of the window. + * - Centered - Sprite is centered in the window. + * - Top - Sprite is located at the top of the window. + * + * --- + * + * Portrait Style + * + * Show Portraits?: + * - Requires VisuMZ_1_MainMenuCore. + * - Shows the actor's portrait instead of a face. + * + * Portrait Scaling: + * - If portraits are used, scale them by this much. + * + * --- + * + * Border Style + * + * Columns: + * - The total number of columns for Skill & Item Windows in the battle scene + * + * Show Portraits?: + * - Requires VisuMZ_1_MainMenuCore. + * - Shows the actor's portrait at the edge of the screen. + * + * Portrait Scaling: + * - If portraits are used, scale them by this much. + * + * --- + * + * Skill & Item Windows + * + * Middle Layout: + * - Shows the Skill & Item Windows in mid-screen? + * + * Columns: + * - The total number of columns for Skill & Item Windows in the battle scene + * + * --- + * + * Status Window Elements + * + * Battler Name: + * Gauge 1 (HP): + * Gauge 2 (MP): + * Gauge 3 (TP): + * State Icon: + * TPB/ATB Gauge: + * + * Offset: X/Y: + * - Offset this Battle Status Window element's X/Y. + * - For X: Negative goes left. Positive goes right. + * - For Y: Negative goes up. Positive goes down. + * + * Window Skin: + * + * Filename: + * - Filename used for the Battle Status Window skin. + * - Leave this empty to use the default window skin. + * + * Hide Window Skin?: + * - Hide the window skin for the Battle Status Window? + * + * Selectable Background: + * + * Hide Selectable BG?: + * - Show/Hide the selectable background box for the Battle Status Window? + * + * Attachments: + * + * Back Attachment: + * + * Filename: + * - Filename used for an image to attach to the back of the Battle + * Status Window. Leave empty for none. + * + * Offset: X/Y: + * - Offset this Battle Status Window element's X/Y. + * - For X: Negative goes left. Positive goes right. + * - For Y: Negative goes up. Positive goes down. + * + * Front Attachment: + * + * Filename: + * - Filename used for an image to attach to the front of the Battle + * Status Window. Leave empty for none. + * + * --- + * + * UI Elements + * + * Anti-Tint UI? + * - Prevent UI Elements from being tinted? + * - This prevents UI Elements such as HP Gauges, Enemy Names, Battle Cursor, + * and Weakness Display from being affected by screen tint. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Battle Log Settings + * ============================================================================ + * + * These Plugin Parameters give you control over how the Battle Log Window, the + * window shown at the top of the screen in the battle layout, appears, its + * various properties, and which text will be displayed. + * + * The majority of the text has been disabled by default with this plugin to + * make the flow of battle progress faster. + * + * --- + * + * General + * + * Back Color: + * - Use #rrggbb for a hex color. + * + * Max Lines: + * - Maximum number of lines to be displayed. + * + * Message Wait: + * - Number of frames for a usual message wait. + * + * Text Align: + * - Text alignment for the Window_BattleLog. + * + * JS: X, Y, W, H: + * - Code used to determine the dimensions for the battle log. + * + * --- + * + * Start Turn + * + * Show Start Turn?: + * - Display turn changes at the start of the turn? + * + * Start Turn Message: + * - Message displayed at turn start. + * - %1 - Turn Count + * + * Start Turn Wait: + * - Number of frames to wait after a turn started. + * + * --- + * + * Display Action + * + * Show Centered Action?: + * - Display a centered text of the action name? + * + * Show Skill Message 1?: + * - Display the 1st skill message? + * + * Show Skill Message 2?: + * - Display the 2nd skill message? + * + * Show Item Message?: + * - Display the item use message? + * + * --- + * + * Action Changes + * + * Show Counter?: + * - Display counter text? + * + * Show Reflect?: + * - Display magic reflection text? + * + * Show Substitute?: + * - Display substitute text? + * + * --- + * + * Action Results + * + * Show No Effect?: + * - Display no effect text? + * + * Show Critical?: + * - Display critical text? + * + * Show Miss/Evasion?: + * - Display miss/evasion text? + * + * Show HP Damage?: + * - Display HP Damage text? + * + * Show MP Damage?: + * - Display MP Damage text? + * + * Show TP Damage?: + * - Display TP Damage text? + * + * --- + * + * Display States + * + * Show Added States?: + * - Display added states text? + * + * Show Removed States?: + * - Display removed states text? + * + * Show Current States?: + * - Display the currently affected state text? + * + * Show Added Buffs?: + * - Display added buffs text? + * + * Show Added Debuffs?: + * - Display added debuffs text? + * + * Show Removed Buffs?: + * - Display removed de/buffs text? + * + * --- + * + * ============================================================================ + * Plugin Parameters: Battleback Scaling Settings + * ============================================================================ + * + * By default, the battlebacks in RPG Maker MZ scale as if the screen size is + * a static 816x624 resolution, which isn't always the case. These settings + * here allow you to dictate how you want the battlebacks to scale for the + * whole game. These settings CANNOT be changed midgame or per battle. + * + * --- + * + * Settings + * + * Default Style: + * - The default scaling style used for battlebacks. + * - MZ (MZ's default style) + * - 1:1 (No Scaling) + * - Scale To Fit (Scale to screen size) + * - Scale Down (Scale Downward if Larger than Screen) + * - Scale Up (Scale Upward if Smaller than Screen) + * + * JS: 1:1: + * JS: Scale To Fit: + * JS: Scale Down: + * JS: Scale Up: + * JS: 1:1: + * JS: 1:1: + * - This code gives you control over the scaling for this style. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Party Command Window + * ============================================================================ + * + * These Plugin Parameters allow you control over how the Party Command Window + * operates in the battle scene. You can turn disable it from appearing or make + * it so that it doesn't + * + * --- + * + * Command Window + * + * Style: + * - How do you wish to draw commands in the Party Command Window? + * - Text Only: Display only the text. + * - Icon Only: Display only the icon. + * - Icon + Text: Display the icon first, then the text. + * - Auto: Determine which is better to use based on the size of the cell. + * + * Text Align: + * - Text alignment for the Party Command Window. + * + * Fight Icon: + * - The icon used for the Fight command. + * + * Add Auto Battle?: + * - Add the "Auto Battle" command to the Command Window? + * + * Auto Battle Icon: + * - The icon used for the Auto Battle command. + * + * Auto Battle Text: + * - The text used for the Auto Battle command. + * + * Add Options?: + * - Add the "Options" command to the Command Window? + * + * Options Icon: + * - The icon used for the Options command. + * + * Active TPB Message: + * - Message that will be displayed when selecting options during the + * middle of an action. + * + * Escape Icon: + * - The icon used for the Escape command. + * + * --- + * + * Access + * + * Skip Party Command: + * - DTB: Skip Party Command selection on turn start. + * - TPB: Skip Party Command selection at battle start. + * + * Disable Party Command: + * - Disable the Party Command Window entirely? + * + * --- + * + * Help Window + * + * Fight: + * - Text displayed when selecting a skill type. + * - %1 - Skill Type Name + * + * Auto Battle: + * - Text displayed when selecting the Auto Battle command. + * + * Options: + * - Text displayed when selecting the Options command. + * + * Escape: + * - Text displayed when selecting the escape command. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Actor Command Window + * ============================================================================ + * + * These Plugin Parameters allow you to change various aspects regarding the + * Actor Command Window and how it operates in the battle scene. This ranges + * from how it appears to the default battle commands given to all players + * without a custom <Battle Commands> notetag. + * + * --- + * + * Command Window + * + * Style: + * - How do you wish to draw commands in the Actor Command Window? + * - Text Only: Display only the text. + * - Icon Only: Display only the icon. + * - Icon + Text: Display the icon first, then the text. + * - Auto: Determine which is better to use based on the size of the cell. + * + * Text Align: + * - Text alignment for the Actor Command Window. + * + * Item Icon: + * - The icon used for the Item command. + * + * Normal SType Icon: + * - Icon used for normal skill types that aren't assigned any icons. + * - Ignore if VisuMZ_1_SkillsStatesCore is installed. + * + * Magic SType Icon: + * - Icon used for magic skill types that aren't assigned any icons. + * - Ignore if VisuMZ_1_SkillsStatesCore is installed. + * + * --- + * + * Battle Commands + * + * Command List: + * - List of battle commands that appear by default if the <Battle Commands> + * notetag isn't present. + * + * - Attack + * - Adds the basic attack command. + * + * - Skills + * - Displays all the skill types available to the actor. + * + * - SType: x + * - Stype: name + * - Adds in a specific skill type. + * - Replace 'x' with the ID of the skill type. + * - Replace 'name' with the name of the skill type (without text codes). + * + * - All Skills + * - Adds all usable battle skills as individual actions. + * + * - Skill: x + * - Skill: name + * - Adds in a specific skill as a usable action. + * - Replace 'x' with the ID of the skill. + * - Replace 'name' with the name of the skill. + * + * - Guard + * - Adds the basic guard command. + * + * - Item + * - Adds the basic item command. + * + * - Escape + * - Adds the escape command. + * + * - Auto Battle + * - Adds the auto battle command. + * + * - Party + * - Requires VisuMZ_2_PartySystem! + * - Switches out the current actor for another. + * + * - Combat Log + * - Requires VisuMZ_4_CombatLog! + * - Shows combat log. + * + * - Talk + * - Requires VisuMZ_3_BattleCmdTalk! + * - Shows talk command if applicable. + * + * - Weapon Swap + * - Requires VisuMZ_2_WeaponSwapSystem! + * - Swaps current weapon for next one. + * + * Show Command Costs: + * - If a battle command has a resource cost, show it? + * + * --- + * + * Help Window + * + * Skill Types: + * - Text displayed when selecting a skill type. + * - %1 - Skill Type Name + * + * Items: + * - Text displayed when selecting the item command. + * + * Escape: + * - Text displayed when selecting the escape command. + * + * Auto Battle: + * - Text displayed when selecting the Auto Battle command. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Actor Battler Settings + * ============================================================================ + * + * These Plugin Parameter settings adjust how the sideview battlers behave for + * the actor sprites. Some of these settings are shared with enemies if they + * use sideview battler graphics. + * + * --- + * + * Flinch + * + * Flinch Distance X: + * - The normal X distance when flinching. + * + * Flinch Distance Y: + * - The normal Y distance when flinching. + * + * Flinch Duration: + * - The number of frames for a flinch to complete. + * + * --- + * + * Sideview Battlers + * + * Anchor: X: + * - Default X anchor for Sideview Battlers. + * + * Anchor: Y: + * - Default Y anchor for Sideview Battlers. + * + * Chant Style: + * - What determines the chant motion? + * - Hit type or skill type? + * + * Offset X: + * - Offsets X position where actor is positioned. + * - Negative values go left. Positive values go right. + * + * Offset Y: + * - Offsets Y position where actor is positioned. + * - Negative values go up. Positive values go down. + * + * Motion Speed: + * - The number of frames in between each motion. + * + * Priority: Active: + * - Place the active actor on top of actor and enemy sprites. + * + * Priority: Actors: + * - Prioritize actors over enemies when placing sprites on top of each other + * + * Shadow Visible: + * - Show or hide the shadow for Sideview Battlers. + * + * Smooth Image: + * - Smooth out the battler images or pixelate them? + * + * JS: Home Position: + * - Code used to calculate the home position of actors. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Enemy Battler Settings + * ============================================================================ + * + * These Plugin Parameter settings adjust how enemies appear visually in the + * battle scene. Some of these settings will override the settings used for + * actors if used as sideview battlers. Other settings include changing up the + * default attack animation for enemies, how the enemy select window functions, + * and more. + * + * --- + * + * Visual + * + * Attack Animation: + * - Default attack animation used for enemies. + * - Use <Attack Animation: x> for custom animations. + * + * Emerge Text: + * - Show or hide the 'Enemy emerges!' text at the start of battle. + * + * Offset X: + * - Offsets X position where enemy is positioned. + * - Negative values go left. Positive values go right. + * + * Offset Y: + * - Offsets Y position where enemy is positioned. + * - Negative values go up. Positive values go down. + * + * Smooth Image: + * - Smooth out the battler images or pixelate them? + * + * --- + * + * Select Window + * + * Any: Last Selected: + * - Prioritize last selected enemy over front view or sideview settings? + * + * FV: Right Priority: + * - If using frontview, auto select the enemy furthest right. + * + * SV: Right Priority: + * - If using sideview, auto select the enemy furthest right. + * + * --- + * + * Name: + * + * Legacy Option: + * - Use the legacy version (window) or new version (sprite). + * - WARNING: Legacy version is no longer supported for bugs. + * - Not all settings available here in the Plugin Parameters will be + * available to the legacy version (ie Always Visible and Attach States). + * + * Font Size: + * - Font size used for enemy names. + * + * Name Position: + * + * Offset X: + * Offset Y: + * - Offset the enemy name's position by this much. + * - For X: Negative goes left. Positive goes right. + * - For Y: Negative goes up. Positive goes down. + * + * Name: Attach States: + * - Attach the enemy's state icon to the enemy name? + * + * Attach: Offset X: + * Attach: Offset Y: + * - How much to offset the attached icon's X/Y position by? + * - For X: Negative goes left. Positive goes right. + * - For Y: Negative goes up. Positive goes down. + * + * Name Visibility: + * + * Always Hidden: + * - Determines if the enemy name will always be visible. + * - Highest priority. + * + * Always Visible: + * - Determines if the enemy name will always be visible. + * - Medium priority. + * + * By Selection?: + * - Determines the conditions for enemy name visibility. + * - Lowest priority. + * + * --- + * + * Sideview Battlers + * + * Allow Collapse: + * - Causes defeated enemies with SV Battler graphics to "fade away" + * when defeated? + * + * Anchor: X: + * - Default X anchor for Sideview Battlers. + * - Use values between 0 and 1 to be safe. + * + * Anchor: Y: + * - Default Y anchor for Sideview Battlers. + * - Use values between 0 and 1 to be safe. + * + * Motion: Idle: + * - Sets default idle animation used by Sideview Battlers. + * + * Shadow Visible: + * - Show or hide the shadow for Sideview Battlers. + * + * Size: Width: + * - Default width for enemies that use Sideview Battlers. + * + * Size: Height: + * - Default height for enemies that use Sideview Battlers. + * + * Weapon Type: + * - Sets default weapon type used by Sideview Battlers. + * - Use 0 for Bare Hands. + * + * --- + * + * ============================================================================ + * Plugin Parameters: HP Gauge Settings + * ============================================================================ + * + * Settings that adjust the visual HP Gauge displayed in battle. + * + * --- + * + * Show Gauges For + * + * Actors: + * - Show HP Gauges over the actor sprites' heads? + * - Requires SV Actors to be visible. + * + * Enemies: + * - Show HP Gauges over the enemy sprites' heads? + * - Can be bypassed with <Hide HP Gauge> notetag. + * + * Requires Defeat?: + * - Requires defeating the enemy once to show HP Gauge? + * - Can be bypassed with <Show HP Gauge> notetag. + * + * Battle Test Bypass?: + * - Bypass the defeat requirement in battle test? + * + * --- + * + * Settings + * + * Anchor X: + * Anchor Y: + * - Where do you want the HP Gauge sprite's anchor X/Y to be? + * Use values between 0 and 1 to be safe. + * + * Scale: + * - How large/small do you want the HP Gauge to be scaled? + * + * Offset X: + * Offset Y: + * - How many pixels to offset the HP Gauge's X/Y by? + * + * --- + * + * Options + * + * Add Option?: + * - Add the 'Show HP Gauge' option to the Options menu? + * + * Adjust Window Height: + * - Automatically adjust the options window height? + * + * Option Name: + * - Command name of the option. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Action Sequence Settings + * ============================================================================ + * + * Action Sequence Plugin Parameters allow you to decide if you want automatic + * Action Sequences to be used for physical attacks, the default casting + * animations used, how counters and reflects appear visually, and what the + * default stepping distances are. + * + * --- + * + * Automatic Sequences + * + * Melee Single Target: + * - Allow this auto sequence for physical, single target actions? + * + * Melee Multi Target: + * - Allow this auto sequence for physical, multi-target actions? + * + * --- + * + * Quality of Life + * + * Auto Notetag: + * - Automatically apply the <Custom Action Sequence> notetag effect to any + * item or skill that has a Common Event? + * - Any item or skill without a Common Event attached to it will use the + * Automatic Action Sequences instead. + * - The <Auto Action Sequence> notetag will disable this effect for that + * particular skill or item. + * + * --- + * + * Cast Animations + * + * Certain Hit: + * - Cast animation for Certain Hit skills. + * + * Physical: + * - Cast animation for Physical skills. + * + * Magical: + * - Cast animation for Magical skills. + * + * --- + * + * Counter/Reflect + * + * Counter Back: + * - Play back the attack animation used? + * + * Reflect Animation: + * - Animation played when an action is reflected. + * + * Reflect Back: + * - Play back the attack animation used? + * + * --- + * + * Stepping + * + * Melee Distance: + * - Minimum distance in pixels for Movement Action Sequences. + * + * Step Distance X: + * - The normal X distance when stepping forward. + * + * Step Distance Y: + * - The normal Y distance when stepping forward. + * + * Step Duration: + * - The number of frames for a stepping action to complete. + * + * --- + * + * ============================================================================ + * Terms of Use + * ============================================================================ + * + * 1. These plugins may be used in free or commercial games provided that they + * have been acquired through legitimate means at VisuStella.com and/or any + * other official approved VisuStella sources. Exceptions and special + * circumstances that may prohibit usage will be listed on VisuStella.com. + * + * 2. All of the listed coders found in the Credits section of this plugin must + * be given credit in your games or credited as a collective under the name: + * "VisuStella". + * + * 3. You may edit the source code to suit your needs, so long as you do not + * claim the source code belongs to you. VisuStella also does not take + * responsibility for the plugin if any changes have been made to the plugin's + * code, nor does VisuStella take responsibility for user-provided custom code + * used for custom control effects including advanced JavaScript notetags + * and/or plugin parameters that allow custom JavaScript code. + * + * 4. You may NOT redistribute these plugins nor take code from this plugin to + * use as your own. These plugins and their code are only to be downloaded from + * VisuStella.com and other official/approved VisuStella sources. A list of + * official/approved sources can also be found on VisuStella.com. + * + * 5. VisuStella is not responsible for problems found in your game due to + * unintended usage, incompatibility problems with plugins outside of the + * VisuStella MZ library, plugin versions that aren't up to date, nor + * responsible for the proper working of compatibility patches made by any + * third parties. VisuStella is not responsible for errors caused by any + * user-provided custom code used for custom control effects including advanced + * JavaScript notetags and/or plugin parameters that allow JavaScript code. + * + * 6. If a compatibility patch needs to be made through a third party that is + * unaffiliated with VisuStella that involves using code from the VisuStella MZ + * library, contact must be made with a member from VisuStella and have it + * approved. The patch would be placed on VisuStella.com as a free download + * to the public. Such patches cannot be sold for monetary gain, including + * commissions, crowdfunding, and/or donations. + * + * ============================================================================ + * Credits + * ============================================================================ + * + * If you are using this plugin, credit the following people in your game: + * + * Team VisuStella + * * Yanfly + * * Arisu + * * Olivia + * * Irina + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.60: April 7, 2022 + * * Bug Fixes! + * ** <Bypass Soft Damage Cap> notetag should no longer cause crashes. Fix made + * by Olivia. + * * Feature Update! + * ** Removed one of the forced log window clear events that have made log + * window messages impossible to utilize for certain settings. Update made + * by Olivia. + * + * Version 1.59: March 31, 2022 + * * Bug Fixes! + * ** Escape failure will no longer trigger Post-Battle Common Events. Fix + * made by Arisu. + * + * Version 1.58: March 24, 2022 + * * Documentation Update: + * ** Added extra clarity to <Sideview Size: width, height> notetag: + * *** This does NOT change the image size. This only changes the HITBOX size. + * * Feature Update! + * ** Added failsafes to prevent battlers from moving to non-finite coordinates + * if calculations are made for non-existent targets. Updated by Olivia. + * ** Regeneration timing for TPB-based battle systems will now occur based on + * individual turn counts instead of global turn counts for initial turn 0 + * checks. Updated by Olivia. + * + * Version 1.57: February 17, 2022 + * * Feature Update! + * ** Adjusted the offset properties for the anti-tint UI container to properly + * match the UI offsets if the anti-tint were to be off. Update by Irina. + * + * Version 1.56: February 10, 2022 + * * Documentation Update! + * ** Help file updated for new features. + * * Feature Update! + * ** Once Parallels for battle now operate outside of the battle process. + * Update made by Olivia. + * * New Features! + * ** New Troop Page comment tag added by Olivia and sponsored by Puddor: + * *** <Once Parallel When Start Battle> + * **** Causes the troop page to immediately run the moment the battle scene + * begins to fade in (not after it fades in). This is faster than a turn 0 + * condition troop page. Troop page conditions are ignored. + * **** This can be used for things like the Action Sequence Camera plugin, the + * Visual Battle Environment plugin, and/or initial battle poses and such + * in order to provide a near seamless battle transition experience. + * **** This does NOT trigger when coming out of the options menu or party + * menu screens. + * **** This WILL trigger when going from battle to battle nonstop via plugins + * like VisuStella MZ's Chain Battles. + * **** When actors are moving towards their home positions, it will take + * around 30 frames by default. Use this information however you like. + * * Optimization Update! + * ** Plugin should run more optimized. + * + * Version 1.55: January 27 2022 + * * Compatibility Update! + * ** RPG Maker MV animations with front view should now play in the correct + * area against actor faces. Update made by Olivia. + * * Documentation Update! + * ** Help file updated for new features. + * * Feature Update! + * ** Animations now play on top of all actor faces/portraits regardless of the + * battle layout style. Update made by Olivia. + * * New Features! + * ** New notetag added by Arisu. + * *** <Bypass Auto Action Sequence> + * **** This notetag is used for the game devs that have the Action Sequence + * Plugin Parameter "Auto Notetag" on for applying the notetag + * <Custom Action Sequence> to every skill and item with common events. + * **** This will allow items and skills to be able to launch their common + * events from the menu scene regardless of the inherent restriction to + * prevent action sequence based skills/items with common events from + * launching. + * **** Ignore this if you have "Auto Notetag" disabled or set to false. By + * default, this setting is set to false. Please be aware of the changes + * you've made to your game before using it. + * + * Version 1.54: January 13, 2022 + * * Bug Fixes! + * ** RPG Maker MZ Bug Fix! + * *** Overly-Protective Substitute + * *** When an ally with critical health is being targeted by a friendly non- + * Certain Hit skill (such as a heal or buff) and another ally has the + * substitute state, the other ally would "protect" the originally targeted + * ally and take the heal or buff. + * *** The new changed behavior is that now, substitute will not trigger for + * any actions whose scope targets allies. + * *** Fix made by Olivia. + * + * Version 1.53: December 30, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * ** Help file updated for updated features. + * * New Features! + * ** New Plugin Parameter added by Olivia: + * *** Plugin Parameters > Battle Layout > UI Elements > Anti-Tint UI? + * **** Prevent UI Elements from being tinted? + * **** This prevents UI Elements such as HP Gauges, Enemy Names, Battle + * Cursor, and Weakness Display from being affected by screen tint. + * * Updated Feature! + * ** Updated Plugin Command "PROJECTILE: Animation" by Arisu! + * *** New Parameter: Wait For Animation? + * **** Wait for animation to finish before going to the next command? + * + * Version 1.52: December 16, 2021 + * * Compatibility Update! + * ** RPG Maker MZ 1.4.0 compatibility update! + * *** MV Animations played on screen level will now show up properly in the + * center of the screen. + * + * Version 1.51: December 9, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Action Sequence Plugin Commands added by Arisu: + * *** MOVE: Change Home By Distance + * *** MOVE: Change Home To Point + * *** MOVE: Change Home To Target(s) + * **** These Plugin Commands allow you to adjust the home position of + * battlers in sideview battle. + * **** This is sideview only! + * **** This does NOT work with front view! + * **** For those wondering, going to the options screen, party screen, etc. + * won't reset the home positions like regular movement changes do. + * **** Merry Christmas, Harold-gang! + * + * Version 1.50: November 4, 2021 + * * Bug Fixes! + * ** <Seal Attack> and <Seal Guard> should no longer be bypassed by + * auto-battle status. Fix made by Yanfly. + * + * Version 1.49: October 28, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * Feature Update! + * ** Action Sequence: MOTION: Freeze Motion Frame will now only show weapons + * when using a motion that is named either "attack", "thrust", "swing", or + * "missile". Update made by Irina. + * ** Fail safe added to prevent Scene_Battle going into unsupported scenes + * like Scene_Equip and Scene_Skill. Update made by Olivia. + * * New Feature! + * ** New Action Sequence Plugin Command added by Arisu and sponsored by Anon: + * *** MECH: Once Parallel + * **** Plays a Common Event parallel to the battle event once without + * repeating itself when done. + * **** When exiting battle scene, all Once Parallels are cleared. + * **** Once Parallels are not retained upon reentering the scene. + * **** Once Parallels are not stored in memory and cannot be saved. + * + * Version 1.48: October 21, 2021 + * * Feature Update! + * ** Animations are now played on top of battlers in the Front View XP Battle + * Layout appearance. Update made by Irina. + * ** Battle Log, if decided to be shown, now updates faster. Update by Irina. + * ** Default Critical Damage Bonus increase is now updated to account for + * HP Healing and MP Recovery. To update this, create a new project, with + * the newest version of Battle Core installed. Copy over the Plugin + * Parameters for the Damage Settings > Critical Hits > JS: Damage Formula + * to your own project's version. Update made by Irina. + * + * Version 1.47: October 14, 2021 + * * Compatibility Update! + * ** Added compatibility functionality for future plugins. + * * Feature Update! + * ** Back attachment sprites are now automatically updated with sprite + * battlers to be shifted towards the very back. + * + * Version 1.46: September 23, 2021 + * * Bug Fixes! + * ** Fixed problem with skills and items without action sequences preventing + * actions from occurring. Fix made by Yanfly. + * + * Version 1.45: September 17, 2021 + * * Bug Fixes! + * ** <JS Pre-End Action> and <JS Post-End Action> effects now have multiple + * checks to make sure that they don't launch multiple times when a battler + * without actions has a turn after one that does. Fix made by Olivia. + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Action Sequence notetags added by Yanfly and Arisu: + * *** <Common Event Key: name> + * *** <Common Event Keys: name, name, name> + * *** <Common Event Keys> + * key + * key + * key + * </Common Event Keys> + * **** Will generate Common Events for the skill/item with a corresponding + * key. + * **** More information will be explained inside of the help file. + * **** This feature is made for make the process of sharing Action Sequences + * to become easier without needing to line up Common Event ID's. + * + * Version 1.44: August 20, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Action Sequence added by Irina and sponsored by Anon. + * *** "ANIM: Play at Coordinate" + * **** Plays an animation on the screen at a specific x, y coordinate even if + * there is no sprite attached. + * **** Requires VisuMZ_0_CoreEngine! + * + * Version 1.43: July 23, 2021 + * * Feature Update! + * ** Immortality now works different with instant death mechanics. Skill + * effects that apply instant death or attack states that apply instant + * death will now trigger a flag instead of cancelling immortality. The + * flag will remain until immortality is manually cancelled via Action + * Sequence and then proc the death effect. This way, animations can remain + * to the end with instant death mechanics in mind. This does not affect + * script calls. + * + * Version 1.42: July 16, 2021 + * * Bug Fixes! + * ** Added another fail safe for empty common events used for pre-battle + * common events. Fix made by Olivia. + * + * Version 1.41: July 2, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * ** Added entries to <Battle Command> notetags and Plugin Parameters for + * "Party", "Combat Log", and "Weapon Swap" which weren't updated before. + * * Optimization Update! + * ** Plugin should run more optimized. + * * New Features! + * ** New Action Sequence added by Arisu: + * *** MECH: Enemy Escape + * **** Causes the enemy unit(s) to escape. + * + * Version 1.40: June 25, 2021 + * * Bug Fixes! + * ** Transformations from static enemies to and from animated SV enemies + * should no longer show both sprites. Fix made by Irina. + * * Compatibility Update + * ** Compatibility update with RPG Maker MZ 1.3.0+. + * + * Version 1.39: June 18, 2021 + * * Bug Fixes! + * ** MOVE: Home Reset should no longer trigger an end action function and + * cause plugins such as "Boost Action" to malfunction. Fix made by Olivia. + * * Compatibility Update + * ** Added compatibility functionality for future plugins. + * * Documentation Update! + * ** Help file updated for updated features. + * * Feature Update! + * ** <Battle Layout: x> Troop Name tags can now work with comment tags. Update + * made by Irina. + * ** Random encounter lists are now better shuffled for more variety with how + * the RNG seed works. Update made by Arisu. + * + * Version 1.38: June 11, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * Feature Updates! + * ** Location calculations will now be based off the a battler's base position + * in order for animations, popups, and other aspects to line up properly + * when scaled. Update made by Irina. + * ** Plugin Parameters for Enemy Battler Settings > Name have been rearranged + * for better organization. Update by Olivia. + * * New Features! + * ** New Notetags added by Olivia and sponsored by NSG: + * *** <Sideview Shadow Scale X: x%> + * *** <Sideview Shadow Scale X: x.y> + * *** <Sideview Shadow Scale Y: x%> + * *** <Sideview Shadow Scale Y: x.y> + * **** These new notetags allow you to adjust the X and Y scale of the SV + * shadow sprite separately. + * ** New Plugin Parameters added by Olivia and sponsored by NSG: + * *** Enemy Battler Settings > Name > Name Visibility > Always Hidden + * *** Enemy Battler Settings > Name > Name Visibility > By Selection? + * **** Choose to have the names always hidden or by selection. + * **** These are adjusted on a priority list. + * + * Version 1.37: May 21, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New notetags added by Olivia. + * *** <Command Require Learn> + * *** <Command Require Access> + * **** These two commands determine the visibility of a battle command by + * whether or not the skill has been learned or accessible. + * * Feature Update! + * ** For those using TPB, each battler's regeneration phase will no longer + * tick multiple times in a single frame to prevent irregularities. Update + * made by Olivia. + * + * Version 1.36: May 14, 2021 + * * Bug Fixes! + * ** Reversed an HP/MP regeneration bug that was incorrectly reported for TPB. + * Fix made by Olivia. + * * Documentation Update + * ** Added "TPB/ATB Active Battle Actor Shifting" to Major Changes section: + * *** This change has been active since the start of this plugin. It was not + * documented until now. + * *** Pressing cancel on the Actor Command Window no longer switches between + * actors with a full TPB/ATB gauge before reaching the Party Command + * Window. This is to accomplish a couple of things: 1) reduce the number + * of button presses to reach the Party Command Window and 2) to prevent + * motion resets and disrupting action sequences. If this feature is vital + * to your battle system, we recommend that you do not use this plugin or + * any of the Battle Core-required plugins. + * ** Feature Updates + * *** Distortion sprite Y calculations will now be rounded upward for better + * visuals and prevent odd pixelation effects. Update made by Irina. + * + * Version 1.35: May 7, 2021 + * * Bug Fixes! + * ** Pre-Battle Common Events without a wait command at the end should no + * longer lock up by coincidentally pressing the menu key at the same time. + * Fix made by Olivia. + * * Feature Update! + * ** Added an extra check for TPB-based battle systems to not run turn end + * functions when it's not actually the actual turn end timing. Update made + * by Olivia. + * ** "Damage Styles" plugin parameters are now moved to the top of the + * Damage Settings category. This should make it easier to acknowledge the + * existence of and not have it be an unknown entity. Update made by Irina. + * + * Version 1.34: April 23, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * Feature Update! + * ** Uses a better algorithm for determining shadow positioning. Update made + * by Olivia. + * * New Features! + * ** New additions made for Projectile action sequences. + * ** "Start Location" and "Goal Location" now have "Target Location" parameter + * to determine which part of the target's body to send the projectile from + * or towards. Added by Olivia. + * ** Requires VisuMZ_1_BattleCore version 1.34 to have affect. + * + * Version 1.33: April 9, 2021 + * * Bug Fixes! + * ** Skill costs should now be displayed on battle commands again. Bug fix + * made by Olivia. + * ** Pre-Battle Common Events should no longer cause stalling when used with + * specific event commands. Bug fix made by Olivia. + * * Compatibility Update! + * ** Added "Weapon Swap" to the list of battle commands that can be added. + * * Documentation Update! + * ** Added "Weapon Swap" and "Combat Log" to the list of <Battle Commands> in + * the notetags section. + * ** Help file updated for new features. + * * New Features! + * ** New notetags added by Olivia: + * *** <Sideview Shadow Scale: x%> and <Sideview Shadow Scale: x.y> + * **** Used for: Actor, Enemy Notetags + * **** Adjusts the scaling size of the sideview battler's shadow. + * + * Version 1.32: April 2, 2021 + * * Feature Update! + * ** Sideview battler sprites when using front view will now factor in the + * window padding and appear properly centered to their focus point. Update + * made by Olivia. + * + * Version 1.31: March 26, 2021 + * * Compatibility Update! + * ** Added compatibility functionality for future plugins. + * * Documentation Update! + * ** Added "VisuStella MZ Compatibility" section for detailed compatibility + * explanations with the VisuMZ_3_BoostAction plugin. + * + * Version 1.30: March 19, 2021 + * * Documentation Update! + * ** Help file updated for updated features. + * * Feature Update! + * ** <JS Targets> is now updated to include the default set of targets + * selected by the skill/item's original scope. Update made by Yanfly. + * *** If you wish to clear it out, simply do 'targets = []' first. + * + * Version 1.29: March 12, 2021 + * * Compatibility Update! + * ** Added compatibility functionality for future plugins. + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Parameter added by Olivia: + * *** Plugin Parameters > Enemy Battler Settings > Name > Legacy Option + * **** Use the legacy version (window) or new version (sprite). + * **** WARNING: Legacy version is no longer supported for bugs. + * **** Not all settings available here in the Plugin Parameters will be + * available to the legacy version (ie Always Visible and Attach States). + * + * Version 1.28: March 5, 2021 + * * Compatibility Update! + * ** Added compatibility functionality for future plugins. + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Parameters added by Arisu: + * *** Plugin Parameters > Actor Command > Show Command Costs + * **** If you don't want to show skill costs for your commands in the Actor + * Command Window, you can now hide them. + * ** New Plugin Parameters added by Irina: + * *** Plugin Parameters > Battle Layout Settings > Status Window Elements + * *** Battle Layout Settings > Status Window Elements > Battler Name + * *** Battle Layout Settings > Status Window Elements > Gauge 1 (HP) + * *** Battle Layout Settings > Status Window Elements > Gauge 2 (MP) + * *** Battle Layout Settings > Status Window Elements > Gauge 3 (TP) + * *** Battle Layout Settings > Status Window Elements > State Icon + * *** Battle Layout Settings > Status Window Elements > TPB/ATB Gauge + * **** These new Plugin Parameters allow you to offset the positions of the + * various Battle Status Window elements. Their base positions will be + * calculated by the Battle Layout used and then offset from there. + * *** Battle Layout Settings > Status Window Elements > Window Skin + * **** These settings allow you to set a specific window skin for the + * Battle Status Window or hide it from view completely. + * *** Battle Layout Settings > Status Window Elements > Selectable Background + * **** This option allows you to hide the black box that comes with the + * majority of selectable elements found in RPG Maker MZ in case it does + * not fit with how you want the Battle Status Window to look. + * *** Battle Layout Settings > Status Window Elements > Back Attachment + * *** Battle Layout Settings > Status Window Elements > Front Attachment + * **** These settings allow you to attach images to the back/front of the + * Battle Status Window from the img/system/ folder. + * **** You may offset X and Y positions for them as well. + * ** New Plugin Parameters added by Olivia: + * *** Plugin Parameters > Enemy Settings > Name: Always Visible + * **** Determines if the enemy name will always be visible. + * *** Plugin Parameters > Enemy Settings > Name: Attach States + * **** Attach the enemy's state icon to the enemy name? + * *** Plugin Parameters > Enemy Settings > Attach: Offset X/Y + * **** Offset the attached state icon's position. + * * Feature Update! + * ** Switched drawing enemy names on the screen from window to sprite to + * reduce lag and for better screen positioning accuracy especially during + * screen zooming. Update by Olivia. + * + * Version 1.27: February 26, 2021 + * * Compatibility Update! + * ** Added compatibility functionality for future plugins. + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Parameters added by Irina and sponsored by AndyL: + * *** Plugin Parameters > Mechanics Settings > Switches > Switch: Critical + * *** Plugin Parameters > Mechanics Settings > Switches > Switch: Miss/Evade + * **** Turns Switches ON if the action performs a critical hit, misses, or is + * evaded at any point. + * **** Switch reverts to OFF whenever an action starts. + * **** If multiple targets/hits are struck, as long as one hit respectively + * lands a critical hit, fails to land, then the switch will remain ON for + * the rest of the action. + * *** Plugin Parameters > Mechanics Settings > Variables > Variable: Damage + * *** Plugin Parameters > Mechanics Settings > Variables > Variable: Healing + * **** Variable records target damage/healing during action. + * **** Variable reverts to 0 whenever an action starts. + * **** If multiple targets/hits are struck, the variable will record the total + * amount of damage/healing done for the remainder of the action (unless + * manually reseting to 0 during an Action Sequence). + * + * Version 1.26: February 19, 2021 + * * Bug Fixes! + * ** Battles with branching event paths found within a conditional branch or + * choice tree will no longer be skipped over. Fix made by Arisu. + * * Compatibility Update + * ** Returning to the battle scene from the options scene in a Tpb-base battle + * system now links the current actor. Update by Irina. + * + * Version 1.25: February 5, 2021 + * * Compatibility Update + * ** Added compatibility update with VisuStella MZ Skills and States Core's + * Plugin Parameter > State Settings > Action End Update + * * Feature Update! + * ** <Common Event: name> notetag no longer requires <Custom Action Sequence> + * notetag if the Plugin Parameter: Auto Notetag is enabled. + * + * Version 1.24: January 29, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * Feature Update! + * ** MOVE: Move To Point and MOVE: Move To Target(s) Action Sequences' + * "Offset Adjustment" normal setting will now factor in Offset X and + * Offset Y positions unlike before where it cancels them. Update by Irina. + * * New Features! + * ** New notetag added by Arisu: + * *** <Common Event: name> + * **** Battle only: calls forth a Common Event of a matching name. + * **** This is primarily used for users who are reorganizing around their + * Common Events and would still like to have their skills/items perform + * the correct Action Sequences in case the ID's are different. + * + * Version 1.23: January 22, 2021 + * * Documentation Update! + * ** Help file updated for new features. + * * Feature Update! + * ** ACSET: All Targets Action Set and ACSET: Each Target Action Set updated + * *** New parameter added: Dual/Multi Wield? + * **** Add times struck based on weapon quantity equipped? + * * New Features! + * ** Dual Wielding now functions differently. Made by Olivia. + * *** Previously, RPG Maker MZ had "Dual Wielding" attack using both weapon + * animations at once, with the combined ATK of each weapon. It's confusing + * to look at and does not portray the nature of "Dual Wielding". + * *** Dual Wielding, or in the case of users adding in third and fourth + * weapons, Multi Wielding is now changed. Each weapon is displayed + * individually, each producing its own attack animation, showing each + * weapon type, and applying only that weapon's ATK, Traits, and related + * effects. It is no longer a combined effect to display everything at once + * like RPG Maker MZ default. + * *** If an actor has multiple weapon slots but some of them are unequipped, + * then the action will treat the attack as a single attack. There will be + * no barehanded attack to add on top of it. This is to match RPG Maker + * MZ's decision to omit a second animation if the same scenario is + * applied. + * ** New Action Sequence Plugin Commands added by Yanfly + * *** ANIM: Attack Animation 2+ + * **** Plays the animation associated with the user's 2nd weapon. + * Plays nothing if there is no 2nd weapon equipped. + * ** New Action Sequence Plugin Commands added by Olivia + * *** WEAPON: Clear Weapon Slot + * *** WEAPON: Next Weapon Slot + * *** WEAPON: Set Weapon Slot + * **** These are Action Sequence Plugin Commands for devs who want finer + * control over Dual/Multi Wielding weapons. + * + * Version 1.22: January 15, 2021 + * * Compatibility Update + * ** Compatibility with "All Skills" Actor Command should now work with the + * Skills & States Core hide skill notetags. + * + * Version 1.21: January 8, 2021 + * * Bug Fixes! + * ** "MOVE: Home Reset" Plugin Command Action Sequence should work properly. + * Fix made by Yanfly. + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * New Features! + * ** New Notetag snuck in by Arisu + * *** <Auto Action Sequence> + * **** Used for those who have the "Auto Notetag" Plugin Parameter enabled and + * just want to use an automatic Action Sequence instead. + * ** New Plugin Parameter snuck in by Arisu! + * *** Plugin Parameters > Action Sequences > Quality of Life > Auto Notetag + * **** Automatically apply the <Custom Action Sequence> notetag effect to any + * item or skill that has a Common Event? + * **** Any item or skill without a Common Event attached to it will use the + * Automatic Action Sequences instead. + * **** The <Auto Action Sequence> notetag will disable this effect for that + * particular skill or item. + * ** Arisu, you're going to be responsible for any bugs these may cause. + * *** Bring it!!!! + * **** And handling any bug report emails that are sent because this was + * turned on by accident. + * ***** Please read the documentation, guys! + * + * Version 1.20: January 1, 2021 + * * Bug Fixes! + * ** For TPB Active or ATB Active, inputting actors that have received damage + * will return back to place after flinching. Fix made by Yanfly. + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * New Features! + * ** New notetags added by Yanfly: + * *** <Battle Portrait Offset: +x, +y> + * *** <Battle Portrait Offset X: +x> + * *** <Battle Portrait Offset Y: +y> + * **** This is used with the "Portrait" and "Border" Battle Layouts. + * **** Offsets the X and Y coordinates for the battle portrait. + * + * Version 1.19: December 25, 2020 + * * Bug Fixes! + * ** Removing a state from a Sideview Enemy during the middle of their a non- + * looping motion will no longer reset their motion to neutral. + * Fix made by Yanfly. + * * Compatibility Update! + * ** Plugins should be more compatible with one another. + * * Documentation Update! + * ** Added documentation for updated feature(s)! + * * Feature Update! + * ** Action Sequence "PROJECTILE: Icon" now supports code for the "Icon" + * parameter. Update made by Yanfly. + * + * Version 1.18: December 18, 2020 + * * Bug Fixes! + * ** For TPB Active or ATB Active, inputting actors will no longer step back + * after an enemy's action is finished. Fix made by Yanfly and Shiro. + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * New Features! + * ** Action Sequence "BTLOG: Add Text" is updated for the convenience of a new + * option to quickly copy the displayed text to the VisuStella MZ Combat Log + * if that plugin is installed. Added by Yanfly. + * + * Version 1.17: December 11, 2020 + * * Bug Fixes! + * ** Common Events in TPB Active that cause forced actions will no longer + * cause currently inputting actors that match the forced action battler to + * crash the game. Fix made by Yanfly and Shiro. + * * Compatibility Update! + * ** Added compatibility functionality for future plugins. + * ** Plugins should be more compatible with one another. + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * Feature Update! + * ** Action Sequence Impact Action Sequences "Shockwave from Each Target(s)", + * "Shockwave from Target(s) Center", and "Zoom Blur at Target(s) Center" + * now have "Offset X" and "Offset Y" plugin parameters. Added by Yanfly. + * ** Action Sequence "MOVE: Move To Target(s)" is now changed so that if the + * "Melee Distance" value is set to 0, battlers will no longer stand a half + * body distance away. Added by Yanfly. + * + * Version 1.16: December 4, 2020 + * * Bug Fixes! + * ** Bug fixes made for the RPG Maker MZ base code. If a battler has no + * actions, then their action speed will not be Infinity. Fix by Olivia. + * * Compatibility Update! + * ** Plugins should be more compatible with one another. + * * Optimization Update! + * ** Plugin should run more optimized. + * + * Version 1.15: November 29, 2020 + * * Bug Fixes! + * ** Completely replacing the whole party at once will no longer cause the + * battle system to crash. Fix made by Olivia. + * ** Pre-Battle Common Events will no longer cancel out any win/lose branches. + * Fix made by Arisu. + * * Feature Update! + * ** Custom Action Sequences will no longer close the Actor Command Input + * window unless absolutely necessary (like for Show Message events) during + * Active TPB/ATB. Change made by Arisu. + * + * Version 1.14: November 22, 2020 + * * Feature Update! + * ** Natural Miss and Evasion motions now have flinch distance. + * Added by Yanfly. + * + * Version 1.13: November 15, 2020 + * * Optimization Update! + * ** Plugin should run more optimized. + * + * Version 1.12: November 8, 2020 + * * Bug Fixes! + * ** Failsafes added to prevent common events from running if they're empty. + * Fix made by Irina. + * ** Skip Party Command will now work properly with TPB-based battle systems. + * Fix made by Yanfly. + * * Compatibility Update! + * ** Plugins should be more compatible with one another. + * * Documentation Update! + * ** In preparation for upcoming VisuStella MZ plugins. + * + * Version 1.11: November 1, 2020 + * * Compatibility Update! + * ** Plugins should be more compatible with one another. + * * Documentation Update! + * ** Added clarity for the Plugin Parameters for the Common Events settings + * found in the mechanics section. The common events are only meant to run + * in the map scene and not for the battle scene. Update made by Irina. + * * Feature Update! + * ** The Plugin Parameter for Mechanics, Common Events (on Map), Defeat Event + * now has updated functionality. If this has a common event attached to it, + * then losing to random encounters will no longer send the player to the + * Game Over scene, but instead, send the player back to the map scene, + * where the Defeat Common Event will run. Update made by Irina. + * + * Version 1.10: October 25, 2020 + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * New Features! + * ** New Action Sequence Plugin Command added by Olivia: + * *** MECH: Custom Damage Formula + * **** Changes the current action's damage formula to custom. + * This will assume the MANUAL damage style. + * ** New Notetag added by Irina: + * ** New Plugin Parameters added by Irina: + * *** Plugin Parameters > Battleback Scaling Settings + * **** These settings allow you to adjust how battlebacks scale to the screen + * in the game. + * *** <Battler Sprite Grounded> + * **** Prevents the enemy from being able to jumping and/or floating due to + * Action Sequences but still able to move. Useful for rooted enemies. + * + * Version 1.09: October 18, 2020 + * * Bug Fixes! + * ** Exiting out of the Options menu scene or Party menu scene will no longer + * cause party members to reset their starting position. Fix made by Arisu + * * Documentation Update! + * ** Added documentation for new feature(s)! + * ** There was a documentation error with <JS Pre-Regenerate> and + * <JS Post-Regenerate>. Fix made by Yanfly. + * *** Before, these were written as <JS Pre-Regenerate Turn> and + * <JS Post-Regenerate Turn>. The "Turn" part of the notetag has been + * removed in the documentation. + * * Feature Update! + * ** Damage sprites on actors are now centered relative to the actor's anchor. + * Change made by Yanfly. + * * New Features! + * ** New Action Sequence Plugin Command added by Yanfly: + * *** MECH: Variable Popup + * **** Causes the unit(s) to display a popup using the data stored inside + * a variable. + * + * Version 1.08: October 11, 2020 + * * Bug Fixes! + * ** Dead party members at the start of battle no longer start offscreen. + * Fix made by Arisu. + * ** Removed party members from battle no longer count as moving battlers. + * Fix made by Yanfly. + * ** Using specific motions should now have the weapons showing and not + * showing properly. Fix made by Yanfly. + * + * Version 1.07: October 4, 2020 + * * Bug Fixes! + * ** Adding and removing actors will now refresh the battle status display. + * Fix made by Irina. + * ** Adding new states that would change the affected battler's state motion + * will automatically refresh the battler's motion. Fix made by Irina. + * ** Boss Collapse animation fixed and will sink into the ground. + * Fix made by Irina. + * ** Failsafes added for certain animation types. Fix made by Yanfly. + * ** Freeze Motion for thrust, swing, and missile animations will now show the + * weapons properly. Fix made by Yanfly. + * ** The Guard command will no longer display the costs of the Attack command. + * Fix made by Irina. + * * Documentation Update! + * ** Updated help file for newly added plugin parameters. + * * Feature Updates! + * ** When using the Change Battleback event command in battle, the game client + * will wait until both battlebacks are loaded before changing the both of + * them so that the appearance is synched together. Change made by Yanfly. + * * New Features! + * ** New plugin parameters added by Irina! + * *** Plugin Parameters > Actor Battler Settings > Chant Style + * **** What determines the chant motion? Hit type or skill type? + * + * Version 1.06: September 27, 2020 + * * Bug Fixes! + * ** Enemy Battler Plugin Parameter "Shadow Visible" should now work again. + * Fix made by Irina. + * * Compatibility Update! + * ** Added compatibility functionality for future plugins. Added by Yanfly. + * * Documentation Update! + * ** Updated the help file for all the new plugin parameters. + * * Feature Update! + * ** Action Sequence "MECH: HP, MP, TP" will now automatically collapse an + * enemy if it has been killed by the effect. + * ** All battle systems for front view will now have damage popups appear + * in front of the status window instead of just the Portrait battle layout. + * Update made by Yanfly. + * * New Features! + * ** New Action Sequence Plugin Commands from Irina! + * *** MOTION: Clear Freeze Frame + * *** MOTION: Freeze Motion Frame + * **** You can freeze a battler's sprite's motion with a specific frame. + * ** New notetags for Maps and name tags for Troops added by Yanfly! + * *** <Battle Layout: type> to change the battle layout style used for + * specific maps and/or troops. + * ** New plugin parameters added by Yanfly! + * *** Plugin Parameters > Battle Layout Settings > Command Window Width + * **** This plugin parameter lets you adjust the window width for Party and + * Actor Command windows in the Default and List Battle Layout styles. + * *** Plugin Parameters > Enemy Battler Settings > Name: Offset X + * *** Plugin Parameters > Enemy Battler Settings > Name: Offset Y + * **** These plugin parameters allow you to offset the position of the enemy + * name positions on the screen by a specific amount. + * + * Version 1.05: September 20, 2020 + * * Bug Fixes! + * ** Actors now use their casting or charging animations again during TPB/ATB. + * Fix made by Yanfly. + * ** Defeat requirement for enemies will no longer crash the game if turned on + * after creating + * ** Escaping animation no longer has actors stay in place. Fixed by Yanfly. + * ** Failsafes added for newly added weapon types that have not been adjusted + * in the Database > System 2 tab. Fixed by Irina. + * ** Shadows now appear under the actor sprites. Fix made by Yanfly. + * ** Victory during TPB will no longer cancel the victory animations of + * actors that will have their turn after. Fixed by Yanfly. + * * Documentation Update! + * ** All Anchor Plugin Parameter descriptions now state to use values between + * 0 and 1 to be safe. Update made by Yanfly. + * * Feature Update! + * ** During Active TPB / ATB, canceling out of the actor command window will + * go directly into the party window without having to sort through all of + * the available active actors. + * ** Going from the Party Command Window's Fight command will immediately + * return back to the actor command window that was canceled from. + * * New Features! + * ** Action Sequence Plugin Command "MOVE: Spin/Rotate" has been updated. + * *** A new parameter has been added: "Revert Angle on Finish" + * *** Added by Yanfly. + * ** New plugin parameters have been added to Damage Settings. + * *** Appear Position: Selects where you want popups to appear relative to the + * battler. Head, Center, Base. Added by Yanfly. + * *** Offset X: Sets how much to offset the sprites by vertically. + * Added by Yanfly. + * *** Offset Y: Sets how much to offset the sprites by horizontally. + * Added by Yanfly. + * ** New plugin parameters have been added to Actor Battler Settings. + * *** Priority: Active - Place the active actor on top of actor and + * enemy sprites. Added by Yanfly. + * *** Priority: Actors - Prioritize actors over enemies when placing + * sprites on top of each other. Added by Yanfly. + * + * Version 1.04: September 13, 2020 + * * Bug Fixes! + * ** Active Battler Sprites now remain on top and won't be hidden behind + * other sprites for better visual clarity. Fix made by Arisu. + * ** Collapsing battlers will now show the dead motion properly. Fix made by + * Olivia. + * ** Dead battlers can no longer be given immortality. Fix made by Olivia. + * ** Going into the Options menu with no battleback set will no longer set a + * battle snapshot. + * ** HP Gauges for Sideview Enemies are no longer flipped! Fix made by Yanfly. + * ** Moving a dead battler would no longer reset their animation. Fix made by + * Olivia. + * ** Pre-Battle Common Events now work with events instead of just random + * encounters. Fix made by Yanfly. + * ** Sideview Enemy shadows no longer twitch. Fix made by Irina. + * * Documentation Updates! + * ** Added further explanations for Anchor X and Anchor Y plugin parameters. + * This is because there's a lot of confusion for users who aren't familiar + * with how sprites work. Added by Irina. + * ** <Magic Reduction: x> notetag updated to say magical damage instead of + * physical damage. Fix made by Yanfly. + * * New Features! + * ** Additional Action Sequence Plugin Commands have been added in preparation + * of upcoming plugins! Additions made by Irina. + * *** Action Sequences - Angle (for VisuMZ_3_ActSeqCamera) + * *** Action Sequences - Camera (for VisuMZ_3_ActSeqCamera) + * *** Action Sequences - Skew (for VisuMZ_3_ActSeqCamera) + * *** Action Sequences - Zoom (for VisuMZ_3_ActSeqCamera) + * ** Additional Action Sequence Plugin Commands have been made available now + * and added to Battle Core! Additions made by Irina. + * *** MOVE: Scale/Grow/Shrink + * *** MOVE: Skew/Distort + * *** MOVE: Spin/Rotate + * *** MOVE: Wait For Scale + * *** MOVE: Wait For Skew + * *** MOVE: Wait For Spin + * ** Plugin Parameters Additions. Additions made by Irina. + * *** Plugin Params > Actor Battler Settings > Offset X + * *** Plugin Params > Actor Battler Settings > Offset Y + * *** Plugin Params > Actor Battler Settings > Smooth Image + * *** Plugin Params > Enemy Battler Settings > Offset X + * *** Plugin Params > Enemy Battler Settings > Offset Y + * *** Plugin Params > Enemy Battler Settings > Smooth Image + * + * Version 1.03: September 6, 2020 + * * Bug Fixes! + * ** Animated Battlers will refresh their motions from the death motion once + * they're revived instead of waiting for their next input phase. Fix made + * by Yanfly. + * ** Battle Log speed sometimes went by too fast for certain enabled messages. + * Wait timers are now added to them, like state results, buff results, and + * debuff results. Fix made by Yanfly. + * ** Boss Collapse animation now works properly. Fix made by Yanfly. + * ** Freeze fix for TPB (Wait) if multiple actors get a turn at the same time. + * Fix made by Olivia. + * ** Pressing cancel on a target window after selecting a single skill no + * longer causes the status window to twitch. + * ** Sideview Enemies had a split frame of being visible if they were to start + * off hidden in battle. Fix made by Shaz. + * * Compatibility Update: + * ** Battle Core's Sprite_Damage.setup() function is now separated fro the + * default to allow for better compatibility. Made by Yanfly. + * * Documentation Update: + * ** Inserted more information for "Damage Popups" under "Major Changes" + * * New Features! + * ** <Magic Penetration: x>, <Magic Penetration: x%> notetags added. + * ** <Magic Reduction: x>, <Magic Reduction: x%> notetags added. + * ** <Battle UI Offset: +x, +y>, <Battle UI Offset X: +x>, and + * <Battle UI Offset Y: +y> notetags added for adjusting the positions of + * HP Gauges and State Icons. + * *** Notetags added by Yanfly. + * + * Version 1.02: August 30, 2020 + * * Bug Fixes! + * ** Failsafes added for parsing battle targets. Fix made by Yanfly. + * ** Immortality is no longer ignored by skills/items with the Normal Attack + * state effect. Fix made by Yanfly. + * ** Miss and Evasion sound effects work again! Fix made by Yanfly. + * ** Selecting "Escape" from the Actor Command Window will now have the + * Inputting Battler show its escape motion. Fix made by Yanfly. + * ** Wait for Movement now applies to SV Enemies. Fix made by Yanfly. + * * New Features! + * ** Plugin Command "ACSET: Finish Action" now has an option to turn off the + * Immortality of targets. Feature added by Yanfly. + * * Optimization Update + * ** Uses less resources when making checks for Pre-Battle Battle Start events + * + * Version 1.01: August 23, 2020 + * * Bug Fixes! + * ** Plugin Parameters > Damage Settings > Damage Formats are now fixed. + * Fix made by Olivia. + * ** TPB Battle System with Disable Party Command fixed. Fix made by Olivia. + * ** States now show in list format if faces are disabled. Fix made by Yanfly. + * ** The default damage styles were missing the 'v' variable to allow for + * variable data input. These are back now. Fix made by Yanfly. + * *** Users updating from version 1.00 will need to fix this problem by either + * removing the plugin from the Plugin Manager list and reinstalling it, or + * going to Plugin Parameters > Damage Settings > Style List > the style + * you want, and adding "const v = $gameVariables._data;" to JS: Formula + * * New Notetags Added: + * ** <Command Show Switch: x> added by Olivia + * ** <Command Show All Switches: x,x,x> added by Olivia + * ** <Command Show Any Switches: x,x,x> added by Olivia + * ** <Command Hide Switch: x> added by Olivia + * ** <Command Hide All Switches: x,x,x> added by Olivia + * ** <Command Hide Any Switches: x,x,x> added by Olivia + * ** <JS Command Visible> added by Olivia + * + * Version 1.00: August 20, 2020 + * * Finished Plugin! + * + * ============================================================================ + * End of Helpfile + * ============================================================================ + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceStart + * @text - + * @desc The following are Action Sequences commands/sets. + * These Plugin Commands only work in battle. + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakSet + * @text Action Sequence - Action Sets + * @desc Action Sequence Action Sets are groups of commonly used + * Action Sequence Commands put together for more efficient usage. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Set_SetupAction + * @text ACSET: Setup Action Set + * @desc The generic start to most actions. + * + * @arg DisplayAction:eval + * @text Display Action + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg ApplyImmortal:eval + * @text Immortal: On + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg ActionStart:eval + * @text Battle Step + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg WaitForMovement:eval + * @text Wait For Movement + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg CastAnimation:eval + * @text Cast Animation + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg WaitForAnimation:eval + * @text Wait For Animation + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Set_WholeActionSet + * @text ACSET: All Targets Action Set + * @desc Affects all targets simultaneously performing the following. + * + * @arg DualWield:eval + * @text Dual/Multi Wield? + * @type boolean + * @on Apply + * @off Don't + * @desc Add times struck based on weapon quantity equipped? + * @default false + * + * @arg PerformAction:eval + * @text Perform Action + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg WaitCount:eval + * @text Wait Count + * @desc How many frames should the action sequence wait? + * You may use JavaScript code. + * @default Sprite_Battler._motionSpeed + * + * @arg ActionAnimation:eval + * @text Action Animation + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg WaitForAnimation:eval + * @text Wait For Animation + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg ActionEffect:eval + * @text Action Effect + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg ApplyImmortal:eval + * @text Immortal: Off + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Set_TargetActionSet + * @text ACSET: Each Target Action Set + * @desc Goes through each target one by one to perform the following. + * + * @arg DualWield:eval + * @text Dual/Multi Wield? + * @type boolean + * @on Apply + * @off Don't + * @desc Add times struck based on weapon quantity equipped? + * @default false + * + * @arg PerformAction:eval + * @text Perform Action + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg WaitCount1:eval + * @text Wait Count + * @desc How many frames should the action sequence wait? + * You may use JavaScript code. + * @default Sprite_Battler._motionSpeed + * + * @arg ActionAnimation:eval + * @text Action Animation + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg WaitCount2:eval + * @text Wait Count + * @desc How many frames should the action sequence wait? + * You may use JavaScript code. + * @default Sprite_Battler._motionSpeed * 2 + * + * @arg ActionEffect:eval + * @text Action Effect + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg ApplyImmortal:eval + * @text Immortal: Off + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Set_FinishAction + * @text ACSET: Finish Action + * @desc The generic ending to most actions. + * + * @arg ApplyImmortal:eval + * @text Immortal: Off + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg WaitForNewLine:eval + * @text Wait For New Line + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg WaitForEffect:eval + * @text Wait For Effects + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg ClearBattleLog:eval + * @text Clear Battle Log + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg ActionEnd:eval + * @text Home Reset + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @arg WaitForMovement:eval + * @text Wait For Movement + * @type boolean + * @on Use + * @off Don't Use + * @desc Use this part of the action sequence? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceAngle + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakAngle + * @text Action Sequences - Angle + * @desc Allows you to have control over the camera angle. + * Requires VisuMZ_3_ActSeqCamera! + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_ChangeAngle + * @text ANGLE: Change Angle + * @desc Changes the camera angle. + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg Angle:eval + * @text Angle + * @desc Change the camera angle to this many degrees. + * @default 0 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames to change camera angle. + * @default 60 + * + * @arg EasingType:str + * @text Angle Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default InOutSine + * + * @arg WaitForAngle:eval + * @text Wait For Angle? + * @type boolean + * @on On + * @off Off + * @desc Wait for angle changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Angle_Reset + * @text ANGLE: Reset Angle + * @desc Reset any angle settings. + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames to reset camera angle. + * @default 60 + * + * @arg EasingType:str + * @text Angle Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default InOutSine + * + * @arg WaitForAngle:eval + * @text Wait For Angle? + * @type boolean + * @on On + * @off Off + * @desc Wait for angle changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Angle_WaitForAngle + * @text ANGLE: Wait For Angle + * @desc Waits for angle changes to complete before performing next command. + * Requires VisuMZ_3_ActSeqCamera! + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceAnimation + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakAnimation + * @text Action Sequences - Animations + * @desc These Action Sequences are related to the 'Animations' that + * can be found in the Animations tab of the Database. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Animation_ActionAnimation + * @text ANIM: Action Animation + * @desc Plays the animation associated with the action. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to play the animation on. + * @default ["all targets"] + * + * @arg Mirror:eval + * @text Mirror Animation + * @type boolean + * @on Mirror + * @off Normal + * @desc Mirror the animation? + * @default false + * + * @arg WaitForAnimation:eval + * @text Wait For Animation? + * @type boolean + * @on On + * @off Off + * @desc Wait for animation to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Animation_AttackAnimation + * @text ANIM: Attack Animation + * @desc Plays the animation associated with the user's 1st weapon. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to play the animation on. + * @default ["all targets"] + * + * @arg Mirror:eval + * @text Mirror Animation + * @type boolean + * @on Mirror + * @off Normal + * @desc Mirror the animation? + * @default false + * + * @arg WaitForAnimation:eval + * @text Wait For Animation? + * @type boolean + * @on On + * @off Off + * @desc Wait for animation to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Animation_AttackAnimation2 + * @text ANIM: Attack Animation 2+ + * @desc Plays the animation associated with the user's other weapons. + * Plays nothing if there is no other weapon equipped. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to play the animation on. + * @default ["all targets"] + * + * @arg Slot:eval + * @text Slot + * @desc Which weapon slot to get this data from? + * Main-hand weapon is weapon slot 1. + * @default 2 + * + * @arg Mirror:eval + * @text Mirror Animation + * @type boolean + * @on Mirror + * @off Normal + * @desc Mirror the animation? + * @default true + * + * @arg WaitForAnimation:eval + * @text Wait For Animation? + * @type boolean + * @on On + * @off Off + * @desc Wait for animation to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Animation_CastAnimation + * @text ANIM: Cast Animation + * @desc Plays the cast animation associated with the action. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to play the animation on. + * @default ["user"] + * + * @arg Mirror:eval + * @text Mirror Animation + * @type boolean + * @on Mirror + * @off Normal + * @desc Mirror the animation? + * @default false + * + * @arg WaitForAnimation:eval + * @text Wait For Animation? + * @type boolean + * @on On + * @off Off + * @desc Wait for animation to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Animation_ChangeBattlePortrait + * @text ANIM: Change Battle Portrait + * @desc Changes the battle portrait of the actor (if it's an actor). + * Can be used outside of battle/action sequences. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to change the portraits for. + * Valid units can only be actors. + * @default ["user"] + * + * @arg Filename:str + * @text Filename + * @type file + * @dir img/pictures/ + * @desc Select the file to change the actor's portrait to. + * @default Untitled + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Animation_PlayAtCoordinate + * @text ANIM: Play at Coordinate + * @desc Plays an animation on the screen at a specific x, y coordinate. + * Requires VisuMZ_0_CoreEngine! + * + * @arg AnimationID:num + * @text Animation ID + * @parent Animation + * @type animation + * @desc Plays this animation. + * @default 1 + * + * @arg Coordinates + * + * @arg pointX:eval + * @text X + * @parent Coordinates + * @desc X coordinate used for the animation. + * You may use JavaScript code. + * @default Graphics.width / 2 + * + * @arg pointY:eval + * @text Y + * @parent Coordinates + * @desc Y coordinate used for the animation. + * You may use JavaScript code. + * @default Graphics.height / 2 + * + * @arg Mirror:eval + * @text Mirror Animation? + * @parent Animation + * @type boolean + * @on Mirror + * @off Normal + * @desc Mirror the animation? + * @default false + * + * @arg Mute:eval + * @text Mute Animation? + * @parent Animation + * @type boolean + * @on Mute + * @off Normal + * @desc Mute the animation? + * @default false + * + * @arg WaitComplete:eval + * @text Wait for Completion? + * @parent Animation + * @type boolean + * @on Wait + * @off Normal + * @desc Wait the animation to finish before continuing? + * @default false + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Animation_ShowAnimation + * @text ANIM: Show Animation + * @desc Plays the a specific animation on unit(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to play the animation on. + * @default ["all targets"] + * + * @arg AnimationID:num + * @text Animation ID + * @type animation + * @desc Select which animation to play on unit(s). + * @default 1 + * + * @arg Mirror:eval + * @text Mirror Animation + * @type boolean + * @on Mirror + * @off Normal + * @desc Mirror the animation? + * @default false + * + * @arg WaitForAnimation:eval + * @text Wait For Animation? + * @type boolean + * @on On + * @off Off + * @desc Wait for animation to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Animation_WaitForAnimation + * @text ANIM: Wait For Animation + * @desc Causes the interpreter to wait for any animation(s) to finish. + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceBattleLog + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakBattleLog + * @text Action Sequences - Battle Log + * @desc These Action Sequences are related to the Battle Log Window, + * the window found at the top of the battle screen. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_BattleLog_AddText + * @text BTLOG: Add Text + * @desc Adds a new line of text into the Battle Log. + * + * @arg Text:str + * @text Text + * @desc Add this text into the Battle Log. + * Text codes allowed. + * @default Insert text here. + * + * @arg CopyCombatLog:eval + * @text Copy to Combat Log? + * @type boolean + * @on Copy Text + * @off Don't Copy + * @desc Copies text to the Combat Log. + * Requires VisuMZ_4_CombatLog + * @default true + * + * @arg CombatLogIcon:num + * @text Combat Log Icon + * @parent CopyCombatLog:eval + * @desc What icon would you like to bind to this entry? + * Requires VisuMZ_4_CombatLog + * @default 87 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_BattleLog_Clear + * @text BTLOG: Clear Battle Log + * @desc Clears all the text in the Battle Log. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_BattleLog_DisplayAction + * @text BTLOG: Display Action + * @desc Displays the current action in the Battle Log. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_BattleLog_PopBaseLine + * @text BTLOG: Pop Base Line + * @desc Removes the Battle Log's last added base line and + * all text up to its former location. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_BattleLog_PushBaseLine + * @text BTLOG: Push Base Line + * @desc Adds a new base line to where the Battle Log currently is at. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_BattleLog_Refresh + * @text BTLOG: Refresh Battle Log + * @desc Refreshes the Battle Log. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_BattleLog_UI + * @text BTLOG: UI Show/Hide + * @desc Shows or hides the Battle UI (including the Battle Log). + * + * @arg ShowHide:eval + * @text Show/Hide? + * @type boolean + * @on Show + * @off Hide + * @desc Shows/hides the Battle UI. + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_BattleLog_WaitForBattleLog + * @text BTLOG: Wait For Battle Log + * @desc Causes the interpreter to wait for the Battle Log to finish. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_BattleLog_WaitForNewLine + * @text BTLOG: Wait For New Line + * @desc Causes the interpreter to wait for a new line in the Battle Log. + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceCamera + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakCamera + * @text Action Sequences - Camera + * @desc Allows you to have control over the camera. + * Requires VisuMZ_3_ActSeqCamera! + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Camera_Clamp + * @text CAMERA: Clamp ON/OFF + * @desc Turns battle camera clamping on/off. + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg Setting:eval + * @text ON/OFF + * @type boolean + * @on ON + * @off OFF + * @desc Turns camera clamping on/off. + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Camera_FocusPoint + * @text CAMERA: Focus Point + * @desc Focus the battle camera on a certain point in the screen. + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg FocusX:eval + * @text X Coordinate + * @desc Insert the point to focus the camera on. + * You may use JavaScript code. + * @default Graphics.width / 2 + * + * @arg FocusY:eval + * @text Y Coordinate + * @desc Insert the point to focus the camera on. + * You may use JavaScript code. + * @default Graphics.height / 2 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for camera focus change. + * @default 60 + * + * @arg EasingType:str + * @text Camera Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default InOutSine + * + * @arg WaitForCamera:eval + * @text Wait For Camera? + * @type boolean + * @on On + * @off Off + * @desc Wait for camera changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Camera_FocusTarget + * @text CAMERA: Focus Target(s) + * @desc Focus the battle camera on certain battler target(s). + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to focus the battle camera on. + * @default ["user"] + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for camera focus change. + * @default 60 + * + * @arg EasingType:str + * @text Camera Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default InOutSine + * + * @arg WaitForCamera:eval + * @text Wait For Camera? + * @type boolean + * @on On + * @off Off + * @desc Wait for camera changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Camera_Offset + * @text CAMERA: Offset + * @desc Offset the battle camera from the focus target. + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg OffsetX:eval + * @text Offset X + * @desc How much to offset the camera X by. + * Negative: left. Positive: right. + * @default +0 + * + * @arg OffsetY:eval + * @text Offset Y + * @desc How much to offset the camera Y by. + * Negative: up. Positive: down. + * @default +0 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for offset change. + * @default 60 + * + * @arg EasingType:str + * @text Camera Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default InOutSine + * + * @arg WaitForCamera:eval + * @text Wait For Camera? + * @type boolean + * @on On + * @off Off + * @desc Wait for camera changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Camera_Reset + * @text CAMERA: Reset + * @desc Reset the battle camera settings. + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg ResetFocus:eval + * @text Reset Focus? + * @type boolean + * @on On + * @off Off + * @desc Reset the focus point? + * @default true + * + * @arg ResetOffset:eval + * @text Reset Offset? + * @type boolean + * @on On + * @off Off + * @desc Reset the camera offset? + * @default true + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for reset change. + * @default 60 + * + * @arg EasingType:str + * @text Camera Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default InOutSine + * + * @arg WaitForCamera:eval + * @text Wait For Camera? + * @type boolean + * @on On + * @off Off + * @desc Wait for camera changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Camera_WaitForCamera + * @text CAMERA: Wait For Camera + * @desc Waits for camera to complete before performing next command. + * Requires VisuMZ_3_ActSeqCamera! + * + * @ -------------------------------------------------------------------------- + * + * + * @command ActionSequenceSpaceDragonbones + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreaDragonbones + * @text Action Sequences - Dragonbones + * @desc These Action Sequences are Dragonbones-related. + * Requires VisuMZ_2_DragonbonesUnion! + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_DB_DragonbonesMotionAni + * @text DB: Dragonbones Animation + * @desc Causes the unit(s) to play a Dragonbones motion animation. + * Requires VisuMZ_2_DragonbonesUnion! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to perform a motion animation. + * @default ["user"] + * + * @arg MotionAni:str + * @text Motion Animation + * @desc What is the name of the Dragonbones motion animation you wish to play? + * @default attack + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_DB_DragonbonesTimeScale + * @text DB: Dragonbones Time Scale + * @desc Causes the unit(s) to change their Dragonbones time scale. + * Requires VisuMZ_2_DragonbonesUnion! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to perform a motion animation. + * @default ["user"] + * + * @arg TimeScale:num + * @text Time Scale + * @desc Change the value of the Dragonbones time scale to this. + * @default 1.0 + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceElements + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakElements + * @text Action Sequences - Elements + * @desc These Action Sequences are related to elements. + * Requires VisuMZ_1_ElementStatusCore! + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Element_AddElements + * @text ELE: Add Elements + * @desc Adds element(s) to be used when calculating damage. + * Requires VisuMZ_1_ElementStatusCore! + * + * @arg Elements:arraynum + * @text Elements + * @type number[] + * @min 1 + * @max 99 + * @desc Select which element ID to add onto the action. + * Insert multiple element ID's to add multiple at once. + * @default ["1"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Element_Clear + * @text ELE: Clear Element Changes + * @desc Clears all element changes made through Action Sequences. + * Requires VisuMZ_1_ElementStatusCore! + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Element_ForceElements + * @text ELE: Force Elements + * @desc Forces only specific element(s) when calculating damage. + * Requires VisuMZ_1_ElementStatusCore! + * + * @arg Elements:arraynum + * @text Elements + * @type number[] + * @min 1 + * @max 99 + * @desc Select which element ID to force in the action. + * Insert multiple element ID's to force multiple at once. + * @default ["1"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Element_NullElements + * @text ELE: Null Element + * @desc Forces no element to be used when calculating damage. + * Requires VisuMZ_1_ElementStatusCore! + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceHorror + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakHorror + * @text Action Sequences - Horror Effects + * @desc These Action Sequences are Horror Effects-related. + * Requires VisuMZ_2_HorrorEffects! + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Horror_Clear + * @text HORROR: Clear All Filters + * @desc Clear all Horror Effects filters on the target battler(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to remove Horror Effects for. + * @default ["user"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Horror_GlitchCreate + * @text HORROR: Glitch Create + * @desc Creates the glitch effect on the target battler(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to create the Horror Effect for. + * @default ["user"] + * + * @arg slices:num + * @text Glitch Slices + * @parent FilterGlitch + * @type number + * @min 1 + * @desc Glitch slices to be used with the target. + * @default 10 + * + * @arg offset:num + * @text Glitch Offset + * @parent FilterGlitch + * @type number + * @min 1 + * @desc Default offset value. + * @default 100 + * + * @arg animated:eval + * @text Glitch Animated? + * @parent FilterGlitch + * @type boolean + * @on Animate + * @off Static + * @desc Animate the glitch effect? + * @default true + * + * @arg aniFrequency:num + * @text Glitch Frequency + * @parent FilterGlitch + * @type number + * @min 1 + * @desc If animated, how frequent to make the glitch effect? + * Lower = often Higher = rarer + * @default 300 + * + * @arg aniStrength:num + * @text Glitch Strength + * @parent FilterGlitch + * @type number + * @min 1 + * @desc If animated, how strong is the glitch effect? + * Lower = weaker Higher = stronger + * @default 30 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Horror_GlitchRemove + * @text HORROR: Glitch Remove + * @desc Removes the glitch effect on the target battler(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to remove the Horror Effect for. + * @default ["user"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Horror_NoiseCreate + * @text HORROR: Noise Create + * @desc Creates the noise effect on the target battler(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to create the Horror Effect for. + * @default ["user"] + * + * @arg noise:num + * @text Noise Rate + * @parent FilterNoise + * @desc Noise rate to be used with the target. + * @default 0.3 + * + * @arg animated:eval + * @text Noise Animated + * @parent FilterNoise + * @type boolean + * @on Animate + * @off Static + * @desc Animate the noise for the target? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Horror_NoiseRemove + * @text HORROR: Noise Remove + * @desc Removes the noise effect on the target battler(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to remove the Horror Effect for. + * @default ["user"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Horror_TVCreate + * @text HORROR: TV Create + * @desc Creates the TV effect on the target battler(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to create the Horror Effect for. + * @default ["user"] + * + * @arg lineWidth:num + * @text TV Line Thickness + * @parent FilterTV + * @type number + * @min 1 + * @desc Default TV line thickness + * Lower = thinner Higher = thicker + * @default 5 + * + * @arg vignetting:num + * @text TV Corner Size + * @parent FilterTV + * @desc Default TV line corner size + * Lower = smaller Higher = bigger + * @default 0.3 + * + * @arg animated:eval + * @text TV Animated + * @parent FilterTV + * @type boolean + * @on Animate + * @off Static + * @desc Animate the TV? + * @default true + * + * @arg aniSpeed:num + * @text TV Speed + * @parent FilterTV + * @desc Speed used to animate the TV if animated + * Lower = slower Higher = faster + * @default 0.25 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Horror_TVRemove + * @text HORROR: TV Remove + * @desc Removes the TV effect on the target battler(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to remove the Horror Effect for. + * @default ["user"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceImpact + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakImpact + * @text Action Sequences - Impact + * @desc These Action Sequences are related to creating impact. + * Requires VisuMZ_3_ActSeqImpact! + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Impact_ColorBreak + * @text IMPACT: Color Break + * @desc Breaks the colors on the screen before reassembling. + * Requires VisuMZ_3_ActSeqImpact! + * + * @arg Intensity:eval + * @text Intensity + * @desc What is the intensity of the color break effect? + * @default 60 + * + * @arg Duration:eval + * @text Duration + * @desc What is the duration of the color break effect? + * @default 60 + * + * @arg EasingType:str + * @text Easing Type + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * @default OutBack + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Impact_MotionBlurScreen + * @text IMPACT: Motion Blur Screen + * @desc Creates a motion blur on the whole screen. + * Requires VisuMZ_3_ActSeqImpact! + * + * @arg Angle:eval + * @text Angle + * @desc Determine what angle to make the motion blur at. + * @default Math.randomInt(360) + * + * @arg Rate:eval + * @text Intensity Rate + * @desc This determines intensity rate of the motion blur. + * Use a number between 0 and 1. + * @default 0.1 + * + * @arg Duration:num + * @text Duration + * @type number + * @min 1 + * @desc How many frames should the motion blur last? + * What do you want to be its duration? + * @default 30 + * + * @arg EasingType:str + * @text Easing Type + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * @default InOutSine + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Impact_MotionBlurTarget + * @text IMPACT: Motion Blur Target(s) + * @desc Creates a motion blur on selected target(s). + * Requires VisuMZ_3_ActSeqImpact! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to create motion blur effects for. + * @default ["user"] + * + * @arg Angle:eval + * @text Angle + * @desc Determine what angle to make the motion blur at. + * @default Math.randomInt(360) + * + * @arg Rate:eval + * @text Intensity Rate + * @desc This determines intensity rate of the motion blur. + * Use a number between 0 and 1. + * @default 0.5 + * + * @arg Duration:num + * @text Duration + * @type number + * @min 1 + * @desc How many frames should the motion blur last? + * What do you want to be its duration? + * @default 30 + * + * @arg EasingType:str + * @text Easing Type + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * @default InOutSine + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Impact_MotionTrailCreate + * @text IMPACT: Motion Trail Create + * @desc Creates a motion trail effect for the target(s). + * Requires VisuMZ_3_ActSeqImpact! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to create motion trail effects for. + * @default ["user"] + * + * @arg delay:num + * @text Delay + * @type number + * @min 1 + * @desc How many frames to delay by when creating a motion trail? + * The higher the delay, the less after images there are. + * @default 1 + * + * @arg duration:num + * @text Duration + * @type number + * @min 1 + * @desc How many frames should the motion trail last? + * What do you want to be its duration? + * @default 30 + * + * @arg hue:num + * @text Hue + * @type number + * @min 0 + * @max 255 + * @desc What do you want to be the hue for the motion trail? + * @default 0 + * + * @arg opacityStart:num + * @text Starting Opacity + * @type number + * @min 0 + * @max 255 + * @desc What starting opacity value do you want for the motion + * trail? Opacity values decrease over time. + * @default 200 + * + * @arg tone:eval + * @text Tone + * @desc What tone do you want for the motion trail? + * Format: [Red, Green, Blue, Gray] + * @default [0, 0, 0, 0] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Impact_MotionTrailRemove + * @text IMPACT: Motion Trail Remove + * @desc Removes the motion trail effect from the target(s). + * Requires VisuMZ_3_ActSeqImpact! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to clear motion trail effects for. + * @default ["user"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Impact_ShockwavePoint + * @text IMPACT: Shockwave at Point + * @desc Creates a shockwave at the designated coordinates. + * Requires VisuMZ_3_ActSeqImpact! + * + * @arg Coordinates + * + * @arg X:eval + * @text Point: X + * @parent Coordinates + * @desc What x coordinate do you want to create a shockwave at? + * You can use JavaScript code. + * @default Graphics.width / 2 + * + * @arg Y:eval + * @text Point: Y + * @parent Coordinates + * @desc What y coordinate do you want to create a shockwave at? + * You can use JavaScript code. + * @default (Graphics.height - 200) / 2 + * + * @arg Amp:eval + * @text Amplitude + * @desc What is the aplitude of the shockwave effect? + * @default 30 + * + * @arg Wave:eval + * @text Wavelength + * @desc What is the wavelength of the shockwave effect? + * @default 160 + * + * @arg Duration:eval + * @text Duration + * @desc What is the duration of the shockwave? + * @default 60 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Impact_ShockwaveEachTargets + * @text IMPACT: Shockwave from Each Target(s) + * @desc Creates a shockwave at each of the target(s) location(s). + * Requires VisuMZ_3_ActSeqImpact! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to start a shockwave from. + * @default ["all targets"] + * + * @arg TargetLocation:str + * @text Target Location + * @parent Targets2:arraystr + * @type combo + * @option front head + * @option front center + * @option front base + * @option middle head + * @option middle center + * @option middle base + * @option back head + * @option back center + * @option back base + * @desc Select which part target group to start a shockwave from. + * @default middle center + * + * @arg OffsetX:eval + * @text Offset X + * @parent TargetLocation:str + * @desc How much to offset the shockwave X point by. + * Negative: left. Positive: right. + * @default +0 + * + * @arg OffsetY:eval + * @text Offset Y + * @parent TargetLocation:str + * @desc How much to offset the shockwave Y point by. + * Negative: up. Positive: down. + * @default +0 + * + * @arg Amp:eval + * @text Amplitude + * @desc What is the aplitude of the shockwave effect? + * @default 30 + * + * @arg Wave:eval + * @text Wavelength + * @desc What is the wavelength of the shockwave effect? + * @default 160 + * + * @arg Duration:eval + * @text Duration + * @desc What is the duration of the shockwave? + * @default 60 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Impact_ShockwaveCenterTargets + * @text IMPACT: Shockwave from Target(s) Center + * @desc Creates a shockwave from the center of the target(s). + * Requires VisuMZ_3_ActSeqImpact! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to start a shockwave from. + * @default ["all targets"] + * + * @arg TargetLocation:str + * @text Target Location + * @parent Targets2:arraystr + * @type combo + * @option front head + * @option front center + * @option front base + * @option middle head + * @option middle center + * @option middle base + * @option back head + * @option back center + * @option back base + * @desc Select which part target group to start a shockwave from. + * @default middle center + * + * @arg OffsetX:eval + * @text Offset X + * @parent TargetLocation:str + * @desc How much to offset the shockwave X point by. + * Negative: left. Positive: right. + * @default +0 + * + * @arg OffsetY:eval + * @text Offset Y + * @parent TargetLocation:str + * @desc How much to offset the shockwave Y point by. + * Negative: up. Positive: down. + * @default +0 + * + * @arg Amp:eval + * @text Amplitude + * @desc What is the aplitude of the shockwave effect? + * @default 30 + * + * @arg Wave:eval + * @text Wavelength + * @desc What is the wavelength of the shockwave effect? + * @default 160 + * + * @arg Duration:eval + * @text Duration + * @desc What is the duration of the shockwave? + * @default 60 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Impact_ZoomBlurPoint + * @text IMPACT: Zoom Blur at Point + * @desc Creates a zoom blur at the designated coordinates. + * Requires VisuMZ_3_ActSeqImpact! + * + * @arg Coordinates + * + * @arg X:eval + * @text Point: X + * @parent Coordinates + * @desc What x coordinate do you want to focus the zoom at? + * You can use JavaScript code. + * @default Graphics.width / 2 + * + * @arg Y:eval + * @text Point: Y + * @parent Coordinates + * @desc What y coordinate do you want to focus the zoom at? + * You can use JavaScript code. + * @default (Graphics.height - 200) / 2 + * + * @arg Strength:eval + * @text Zoom Strength + * @desc What is the strength of the zoom effect? + * Use a number between 0 and 1. + * @default 0.5 + * + * @arg Radius:eval + * @text Visible Radius + * @desc How much of a radius should be visible from the center? + * @default 0 + * + * @arg Duration:eval + * @text Duration + * @desc What is the duration of the zoom blur? + * @default 60 + * + * @arg EasingType:str + * @text Easing Type + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * @default OutSine + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Impact_ZoomBlurTargetCenter + * @text IMPACT: Zoom Blur at Target(s) Center + * @desc Creates a zoom blur at the center of targets. + * Requires VisuMZ_3_ActSeqImpact! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to start a zoom blur from. + * @default ["user"] + * + * @arg TargetLocation:str + * @text Target Location + * @parent Targets2:arraystr + * @type combo + * @option front head + * @option front center + * @option front base + * @option middle head + * @option middle center + * @option middle base + * @option back head + * @option back center + * @option back base + * @desc Select which part target group to start a zoom blur from. + * @default middle center + * + * @arg OffsetX:eval + * @text Offset X + * @parent TargetLocation:str + * @desc How much to offset the zoom blur X point by. + * Negative: left. Positive: right. + * @default +0 + * + * @arg OffsetY:eval + * @text Offset Y + * @parent TargetLocation:str + * @desc How much to offset the zoom blur Y point by. + * Negative: up. Positive: down. + * @default +0 + * + * @arg Strength:eval + * @text Zoom Strength + * @desc What is the strength of the zoom effect? + * Use a number between 0 and 1. + * @default 0.5 + * + * @arg Radius:eval + * @text Visible Radius + * @desc How much of a radius should be visible from the center? + * @default 0 + * + * @arg Duration:eval + * @text Duration + * @desc What is the duration of the zoom blur? + * @default 60 + * + * @arg EasingType:str + * @text Easing Type + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * @default OutSine + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceMechanics + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakMechanics + * @text Action Sequences - Mechanics + * @desc These Action Sequences are related to various mechanics + * related to the battle system. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_ActionEffect + * @text MECH: Action Effect + * @desc Causes the unit(s) to take damage/healing from action and + * incurs any changes made such as buffs and states. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to receive the current action's effects. + * @default ["all targets"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_AddBuffDebuff + * @text MECH: Add Buff/Debuff + * @desc Adds buff(s)/debuff(s) to unit(s). + * Determine which parameters are affected and their durations. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to receive the buff(s) and/or debuff(s). + * @default ["user"] + * + * @arg Buffs:arraystr + * @text Buff Parameters + * @type combo[] + * @option MaxHP + * @option MaxMP + * @option ATK + * @option DEF + * @option MAT + * @option MDF + * @option AGI + * @option LUK + * @desc Select which parameter(s) to buff. + * Insert a parameter multiple times to raise its stacks. + * @default ["ATK"] + * + * @arg Debuffs:arraystr + * @text Debuff Parameters + * @type combo[] + * @option MaxHP + * @option MaxMP + * @option ATK + * @option DEF + * @option MAT + * @option MDF + * @option AGI + * @option LUK + * @desc Select which parameter(s) to debuff. + * Insert a parameter multiple times to raise its stacks. + * @default ["DEF"] + * + * @arg Turns:eval + * @text Turns + * @desc Number of turns to set the parameter(s) buffs to. + * You may use JavaScript code. + * @default 5 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_AddState + * @text MECH: Add State + * @desc Adds state(s) to unit(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to receive the buff(s). + * @default ["user"] + * + * @arg States:arraynum + * @text States + * @type state[] + * @desc Select which state ID(s) to add to unit(s). + * Insert multiple state ID's to add multiple at once. + * @default ["4"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_AnalyzeWeakness + * @text MECH: Analyze Weakness + * @desc Reveal elemental weakness(es) from target(s). + * Requires VisuMZ_3_WeaknessDisplay! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to reveal elemental weaknesses for. + * @default ["all targets"] + * + * @arg Reveal:eval + * @text Reveal + * @desc How many elemental weaknesses do you wish to reveal? + * You may use JavaScript code. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_ArmorPenetration + * @text MECH: Armor Penetration + * @desc Adds an extra layer of defensive penetration/reduction. + * You may use JavaScript code for any of these. + * + * @arg ArmorPenetration + * @text Armor/Magic Penetration + * + * @arg ArPenRate:eval + * @text Rate + * @parent ArmorPenetration + * @desc Penetrates an extra multiplier of armor by this value. + * @default 0.00 + * + * @arg ArPenFlat:eval + * @text Flat + * @parent ArmorPenetration + * @desc Penetrates a flat amount of armor by this value. + * @default 0 + * + * @arg ArmorReduction + * @text Armor/Magic Reduction + * + * @arg ArRedRate:eval + * @text Rate + * @parent ArmorReduction + * @desc Reduces an extra multiplier of armor by this value. + * @default 0.00 + * + * @arg ArRedFlat:eval + * @text Flat + * @parent ArmorReduction + * @desc Reduces a flat amount of armor by this value. + * @default 0 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_AtbGauge + * @text MECH: ATB Gauge + * @desc Alters the ATB/TPB Gauges. + * Requires VisuMZ_2_BattleSystemATB! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to alter the ATB/TPB Gauges for. + * @default ["all targets"] + * + * @arg Charging + * + * @arg ChargeRate:eval + * @text Charge Rate + * @parent Charging + * @desc Changes made to the ATB Gauge if it is currently charging. + * @default -0.00 + * + * @arg Casting + * + * @arg CastRate:eval + * @text Cast Rate + * @parent Casting + * @desc Changes made to the ATB Gauge if it is currently casting. + * @default -0.00 + * + * @arg Interrupt:eval + * @text Interrupt? + * @parent Casting + * @type boolean + * @on Interrupt + * @off Don't Interrupt + * @desc Interrupt the ATB Gauge if it is currently casting? + * @default false + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_BoostPointsChange + * @text MECH: Boost Points Change + * @desc Changes Boost Points for target(s). + * Requires VisuMZ_3_BoostAction! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to alter the Boost Points for. + * @default ["user"] + * + * @arg BoostPoints:eval + * @text Alter Boost Points By + * @desc Alters the unit(s) Boost Points. + * Positive for gaining points. Negative for losing points. + * @default +1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_BoostPointsStoreData + * @text MECH: Boost Store Data + * @desc Stores the number of Boosts used this action inside a variable. + * Requires VisuMZ_3_BoostAction! + * + * @arg VariableID:num + * @text Variable ID + * @type variable + * @desc Which variable do you want to store the data inside? + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_BreakShieldChange + * @text MECH: Break Shield Change + * @desc Changes Break Shields for target(s) if not Break Stunned. + * Requires VisuMZ_4_BreakShields! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to alter the Break Shields for. + * @default ["all targets"] + * + * @arg BreakShields:eval + * @text Alter Break Shields By + * @desc Alters the unit(s) Break Shields. + * Positive for gaining shields. Negative for losing shields. + * @default -1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_BreakShieldReset + * @text MECH: Break Shield Reset + * @desc Resets Break Shields for target(s) if not Break Stunned. + * Requires VisuMZ_4_BreakShields! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to reset the Break Shields for. + * @default ["all targets"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_BtbGain + * @text MECH: BTB Brave Points + * @desc Alters the target(s) Brave Points to an exact value. + * Requires VisuMZ_2_BattleSystemBTB! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to alter the ATB/TPB Gauges for. + * @default ["all targets"] + * + * @arg BravePoints:eval + * @text Alter Brave Points By + * @desc Alters the target(s) Brave Points. + * Positive for gaining BP. Negative for losing BP. + * @default +1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_Collapse + * @text MECH: Collapse + * @desc Causes the unit(s) to perform its collapse animation + * if the unit(s) has died. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to process a death collapse. + * @default ["all targets"] + * + * @arg ForceDeath:eval + * @text Force Death + * @type boolean + * @on On + * @off Off + * @desc Force death even if the unit has not reached 0 HP? + * This will remove immortality. + * @default false + * + * @arg WaitForEffect:eval + * @text Wait For Effect? + * @type boolean + * @on On + * @off Off + * @desc Wait for the collapse effect to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_CtbOrder + * @text MECH: CTB Order + * @desc Alters the CTB Turn Order. + * Requires VisuMZ_2_BattleSystemCTB! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to alter the CTB Turn Order for. + * @default ["all targets"] + * + * @arg ChangeOrderBy:eval + * @text Change Order By + * @parent Charging + * @desc Changes turn order for target(s) by this amount. + * Positive increases wait. Negative decreases wait. + * @default +1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_CtbSpeed + * @text MECH: CTB Speed + * @desc Alters the CTB Speed. + * Requires VisuMZ_2_BattleSystemCTB! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to alter the CTB Speed for. + * @default ["all targets"] + * + * @arg ChargeRate:eval + * @text Charge Rate + * @parent Charging + * @desc Changes made to the CTB Speed if it is currently charging. + * @default -0.00 + * + * @arg CastRate:eval + * @text Cast Rate + * @parent Casting + * @desc Changes made to the CTB Speed if it is currently casting. + * @default -0.00 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_CustomDmgFormula + * @text MECH: Custom Damage Formula + * @desc Changes the current action's damage formula to custom. + * This will assume the MANUAL damage style. + * + * @arg Formula:str + * @text Formula + * @desc Changes the current action's damage formula to custom. + * Use 'default' to revert the damage formula. + * @default default + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_DamagePopup + * @text MECH: Damage Popup + * @desc Causes the unit(s) to display the current state of + * damage received or healed. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to prompt a damage popup. + * @default ["all targets"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_DeathBreak + * @text MECH: Dead Label Jump + * @desc If the active battler is dead, jump to a specific label in the common event. + * + * @arg JumpToLabel:str + * @text Jump To Label + * @desc If the active battler is dead, jump to this specific label in the common event. + * @default Untitled + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_EnemyEscape + * @text MECH: Enemy Escape + * @desc Causes the enemy unit(s) to escape. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to escape. + * @default ["user"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_EtbAction + * @text MECH: ETB Energy Count + * @desc Alters the subject team's available Energy Count. + * Requires VisuMZ_2_BattleSystemETB! + * + * @arg ActionCount:eval + * @text Energy Count + * @desc Alters the subject team's available Energy Count. + * Positive for gaining energy. Negative for losing energy. + * @default +1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_FtbAction + * @text MECH: FTB Action Count + * @desc Alters the subject team's available Action Count. + * Requires VisuMZ_2_BattleSystemFTB! + * + * @arg ActionCount:eval + * @text Action Count + * @desc Alters the subject team's available Action Count. + * Positive for gaining actions. Negative for losing actions. + * @default +1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_HpMpTp + * @text MECH: HP, MP, TP + * @desc Alters the HP, MP, and TP values for unit(s). + * Positive values for healing. Negative values for damage. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to receive the current action's effects. + * @default ["user"] + * + * @arg HP + * + * @arg HP_Rate:eval + * @text HP Rate + * @parent HP + * @desc Changes made to HP based on rate. + * Positive values for healing. Negative values for damage. + * @default +0.00 + * + * @arg HP_Flat:eval + * @text HP Flat + * @parent HP + * @desc Flat changes made to HP. + * Positive values for healing. Negative values for damage. + * @default +0 + * + * @arg MP + * + * @arg MP_Rate:eval + * @text MP Rate + * @parent MP + * @desc Changes made to MP based on rate. + * Positive values for healing. Negative values for damage. + * @default +0.00 + * + * @arg MP_Flat:eval + * @text MP Flat + * @parent MP + * @desc Flat changes made to MP. + * Positive values for healing. Negative values for damage. + * @default +0 + * + * @arg TP + * + * @arg TP_Rate:eval + * @text TP Rate + * @parent TP + * @desc Changes made to TP based on rate. + * Positive values for healing. Negative values for damage. + * @default +0.00 + * + * @arg TP_Flat:eval + * @text TP Flat + * @parent TP + * @desc Flat changes made to TP. + * Positive values for healing. Negative values for damage. + * @default +0 + * + * @arg ShowPopup:eval + * @text Damage Popup? + * @type boolean + * @on On + * @off Off + * @desc Display a damage popup after? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_Immortal + * @text MECH: Immortal + * @desc Changes the immortal flag of targets. If immortal flag is + * removed and a unit would die, collapse that unit. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Alter the immortal flag of these groups. If immortal flag + * is removed and a unit would die, collapse that unit. + * @default ["user","all targets"] + * + * @arg Immortal:eval + * @text Immortal + * @type boolean + * @on On + * @off Off + * @desc Turn immortal flag for unit(s) on/off? + * @default false + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_Multipliers + * @text MECH: Multipliers + * @desc Changes the multipliers for the current action. + * You may use JavaScript code for any of these. + * + * @arg CriticalHit + * @text Critical Hit% + * + * @arg CriticalHitRate:eval + * @text Rate + * @parent CriticalHit + * @desc Affects chance to land a critical hit by this multiplier. + * @default 1.00 + * + * @arg CriticalHitFlat:eval + * @text Flat + * @parent CriticalHit + * @desc Affects chance to land a critical hit by this flat bonus. + * @default +0.00 + * + * @arg CriticalDmg + * @text Critical Damage + * + * @arg CriticalDmgRate:eval + * @text Rate + * @parent CriticalDmg + * @desc Affects critical damage by this multiplier. + * @default 1.00 + * + * @arg CriticalDmgFlat:eval + * @text Flat + * @parent CriticalDmg + * @desc Affects critical damage by this flat bonus. + * @default +0.00 + * + * @arg Damage + * @text Damage/Healing + * + * @arg DamageRate:eval + * @text Rate + * @parent Damage + * @desc Sets the damage/healing multiplier for current action. + * @default 1.00 + * + * @arg DamageFlat:eval + * @text Flat + * @parent Damage + * @desc Sets the damage/healing bonus for current action. + * @default +0.00 + * + * @arg HitRate + * @text Hit Rate + * + * @arg HitRate:eval + * @text Rate + * @parent HitRate + * @desc Affects chance to connect attack by this multiplier. + * @default 1.00 + * + * @arg HitFlat:eval + * @text Flat + * @parent HitRate + * @desc Affects chance to connect attack by this flat bonus. + * @default +0.00 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_OnceParallel + * @text MECH: Once Parallel + * @desc Plays a Common Event parallel to the battle event once + * without repeating itself when done. + * + * @arg CommonEventID:num + * @text Common Event ID + * @type common_event + * @desc The ID of the parallel Common Event to play. + * Does NOT repeat itself when finished. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_OtbOrder + * @text MECH: OTB Order + * @desc Alters the OTB Turn Order. Best used with single targets. + * Requires VisuMZ_2_BattleSystemOTB! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to alter the OTB Turn Order for. + * @default ["all targets"] + * + * @arg CurrentTurn:eval + * @text Current Turn By + * @parent Charging + * @desc Changes turn order for target(s) by this amount. + * Positive increases wait. Negative decreases wait. + * @default +0 + * + * @arg NextTurn:eval + * @text Next Turn By + * @parent Charging + * @desc Changes turn order for target(s) by this amount. + * Positive increases wait. Negative decreases wait. + * @default +1 + * + * @arg FollowTurn:eval + * @text Follow Turn By + * @parent Charging + * @desc Changes turn order for target(s) by this amount. + * Positive increases wait. Negative decreases wait. + * @default +0 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_PtbAlterCost + * @text MECH: PTB Alter Cost + * @desc Alters the action's cost settings. + * Requires VisuMZ_2_BattleSystemPTB! + * + * @arg Override:eval + * @text Override? + * @type boolean + * @on Override Permanent + * @off Require Temporary + * @desc Overrides any 'permanent' settings for Changeability? + * @default false + * + * @arg alterChange:str + * @text Alter Changeability + * @type select + * @option Unchanged - Cost type is unchanged after this effect + * @value unchanged + * @option Permanent - Cost type can no longer be changed after + * @value permanent + * @option Temporary - Cost type can still be changed after + * @value temporary + * @desc Allow the cost type and value to be changeable? + * @default unchanged + * + * @arg alterType:str + * @text Alter Cost Type + * @type select + * @option Unchanged - No changes are made + * @value unchanged + * @option Consume - Removes half, otherwise consumes full + * @value consume + * @option Convert - Converts full => half, otherwise consumes half + * @value convert + * @option Compress - Consumes half, otherwise converts full => half + * @value compress + * @desc Change the cost type to this scenario. + * Use 'Unchanged' for no changes. + * @default convert + * + * @arg alterCost:eval + * @text Alter Cost Value + * @desc What is the default action cost for this scenario? + * @default +0 + * + * @arg alterPriority:eval + * @text Priority + * @desc What is this scenario's priority? Scenario outcomes with + * equal or lower priorities cannot override types and costs. + * @default 50 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_PtbConvert + * @text MECH: PTB Conversion + * @desc Converts full actions into half actions. + * Requires VisuMZ_2_BattleSystemPTB! + * + * @arg ConvertCount:eval + * @text Conversion Count + * @desc Converts full actions into half actions. + * If not enough, consume half actions. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_PtbFullHalfAction + * @text MECH: PTB Full/Half Action(s) + * @desc Alters the subject team's available Full/Half Actions. + * Requires VisuMZ_2_BattleSystemPTB! + * + * @arg FullActions:eval + * @text Full Actions + * @desc Alters the subject team's available Full Actions. + * Positive for gaining. Negative for losing. + * @default +0 + * + * @arg HalfActions:eval + * @text Half Actions + * @desc Alters the subject team's available Half Actions. + * Positive for gaining. Negative for losing. + * @default +0 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_RemoveBuffDebuff + * @text MECH: Remove Buff/Debuff + * @desc Removes buff(s)/debuff(s) from unit(s). + * Determine which parameters are removed. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to have the buff(s) and/or debuff(s) removed. + * @default ["user"] + * + * @arg Buffs:arraystr + * @text Buff Parameters + * @type combo[] + * @option MaxHP + * @option MaxMP + * @option ATK + * @option DEF + * @option MAT + * @option MDF + * @option AGI + * @option LUK + * @desc Select which buffed parameter(s) to remove. + * @default ["MaxHP","MaxMP","ATK","DEF","MAT","MDF","AGI","LUK"] + * + * @arg Debuffs:arraystr + * @text Debuff Parameters + * @type combo[] + * @option MaxHP + * @option MaxMP + * @option ATK + * @option DEF + * @option MAT + * @option MDF + * @option AGI + * @option LUK + * @desc Select which debuffed parameter(s) to remove. + * @default ["MaxHP","MaxMP","ATK","DEF","MAT","MDF","AGI","LUK"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_RemoveState + * @text MECH: Remove State + * @desc Remove state(s) from unit(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to have states removed from. + * @default ["user"] + * + * @arg States:arraynum + * @text States + * @type state[] + * @desc Select which state ID(s) to remove from unit(s). + * Insert multiple state ID's to remove multiple at once. + * @default ["4"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_StbExploit + * @text MECH: STB Exploit Effect + * @desc Utilize the STB Exploitation mechanics! + * Requires VisuMZ_2_BattleSystemSTB! + * + * @arg Exploited:eval + * @text Target(s) Exploited? + * @type boolean + * @on Exploit + * @off Don't + * @desc Exploit the below targets? + * @default true + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to become exploited. + * @default ["all targets"] + * + * @arg ForceExploited:eval + * @text Force Exploitation + * @type boolean + * @on Force + * @off Don't + * @desc Force the exploited status? + * @default false + * + * @arg Exploiter:eval + * @text User Exploiter? + * @type boolean + * @on Exploit + * @off Don't + * @desc Allow the user to become the exploiter? + * @default true + * + * @arg ForceExploited:eval + * @text Force Exploitation + * @type boolean + * @on Force + * @off Don't + * @desc Force the exploiter status? + * @default false + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_StbExtraAction + * @text MECH: STB Extra Action + * @desc Adds an extra action for the currently active battler. + * Requires VisuMZ_2_BattleSystemSTB! + * + * @arg Actions:eval + * @text Extra Actions + * @parent Charging + * @desc How many extra actions should the active battler gain? + * You may use JavaScript code. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_StbRemoveExcessActions + * @text MECH: STB Remove Excess Actions + * @desc Removes excess actions from the active battler. + * Requires VisuMZ_2_BattleSystemSTB! + * + * @arg Actions:eval + * @text Remove Actions + * @parent Charging + * @desc How many actions to remove from the active battler? + * You may use JavaScript code. + * @default 99 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_SwapWeapon + * @text MECH: Swap Weapon + * @desc Causes the unit(s) to swap their weapon for another. + * Requires VisuMZ_2_WeaponSwapSystem! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to swap weapons for. + * @default ["user"] + * + * @arg WeaponTypeID:eval + * @text Weapon Type ID + * @desc Which weapon type to swap to? + * This is NOT the weapon's ID. It's the weapon TYPE. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_TextPopup + * @text MECH: Text Popup + * @desc Causes the unit(s) to display a text popup. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to prompt a text popup. + * @default ["target"] + * + * @arg Text:str + * @text Text + * @desc What text do you wish to display? + * @default Text + * + * @arg TextColor:str + * @text Text Color + * @parent Text:str + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default #ffffff + * + * @arg FlashColor:eval + * @text Flash Color + * @parent Popups + * @desc Adjust the popup's flash color. + * Format: [red, green, blue, alpha] + * @default [255, 0, 0, 160] + * + * @arg FlashDuration:num + * @text Flash Duration + * @parent FlashColor:eval + * @type number + * @desc What is the frame duration of the flash effect? + * @default 60 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_VariablePopup + * @text MECH: Variable Popup + * @desc Causes the unit(s) to display a popup using the data + * stored inside a variable. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select unit(s) to prompt a text popup. + * @default ["target"] + * + * @arg Variable:num + * @text Variable ID + * @type variable + * @desc Get data from which variable to display as a popup? + * @default 1 + * + * @arg DigitGrouping:eval + * @text Digit Grouping + * @parent Variable:num + * @type boolean + * @on Group Digits + * @off Don't Group + * @desc Use digit grouping to separate numbers? + * Requires VisuMZ_0_CoreEngine! + * @default true + * + * @arg TextColor:str + * @text Text Color + * @parent Variable:num + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default #ffffff + * + * @arg FlashColor:eval + * @text Flash Color + * @parent Popups + * @desc Adjust the popup's flash color. + * Format: [red, green, blue, alpha] + * @default [0, 0, 0, 0] + * + * @arg FlashDuration:num + * @text Flash Duration + * @parent FlashColor:eval + * @type number + * @desc What is the frame duration of the flash effect? + * @default 60 + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Mechanics_WaitForEffect + * @text MECH: Wait For Effect + * @desc Waits for the effects to complete before performing next command. + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceMotion + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakMotion + * @text Action Sequences - Motion + * @desc These Action Sequences allow you the ability to control + * the motions of sideview sprites. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Motion_ClearFreezeFrame + * @text MOTION: Clear Freeze Frame + * @desc Clears any freeze frames from the unit(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to clear freeze frames for. + * @default ["user"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Motion_FreezeMotionFrame + * @text MOTION: Freeze Motion Frame + * @desc Forces a freeze frame instantly at the selected motion. + * Automatically clears with a new motion. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to freeze motions for. + * @default ["user"] + * + * @arg MotionType:str + * @text Motion Type + * @type combo + * @option walk + * @option wait + * @option chant + * @option guard + * @option damage + * @option evade + * @option attack + * @option thrust + * @option swing + * @option missile + * @option skill + * @option spell + * @option item + * @option escape + * @option victory + * @option dying + * @option abnormal + * @option sleep + * @option dead + * @desc Freeze this motion for the unit(s). + * @default attack + * + * @arg Frame:num + * @text Frame Index + * @desc Which frame do you want to freeze the motion on? + * Frame index values start at 0. + * @default 2 + * + * @arg ShowWeapon:eval + * @text Show Weapon? + * @type combo + * @type boolean + * @on Show + * @off Hide + * @desc If using 'attack', 'thrust', 'swing', or 'missile', + * display the weapon sprite? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Motion_MotionType + * @text MOTION: Motion Type + * @desc Causes the unit(s) to play the selected motion. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to perform a motion. + * @default ["user"] + * + * @arg MotionType:str + * @text Motion Type + * @type combo + * @option walk + * @option wait + * @option chant + * @option guard + * @option damage + * @option evade + * @option attack + * @option thrust + * @option swing + * @option missile + * @option skill + * @option spell + * @option item + * @option escape + * @option victory + * @option dying + * @option abnormal + * @option sleep + * @option dead + * @desc Play this motion for the unit(s). + * @default attack + * + * @arg ShowWeapon:eval + * @text Show Weapon? + * @type combo + * @type boolean + * @on Show + * @off Hide + * @desc If using 'attack', 'thrust', 'swing', or 'missile', + * display the weapon sprite? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Motion_PerformAction + * @text MOTION: Perform Action + * @desc Causes the unit(s) to play the proper motion based + * on the current action. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to perform a motion. + * @default ["user"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Motion_RefreshMotion + * @text MOTION: Refresh Motion + * @desc Cancels any set motions unit(s) has to do and use + * their most natural motion at the moment. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to refresh their motion state. + * @default ["user"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Motion_WaitMotionFrame + * @text MOTION: Wait By Motion Frame + * @desc Creates a wait equal to the number of motion frames passing. + * Time is based on Plugin Parameters => Actors => Motion Speed. + * + * @arg MotionFrameWait:num + * @text Motion Frames to Wait? + * @type number + * @min 1 + * @desc Each "frame" is equal to the value found in + * Plugin Parameters => Actors => Motion Speed + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceMovement + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakMovement + * @text Action Sequences - Movement + * @desc These Action Sequences allow you the ability to control + * the sprites of actors and enemies in battle. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_BattleStep + * @text MOVE: Battle Step + * @desc Causes the unit(s) to move forward past their home position + * to prepare for action. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to move. + * @default ["user"] + * + * @arg WaitForMovement:eval + * @text Wait For Movement? + * @type boolean + * @on On + * @off Off + * @desc Wait for movement to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_HomeMoveBy + * @text MOVE: Change Home By Distance + * @desc Change unit(s)'s home position by a distance from their + * current home position(s). Sideview-only! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to change home position(s) for. + * @default ["user"] + * + * @arg DistanceAdjust:str + * @text Distance Adjustment + * @type select + * @option Normal - No adjustments made + * @value none + * @option Horizontal - Actors adjust left, Enemies adjust right + * @value horz + * @option Vertical - Actors adjust Up, Enemies adjust down + * @value vert + * @option Both - Applies both Horizontal and Vertical + * @value horz + vert + * @desc Makes adjustments to distance values to determine + * which direction to change by. + * @default horz + * + * @arg DistanceX:eval + * @text Distance: X + * @parent DistanceAdjust:str + * @desc Horizontal distance to change home by. + * You may use JavaScript code. + * @default 48 + * + * @arg DistanceY:eval + * @text Distance: Y + * @parent DistanceAdjust:str + * @desc Vertical distance to change home by. + * You may use JavaScript code. + * @default 0 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for total change amount. + * @default 12 + * + * @arg FaceDirection:eval + * @text Face Destination? + * @type boolean + * @on Turn + * @off Don't + * @desc Turn and face the destination? + * @default true + * + * @arg EasingType:str + * @text Movement Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg MotionType:str + * @text Movement Motion + * @type combo + * @option walk + * @option wait + * @option chant + * @option guard + * @option damage + * @option evade + * @option thrust + * @option swing + * @option missile + * @option skill + * @option spell + * @option item + * @option escape + * @option victory + * @option dying + * @option abnormal + * @option sleep + * @option dead + * @desc Play this motion for the unit(s). + * @default walk + * + * @arg WaitForMovement:eval + * @text Wait For Movement? + * @type boolean + * @on On + * @off Off + * @desc Wait for movement to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_HomeMoveToPoint + * @text MOVE: Change Home To Point + * @desc Change home position(s) to a target point on the screen. + * Sideview-only! Points based off Graphics.boxWidth/Height. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to change home position(s) for. + * @default ["user"] + * + * @arg Destination:str + * @text Destination Point + * @type combo + * @option center + * @option point x, y + * @desc Select which point to face. + * Replace 'x' and 'y' with coordinates + * @default center + * + * @arg OffsetAdjust:str + * @text Offset Adjustment + * @parent Destination:str + * @type select + * @option Normal - No adjustments made + * @value none + * @option Horizontal - Actors adjust left, Enemies adjust right + * @value horz + * @option Vertical - Actors adjust Up, Enemies adjust down + * @value vert + * @option Both - Applies both Horizontal and Vertical + * @value horz + vert + * @desc Makes adjustments to offset values to determine + * which direction to adjust the destination by. + * @default horz + * + * @arg OffsetX:eval + * @text Offset: X + * @parent OffsetAdjust:str + * @desc Horizontal offset to change home by. + * You may use JavaScript code. + * @default 0 + * + * @arg OffsetY:eval + * @text Offset: Y + * @parent OffsetAdjust:str + * @desc Vertical offset to change home by. + * You may use JavaScript code. + * @default 0 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for total change amount. + * @default 12 + * + * @arg FaceDirection:eval + * @text Face Destination? + * @type boolean + * @on Turn + * @off Don't + * @desc Turn and face the destination? + * @default true + * + * @arg EasingType:str + * @text Movement Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg MotionType:str + * @text Movement Motion + * @type combo + * @option walk + * @option wait + * @option chant + * @option guard + * @option damage + * @option evade + * @option thrust + * @option swing + * @option missile + * @option skill + * @option spell + * @option item + * @option escape + * @option victory + * @option dying + * @option abnormal + * @option sleep + * @option dead + * @desc Play this motion for the unit(s). + * @default walk + * + * @arg WaitForMovement:eval + * @text Wait For Movement? + * @type boolean + * @on On + * @off Off + * @desc Wait for movement to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_HomeMoveToTarget + * @text MOVE: Change Home To Target(s) + * @desc Moves unit(s) to another unit(s) on the battle field. + * Sideview-only! + * + * @arg Targets1:arraystr + * @text Targets (Moving) + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to change home position(s) for. + * @default ["user"] + * + * @arg Targets2:arraystr + * @text Targets (Destination) + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to change home position to. + * @default ["all targets"] + * + * @arg TargetLocation:str + * @text Target Location + * @parent Targets2:arraystr + * @type combo + * @option front head + * @option front center + * @option front base + * @option middle head + * @option middle center + * @option middle base + * @option back head + * @option back center + * @option back base + * @desc Select which part target group to change home position to. + * @default front base + * + * @arg MeleeDistance:eval + * @text Melee Distance + * @parent TargetLocation:str + * @desc The melee distance away from the target location + * in addition to the battler's width. + * @default 24 + * + * @arg OffsetAdjust:str + * @text Offset Adjustment + * @parent Targets2:arraystr + * @type select + * @option Normal - No adjustments made + * @value none + * @option Horizontal - Actors adjust left, Enemies adjust right + * @value horz + * @option Vertical - Actors adjust Up, Enemies adjust down + * @value vert + * @option Both - Applies both Horizontal and Vertical + * @value horz + vert + * @desc Makes adjustments to offset values to determine + * which direction to adjust the destination by. + * @default horz + * + * @arg OffsetX:eval + * @text Offset: X + * @parent OffsetAdjust:str + * @desc Horizontal offset to change home by. + * You may use JavaScript code. + * @default 0 + * + * @arg OffsetY:eval + * @text Offset: Y + * @parent OffsetAdjust:str + * @desc Vertical offset to change home by. + * You may use JavaScript code. + * @default 0 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for total change amount. + * @default 12 + * + * @arg FaceDirection:eval + * @text Face Destination? + * @type boolean + * @on Turn + * @off Don't + * @desc Turn and face the destination? + * @default true + * + * @arg EasingType:str + * @text Movement Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg MotionType:str + * @text Movement Motion + * @type combo + * @option walk + * @option wait + * @option chant + * @option guard + * @option damage + * @option evade + * @option thrust + * @option swing + * @option missile + * @option skill + * @option spell + * @option item + * @option escape + * @option victory + * @option dying + * @option abnormal + * @option sleep + * @option dead + * @desc Play this motion for the unit(s). + * @default walk + * + * @arg WaitForMovement:eval + * @text Wait For Movement? + * @type boolean + * @on On + * @off Off + * @desc Wait for movement to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_FaceDirection + * @text MOVE: Face Direction + * @desc Causes the unit(s) to face forward or backward. + * Sideview-only! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to change direction. + * @default ["user"] + * + * @arg Direction:str + * @text Direction + * @type combo + * @option forward + * @option backward + * @option random + * @desc Select which direction to face. + * @default forward + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_FacePoint + * @text MOVE: Face Point + * @desc Causes the unit(s) to face a point on the screen. + * Sideview-only! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to change direction. + * @default ["user"] + * + * @arg Point:str + * @text Point + * @type combo + * @option home + * @option center + * @option point x, y + * @desc Select which point to face. + * Replace 'x' and 'y' with coordinates + * @default home + * + * @arg FaceAway:eval + * @text Face Away From? + * @type boolean + * @on Turn Away + * @off Face Directly + * @desc Face away from the point instead? + * @default false + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_FaceTarget + * @text MOVE: Face Target(s) + * @desc Causes the unit(s) to face other targets on the screen. + * Sideview-only! + * + * @arg Targets1:arraystr + * @text Targets (facing) + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to change direction. + * @default ["user"] + * + * @arg Targets2:arraystr + * @text Targets (destination) + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) for the turning unit(s) to face. + * @default ["current target"] + * + * @arg FaceAway:eval + * @text Face Away From? + * @type boolean + * @on Turn Away + * @off Face Directly + * @desc Face away from the unit(s) instead? + * @default false + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_Float + * @text MOVE: Float + * @desc Causes the unit(s) to float above the ground. + * Sideview-only! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to make float. + * @default ["user"] + * + * @arg Height:eval + * @text Desired Height + * @desc Vertical distance to float upward. + * You may use JavaScript code. + * @default 100 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for total float amount. + * @default 12 + * + * @arg EasingType:str + * @text Float Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg WaitForFloat:eval + * @text Wait For Float? + * @type boolean + * @on On + * @off Off + * @desc Wait for floating to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_HomeReset + * @text MOVE: Home Reset + * @desc Causes the unit(s) to move back to their home position(s) + * and face back to their original direction(s). + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to move. + * @default ["alive battlers"] + * + * @arg WaitForMovement:eval + * @text Wait For Movement? + * @type boolean + * @on On + * @off Off + * @desc Wait for movement to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_Jump + * @text MOVE: Jump + * @desc Causes the unit(s) to jump into the air. + * Sideview-only! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to make jump. + * @default ["user"] + * + * @arg Height:eval + * @text Desired Height + * @desc Max jump height to go above the ground + * You may use JavaScript code. + * @default 100 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for total jump amount. + * @default 12 + * + * @arg WaitForJump:eval + * @text Wait For Jump? + * @type boolean + * @on On + * @off Off + * @desc Wait for jumping to complete before performing next command? + * @default false + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_MoveBy + * @text MOVE: Move Distance + * @desc Moves unit(s) by a distance from their current position(s). + * Sideview-only! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to move. + * @default ["user"] + * + * @arg DistanceAdjust:str + * @text Distance Adjustment + * @type select + * @option Normal - No adjustments made + * @value none + * @option Horizontal - Actors adjust left, Enemies adjust right + * @value horz + * @option Vertical - Actors adjust Up, Enemies adjust down + * @value vert + * @option Both - Applies both Horizontal and Vertical + * @value horz + vert + * @desc Makes adjustments to distance values to determine + * which direction to move unit(s). + * @default horz + * + * @arg DistanceX:eval + * @text Distance: X + * @parent DistanceAdjust:str + * @desc Horizontal distance to move. + * You may use JavaScript code. + * @default 48 + * + * @arg DistanceY:eval + * @text Distance: Y + * @parent DistanceAdjust:str + * @desc Vertical distance to move. + * You may use JavaScript code. + * @default 0 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for total movement amount. + * @default 12 + * + * @arg FaceDirection:eval + * @text Face Destination? + * @type boolean + * @on Turn + * @off Don't + * @desc Turn and face the destination? + * @default true + * + * @arg EasingType:str + * @text Movement Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg MotionType:str + * @text Movement Motion + * @type combo + * @option walk + * @option wait + * @option chant + * @option guard + * @option damage + * @option evade + * @option thrust + * @option swing + * @option missile + * @option skill + * @option spell + * @option item + * @option escape + * @option victory + * @option dying + * @option abnormal + * @option sleep + * @option dead + * @desc Play this motion for the unit(s). + * @default walk + * + * @arg WaitForMovement:eval + * @text Wait For Movement? + * @type boolean + * @on On + * @off Off + * @desc Wait for movement to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_MoveToPoint + * @text MOVE: Move To Point + * @desc Moves unit(s) to a designated point on the screen. + * Sideview-only! Points based off Graphics.boxWidth/Height. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to move. + * @default ["user"] + * + * @arg Destination:str + * @text Destination Point + * @type combo + * @option home + * @option center + * @option point x, y + * @desc Select which point to face. + * Replace 'x' and 'y' with coordinates + * @default home + * + * @arg OffsetAdjust:str + * @text Offset Adjustment + * @parent Destination:str + * @type select + * @option Normal - No adjustments made + * @value none + * @option Horizontal - Actors adjust left, Enemies adjust right + * @value horz + * @option Vertical - Actors adjust Up, Enemies adjust down + * @value vert + * @option Both - Applies both Horizontal and Vertical + * @value horz + vert + * @desc Makes adjustments to offset values to determine + * which direction to adjust the destination by. + * @default horz + * + * @arg OffsetX:eval + * @text Offset: X + * @parent OffsetAdjust:str + * @desc Horizontal offset to move. + * You may use JavaScript code. + * @default 0 + * + * @arg OffsetY:eval + * @text Offset: Y + * @parent OffsetAdjust:str + * @desc Vertical offset to move. + * You may use JavaScript code. + * @default 0 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for total movement amount. + * @default 12 + * + * @arg FaceDirection:eval + * @text Face Destination? + * @type boolean + * @on Turn + * @off Don't + * @desc Turn and face the destination? + * @default true + * + * @arg EasingType:str + * @text Movement Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg MotionType:str + * @text Movement Motion + * @type combo + * @option walk + * @option wait + * @option chant + * @option guard + * @option damage + * @option evade + * @option thrust + * @option swing + * @option missile + * @option skill + * @option spell + * @option item + * @option escape + * @option victory + * @option dying + * @option abnormal + * @option sleep + * @option dead + * @desc Play this motion for the unit(s). + * @default walk + * + * @arg WaitForMovement:eval + * @text Wait For Movement? + * @type boolean + * @on On + * @off Off + * @desc Wait for movement to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_MoveToTarget + * @text MOVE: Move To Target(s) + * @desc Moves unit(s) to another unit(s) on the battle field. + * Sideview-only! + * + * @arg Targets1:arraystr + * @text Targets (Moving) + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to move. + * @default ["user"] + * + * @arg Targets2:arraystr + * @text Targets (Destination) + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to move to. + * @default ["all targets"] + * + * @arg TargetLocation:str + * @text Target Location + * @parent Targets2:arraystr + * @type combo + * @option front head + * @option front center + * @option front base + * @option middle head + * @option middle center + * @option middle base + * @option back head + * @option back center + * @option back base + * @desc Select which part target group to move to. + * @default front base + * + * @arg MeleeDistance:eval + * @text Melee Distance + * @parent TargetLocation:str + * @desc The melee distance away from the target location + * in addition to the battler's width. + * @default 24 + * + * @arg OffsetAdjust:str + * @text Offset Adjustment + * @parent Targets2:arraystr + * @type select + * @option Normal - No adjustments made + * @value none + * @option Horizontal - Actors adjust left, Enemies adjust right + * @value horz + * @option Vertical - Actors adjust Up, Enemies adjust down + * @value vert + * @option Both - Applies both Horizontal and Vertical + * @value horz + vert + * @desc Makes adjustments to offset values to determine + * which direction to adjust the destination by. + * @default horz + * + * @arg OffsetX:eval + * @text Offset: X + * @parent OffsetAdjust:str + * @desc Horizontal offset to move. + * You may use JavaScript code. + * @default 0 + * + * @arg OffsetY:eval + * @text Offset: Y + * @parent OffsetAdjust:str + * @desc Vertical offset to move. + * You may use JavaScript code. + * @default 0 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for total movement amount. + * @default 12 + * + * @arg FaceDirection:eval + * @text Face Destination? + * @type boolean + * @on Turn + * @off Don't + * @desc Turn and face the destination? + * @default true + * + * @arg EasingType:str + * @text Movement Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg MotionType:str + * @text Movement Motion + * @type combo + * @option walk + * @option wait + * @option chant + * @option guard + * @option damage + * @option evade + * @option thrust + * @option swing + * @option missile + * @option skill + * @option spell + * @option item + * @option escape + * @option victory + * @option dying + * @option abnormal + * @option sleep + * @option dead + * @desc Play this motion for the unit(s). + * @default walk + * + * @arg WaitForMovement:eval + * @text Wait For Movement? + * @type boolean + * @on On + * @off Off + * @desc Wait for movement to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_Opacity + * @text MOVE: Opacity + * @desc Causes the unit(s) to change opacity. + * Sideview-only! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to change opacity. + * @default ["user"] + * + * @arg Opacity:eval + * @text Desired Opacity + * @desc Change to this opacity value. + * You may use JavaScript code. + * @default 255 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames for opacity change. + * @default 12 + * + * @arg EasingType:str + * @text Opacity Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg WaitForOpacity:eval + * @text Wait For Opacity? + * @type boolean + * @on On + * @off Off + * @desc Wait for opacity changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_Scale + * @text MOVE: Scale/Grow/Shrink + * @desc Causes the unit(s) to scale, grow, or shrink?. + * Sideview-only! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to change the scale of. + * @default ["user"] + * + * @arg ScaleX:eval + * @text Scale X + * @desc What target scale value do you want? + * 1.0 is normal size. + * @default 1.00 + * + * @arg ScaleY:eval + * @text Scale Y + * @desc What target scale value do you want? + * 1.0 is normal size. + * @default 1.00 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames to scale for. + * @default 12 + * + * @arg EasingType:str + * @text Scale Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg WaitForScale:eval + * @text Wait For Scale? + * @type boolean + * @on On + * @off Off + * @desc Wait for scaling to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_Skew + * @text MOVE: Skew/Distort + * @desc Causes the unit(s) to skew. + * Sideview-only! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to skew. + * @default ["user"] + * + * @arg SkewX:eval + * @text Skew X + * @desc X variance to skew? + * Use small values for the best results. + * @default 0.00 + * + * @arg SkewY:eval + * @text Skew Y + * @desc Y variance to skew? + * Use small values for the best results. + * @default 0.00 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames to skew for. + * @default 12 + * + * @arg EasingType:str + * @text Skew Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg WaitForSkew:eval + * @text Wait For Skew? + * @type boolean + * @on On + * @off Off + * @desc Wait for skew to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_Spin + * @text MOVE: Spin/Rotate + * @desc Causes the unit(s) to spin. + * Sideview-only! + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to spin. + * @default ["user"] + * + * @arg Angle:eval + * @text Angle + * @desc How many degrees to spin? + * @default 360 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames to spin for. + * @default 12 + * + * @arg EasingType:str + * @text Spin Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default Linear + * + * @arg RevertAngle:eval + * @text Revert Angle on Finish + * @type boolean + * @on Revert + * @off Don't + * @desc Revert angle after spinning? + * @default true + * + * @arg WaitForSpin:eval + * @text Wait For Spin? + * @type boolean + * @on On + * @off Off + * @desc Wait for spin to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_WaitForFloat + * @text MOVE: Wait For Float + * @desc Waits for floating to complete before performing next command. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_WaitForJump + * @text MOVE: Wait For Jump + * @desc Waits for jumping to complete before performing next command. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_WaitForMovement + * @text MOVE: Wait For Movement + * @desc Waits for movement to complete before performing next command. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_WaitForOpacity + * @text MOVE: Wait For Opacity + * @desc Waits for opacity changes to complete before performing next command. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_WaitForScale + * @text MOVE: Wait For Scale + * @desc Waits for scaling to complete before performing next command. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_WaitForSkew + * @text MOVE: Wait For Skew + * @desc Waits for skewing to complete before performing next command. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Movement_WaitForSpin + * @text MOVE: Wait For Spin + * @desc Waits for spinning to complete before performing next command. + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceProjectile + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakProjectile + * @text Action Sequences - Projectiles + * @desc Create projectiles on the screen and fire them off at a target. + * Requires VisuMZ_3_ActSeqProjectiles! + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Projectile_Animation + * @text PROJECTILE: Animation + * @desc Create an animation projectile and fire it at a target. + * Requires VisuMZ_3_ActSeqProjectiles! + * + * @arg Coordinates + * + * @arg Start:struct + * @text Start Location + * @parent Coordinates + * @type struct<ProjectileStart> + * @desc Settings to determine where the projectile(s) start from. + * @default {"Type:str":"target","Targets:arraystr":"[\"user\"]","TargetCenter:eval":"false","PointX:eval":"Graphics.width / 2","PointY:eval":"Graphics.height / 2","OffsetX:eval":"+0","OffsetY:eval":"+0"} + * + * @arg Goal:struct + * @text Goal Location + * @parent Coordinates + * @type struct<ProjectileGoal> + * @desc Settings to determine where the projectile(s) start from. + * @default {"Type:str":"target","Targets:arraystr":"[\"all targets\"]","TargetCenter:eval":"false","PointX:eval":"Graphics.width / 2","PointY:eval":"Graphics.height / 2","OffsetX:eval":"+0","OffsetY:eval":"+0"} + * + * @arg Settings + * + * @arg AnimationID:num + * @text Animation ID + * @parent Settings + * @type animation + * @desc Determine which animation to use as a projectile. + * @default 77 + * + * @arg Duration:eval + * @text Duration + * @parent Settings + * @desc Duration for the projectile(s) to travel. + * @default 20 + * + * @arg WaitForProjectile:eval + * @text Wait For Projectile? + * @parent Settings + * @type boolean + * @on On + * @off Off + * @desc Wait for projectile(s) to reach their destination before + * going onto the next command? + * @default true + * + * @arg WaitForAnimation:eval + * @text Wait For Animation? + * @parent Settings + * @type boolean + * @on On + * @off Off + * @desc Wait for animation to finish before going to the next command? + * @default false + * + * @arg Extra:struct + * @text Extra Settings + * @type struct<ProjectileExAni> + * @desc Add extra settings to the projectile? + * @default {"AutoAngle:eval":"true","AngleOffset:eval":"+0","Arc:eval":"0","EasingType:str":"Linear","Spin:eval":"+0.0"} + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Projectile_Icon + * @text PROJECTILE: Icon + * @desc Create an icon projectile and fire it at a target. + * Requires VisuMZ_3_ActSeqProjectiles! + * + * @arg Coordinates + * + * @arg Start:struct + * @text Start Location + * @parent Coordinates + * @type struct<ProjectileStart> + * @desc Settings to determine where the projectile(s) start from. + * @default {"Type:str":"target","Targets:arraystr":"[\"user\"]","TargetCenter:eval":"false","PointX:eval":"Graphics.width / 2","PointY:eval":"Graphics.height / 2","OffsetX:eval":"+0","OffsetY:eval":"+0"} + * + * @arg Goal:struct + * @text Goal Location + * @parent Coordinates + * @type struct<ProjectileGoal> + * @desc Settings to determine where the projectile(s) start from. + * @default {"Type:str":"target","Targets:arraystr":"[\"all targets\"]","TargetCenter:eval":"false","PointX:eval":"Graphics.width / 2","PointY:eval":"Graphics.height / 2","OffsetX:eval":"+0","OffsetY:eval":"+0"} + * + * @arg Settings + * + * @arg Icon:eval + * @text Icon Index + * @parent Settings + * @desc Determine which icon to use as a projectile. + * You may use JavaScript code. + * @default 118 + * + * @arg Duration:eval + * @text Duration + * @parent Settings + * @desc Duration for the projectile(s) to travel. + * @default 20 + * + * @arg WaitForProjectile:eval + * @text Wait For Projectile? + * @parent Settings + * @type boolean + * @on On + * @off Off + * @desc Wait for projectile(s) to reach their destination before + * going onto the next command? + * @default true + * + * @arg Extra:struct + * @text Extra Settings + * @type struct<ProjectileExtra> + * @desc Add extra settings to the projectile? + * @default {"AutoAngle:eval":"true","AngleOffset:eval":"+0","Arc:eval":"0","BlendMode:num":"0","EasingType:str":"Linear","Hue:eval":"0","Scale:eval":"1.0","Spin:eval":"+0.0"} + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Projectile_Picture + * @text PROJECTILE: Picture + * @desc Create a picture projectile and fire it at a target. + * Requires VisuMZ_3_ActSeqProjectiles! + * + * @arg Coordinates + * + * @arg Start:struct + * @text Start Location + * @parent Coordinates + * @type struct<ProjectileStart> + * @desc Settings to determine where the projectile(s) start from. + * @default {"Type:str":"target","Targets:arraystr":"[\"user\"]","TargetCenter:eval":"false","PointX:eval":"Graphics.width / 2","PointY:eval":"Graphics.height / 2","OffsetX:eval":"+0","OffsetY:eval":"+0"} + * + * @arg Goal:struct + * @text Goal Location + * @parent Coordinates + * @type struct<ProjectileGoal> + * @desc Settings to determine where the projectile(s) start from. + * @default {"Type:str":"target","Targets:arraystr":"[\"all targets\"]","TargetCenter:eval":"false","PointX:eval":"Graphics.width / 2","PointY:eval":"Graphics.height / 2","OffsetX:eval":"+0","OffsetY:eval":"+0"} + * + * @arg Settings + * + * @arg Picture:str + * @text Picture Filename + * @parent Settings + * @type file + * @dir img/pictures/ + * @desc Determine which picture to use as a projectile. + * @default Untitled + * + * @arg Duration:eval + * @text Duration + * @parent Settings + * @desc Duration for the projectile(s) to travel. + * @default 20 + * + * @arg WaitForProjectile:eval + * @text Wait For Projectile? + * @parent Settings + * @type boolean + * @on On + * @off Off + * @desc Wait for projectile(s) to reach their destination before + * going onto the next command? + * @default true + * + * @arg Extra:struct + * @text Extra Settings + * @type struct<ProjectileExtra> + * @desc Add extra settings to the projectile? + * @default {"AutoAngle:eval":"true","AngleOffset:eval":"+0","Arc:eval":"0","BlendMode:num":"0","EasingType:str":"Linear","Hue:eval":"0","Scale:eval":"1.0","Spin:eval":"+0.0"} + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceSkew + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakSkew + * @text Action Sequences - Skew + * @desc Allows you to have control over the camera skew. + * Requires VisuMZ_3_ActSeqCamera! + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_ChangeSkew + * @text SKEW: Change Skew + * @desc Changes the camera skew. + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg SkewX:eval + * @text Skew X + * @desc Change the camera skew X to this value. + * @default 0 + * + * @arg SkewY:eval + * @text Skew Y + * @desc Change the camera skew Y to this value. + * @default 0 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames to change camera skew. + * @default 60 + * + * @arg EasingType:str + * @text Skew Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default InOutSine + * + * @arg WaitForSkew:eval + * @text Wait For Skew? + * @type boolean + * @on On + * @off Off + * @desc Wait for skew changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Skew_Reset + * @text SKEW: Reset Skew + * @desc Reset any skew settings. + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames to reset camera skew. + * @default 60 + * + * @arg EasingType:str + * @text Skew Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default InOutSine + * + * @arg WaitForSkew:eval + * @text Wait For Skew? + * @type boolean + * @on On + * @off Off + * @desc Wait for skew changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Skew_WaitForSkew + * @text SKEW: Wait For Skew + * @desc Waits for skew changes to complete before performing next command. + * Requires VisuMZ_3_ActSeqCamera! + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceTarget + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakTarget + * @text Action Sequences - Target + * @desc If using a manual target by target Action Sequence, + * these commands will give you full control over its usage. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Target_CurrentIndex + * @text TARGET: Current Index + * @desc Sets the current index to this value. + * Then decide to jump to a label (optional). + * + * @arg Index:eval + * @text Set Index To + * @desc Sets current targeting index to this value. + * 0 is the starting index of a target group. + * @default 0 + * + * @arg JumpToLabel:str + * @text Jump To Label + * @desc If a target is found after the index change, + * jump to this label in the Common Event. + * @default Untitled + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Target_NextTarget + * @text TARGET: Next Target + * @desc Moves index forward by 1 to select a new current target. + * Then decide to jump to a label (optional). + * + * @arg JumpToLabel:str + * @text Jump To Label + * @desc If a target is found after the index change, + * jump to this label in the Common Event. + * @default Untitled + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Target_PrevTarget + * @text TARGET: Previous Target + * @desc Moves index backward by 1 to select a new current target. + * Then decide to jump to a label (optional). + * + * @arg JumpToLabel:str + * @text Jump To Label + * @desc If a target is found after the index change, + * jump to this label in the Common Event. + * @default Untitled + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Target_RandTarget + * @text TARGET: Random Target + * @desc Sets index randomly to determine new currernt target. + * Then decide to jump to a label (optional). + * + * @arg ForceRandom:eval + * @text Force Random? + * @type boolean + * @on On + * @off Off + * @desc Index cannot be its previous index amount after random. + * @default false + * + * @arg JumpToLabel:str + * @text Jump To Label + * @desc If a target is found after the index change, + * jump to this label in the Common Event. + * @default Untitled + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceWeapon + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakWeapon + * @text Action Sequences - Weapon + * @desc Allows for finer control over Dual/Multi Wielding actors. + * Only works for Actors. + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Weapon_ClearActiveWeapon + * @text WEAPON: Clear Weapon Slot + * @desc Clears the active weapon slot (making others valid again). + * Only works for Actors. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @desc Select unit(s) to clear the active weapon slot for. + * @default ["user"] + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Weapon_NextActiveWeapon + * @text WEAPON: Next Weapon Slot + * @desc Goes to next active weapon slot (making others invalid). + * If next slot is weaponless, don't label jump. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @desc Select unit(s) to change the next active weapon slot for. + * @default ["user"] + * + * @arg JumpToLabel:str + * @text Jump To Label + * @desc If a weapon is found after the index change, + * jump to this label in the Common Event. + * @default Untitled + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Weapon_SetActiveWeapon + * @text WEAPON: Set Weapon Slot + * @desc Sets the active weapon slot (making others invalid). + * Only works for Actors. + * + * @arg Targets:arraystr + * @text Targets + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @desc Select unit(s) to change the active weapon slot for. + * @default ["user"] + * + * @arg SlotID:eval + * @text Weapon Slot ID + * @desc Select weapon slot to make active (making others invalid). + * Use 0 to clear and normalize. You may use JavaScript code. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceZoom + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceBreakZoom + * @text Action Sequences - Zoom + * @desc Allows you to have control over the screen zoom. + * Requires VisuMZ_3_ActSeqCamera! + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Zoom_Scale + * @text ZOOM: Change Scale + * @desc Changes the zoom scale. + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg Scale:eval + * @text Scale + * @desc The zoom scale to change to. + * @default 1.0 + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames to change battle zoom. + * @default 60 + * + * @arg EasingType:str + * @text Zoom Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default InOutSine + * + * @arg WaitForZoom:eval + * @text Wait For Zoom? + * @type boolean + * @on On + * @off Off + * @desc Wait for zoom changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Zoom_Reset + * @text ZOOM: Reset Zoom + * @desc Reset any zoom settings. + * Requires VisuMZ_3_ActSeqCamera! + * + * @arg Duration:eval + * @text Duration + * @desc Duration in frames to reset battle zoom. + * @default 60 + * + * @arg EasingType:str + * @text Zoom Easing + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type you wish to apply. + * Requires VisuMZ_0_CoreEngine. + * @default InOutSine + * + * @arg WaitForZoom:eval + * @text Wait For Zoom? + * @type boolean + * @on On + * @off Off + * @desc Wait for zoom changes to complete before performing next command? + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command ActSeq_Zoom_WaitForZoom + * @text ZOOM: Wait For Zoom + * @desc Waits for zoom to complete before performing next command. + * Requires VisuMZ_3_ActSeqCamera! + * + * @ -------------------------------------------------------------------------- + * + * @command ActionSequenceSpaceEnd + * @text - + * @desc - + * + * @ -------------------------------------------------------------------------- + * + * @ ========================================================================== + * @ Plugin Parameters + * @ ========================================================================== + * + * @param BreakHead + * @text -------------------------- + * @default ---------------------------------- + * + * @param BattleCore + * @default Plugin Parameters + * + * @param ATTENTION + * @default READ THE HELP FILE + * + * @param BreakSettings + * @text -------------------------- + * @default ---------------------------------- + * + * @param AutoBattle:struct + * @text Auto Battle Settings + * @type struct<AutoBattle> + * @desc Settings pertaining to Auto Battle. + * @default {"BattleDisplay":"","AutoBattleMsg:str":"Press %1 or %2 to stop Auto Battle","AutoBattleOK:str":"OK","AutoBattleCancel:str":"Cancel","AutoBattleBgType:num":"1","AutoBattleRect:func":"\"const width = Graphics.width;\\nconst height = this.calcWindowHeight(1, false);\\nconst x = 0;\\nconst y = (Graphics.height - height) / 2;\\nreturn new Rectangle(x, y, width, height);\"","Options":"","AddOption:eval":"true","AdjustRect:eval":"true","StartName:str":"Auto Battle Start","StyleName:str":"Auto Battle Style","StyleOFF:str":"Attack","StyleON:str":"Skills"} + * + * @param Damage:struct + * @text Damage Settings + * @type struct<Damage> + * @desc Settings pertaining to damage calculations. + * @default {"DamageStyles":"","DefaultDamageStyle:str":"Standard","DamageStyleList:arraystruct":"[\"{\\\"Name:str\\\":\\\"Standard\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Declare Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Replace Formula\\\\\\\\nlet formula = item.damage.formula;\\\\\\\\nif (SceneManager.isSceneBattle() && !this.isCertainHit()) {\\\\\\\\n const fmt = 'Math.max(this.applyArmorModifiers(b, %1), 0)';\\\\\\\\n formula = formula.replace(/b.def/g, fmt.format('b.def'));\\\\\\\\n formula = formula.replace(/b.mdf/g, fmt.format('b.mdf'));\\\\\\\\n formula = formula.replace(/b.agi/g, fmt.format('b.agi'));\\\\\\\\n formula = formula.replace(/b.luk/g, fmt.format('b.luk'));\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Calculate Damage\\\\\\\\nlet value = Math.max(eval(formula), 0);\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"return this.getItemDamageAmountTextOriginal();\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"Armor Scaling\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Declare Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Replace Formula\\\\\\\\nlet formula = item.damage.formula;\\\\\\\\nif (SceneManager.isSceneBattle() && !this.isCertainHit()) {\\\\\\\\n const fmt = 'Math.max(this.applyArmorModifiers(b, %1), 1)';\\\\\\\\n formula = formula.replace(/b.def/g, fmt.format('b.def'));\\\\\\\\n formula = formula.replace(/b.mdf/g, fmt.format('b.mdf'));\\\\\\\\n formula = formula.replace(/b.agi/g, fmt.format('b.agi'));\\\\\\\\n formula = formula.replace(/b.luk/g, fmt.format('b.luk'));\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Calculate Damage\\\\\\\\nlet value = Math.max(eval(formula), 0);\\\\\\\\n\\\\\\\\n// Apply Defender's Defense Parameter\\\\\\\\nif (this.isDamage() && !this.isCertainHit()) {\\\\\\\\n\\\\\\\\n // Calculate Base Armor\\\\\\\\n let armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\n armor = this.applyArmorModifiers(target, armor);\\\\\\\\n\\\\\\\\n // Apply Armor to Damage\\\\\\\\n if (armor >= 0) {\\\\\\\\n value *= 100 / (100 + armor);\\\\\\\\n } else {\\\\\\\\n value *= 2 - (100 / (100 - armor));\\\\\\\\n }\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"return this.getItemDamageAmountTextOriginal();\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"CT\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Create Multiplier\\\\\\\\nconst multiplier = Math.max(eval(item.damage.formula), 0);\\\\\\\\n\\\\\\\\n// Declare Values\\\\\\\\nlet value = 0;\\\\\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\narmor = Math.max(this.applyArmorModifiers(target, armor), 0);\\\\\\\\nlet attackStat = 0;\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n attackStat = a.atk;\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n attackStat = a.mat;\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\n attackStat = a.def;\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\n attackStat = a.mdf;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Calculate Damage\\\\\\\\nattackStat = (attackStat * 1.75) + (level ** 2 / 45.5);\\\\\\\\nvalue = attackStat * 4;\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n value *= Math.max(256 - armor, 0) / 256;\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n value *= Math.max(102.4 - armor, 0) / 128;\\\\\\\\n}\\\\\\\\nvalue *= multiplier;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst item = this._item;\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\nconst a = this._tempActorA;\\\\\\\\nconst b = this._tempActorB;\\\\\\\\nconst user = a;\\\\\\\\nconst target = b;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\ntry {\\\\\\\\n const value = Math.max(eval(formula), 0);\\\\\\\\n return '%1%'.format(Math.round(value * 100));\\\\\\\\n} catch (e) {\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\n }\\\\\\\\n return '?????';\\\\\\\\n}\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"D4\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Create Multiplier\\\\\\\\nconst multiplier = Math.max(eval(item.damage.formula), 0);\\\\\\\\n\\\\\\\\n// Declare Values\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\narmor = this.applyArmorModifiers(target, armor);\\\\\\\\nlet stat = 0;\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n stat = a.atk;\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n stat = a.mat;\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\n stat = a.def;\\\\\\\\n armor = 0;\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\n stat = a.mdf;\\\\\\\\n armor = 0;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Calculate Damage \\\\\\\\nlet value = 1.5 * Math.max(2 * stat * multiplier - armor, 1) * multiplier / 5;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst item = this._item;\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\nconst a = this._tempActorA;\\\\\\\\nconst b = this._tempActorB;\\\\\\\\nconst user = a;\\\\\\\\nconst target = b;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\ntry {\\\\\\\\n const value = Math.max(eval(formula), 0);\\\\\\\\n return '%1%'.format(Math.round(value * 100));\\\\\\\\n} catch (e) {\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\n }\\\\\\\\n return '?????';\\\\\\\\n}\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"DQ\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Create Multiplier\\\\\\\\nlet multiplier = Math.max(eval(item.damage.formula), 0);\\\\\\\\nif (this.isCertainHit()) {\\\\\\\\n let value = multiplier * Math.max(a.atk, a.mat);\\\\\\\\n return (isNaN(value) ? 0 : value) * sign;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Get Primary Stats\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\narmor = this.applyArmorModifiers(b, armor);\\\\\\\\nlet stat = 1;\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n stat = a.atk;\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n stat = a.mat;\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\n stat = a.def;\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\n stat = a.mdf;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Check for Recovery\\\\\\\\nif (this.isRecover()) {\\\\\\\\n let value = stat * multiplier * sign;\\\\\\\\n return isNaN(value) ? 0 : value;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Calculate Damage\\\\\\\\nlet value = 0;\\\\\\\\nif (stat < ((2 + armor) / 2)) {\\\\\\\\n // Plink Damage\\\\\\\\n let baseline = Math.max(stat - ((12 * (armor - stat + 1)) / stat), 5);\\\\\\\\n value = baseline / 3;\\\\\\\\n} else {\\\\\\\\n // Normal Damage\\\\\\\\n let baseline = Math.max(stat - (armor / 2), 1);\\\\\\\\n value = baseline / 2;\\\\\\\\n}\\\\\\\\nvalue *= multiplier;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn isNaN(value) ? 0 : value;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst item = this._item;\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\nconst a = this._tempActorA;\\\\\\\\nconst b = this._tempActorB;\\\\\\\\nconst user = a;\\\\\\\\nconst target = b;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\ntry {\\\\\\\\n const value = Math.max(eval(formula), 0);\\\\\\\\n return '%1%'.format(Math.round(value * 100));\\\\\\\\n} catch (e) {\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\n }\\\\\\\\n return '?????';\\\\\\\\n}\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"FF7\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Create Power\\\\\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\\\\\n\\\\\\\\n// Declare base Damage\\\\\\\\nlet baseDamage = 0;\\\\\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n baseDamage = a.atk + ((a.atk + level) / 32) * ((a.atk * level) / 32);\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n baseDamage = 6 * (a.mat + level);\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\n baseDamage = 6 * (a.def + level);\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\n baseDamage = 6 * (a.mdf + level);\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Calculate Final Damage\\\\\\\\nlet value = baseDamage;\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\narmor = this.applyArmorModifiers(target, armor);\\\\\\\\nif (this.isRecover()) {\\\\\\\\n value += 22 * power;\\\\\\\\n} else {\\\\\\\\n value = (power * Math.max(512 - armor, 1) * baseDamage) / (16 * 512);\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Power\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Power\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Power\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Power\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Power\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Power\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst item = this._item;\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\nconst a = this._tempActorA;\\\\\\\\nconst b = this._tempActorB;\\\\\\\\nconst user = a;\\\\\\\\nconst target = b;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\ntry {\\\\\\\\n return formula;\\\\\\\\n} catch (e) {\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\n }\\\\\\\\n return '?????';\\\\\\\\n}\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"FF8\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Create Power\\\\\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\\\\\n\\\\\\\\n// Declare Damage\\\\\\\\nlet Value = 0;\\\\\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\narmor = this.applyArmorModifiers(target, armor);\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n value = a.atk ** 2 / 16 + a.atk;\\\\\\\\n value *= Math.max(265 - armor, 1) / 256;\\\\\\\\n value *= power / 16;\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n value = a.mat + power;\\\\\\\\n value *= Math.max(265 - armor, 1) / 4;\\\\\\\\n value *= power / 256;\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\n value = (power + a.def) * power / 2;\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\n value = (power + a.mdf) * power / 2;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Power\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Power\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Power\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Power\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Power\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Power\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst item = this._item;\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\nconst a = this._tempActorA;\\\\\\\\nconst b = this._tempActorB;\\\\\\\\nconst user = a;\\\\\\\\nconst target = b;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\ntry {\\\\\\\\n return formula;\\\\\\\\n} catch (e) {\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\n }\\\\\\\\n return '?????';\\\\\\\\n}\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"FF9\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Create Damage Constant\\\\\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\\\\\nif (this.isCertainHit()) {\\\\\\\\n return (isNaN(power) ? 0 : power) * sign;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Declare Main Stats\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\narmor = this.applyArmorModifiers(b, armor);\\\\\\\\nlet stat = 1;\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n stat = a.atk;\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n stat = a.mat;\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\n stat = a.def;\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\n stat = a.mdf;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Declare Base Damage\\\\\\\\nlet baseDamage = power;\\\\\\\\nif (this.isPhysical()) {\\\\\\\\n baseDamage += stat;\\\\\\\\n}\\\\\\\\nif (this.isDamage() || this.isDrain()) {\\\\\\\\n baseDamage -= armor;\\\\\\\\n baseDamage = Math.max(1, baseDamage);\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Declare Bonus Damage\\\\\\\\nlet bonusDamage = stat + (((a.level || a.luk) + stat) / 8);\\\\\\\\n\\\\\\\\n// Declare Final Damage\\\\\\\\nlet value = baseDamage * bonusDamage * sign;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn isNaN(value) ? 0 : value;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Power\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Power\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Power\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Power\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Power\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Power\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst item = this._item;\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\nconst a = this._tempActorA;\\\\\\\\nconst b = this._tempActorB;\\\\\\\\nconst user = a;\\\\\\\\nconst target = b;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\ntry {\\\\\\\\n return formula;\\\\\\\\n} catch (e) {\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\n }\\\\\\\\n return '?????';\\\\\\\\n}\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"FF10\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Create Damage Constant\\\\\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\\\\\nif (this.isCertainHit()) {\\\\\\\\n return (isNaN(power) ? 0 : power) * sign;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Create Damage Offense Value\\\\\\\\nlet value = power;\\\\\\\\n\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n value = (((a.atk ** 3) / 32) + 32) * power / 16;\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n value = power * ((a.mat ** 2 / 6) + power) / 4;\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\n value = power * ((a.def + power) / 2);\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\n value = power * ((a.mdf + power) / 2);\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Apply Damage Defense Value\\\\\\\\nif (this.isDamage() || this.isDrain()) {\\\\\\\\n let armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\n armor = this.applyArmorModifiers(b, armor);\\\\\\\\n armor = Math.max(armor, 1);\\\\\\\\n value *= ((((armor - 280.4) ** 2) / 110) / 16) / 730;\\\\\\\\n value *= (730 - (armor * 51 - (armor ** 2) / 11) / 10) / 730;\\\\\\\\n} else if (this.isRecover()) {\\\\\\\\n value *= -1;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn isNaN(value) ? 0 : value;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Power\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Power\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Power\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Power\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Power\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Power\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst item = this._item;\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\nconst a = this._tempActorA;\\\\\\\\nconst b = this._tempActorB;\\\\\\\\nconst user = a;\\\\\\\\nconst target = b;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\ntry {\\\\\\\\n return formula;\\\\\\\\n} catch (e) {\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\n }\\\\\\\\n return '?????';\\\\\\\\n}\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"MK\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Create Multiplier\\\\\\\\nconst multiplier = Math.max(eval(item.damage.formula), 0);\\\\\\\\n\\\\\\\\n// Declare Values\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\narmor = this.applyArmorModifiers(target, armor);\\\\\\\\nconst denominator = Math.max(200 + armor, 1);\\\\\\\\n\\\\\\\\n// Calculate Damage \\\\\\\\nlet value = 0;\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n value = 200 * a.atk / denominator;\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n value = 200 * a.mat / denominator;\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\n value = 200 * a.def / 200;\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\n value = 200 * a.mdf / 200;\\\\\\\\n}\\\\\\\\nvalue *= multiplier;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst item = this._item;\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\nconst a = this._tempActorA;\\\\\\\\nconst b = this._tempActorB;\\\\\\\\nconst user = a;\\\\\\\\nconst target = b;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\ntry {\\\\\\\\n const value = Math.max(eval(formula), 0);\\\\\\\\n return '%1%'.format(Math.round(value * 100));\\\\\\\\n} catch (e) {\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\n }\\\\\\\\n return '?????';\\\\\\\\n}\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"MOBA\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Create Damage Value\\\\\\\\nlet value = Math.max(eval(item.damage.formula), 0) * sign;\\\\\\\\n\\\\\\\\n// Apply Attacker's Offense Parameter\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n value *= a.atk;\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n value *= a.mat;\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\n value *= a.def;\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\n value *= a.mdf;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Apply Defender's Defense Parameter\\\\\\\\nif (this.isDamage() && !this.isCertainHit()) {\\\\\\\\n\\\\\\\\n // Calculate Base Armor\\\\\\\\n let armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\n armor = this.applyArmorModifiers(target, armor);\\\\\\\\n\\\\\\\\n // Apply Armor to Damage\\\\\\\\n if (armor >= 0) {\\\\\\\\n value *= 100 / (100 + armor);\\\\\\\\n } else {\\\\\\\\n value *= 2 - (100 / (100 - armor));\\\\\\\\n }\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn isNaN(value) ? 0 : value;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Multiplier\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Multiplier\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Multiplier\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst item = this._item;\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\nconst a = this._tempActorA;\\\\\\\\nconst b = this._tempActorB;\\\\\\\\nconst user = a;\\\\\\\\nconst target = b;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\ntry {\\\\\\\\n const value = Math.max(eval(formula), 0);\\\\\\\\n return '%1%'.format(Math.round(value * 100));\\\\\\\\n} catch (e) {\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\n }\\\\\\\\n return '?????';\\\\\\\\n}\\\\\\\"\\\"}\",\"{\\\"Name:str\\\":\\\"PKMN\\\",\\\"Formula:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst user = this.subject();\\\\\\\\nconst target = arguments[0];\\\\\\\\nconst item = this.item();\\\\\\\\nconst a = this.subject();\\\\\\\\nconst b = target;\\\\\\\\nconst v = $gameVariables._data;\\\\\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\\\\\n\\\\\\\\n// Create Power\\\\\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\\\\\n\\\\\\\\n// Declare Values\\\\\\\\nlet value = 0;\\\\\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\\\\\narmor = Math.max(this.applyArmorModifiers(target, armor), 0);\\\\\\\\nlet attackStat = 0;\\\\\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n attackStat = a.atk;\\\\\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\\\\\n attackStat = a.mat;\\\\\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\\\\\n attackStat = a.def;\\\\\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\\\\\n attackStat = a.mdf;\\\\\\\\n}\\\\\\\\n\\\\\\\\n// Calculate Damage\\\\\\\\nvalue = (((((2 * level) / 5) + 2) * power * (attackStat / armor)) / 50) + 2;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\\\\\"\\\",\\\"ItemsEquipsCore\\\":\\\"\\\",\\\"DamageType\\\":\\\"\\\",\\\"DamageType1:str\\\":\\\"%1 Damage Power\\\",\\\"DamageType2:str\\\":\\\"%1 Damage Power\\\",\\\"DamageType3:str\\\":\\\"%1 Recovery Power\\\",\\\"DamageType4:str\\\":\\\"%1 Recovery Power\\\",\\\"DamageType5:str\\\":\\\"%1 Drain Power\\\",\\\"DamageType6:str\\\":\\\"%1 Drain Power\\\",\\\"DamageDisplay:func\\\":\\\"\\\\\\\"// Define Constants\\\\\\\\nconst item = this._item;\\\\\\\\nconst formula = item.damage.formula;\\\\\\\\nconst a = this._tempActorA;\\\\\\\\nconst b = this._tempActorB;\\\\\\\\nconst user = a;\\\\\\\\nconst target = b;\\\\\\\\n\\\\\\\\n// Return Value\\\\\\\\ntry {\\\\\\\\n return formula;\\\\\\\\n} catch (e) {\\\\\\\\n if ($gameTemp.isPlaytest()) {\\\\\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\\\\\n }\\\\\\\\n return '?????';\\\\\\\\n}\\\\\\\"\\\"}\"]","Cap":"","EnableDamageCap:eval":"false","DefaultHardCap:num":"9999","EnableSoftCap:eval":"false","DefaultSoftCap:num":"0.80","DefaultSoftScaler:num":"0.1275","Popups":"","PopupDuration:num":"128","NewPopupBottom:eval":"true","PopupPosition:str":"base","PopupOffsetX:num":"0","PopupOffsetY:num":"0","PopupShiftX:num":"8","PopupShiftY:num":"-28","hpDamageFmt:str":"-%1","hpHealingFmt:str":"+%1","mpDamageFmt:str":"-%1 %2","mpHealingFmt:str":"+%1 %2","CriticalColor:eval":"[255, 0, 0, 160]","CriticalDuration:num":"128","Formulas":"","OverallFormulaJS:func":"\"// Declare Constants\\nconst target = arguments[0];\\nconst critical = arguments[1];\\nconst item = this.item();\\n\\n// Get Base Damage\\nconst baseValue = this.evalDamageFormula(target);\\n\\n// Calculate Element Modifiers\\nlet value = baseValue * this.calcElementRate(target);\\n\\n// Calculate Physical and Magical Modifiers\\nif (this.isPhysical()) {\\n value *= target.pdr;\\n}\\nif (this.isMagical()) {\\n value *= target.mdr;\\n}\\n\\n// Apply Healing Modifiers\\nif (baseValue < 0) {\\n value *= target.rec;\\n}\\n\\n// Apply Critical Modifiers\\nif (critical) {\\n value = this.applyCritical(value);\\n}\\n\\n// Apply Variance and Guard Modifiers\\nvalue = this.applyVariance(value, item.damage.variance);\\nvalue = this.applyGuard(value, target);\\n\\n// Finalize Damage\\nvalue = Math.round(value);\\nreturn value;\"","VarianceFormulaJS:func":"\"// Declare Constants\\nconst damage = arguments[0];\\nconst variance = arguments[1];\\n\\n// Calculate Variance\\nconst amp = Math.floor(Math.max((Math.abs(damage) * variance) / 100, 0));\\nconst v = Math.randomInt(amp + 1) + Math.randomInt(amp + 1) - amp;\\n\\n// Return Damage\\nreturn damage >= 0 ? damage + v : damage - v;\"","GuardFormulaJS:func":"\"// Declare Constants\\nconst damage = arguments[0];\\nconst target = arguments[1];\\n\\n// Return Damage Early\\nconst note = this.item().note;\\nif (note.match(/<UNBLOCKABLE>/i)) return damage;\\nif (!target.isGuard()) return damage;\\nif (damage < 0) return damage;\\n\\n// Declare Guard Rate\\nlet guardRate = 0.5;\\nguardRate /= target.grd;\\n\\n// Return Damage\\nreturn damage * guardRate;\"","Critical":"","CriticalHitRateJS:func":"\"// Declare Constants\\nconst user = this.subject();\\nconst target = arguments[0];\\n\\n// Create Base Critical Rate\\nlet rate = this.subject().cri * (1 - target.cev);\\n\\n// Apply Notetags\\nconst note = this.item().note;\\nif (note.match(/<ALWAYS CRITICAL>/i)) {\\n return 1;\\n}\\nif (note.match(/<SET CRITICAL RATE:[ ](\\\\d+)([%%])>/i)) {\\n return Number(RegExp.$1) / 100;\\n}\\nif (note.match(/<MODIFY CRITICAL RATE:[ ](\\\\d+)([%%])>/i)) {\\n rate *= Number(RegExp.$1) / 100;\\n}\\nif (note.match(/<MODIFY CRITICAL RATE:[ ]([\\\\+\\\\-]\\\\d+)([%%])>/i)) {\\n rate += Number(RegExp.$1) / 100;\\n}\\nif (note.match(/<JS CRITICAL RATE>\\\\s*([\\\\s\\\\S]*)\\\\s*<\\\\/JS CRITICAL RATE>/i)) {\\n const code = String(RegExp.$1);\\n try {\\n eval(code);\\n } catch (e) {\\n if ($gameTemp.isPlaytest()) console.log(e);\\n }\\n}\\n\\n// Apply LUK Buffs/Debuffs\\nconst lukStack = this.subject().buff(7);\\nrate *= 2 ** lukStack;\\n\\n// Return Rate\\nreturn rate;\"","CriticalHitMultiplier:func":"\"// Declare Constants\\nconst user = this.subject();\\nlet damage = arguments[0];\\nlet multiplier = 2.0;\\nlet bonusDamage = this.subject().luk * this.subject().cri;\\nif (this.isHpRecover() || this.isMpRecover()) {\\n bonusDamage *= -1;\\n}\\n\\n// Apply Notetags\\nconst note = this.item().note;\\nif (note.match(/<MODIFY CRITICAL MULTIPLIER:[ ](\\\\d+)([%%])>/i)) {\\n multiplier = Number(RegExp.$1) / 100;\\n}\\nif (note.match(/<MODIFY CRITICAL MULTIPLIER:[ ]([\\\\+\\\\-]\\\\d+)([%%])>/i)) {\\n multiplier += Number(RegExp.$1) / 100;\\n}\\nif (note.match(/<MODIFY CRITICAL BONUS DAMAGE:[ ](\\\\d+)([%%])>/i)) {\\n bonusDamage *= Number(RegExp.$1) / 100;\\n}\\nif (note.match(/<MODIFY CRITICAL BONUS DAMAGE:[ ]([\\\\+\\\\-]\\\\d+)([%%])>/i)) {\\n bonusDamage += bonusDamage * (RegExp.$1) / 100;\\n}\\nif (note.match(/<JS CRITICAL DAMAGE>\\\\s*([\\\\s\\\\S]*)\\\\s*<\\\\/JS CRITICAL DAMAGE>/i)) {\\n const code = String(RegExp.$1);\\n try {\\n eval(code);\\n } catch (e) {\\n if ($gameTemp.isPlaytest()) console.log(e);\\n }\\n}\\n\\n// Return Damage\\nreturn damage * multiplier + bonusDamage;\""} + * + * @param Mechanics:struct + * @text Mechanics Settings + * @type struct<Mechanics> + * @desc Settings pertaining to various game mechanics. + * @default {"ActionSpeed":"","AllowRandomSpeed:eval":"false","CalcActionSpeedJS:func":"\"// Declare Constants\\nconst agi = this.subject().agi;\\n\\n// Create Speed\\nlet speed = agi;\\nif (this.allowRandomSpeed()) {\\n speed += Math.randomInt(Math.floor(5 + agi / 4));\\n}\\nif (this.item()) {\\n speed += this.item().speed;\\n}\\nif (this.isAttack()) {\\n speed += this.subject().attackSpeed();\\n}\\n\\n// Return Speed\\nreturn speed;\"","BaseTroop":"","BaseTroopIDs:arraynum":"[\"1\"]","CommonEvents":"","BattleStartEvent:num":"0","BattleEndEvent:num":"0","VictoryEvent:num":"0","DefeatEvent:num":"0","EscapeSuccessEvent:num":"0","EscapeFailEvent:num":"0","Escape":"","CalcEscapeRatioJS:func":"\"// Calculate Escape Ratio\\nlet ratio = 0.5;\\nratio *= $gameParty.agility();\\nratio /= $gameTroop.agility();\\n\\n// Return Ratio\\nreturn ratio;\"","CalcEscapeRaiseJS:func":"\"// Calculate Escape Ratio\\nlet value = 0.1;\\nvalue += $gameParty.aliveMembers().length;\\n\\n// Return Value\\nreturn value;\"","BattleJS":"","PreStartBattleJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","PostStartBattleJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","BattleVictoryJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","EscapeSuccessJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","EscapeFailureJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","BattleDefeatJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","PreEndBattleJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","PostEndBattleJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","TurnJS":"","PreStartTurnJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","PostStartTurnJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","PreEndTurnJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","PostEndTurnJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","PreRegenerateJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","PostRegenerateJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = user;\\nconst a = user;\\nconst b = user;\\n\\n// Perform Actions\\n\"","ActionJS":"","PreStartActionJS:func":"\"// Declare Constants\\nconst value = arguments[0];\\nconst user = this.subject();\\nconst target = user;\\nconst a = user;\\nconst b = user;\\nconst action = this;\\nconst item = this.item();\\nconst skill = this.item();\\n\\n// Perform Actions\\n\"","PostStartActionJS:func":"\"// Declare Constants\\nconst value = arguments[0];\\nconst user = this.subject();\\nconst target = user;\\nconst a = user;\\nconst b = user;\\nconst action = this;\\nconst item = this.item();\\nconst skill = this.item();\\n\\n// Perform Actions\\n\"","PreApplyJS:func":"\"// Declare Constants\\nconst value = arguments[0];\\nconst target = arguments[1];\\nconst user = this.subject();\\nconst a = user;\\nconst b = target;\\nconst action = this;\\nconst item = this.item();\\nconst skill = this.item();\\n\\n// Perform Actions\\n\\n// Return Value\\nreturn value;\"","PreDamageJS:func":"\"// Declare Constants\\nconst value = arguments[0];\\nconst target = arguments[1];\\nconst user = this.subject();\\nconst a = user;\\nconst b = target;\\nconst action = this;\\nconst item = this.item();\\nconst skill = this.item();\\n\\n// Perform Actions\\n\\n// Return Value\\nreturn value;\"","PostDamageJS:func":"\"// Declare Constants\\nconst value = arguments[0];\\nconst target = arguments[1];\\nconst user = this.subject();\\nconst a = user;\\nconst b = target;\\nconst action = this;\\nconst item = this.item();\\nconst skill = this.item();\\n\\n// Perform Actions\\n\\n// Return Value\\nreturn value;\"","PostApplyJS:func":"\"// Declare Constants\\nconst value = arguments[0];\\nconst target = arguments[1];\\nconst user = this.subject();\\nconst a = user;\\nconst b = target;\\nconst action = this;\\nconst item = this.item();\\nconst skill = this.item();\\n\\n// Perform Actions\\n\\n// Return Value\\nreturn value;\"","PreEndActionJS:func":"\"// Declare Constants\\nconst value = arguments[0];\\nconst user = this.subject();\\nconst target = user;\\nconst a = user;\\nconst b = user;\\nconst action = this;\\nconst item = this.item();\\nconst skill = this.item();\\n\\n// Perform Actions\\n\"","PostEndActionJS:func":"\"// Declare Constants\\nconst value = arguments[0];\\nconst user = this.subject();\\nconst target = user;\\nconst a = user;\\nconst b = user;\\nconst action = this;\\nconst item = this.item();\\nconst skill = this.item();\\n\\n// Perform Actions\\n\""} + * + * @param CmdWindows + * @text -------------------------- + * @default ---------------------------------- + * + * @param BattleLayout:struct + * @text Battle Layout Settings + * @type struct<BattleLayout> + * @desc Settings that adjust how the battle layout appears. + * @default {"Style:str":"default","ListStyle":"","ShowFacesListStyle:eval":"true","CommandWidth:num":"192","XPStyle":"","XPActorCommandLines:num":"4","XPActorDefaultHeight:num":"64","XPSpriteYLocation:str":"name","PotraitStyle":"","ShowPortraits:eval":"true","PortraitScale:num":"0.5","BorderStyle":"","SkillItemBorderCols:num":"1","ShowPortraitsBorderStyle:eval":"true","PortraitScaleBorderStyle:num":"1.25","SkillItemWindows":"","SkillItemMiddleLayout:eval":"false","SkillItemStandardCols:num":"2"} + * + * @param BattleLog:struct + * @text Battle Log Settings + * @type struct<BattleLog> + * @desc Settings that adjust how Window_BattleLog behaves. + * @default {"General":"","BackColor:str":"#000000","MaxLines:num":"10","MessageWait:num":"16","TextAlign:str":"center","BattleLogRectJS:func":"\"const wx = 0;\\nconst wy = 0;\\nconst ww = Graphics.boxWidth;\\nconst wh = this.calcWindowHeight(10, false);\\nreturn new Rectangle(wx, wy, ww, wh);\"","StartTurn":"","StartTurnShow:eval":"true","StartTurnMsg:str":"Turn %1","StartTurnWait:num":"40","DisplayAction":"","ActionCenteredName:eval":"true","ActionSkillMsg1:eval":"false","ActionSkillMsg2:eval":"true","ActionItemMsg:eval":"false","ActionChanges":"","ShowCounter:eval":"true","ShowReflect:eval":"true","ShowSubstitute:eval":"true","ActionResults":"","ShowFailure:eval":"false","ShowCritical:eval":"false","ShowMissEvasion:eval":"false","ShowHpDmg:eval":"false","ShowMpDmg:eval":"false","ShowTpDmg:eval":"false","DisplayStates":"","ShowAddedState:eval":"false","ShowRemovedState:eval":"false","ShowCurrentState:eval":"false","ShowAddedBuff:eval":"false","ShowAddedDebuff:eval":"false","ShowRemovedBuff:eval":"false"} + * + * @param Battleback:struct + * @text Battleback Scaling + * @type struct<Battleback> + * @desc Settings that adjust how battlebacks scale. + * @default {"DefaultStyle:str":"MZ","jsOneForOne:func":"\"// Adjust Size\\nthis.width = Graphics.width;\\nthis.height = Graphics.height;\\n\\n// Adjust Scale\\nconst scale = 1.0;\\nthis.scale.x = scale;\\nthis.scale.y = scale;\\n\\n// Adjust Coordinates\\nthis.x = 0;\\nthis.y = 0;\"","jsScaleToFit:func":"\"// Adjust Size\\nthis.width = Graphics.width;\\nthis.height = Graphics.height;\\n\\n// Adjust Scale\\nconst ratioX = this.width / this.bitmap.width;\\nconst ratioY = this.height / this.bitmap.height;\\nconst scale = Math.max(ratioX, ratioY);\\nthis.scale.x = scale;\\nthis.scale.y = scale;\\n\\n// Adjust Coordinates\\nthis.x = (Graphics.width - this.width) / 2;\\nthis.y = Graphics.height - this.height;\"","jsScaleDown:func":"\"// Adjust Size\\nthis.width = Graphics.width;\\nthis.height = Graphics.height;\\n\\n// Adjust Scale\\nconst ratioX = Math.min(1, this.width / this.bitmap.width);\\nconst ratioY = Math.min(1, this.height / this.bitmap.height);\\nconst scale = Math.max(ratioX, ratioY);\\nthis.scale.x = scale;\\nthis.scale.y = scale;\\n\\n// Adjust Coordinates\\nthis.x = (Graphics.width - this.width) / 2;\\nthis.y = Graphics.height - this.height;\"","jsScale Up:func":"\"// Adjust Size\\nthis.width = Graphics.width;\\nthis.height = Graphics.height;\\n\\n// Adjust Scale\\nconst ratioX = Math.max(1, this.width / this.bitmap.width);\\nconst ratioY = Math.max(1, this.height / this.bitmap.height);\\nconst scale = Math.max(ratioX, ratioY);\\nthis.scale.x = scale;\\nthis.scale.y = scale;\\n\\n// Adjust Coordinates\\nthis.x = (Graphics.width - this.width) / 2;\\nthis.y = Graphics.height - this.height;\""} + * + * @param PartyCmd:struct + * @text Party Command Window + * @type struct<PartyCmd> + * @desc Settings that alter the Party Command Window in battle. + * @default {"Cmd":"","CmdStyle:str":"auto","CmdTextAlign:str":"left","CmdIconFight:num":"76","CommandAddAutoBattle:eval":"true","CmdIconAutoBattle:num":"78","CmdTextAutoBattle:str":"Auto","CommandAddOptions:eval":"true","CmdIconOptions:num":"83","ActiveTpbOptionsMessage:str":"Options Menu queued after action is complete.","CmdIconEscape:num":"82","Access":"","SkipPartyCmd:eval":"true","DisablePartyCmd:eval":"false","HelpWindow":"","HelpFight:str":"Select actions to fight.","HelpAutoBattle:str":"Sets party to Auto Battle mode.","HelpOptions:str":"Opens up the Options Menu.","HelpEscape:str":"Attempt to escape the battle."} + * + * @param ActorCmd:struct + * @text Actor Command Window + * @type struct<ActorCmd> + * @desc Settings that alter the Actor Command Window in battle. + * @default {"Cmd":"","CmdStyle:str":"auto","CmdTextAlign:str":"left","CmdIconItem:num":"176","IconStypeNorm:num":"78","IconStypeMagic:num":"79","BattleCmd":"","BattleCmdList:arraystr":"[\"attack\",\"skills\",\"guard\",\"item\",\"escape\"]","HelpWindow":"","HelpSkillType:str":"Opens up a list of skills under the \\C[16]%1\\C[0] category.","HelpItem:str":"Opens up a list of items that you can use.","HelpEscape:str":"Attempt to escape the battle.","HelpAutoBattle:str":"Automatically choose an action suitable for combat."} + * + * @param VisualBreak + * @text -------------------------- + * @default ---------------------------------- + * + * @param Actor:struct + * @text Actor Battler Settings + * @type struct<Actor> + * @desc Settings that alter various properties for actors. + * @default {"Flinch":"","FlinchDistanceX:num":"12","FlinchDistanceY:num":"0","FlinchDuration:num":"6","SvBattlers":"","AnchorX:num":"0.5","AnchorY:num":"1.0","ChantStyle:eval":"true","OffsetX:num":"0","OffsetY:num":"0","MotionSpeed:num":"12","PrioritySortActive:eval":"true","PrioritySortActors:eval":"false","Shadow:eval":"true","SmoothImage:eval":"true","HomePosJS:func":"\"// Declare Constants\\nconst sprite = this;\\nconst actor = this._actor;\\nconst index = arguments[0];\\n\\n// Make Calculations\\nlet x = Math.round((Graphics.width / 2) + 192)\\nx -= Math.floor((Graphics.width - Graphics.boxWidth) / 2);\\nx += index * 32;\\nlet y = (Graphics.height - 200) - ($gameParty.maxBattleMembers() * 48);\\ny -= Math.floor((Graphics.height - Graphics.boxHeight) / 2);\\ny += index * 48;\\n\\n// Home Position Offsets\\nconst offsetNote = /<SIDEVIEW HOME OFFSET:[ ]([\\\\+\\\\-]\\\\d+),[ ]([\\\\+\\\\-]\\\\d+)>/i;\\nconst xOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$1) : 0));\\nconst yOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$2) : 0));\\nx = xOffsets.reduce((r, offset) => r + offset, x);\\ny = yOffsets.reduce((r, offset) => r + offset, y);\\n\\n// Set Home Position\\nthis.setHome(x, y);\""} + * + * @param Enemy:struct + * @text Enemy Battler Settings + * @type struct<Enemy> + * @desc Settings that alter various properties for enemies. + * @default {"Visual":"","AttackAnimation:num":"1","EmergeText:eval":"false","OffsetX:num":"0","OffsetY:num":"0","SmoothImage:eval":"true","SelectWindow":"","FrontViewSelect:eval":"false","SideviewSelect:eval":"true","NameFontSize:num":"22","SvBattlers":"","AllowCollapse:eval":"false","AnchorX:num":"0.5","AnchorY:num":"1.0","MotionIdle:str":"walk","Shadow:eval":"true","Width:num":"64","Height:num":"64","WtypeId:num":"0"} + * + * @param HpGauge:struct + * @text HP Gauge Settings + * @type struct<HpGauge> + * @desc Settings that adjust the visual HP Gauge displayed in battle. + * @default {"Display":"","ShowActorGauge:eval":"false","ShowEnemyGauge:eval":"true","RequiresDefeat:eval":"false","BTestBypass:eval":"true","Settings":"","AnchorX:num":"0.5","AnchorY:num":"1.0","Scale:num":"0.5","OffsetX:num":"0","OffsetY:num":"-3","Options":"","AddHpGaugeOption:eval":"true","AdjustRect:eval":"true","Name:str":"Show HP Gauge"} + * + * @param ActionSequence:struct + * @text Action Sequence Settings + * @type struct<ActionSequence> + * @desc Settings that adjust how certain Action Sequences work. + * @default {"AutoSequences":"","AutoMeleeSolo:eval":"true","AutoMeleeAoE:eval":"true","CastAnimations":"","CastCertain:num":"120","CastPhysical:num":"52","CastMagical:num":"51","CounterReflection":"","CounterPlayback:eval":"true","ReflectAnimation:num":"53","ReflectPlayback:eval":"true","Stepping":"","MeleeDistance:num":"24","StepDistanceX:num":"48","StepDistanceY:num":"0","StepDuration:num":"12"} + * + * @param BreakEnd1 + * @text -------------------------- + * @default ---------------------------------- + * + * @param End Of + * @default Plugin Parameters + * + * @param BreakEnd2 + * @text -------------------------- + * @default ---------------------------------- + * + */ +/* ---------------------------------------------------------------------------- + * Auto Battle Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~AutoBattle: + * + * @param BattleDisplay + * @text Battle Display + * + * @param AutoBattleMsg:str + * @text Message + * @parent BattleDisplay + * @desc Message that's displayed when Auto Battle is on. + * Text codes allowed. %1 - OK button, %2 - Cancel button + * @default Press %1 or %2 to stop Auto Battle + * + * @param AutoBattleOK:str + * @text OK Button + * @parent BattleDisplay + * @desc Text used to represent the OK button. + * If VisuMZ_0_CoreEngine is present, ignore this. + * @default OK + * + * @param AutoBattleCancel:str + * @text Cancel Button + * @parent BattleDisplay + * @desc Text used to represent the Cancel button. + * If VisuMZ_0_CoreEngine is present, ignore this. + * @default Cancel + * + * @param AutoBattleBgType:num + * @text Background Type + * @parent BattleDisplay + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for Auto Battle window. + * @default 1 + * + * @param AutoBattleRect:func + * @text JS: X, Y, W, H + * @parent BattleDisplay + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const width = Graphics.width;\nconst height = this.calcWindowHeight(1, false);\nconst x = 0;\nconst y = (Graphics.height - height) / 2;\nreturn new Rectangle(x, y, width, height);" + * + * @param Options + * + * @param AddOption:eval + * @text Add Option? + * @parent Options + * @type boolean + * @on Add + * @off Don't Add + * @desc Add the Auto Battle options to the Options menu? + * @default true + * + * @param AdjustRect:eval + * @text Adjust Window Height + * @parent Options + * @type boolean + * @on Adjust + * @off Don't + * @desc Automatically adjust the options window height? + * @default true + * + * @param StartName:str + * @text Startup Name + * @parent Options + * @desc Command name of the option. + * @default Auto Battle Start + * + * @param StyleName:str + * @text Style Name + * @parent Options + * @desc Command name of the option. + * @default Auto Battle Style + * + * @param StyleOFF:str + * @text OFF + * @parent StyleName:str + * @desc Text displayed when Auto Battle Style is OFF. + * @default Attack + * + * @param StyleON:str + * @text ON + * @parent StyleName:str + * @desc Text displayed when Auto Battle Style is ON. + * @default Skills + * + */ +/* ---------------------------------------------------------------------------- + * Damage Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Damage: + * + * @param DamageStyles + * @text Damage Styles + * + * @param DefaultDamageStyle:str + * @text Default Style + * @parent DamageStyles + * @desc Which Damage Style do you want to set as default? + * Use 'Manual' to not use any styles at all. + * @default Standard + * + * @param DamageStyleList:arraystruct + * @text Style List + * @parent DamageStyles + * @type struct<DamageStyle>[] + * @desc A list of the damage styles available. + * These are used to calculate base damage. + * @default ["{\"Name:str\":\"Standard\",\"Formula:func\":\"\\\"// Declare Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Replace Formula\\\\nlet formula = item.damage.formula;\\\\nif (SceneManager.isSceneBattle() && !this.isCertainHit()) {\\\\n const fmt = 'Math.max(this.applyArmorModifiers(b, %1), 0)';\\\\n formula = formula.replace(/b.def/g, fmt.format('b.def'));\\\\n formula = formula.replace(/b.mdf/g, fmt.format('b.mdf'));\\\\n formula = formula.replace(/b.agi/g, fmt.format('b.agi'));\\\\n formula = formula.replace(/b.luk/g, fmt.format('b.luk'));\\\\n}\\\\n\\\\n// Calculate Damage\\\\nlet value = Math.max(eval(formula), 0);\\\\n\\\\n// Return Value\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Multiplier\",\"DamageType2:str\":\"%1 Damage Multiplier\",\"DamageType3:str\":\"%1 Recovery Multiplier\",\"DamageType4:str\":\"%1 Recovery Multiplier\",\"DamageType5:str\":\"%1 Drain Multiplier\",\"DamageType6:str\":\"%1 Drain Multiplier\",\"DamageDisplay:func\":\"\\\"return this.getItemDamageAmountTextOriginal();\\\"\"}","{\"Name:str\":\"Armor Scaling\",\"Formula:func\":\"\\\"// Declare Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Replace Formula\\\\nlet formula = item.damage.formula;\\\\nif (SceneManager.isSceneBattle() && !this.isCertainHit()) {\\\\n const fmt = 'Math.max(this.applyArmorModifiers(b, %1), 1)';\\\\n formula = formula.replace(/b.def/g, fmt.format('b.def'));\\\\n formula = formula.replace(/b.mdf/g, fmt.format('b.mdf'));\\\\n formula = formula.replace(/b.agi/g, fmt.format('b.agi'));\\\\n formula = formula.replace(/b.luk/g, fmt.format('b.luk'));\\\\n}\\\\n\\\\n// Calculate Damage\\\\nlet value = Math.max(eval(formula), 0);\\\\n\\\\n// Apply Defender's Defense Parameter\\\\nif (this.isDamage() && !this.isCertainHit()) {\\\\n\\\\n // Calculate Base Armor\\\\n let armor = this.isPhysical() ? b.def : b.mdf;\\\\n armor = this.applyArmorModifiers(target, armor);\\\\n\\\\n // Apply Armor to Damage\\\\n if (armor >= 0) {\\\\n value *= 100 / (100 + armor);\\\\n } else {\\\\n value *= 2 - (100 / (100 - armor));\\\\n }\\\\n}\\\\n\\\\n// Return Value\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Multiplier\",\"DamageType2:str\":\"%1 Damage Multiplier\",\"DamageType3:str\":\"%1 Recovery Multiplier\",\"DamageType4:str\":\"%1 Recovery Multiplier\",\"DamageType5:str\":\"%1 Drain Multiplier\",\"DamageType6:str\":\"%1 Drain Multiplier\",\"DamageDisplay:func\":\"\\\"return this.getItemDamageAmountTextOriginal();\\\"\"}","{\"Name:str\":\"CT\",\"Formula:func\":\"\\\"// Define Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Create Multiplier\\\\nconst multiplier = Math.max(eval(item.damage.formula), 0);\\\\n\\\\n// Declare Values\\\\nlet value = 0;\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\narmor = Math.max(this.applyArmorModifiers(target, armor), 0);\\\\nlet attackStat = 0;\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n attackStat = a.atk;\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n attackStat = a.mat;\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\n attackStat = a.def;\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\n attackStat = a.mdf;\\\\n}\\\\n\\\\n// Calculate Damage\\\\nattackStat = (attackStat * 1.75) + (level ** 2 / 45.5);\\\\nvalue = attackStat * 4;\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n value *= Math.max(256 - armor, 0) / 256;\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n value *= Math.max(102.4 - armor, 0) / 128;\\\\n}\\\\nvalue *= multiplier;\\\\n\\\\n// Return Value\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Multiplier\",\"DamageType2:str\":\"%1 Damage Multiplier\",\"DamageType3:str\":\"%1 Recovery Multiplier\",\"DamageType4:str\":\"%1 Recovery Multiplier\",\"DamageType5:str\":\"%1 Drain Multiplier\",\"DamageType6:str\":\"%1 Drain Multiplier\",\"DamageDisplay:func\":\"\\\"// Define Constants\\\\nconst item = this._item;\\\\nconst formula = item.damage.formula;\\\\nconst a = this._tempActorA;\\\\nconst b = this._tempActorB;\\\\nconst user = a;\\\\nconst target = b;\\\\n\\\\n// Return Value\\\\ntry {\\\\n const value = Math.max(eval(formula), 0);\\\\n return '%1%'.format(Math.round(value * 100));\\\\n} catch (e) {\\\\n if ($gameTemp.isPlaytest()) {\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\n }\\\\n return '?????';\\\\n}\\\"\"}","{\"Name:str\":\"D4\",\"Formula:func\":\"\\\"// Define Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Create Multiplier\\\\nconst multiplier = Math.max(eval(item.damage.formula), 0);\\\\n\\\\n// Declare Values\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\narmor = this.applyArmorModifiers(target, armor);\\\\nlet stat = 0;\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n stat = a.atk;\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n stat = a.mat;\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\n stat = a.def;\\\\n armor = 0;\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\n stat = a.mdf;\\\\n armor = 0;\\\\n}\\\\n\\\\n// Calculate Damage \\\\nlet value = 1.5 * Math.max(2 * stat * multiplier - armor, 1) * multiplier / 5;\\\\n\\\\n// Return Value\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Multiplier\",\"DamageType2:str\":\"%1 Damage Multiplier\",\"DamageType3:str\":\"%1 Recovery Multiplier\",\"DamageType4:str\":\"%1 Recovery Multiplier\",\"DamageType5:str\":\"%1 Drain Multiplier\",\"DamageType6:str\":\"%1 Drain Multiplier\",\"DamageDisplay:func\":\"\\\"// Define Constants\\\\nconst item = this._item;\\\\nconst formula = item.damage.formula;\\\\nconst a = this._tempActorA;\\\\nconst b = this._tempActorB;\\\\nconst user = a;\\\\nconst target = b;\\\\n\\\\n// Return Value\\\\ntry {\\\\n const value = Math.max(eval(formula), 0);\\\\n return '%1%'.format(Math.round(value * 100));\\\\n} catch (e) {\\\\n if ($gameTemp.isPlaytest()) {\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\n }\\\\n return '?????';\\\\n}\\\"\"}","{\"Name:str\":\"DQ\",\"Formula:func\":\"\\\"// Define Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Create Multiplier\\\\nlet multiplier = Math.max(eval(item.damage.formula), 0);\\\\nif (this.isCertainHit()) {\\\\n let value = multiplier * Math.max(a.atk, a.mat);\\\\n return (isNaN(value) ? 0 : value) * sign;\\\\n}\\\\n\\\\n// Get Primary Stats\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\narmor = this.applyArmorModifiers(b, armor);\\\\nlet stat = 1;\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n stat = a.atk;\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n stat = a.mat;\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\n stat = a.def;\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\n stat = a.mdf;\\\\n}\\\\n\\\\n// Check for Recovery\\\\nif (this.isRecover()) {\\\\n let value = stat * multiplier * sign;\\\\n return isNaN(value) ? 0 : value;\\\\n}\\\\n\\\\n// Calculate Damage\\\\nlet value = 0;\\\\nif (stat < ((2 + armor) / 2)) {\\\\n // Plink Damage\\\\n let baseline = Math.max(stat - ((12 * (armor - stat + 1)) / stat), 5);\\\\n value = baseline / 3;\\\\n} else {\\\\n // Normal Damage\\\\n let baseline = Math.max(stat - (armor / 2), 1);\\\\n value = baseline / 2;\\\\n}\\\\nvalue *= multiplier;\\\\n\\\\n// Return Value\\\\nreturn isNaN(value) ? 0 : value;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Multiplier\",\"DamageType2:str\":\"%1 Damage Multiplier\",\"DamageType3:str\":\"%1 Recovery Multiplier\",\"DamageType4:str\":\"%1 Recovery Multiplier\",\"DamageType5:str\":\"%1 Drain Multiplier\",\"DamageType6:str\":\"%1 Drain Multiplier\",\"DamageDisplay:func\":\"\\\"// Define Constants\\\\nconst item = this._item;\\\\nconst formula = item.damage.formula;\\\\nconst a = this._tempActorA;\\\\nconst b = this._tempActorB;\\\\nconst user = a;\\\\nconst target = b;\\\\n\\\\n// Return Value\\\\ntry {\\\\n const value = Math.max(eval(formula), 0);\\\\n return '%1%'.format(Math.round(value * 100));\\\\n} catch (e) {\\\\n if ($gameTemp.isPlaytest()) {\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\n }\\\\n return '?????';\\\\n}\\\"\"}","{\"Name:str\":\"FF7\",\"Formula:func\":\"\\\"// Define Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Create Power\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\n\\\\n// Declare base Damage\\\\nlet baseDamage = 0;\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n baseDamage = a.atk + ((a.atk + level) / 32) * ((a.atk * level) / 32);\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n baseDamage = 6 * (a.mat + level);\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\n baseDamage = 6 * (a.def + level);\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\n baseDamage = 6 * (a.mdf + level);\\\\n}\\\\n\\\\n// Calculate Final Damage\\\\nlet value = baseDamage;\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\narmor = this.applyArmorModifiers(target, armor);\\\\nif (this.isRecover()) {\\\\n value += 22 * power;\\\\n} else {\\\\n value = (power * Math.max(512 - armor, 1) * baseDamage) / (16 * 512);\\\\n}\\\\n\\\\n// Return Value\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Power\",\"DamageType2:str\":\"%1 Damage Power\",\"DamageType3:str\":\"%1 Recovery Power\",\"DamageType4:str\":\"%1 Recovery Power\",\"DamageType5:str\":\"%1 Drain Power\",\"DamageType6:str\":\"%1 Drain Power\",\"DamageDisplay:func\":\"\\\"// Define Constants\\\\nconst item = this._item;\\\\nconst formula = item.damage.formula;\\\\nconst a = this._tempActorA;\\\\nconst b = this._tempActorB;\\\\nconst user = a;\\\\nconst target = b;\\\\n\\\\n// Return Value\\\\ntry {\\\\n return formula;\\\\n} catch (e) {\\\\n if ($gameTemp.isPlaytest()) {\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\n }\\\\n return '?????';\\\\n}\\\"\"}","{\"Name:str\":\"FF8\",\"Formula:func\":\"\\\"// Define Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Create Power\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\n\\\\n// Declare Damage\\\\nlet Value = 0;\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\narmor = this.applyArmorModifiers(target, armor);\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n value = a.atk ** 2 / 16 + a.atk;\\\\n value *= Math.max(265 - armor, 1) / 256;\\\\n value *= power / 16;\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n value = a.mat + power;\\\\n value *= Math.max(265 - armor, 1) / 4;\\\\n value *= power / 256;\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\n value = (power + a.def) * power / 2;\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\n value = (power + a.mdf) * power / 2;\\\\n}\\\\n\\\\n// Return Value\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Power\",\"DamageType2:str\":\"%1 Damage Power\",\"DamageType3:str\":\"%1 Recovery Power\",\"DamageType4:str\":\"%1 Recovery Power\",\"DamageType5:str\":\"%1 Drain Power\",\"DamageType6:str\":\"%1 Drain Power\",\"DamageDisplay:func\":\"\\\"// Define Constants\\\\nconst item = this._item;\\\\nconst formula = item.damage.formula;\\\\nconst a = this._tempActorA;\\\\nconst b = this._tempActorB;\\\\nconst user = a;\\\\nconst target = b;\\\\n\\\\n// Return Value\\\\ntry {\\\\n return formula;\\\\n} catch (e) {\\\\n if ($gameTemp.isPlaytest()) {\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\n }\\\\n return '?????';\\\\n}\\\"\"}","{\"Name:str\":\"FF9\",\"Formula:func\":\"\\\"// Define Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Create Damage Constant\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\nif (this.isCertainHit()) {\\\\n return (isNaN(power) ? 0 : power) * sign;\\\\n}\\\\n\\\\n// Declare Main Stats\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\narmor = this.applyArmorModifiers(b, armor);\\\\nlet stat = 1;\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n stat = a.atk;\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n stat = a.mat;\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\n stat = a.def;\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\n stat = a.mdf;\\\\n}\\\\n\\\\n// Declare Base Damage\\\\nlet baseDamage = power;\\\\nif (this.isPhysical()) {\\\\n baseDamage += stat;\\\\n}\\\\nif (this.isDamage() || this.isDrain()) {\\\\n baseDamage -= armor;\\\\n baseDamage = Math.max(1, baseDamage);\\\\n}\\\\n\\\\n// Declare Bonus Damage\\\\nlet bonusDamage = stat + (((a.level || a.luk) + stat) / 8);\\\\n\\\\n// Declare Final Damage\\\\nlet value = baseDamage * bonusDamage * sign;\\\\n\\\\n// Return Value\\\\nreturn isNaN(value) ? 0 : value;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Power\",\"DamageType2:str\":\"%1 Damage Power\",\"DamageType3:str\":\"%1 Recovery Power\",\"DamageType4:str\":\"%1 Recovery Power\",\"DamageType5:str\":\"%1 Drain Power\",\"DamageType6:str\":\"%1 Drain Power\",\"DamageDisplay:func\":\"\\\"// Define Constants\\\\nconst item = this._item;\\\\nconst formula = item.damage.formula;\\\\nconst a = this._tempActorA;\\\\nconst b = this._tempActorB;\\\\nconst user = a;\\\\nconst target = b;\\\\n\\\\n// Return Value\\\\ntry {\\\\n return formula;\\\\n} catch (e) {\\\\n if ($gameTemp.isPlaytest()) {\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\n }\\\\n return '?????';\\\\n}\\\"\"}","{\"Name:str\":\"FF10\",\"Formula:func\":\"\\\"// Define Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Create Damage Constant\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\nif (this.isCertainHit()) {\\\\n return (isNaN(power) ? 0 : power) * sign;\\\\n}\\\\n\\\\n// Create Damage Offense Value\\\\nlet value = power;\\\\n\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n value = (((a.atk ** 3) / 32) + 32) * power / 16;\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n value = power * ((a.mat ** 2 / 6) + power) / 4;\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\n value = power * ((a.def + power) / 2);\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\n value = power * ((a.mdf + power) / 2);\\\\n}\\\\n\\\\n// Apply Damage Defense Value\\\\nif (this.isDamage() || this.isDrain()) {\\\\n let armor = this.isPhysical() ? b.def : b.mdf;\\\\n armor = this.applyArmorModifiers(b, armor);\\\\n armor = Math.max(armor, 1);\\\\n value *= ((((armor - 280.4) ** 2) / 110) / 16) / 730;\\\\n value *= (730 - (armor * 51 - (armor ** 2) / 11) / 10) / 730;\\\\n} else if (this.isRecover()) {\\\\n value *= -1;\\\\n}\\\\n\\\\n// Return Value\\\\nreturn isNaN(value) ? 0 : value;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Power\",\"DamageType2:str\":\"%1 Damage Power\",\"DamageType3:str\":\"%1 Recovery Power\",\"DamageType4:str\":\"%1 Recovery Power\",\"DamageType5:str\":\"%1 Drain Power\",\"DamageType6:str\":\"%1 Drain Power\",\"DamageDisplay:func\":\"\\\"// Define Constants\\\\nconst item = this._item;\\\\nconst formula = item.damage.formula;\\\\nconst a = this._tempActorA;\\\\nconst b = this._tempActorB;\\\\nconst user = a;\\\\nconst target = b;\\\\n\\\\n// Return Value\\\\ntry {\\\\n return formula;\\\\n} catch (e) {\\\\n if ($gameTemp.isPlaytest()) {\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\n }\\\\n return '?????';\\\\n}\\\"\"}","{\"Name:str\":\"MK\",\"Formula:func\":\"\\\"// Define Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Create Multiplier\\\\nconst multiplier = Math.max(eval(item.damage.formula), 0);\\\\n\\\\n// Declare Values\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\narmor = this.applyArmorModifiers(target, armor);\\\\nconst denominator = Math.max(200 + armor, 1);\\\\n\\\\n// Calculate Damage \\\\nlet value = 0;\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n value = 200 * a.atk / denominator;\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n value = 200 * a.mat / denominator;\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\n value = 200 * a.def / 200;\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\n value = 200 * a.mdf / 200;\\\\n}\\\\nvalue *= multiplier;\\\\n\\\\n// Return Value\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Multiplier\",\"DamageType2:str\":\"%1 Damage Multiplier\",\"DamageType3:str\":\"%1 Recovery Multiplier\",\"DamageType4:str\":\"%1 Recovery Multiplier\",\"DamageType5:str\":\"%1 Drain Multiplier\",\"DamageType6:str\":\"%1 Drain Multiplier\",\"DamageDisplay:func\":\"\\\"// Define Constants\\\\nconst item = this._item;\\\\nconst formula = item.damage.formula;\\\\nconst a = this._tempActorA;\\\\nconst b = this._tempActorB;\\\\nconst user = a;\\\\nconst target = b;\\\\n\\\\n// Return Value\\\\ntry {\\\\n const value = Math.max(eval(formula), 0);\\\\n return '%1%'.format(Math.round(value * 100));\\\\n} catch (e) {\\\\n if ($gameTemp.isPlaytest()) {\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\n }\\\\n return '?????';\\\\n}\\\"\"}","{\"Name:str\":\"MOBA\",\"Formula:func\":\"\\\"// Define Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Create Damage Value\\\\nlet value = Math.max(eval(item.damage.formula), 0) * sign;\\\\n\\\\n// Apply Attacker's Offense Parameter\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n value *= a.atk;\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n value *= a.mat;\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\n value *= a.def;\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\n value *= a.mdf;\\\\n}\\\\n\\\\n// Apply Defender's Defense Parameter\\\\nif (this.isDamage() && !this.isCertainHit()) {\\\\n\\\\n // Calculate Base Armor\\\\n let armor = this.isPhysical() ? b.def : b.mdf;\\\\n armor = this.applyArmorModifiers(target, armor);\\\\n\\\\n // Apply Armor to Damage\\\\n if (armor >= 0) {\\\\n value *= 100 / (100 + armor);\\\\n } else {\\\\n value *= 2 - (100 / (100 - armor));\\\\n }\\\\n}\\\\n\\\\n// Return Value\\\\nreturn isNaN(value) ? 0 : value;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Multiplier\",\"DamageType2:str\":\"%1 Damage Multiplier\",\"DamageType3:str\":\"%1 Recovery Multiplier\",\"DamageType4:str\":\"%1 Recovery Multiplier\",\"DamageType5:str\":\"%1 Drain Multiplier\",\"DamageType6:str\":\"%1 Drain Multiplier\",\"DamageDisplay:func\":\"\\\"// Define Constants\\\\nconst item = this._item;\\\\nconst formula = item.damage.formula;\\\\nconst a = this._tempActorA;\\\\nconst b = this._tempActorB;\\\\nconst user = a;\\\\nconst target = b;\\\\n\\\\n// Return Value\\\\ntry {\\\\n const value = Math.max(eval(formula), 0);\\\\n return '%1%'.format(Math.round(value * 100));\\\\n} catch (e) {\\\\n if ($gameTemp.isPlaytest()) {\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\n }\\\\n return '?????';\\\\n}\\\"\"}","{\"Name:str\":\"PKMN\",\"Formula:func\":\"\\\"// Define Constants\\\\nconst user = this.subject();\\\\nconst target = arguments[0];\\\\nconst item = this.item();\\\\nconst a = this.subject();\\\\nconst b = target;\\\\nconst v = $gameVariables._data;\\\\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\\\\n\\\\n// Create Power\\\\nconst power = Math.max(eval(item.damage.formula), 0);\\\\n\\\\n// Declare Values\\\\nlet value = 0;\\\\nlet level = Math.max(a.level || a.luk, 1);\\\\nlet armor = this.isPhysical() ? b.def : b.mdf;\\\\narmor = Math.max(this.applyArmorModifiers(target, armor), 0);\\\\nlet attackStat = 0;\\\\nif (this.isPhysical() && (this.isDamage() || this.isDrain())) {\\\\n attackStat = a.atk;\\\\n} else if (this.isMagical() && (this.isDamage() || this.isDrain())) {\\\\n attackStat = a.mat;\\\\n} else if (this.isPhysical() && this.isRecover()) {\\\\n attackStat = a.def;\\\\n} else if (this.isMagical() && this.isRecover()) {\\\\n attackStat = a.mdf;\\\\n}\\\\n\\\\n// Calculate Damage\\\\nvalue = (((((2 * level) / 5) + 2) * power * (attackStat / armor)) / 50) + 2;\\\\n\\\\n// Return Value\\\\nreturn (isNaN(value) ? 0 : value) * sign;\\\"\",\"ItemsEquipsCore\":\"\",\"DamageType\":\"\",\"DamageType1:str\":\"%1 Damage Power\",\"DamageType2:str\":\"%1 Damage Power\",\"DamageType3:str\":\"%1 Recovery Power\",\"DamageType4:str\":\"%1 Recovery Power\",\"DamageType5:str\":\"%1 Drain Power\",\"DamageType6:str\":\"%1 Drain Power\",\"DamageDisplay:func\":\"\\\"// Define Constants\\\\nconst item = this._item;\\\\nconst formula = item.damage.formula;\\\\nconst a = this._tempActorA;\\\\nconst b = this._tempActorB;\\\\nconst user = a;\\\\nconst target = b;\\\\n\\\\n// Return Value\\\\ntry {\\\\n return formula;\\\\n} catch (e) {\\\\n if ($gameTemp.isPlaytest()) {\\\\n console.log('Damage Formula Error for %1'.format(this._item.name));\\\\n }\\\\n return '?????';\\\\n}\\\"\"}"] + * + * @param Cap + * @text Damage Cap + * + * @param EnableDamageCap:eval + * @text Enable Damage Cap? + * @parent Cap + * @type boolean + * @on Enable + * @off Disable + * @desc Put a maximum hard damage cap on how far damage can go? + * This can be broken through the usage of notetags. + * @default false + * + * @param DefaultHardCap:num + * @text Default Hard Cap + * @parent EnableDamageCap:eval + * @type number + * @min 1 + * @desc The default hard damage cap used before applying damage. + * @default 9999 + * + * @param EnableSoftCap:eval + * @text Enable Soft Cap? + * @parent Cap + * @type boolean + * @on Enable + * @off Disable + * @desc Soft caps ease in the damage values leading up to the + * hard damage cap. Requires hard Damage Cap enabled. + * @default false + * + * @param DefaultSoftCap:num + * @text Base Soft Cap Rate + * @parent EnableSoftCap:eval + * @desc The default soft damage cap used before applying damage. + * @default 0.80 + * + * @param DefaultSoftScaler:num + * @text Soft Scale Constant + * @parent EnableSoftCap:eval + * @desc The default soft damage cap used before applying damage. + * @default 0.1275 + * + * @param Popups + * + * @param PopupDuration:num + * @text Popup Duration + * @parent Popups + * @type number + * @min 1 + * @desc Adjusts how many frames a popup stays visible. + * @default 128 + * + * @param NewPopupBottom:eval + * @text Newest Popups Bottom + * @parent Popups + * @type boolean + * @on Bottom + * @off Top + * @desc Puts the newest popups at the bottom. + * @default true + * + * @param PopupPosition:str + * @text Appear Position + * @parent Popups + * @type select + * @option Head - At the top of the battler. + * @value head + * @option Center - At the center of the battler. + * @value center + * @option Base - At the foot of the battler. + * @value base + * @desc Selects where you want popups to appear relative to the battler. + * @default base + * + * @param PopupOffsetX:num + * @text Offset X + * @parent Popups + * @desc Sets how much to offset the sprites by horizontally. + * Negative values go left. Positive values go right. + * @default 0 + * + * @param PopupOffsetY:num + * @text Offset Y + * @parent Popups + * @desc Sets how much to offset the sprites by vertically. + * Negative values go up. Positive values go down. + * @default 0 + * + * @param PopupShiftX:num + * @text Shift X + * @parent Popups + * @desc Sets how much to shift the sprites by horizontally. + * Negative values go left. Positive values go right. + * @default 8 + * + * @param PopupShiftY:num + * @text Shift Y + * @parent Popups + * @desc Sets how much to shift the sprites by vertically. + * Negative values go up. Positive values go down. + * @default -28 + * + * @param hpDamageFmt:str + * @text HP Damage Format + * @parent Popups + * @desc Determines HP damage format for popup. + * %1 - Value, %2 - HP Text + * @default -%1 + * + * @param hpHealingFmt:str + * @text HP Healing Format + * @parent Popups + * @desc Determines HP healing format for popup. + * %1 - Value, %2 - HP Text + * @default +%1 + * + * @param mpDamageFmt:str + * @text MP Damage Format + * @parent Popups + * @desc Determines MP damage format for popup. + * %1 - Value, %2 - MP Text + * @default -%1 %2 + * + * @param mpHealingFmt:str + * @text MP Healing Format + * @parent Popups + * @desc Determines MP healing format for popup. + * %1 - Value, %2 - MP Text + * @default +%1 %2 + * + * @param CriticalColor:eval + * @text Critical Flash Color + * @parent Popups + * @desc Adjust the popup's flash color. + * Format: [red, green, blue, alpha] + * @default [255, 0, 0, 160] + * + * @param CriticalDuration:num + * @text Critical Duration + * @parent Popups + * @type number + * @min 1 + * @desc Adjusts how many frames a the flash lasts. + * @default 128 + * + * @param Formulas + * + * @param OverallFormulaJS:func + * @text JS: Overall Formula + * @parent Formulas + * @type note + * @desc The overall formula used when calculating damage. + * @default "// Declare Constants\nconst target = arguments[0];\nconst critical = arguments[1];\nconst item = this.item();\n\n// Get Base Damage\nconst baseValue = this.evalDamageFormula(target);\n\n// Calculate Element Modifiers\nlet value = baseValue * this.calcElementRate(target);\n\n// Calculate Physical and Magical Modifiers\nif (this.isPhysical()) {\n value *= target.pdr;\n}\nif (this.isMagical()) {\n value *= target.mdr;\n}\n\n// Apply Healing Modifiers\nif (baseValue < 0) {\n value *= target.rec;\n}\n\n// Apply Critical Modifiers\nif (critical) {\n value = this.applyCritical(value);\n}\n\n// Apply Variance and Guard Modifiers\nvalue = this.applyVariance(value, item.damage.variance);\nvalue = this.applyGuard(value, target);\n\n// Finalize Damage\nvalue = Math.round(value);\nreturn value;" + * + * @param VarianceFormulaJS:func + * @text JS: Variance Formula + * @parent Formulas + * @type note + * @desc The formula used when damage variance. + * @default "// Declare Constants\nconst damage = arguments[0];\nconst variance = arguments[1];\n\n// Calculate Variance\nconst amp = Math.floor(Math.max((Math.abs(damage) * variance) / 100, 0));\nconst v = Math.randomInt(amp + 1) + Math.randomInt(amp + 1) - amp;\n\n// Return Damage\nreturn damage >= 0 ? damage + v : damage - v;" + * + * @param GuardFormulaJS:func + * @text JS: Guard Formula + * @parent Formulas + * @type note + * @desc The formula used when damage is guarded. + * @default "// Declare Constants\nconst damage = arguments[0];\nconst target = arguments[1];\n\n// Return Damage Early\nconst note = this.item().note;\nif (note.match(/<UNBLOCKABLE>/i)) return damage;\nif (!target.isGuard()) return damage;\nif (damage < 0) return damage;\n\n// Declare Guard Rate\nlet guardRate = 0.5;\nguardRate /= target.grd;\n\n// Return Damage\nreturn damage * guardRate;" + * + * @param Critical + * @text Critical Hits + * + * @param CriticalHitRateJS:func + * @text JS: Rate Formula + * @parent Critical + * @type note + * @desc The formula used to calculate Critical Hit Rates. + * @default "// Declare Constants\nconst user = this.subject();\nconst target = arguments[0];\n\n// Create Base Critical Rate\nlet rate = this.subject().cri * (1 - target.cev);\n\n// Apply Notetags\nconst note = this.item().note;\nif (note.match(/<ALWAYS CRITICAL>/i)) {\n return 1;\n}\nif (note.match(/<SET CRITICAL RATE:[ ](\\d+)([%%])>/i)) {\n return Number(RegExp.$1) / 100;\n}\nif (note.match(/<MODIFY CRITICAL RATE:[ ](\\d+)([%%])>/i)) {\n rate *= Number(RegExp.$1) / 100;\n}\nif (note.match(/<MODIFY CRITICAL RATE:[ ]([\\+\\-]\\d+)([%%])>/i)) {\n rate += Number(RegExp.$1) / 100;\n}\nif (note.match(/<JS CRITICAL RATE>\\s*([\\s\\S]*)\\s*<\\/JS CRITICAL RATE>/i)) {\n const code = String(RegExp.$1);\n try {\n eval(code);\n } catch (e) {\n if ($gameTemp.isPlaytest()) console.log(e);\n }\n}\n\n// Apply LUK Buffs/Debuffs\nconst lukStack = this.subject().buff(7);\nrate *= 2 ** lukStack;\n\n// Return Rate\nreturn rate;" + * + * @param CriticalHitMultiplier:func + * @text JS: Damage Formula + * @parent Critical + * @type note + * @desc The formula used to calculate Critical Hit Damage modification. + * @default "// Declare Constants\nconst user = this.subject();\nlet damage = arguments[0];\nlet multiplier = 2.0;\nlet bonusDamage = this.subject().luk * this.subject().cri;\n\n// Apply Notetags\nconst note = this.item().note;\nif (note.match(/<MODIFY CRITICAL MULTIPLIER:[ ](\\d+)([%%])>/i)) {\n multiplier = Number(RegExp.$1) / 100;\n}\nif (note.match(/<MODIFY CRITICAL MULTIPLIER:[ ]([\\+\\-]\\d+)([%%])>/i)) {\n multiplier += Number(RegExp.$1) / 100;\n}\nif (note.match(/<MODIFY CRITICAL BONUS DAMAGE:[ ](\\d+)([%%])>/i)) {\n bonusDamage *= Number(RegExp.$1) / 100;\n}\nif (note.match(/<MODIFY CRITICAL BONUS DAMAGE:[ ]([\\+\\-]\\d+)([%%])>/i)) {\n bonusDamage += bonusDamage * (RegExp.$1) / 100;\n}\nif (note.match(/<JS CRITICAL DAMAGE>\\s*([\\s\\S]*)\\s*<\\/JS CRITICAL DAMAGE>/i)) {\n const code = String(RegExp.$1);\n try {\n eval(code);\n } catch (e) {\n if ($gameTemp.isPlaytest()) console.log(e);\n }\n}\n\n// Return Damage\nreturn damage * multiplier + bonusDamage;" + * + */ +/* ---------------------------------------------------------------------------- + * Damage Formula Style + * ---------------------------------------------------------------------------- + */ +/*~struct~DamageStyle: + * + * @param Name:str + * @text Name + * @desc Name of this Damage Style. + * Used for notetags and such. + * @default Untitled + * + * @param Formula:func + * @text JS: Formula + * @parent Name:str + * @type note + * @desc The base formula for this Damage Style. + * @default "// Define Constants\nconst item = this.item();\nconst a = this.subject();\nconst b = target;\nconst sign = [3, 4].includes(item.damage.type) ? -1 : 1;\n\n// Create Damage Value\nlet value = Math.max(eval(item.damage.formula), 0) * sign;\n\n// Return Value\nreturn isNaN(value) ? 0 : value;" + * + * @param ItemsEquipsCore + * @text Items & Equips Core + * + * @param DamageType + * @text Damage Label + * @parent ItemsEquipsCore + * + * @param DamageType1:str + * @text HP Damage + * @parent DamageType + * @desc Vocabulary used for this data entry. + * @default %1 Damage Multiplier + * + * @param DamageType2:str + * @text MP Damage + * @parent DamageType + * @desc Vocabulary used for this data entry. + * @default %1 Damage Multiplier + * + * @param DamageType3:str + * @text HP Recovery + * @parent DamageType + * @desc Vocabulary used for this data entry. + * @default %1 Recovery Multiplier + * + * @param DamageType4:str + * @text MP Recovery + * @parent DamageType + * @desc Vocabulary used for this data entry. + * @default %1 Recovery Multiplier + * + * @param DamageType5:str + * @text HP Drain + * @parent DamageType + * @desc Vocabulary used for this data entry. + * @default %1 Drain Multiplier + * + * @param DamageType6:str + * @text MP Drain + * @parent DamageType + * @desc Vocabulary used for this data entry. + * @default %1 Drain Multiplier + * + * @param DamageDisplay:func + * @text JS: Damage Display + * @parent ItemsEquipsCore + * @type note + * @desc Code used the data displayed for this category. + * @default "// Define Constants\nconst item = this._item;\nconst formula = item.damage.formula;\nconst a = this._tempActorA;\nconst b = this._tempActorB;\nconst user = a;\nconst target = b;\n\n// Return Value\ntry {\n const value = Math.max(eval(formula), 0);\n return '%1%'.format(Math.round(value * 100));\n} catch (e) {\n if ($gameTemp.isPlaytest()) {\n console.log('Damage Formula Error for %1'.format(this._item.name));\n }\n return '?????';\n}" + * + */ +/* ---------------------------------------------------------------------------- + * Mechanics Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Mechanics: + * + * @param ActionSpeed + * @text Action Speed + * + * @param AllowRandomSpeed:eval + * @text Allow Random Speed? + * @parent ActionSpeed + * @type boolean + * @on Allow + * @off Disable + * @desc Allow speed to be randomized base off the user's AGI? + * @default false + * + * @param CalcActionSpeedJS:func + * @text JS: Calculate + * @parent ActionSpeed + * @type note + * @desc Code used to calculate action speed. + * @default "// Declare Constants\nconst agi = this.subject().agi;\n\n// Create Speed\nlet speed = agi;\nif (this.allowRandomSpeed()) {\n speed += Math.randomInt(Math.floor(5 + agi / 4));\n}\nif (this.item()) {\n speed += this.item().speed;\n}\nif (this.isAttack()) {\n speed += this.subject().attackSpeed();\n}\n\n// Return Speed\nreturn speed;" + * + * @param BaseTroop + * @text Base Troop + * + * @param BaseTroopIDs:arraynum + * @text Base Troop ID's + * @parent BaseTroop + * @type troop[] + * @desc Select the Troop ID(s) to duplicate page events from for all other troops. + * @default ["1"] + * + * @param CommonEvents + * @text Common Events (on Map) + * + * @param BattleStartEvent:num + * @text Pre-Battle Event + * @parent CommonEvents + * @type common_event + * @desc Common Event to run before each battle on map. + * Use to 0 to not run any Common Event at all. + * @default 0 + * + * @param BattleEndEvent:num + * @text Post-Battle Event + * @parent CommonEvents + * @type common_event + * @desc Queued Common Event to run after each battle on map. + * Use to 0 to not run any Common Event at all. + * @default 0 + * + * @param VictoryEvent:num + * @text Victory Event + * @parent CommonEvents + * @type common_event + * @desc Queued Common Event to run upon victory on map. + * Use to 0 to not run any Common Event at all. + * @default 0 + * + * @param DefeatEvent:num + * @text Defeat Event + * @parent CommonEvents + * @type common_event + * @desc Queued Common Event to run upon defeat on map. + * Use to 0 to not run any Common Event at all. + * @default 0 + * + * @param EscapeSuccessEvent:num + * @text Escape Success Event + * @parent CommonEvents + * @type common_event + * @desc Queued Common Event to run upon escape success on map. + * Use to 0 to not run any Common Event at all. + * @default 0 + * + * @param EscapeFailEvent:num + * @text Escape Fail Event + * @parent CommonEvents + * @type common_event + * @desc Queued Common Event to run upon escape failure on map. + * Use to 0 to not run any Common Event at all. + * @default 0 + * + * @param Escape + * + * @param CalcEscapeRatioJS:func + * @text JS: Calc Escape Ratio + * @parent Escape + * @type note + * @desc Code used to calculate the escape success ratio. + * @default "// Calculate Escape Ratio\nlet ratio = 0.5;\nratio *= $gameParty.agility();\nratio /= $gameTroop.agility();\n\n// Return Ratio\nreturn ratio;" + * + * @param CalcEscapeRaiseJS:func + * @text JS: Calc Escape Raise + * @parent Escape + * @type note + * @desc Code used to calculate how much the escape success ratio raises upon each failure. + * @default "// Calculate Escape Ratio\nlet value = 0.1;\nvalue += $gameParty.aliveMembers().length;\n\n// Return Value\nreturn value;" + * + * @param Switches + * + * @param SwitchCritical:num + * @text Switch: Critical + * @parent Switches + * @type switch + * @desc Turns switch ON if the action performs a critical hit. + * Switch reverts to OFF whenever an action starts. + * @default 0 + * + * @param SwitchMissEvade:num + * @text Switch: Miss/Evade + * @parent Switches + * @type switch + * @desc Turns switch ON if the action misses/is evaded. + * Switch reverts to OFF whenever an action starts. + * @default 0 + * + * @param Variables + * + * @param VariableDmg:num + * @text Variable: Damage + * @parent Variables + * @type variable + * @desc Variable records target damage during action. + * Variable reverts to 0 whenever an action starts. + * @default 0 + * + * @param VariableHeal:num + * @text Variable: Healing + * @parent Variables + * @type variable + * @desc Variable records target healing during action. + * Variable reverts to 0 whenever an action starts. + * @default 0 + * + * @param BattleJS + * @text JS: Battle-Related + * + * @param PreStartBattleJS:func + * @text JS: Pre-Start Battle + * @parent BattleJS + * @type note + * @desc Target function: BattleManager.startBattle() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param PostStartBattleJS:func + * @text JS: Post-Start Battle + * @parent BattleJS + * @type note + * @desc Target function: BattleManager.startBattle() + * JavaScript code occurs after function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param BattleVictoryJS:func + * @text JS: Battle Victory + * @parent BattleJS + * @type note + * @desc Target function: BattleManager.processVictory() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param EscapeSuccessJS:func + * @text JS: Escape Success + * @parent BattleJS + * @type note + * @desc Target function: BattleManager.onEscapeSuccess() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param EscapeFailureJS:func + * @text JS: Escape Failure + * @parent BattleJS + * @type note + * @desc Target function: BattleManager.onEscapeFailure() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param BattleDefeatJS:func + * @text JS: Battle Defeat + * @parent BattleJS + * @type note + * @desc Target function: BattleManager.processDefeat() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param PreEndBattleJS:func + * @text JS: Pre-End Battle + * @parent BattleJS + * @type note + * @desc Target function: BattleManager.endBattle() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param PostEndBattleJS:func + * @text JS: Post-End Battle + * @parent BattleJS + * @type note + * @desc Target function: BattleManager.endBattle() + * JavaScript code occurs after function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param TurnJS + * @text JS: Turn-Related + * + * @param PreStartTurnJS:func + * @text JS: Pre-Start Turn + * @parent TurnJS + * @type note + * @desc Target function: BattleManager.startTurn() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param PostStartTurnJS:func + * @text JS: Post-Start Turn + * @parent TurnJS + * @type note + * @desc Target function: BattleManager.startTurn() + * JavaScript code occurs after function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param PreEndTurnJS:func + * @text JS: Pre-End Turn + * @parent TurnJS + * @type note + * @desc Target function: Game_Battler.prototype.onTurnEnd() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param PostEndTurnJS:func + * @text JS: Post-End Turn + * @parent TurnJS + * @type note + * @desc Target function: Game_Battler.prototype.onTurnEnd() + * JavaScript code occurs after function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param PreRegenerateJS:func + * @text JS: Pre-Regenerate + * @parent TurnJS + * @type note + * @desc Target function: Game_Battler.prototype.regenerateAll() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param PostRegenerateJS:func + * @text JS: Post-Regenerate + * @parent TurnJS + * @type note + * @desc Target function: Game_Battler.prototype.regenerateAll() + * JavaScript code occurs after function is run. + * @default "// Declare Constants\nconst user = this;\nconst target = user;\nconst a = user;\nconst b = user;\n\n// Perform Actions\n" + * + * @param ActionJS + * @text JS: Action-Related + * + * @param PreStartActionJS:func + * @text JS: Pre-Start Action + * @parent ActionJS + * @type note + * @desc Target function: BattleManager.startAction() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst value = arguments[0];\nconst user = this.subject();\nconst target = user;\nconst a = user;\nconst b = user;\nconst action = this;\nconst item = this.item();\nconst skill = this.item();\n\n// Perform Actions\n" + * + * @param PostStartActionJS:func + * @text JS: Post-Start Action + * @parent ActionJS + * @type note + * @desc Target function: BattleManager.startAction() + * JavaScript code occurs after function is run. + * @default "// Declare Constants\nconst value = arguments[0];\nconst user = this.subject();\nconst target = user;\nconst a = user;\nconst b = user;\nconst action = this;\nconst item = this.item();\nconst skill = this.item();\n\n// Perform Actions\n" + * + * @param PreApplyJS:func + * @text JS: Pre-Apply + * @parent ActionJS + * @type note + * @desc Target function: Game_Action.prototype.apply() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst value = arguments[0];\nconst target = arguments[1];\nconst user = this.subject();\nconst a = user;\nconst b = target;\nconst action = this;\nconst item = this.item();\nconst skill = this.item();\n\n// Perform Actions\n\n// Return Value\nreturn value;" + * + * @param PreDamageJS:func + * @text JS: Pre-Damage + * @parent ActionJS + * @type note + * @desc Target function: Game_Action.prototype.executeDamage() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst value = arguments[0];\nconst target = arguments[1];\nconst user = this.subject();\nconst a = user;\nconst b = target;\nconst action = this;\nconst item = this.item();\nconst skill = this.item();\n\n// Perform Actions\n\n// Return Value\nreturn value;" + * + * @param PostDamageJS:func + * @text JS: Post-Damage + * @parent ActionJS + * @type note + * @desc Target function: Game_Action.prototype.executeDamage() + * JavaScript code occurs after function is run. + * @default "// Declare Constants\nconst value = arguments[0];\nconst target = arguments[1];\nconst user = this.subject();\nconst a = user;\nconst b = target;\nconst action = this;\nconst item = this.item();\nconst skill = this.item();\n\n// Perform Actions\n\n// Return Value\nreturn value;" + * + * @param PostApplyJS:func + * @text JS: Post-Apply + * @parent ActionJS + * @type note + * @desc Target function: Game_Action.prototype.apply() + * JavaScript code occurs after function is run. + * @default "// Declare Constants\nconst value = arguments[0];\nconst target = arguments[1];\nconst user = this.subject();\nconst a = user;\nconst b = target;\nconst action = this;\nconst item = this.item();\nconst skill = this.item();\n\n// Perform Actions\n\n// Return Value\nreturn value;" + * + * @param PreEndActionJS:func + * @text JS: Pre-End Action + * @parent ActionJS + * @type note + * @desc Target function: BattleManager.endAction() + * JavaScript code occurs before function is run. + * @default "// Declare Constants\nconst value = arguments[0];\nconst user = this.subject();\nconst target = user;\nconst a = user;\nconst b = user;\nconst action = this;\nconst item = this.item();\nconst skill = this.item();\n\n// Perform Actions\n" + * + * @param PostEndActionJS:func + * @text JS: Post-End Action + * @parent ActionJS + * @type note + * @desc Target function: BattleManager.endAction() + * JavaScript code occurs after function is run. + * @default "// Declare Constants\nconst value = arguments[0];\nconst user = this.subject();\nconst target = user;\nconst a = user;\nconst b = user;\nconst action = this;\nconst item = this.item();\nconst skill = this.item();\n\n// Perform Actions\n" + * + */ +/* ---------------------------------------------------------------------------- + * Battle Layout Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~BattleLayout: + * + * @param Style:str + * @text Battle Layout Style + * @type select + * @option Default - Shows actor faces in Battle Status. + * @value default + * @option List - Lists actors in Battle Status. + * @value list + * @option XP - Shows actor battlers in a stretched Battle Status. + * @value xp + * @option Portrait - Shows portraits in a stretched Battle Status. + * @value portrait + * @option Border - Displays windows around the screen border. + * @value border + * @option Sideview Battle UI - Requires VisuMZ_3_SideviewBattleUI + * @value sideview_ui + * @desc The style used for the battle layout. + * @default default + * + * @param ListStyle + * @text List Style + * @parent Style:str + * + * @param ShowFacesListStyle:eval + * @text Show Faces + * @parent ListStyle + * @type boolean + * @on Show + * @off Hide + * @desc Shows faces in List Style? + * @default true + * + * @param CommandWidth:num + * @text Command Window Width + * @parent ListStyle + * @type number + * @min 1 + * @desc Determine the window width for the Party and Actor Command + * Windows. Affects Default and List Battle Layout styles. + * @default 192 + * + * @param XPStyle + * @text XP Style + * @parent Style:str + * + * @param XPActorCommandLines:num + * @text Command Lines + * @parent XPStyle + * @type number + * @min 1 + * @desc Number of action lines in the Actor Command Window for the XP Style. + * @default 4 + * + * @param XPActorDefaultHeight:num + * @text Sprite Height + * @parent XPStyle + * @type number + * @min 1 + * @desc Default sprite height used when if the sprite's height has not been determined yet. + * @default 64 + * + * @param XPSpriteYLocation:str + * @text Sprite Base Location + * @parent XPStyle + * @type select + * @option Above Name - Sprite is located above the name. + * @value name + * @option Bottom - Sprite is located at the bottom of the window. + * @value bottom + * @option Centered - Sprite is centered in the window. + * @value center + * @option Top - Sprite is located at the top of the window. + * @value top + * @desc Determine where the sprite is located on the Battle Status Window. + * @default name + * + * @param PotraitStyle + * @text Portrait Style + * @parent Style:str + * + * @param ShowPortraits:eval + * @text Show Portraits? + * @parent PotraitStyle + * @type boolean + * @on Portraits + * @off Faces + * @desc Requires VisuMZ_1_MainMenuCore. + * Shows the actor's portrait instead of a face. + * @default true + * + * @param PortraitScale:num + * @text Portrait Scaling + * @parent PotraitStyle + * @desc If portraits are used, scale them by this much. + * @default 0.5 + * + * @param BorderStyle + * @text Border Style + * @parent Style:str + * + * @param SkillItemBorderCols:num + * @text Columns + * @parent BorderStyle + * @type number + * @min 1 + * @desc The total number of columns for Skill & Item Windows + * in the battle scene. + * @default 1 + * + * @param ShowPortraitsBorderStyle:eval + * @text Show Portraits? + * @parent BorderStyle + * @type boolean + * @on Portraits + * @off Faces + * @desc Requires VisuMZ_1_MainMenuCore. + * Shows the actor's portrait at the edge of the screen. + * @default true + * + * @param PortraitScaleBorderStyle:num + * @text Portrait Scaling + * @parent BorderStyle + * @desc If portraits are used, scale them by this much. + * @default 1.0 + * + * @param SkillItemWindows + * @text Skill & Item Windows + * + * @param SkillItemMiddleLayout:eval + * @text Middle Layout + * @parent SkillItemWindows + * @type boolean + * @on Middle + * @off Bottom + * @desc Shows the Skill & Item Windows in mid-screen? + * @default false + * + * @param SkillItemStandardCols:num + * @text Columns + * @parent SkillItemWindows + * @type number + * @min 1 + * @desc The total number of columns for Skill & Item Windows + * in the battle scene. + * @default 2 + * + * @param StatusWindow + * @text Status Window Elements + * + * @param StatusWindowName + * @text Battler Name + * @parent StatusWindow + * + * @param NameOffsetX:num + * @text Offset: X + * @parent StatusWindowName + * @desc Offset this Battle Status Window element's X. + * Negative goes left. Positive goes right. + * @default +0 + * + * @param NameOffsetY:num + * @text Offset: Y + * @parent StatusWindowName + * @desc Offset this Battle Status Window element's Y. + * Negative goes up. Positive goes down. + * @default +0 + * + * @param StatusWindowHpGauge + * @text Gauge 1 (HP) + * @parent StatusWindow + * + * @param HpGaugeOffsetX:num + * @text Offset: X + * @parent StatusWindowHpGauge + * @desc Offset this Battle Status Window element's X. + * Negative goes left. Positive goes right. + * @default +0 + * + * @param HpGaugeOffsetY:num + * @text Offset: Y + * @parent StatusWindowHpGauge + * @desc Offset this Battle Status Window element's Y. + * Negative goes up. Positive goes down. + * @default +0 + * + * @param StatusWindowMpGauge + * @text Gauge 2 (MP) + * @parent StatusWindow + * + * @param MpGaugeOffsetX:num + * @text Offset: X + * @parent StatusWindowMpGauge + * @desc Offset this Battle Status Window element's X. + * Negative goes left. Positive goes right. + * @default +0 + * + * @param MpGaugeOffsetY:num + * @text Offset: Y + * @parent StatusWindowMpGauge + * @desc Offset this Battle Status Window element's Y. + * Negative goes up. Positive goes down. + * @default +0 + * + * @param StatusWindowTpGauge + * @text Gauge 3 (TP) + * @parent StatusWindow + * + * @param TpGaugeOffsetX:num + * @text Offset: X + * @parent StatusWindowTpGauge + * @desc Offset this Battle Status Window element's X. + * Negative goes left. Positive goes right. + * @default +0 + * + * @param TpGaugeOffsetY:num + * @text Offset: Y + * @parent StatusWindowTpGauge + * @desc Offset this Battle Status Window element's Y. + * Negative goes up. Positive goes down. + * @default +0 + * + * @param StatusWindowStateIcon + * @text State Icon + * @parent StatusWindow + * + * @param StateIconOffsetX:num + * @text Offset: X + * @parent StatusWindowStateIcon + * @desc Offset this Battle Status Window element's X. + * Negative goes left. Positive goes right. + * @default +0 + * + * @param StateIconOffsetY:num + * @text Offset: Y + * @parent StatusWindowStateIcon + * @desc Offset this Battle Status Window element's Y. + * Negative goes up. Positive goes down. + * @default +0 + * + * @param StatusWindowTpbGauge + * @text TPB/ATB Gauge + * @parent StatusWindow + * + * @param TpbGaugeOffsetX:num + * @text Offset: X + * @parent StatusWindowTpbGauge + * @desc Offset this Battle Status Window element's X. + * Negative goes left. Positive goes right. + * @default +0 + * + * @param TpbGaugeOffsetY:num + * @text Offset: Y + * @parent StatusWindowTpbGauge + * @desc Offset this Battle Status Window element's Y. + * Negative goes up. Positive goes down. + * @default +0 + * + * @param StatusWindowSkin + * @text Window Skin + * @parent StatusWindow + * + * @param StatusWindowSkinFilename:str + * @text Filename + * @parent StatusWindowSkin + * @type file + * @dir img/system/ + * @desc Filename used for the Battle Status Window skin. + * Leave this empty to use the default window skin. + * @default + * + * @param StatusWindowSkinHide:eval + * @text Hide Window Skin? + * @parent StatusWindowSkin + * @type boolean + * @on No Window Skin + * @off Default Skin + * @desc Show/Hide the window skin for the Battle Status Window? + * @default false + * + * @param StatusWindowSelectBack + * @text Selectable Background + * @parent StatusWindow + * + * @param StatusWindowSelectableBackHide:eval + * @text Hide Selectable BG? + * @parent StatusWindowSelectBack + * @type boolean + * @on No Selectable BG + * @off Default Selectable BG + * @desc Show/Hide the selectable background box for the Battle Status Window? + * @default false + * + * @param StatusWindowAttachments + * @text Attachments + * @parent StatusWindow + * + * @param StatusWindowBackAttachment + * @text Back Attachment + * @parent StatusWindowAttachments + * + * @param StatusWindowAttachmentBack:str + * @text Filename + * @parent StatusWindowBackAttachment + * @type file + * @dir img/system/ + * @desc Filename used for an image to attach to the back of the + * Battle Status Window. Leave empty for none. + * @default + * + * @param StatusWindowAttachmentBackOffsetX:num + * @text Offset: X + * @parent StatusWindowBackAttachment + * @desc Offset this Battle Status Window element's X. + * Negative goes left. Positive goes right. + * @default +0 + * + * @param StatusWindowAttachmentBackOffsetY:num + * @text Offset: Y + * @parent StatusWindowBackAttachment + * @desc Offset this Battle Status Window element's Y. + * Negative goes up. Positive goes down. + * @default +0 + * + * @param StatusWindowFrontAttachment + * @text Front Attachment + * @parent StatusWindowAttachments + * + * @param StatusWindowAttachmentFront:str + * @text Filename + * @parent StatusWindowFrontAttachment + * @type file + * @dir img/system/ + * @desc Filename used for an image to attach to the front of the + * Battle Status Window. Leave empty for none. + * @default + * + * @param StatusWindowAttachmentFrontOffsetX:num + * @text Offset: X + * @parent StatusWindowFrontAttachment + * @desc Offset this Battle Status Window element's X. + * Negative goes left. Positive goes right. + * @default +0 + * + * @param StatusWindowAttachmentFrontOffsetY:num + * @text Offset: Y + * @parent StatusWindowFrontAttachment + * @desc Offset this Battle Status Window element's Y. + * Negative goes up. Positive goes down. + * @default +0 + * + * @param UiElements + * @text UI Elements + * + * @param AntiTintUiElements:eval + * @text Anti-Tint UI? + * @parent UiElements + * @type boolean + * @on Prevent Tint + * @off Allow Tint + * @desc Prevent UI Elements from being tinted? + * @default true + * + */ +/* ---------------------------------------------------------------------------- + * Battle Log Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~BattleLog: + * + * @param General + * + * @param BackColor:str + * @text Back Color + * @parent General + * @desc Use #rrggbb for a hex color. + * @default #000000 + * + * @param MaxLines:num + * @text Max Lines + * @parent General + * @type number + * @min 1 + * @desc Maximum number of lines to be displayed. + * @default 10 + * + * @param MessageWait:num + * @text Message Wait + * @parent General + * @type number + * @min 1 + * @desc Number of frames for a usual message wait. + * @default 16 + * + * @param TextAlign:str + * @text Text Align + * @parent General + * @type combo + * @option left + * @option center + * @option right + * @desc Text alignment for the Window_BattleLog. + * @default center + * + * @param BattleLogRectJS:func + * @text JS: X, Y, W, H + * @parent General + * @type note + * @desc Code used to determine the dimensions for the battle log. + * @default "const wx = 0;\nconst wy = 0;\nconst ww = Graphics.boxWidth;\nconst wh = this.calcWindowHeight(10, false);\nreturn new Rectangle(wx, wy, ww, wh);" + * + * @param StartTurn + * @text Start Turn + * + * @param StartTurnShow:eval + * @text Show Start Turn? + * @parent StartTurn + * @type boolean + * @on Show + * @off Hide + * @desc Display turn changes at the start of the turn? + * @default false + * + * @param StartTurnMsg:str + * @text Start Turn Message + * @parent StartTurn + * @desc Message displayed at turn start. + * %1 - Turn Count + * @default Turn %1 + * + * @param StartTurnWait:num + * @text Start Turn Wait + * @parent StartTurn + * @type number + * @min 1 + * @desc Number of frames to wait after a turn started. + * @default 40 + * + * @param DisplayAction + * @text Display Action + * + * @param ActionCenteredName:eval + * @text Show Centered Action? + * @parent DisplayAction + * @type boolean + * @on Show + * @off Hide + * @desc Display a centered text of the action name? + * @default true + * + * @param ActionSkillMsg1:eval + * @text Show Skill Message 1? + * @parent DisplayAction + * @type boolean + * @on Show + * @off Hide + * @desc Display the 1st skill message? + * @default false + * + * @param ActionSkillMsg2:eval + * @text Show Skill Message 2? + * @parent DisplayAction + * @type boolean + * @on Show + * @off Hide + * @desc Display the 2nd skill message? + * @default true + * + * @param ActionItemMsg:eval + * @text Show Item Message? + * @parent DisplayAction + * @type boolean + * @on Show + * @off Hide + * @desc Display the item use message? + * @default false + * + * @param ActionChanges + * @text Action Changes + * + * @param ShowCounter:eval + * @text Show Counter? + * @parent ActionChanges + * @type boolean + * @on Show + * @off Hide + * @desc Display counter text? + * @default true + * + * @param ShowReflect:eval + * @text Show Reflect? + * @parent ActionChanges + * @type boolean + * @on Show + * @off Hide + * @desc Display magic reflection text? + * @default true + * + * @param ShowSubstitute:eval + * @text Show Substitute? + * @parent ActionChanges + * @type boolean + * @on Show + * @off Hide + * @desc Display substitute text? + * @default true + * + * @param ActionResults + * @text Action Results + * + * @param ShowFailure:eval + * @text Show No Effect? + * @parent ActionResults + * @type boolean + * @on Show + * @off Hide + * @desc Display no effect text? + * @default false + * + * @param ShowCritical:eval + * @text Show Critical? + * @parent ActionResults + * @type boolean + * @on Show + * @off Hide + * @desc Display critical text? + * @default false + * + * @param ShowMissEvasion:eval + * @text Show Miss/Evasion? + * @parent ActionResults + * @type boolean + * @on Show + * @off Hide + * @desc Display miss/evasion text? + * @default false + * + * @param ShowHpDmg:eval + * @text Show HP Damage? + * @parent ActionResults + * @type boolean + * @on Show + * @off Hide + * @desc Display HP Damage text? + * @default false + * + * @param ShowMpDmg:eval + * @text Show MP Damage? + * @parent ActionResults + * @type boolean + * @on Show + * @off Hide + * @desc Display MP Damage text? + * @default false + * + * @param ShowTpDmg:eval + * @text Show TP Damage? + * @parent ActionResults + * @type boolean + * @on Show + * @off Hide + * @desc Display TP Damage text? + * @default false + * + * @param DisplayStates + * @text Display States + * + * @param ShowAddedState:eval + * @text Show Added States? + * @parent DisplayStates + * @type boolean + * @on Show + * @off Hide + * @desc Display added states text? + * @default false + * + * @param ShowRemovedState:eval + * @text Show Removed States? + * @parent DisplayStates + * @type boolean + * @on Show + * @off Hide + * @desc Display removed states text? + * @default false + * + * @param ShowCurrentState:eval + * @text Show Current States? + * @parent DisplayStates + * @type boolean + * @on Show + * @off Hide + * @desc Display the currently affected state text? + * @default false + * + * @param ShowAddedBuff:eval + * @text Show Added Buffs? + * @parent DisplayStates + * @type boolean + * @on Show + * @off Hide + * @desc Display added buffs text? + * @default false + * + * @param ShowAddedDebuff:eval + * @text Show Added Debuffs? + * @parent DisplayStates + * @type boolean + * @on Show + * @off Hide + * @desc Display added debuffs text? + * @default false + * + * @param ShowRemovedBuff:eval + * @text Show Removed Buffs? + * @parent DisplayStates + * @type boolean + * @on Show + * @off Hide + * @desc Display removed de/buffs text? + * @default false + * + */ +/* ---------------------------------------------------------------------------- + * Battleback Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Battleback: + * + * @param DefaultStyle:str + * @text Default Style + * @type select + * @option MZ (MZ's default style) + * @value MZ + * @option 1:1 (No Scaling) + * @value 1:1 + * @option Scale To Fit (Scale to screen size) + * @value ScaleToFit + * @option Scale Down (Scale Downward if Larger than Screen) + * @value ScaleDown + * @option Scale Up (Scale Upward if Smaller than Screen) + * @value ScaleUp + * @desc The default scaling style used for battlebacks. + * @default MZ + * + * @param jsOneForOne:func + * @text JS: 1:1 + * @type note + * @desc This code gives you control over the scaling for this style. + * @default "// Adjust Size\nthis.width = Graphics.width;\nthis.height = Graphics.height;\n\n// Adjust Scale\nconst scale = 1.0;\nthis.scale.x = scale;\nthis.scale.y = scale;\n\n// Adjust Coordinates\nthis.x = 0;\nthis.y = 0;" + * + * @param jsScaleToFit:func + * @text JS: Scale To Fit + * @type note + * @desc This code gives you control over the scaling for this style. + * @default "// Adjust Size\nthis.width = Graphics.width;\nthis.height = Graphics.height;\n\n// Adjust Scale\nconst ratioX = this.width / this.bitmap.width;\nconst ratioY = this.height / this.bitmap.height;\nconst scale = Math.max(ratioX, ratioY);\nthis.scale.x = scale;\nthis.scale.y = scale;\n\n// Adjust Coordinates\nthis.x = (Graphics.width - this.width) / 2;\nthis.y = Graphics.height - this.height;" + * + * @param jsScaleDown:func + * @text JS: Scale Down + * @type note + * @desc This code gives you control over the scaling for this style. + * @default "// Adjust Size\nthis.width = Graphics.width;\nthis.height = Graphics.height;\n\n// Adjust Scale\nconst ratioX = Math.min(1, this.width / this.bitmap.width);\nconst ratioY = Math.min(1, this.height / this.bitmap.height);\nconst scale = Math.max(ratioX, ratioY);\nthis.scale.x = scale;\nthis.scale.y = scale;\n\n// Adjust Coordinates\nthis.x = (Graphics.width - this.width) / 2;\nthis.y = Graphics.height - this.height;" + * + * @param jsScale Up:func + * @text JS: Scale Up + * @type note + * @desc This code gives you control over the scaling for this style. + * @default "// Adjust Size\nthis.width = Graphics.width;\nthis.height = Graphics.height;\n\n// Adjust Scale\nconst ratioX = Math.max(1, this.width / this.bitmap.width);\nconst ratioY = Math.max(1, this.height / this.bitmap.height);\nconst scale = Math.max(ratioX, ratioY);\nthis.scale.x = scale;\nthis.scale.y = scale;\n\n// Adjust Coordinates\nthis.x = (Graphics.width - this.width) / 2;\nthis.y = Graphics.height - this.height;" + * + */ +/* ---------------------------------------------------------------------------- + * Party Command Window Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~PartyCmd: + * + * @param Cmd + * @text Command Window + * + * @param CmdStyle:str + * @text Style + * @parent Cmd + * @type select + * @option Text Only + * @value text + * @option Icon Only + * @value icon + * @option Icon + Text + * @value iconText + * @option Automatic + * @value auto + * @desc How do you wish to draw commands in the Party Command Window? + * @default auto + * + * @param CmdTextAlign:str + * @text Text Align + * @parent Cmd + * @type combo + * @option left + * @option center + * @option right + * @desc Text alignment for the Party Command Window. + * @default left + * + * @param CmdIconFight:num + * @text Fight Icon + * @parent Cmd + * @desc The icon used for the Fight command. + * @default 76 + * + * @param CommandAddAutoBattle:eval + * @text Add Auto Battle? + * @parent Cmd + * @type boolean + * @on Add + * @off Don't + * @desc Add the "Auto Battle" command to the Command Window? + * @default true + * + * @param CmdIconAutoBattle:num + * @text Auto Battle Icon + * @parent CommandAddAutoBattle:eval + * @desc The icon used for the Auto Battle command. + * @default 78 + * + * @param CmdTextAutoBattle:str + * @text Auto Battle Text + * @parent CommandAddAutoBattle:eval + * @desc The text used for the Auto Battle command. + * @default Auto + * + * @param CommandAddOptions:eval + * @text Add Options? + * @parent Cmd + * @type boolean + * @on Add + * @off Don't + * @desc Add the "Options" command to the Command Window? + * @default true + * + * @param CmdIconOptions:num + * @text Options Icon + * @parent CommandAddOptions:eval + * @desc The icon used for the Options command. + * @default 83 + * + * @param ActiveTpbOptionsMessage:str + * @text Active TPB Message + * @parent CommandAddOptions:eval + * @desc Message that will be displayed when selecting options during the middle of an action. + * @default Options Menu queued after action is complete. + * + * @param CmdIconEscape:num + * @text Escape Icon + * @parent Cmd + * @desc The icon used for the Escape command. + * @default 82 + * + * @param Access + * + * @param SkipPartyCmd:eval + * @text Skip Party Command + * @parent Access + * @type boolean + * @on Skip + * @off Don't + * @desc DTB: Skip Party Command selection on turn start. + * TPB: Skip Party Command selection at battle start. + * @default true + * + * @param DisablePartyCmd:eval + * @text Disable Party Command + * @parent Access + * @type boolean + * @on Disable + * @off Don't + * @desc Disable the Party Command Window entirely? + * @default false + * + * @param HelpWindow + * @text Help Window + * + * @param HelpFight:str + * @text Fight + * @parent HelpWindow + * @desc Text displayed when selecting a skill type. + * %1 - Skill Type Name + * @default Select actions to fight. + * + * @param HelpAutoBattle:str + * @text Auto Battle + * @parent HelpWindow + * @desc Text displayed when selecting the Auto Battle command. + * @default Sets party to Auto Battle mode. + * + * @param HelpOptions:str + * @text Options + * @parent HelpWindow + * @desc Text displayed when selecting the Options command. + * @default Opens up the Options Menu. + * + * @param HelpEscape:str + * @text Escape + * @parent HelpWindow + * @desc Text displayed when selecting the escape command. + * @default Attempt to escape the battle. + * + */ +/* ---------------------------------------------------------------------------- + * Actor Command Window Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ActorCmd: + * + * @param Cmd + * @text Command Window + * + * @param CmdStyle:str + * @text Style + * @parent Cmd + * @type select + * @option Text Only + * @value text + * @option Icon Only + * @value icon + * @option Icon + Text + * @value iconText + * @option Automatic + * @value auto + * @desc How do you wish to draw commands in the Actor Command Window? + * @default auto + * + * @param CmdTextAlign:str + * @text Text Align + * @parent Cmd + * @type combo + * @option left + * @option center + * @option right + * @desc Text alignment for the Actor Command Window. + * @default left + * + * @param CmdIconItem:num + * @text Item Icon + * @parent Cmd + * @desc The icon used for the Item command. + * @default 176 + * + * @param IconStypeNorm:num + * @text Normal SType Icon + * @parent Cmd + * @desc Icon used for normal skill types that aren't assigned any + * icons. Ignore if VisuMZ_1_SkillsStatesCore is installed. + * @default 78 + * + * @param IconStypeMagic:num + * @text Magic SType Icon + * @parent Cmd + * @desc Icon used for magic skill types that aren't assigned any + * icons. Ignore if VisuMZ_1_SkillsStatesCore is installed. + * @default 79 + * + * @param BattleCmd + * @text Battle Commands + * + * @param BattleCmdList:arraystr + * @text Command List + * @parent BattleCmd + * @type combo[] + * @option attack + * @option skills + * @option guard + * @option item + * @option party + * @option escape + * @option auto battle + * @option stypes + * @option stype: x + * @option stype: name + * @option all skills + * @option skill: x + * @option skill: name + * @option combat log + * @option talk + * @option weapon swap + * @desc List of battle commands that appear by default + * if the <Battle Commands> notetag isn't present. + * @default ["attack","skills","guard","party","item"] + * + * @param ShowCosts:eval + * @text Show Command Costs + * @parent BattleCmd + * @type boolean + * @on Show Costs + * @off Hide Costs + * @desc If a battle command has a resource cost, show it? + * @default true + * + * @param HelpWindow + * @text Help Window + * + * @param HelpSkillType:str + * @text Skill Types + * @parent HelpWindow + * @desc Text displayed when selecting a skill type. + * %1 - Skill Type Name + * @default Opens up a list of skills under the \C[16]%1\C[0] category. + * + * @param HelpItem:str + * @text Items + * @parent HelpWindow + * @desc Text displayed when selecting the item command. + * @default Opens up a list of items that you can use. + * + * @param HelpEscape:str + * @text Escape + * @parent HelpWindow + * @desc Text displayed when selecting the escape command. + * @default Attempt to escape the battle. + * + * @param HelpAutoBattle:str + * @text Auto Battle + * @parent HelpWindow + * @desc Text displayed when selecting the Auto Battle command. + * @default Automatically choose an action suitable for combat. + * + * @param HelpParty:str + * @text Party + * @parent HelpWindow + * @desc Text displayed when selecting the Party command. + * Requires + * @default Automatically choose an action suitable for combat. + * + */ +/* ---------------------------------------------------------------------------- + * Actor Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Actor: + * + * @param Flinch + * + * @param FlinchDistanceX:num + * @text Flinch Distance X + * @parent Flinch + * @desc The normal X distance when flinching. + * @default 12 + * + * @param FlinchDistanceY:num + * @text Flinch Distance Y + * @parent Flinch + * @desc The normal Y distance when flinching. + * @default 0 + * + * @param FlinchDuration:num + * @text Flinch Duration + * @parent Flinch + * @desc The number of frames for a flinch to complete. + * @default 6 + * + * @param SvBattlers + * @text Sideview Battlers + * + * @param AnchorX:num + * @text Anchor: X + * @parent SvBattlers + * @desc Default X anchor for Sideview Battlers. + * Use values between 0 and 1 to be safe. + * @default 0.5 + * + * @param AnchorY:num + * @text Anchor: Y + * @parent SvBattlers + * @desc Default Y anchor for Sideview Battlers. + * Use values between 0 and 1 to be safe. + * @default 1.0 + * + * @param ChantStyle:eval + * @text Chant Style + * @parent SvBattlers + * @type boolean + * @on Magical Hit Type + * @off Magical Skill Type + * @desc What determines the chant motion? + * Hit type or skill type? + * @default true + * + * @param OffsetX:num + * @text Offset: X + * @parent SvBattlers + * @desc Offsets X position where actor is positioned. + * Negative values go left. Positive values go right. + * @default 0 + * + * @param OffsetY:num + * @text Offset: Y + * @parent SvBattlers + * @desc Offsets Y position where actor is positioned. + * Negative values go up. Positive values go down. + * @default 0 + * + * @param MotionSpeed:num + * @text Motion Speed + * @parent SvBattlers + * @type number + * @min 1 + * @desc The number of frames in between each motion. + * @default 12 + * + * @param PrioritySortActive:eval + * @text Priority: Active + * @parent SvBattlers + * @type boolean + * @on Active Actor over All Else + * @off Active Actor is Sorted Normally + * @desc Place the active actor on top of actor and enemy sprites. + * @default false + * + * @param PrioritySortActors:eval + * @text Priority: Actors + * @parent SvBattlers + * @type boolean + * @on Actors over Enemies + * @off Sort by Y Position + * @desc Prioritize actors over enemies when placing sprites on top + * of each other. + * @default true + * + * @param Shadow:eval + * @text Shadow Visible + * @parent SvBattlers + * @type boolean + * @on Visible + * @off Hidden + * @desc Show or hide the shadow for Sideview Battlers. + * @default true + * + * @param SmoothImage:eval + * @text Smooth Image + * @parent SvBattlers + * @type boolean + * @on Smooth + * @off Pixelated + * @desc Smooth out the battler images or pixelate them? + * @default false + * + * @param HomePosJS:func + * @text JS: Home Position + * @parent SvBattlers + * @type note + * @desc Code used to calculate the home position of actors. + * @default "// Declare Constants\nconst sprite = this;\nconst actor = this._actor;\nconst index = arguments[0];\n\n// Make Calculations\nlet x = Math.round((Graphics.width / 2) + 192)\nx -= Math.floor((Graphics.width - Graphics.boxWidth) / 2);\nx += index * 32;\nlet y = (Graphics.height - 200) - ($gameParty.maxBattleMembers() * 48);\ny -= Math.floor((Graphics.height - Graphics.boxHeight) / 2);\ny += index * 48;\n\n// Home Position Offsets\nconst offsetNote = /<SIDEVIEW HOME OFFSET:[ ]([\\+\\-]\\d+),[ ]([\\+\\-]\\d+)>/i;\nconst xOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$1) : 0));\nconst yOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$2) : 0));\nx = xOffsets.reduce((r, offset) => r + offset, x);\ny = yOffsets.reduce((r, offset) => r + offset, y);\n\n// Set Home Position\nthis.setHome(x, y);" + * + */ +/* ---------------------------------------------------------------------------- + * Enemy Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Enemy: + * + * @param Visual + * + * @param AttackAnimation:num + * @text Attack Animation + * @parent Visual + * @type animation + * @desc Default attack animation used for enemies. + * Use <Attack Animation: x> for custom animations. + * @default 1 + * + * @param EmergeText:eval + * @text Emerge Text + * @parent Visual + * @type boolean + * @on Show + * @off Hide + * @desc Show or hide the 'Enemy emerges!' text at the start of battle. + * @default false + * + * @param OffsetX:num + * @text Offset: X + * @parent Visual + * @desc Offsets X position where enemy is positioned. + * Negative values go left. Positive values go right. + * @default 0 + * + * @param OffsetY:num + * @text Offset: Y + * @parent Visual + * @desc Offsets Y position where enemy is positioned. + * Negative values go up. Positive values go down. + * @default 0 + * + * @param SmoothImage:eval + * @text Smooth Image + * @parent Visual + * @type boolean + * @on Smooth + * @off Pixelated + * @desc Smooth out the battler images or pixelate them? + * @default true + * + * @param SelectWindow + * @text Select Window + * + * @param LastSelected:eval + * @text Any: Last Selected + * @parent SelectWindow + * @type boolean + * @on Last Selected + * @off FV/SV Priority + * @desc Prioritize last selected enemy over front view or sideview settings? + * @default true + * + * @param FrontViewSelect:eval + * @text FV: Right Priority + * @parent SelectWindow + * @type boolean + * @on Right + * @off Normal + * @desc If using frontview, auto select the enemy furthest right. + * @default false + * + * @param SideviewSelect:eval + * @text SV: Right Priority + * @parent SelectWindow + * @type boolean + * @on Right + * @off Normal + * @desc If using sideview, auto select the enemy furthest right. + * @default true + * + * @param Name + * + * @param NameLegacy:eval + * @text Legacy Option + * @parent Name + * @type boolean + * @on Legacy Version + * @off New Version (Sprite) + * @desc Use the legacy version (window) or new version (sprite). + * WARNING: Legacy version is no longer supported for bugs. + * @default false + * + * @param NameFontSize:num + * @text Font Size + * @parent Name + * @desc Font size used for enemy names. + * @default 22 + * + * @param NamePosition + * @text Name Position + * @parent Name + * + * @param NameOffsetX:num + * @text Offset X + * @parent NamePosition + * @desc Offset the enemy name's X position by this much. + * Negative goes left. Positive goes right. + * @default 0 + * + * @param NameOffsetY:num + * @text Offset Y + * @parent NamePosition + * @desc Offset the enemy name's Y position by this much. + * Negative goes up. Positive goes down. + * @default 0 + * + * @param NameAttachStateIcon:eval + * @text Attach States + * @parent Name + * @type boolean + * @on Attach + * @off Normal Position + * @desc Attach the enemy's state icon to the enemy name? + * @default false + * + * @param AttachStateOffsetX:num + * @text Attach: Offset X + * @parent NameAttachStateIcon:eval + * @desc How much to offset the attached icon's X position by? + * Negative goes left. Positive goes right. + * @default +0 + * + * @param AttachStateOffsetY:num + * @text Attach: Offset Y + * @parent NameAttachStateIcon:eval + * @desc How much to offset the attached icon's Y position by? + * Negative goes up. Positive goes down. + * @default +0 + * + * @param NameVisibility + * @text Name Visibility + * @parent Name + * + * @param NameAlwaysHidden:eval + * @text Always Hidden + * @parent NameVisibility + * @type boolean + * @on Always Hidden + * @off No Priority + * @desc Determines if the enemy name will always be visible. + * Highest priority. + * @default false + * + * @param NameAlwaysVisible:eval + * @text Always Visible + * @parent NameVisibility + * @type boolean + * @on Always Visible + * @off Hide when Unselected + * @desc Determines if the enemy name will always be visible. + * Medium priority. + * @default false + * + * @param NameAlwaysSelectOnly:eval + * @text By Selection? + * @parent NameVisibility + * @type boolean + * @on Visible when Selected + * @off Visible when Targeting + * @desc Determines the conditions for enemy name visibility. + * Lowest priority. + * @default false + * + * @param SvBattlers + * @text Sideview Battlers + * + * @param AllowCollapse:eval + * @text Allow Collapse + * @parent SvBattlers + * @type boolean + * @on Allow + * @off Don't + * @desc Causes defeated enemies with SV Battler graphics + * to "fade away" when defeated? + * @default false + * + * @param AnchorX:num + * @text Anchor: X + * @parent SvBattlers + * @desc Default X anchor for Sideview Battlers. + * Use values between 0 and 1 to be safe. + * @default 0.5 + * + * @param AnchorY:num + * @text Anchor: Y + * @parent SvBattlers + * @desc Default Y anchor for Sideview Battlers. + * Use values between 0 and 1 to be safe. + * @default 1.0 + * + * @param MotionIdle:str + * @text Motion: Idle + * @parent SvBattlers + * @type combo + * @option walk + * @option wait + * @option chant + * @option guard + * @option damage + * @option evade + * @option thrust + * @option swing + * @option missile + * @option skill + * @option spell + * @option item + * @option escape + * @option victory + * @option dying + * @option abnormal + * @option sleep + * @option dead + * @desc Sets default idle animation used by Sideview Battlers. + * @default walk + * + * @param Shadow:eval + * @text Shadow Visible + * @parent SvBattlers + * @type boolean + * @on Visible + * @off Hidden + * @desc Show or hide the shadow for Sideview Battlers. + * @default true + * + * @param Width:num + * @text Size: Width + * @parent SvBattlers + * @type number + * @min 1 + * @desc Default width for enemies that use Sideview Battlers. + * @default 64 + * + * @param Height:num + * @text Size: Height + * @parent SvBattlers + * @type number + * @min 1 + * @desc Default height for enemies that use Sideview Battlers. + * @default 64 + * + * @param WtypeId:num + * @text Weapon Type + * @parent SvBattlers + * @type number + * @min 0 + * @desc Sets default weapon type used by Sideview Battlers. + * Use 0 for Bare Hands. + * @default 0 + * + */ +/* ---------------------------------------------------------------------------- + * HP Gauge Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~HpGauge: + * + * @param Display + * @text Show Gauges For + * + * @param ShowActorGauge:eval + * @text Actors + * @parent Display + * @type boolean + * @on Show + * @off Hide + * @desc Show HP Gauges over the actor sprites' heads? + * Requires SV Actors to be visible. + * @default true + * + * @param ShowEnemyGauge:eval + * @text Enemies + * @parent Display + * @type boolean + * @on Show + * @off Hide + * @desc Show HP Gauges over the enemy sprites' heads? + * Can be bypassed with <Hide HP Gauge> notetag. + * @default true + * + * @param RequiresDefeat:eval + * @text Requires Defeat? + * @parent ShowEnemyGauge:eval + * @type boolean + * @on Require Defeat First + * @off No Requirement + * @desc Requires defeating the enemy once to show HP Gauge? + * Can be bypassed with <Show HP Gauge> notetag. + * @default true + * + * @param BTestBypass:eval + * @text Battle Test Bypass? + * @parent RequiresDefeat:eval + * @type boolean + * @on Bypass + * @off Don't Bypass + * @desc Bypass the defeat requirement in battle test? + * @default true + * + * @param Settings + * + * @param AnchorX:num + * @text Anchor X + * @parent Settings + * @desc Where do you want the HP Gauge sprite's anchor X to be? + * Use values between 0 and 1 to be safe. + * @default 0.5 + * + * @param AnchorY:num + * @text Anchor Y + * @parent Settings + * @desc Where do you want the HP Gauge sprite's anchor Y to be? + * Use values between 0 and 1 to be safe. + * @default 1.0 + * + * @param Scale:num + * @text Scale + * @parent Settings + * @desc How large/small do you want the HP Gauge to be scaled? + * @default 0.5 + * + * @param OffsetX:num + * @text Offset X + * @parent Settings + * @desc How many pixels to offset the HP Gauge's X by? + * @default 0 + * + * @param OffsetY:num + * @text Offset Y + * @parent Settings + * @desc How many pixels to offset the HP Gauge's Y by? + * @default -3 + * + * @param Options + * @text Options + * + * @param AddHpGaugeOption:eval + * @text Add Option? + * @parent Options + * @type boolean + * @on Add + * @off Don't Add + * @desc Add the 'Show HP Gauge' option to the Options menu? + * @default true + * + * @param AdjustRect:eval + * @text Adjust Window Height + * @parent Options + * @type boolean + * @on Adjust + * @off Don't + * @desc Automatically adjust the options window height? + * @default true + * + * @param Name:str + * @text Option Name + * @parent Options + * @desc Command name of the option. + * @default Show HP Gauge + * + */ +/* ---------------------------------------------------------------------------- + * Action Sequence Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ActionSequence: + * + * @param AutoSequences + * @text Automatic Sequences + * + * @param AutoMeleeSolo:eval + * @text Melee Single Target + * @parent AutoSequences + * @type boolean + * @on Allow + * @off Ignore + * @desc Allow this auto sequence for physical, single target actions? + * @default true + * + * @param AutoMeleeAoE:eval + * @text Melee Multi Target + * @parent AutoSequences + * @type boolean + * @on Allow + * @off Ignore + * @desc Allow this auto sequence for physical, multi-target actions? + * @default true + * + * @param QoL + * @text Quality of Life + * + * @param AutoNotetag:eval + * @text Auto Notetag + * @parent QoL + * @type boolean + * @on Automatic + * @off Manual + * @desc Automatically apply the <Custom Action Sequence> notetag + * effect to any item or skill that has a Common Event? + * @default false + * + * @param CastAnimations + * @text Cast Animations + * + * @param CastCertain:num + * @text Certain Hit + * @parent CastAnimations + * @type animation + * @desc Cast animation for Certain Hit skills. + * @default 120 + * + * @param CastPhysical:num + * @text Physical + * @parent CastAnimations + * @type animation + * @desc Cast animation for Physical skills. + * @default 52 + * + * @param CastMagical:num + * @text Magical + * @parent CastAnimations + * @type animation + * @desc Cast animation for Magical skills. + * @default 51 + * + * @param CounterReflection + * @text Counter/Reflect + * + * @param CounterPlayback:eval + * @text Counter Back + * @parent CounterReflection + * @type boolean + * @on Play Back + * @off Ignore + * @desc Play back the attack animation used? + * @default true + * + * @param ReflectAnimation:num + * @text Reflect Animation + * @parent CounterReflection + * @type animation + * @desc Animation played when an action is reflected. + * @default 53 + * + * @param ReflectPlayback:eval + * @text Reflect Back + * @parent CounterReflection + * @type boolean + * @on Play Back + * @off Ignore + * @desc Play back the attack animation used? + * @default true + * + * @param Stepping + * + * @param MeleeDistance:num + * @text Melee Distance + * @parent Stepping + * @desc Minimum distance in pixels for Movement Action Sequences. + * @default 24 + * + * @param StepDistanceX:num + * @text Step Distance X + * @parent Stepping + * @desc The normal X distance when stepping forward. + * @default 48 + * + * @param StepDistanceY:num + * @text Step Distance Y + * @parent Stepping + * @desc The normal Y distance when stepping forward. + * @default 0 + * + * @param StepDuration:num + * @text Step Duration + * @parent Stepping + * @desc The number of frames for a stepping action to complete. + * @default 12 + * + */ +/* ---------------------------------------------------------------------------- + * Projectile Start Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ProjectileStart: + * + * @param Type:str + * @text Type + * @type select + * @option Target - Start from battler target(s) + * @value target + * @option Point - Start from a point on the screen + * @value point + * @desc Select where the projectile should start from. + * @default target + * + * @param Targets:arraystr + * @text Target(s) + * @parent Type:str + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) to start the projectile from. + * @default ["user"] + * + * @param TargetCenter:eval + * @text Centralize + * @parent Targets:arraystr + * @type boolean + * @on Center Projectile + * @off Create Each + * @desc Create one projectile at the center of the targets? + * Or create a projectile for each target? + * @default false + * + * @param TargetLocation:str + * @text Target Location + * @parent Targets:arraystr + * @type combo + * @option front head + * @option front center + * @option front base + * @option middle head + * @option middle center + * @option middle base + * @option back head + * @option back center + * @option back base + * @desc Select which part of the target to send the projectile from. + * @default middle center + * + * @param PointX:eval + * @text Point X + * @parent Type:str + * @desc Insert the X coordinate to start the projectile at. + * You may use JavaScript code. + * @default Graphics.width / 2 + * + * @param PointY:eval + * @text Point Y + * @parent Type:str + * @desc Insert the Y coordinate to start the projectile at. + * You may use JavaScript code. + * @default Graphics.height / 2 + * + * @param OffsetX:eval + * @text Offset X + * @desc Insert how many pixels to offset the X coordinate by. + * You may use JavaScript code. + * @default +0 + * + * @param OffsetY:eval + * @text Offset Y + * @desc Insert how many pixels to offset the Y coordinate by. + * You may use JavaScript code. + * @default +0 + * + */ +/* ---------------------------------------------------------------------------- + * Projectile Goal Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ProjectileGoal: + * + * @param Type:str + * @text Type + * @type select + * @option Target - Goal is battler target(s) + * @value target + * @option Point - Goal is a point on the screen + * @value point + * @desc Select where the projectile should go to. + * @default target + * + * @param Targets:arraystr + * @text Target(s) + * @parent Type:str + * @type combo[] + * @option user + * @option current target + * @option prev target + * @option next target + * @option all targets + * @option focus + * @option not focus + * @option + * @option alive friends + * @option alive friends not user + * @option alive friends not target + * @option dead friends + * @option friend index x + * @option + * @option alive opponents + * @option alive opponents not target + * @option dead opponents + * @option opponent index x + * @option + * @option alive actors + * @option alive actors not user + * @option alive actors not target + * @option dead actors + * @option actor index x + * @option actor ID x + * @option + * @option alive enemies + * @option alive enemies not user + * @option alive enemies not target + * @option dead enemies + * @option enemy index x + * @option enemy ID x + * @option + * @option alive battlers + * @option alive battlers not user + * @option alive battlers not target + * @option dead battlers + * @option + * @desc Select which unit(s) for projectile to go to. + * @default ["all targets"] + * + * @param TargetCenter:eval + * @text Centralize + * @parent Targets:arraystr + * @type boolean + * @on Center Projectile + * @off Create Each + * @desc Set goal in the center of targets? + * Or create a projectile to go to each target? + * @default false + * + * @param TargetLocation:str + * @text Target Location + * @parent Targets:arraystr + * @type combo + * @option front head + * @option front center + * @option front base + * @option middle head + * @option middle center + * @option middle base + * @option back head + * @option back center + * @option back base + * @desc Select which part of the target to send the projectile at. + * @default middle center + * + * @param PointX:eval + * @text Point X + * @parent Type:str + * @desc Insert the X coordinate to send the projectile to. + * You may use JavaScript code. + * @default Graphics.width / 2 + * + * @param PointY:eval + * @text Point Y + * @parent Type:str + * @desc Insert the Y coordinate to send the projectile to. + * You may use JavaScript code. + * @default Graphics.height / 2 + * + * @param OffsetX:eval + * @text Offset X + * @desc Insert how many pixels to offset the X coordinate by. + * You may use JavaScript code. + * @default +0 + * + * @param OffsetY:eval + * @text Offset Y + * @desc Insert how many pixels to offset the Y coordinate by. + * You may use JavaScript code. + * @default +0 + * + */ +/* ---------------------------------------------------------------------------- + * Projectile Extra Animation Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ProjectileExAni: + * + * @param AutoAngle:eval + * @text Auto Angle? + * @parent Settings + * @type boolean + * @on Automatically Angle + * @off Normal + * @desc Automatically angle the projectile to tilt the direction it's moving? + * @default true + * + * @param AngleOffset:eval + * @text Angle Offset + * @desc Alter the projectile's tilt by this many degrees. + * @default +0 + * + * @param Arc:eval + * @text Arc Peak + * @parent Settings + * @desc This is the height of the project's trajectory arc + * in pixels. + * @default 0 + * + * @param EasingType:str + * @text Easing + * @parent Settings + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type to apply to the projectile's trajectory. + * @default Linear + * + * @param Spin:eval + * @text Spin Speed + * @parent Settings + * @desc Determine how much angle the projectile spins per frame. + * Does not work well with "Auto Angle". + * @default +0.0 + * + */ +/* ---------------------------------------------------------------------------- + * Projectile Extra Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~ProjectileExtra: + * + * @param AutoAngle:eval + * @text Auto Angle? + * @parent Settings + * @type boolean + * @on Automatically Angle + * @off Normal + * @desc Automatically angle the projectile to tilt the direction it's moving? + * @default true + * + * @param AngleOffset:eval + * @text Angle Offset + * @desc Alter the projectile's tilt by this many degrees. + * @default +0 + * + * @param Arc:eval + * @text Arc Peak + * @parent Settings + * @desc This is the height of the project's trajectory arc + * in pixels. + * @default 0 + * + * @param BlendMode:num + * @text Blend Mode + * @type select + * @option 0 - Normal + * @value 0 + * @option 1 - Additive + * @value 1 + * @option 2 - Multiply + * @value 2 + * @option 3 - Screen + * @value 3 + * @desc What kind of blend mode do you wish to apply to the projectile? + * @default 0 + * + * @param EasingType:str + * @text Easing + * @parent Settings + * @type combo + * @option Linear + * @option InSine + * @option OutSine + * @option InOutSine + * @option InQuad + * @option OutQuad + * @option InOutQuad + * @option InCubic + * @option OutCubic + * @option InOutCubic + * @option InQuart + * @option OutQuart + * @option InOutQuart + * @option InQuint + * @option OutQuint + * @option InOutQuint + * @option InExpo + * @option OutExpo + * @option InOutExpo + * @option InCirc + * @option OutCirc + * @option InOutCirc + * @option InBack + * @option OutBack + * @option InOutBack + * @option InElastic + * @option OutElastic + * @option InOutElastic + * @option InBounce + * @option OutBounce + * @option InOutBounce + * @desc Select which easing type to apply to the projectile's trajectory. + * @default Linear + * + * @param Hue:eval + * @text Hue + * @parent Settings + * @desc Adjust the hue of the projectile. + * Insert a number between 0 and 360. + * @default 0 + * + * @param Scale:eval + * @text Scale + * @parent Settings + * @desc Adjust the size scaling of the projectile. + * Use decimals for exact control. + * @default 1.0 + * + * @param Spin:eval + * @text Spin Speed + * @parent Settings + * @desc Determine how much angle the projectile spins per frame. + * Does not work well with "Auto Angle". + * @default +0.0 + * + */ +//============================================================================= + +const _0x5bdce9=_0x9b05;(function(_0x3f9866,_0x1c9533){const _0x45e538=_0x9b05,_0x5a0cc5=_0x3f9866();while(!![]){try{const _0x5c8526=-parseInt(_0x45e538(0x5cb))/0x1*(-parseInt(_0x45e538(0x885))/0x2)+-parseInt(_0x45e538(0x4d3))/0x3*(parseInt(_0x45e538(0x42a))/0x4)+parseInt(_0x45e538(0x9cf))/0x5*(-parseInt(_0x45e538(0x7c4))/0x6)+parseInt(_0x45e538(0x252))/0x7+parseInt(_0x45e538(0x9d8))/0x8+parseInt(_0x45e538(0x296))/0x9+parseInt(_0x45e538(0xb17))/0xa*(-parseInt(_0x45e538(0xaa9))/0xb);if(_0x5c8526===_0x1c9533)break;else _0x5a0cc5['push'](_0x5a0cc5['shift']());}catch(_0x2bb6fe){_0x5a0cc5['push'](_0x5a0cc5['shift']());}}}(_0x1d5c,0xeacc9));var label=_0x5bdce9(0x61c),tier=tier||0x0,dependencies=[],pluginData=$plugins[_0x5bdce9(0xb85)](function(_0x2205f9){const _0x36c36e=_0x5bdce9;return _0x2205f9[_0x36c36e(0x16e)]&&_0x2205f9[_0x36c36e(0x48c)][_0x36c36e(0x8ed)]('['+label+']');})[0x0];VisuMZ[label][_0x5bdce9(0x76e)]=VisuMZ[label][_0x5bdce9(0x76e)]||{},VisuMZ[_0x5bdce9(0x866)]=function(_0x4d3c27,_0x4a2326){const _0x534868=_0x5bdce9;for(const _0x48ee84 in _0x4a2326){if(_0x534868(0x66f)!==_0x534868(0x314)){if(_0x48ee84[_0x534868(0x16b)](/(.*):(.*)/i)){const _0x1478ff=String(RegExp['$1']),_0xda5172=String(RegExp['$2'])['toUpperCase']()['trim']();let _0x8832a3,_0x11c69d,_0x464fa6;switch(_0xda5172){case'NUM':_0x8832a3=_0x4a2326[_0x48ee84]!==''?Number(_0x4a2326[_0x48ee84]):0x0;break;case _0x534868(0x52c):_0x11c69d=_0x4a2326[_0x48ee84]!==''?JSON[_0x534868(0x6bd)](_0x4a2326[_0x48ee84]):[],_0x8832a3=_0x11c69d['map'](_0x8cae5f=>Number(_0x8cae5f));break;case'EVAL':_0x8832a3=_0x4a2326[_0x48ee84]!==''?eval(_0x4a2326[_0x48ee84]):null;break;case'ARRAYEVAL':_0x11c69d=_0x4a2326[_0x48ee84]!==''?JSON[_0x534868(0x6bd)](_0x4a2326[_0x48ee84]):[],_0x8832a3=_0x11c69d[_0x534868(0x782)](_0x1126ce=>eval(_0x1126ce));break;case _0x534868(0x7c1):_0x8832a3=_0x4a2326[_0x48ee84]!==''?JSON['parse'](_0x4a2326[_0x48ee84]):'';break;case _0x534868(0x680):_0x11c69d=_0x4a2326[_0x48ee84]!==''?JSON[_0x534868(0x6bd)](_0x4a2326[_0x48ee84]):[],_0x8832a3=_0x11c69d[_0x534868(0x782)](_0x11f3f9=>JSON[_0x534868(0x6bd)](_0x11f3f9));break;case'FUNC':_0x8832a3=_0x4a2326[_0x48ee84]!==''?new Function(JSON[_0x534868(0x6bd)](_0x4a2326[_0x48ee84])):new Function(_0x534868(0x2e3));break;case _0x534868(0x525):_0x11c69d=_0x4a2326[_0x48ee84]!==''?JSON['parse'](_0x4a2326[_0x48ee84]):[],_0x8832a3=_0x11c69d[_0x534868(0x782)](_0x325f64=>new Function(JSON[_0x534868(0x6bd)](_0x325f64)));break;case'STR':_0x8832a3=_0x4a2326[_0x48ee84]!==''?String(_0x4a2326[_0x48ee84]):'';break;case _0x534868(0x5ff):_0x11c69d=_0x4a2326[_0x48ee84]!==''?JSON['parse'](_0x4a2326[_0x48ee84]):[],_0x8832a3=_0x11c69d[_0x534868(0x782)](_0x4c721a=>String(_0x4c721a));break;case _0x534868(0x65d):_0x464fa6=_0x4a2326[_0x48ee84]!==''?JSON[_0x534868(0x6bd)](_0x4a2326[_0x48ee84]):{},_0x4d3c27[_0x1478ff]={},VisuMZ[_0x534868(0x866)](_0x4d3c27[_0x1478ff],_0x464fa6);continue;case'ARRAYSTRUCT':_0x11c69d=_0x4a2326[_0x48ee84]!==''?JSON['parse'](_0x4a2326[_0x48ee84]):[],_0x8832a3=_0x11c69d[_0x534868(0x782)](_0x1fe775=>VisuMZ[_0x534868(0x866)]({},JSON[_0x534868(0x6bd)](_0x1fe775)));break;default:continue;}_0x4d3c27[_0x1478ff]=_0x8832a3;}}else return![];}return _0x4d3c27;},(_0x44a80a=>{const _0x6bbda1=_0x5bdce9,_0xeacc34=_0x44a80a[_0x6bbda1(0x74e)];for(const _0x20ee0c of dependencies){if(_0x6bbda1(0x80b)===_0x6bbda1(0x83f))this['autoSelectPriority']();else{if(!Imported[_0x20ee0c]){alert(_0x6bbda1(0x321)[_0x6bbda1(0x824)](_0xeacc34,_0x20ee0c)),SceneManager[_0x6bbda1(0xb4b)]();break;}}}const _0x183015=_0x44a80a[_0x6bbda1(0x48c)];if(_0x183015[_0x6bbda1(0x16b)](/\[Version[ ](.*?)\]/i)){const _0x72ede6=Number(RegExp['$1']);_0x72ede6!==VisuMZ[label]['version']&&('iSaDe'===_0x6bbda1(0x400)?_0x49e005=[_0x6bbda1(0x90c),_0x6bbda1(0x81d),_0x6bbda1(0xae1)][_0x3972a9[_0x6bbda1(0x900)]]||'swing':(alert(_0x6bbda1(0x95b)[_0x6bbda1(0x824)](_0xeacc34,_0x72ede6)),SceneManager[_0x6bbda1(0xb4b)]()));}if(_0x183015['match'](/\[Tier[ ](\d+)\]/i)){if(_0x6bbda1(0x99f)===_0x6bbda1(0x99f)){const _0x1018c3=Number(RegExp['$1']);_0x1018c3<tier?(alert(_0x6bbda1(0x596)[_0x6bbda1(0x824)](_0xeacc34,_0x1018c3,tier)),SceneManager[_0x6bbda1(0xb4b)]()):tier=Math['max'](_0x1018c3,tier);}else{if(this[_0x6bbda1(0x581)]())this[_0x6bbda1(0x9dd)](_0x6bbda1(0x5d3));_0x5d9b98[_0x6bbda1(0x61c)][_0x6bbda1(0x969)][_0x6bbda1(0x4b1)](this);if(this[_0x6bbda1(0x581)]())this[_0x6bbda1(0x9dd)](_0x6bbda1(0x17c));}}VisuMZ[_0x6bbda1(0x866)](VisuMZ[label]['Settings'],_0x44a80a[_0x6bbda1(0x2f6)]);})(pluginData),VisuMZ['CreateActionSequenceTargets']=function(_0x348f03){const _0x212a51=_0x5bdce9;let _0x34f578=[];for(const _0x1960d3 of _0x348f03){_0x34f578=_0x34f578[_0x212a51(0x331)](VisuMZ['ConvertActionSequenceTarget'](_0x1960d3));}return _0x34f578['filter'](_0x1f9802=>_0x1f9802);},VisuMZ[_0x5bdce9(0xaa1)]=function(_0x501d6a){const _0x5d07c9=_0x5bdce9,_0xacafa2=BattleManager[_0x5d07c9(0x8b1)]()['filter'](_0x51473c=>_0x51473c&&_0x51473c[_0x5d07c9(0x6ed)]()),_0x44d3ab=BattleManager[_0x5d07c9(0xb40)],_0x155de2=BattleManager[_0x5d07c9(0xaa8)],_0x47e210=BattleManager[_0x5d07c9(0x8be)]?BattleManager[_0x5d07c9(0x8be)][_0x5d07c9(0x2ca)](0x0):_0xacafa2;_0x501d6a=_0x501d6a[_0x5d07c9(0x63a)]()[_0x5d07c9(0x92d)]();if(_0x501d6a===_0x5d07c9(0x30f))return[_0x44d3ab];else{if(_0x501d6a===_0x5d07c9(0x1dd))return[_0x155de2];else{if(_0x501d6a===_0x5d07c9(0xab6)){if(_0x5d07c9(0x557)===_0x5d07c9(0x679)){_0x528491=_0x355c44||'',_0x42e3d5=_0x5dd048||'';_0x541a41===''&&_0x1a0e53===''&&(_0x41db85=this[_0x5d07c9(0x41a)][_0x5d07c9(0x4e4)](),_0x483028=this[_0x5d07c9(0x2b4)][_0x5d07c9(0x908)]());const _0x5a1811=_0x44a56d[_0x5d07c9(0x34a)](_0x41c151),_0x3e19eb=_0x17f83d[_0x5d07c9(0xa54)](_0x428dc3);_0x5a1811[_0x5d07c9(0x4e9)](this['updateBattlebackBitmap1'][_0x5d07c9(0x124)](this,this[_0x5d07c9(0x41a)],this[_0x5d07c9(0x2b4)],_0x5a1811,_0x3e19eb));}else{if(_0x155de2){if(_0x5d07c9(0x860)!==_0x5d07c9(0x860))return this[_0x5d07c9(0x982)](_0x25a051);else{const _0x2b5ce7=_0x47e210['indexOf'](_0x155de2);return _0x2b5ce7>=0x0?[_0x47e210[_0x2b5ce7-0x1]||_0x155de2]:[_0x155de2];}}}}else{if(_0x501d6a===_0x5d07c9(0x556)){if(_0x5d07c9(0x1ce)===_0x5d07c9(0x1ce)){if(_0x155de2){if(_0x5d07c9(0x881)===_0x5d07c9(0x881)){const _0x34c30e=_0x47e210['indexOf'](_0x155de2);return _0x34c30e>=0x0?[_0x47e210[_0x34c30e+0x1]||_0x155de2]:[_0x155de2];}else{if(_0x307404[_0x5d07c9(0x20c)])return;this[_0x5d07c9(0x34e)](),this[_0x5d07c9(0x843)](),this[_0x5d07c9(0x13b)]();}}}else{const _0x212a86=_0x4e0dbd[_0x5d07c9(0x17b)]();_0x212a86<=0x0?_0x175cd6[_0x5d07c9(0x8e4)]():this['showNormalAnimation'](_0x4b02cf,_0x212a86);}}else{if(_0x501d6a===_0x5d07c9(0x53a)){if(_0x5d07c9(0x4fc)===_0x5d07c9(0x4fc))return _0x47e210;else{if(this['_battler']&&this[_0x5d07c9(0x976)][_0x5d07c9(0x3be)]){const _0x101bef=this[_0x5d07c9(0x976)][_0x5d07c9(0x3be)];this[_0x5d07c9(0x9eb)]=_0x582df7[_0x5d07c9(0x49d)][_0x101bef[_0x5d07c9(0x1be)]],this[_0x5d07c9(0x3b6)]=_0x101bef[_0x5d07c9(0x3ef)];const _0x1daccd=this[_0x5d07c9(0x826)];_0x1daccd['freezeFrame'](_0x101bef[_0x5d07c9(0x1dc)],_0x101bef[_0x5d07c9(0x3ef)]),this['adjustWeaponSpriteOffset']();}}}else{if(_0x501d6a===_0x5d07c9(0x8fe))return[_0x44d3ab][_0x5d07c9(0x331)](_0x47e210);else{if(_0x501d6a===_0x5d07c9(0x6a1)){if('QRMDl'!==_0x5d07c9(0x253)){if(!_0xb5eb7d[_0x5d07c9(0x9b5)](_0x356408))return!![];}else return _0xacafa2[_0x5d07c9(0xb85)](_0x672bee=>_0x672bee!==_0x44d3ab&&!_0x47e210['includes'](_0x672bee)&&_0x672bee['notFocusValid']());}}}}}}}if(_0x44d3ab){if(_0x5d07c9(0x391)===_0x5d07c9(0x136))return this[_0x5d07c9(0x71d)]()['some'](_0x55a8f4=>_0x55a8f4[_0x5d07c9(0x48a)]());else{if(_0x501d6a===_0x5d07c9(0x2b3))return _0x44d3ab['friendsUnit']()['aliveMembers']();else{if(_0x501d6a===_0x5d07c9(0xb2f))return _0x44d3ab['friendsUnit']()['aliveMembers']()[_0x5d07c9(0xb85)](_0x2a15d6=>_0x2a15d6!==_0x44d3ab);else{if(_0x501d6a==='alive\x20friends\x20not\x20target')return _0x44d3ab[_0x5d07c9(0x712)]()['aliveMembers']()['filter'](_0x100ba5=>_0x100ba5!==_0x155de2);else{if(_0x501d6a===_0x5d07c9(0xb3a))return _0x44d3ab['friendsUnit']()[_0x5d07c9(0x91b)]();else{if(_0x501d6a[_0x5d07c9(0x16b)](/FRIEND INDEX (\d+)/i)){if(_0x5d07c9(0x83c)===_0x5d07c9(0x256))_0x40ce95[_0x5d07c9(0x61c)][_0x5d07c9(0x76e)][_0x5d07c9(0xa97)]['AddOption']&&(this[_0x5d07c9(0x2c1)](),this['addBattleCoreAutoBattleStyleCommand']());else{const _0x2dccc1=Number(RegExp['$1']);return[_0x44d3ab[_0x5d07c9(0x712)]()[_0x5d07c9(0x2b7)]()[_0x2dccc1]];}}}}}}if(_0x501d6a==='alive\x20opponents')return _0x44d3ab[_0x5d07c9(0x41c)]()[_0x5d07c9(0xed)]();else{if(_0x501d6a==='alive\x20opponents\x20not\x20target')return _0x44d3ab[_0x5d07c9(0x41c)]()[_0x5d07c9(0xed)]()[_0x5d07c9(0xb85)](_0x21cf25=>_0x21cf25!==_0x155de2);else{if(_0x501d6a==='dead\x20opponents')return'CWylz'===_0x5d07c9(0x2de)?this['_lastPluginCommandInterpreter']:_0x44d3ab[_0x5d07c9(0x41c)]()[_0x5d07c9(0x91b)]();else{if(_0x501d6a[_0x5d07c9(0x16b)](/OPPONENT INDEX (\d+)/i)){const _0x5a3ee4=Number(RegExp['$1']);return[_0x44d3ab[_0x5d07c9(0x41c)]()[_0x5d07c9(0x2b7)]()[_0x5a3ee4]];}}}}}}if(_0x501d6a===_0x5d07c9(0xa9c))return $gameParty[_0x5d07c9(0xed)]();else{if(_0x501d6a==='alive\x20actors\x20not\x20user')return $gameParty[_0x5d07c9(0xed)]()[_0x5d07c9(0xb85)](_0x36ac3c=>_0x36ac3c!==_0x44d3ab);else{if(_0x501d6a===_0x5d07c9(0x362))return $gameParty[_0x5d07c9(0xed)]()[_0x5d07c9(0xb85)](_0xe346ee=>_0xe346ee!==_0x155de2);else{if(_0x501d6a===_0x5d07c9(0x8e3))return $gameParty[_0x5d07c9(0x91b)]();else{if(_0x501d6a[_0x5d07c9(0x16b)](/ACTOR INDEX (\d+)/i)){const _0xe3799e=Number(RegExp['$1']);return[$gameParty[_0x5d07c9(0x2b7)]()[_0xe3799e]];}else{if(_0x501d6a['match'](/ACTOR ID (\d+)/i)){const _0x584ce4=Number(RegExp['$1']);return[$gameActors[_0x5d07c9(0xad6)](_0x584ce4)];}}}}}}if(_0x501d6a===_0x5d07c9(0xad0))return $gameTroop[_0x5d07c9(0xed)]();else{if(_0x501d6a===_0x5d07c9(0xa2c)){if('fvtfM'===_0x5d07c9(0x628))this['isTpb']()?this[_0x5d07c9(0x798)]():_0x35cf28[_0x5d07c9(0x61c)][_0x5d07c9(0x284)]['call'](this);else return $gameTroop['aliveMembers']()[_0x5d07c9(0xb85)](_0x18983c=>_0x18983c!==_0x44d3ab);}else{if(_0x501d6a===_0x5d07c9(0x29d))return $gameTroop[_0x5d07c9(0xed)]()[_0x5d07c9(0xb85)](_0x187c71=>_0x187c71!==_0x155de2);else{if(_0x501d6a==='dead\x20enemies')return $gameTroop[_0x5d07c9(0x91b)]();else{if(_0x501d6a[_0x5d07c9(0x16b)](/ENEMY INDEX (\d+)/i)){if(_0x5d07c9(0x8e2)!=='SeHHj'){this[_0x5d07c9(0x3fa)](_0x2c3346)[_0x5d07c9(0x16b)](/\\I\[(\d+)\]/i);const _0x3a5970=_0x3633bd(_0x1b1be4['$1'])||0x0,_0x898f9a=this[_0x5d07c9(0x101)](_0x12b053),_0x5ad599=_0x898f9a['x']+_0x30d316[_0x5d07c9(0x618)]((_0x898f9a[_0x5d07c9(0x3b2)]-_0x4c0752[_0x5d07c9(0x9e1)])/0x2),_0x3a5edc=_0x898f9a['y']+(_0x898f9a[_0x5d07c9(0x3b0)]-_0x482184[_0x5d07c9(0x8a0)])/0x2;this[_0x5d07c9(0xb82)](_0x3a5970,_0x5ad599,_0x3a5edc);}else{const _0x578d9=Number(RegExp['$1']);return[$gameTroop[_0x5d07c9(0x2b7)]()[_0x578d9]];}}else{if(_0x501d6a[_0x5d07c9(0x16b)](/ENEMY ID (\d+)/i)){const _0x397797=Number(RegExp['$1']);return $gameTroop[_0x5d07c9(0xed)]()[_0x5d07c9(0xb85)](_0x42ffab=>_0x42ffab[_0x5d07c9(0x737)]()===_0x397797);}}}}}}if(_0x501d6a===_0x5d07c9(0x91c)){if(_0x5d07c9(0x48d)!=='wPHZS')return _0xacafa2[_0x5d07c9(0xb85)](_0x42c412=>_0x42c412[_0x5d07c9(0x4d2)]());else this[_0x5d07c9(0x838)](_0x5d07c9(0xa19),_0x5d07c9(0xa1d)[_0x5d07c9(0x824)](_0x3969dc[_0x5d07c9(0x416)](_0x27e9c2)));}else{if(_0x501d6a===_0x5d07c9(0x474))return _0xacafa2[_0x5d07c9(0xb85)](_0x427a08=>_0x427a08[_0x5d07c9(0x4d2)]()&&_0x427a08!==_0x44d3ab);else{if(_0x501d6a===_0x5d07c9(0x44f))return _0xacafa2[_0x5d07c9(0xb85)](_0x130f1c=>_0x130f1c[_0x5d07c9(0x4d2)]()&&_0x130f1c!==_0x155de2);else{if(_0x501d6a===_0x5d07c9(0x1bd))return _0xacafa2['filter'](_0x56f671=>_0x56f671[_0x5d07c9(0x9a3)]());}}}return[];},PluginManager['registerCommand'](pluginData['name'],'ActSeq_Set_SetupAction',_0x5741fa=>{const _0x2bd3ae=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;VisuMZ[_0x2bd3ae(0x866)](_0x5741fa,_0x5741fa);const _0x391d81=$gameTemp[_0x2bd3ae(0xb48)](),_0x5231b4=BattleManager['_action'],_0x3aca91=BattleManager[_0x2bd3ae(0xb40)],_0x2c987e=BattleManager[_0x2bd3ae(0x8be)]?BattleManager[_0x2bd3ae(0x8be)]['slice'](0x0):[],_0x2cb57b=BattleManager[_0x2bd3ae(0x5c4)];if(!_0x391d81||!_0x5231b4||!_0x3aca91)return;if(!_0x5231b4[_0x2bd3ae(0xa8a)]())return;if(_0x5741fa[_0x2bd3ae(0x8aa)])_0x2cb57b['displayAction'](_0x3aca91,_0x5231b4[_0x2bd3ae(0xa8a)]());_0x5741fa[_0x2bd3ae(0x281)]&&_0x2cb57b[_0x2bd3ae(0x838)](_0x2bd3ae(0x351),_0x3aca91,_0x2c987e,!![]);if(_0x5741fa[_0x2bd3ae(0x7fe)])_0x2cb57b[_0x2bd3ae(0x838)](_0x2bd3ae(0x187),_0x3aca91,_0x5231b4);if(_0x5741fa['WaitForMovement'])_0x2cb57b['push'](_0x2bd3ae(0x3ba));if(_0x5741fa[_0x2bd3ae(0x6a7)])_0x2cb57b[_0x2bd3ae(0x838)](_0x2bd3ae(0x70c),_0x3aca91,_0x5231b4);if(_0x5741fa[_0x2bd3ae(0x108)])_0x2cb57b['push']('waitForAnimation');_0x391d81['setWaitMode'](_0x2bd3ae(0x3cb));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x536),_0x589d54=>{const _0x4365a3=_0x5bdce9;if(!SceneManager[_0x4365a3(0x5ea)]())return;VisuMZ[_0x4365a3(0x866)](_0x589d54,_0x589d54);const _0x4d27f6=$gameTemp['getLastPluginCommandInterpreter'](),_0x265338=BattleManager[_0x4365a3(0x5ae)],_0x440644=BattleManager[_0x4365a3(0xb40)],_0x53078b=BattleManager[_0x4365a3(0x8be)]?BattleManager[_0x4365a3(0x8be)][_0x4365a3(0x2ca)](0x0):[],_0x3587cc=BattleManager['_logWindow'],_0x4b0ae0=_0x589d54[_0x4365a3(0xa40)]??![];if(!_0x4d27f6||!_0x265338||!_0x440644)return;if(!_0x265338[_0x4365a3(0xa8a)]())return;let _0x4086ea=_0x4b0ae0?_0x3587cc['getDualWieldTimes'](_0x440644):0x1;for(let _0x59e8a1=0x0;_0x59e8a1<_0x4086ea;_0x59e8a1++){_0x4b0ae0&&_0x440644[_0x4365a3(0x491)]()&&_0x3587cc['push'](_0x4365a3(0x96e),_0x440644,_0x59e8a1);if(_0x589d54[_0x4365a3(0xaa6)])_0x3587cc[_0x4365a3(0x838)]('performAction',_0x440644,_0x265338);if(_0x589d54[_0x4365a3(0xa2e)]>0x0)_0x3587cc['push'](_0x4365a3(0x458),_0x589d54['WaitCount']);if(_0x589d54[_0x4365a3(0x6be)])_0x3587cc['push'](_0x4365a3(0x849),_0x440644,_0x53078b,_0x265338[_0x4365a3(0xa8a)]()[_0x4365a3(0x6e3)]);if(_0x589d54[_0x4365a3(0x108)])_0x3587cc[_0x4365a3(0x838)]('waitForAnimation');for(const _0x218922 of _0x53078b){if('IOLQs'===_0x4365a3(0xa26)){const _0x3947a8=this[_0x4365a3(0x8df)];_0x3947a8[_0x4365a3(0x456)]('escape',this[_0x4365a3(0x832)]['bind'](this)),_0x3947a8[_0x4365a3(0x456)](_0x4365a3(0xa63),this[_0x4365a3(0x4e2)][_0x4365a3(0x124)](this)),_0x3947a8[_0x4365a3(0x456)]('singleSkill',this[_0x4365a3(0x615)]['bind'](this)),_0x1efcb2[_0x4365a3(0x985)]()&&(this[_0x4365a3(0x375)]()?delete _0x3947a8[_0x4365a3(0xab7)]['cancel']:_0x3947a8[_0x4365a3(0x456)](_0x4365a3(0x5c1),this[_0x4365a3(0xeb)][_0x4365a3(0x124)](this)));}else{if(!_0x218922)continue;if(_0x589d54[_0x4365a3(0x15a)])_0x3587cc['push'](_0x4365a3(0x1b9),_0x440644,_0x218922);}}}_0x4b0ae0&&_0x440644[_0x4365a3(0x491)]()&&(_0x4365a3(0x46b)!==_0x4365a3(0x215)?_0x3587cc['push'](_0x4365a3(0x496),_0x440644):_0x45968c[_0x4365a3(0xb40)]['friendsUnit']()[_0x4365a3(0x5c6)](_0x13b9a5));if(_0x589d54[_0x4365a3(0x281)])_0x3587cc['push'](_0x4365a3(0x351),_0x440644,_0x53078b,![]);_0x4d27f6[_0x4365a3(0x73c)](_0x4365a3(0x3cb));}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],'ActSeq_Set_TargetActionSet',_0x755495=>{const _0x1c8288=_0x5bdce9;if(!SceneManager[_0x1c8288(0x5ea)]())return;VisuMZ[_0x1c8288(0x866)](_0x755495,_0x755495);const _0x36508c=$gameTemp[_0x1c8288(0xb48)](),_0x5a83c6=BattleManager[_0x1c8288(0x5ae)],_0x322185=BattleManager[_0x1c8288(0xb40)],_0x2e29b3=BattleManager[_0x1c8288(0x8be)]?BattleManager[_0x1c8288(0x8be)][_0x1c8288(0x2ca)](0x0):[],_0x46f9b2=BattleManager[_0x1c8288(0x5c4)],_0xd3d777=_0x755495[_0x1c8288(0xa40)]??![];if(!_0x36508c||!_0x5a83c6||!_0x322185)return;if(!_0x5a83c6[_0x1c8288(0xa8a)]())return;let _0x3b4a5e=_0xd3d777?_0x46f9b2[_0x1c8288(0xb4c)](_0x322185):0x1;for(let _0x5524b9=0x0;_0x5524b9<_0x3b4a5e;_0x5524b9++){if(_0x1c8288(0xb19)===_0x1c8288(0x413)){const _0x301310=_0x523f4c[_0x1c8288(0x345)]()?-0x1:0x1;let _0x1c02d5=this[_0x1c8288(0x8f0)];_0x1c02d5+=this[_0x1c8288(0x5e0)]();let _0x52a58f=this['_baseY'];const _0x43237d=this[_0x1c8288(0xa9b)][_0x1c8288(0x91d)]['y'];_0x52a58f+=this['extraPositionY']();const _0xe695c9=_0x2b6271[_0x1c8288(0x352)][_0x1c8288(0x3e2)];if(_0xe695c9&&this[_0x1c8288(0x80c)]===_0xe695c9){_0x1c02d5+=_0xe695c9['x']-this['damageOffsetX']();const _0x4660b8=_0xe695c9['lineHeight']()*0x3/0x4;_0x52a58f=_0xe695c9['y']+_0x4660b8,_0x52a58f=_0x1a13b0['min'](_0x52a58f,_0xe695c9['y']+this['y']-this['height']+_0x4660b8);}_0x3df5b5['x']=_0x5a0e43[_0x1c8288(0xb3f)](_0x1c02d5+this['damageOffsetX']()*_0x301310),_0x47f05c['y']=_0x489882[_0x1c8288(0xb3f)](_0x52a58f+this[_0x1c8288(0xb7d)]());}else for(const _0x523b20 of _0x2e29b3){if(!_0x523b20)continue;_0xd3d777&&_0x322185[_0x1c8288(0x491)]()&&_0x46f9b2[_0x1c8288(0x838)](_0x1c8288(0x96e),_0x322185,_0x5524b9);if(_0x755495['PerformAction'])_0x46f9b2[_0x1c8288(0x838)]('performAction',_0x322185,_0x5a83c6);if(_0x755495['WaitCount1']>0x0)_0x46f9b2[_0x1c8288(0x838)](_0x1c8288(0x458),_0x755495[_0x1c8288(0x1bf)]);if(_0x755495[_0x1c8288(0x6be)])_0x46f9b2[_0x1c8288(0x838)]('showAnimation',_0x322185,[_0x523b20],_0x5a83c6[_0x1c8288(0xa8a)]()[_0x1c8288(0x6e3)]);if(_0x755495[_0x1c8288(0x2a4)]>0x0)_0x46f9b2[_0x1c8288(0x838)](_0x1c8288(0x458),_0x755495[_0x1c8288(0x2a4)]);if(_0x755495[_0x1c8288(0x15a)])_0x46f9b2[_0x1c8288(0x838)](_0x1c8288(0x1b9),_0x322185,_0x523b20);}}_0xd3d777&&_0x322185['isActor']()&&_0x46f9b2[_0x1c8288(0x838)](_0x1c8288(0x496),_0x322185);if(_0x755495[_0x1c8288(0x281)])_0x46f9b2[_0x1c8288(0x838)](_0x1c8288(0x351),_0x322185,_0x2e29b3,![]);_0x36508c['setWaitMode'](_0x1c8288(0x3cb));}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0xa7f),_0x447efd=>{const _0x3f0587=_0x5bdce9;if(!SceneManager[_0x3f0587(0x5ea)]())return;VisuMZ[_0x3f0587(0x866)](_0x447efd,_0x447efd);const _0x4df39e=$gameTemp[_0x3f0587(0xb48)](),_0x15e59d=BattleManager[_0x3f0587(0x5ae)],_0x422554=BattleManager['_subject'],_0x33cbca=BattleManager['_allTargets']?BattleManager[_0x3f0587(0x8be)][_0x3f0587(0x2ca)](0x0):[],_0x161073=BattleManager['_logWindow'];if(!_0x4df39e||!_0x15e59d||!_0x422554)return;if(!_0x15e59d[_0x3f0587(0xa8a)]())return;if(_0x447efd[_0x3f0587(0x281)])_0x161073[_0x3f0587(0x838)](_0x3f0587(0x351),_0x422554,_0x33cbca,![]);if(_0x447efd[_0x3f0587(0x738)])_0x161073[_0x3f0587(0x838)](_0x3f0587(0x718));if(_0x447efd[_0x3f0587(0x95f)])_0x161073[_0x3f0587(0x838)](_0x3f0587(0x4b3));if(_0x447efd[_0x3f0587(0x917)])_0x161073[_0x3f0587(0x838)](_0x3f0587(0x89d));if(_0x447efd[_0x3f0587(0x22c)])_0x161073[_0x3f0587(0x838)](_0x3f0587(0x154),_0x422554);if(_0x447efd[_0x3f0587(0x201)])_0x161073[_0x3f0587(0x838)](_0x3f0587(0x3ba));_0x4df39e[_0x3f0587(0x73c)](_0x3f0587(0x3cb));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x7c7),_0xd18d50=>{const _0x1be89a=_0x5bdce9;if(!SceneManager[_0x1be89a(0x5ea)]())return;if(!Imported[_0x1be89a(0x27b)])return;VisuMZ[_0x1be89a(0x866)](_0xd18d50,_0xd18d50);const _0x41d33b=$gameTemp[_0x1be89a(0xb48)](),_0x30e775=_0xd18d50[_0x1be89a(0xaec)];if(!_0x41d33b)return;$gameScreen['setBattleAngle'](_0xd18d50[_0x1be89a(0x47c)],_0xd18d50[_0x1be89a(0x26c)],_0xd18d50['EasingType']);if(_0x30e775)_0x41d33b[_0x1be89a(0x73c)](_0x1be89a(0x3f5));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0xa57),_0x3b6e67=>{const _0x47525e=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x47525e(0x27b)])return;VisuMZ[_0x47525e(0x866)](_0x3b6e67,_0x3b6e67);const _0x586779=$gameTemp['getLastPluginCommandInterpreter'](),_0x1ecc23=_0x3b6e67[_0x47525e(0xaec)];if(!_0x586779)return;$gameScreen[_0x47525e(0x7ee)](0x0,_0x3b6e67[_0x47525e(0x26c)],_0x3b6e67[_0x47525e(0x752)]);if(_0x1ecc23)_0x586779['setWaitMode'](_0x47525e(0x3f5));}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x2da),_0xfc1e2c=>{const _0x22e702=_0x5bdce9;if(!SceneManager[_0x22e702(0x5ea)]())return;if(!Imported[_0x22e702(0x27b)])return;const _0x103310=$gameTemp[_0x22e702(0xb48)]();if(!_0x103310)return;_0x103310[_0x22e702(0x73c)](_0x22e702(0x3f5));}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x3ec),_0x4ef4bb=>{const _0x2d048f=_0x5bdce9;if(!SceneManager[_0x2d048f(0x5ea)]())return;VisuMZ[_0x2d048f(0x866)](_0x4ef4bb,_0x4ef4bb);const _0x257aaf=$gameTemp[_0x2d048f(0xb48)](),_0x1b99dc=BattleManager[_0x2d048f(0x5ae)],_0x109e6b=BattleManager[_0x2d048f(0xb40)],_0xf3060a=VisuMZ['CreateActionSequenceTargets'](_0x4ef4bb[_0x2d048f(0x637)]),_0x33e13f=_0x4ef4bb[_0x2d048f(0x5c2)],_0x49cf68=BattleManager[_0x2d048f(0x5c4)];if(!_0x257aaf||!_0x1b99dc||!_0x109e6b)return;if(!_0x1b99dc[_0x2d048f(0xa8a)]())return;let _0xa03e77=_0x1b99dc[_0x2d048f(0xa8a)]()[_0x2d048f(0x6e3)];if(_0xa03e77<0x0)_0xa03e77=_0x109e6b[_0x2d048f(0x17b)]();$gameTemp[_0x2d048f(0x905)](_0xf3060a,_0xa03e77,_0x33e13f),_0x4ef4bb[_0x2d048f(0x108)]&&_0x257aaf[_0x2d048f(0x73c)](_0x2d048f(0x9bc));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x60a),_0x1f72d4=>{const _0xa47834=_0x5bdce9;if(!SceneManager[_0xa47834(0x5ea)]())return;VisuMZ[_0xa47834(0x866)](_0x1f72d4,_0x1f72d4);const _0x8a2ced=$gameTemp[_0xa47834(0xb48)](),_0x1456f5=BattleManager['_subject'],_0x478e87=VisuMZ[_0xa47834(0x1f5)](_0x1f72d4[_0xa47834(0x637)]),_0x451f72=_0x1f72d4[_0xa47834(0x5c2)],_0x3d7f4a=BattleManager['_logWindow'];if(!_0x8a2ced||!_0x1456f5)return;const _0x268ca4=_0x1456f5[_0xa47834(0x17b)]();$gameTemp[_0xa47834(0x905)](_0x478e87,_0x268ca4,_0x451f72),_0x1f72d4['WaitForAnimation']&&_0x8a2ced[_0xa47834(0x73c)](_0xa47834(0x9bc));}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x453),_0x2a5d3c=>{const _0x49b653=_0x5bdce9;if(!SceneManager[_0x49b653(0x5ea)]())return;VisuMZ[_0x49b653(0x866)](_0x2a5d3c,_0x2a5d3c);const _0x54efb9=_0x291cd4['attackAnimationIdSlot'](_0x2a5d3c[_0x49b653(0x393)]);if(_0x54efb9<=0x0)return;const _0x36db2f=$gameTemp[_0x49b653(0xb48)](),_0x291cd4=BattleManager[_0x49b653(0xb40)],_0x3b2539=VisuMZ[_0x49b653(0x1f5)](_0x2a5d3c[_0x49b653(0x637)]),_0xc08a3f=_0x2a5d3c['Mirror'],_0x339586=BattleManager[_0x49b653(0x5c4)];if(!_0x36db2f||!_0x291cd4)return;$gameTemp[_0x49b653(0x905)](_0x3b2539,_0x54efb9,_0xc08a3f),_0x2a5d3c[_0x49b653(0x108)]&&_0x36db2f['setWaitMode']('battleAnimation');}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x562),_0x20996b=>{const _0x3922a1=_0x5bdce9;if(!SceneManager[_0x3922a1(0x5ea)]())return;VisuMZ['ConvertParams'](_0x20996b,_0x20996b);const _0x569a55=$gameTemp[_0x3922a1(0xb48)](),_0x3cde99=BattleManager[_0x3922a1(0x5ae)],_0x3a127c=_0x20996b[_0x3922a1(0x5c2)],_0x53f739=VisuMZ[_0x3922a1(0x1f5)](_0x20996b['Targets']);if(!_0x569a55||!_0x3cde99)return;if(!_0x3cde99[_0x3922a1(0xa8a)]())return;for(const _0x144360 of _0x53f739){if('gIumq'==='uIoUo'){const _0x5a7205=this[_0x3922a1(0xa5b)][_0x3922a1(0x454)];if(!_0x5a7205)return;const _0x53eb00=_0x5a7205['width'];let _0xa4f605=_0x5a7205[_0x3922a1(0x3b0)];if(this['_battler'][_0x3922a1(0x9a3)]()){if(this[_0x3922a1(0x6ef)])_0xa4f605=_0x50c048[_0x3922a1(0xa5e)](0x0,this[_0x3922a1(0x6ef)][_0x3922a1(0x3b0)]-0x4);}this[_0x3922a1(0xa5b)][_0x3922a1(0x8da)](0x0,0x0,_0x53eb00,_0xa4f605),this[_0x3922a1(0x8da)](0x0,0x0,_0x53eb00,_0xa4f605);}else{if(!_0x144360)continue;_0x144360[_0x3922a1(0x70c)](_0x3cde99,_0x3a127c);}}if(_0x20996b['WaitForAnimation'])_0x569a55[_0x3922a1(0x73c)](_0x3922a1(0x9bc));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x661),_0x40af5e=>{const _0x882ee=_0x5bdce9;VisuMZ['ConvertParams'](_0x40af5e,_0x40af5e);const _0x5155dd=$gameTemp[_0x882ee(0xb48)](),_0x50b71a=VisuMZ[_0x882ee(0x1f5)](_0x40af5e[_0x882ee(0x637)]),_0x5b38ae=_0x40af5e[_0x882ee(0x35b)];if(!_0x5b38ae)return;for(const _0x11303a of _0x50b71a){if(!_0x11303a)continue;if(!_0x11303a[_0x882ee(0x491)]())continue;_0x11303a['setBattlePortrait'](_0x5b38ae);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x1cc),_0x1ae3e2=>{const _0x4b8f2a=_0x5bdce9;if(!SceneManager[_0x4b8f2a(0x352)])return;if(!SceneManager[_0x4b8f2a(0x352)][_0x4b8f2a(0x25a)])return;if(!Imported['VisuMZ_0_CoreEngine'])return;VisuMZ[_0x4b8f2a(0x866)](_0x1ae3e2,_0x1ae3e2);const _0x234f6a=$gameTemp['getLastPluginCommandInterpreter'](),_0x1dc299=Math[_0x4b8f2a(0xb3f)](_0x1ae3e2[_0x4b8f2a(0xb73)]),_0x162dc0=Math[_0x4b8f2a(0xb3f)](_0x1ae3e2[_0x4b8f2a(0xad5)]);$gameTemp['requestPointAnimation'](_0x1dc299,_0x162dc0,_0x1ae3e2['AnimationID'],_0x1ae3e2[_0x4b8f2a(0x5c2)],_0x1ae3e2[_0x4b8f2a(0xb59)]),_0x1ae3e2[_0x4b8f2a(0x13d)]&&_0x234f6a&&(SceneManager[_0x4b8f2a(0x352)]['_spriteset'][_0x4b8f2a(0x582)](),_0x234f6a['setWaitMode'](_0x4b8f2a(0x9bc)));}),PluginManager['registerCommand'](pluginData['name'],_0x5bdce9(0x7d6),_0x1f304b=>{const _0x38fc1f=_0x5bdce9;if(!SceneManager[_0x38fc1f(0x5ea)]())return;VisuMZ['ConvertParams'](_0x1f304b,_0x1f304b);const _0x92f450=$gameTemp[_0x38fc1f(0xb48)](),_0x1bc46c=VisuMZ[_0x38fc1f(0x1f5)](_0x1f304b[_0x38fc1f(0x637)]),_0x34add9=_0x1f304b['AnimationID'],_0x6b8aec=_0x1f304b[_0x38fc1f(0x5c2)];if(!_0x92f450)return;$gameTemp[_0x38fc1f(0x905)](_0x1bc46c,_0x34add9,_0x6b8aec);if(_0x1f304b['WaitForAnimation'])_0x92f450[_0x38fc1f(0x73c)]('battleAnimation');}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Animation_WaitForAnimation',_0x44d7d9=>{const _0x2f9727=_0x5bdce9;if(!SceneManager[_0x2f9727(0x5ea)]())return;const _0xb559af=$gameTemp[_0x2f9727(0xb48)]();if(!_0xb559af)return;_0xb559af[_0x2f9727(0x73c)](_0x2f9727(0x9bc));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0xa55),_0x198818=>{const _0x293ab0=_0x5bdce9;if(!SceneManager[_0x293ab0(0x5ea)]())return;VisuMZ['ConvertParams'](_0x198818,_0x198818);const _0x41baca=BattleManager[_0x293ab0(0x5c4)],_0xe556fc=_0x198818[_0x293ab0(0x5a1)]&&Imported['VisuMZ_4_CombatLog'];_0x41baca[_0x293ab0(0xa19)](_0x198818['Text']),_0xe556fc&&Imported[_0x293ab0(0x99e)]&&('lDjLj'!==_0x293ab0(0x31c)?$gameSystem[_0x293ab0(0x75e)](_0x198818['Text']||'',_0x198818[_0x293ab0(0x3c3)]||0x0):(_0x15bf3f[_0x293ab0(0x61c)][_0x293ab0(0x7d9)][_0x293ab0(0x4b1)](this),this['updateBattlerContainer']()));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0xf3),_0x5b167f=>{const _0x186b6e=_0x5bdce9;if(!SceneManager[_0x186b6e(0x5ea)]())return;const _0x42f2b3=BattleManager['_logWindow'];_0x42f2b3[_0x186b6e(0x89d)]();}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0xb2a),_0x307456=>{const _0x179115=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;const _0x4f8ad6=$gameTemp[_0x179115(0xb48)](),_0xa8285e=BattleManager[_0x179115(0x5ae)],_0x1634a4=BattleManager[_0x179115(0xb40)],_0x306384=BattleManager['_logWindow'];if(!_0x4f8ad6||!_0xa8285e||!_0x1634a4)return;if(!_0xa8285e[_0x179115(0xa8a)]())return;_0x306384['displayAction'](_0x1634a4,_0xa8285e['item']()),_0x4f8ad6[_0x179115(0x73c)]('battlelog');}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0xb3e),_0x4739fa=>{const _0x101399=_0x5bdce9;if(!SceneManager[_0x101399(0x5ea)]())return;const _0x3050d3=BattleManager[_0x101399(0x5c4)];_0x3050d3[_0x101399(0x73f)]();}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],'ActSeq_BattleLog_PushBaseLine',_0x2457b8=>{const _0x52ba3e=_0x5bdce9;if(!SceneManager[_0x52ba3e(0x5ea)]())return;const _0x4bf2f8=BattleManager[_0x52ba3e(0x5c4)];_0x4bf2f8['pushBaseLine']();}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],'ActSeq_BattleLog_Refresh',_0x1a6a3e=>{const _0x576dfc=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;const _0x117c74=BattleManager[_0x576dfc(0x5c4)];_0x117c74['refresh']();}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x349),_0x4e9885=>{const _0x3e4010=_0x5bdce9;if(!SceneManager[_0x3e4010(0x5ea)]())return;VisuMZ[_0x3e4010(0x866)](_0x4e9885,_0x4e9885),SceneManager[_0x3e4010(0x352)][_0x3e4010(0x3f0)](_0x4e9885['ShowHide']);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_BattleLog_WaitForBattleLog',_0x23d34f=>{const _0x5d8650=_0x5bdce9;if(!SceneManager[_0x5d8650(0x5ea)]())return;const _0x2b58eb=$gameTemp[_0x5d8650(0xb48)]();_0x2b58eb[_0x5d8650(0x73c)](_0x5d8650(0x3cb));}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],'ActSeq_BattleLog_WaitForNewLine',_0x2e8a65=>{const _0xda488c=_0x5bdce9;if(!SceneManager[_0xda488c(0x5ea)]())return;const _0x49632f=$gameTemp[_0xda488c(0xb48)](),_0x4d49c4=BattleManager[_0xda488c(0x5c4)];_0x4d49c4[_0xda488c(0x718)](),_0x49632f[_0xda488c(0x73c)](_0xda488c(0x3cb));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x483),_0x549a54=>{const _0x59d06d=_0x5bdce9;if(!SceneManager[_0x59d06d(0x5ea)]())return;if(!Imported[_0x59d06d(0x27b)])return;VisuMZ[_0x59d06d(0x866)](_0x549a54,_0x549a54);const _0x228824=$gameScreen[_0x59d06d(0x592)]();_0x228824[_0x59d06d(0xb04)]=_0x549a54[_0x59d06d(0x86d)];}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Camera_FocusPoint',_0x23d67b=>{const _0x238872=_0x5bdce9;if(!SceneManager[_0x238872(0x5ea)]())return;if(!Imported[_0x238872(0x27b)])return;VisuMZ[_0x238872(0x866)](_0x23d67b,_0x23d67b);const _0x24b9cb=$gameTemp[_0x238872(0xb48)](),_0x5a28e7=_0x23d67b[_0x238872(0xe4)];$gameScreen[_0x238872(0x4ce)](_0x23d67b[_0x238872(0x2fb)],_0x23d67b['FocusY'],_0x23d67b[_0x238872(0x26c)],_0x23d67b[_0x238872(0x752)]);if(_0x5a28e7)_0x24b9cb[_0x238872(0x73c)](_0x238872(0x8de));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x565),_0x3532d8=>{const _0x5cdd0c=_0x5bdce9;if(!SceneManager[_0x5cdd0c(0x5ea)]())return;if(!Imported[_0x5cdd0c(0x27b)])return;VisuMZ[_0x5cdd0c(0x866)](_0x3532d8,_0x3532d8);const _0x99ee09=$gameTemp[_0x5cdd0c(0xb48)](),_0x1bc1f4=VisuMZ['CreateActionSequenceTargets'](_0x3532d8[_0x5cdd0c(0x637)]),_0x5daaf2=_0x3532d8['WaitForCamera'];$gameScreen['setBattleCameraTargets'](_0x1bc1f4,_0x3532d8['Duration'],_0x3532d8['EasingType']);if(_0x5daaf2)_0x99ee09[_0x5cdd0c(0x73c)](_0x5cdd0c(0x8de));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x1ec),_0x4d7a8f=>{const _0x180ef3=_0x5bdce9;if(!SceneManager[_0x180ef3(0x5ea)]())return;if(!Imported['VisuMZ_3_ActSeqCamera'])return;VisuMZ[_0x180ef3(0x866)](_0x4d7a8f,_0x4d7a8f);const _0x3e490e=$gameTemp['getLastPluginCommandInterpreter'](),_0x422486=_0x4d7a8f[_0x180ef3(0xe4)];$gameScreen[_0x180ef3(0x1e2)](_0x4d7a8f[_0x180ef3(0x6b7)],_0x4d7a8f['OffsetY'],_0x4d7a8f[_0x180ef3(0x26c)],_0x4d7a8f[_0x180ef3(0x752)]);if(_0x422486)_0x3e490e['setWaitMode'](_0x180ef3(0x8de));}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0xec),_0x3997d8=>{const _0x305ee0=_0x5bdce9;if(!SceneManager[_0x305ee0(0x5ea)]())return;if(!Imported[_0x305ee0(0x27b)])return;VisuMZ[_0x305ee0(0x866)](_0x3997d8,_0x3997d8);const _0x5ab072=$gameTemp[_0x305ee0(0xb48)](),_0x15a862=_0x3997d8[_0x305ee0(0xb0e)],_0xa605=_0x3997d8['ResetOffset'],_0x2682b2=_0x3997d8[_0x305ee0(0xe4)];if(_0x15a862){const _0x3bd0e8=Math[_0x305ee0(0xb3f)](Graphics[_0x305ee0(0x3b2)]/0x2),_0x1cf09a=Math[_0x305ee0(0xb3f)](Graphics[_0x305ee0(0x3b0)]/0x2);$gameScreen[_0x305ee0(0x4ce)](_0x3bd0e8,_0x1cf09a,_0x3997d8['Duration'],_0x3997d8[_0x305ee0(0x752)]);}_0xa605&&$gameScreen[_0x305ee0(0x1e2)](0x0,0x0,_0x3997d8[_0x305ee0(0x26c)],_0x3997d8[_0x305ee0(0x752)]);if(_0x2682b2)_0x5ab072[_0x305ee0(0x73c)](_0x305ee0(0x8de));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x6bc),_0x106fa9=>{const _0x17bcf7=_0x5bdce9;if(!SceneManager[_0x17bcf7(0x5ea)]())return;if(!Imported[_0x17bcf7(0x27b)])return;const _0x1744a6=$gameTemp[_0x17bcf7(0xb48)]();if(!_0x1744a6)return;_0x1744a6[_0x17bcf7(0x73c)]('battleCamera');}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x196),_0x9c39fb=>{const _0x4de47d=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x4de47d(0x303)])return;VisuMZ[_0x4de47d(0x866)](_0x9c39fb,_0x9c39fb);const _0x294c49=VisuMZ[_0x4de47d(0x1f5)](_0x9c39fb[_0x4de47d(0x637)]),_0x2fdbfa=_0x9c39fb['MotionAni'][_0x4de47d(0x63a)]()['trim']();for(const _0x2c087c of _0x294c49){if(!_0x2c087c)continue;_0x2c087c[_0x4de47d(0x86b)](_0x2fdbfa);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0xac0),_0x2b8327=>{const _0x4da551=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x4da551(0x303)])return;VisuMZ[_0x4da551(0x866)](_0x2b8327,_0x2b8327);const _0x20cc1a=VisuMZ['CreateActionSequenceTargets'](_0x2b8327[_0x4da551(0x637)]),_0x358bca=_0x2b8327[_0x4da551(0x486)];for(const _0x5ee1da of _0x20cc1a){if(_0x4da551(0x26d)===_0x4da551(0x26d)){if(!_0x5ee1da)continue;_0x5ee1da[_0x4da551(0x94e)]()['timeScale']=_0x358bca;}else return this[_0x4da551(0x4e7)];}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x757),_0x152623=>{const _0x10118c=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported['VisuMZ_1_ElementStatusCore'])return;VisuMZ[_0x10118c(0x866)](_0x152623,_0x152623);const _0x3ade03=BattleManager[_0x10118c(0x5ae)],_0x30fb29=_0x152623[_0x10118c(0x86a)];if(!_0x3ade03)return;_0x3ade03[_0x10118c(0x597)]=_0x30fb29;}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Element_Clear',_0x5ca6e5=>{const _0x20d22c=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x20d22c(0x238)])return;const _0x3b03e3=BattleManager[_0x20d22c(0x5ae)];if(!_0x3b03e3)return;_0x3b03e3[_0x20d22c(0x3ed)]();}),PluginManager['registerCommand'](pluginData['name'],_0x5bdce9(0x43a),_0x2f0e28=>{const _0x4a7b31=_0x5bdce9;if(!SceneManager[_0x4a7b31(0x5ea)]())return;if(!Imported['VisuMZ_1_ElementStatusCore'])return;VisuMZ[_0x4a7b31(0x866)](_0x2f0e28,_0x2f0e28);const _0x2dc92b=BattleManager[_0x4a7b31(0x5ae)],_0x11fe49=_0x2f0e28[_0x4a7b31(0x86a)];if(!_0x2dc92b)return;_0x2dc92b[_0x4a7b31(0x94d)]=_0x11fe49;}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x5ef),_0x1fa6e1=>{const _0x1363a4=_0x5bdce9;if(!SceneManager[_0x1363a4(0x5ea)]())return;if(!Imported[_0x1363a4(0x238)])return;const _0x47a20d=BattleManager[_0x1363a4(0x5ae)];if(!_0x47a20d)return;_0x47a20d[_0x1363a4(0x7e8)]=!![];}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x8c3),_0x430f9c=>{const _0x3278c9=_0x5bdce9;if(!Imported[_0x3278c9(0xb28)])return;if(!SceneManager[_0x3278c9(0x5ea)]())return;VisuMZ[_0x3278c9(0x866)](_0x430f9c,_0x430f9c);const _0xf79424=VisuMZ[_0x3278c9(0x1f5)](_0x430f9c[_0x3278c9(0x637)]);for(const _0x1e81d4 of _0xf79424){if(_0x3278c9(0x2e9)===_0x3278c9(0x2e9)){if(!_0x1e81d4)continue;_0x1e81d4[_0x3278c9(0x2bb)](_0x3278c9(0xa83)),_0x1e81d4[_0x3278c9(0x2bb)](_0x3278c9(0x81b)),_0x1e81d4[_0x3278c9(0x2bb)]('tv'),_0x1e81d4[_0x3278c9(0x7e6)]();}else this[_0x3278c9(0x197)]('sleep');}$gamePlayer[_0x3278c9(0xf7)]();}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x7a5),_0x3763aa=>{const _0x202d11=_0x5bdce9;if(!Imported[_0x202d11(0xb28)])return;if(!SceneManager[_0x202d11(0x5ea)]())return;VisuMZ[_0x202d11(0x866)](_0x3763aa,_0x3763aa);const _0x362d2b=VisuMZ[_0x202d11(0x1f5)](_0x3763aa[_0x202d11(0x637)]),_0x112dcd=_0x202d11(0x81b);_0x3763aa[_0x202d11(0x62f)]=Math[_0x202d11(0xa44)](_0x3763aa[_0x202d11(0xa42)]/0x2),_0x3763aa[_0x202d11(0xb67)]=_0x3763aa['slices'],_0x3763aa['refreshRequest']=!![];for(const _0x19c3c1 of _0x362d2b){if(_0x202d11(0x423)===_0x202d11(0x423)){if(!_0x19c3c1)continue;_0x19c3c1[_0x202d11(0xb21)](_0x112dcd,_0x3763aa);}else{_0x35b05a[_0x202d11(0x768)]['show'][_0x202d11(0x4b1)](this);if(!_0x9b8b0c[_0x202d11(0x68b)]())this['refresh']();}}$gamePlayer[_0x202d11(0xf7)]();}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x45f),_0x3521ce=>{const _0x4cab4d=_0x5bdce9;if(!Imported[_0x4cab4d(0xb28)])return;if(!SceneManager[_0x4cab4d(0x5ea)]())return;VisuMZ[_0x4cab4d(0x866)](_0x3521ce,_0x3521ce);const _0x5e6e44=VisuMZ[_0x4cab4d(0x1f5)](_0x3521ce[_0x4cab4d(0x637)]);for(const _0x11d732 of _0x5e6e44){if(!_0x11d732)continue;_0x11d732['removeHorrorEffect']('glitch');}$gamePlayer['refresh']();}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x2b0),_0x49f72e=>{const _0x1a8a46=_0x5bdce9;if(!Imported[_0x1a8a46(0xb28)])return;if(!SceneManager[_0x1a8a46(0x5ea)]())return;VisuMZ[_0x1a8a46(0x866)](_0x49f72e,_0x49f72e);const _0xf6b4c5=VisuMZ[_0x1a8a46(0x1f5)](_0x49f72e[_0x1a8a46(0x637)]),_0x2a7563=_0x1a8a46(0xa83);for(const _0x12f10e of _0xf6b4c5){if(_0x1a8a46(0x612)===_0x1a8a46(0x612)){if(!_0x12f10e)continue;_0x12f10e['setHorrorEffectSettings'](_0x2a7563,_0x49f72e);}else{const _0x246316=_0x14c270[_0x3c1c61];_0x246316&&_0x286eaa[_0x1a8a46(0x32e)](_0x448856);}}$gamePlayer['refresh']();}),PluginManager['registerCommand'](pluginData['name'],_0x5bdce9(0x24d),_0x203729=>{const _0x4854b8=_0x5bdce9;if(!Imported[_0x4854b8(0xb28)])return;if(!SceneManager['isSceneBattle']())return;VisuMZ[_0x4854b8(0x866)](_0x203729,_0x203729);const _0x31eb08=VisuMZ[_0x4854b8(0x1f5)](_0x203729['Targets']);for(const _0x160d64 of _0x31eb08){if(_0x4854b8(0x311)===_0x4854b8(0x311)){if(!_0x160d64)continue;_0x160d64[_0x4854b8(0x2bb)](_0x4854b8(0xa83));}else return this[_0x4854b8(0xa71)]()&&!this[_0x4854b8(0x4ab)]()?this[_0x4854b8(0x22e)]():_0x105ba1['BattleCore'][_0x4854b8(0x651)]['call'](this);}$gamePlayer[_0x4854b8(0xf7)]();}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x260),_0x5ee092=>{const _0x1c895f=_0x5bdce9;if(!Imported['VisuMZ_2_HorrorEffects'])return;if(!SceneManager['isSceneBattle']())return;VisuMZ[_0x1c895f(0x866)](_0x5ee092,_0x5ee092);const _0xf73756=VisuMZ[_0x1c895f(0x1f5)](_0x5ee092[_0x1c895f(0x637)]),_0x2949fb='tv';for(const _0x26b5b1 of _0xf73756){if(_0x1c895f(0x2f5)!==_0x1c895f(0x8a9)){if(!_0x26b5b1)continue;_0x26b5b1[_0x1c895f(0xb21)](_0x2949fb,_0x5ee092);}else return this[_0x1c895f(0x392)](_0xbdb167);}$gamePlayer[_0x1c895f(0xf7)]();}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],'ActSeq_Horror_TVRemove',_0x52e026=>{const _0x391dcf=_0x5bdce9;if(!Imported[_0x391dcf(0xb28)])return;if(!SceneManager[_0x391dcf(0x5ea)]())return;VisuMZ['ConvertParams'](_0x52e026,_0x52e026);const _0x43133a=VisuMZ[_0x391dcf(0x1f5)](_0x52e026[_0x391dcf(0x637)]);for(const _0x1408f7 of _0x43133a){if('SJACk'!==_0x391dcf(0xdd)){if(!_0x1408f7)continue;_0x1408f7['removeHorrorEffect']('tv');}else return!![];}$gamePlayer[_0x391dcf(0xf7)]();}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x731),_0x418e61=>{const _0x5360a9=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x5360a9(0x554)])return;const _0x4c70c6=SceneManager['_scene'][_0x5360a9(0x25a)];if(!_0x4c70c6)return;VisuMZ[_0x5360a9(0x866)](_0x418e61,_0x418e61);const _0x39d28e=_0x418e61[_0x5360a9(0x778)]||0x1,_0x4e4341=_0x418e61[_0x5360a9(0x26c)]||0x1,_0x215666=_0x418e61['EasingType']||_0x5360a9(0x32d);_0x4c70c6[_0x5360a9(0x334)](_0x39d28e,_0x4e4341,_0x215666);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Impact_MotionBlurScreen',_0x273328=>{const _0x4138a2=_0x5bdce9;if(!SceneManager[_0x4138a2(0x5ea)]())return;if(!Imported[_0x4138a2(0x554)])return;const _0x5bd9bd=SceneManager[_0x4138a2(0x352)][_0x4138a2(0x25a)];if(!_0x5bd9bd)return;VisuMZ[_0x4138a2(0x866)](_0x273328,_0x273328);const _0xd00dab=Number(_0x273328['Angle'])||0x0,_0x30028d=Number(_0x273328['Rate']),_0x246931=_0x273328[_0x4138a2(0x26c)]||0x1,_0x2bef18=_0x273328['EasingType']||_0x4138a2(0x32d);_0x5bd9bd[_0x4138a2(0x5b5)](_0xd00dab,_0x30028d,_0x246931,_0x2bef18);}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x2ec),_0x236c3b=>{const _0x57ef17=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x57ef17(0x554)])return;const _0x4631f5=SceneManager[_0x57ef17(0x352)]['_spriteset'];if(!_0x4631f5)return;VisuMZ[_0x57ef17(0x866)](_0x236c3b,_0x236c3b);const _0x3b6d54=Number(_0x236c3b[_0x57ef17(0x47c)])||0x0,_0x3b8cad=Number(_0x236c3b[_0x57ef17(0x64e)]),_0x2576c8=_0x236c3b[_0x57ef17(0x26c)]||0x1,_0x344651=_0x236c3b[_0x57ef17(0x752)]||'Linear',_0x30568c=VisuMZ['CreateActionSequenceTargets'](_0x236c3b[_0x57ef17(0x637)]);for(const _0x4c8faa of _0x30568c){if(!_0x4c8faa)continue;if(!_0x4c8faa[_0x57ef17(0xb0d)]())continue;_0x4c8faa[_0x57ef17(0xb0d)]()[_0x57ef17(0x5b5)](_0x3b6d54,_0x3b8cad,_0x2576c8,_0x344651);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x1d5),_0x3be890=>{const _0xfb69e5=_0x5bdce9;if(!SceneManager[_0xfb69e5(0x5ea)]())return;if(!Imported[_0xfb69e5(0x554)])return;VisuMZ['ConvertParams'](_0x3be890,_0x3be890);const _0x5c137d={'delay':_0x3be890[_0xfb69e5(0x310)],'duration':_0x3be890[_0xfb69e5(0x45a)],'hue':_0x3be890[_0xfb69e5(0x1eb)],'opacityStart':_0x3be890[_0xfb69e5(0xb50)],'tone':_0x3be890['tone'],'visible':!![]},_0x3d89cb=VisuMZ[_0xfb69e5(0x1f5)](_0x3be890[_0xfb69e5(0x637)]);for(const _0xf62317 of _0x3d89cb){if(!_0xf62317)continue;_0xf62317['setBattlerMotionTrailData'](_0x5c137d);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0xb6b),_0x59df90=>{const _0x2ce216=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported['VisuMZ_3_ActSeqImpact'])return;VisuMZ[_0x2ce216(0x866)](_0x59df90,_0x59df90);const _0x532453=VisuMZ[_0x2ce216(0x1f5)](_0x59df90['Targets']);for(const _0x5945c3 of _0x532453){if('YOXsU'==='YOXsU'){if(!_0x5945c3)continue;_0x5945c3[_0x2ce216(0x14b)]();}else this['_onceParallelInterpreters']=[];}}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x9c5),_0x373e00=>{const _0x3de3c7=_0x5bdce9;if(!Imported['VisuMZ_3_ActSeqImpact'])return;const _0x2dd273=SceneManager[_0x3de3c7(0x352)]['_spriteset'];if(!_0x2dd273)return;VisuMZ['ConvertParams'](_0x373e00,_0x373e00);const _0x23a5c0=_0x373e00['X']||0x0,_0x59338a=_0x373e00['Y']||0x0,_0x13e442=_0x373e00[_0x3de3c7(0x1f0)]||0x0,_0x2db20f=_0x373e00[_0x3de3c7(0x12e)]||0x0,_0x47ad3d=_0x373e00[_0x3de3c7(0x26c)]||0x1;_0x2dd273['setupShockwaveImpactFilter'](_0x23a5c0,_0x59338a,_0x13e442,_0x2db20f,_0x47ad3d);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x87f),_0x5626b3=>{const _0x534cca=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x534cca(0x554)])return;const _0x10c9ef=SceneManager[_0x534cca(0x352)][_0x534cca(0x25a)];if(!_0x10c9ef)return;VisuMZ['ConvertParams'](_0x5626b3,_0x5626b3);const _0x5c7632=VisuMZ['CreateActionSequenceTargets'](_0x5626b3[_0x534cca(0x637)]),_0x379328=_0x5626b3[_0x534cca(0x909)],_0x2cbf07=_0x5626b3[_0x534cca(0x6b7)]||0x0,_0x4557d9=_0x5626b3[_0x534cca(0x4b4)]||0x0,_0x201a0a=_0x5626b3[_0x534cca(0x1f0)]||0x0,_0x520b04=_0x5626b3[_0x534cca(0x12e)]||0x0,_0x18d110=_0x5626b3['Duration']||0x1;for(const _0x13b4be of _0x5c7632){if(!_0x13b4be)continue;if(!_0x13b4be[_0x534cca(0xb0d)]())continue;const _0x1c34b6=_0x13b4be['battler']();let _0x4329e4=_0x1c34b6[_0x534cca(0x8f0)],_0xd7e68a=_0x1c34b6[_0x534cca(0x4c9)];_0x4329e4+=(Graphics[_0x534cca(0x3b2)]-Graphics[_0x534cca(0x7fb)])/0x2,_0xd7e68a+=(Graphics[_0x534cca(0x3b0)]-Graphics[_0x534cca(0x51f)])/0x2;if(_0x379328[_0x534cca(0x16b)](/front/i))_0x4329e4+=(_0x13b4be[_0x534cca(0x203)]()?0x1:-0x1)*_0x1c34b6[_0x534cca(0x1af)]()/0x2;else _0x379328[_0x534cca(0x16b)](/back/i)&&(_0x4329e4+=(_0x13b4be[_0x534cca(0x203)]()?-0x1:0x1)*_0x1c34b6[_0x534cca(0x1af)]()/0x2);if(_0x379328['match'](/head/i))_0xd7e68a-=_0x1c34b6[_0x534cca(0x1a1)]();else{if(_0x379328[_0x534cca(0x16b)](/center/i)){if(_0x534cca(0x140)!==_0x534cca(0x140)){if(!_0x2194ca['isSceneBattle']())return;if(!_0x1f5730[_0x534cca(0x27b)])return;_0x58ce3e[_0x534cca(0x866)](_0x520dc5,_0x59764f);const _0x2bb0f1=_0x1132e2[_0x534cca(0x592)]();_0x2bb0f1[_0x534cca(0xb04)]=_0x2defe0[_0x534cca(0x86d)];}else _0xd7e68a-=_0x1c34b6[_0x534cca(0x1a1)]()/0x2;}}_0x4329e4+=_0x2cbf07,_0xd7e68a+=_0x4557d9,_0x10c9ef[_0x534cca(0xa99)](_0x4329e4,_0xd7e68a,_0x201a0a,_0x520b04,_0x18d110);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],'ActSeq_Impact_ShockwaveCenterTargets',_0xe7c70e=>{const _0x39b3de=_0x5bdce9;if(!SceneManager[_0x39b3de(0x5ea)]())return;if(!Imported[_0x39b3de(0x554)])return;const _0xc7cd7=SceneManager[_0x39b3de(0x352)][_0x39b3de(0x25a)];if(!_0xc7cd7)return;VisuMZ['ConvertParams'](_0xe7c70e,_0xe7c70e);const _0x5b2428=VisuMZ[_0x39b3de(0x1f5)](_0xe7c70e['Targets']),_0x15aaa0=_0xe7c70e[_0x39b3de(0x909)],_0x3bd5f2=_0xe7c70e[_0x39b3de(0x6b7)]||0x0,_0x230bb2=_0xe7c70e['OffsetY']||0x0,_0x2d144b=_0xe7c70e['Amp']||0x0,_0x43b2a8=_0xe7c70e[_0x39b3de(0x12e)]||0x0,_0x3ff994=_0xe7c70e['Duration']||0x1,_0x158354=Math[_0x39b3de(0x339)](..._0x5b2428['map'](_0x131ad3=>_0x131ad3['battler']()[_0x39b3de(0x8f0)]-_0x131ad3[_0x39b3de(0xb0d)]()[_0x39b3de(0x1af)]()/0x2)),_0x2335bf=Math[_0x39b3de(0xa5e)](..._0x5b2428['map'](_0x204969=>_0x204969['battler']()[_0x39b3de(0x8f0)]+_0x204969[_0x39b3de(0xb0d)]()['mainSpriteWidth']()/0x2)),_0x3e53bd=Math['min'](..._0x5b2428['map'](_0x33cc08=>_0x33cc08[_0x39b3de(0xb0d)]()[_0x39b3de(0x4c9)]-_0x33cc08[_0x39b3de(0xb0d)]()['mainSpriteHeight']())),_0x40f947=Math['max'](..._0x5b2428[_0x39b3de(0x782)](_0x4a3da6=>_0x4a3da6[_0x39b3de(0xb0d)]()[_0x39b3de(0x4c9)])),_0x42f110=_0x5b2428[_0x39b3de(0xb85)](_0x2ecf0b=>_0x2ecf0b[_0x39b3de(0x491)]())[_0x39b3de(0x12d)],_0x45717d=_0x5b2428[_0x39b3de(0xb85)](_0x1355a3=>_0x1355a3[_0x39b3de(0x203)]())['length'];let _0x35a8cc=0x0,_0x112325=0x0;if(_0x15aaa0[_0x39b3de(0x16b)](/front/i))_0x35a8cc=_0x42f110>=_0x45717d?_0x158354:_0x2335bf;else{if(_0x15aaa0[_0x39b3de(0x16b)](/middle/i))_0x39b3de(0x958)!==_0x39b3de(0x958)?(_0xb30995[_0x39b3de(0x61c)][_0x39b3de(0xb11)][_0x39b3de(0x4b1)](this,_0x5ac9f0),this['createCommandNameWindow'](_0x40d596)):(_0x35a8cc=(_0x158354+_0x2335bf)/0x2,melee=-0x1);else _0x15aaa0['match'](/back/i)&&(_0x35a8cc=_0x42f110>=_0x45717d?_0x2335bf:_0x158354);}if(_0x15aaa0[_0x39b3de(0x16b)](/head/i))_0x112325=_0x3e53bd;else{if(_0x15aaa0[_0x39b3de(0x16b)](/center/i))_0x112325=(_0x3e53bd+_0x40f947)/0x2;else _0x15aaa0[_0x39b3de(0x16b)](/base/i)&&(_0x112325=_0x40f947);}_0x35a8cc+=(Graphics['width']-Graphics[_0x39b3de(0x7fb)])/0x2,_0x112325+=(Graphics['height']-Graphics[_0x39b3de(0x51f)])/0x2,_0x35a8cc+=_0x3bd5f2,_0x112325+=_0x230bb2,_0xc7cd7[_0x39b3de(0xa99)](_0x35a8cc,_0x112325,_0x2d144b,_0x43b2a8,_0x3ff994);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Impact_ZoomBlurPoint',_0x5e83a2=>{const _0x511d87=_0x5bdce9;if(!Imported['VisuMZ_3_ActSeqImpact'])return;const _0x2f0ee2=SceneManager[_0x511d87(0x352)]['_spriteset'];if(!_0x2f0ee2)return;VisuMZ['ConvertParams'](_0x5e83a2,_0x5e83a2);const _0x50a3e4=_0x5e83a2['X']||0x0,_0x4aee9d=_0x5e83a2['Y']||0x0,_0xd84175=_0x5e83a2[_0x511d87(0x652)]||0x0,_0x15049b=_0x5e83a2[_0x511d87(0xb88)]||0x0,_0x76ea1d=_0x5e83a2[_0x511d87(0x26c)]||0x1,_0x466180=_0x5e83a2['EasingType']||_0x511d87(0x32d);_0x2f0ee2[_0x511d87(0x134)](_0xd84175,_0x50a3e4,_0x4aee9d,_0x15049b,_0x76ea1d,_0x466180);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x186),_0x5eaac5=>{const _0x333bfa=_0x5bdce9;if(!Imported[_0x333bfa(0x554)])return;const _0x19f7c3=SceneManager[_0x333bfa(0x352)]['_spriteset'];if(!_0x19f7c3)return;VisuMZ['ConvertParams'](_0x5eaac5,_0x5eaac5);const _0x5a4dc5=VisuMZ[_0x333bfa(0x1f5)](_0x5eaac5[_0x333bfa(0x637)]),_0x131cfe=_0x5eaac5[_0x333bfa(0x909)],_0x16e1c0=_0x5eaac5[_0x333bfa(0x6b7)]||0x0,_0x281ee7=_0x5eaac5['OffsetY']||0x0,_0x48e4e6=_0x5eaac5[_0x333bfa(0x652)]||0x0,_0x460618=_0x5eaac5[_0x333bfa(0xb88)]||0x0,_0x1c3775=_0x5eaac5['Duration']||0x1,_0x347582=_0x5eaac5['EasingType']||_0x333bfa(0x32d),_0x2a1063=Math['min'](..._0x5a4dc5['map'](_0x1ec417=>_0x1ec417[_0x333bfa(0xb0d)]()[_0x333bfa(0x8f0)]-_0x1ec417[_0x333bfa(0xb0d)]()[_0x333bfa(0x1af)]()/0x2)),_0x399f0d=Math[_0x333bfa(0xa5e)](..._0x5a4dc5[_0x333bfa(0x782)](_0x3e9edf=>_0x3e9edf[_0x333bfa(0xb0d)]()['_baseX']+_0x3e9edf[_0x333bfa(0xb0d)]()[_0x333bfa(0x1af)]()/0x2)),_0x444eeb=Math[_0x333bfa(0x339)](..._0x5a4dc5[_0x333bfa(0x782)](_0x1445b0=>_0x1445b0['battler']()[_0x333bfa(0x4c9)]-_0x1445b0[_0x333bfa(0xb0d)]()[_0x333bfa(0x1a1)]())),_0x4c79b9=Math['max'](..._0x5a4dc5[_0x333bfa(0x782)](_0x7d6285=>_0x7d6285[_0x333bfa(0xb0d)]()['_baseY'])),_0x3c1d21=_0x5a4dc5['filter'](_0x38c2d3=>_0x38c2d3['isActor']())[_0x333bfa(0x12d)],_0x3b4d60=_0x5a4dc5['filter'](_0x17bdd9=>_0x17bdd9[_0x333bfa(0x203)]())['length'];let _0x33f925=0x0,_0x2af2b5=0x0;if(_0x131cfe[_0x333bfa(0x16b)](/front/i))_0x33f925=_0x3c1d21>=_0x3b4d60?_0x2a1063:_0x399f0d;else{if(_0x131cfe[_0x333bfa(0x16b)](/middle/i)){if(_0x333bfa(0x308)==='IbQfN'){const _0x448610=_0x48ef24[_0x333bfa(0x61c)][_0x333bfa(0x76e)][_0x333bfa(0xe6)],_0x49bdd5=this['_battler']&&this['_battler'][_0x333bfa(0x491)]()?0x1:-0x1,_0x209f41=this[_0x333bfa(0x8f0)]-this['_homeX']+_0x49bdd5*_0x448610[_0x333bfa(0x13c)],_0x1930a4=this[_0x333bfa(0x4c9)]-this[_0x333bfa(0x51a)]+_0x49bdd5*_0x448610[_0x333bfa(0x6d8)],_0x1f2228=_0x448610['FlinchDuration'];this[_0x333bfa(0x120)](_0x209f41,_0x1930a4,_0x1f2228);}else _0x33f925=(_0x2a1063+_0x399f0d)/0x2,melee=-0x1;}else _0x131cfe['match'](/back/i)&&('WIoiU'!==_0x333bfa(0x1e7)?_0x42f872[_0x333bfa(0x905)]([this],_0x59a347):_0x33f925=_0x3c1d21>=_0x3b4d60?_0x399f0d:_0x2a1063);}if(_0x131cfe[_0x333bfa(0x16b)](/head/i)){if(_0x333bfa(0x265)!==_0x333bfa(0x265)){if(!this[_0x333bfa(0x3ad)])return;if(!_0x4ffe97)return;this[_0x333bfa(0x3ad)][_0x333bfa(0x18f)](_0x24bdb0);}else _0x2af2b5=_0x444eeb;}else{if(_0x131cfe[_0x333bfa(0x16b)](/center/i))_0x2af2b5=(_0x444eeb+_0x4c79b9)/0x2;else{if(_0x131cfe[_0x333bfa(0x16b)](/base/i)){if(_0x333bfa(0xb65)===_0x333bfa(0x835)){if(this['allowCollapse']())_0x2d26b9['BattleCore']['Sprite_Enemy_updateCollapse']['call'](this);}else _0x2af2b5=_0x4c79b9;}}}_0x33f925+=(Graphics[_0x333bfa(0x3b2)]-Graphics[_0x333bfa(0x7fb)])/0x2,_0x2af2b5+=(Graphics[_0x333bfa(0x3b0)]-Graphics[_0x333bfa(0x51f)])/0x2,_0x33f925+=_0x16e1c0,_0x2af2b5+=_0x281ee7,_0x19f7c3[_0x333bfa(0x134)](_0x48e4e6,_0x33f925,_0x2af2b5,_0x460618,_0x1c3775,_0x347582);}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x20b),_0x41e049=>{const _0x24ec86=_0x5bdce9;if(!SceneManager[_0x24ec86(0x5ea)]())return;VisuMZ['ConvertParams'](_0x41e049,_0x41e049);const _0x3e274b=$gameTemp['getLastPluginCommandInterpreter'](),_0x552212=BattleManager[_0x24ec86(0x5ae)],_0x57f8ee=BattleManager[_0x24ec86(0xb40)],_0x3d54af=BattleManager[_0x24ec86(0x5c4)];if(!_0x3e274b||!_0x552212||!_0x57f8ee)return;if(!_0x552212[_0x24ec86(0xa8a)]())return;const _0x102cb6=VisuMZ['CreateActionSequenceTargets'](_0x41e049[_0x24ec86(0x637)]);for(const _0x3e2873 of _0x102cb6){if(!_0x3e2873)continue;_0x3d54af[_0x24ec86(0x838)](_0x24ec86(0x1b9),_0x57f8ee,_0x3e2873);}_0x3e274b['setWaitMode']('battlelog');}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x1d0),_0x3f220c=>{const _0x47bce3=_0x5bdce9;if(!SceneManager[_0x47bce3(0x5ea)]())return;VisuMZ['ConvertParams'](_0x3f220c,_0x3f220c);const _0x85fd80=[_0x47bce3(0x608),'MAXMP',_0x47bce3(0x37b),_0x47bce3(0x3d5),'MAT','MDF',_0x47bce3(0x204),'LUK'],_0x1882bd=_0x3f220c['Buffs'],_0x7202f9=_0x3f220c[_0x47bce3(0x24f)],_0x108a28=_0x3f220c[_0x47bce3(0x492)],_0x1f4c5d=VisuMZ['CreateActionSequenceTargets'](_0x3f220c[_0x47bce3(0x637)]);for(const _0x1bf638 of _0x1f4c5d){if(_0x47bce3(0x4ca)!==_0x47bce3(0x4ca))return this[_0x47bce3(0xa8a)]()[_0x47bce3(0x664)][_0x47bce3(0x16b)](/<JS TARGETS>/i);else{if(!_0x1bf638)continue;for(const _0x14dbd2 of _0x1882bd){if(_0x47bce3(0x993)!==_0x47bce3(0x993))_0x5e530d+='\x0a',_0x147f05+=_0x5ad0dd[_0x47bce3(0x2f6)][0x0];else{const _0x8ddec9=_0x85fd80[_0x47bce3(0x977)](_0x14dbd2[_0x47bce3(0x673)]()[_0x47bce3(0x92d)]());_0x8ddec9>=0x0&&_0x8ddec9<=0x7&&_0x1bf638[_0x47bce3(0x520)](_0x8ddec9,_0x108a28);}}for(const _0x5684c0 of _0x7202f9){const _0x5a4856=_0x85fd80[_0x47bce3(0x977)](_0x5684c0[_0x47bce3(0x673)]()[_0x47bce3(0x92d)]());if(_0x5a4856>=0x0&&_0x5a4856<=0x7){if(_0x47bce3(0x3e1)!==_0x47bce3(0x3e1))return _0x34dd0a[_0x47bce3(0x61c)]['Settings']['BattleLog']['MaxLines'];else _0x1bf638[_0x47bce3(0x199)](_0x5a4856,_0x108a28);}}}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Mechanics_AddState',_0x11956b=>{const _0x928996=_0x5bdce9;if(!SceneManager[_0x928996(0x5ea)]())return;VisuMZ[_0x928996(0x866)](_0x11956b,_0x11956b);const _0x2fd76=_0x11956b[_0x928996(0x8d2)],_0x28595c=VisuMZ[_0x928996(0x1f5)](_0x11956b[_0x928996(0x637)]);for(const _0x24290e of _0x28595c){if(!_0x24290e)continue;for(const _0x35afb5 of _0x2fd76){_0x24290e['addState'](_0x35afb5);}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Mechanics_ArmorPenetration',_0x27ed45=>{const _0x37e330=_0x5bdce9;if(!SceneManager[_0x37e330(0x5ea)]())return;VisuMZ[_0x37e330(0x866)](_0x27ed45,_0x27ed45);const _0x1de22f=BattleManager['_action'],_0x61da25={'arPenRate':_0x27ed45[_0x37e330(0x941)],'arPenFlat':_0x27ed45['ArPenFlat'],'arRedRate':_0x27ed45[_0x37e330(0x724)],'arRedFlat':_0x27ed45[_0x37e330(0xa58)]};_0x1de22f[_0x37e330(0x742)]=_0x61da25;}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x4e5),_0x5c07ba=>{const _0x2ce08e=_0x5bdce9;if(!SceneManager[_0x2ce08e(0x5ea)]())return;if(!Imported[_0x2ce08e(0x6d7)])return;VisuMZ[_0x2ce08e(0x866)](_0x5c07ba,_0x5c07ba);const _0x264539=VisuMZ[_0x2ce08e(0x1f5)](_0x5c07ba[_0x2ce08e(0x637)]),_0x81dd15=_0x5c07ba[_0x2ce08e(0x5cd)]||0x1;for(const _0x342472 of _0x264539){if(!_0x342472)continue;if(!_0x342472['isEnemy']())continue;_0x342472[_0x2ce08e(0x505)](_0x81dd15);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x1b2),_0x1d6161=>{const _0x441cd0=_0x5bdce9;if(!SceneManager[_0x441cd0(0x5ea)]())return;if(!Imported['VisuMZ_2_BattleSystemATB'])return;if(!BattleManager[_0x441cd0(0x179)]())return;VisuMZ[_0x441cd0(0x866)](_0x1d6161,_0x1d6161);const _0x39e741=VisuMZ[_0x441cd0(0x1f5)](_0x1d6161[_0x441cd0(0x637)]),_0x44e489=_0x1d6161[_0x441cd0(0x384)],_0x109127=_0x1d6161[_0x441cd0(0x384)],_0x3fe5d3=_0x1d6161[_0x441cd0(0x567)];for(const _0x52cbfb of _0x39e741){if(!_0x52cbfb)continue;if(_0x52cbfb[_0x441cd0(0xb43)]())_0x52cbfb[_0x441cd0(0x774)](_0x44e489);else{if(_0x52cbfb[_0x441cd0(0x965)]()){if(_0x441cd0(0x542)!=='FkiKZ'){if(!_0x30f014[_0x441cd0(0x68b)]())return;const _0x2c24e9=this[_0x441cd0(0xb0d)]();if(!_0x2c24e9)return;_0x3263ec=_0x57b51a||0x0;if(_0x3e32af>0x0){if(_0x2c24e9['_baseX']>_0xd2e210)_0xc1deff+=_0x2c24e9[_0x441cd0(0x3b2)]/0x2+_0x1618c0;if(_0x2c24e9['_baseX']<_0x50b899)_0xdff32d-=_0x2c24e9[_0x441cd0(0x3b2)]/0x2+_0x2686b8;}if(_0x1ecb8b)this['setBattlerFacePoint'](_0x50c2f6,_0x48cd1f,![]);_0x2c24e9['startHomeMove'](_0x273a59,_0x489e61,_0x380d87,_0x47d73b),this['_forcedHomeX']=_0x55ae1e,this[_0x441cd0(0x9fa)]=_0x2b8f41;}else{_0x52cbfb[_0x441cd0(0xa47)](_0x109127);if(_0x3fe5d3)_0x52cbfb[_0x441cd0(0x8d7)]();}}}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x5c5),_0x3ecbb1=>{const _0x3fe6a7=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported['VisuMZ_3_BoostAction'])return;VisuMZ[_0x3fe6a7(0x866)](_0x3ecbb1,_0x3ecbb1);const _0x25caa6=VisuMZ[_0x3fe6a7(0x1f5)](_0x3ecbb1['Targets']),_0xa17b30=_0x3ecbb1[_0x3fe6a7(0x1db)];for(const _0x113533 of _0x25caa6){if('xwGoC'==='xwGoC'){if(!_0x113533)continue;_0x113533[_0x3fe6a7(0x8e6)](_0xa17b30);}else!_0x14066b['battleMembers']()[_0x3fe6a7(0x8ed)](this[_0x3fe6a7(0x793)])&&(this[_0x3fe6a7(0x793)]=null);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x521),_0x368d4e=>{const _0x2dee16=_0x5bdce9;if(!SceneManager[_0x2dee16(0x5ea)]())return;if(!Imported[_0x2dee16(0x11e)])return;if(!BattleManager[_0x2dee16(0xb40)])return;VisuMZ[_0x2dee16(0x866)](_0x368d4e,_0x368d4e);const _0x2e2aaf=_0x368d4e['VariableID'];$gameVariables[_0x2dee16(0xadf)](_0x2e2aaf,BattleManager[_0x2dee16(0xb40)][_0x2dee16(0x67b)]());}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x2b2),_0x85b4cf=>{const _0x1c79d8=_0x5bdce9;if(!SceneManager[_0x1c79d8(0x5ea)]())return;if(!Imported['VisuMZ_4_BreakShields'])return;VisuMZ['ConvertParams'](_0x85b4cf,_0x85b4cf);const _0xa6ccf6=VisuMZ[_0x1c79d8(0x1f5)](_0x85b4cf[_0x1c79d8(0x637)]),_0x7345f6=_0x85b4cf[_0x1c79d8(0x827)];for(const _0x16aac3 of _0xa6ccf6){if(_0x1c79d8(0xb42)===_0x1c79d8(0xd8)){if(!_0xfbe5de[_0x1c79d8(0x352)]['_uiContainer'])return;_0x4e9428[_0x1c79d8(0x352)]['_uiContainer'][_0x1c79d8(0xa8d)](_0x5b9cc5);}else{if(!_0x16aac3)continue;if(_0x16aac3[_0x1c79d8(0x8d8)]())continue;if(!_0x16aac3[_0x1c79d8(0x9d9)]())continue;_0x16aac3[_0x1c79d8(0x646)](_0x7345f6);}}}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x48f),_0x55db73=>{const _0x2ae68f=_0x5bdce9;if(!SceneManager[_0x2ae68f(0x5ea)]())return;if(!Imported[_0x2ae68f(0x66d)])return;VisuMZ[_0x2ae68f(0x866)](_0x55db73,_0x55db73);const _0x1cefbe=VisuMZ[_0x2ae68f(0x1f5)](_0x55db73['Targets']);for(const _0x2a16e2 of _0x1cefbe){if(!_0x2a16e2)continue;if(_0x2a16e2[_0x2ae68f(0x8d8)]())continue;if(!_0x2a16e2[_0x2ae68f(0x9d9)]())continue;_0x2a16e2[_0x2ae68f(0x37e)]();}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x8b9),_0x56b177=>{const _0x503e24=_0x5bdce9;if(!SceneManager[_0x503e24(0x5ea)]())return;if(!Imported[_0x503e24(0xef)])return;if(!BattleManager[_0x503e24(0x675)]())return;VisuMZ[_0x503e24(0x866)](_0x56b177,_0x56b177);const _0x19db10=VisuMZ[_0x503e24(0x1f5)](_0x56b177[_0x503e24(0x637)]),_0x4ed607=_0x56b177[_0x503e24(0xb55)];for(const _0x172abd of _0x19db10){if(!_0x172abd)continue;_0x172abd[_0x503e24(0x810)](_0x4ed607);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x58f),_0x2bab49=>{const _0x42b267=_0x5bdce9;if(!SceneManager[_0x42b267(0x5ea)]())return;VisuMZ[_0x42b267(0x866)](_0x2bab49,_0x2bab49);const _0x10d817=$gameTemp[_0x42b267(0xb48)](),_0x8b6cea=BattleManager['_action'],_0x3c43e0=BattleManager[_0x42b267(0xb40)];if(!_0x10d817||!_0x8b6cea||!_0x3c43e0)return;if(!_0x8b6cea[_0x42b267(0xa8a)]())return;const _0x78ff92=VisuMZ[_0x42b267(0x1f5)](_0x2bab49[_0x42b267(0x637)]);for(const _0x295f37 of _0x78ff92){if(!_0x295f37)continue;_0x2bab49[_0x42b267(0x92c)]&&(_0x295f37[_0x42b267(0x981)](),_0x295f37['addState'](_0x295f37[_0x42b267(0x555)]()));if(_0x295f37[_0x42b267(0x568)]()){if('BqFIy'!==_0x42b267(0x34c))_0x295f37[_0x42b267(0x418)]();else{if(_0x344784[_0x42b267(0x466)]())_0x4d0893[_0x42b267(0x68e)](_0x5be06f);return _0x57c253['BattleCore']['Game_Action_evalDamageFormula']['call'](this);}}}_0x10d817[_0x42b267(0x73c)](_0x42b267(0x497));}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],'ActSeq_Mechanics_CtbOrder',_0x244477=>{const _0x5de207=_0x5bdce9;if(!SceneManager[_0x5de207(0x5ea)]())return;if(!Imported[_0x5de207(0x548)])return;if(!BattleManager[_0x5de207(0xa8e)]())return;VisuMZ[_0x5de207(0x866)](_0x244477,_0x244477);const _0x55ff91=VisuMZ['CreateActionSequenceTargets'](_0x244477['Targets']),_0x64ec2b=_0x244477[_0x5de207(0x1a3)];for(const _0x472357 of _0x55ff91){if(!_0x472357)continue;_0x472357[_0x5de207(0x422)](_0x64ec2b);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0xa1f),_0x52cb19=>{const _0xdd345f=_0x5bdce9;if(!SceneManager[_0xdd345f(0x5ea)]())return;if(!Imported['VisuMZ_2_BattleSystemCTB'])return;if(!BattleManager[_0xdd345f(0xa8e)]())return;VisuMZ[_0xdd345f(0x866)](_0x52cb19,_0x52cb19);const _0x4f2cb2=VisuMZ[_0xdd345f(0x1f5)](_0x52cb19[_0xdd345f(0x637)]),_0x328104=_0x52cb19[_0xdd345f(0x384)],_0x5729d2=_0x52cb19[_0xdd345f(0x384)];for(const _0x31f4ac of _0x4f2cb2){if(_0xdd345f(0xa6e)===_0xdd345f(0xab0))return this['parent'];else{if(!_0x31f4ac)continue;if(_0x31f4ac[_0xdd345f(0x309)]===_0xdd345f(0x25e))_0x31f4ac[_0xdd345f(0x4e0)](_0x328104);else _0x31f4ac['_tpbState']===_0xdd345f(0xa17)&&('encDq'!==_0xdd345f(0xf4)?_0x1fd8ce[_0x19e1a7]===0x1&&this[_0xdd345f(0x8d9)]!==_0x4aebd0&&(_0x487870[_0x3191b7]=null):_0x31f4ac['changeCtbCastTime'](_0x5729d2));}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x84b),_0x5af8e6=>{const _0x6ecb45=_0x5bdce9;if(!SceneManager[_0x6ecb45(0x5ea)]())return;VisuMZ[_0x6ecb45(0x866)](_0x5af8e6,_0x5af8e6);const _0x61a27a=BattleManager[_0x6ecb45(0x5ae)];if(!_0x61a27a)return;let _0x297dda=_0x5af8e6[_0x6ecb45(0x586)];_0x61a27a[_0x6ecb45(0x1fe)](_0x297dda);}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x4b0),_0x4fce19=>{const _0x4dda55=_0x5bdce9;if(!SceneManager[_0x4dda55(0x5ea)]())return;VisuMZ[_0x4dda55(0x866)](_0x4fce19,_0x4fce19);const _0x3ed71e=VisuMZ['CreateActionSequenceTargets'](_0x4fce19[_0x4dda55(0x637)]);for(const _0x420651 of _0x3ed71e){if(_0x4dda55(0x5ec)==='qLmWj')return this[_0x4dda55(0xa72)]&&this[_0x4dda55(0xa72)][_0x4dda55(0xaf2)]();else{if(!_0x420651)continue;if(_0x420651[_0x4dda55(0x1e4)]())_0x420651[_0x4dda55(0x189)]();}}}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x227),_0x3495cc=>{const _0x3bebef=_0x5bdce9;if(!SceneManager[_0x3bebef(0x5ea)]())return;VisuMZ[_0x3bebef(0x866)](_0x3495cc,_0x3495cc);const _0x4d44c9=$gameTemp[_0x3bebef(0xb48)](),_0x3b55dd=BattleManager[_0x3bebef(0xb40)],_0x5b96b3=_0x3495cc[_0x3bebef(0x369)];if(!_0x4d44c9)return;if(!_0x3b55dd)return;_0x3b55dd&&_0x3b55dd[_0x3bebef(0x9a3)]()&&_0x5b96b3[_0x3bebef(0x673)]()[_0x3bebef(0x92d)]()!==_0x3bebef(0xae4)&&_0x4d44c9[_0x3bebef(0x29b)]([_0x5b96b3]);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x78e),_0x39b84b=>{const _0x10c579=_0x5bdce9;if(!SceneManager[_0x10c579(0x5ea)]())return;VisuMZ[_0x10c579(0x866)](_0x39b84b,_0x39b84b);const _0x3fd988=VisuMZ['CreateActionSequenceTargets'](_0x39b84b[_0x10c579(0x637)]);for(const _0x8a5ce5 of _0x3fd988){if(!_0x8a5ce5)continue;if(!_0x8a5ce5[_0x10c579(0x203)]())continue;_0x8a5ce5[_0x10c579(0x6ec)]();}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Mechanics_EtbAction',_0x47c302=>{const _0x43af39=_0x5bdce9;if(!SceneManager[_0x43af39(0x5ea)]())return;if(!Imported['VisuMZ_2_BattleSystemETB'])return;if(!BattleManager[_0x43af39(0x9e6)]())return;VisuMZ[_0x43af39(0x866)](_0x47c302,_0x47c302);const _0x5f4dde=_0x47c302['ActionCount'];BattleManager[_0x43af39(0xb40)]&&(_0x43af39(0xa9a)!==_0x43af39(0xa9a)?this[_0x43af39(0xae3)][this[_0x43af39(0x83b)]]=_0x3f4c93:BattleManager[_0x43af39(0xb40)][_0x43af39(0x712)]()[_0x43af39(0x5c6)](_0x5f4dde));}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],'ActSeq_Mechanics_FtbAction',_0x104241=>{const _0x3d4c99=_0x5bdce9;if(!SceneManager[_0x3d4c99(0x5ea)]())return;if(!Imported[_0x3d4c99(0x21e)])return;if(!BattleManager[_0x3d4c99(0x861)]())return;VisuMZ['ConvertParams'](_0x104241,_0x104241);const _0x1a858a=_0x104241['ActionCount'];BattleManager[_0x3d4c99(0xb40)]&&BattleManager[_0x3d4c99(0xb40)][_0x3d4c99(0x712)]()[_0x3d4c99(0x4cd)](_0x1a858a);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Mechanics_HpMpTp',_0x971150=>{const _0x429da9=_0x5bdce9;if(!SceneManager[_0x429da9(0x5ea)]())return;VisuMZ[_0x429da9(0x866)](_0x971150,_0x971150);const _0x5b4b98=VisuMZ['CreateActionSequenceTargets'](_0x971150[_0x429da9(0x637)]),_0x1399f7=_0x971150[_0x429da9(0x8ee)],_0xc9a40b=_0x971150[_0x429da9(0x11c)],_0x1fa693=_0x971150[_0x429da9(0x694)],_0x26a0b5=_0x971150['MP_Flat'],_0x585f0b=_0x971150[_0x429da9(0x549)],_0x4565cb=_0x971150['TP_Flat'],_0x3a7c79=_0x971150['ShowPopup'];for(const _0xe49662 of _0x5b4b98){if(_0x429da9(0x96c)!==_0x429da9(0x2c8)){if(!_0xe49662)continue;const _0x1f9ce0=_0xe49662[_0x429da9(0x4d2)](),_0x5aa8e2=Math[_0x429da9(0xb3f)](_0x1399f7*_0xe49662[_0x429da9(0x2dc)]+_0xc9a40b),_0x5ab342=Math[_0x429da9(0xb3f)](_0x1fa693*_0xe49662['mmp']+_0x26a0b5),_0x4fb46f=Math[_0x429da9(0xb3f)](_0x585f0b*_0xe49662[_0x429da9(0x51c)]()+_0x4565cb);if(_0x5aa8e2!==0x0)_0xe49662['gainHp'](_0x5aa8e2);if(_0x5ab342!==0x0)_0xe49662[_0x429da9(0x915)](_0x5ab342);if(_0x4fb46f!==0x0)_0xe49662[_0x429da9(0x312)](_0x4fb46f);if(_0x3a7c79)_0xe49662[_0x429da9(0x189)]();_0x1f9ce0&&_0xe49662[_0x429da9(0x9a3)]()&&_0xe49662[_0x429da9(0x418)]();}else this['_effectsContainer']=new _0x324b8c(),this['addChild'](this[_0x429da9(0x122)]);}}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x30a),_0x40f044=>{const _0xc6e422=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;VisuMZ[_0xc6e422(0x866)](_0x40f044,_0x40f044);const _0x3ba971=VisuMZ['CreateActionSequenceTargets'](_0x40f044[_0xc6e422(0x637)]);for(const _0x178f8f of _0x3ba971){if(!_0x178f8f)continue;_0x178f8f[_0xc6e422(0x78c)](_0x40f044[_0xc6e422(0xb0b)]);}}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x290),_0x2d1540=>{const _0x1795ce=_0x5bdce9;if(!SceneManager[_0x1795ce(0x5ea)]())return;VisuMZ['ConvertParams'](_0x2d1540,_0x2d1540);const _0xc5b28a=BattleManager[_0x1795ce(0x5ae)],_0x41e450={'criticalHitRate':_0x2d1540[_0x1795ce(0x6ad)],'criticalHitFlat':_0x2d1540[_0x1795ce(0x526)],'criticalDmgRate':_0x2d1540['CriticalDmgRate'],'criticalDmgFlat':_0x2d1540[_0x1795ce(0x7b3)],'damageRate':_0x2d1540['DamageRate'],'damageFlat':_0x2d1540[_0x1795ce(0x90b)],'hitRate':_0x2d1540['HitRate'],'hitFlat':_0x2d1540['HitFlat']};_0xc5b28a[_0x1795ce(0x167)]=_0x41e450;}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x68d),_0x6fcbd2=>{const _0x1c25a2=_0x5bdce9;if(!SceneManager[_0x1c25a2(0x5ea)]())return;VisuMZ[_0x1c25a2(0x866)](_0x6fcbd2,_0x6fcbd2);const _0x1a8699=_0x6fcbd2[_0x1c25a2(0x663)];SceneManager[_0x1c25a2(0x352)][_0x1c25a2(0x3f8)](_0x1a8699);}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x7ba),_0x55d9dd=>{const _0x43a3ef=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x43a3ef(0x36c)])return;if(!BattleManager[_0x43a3ef(0x336)]())return;VisuMZ[_0x43a3ef(0x866)](_0x55d9dd,_0x55d9dd);const _0x322757=VisuMZ[_0x43a3ef(0x1f5)](_0x55d9dd[_0x43a3ef(0x637)]);for(const _0x4ec8a2 of _0x322757){if(!_0x4ec8a2)continue;let _0x3c23de=_0x55d9dd[_0x43a3ef(0x5e5)],_0x4b16c7=_0x55d9dd[_0x43a3ef(0xae2)],_0x53e69f=_0x55d9dd[_0x43a3ef(0x678)];if(BattleManager[_0x43a3ef(0x730)][_0x43a3ef(0x8ed)](_0x4ec8a2))_0x3c23de+=_0x53e69f;else{if('fxpkm'!==_0x43a3ef(0xb7c)){if(!_0x181567[_0x43a3ef(0x5ea)]())return;if(!_0x29039b['VisuMZ_1_ElementStatusCore'])return;const _0x161005=_0x492a03['_action'];if(!_0x161005)return;_0x161005[_0x43a3ef(0x7e8)]=!![];}else _0x4b16c7+=_0x53e69f;}BattleManager[_0x43a3ef(0x9f6)](_0x4ec8a2,-_0x3c23de,![]),BattleManager[_0x43a3ef(0x9f6)](_0x4ec8a2,-_0x4b16c7,!![]);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Mechanics_PtbAlterCost',_0xb3e811=>{const _0x13a489=_0x5bdce9;if(!SceneManager[_0x13a489(0x5ea)]())return;if(!Imported[_0x13a489(0x948)])return;if(!BattleManager['isPTB']())return;VisuMZ[_0x13a489(0x866)](_0xb3e811,_0xb3e811);const _0x537729=BattleManager[_0x13a489(0xb40)]['friendsUnit'](),_0x35e967=_0xb3e811['Override'],_0x178069=_0xb3e811[_0x13a489(0xa05)]||_0x13a489(0x1b3),_0x9f0fe=_0xb3e811['alterType']||'unchanged',_0x4fb07b=_0xb3e811[_0x13a489(0x65a)]||0x0,_0x2301dd=_0xb3e811[_0x13a489(0x5be)]||0x0;if(_0x537729[_0x13a489(0x74c)]()||_0x35e967){if(_0x35e967){if('Vjkdz'!=='Vjkdz'){const _0x176fd5=_0x3af566[_0x13a489(0xb3f)](_0x1267b4[_0x13a489(0x7fb)]/0x3),_0x45b0c8=_0x1e664b['round'](_0x281dc4['boxWidth']/_0x3b6089['battleMembers']()[_0x13a489(0x12d)]),_0x273443=_0x69a943['min'](_0x176fd5,_0x45b0c8),_0x48f815=this[_0x13a489(0x133)](_0x486445[_0x13a489(0x61c)]['Settings'][_0x13a489(0x40f)]['XPActorCommandLines']),_0x5a236f=_0x45b0c8*_0x5b778b[_0x13a489(0x1fd)]()+(_0x45b0c8-_0x273443)/0x2,_0x46c1d8=_0x514b5a[_0x13a489(0x352)][_0x13a489(0x3e2)]['y']-_0x48f815;this[_0x13a489(0x5e7)](_0x5a236f,_0x46c1d8,_0x273443,_0x48f815),this['createContents'](),this['setBackgroundType'](0x1);}else _0x537729[_0x13a489(0x8e0)]=_0x537729['_ptbActionCost']||{},_0x537729['_ptbActionCost'][_0x13a489(0x624)]=0x0;}_0x537729['alterActionCostPTB'](_0x178069,_0x9f0fe,_0x4fb07b,_0x2301dd);}}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x17e),_0x2a6ee2=>{const _0x3dd8b4=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x3dd8b4(0x948)])return;if(!BattleManager[_0x3dd8b4(0x67f)]())return;VisuMZ[_0x3dd8b4(0x866)](_0x2a6ee2,_0x2a6ee2);const _0x37c777=BattleManager['_subject'][_0x3dd8b4(0x712)]();let _0x4d66ed=Math[_0x3dd8b4(0xa5e)](_0x2a6ee2[_0x3dd8b4(0x3eb)],0x0),_0x350d80=_0x37c777[_0x3dd8b4(0xa88)](),_0x32dba9=_0x37c777[_0x3dd8b4(0x81f)]();while(_0x4d66ed--){if(_0x350d80<=0x0&&_0x32dba9<=0x0)break;else _0x350d80>0x0?(_0x350d80--,_0x32dba9++):_0x3dd8b4(0x7b7)===_0x3dd8b4(0xa09)?_0x4010ad['setup'](0x0):_0x32dba9--;}_0x37c777[_0x3dd8b4(0x686)](_0x350d80),_0x37c777[_0x3dd8b4(0x8c4)](_0x32dba9);}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x350),_0x5869bb=>{const _0x1fb14b=_0x5bdce9;if(!SceneManager[_0x1fb14b(0x5ea)]())return;if(!Imported[_0x1fb14b(0x948)])return;if(!BattleManager[_0x1fb14b(0x67f)]())return;VisuMZ[_0x1fb14b(0x866)](_0x5869bb,_0x5869bb);const _0x3cb3ba=BattleManager['_subject'][_0x1fb14b(0x712)]();let _0x419875=_0x5869bb[_0x1fb14b(0xb1a)],_0x9bd0c6=_0x5869bb[_0x1fb14b(0x58e)];_0x3cb3ba[_0x1fb14b(0x759)](_0x419875),_0x3cb3ba[_0x1fb14b(0x172)](_0x9bd0c6);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x6a8),_0x360413=>{const _0x481162=_0x5bdce9;if(!SceneManager[_0x481162(0x5ea)]())return;VisuMZ[_0x481162(0x866)](_0x360413,_0x360413);const _0x89216a=[_0x481162(0x608),_0x481162(0x8f3),_0x481162(0x37b),'DEF',_0x481162(0x35a),_0x481162(0x1ee),_0x481162(0x204),_0x481162(0x35d)],_0x4c1175=_0x360413[_0x481162(0x5d2)],_0x1dc738=_0x360413[_0x481162(0x24f)],_0x5f27ea=VisuMZ[_0x481162(0x1f5)](_0x360413['Targets']);for(const _0x1353c5 of _0x5f27ea){if('djkIU'!==_0x481162(0x682)){if(!_0x35a745['isSceneBattle']())return;if(!_0x2c25dc[_0x481162(0x554)])return;const _0x1ced21=_0x4405ca[_0x481162(0x352)][_0x481162(0x25a)];if(!_0x1ced21)return;_0xd340cb[_0x481162(0x866)](_0x43d13c,_0x49b96b);const _0x15459b=_0xff837e(_0x4e9bf2[_0x481162(0x47c)])||0x0,_0x4fa2dd=_0xe5066d(_0x352510[_0x481162(0x64e)]),_0x3ae6b7=_0x29cdd7['Duration']||0x1,_0xf6a921=_0x269dfe[_0x481162(0x752)]||_0x481162(0x32d);_0x1ced21[_0x481162(0x5b5)](_0x15459b,_0x4fa2dd,_0x3ae6b7,_0xf6a921);}else{if(!_0x1353c5)continue;for(const _0x24cb64 of _0x4c1175){const _0x4249f2=_0x89216a[_0x481162(0x977)](_0x24cb64['toUpperCase']()[_0x481162(0x92d)]());if(_0x4249f2>=0x0&&_0x4249f2<=0x7&&_0x1353c5[_0x481162(0xa59)](_0x4249f2)){if(_0x481162(0x3bc)!==_0x481162(0x52b))_0x1353c5[_0x481162(0x1b8)](_0x4249f2);else{const _0x3d7d77=_0x4a6bab(_0x16893b['$1'])[_0x481162(0x673)]()[_0x481162(0x92d)]();if(_0x3d7d77===_0x481162(0x590))return _0x481162(0x590);if(_0x2a6da3[_0x481162(0xb78)][_0x3d7d77])return _0x3d7d77;}}}for(const _0x3a7671 of _0x1dc738){const _0x5ea368=_0x89216a[_0x481162(0x977)](_0x3a7671['toUpperCase']()[_0x481162(0x92d)]());_0x5ea368>=0x0&&_0x5ea368<=0x7&&_0x1353c5['isDebuffAffected'](_0x5ea368)&&_0x1353c5[_0x481162(0x1b8)](_0x5ea368);}}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x9bb),_0x584003=>{const _0x560b77=_0x5bdce9;if(!SceneManager[_0x560b77(0x5ea)]())return;VisuMZ[_0x560b77(0x866)](_0x584003,_0x584003);const _0x3fdea3=_0x584003['States'],_0x3f91dc=VisuMZ[_0x560b77(0x1f5)](_0x584003[_0x560b77(0x637)]);for(const _0x1594f9 of _0x3f91dc){if(!_0x1594f9)continue;for(const _0x193790 of _0x3fdea3){_0x1594f9[_0x560b77(0x3ea)](_0x193790);}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Mechanics_StbExploit',_0x4781a7=>{const _0x245644=_0x5bdce9;if(!SceneManager[_0x245644(0x5ea)]())return;if(!Imported['VisuMZ_2_BattleSystemSTB'])return;if(!BattleManager[_0x245644(0x346)]())return;VisuMZ[_0x245644(0x866)](_0x4781a7,_0x4781a7);const _0x3412e6=_0x4781a7[_0x245644(0x654)],_0x35e272=VisuMZ[_0x245644(0x1f5)](_0x4781a7[_0x245644(0x637)]),_0x154b7c=_0x4781a7[_0x245644(0x899)],_0x8809d8=_0x4781a7[_0x245644(0x534)],_0x5b4bde=_0x4781a7['ForceExploiter'],_0x4b99e2=BattleManager[_0x245644(0x5ae)];if(_0x3412e6)for(const _0x1a0119 of _0x35e272){if(_0x245644(0x19b)===_0x245644(0x19b)){if(!_0x1a0119)continue;if(_0x1a0119===user)continue;if(_0x154b7c)_0x1a0119[_0x245644(0x4f1)](![]);_0x1a0119['becomeSTBExploited'](BattleManager[_0x245644(0xb40)],_0x4b99e2);}else{_0x1ec5ff['BattleCore']['Scene_Battle_updateBattleProcess']['call'](this);if(this[_0x245644(0x1df)]&&!_0x1fba05[_0x245644(0xb40)])this['callOptions']();}}if(_0x8809d8&&BattleManager[_0x245644(0xb40)]){if(_0x245644(0x706)!==_0x245644(0x706))_0xf5b90c[_0x245644(0x5ee)]=![];else{if(_0x5b4bde)BattleManager[_0x245644(0xb40)][_0x245644(0x4f1)](![]);const _0x4d4af5=_0x35e272[0x0];BattleManager[_0x245644(0x99b)](_0x4d4af5,_0x4b99e2);}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0xa30),_0x29c6e6=>{const _0x4ddcb3=_0x5bdce9;if(!SceneManager[_0x4ddcb3(0x5ea)]())return;if(!Imported[_0x4ddcb3(0x587)])return;if(!BattleManager['isSTB']())return;VisuMZ[_0x4ddcb3(0x866)](_0x29c6e6,_0x29c6e6);const _0x4e0ce9=_0x29c6e6[_0x4ddcb3(0x9fd)];BattleManager[_0x4ddcb3(0xb40)]&&BattleManager[_0x4ddcb3(0xb40)][_0x4ddcb3(0x9e2)](_0x4e0ce9);}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0xaf5),_0x54a278=>{const _0x2f0906=_0x5bdce9;if(!SceneManager[_0x2f0906(0x5ea)]())return;if(!Imported['VisuMZ_2_BattleSystemSTB'])return;if(!BattleManager[_0x2f0906(0x346)]())return;VisuMZ[_0x2f0906(0x866)](_0x54a278,_0x54a278);let _0x3cb443=_0x54a278[_0x2f0906(0x9fd)];if(BattleManager['_subject']){BattleManager[_0x2f0906(0xb40)][_0x2f0906(0x53e)]=BattleManager['_subject'][_0x2f0906(0x53e)]||[];while(_0x3cb443--){if(BattleManager[_0x2f0906(0xb40)][_0x2f0906(0x53e)][_0x2f0906(0x12d)]<=0x0)break;BattleManager[_0x2f0906(0xb40)]['_actions'][_0x2f0906(0x52e)]();}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x6a5),_0x53ad0f=>{const _0x2d8bb3=_0x5bdce9;if(!SceneManager[_0x2d8bb3(0x5ea)]())return;if(!Imported['VisuMZ_2_WeaponSwapSystem'])return;VisuMZ[_0x2d8bb3(0x866)](_0x53ad0f,_0x53ad0f);const _0x17190c=VisuMZ[_0x2d8bb3(0x1f5)](_0x53ad0f[_0x2d8bb3(0x637)]),_0x121ea7=_0x53ad0f[_0x2d8bb3(0x313)];for(const _0x5224a0 of _0x17190c){if(!_0x5224a0)continue;if(!_0x5224a0[_0x2d8bb3(0x491)]())continue;_0x5224a0[_0x2d8bb3(0xa51)](_0x121ea7);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x9e3),_0x121969=>{const _0x294b5d=_0x5bdce9;if(!SceneManager[_0x294b5d(0x5ea)]())return;VisuMZ[_0x294b5d(0x866)](_0x121969,_0x121969);const _0x29d758=VisuMZ[_0x294b5d(0x1f5)](_0x121969[_0x294b5d(0x637)]),_0x1c9235=_0x121969[_0x294b5d(0x995)],_0x5bb76d={'textColor':ColorManager[_0x294b5d(0x658)](_0x121969[_0x294b5d(0x428)]),'flashColor':_0x121969[_0x294b5d(0xace)],'flashDuration':_0x121969[_0x294b5d(0x7f2)]};for(const _0xb75f6c of _0x29d758){if('khWMP'!==_0x294b5d(0x43b)){let _0x516e2e=_0x1f47c9[_0x294b5d(0xa39)][_0x1e6059];if(!_0x516e2e)return;let _0x90c2ff=_0x516e2e;const _0x421cee=this[_0x294b5d(0x865)]();if(_0x421cee===_0x294b5d(0x160))_0x90c2ff=_0x90c2ff[_0x294b5d(0x3a7)](/\x1I\[(\d+)\]/gi,''),_0x90c2ff=_0x90c2ff[_0x294b5d(0x3a7)](/\\I\[(\d+)\]/gi,'');else{if(!_0x516e2e[_0x294b5d(0x16b)](/\\I\[(\d+)\]/i)){const _0x5d442a=_0x594dea[_0x294b5d(0x47a)]?_0x5d41c0[_0x294b5d(0x4e1)][_0x294b5d(0x76e)][_0x294b5d(0x494)]:_0x453718[_0x294b5d(0x61c)][_0x294b5d(0x76e)][_0x294b5d(0x59c)],_0x3252bb=_0x262c81[_0x294b5d(0x862)][_0x294b5d(0x8ed)](_0x39aa65),_0x64c8f4=_0x3252bb?_0x5d442a[_0x294b5d(0x770)]:_0x5d442a[_0x294b5d(0x341)];_0x90c2ff='\x5cI[%1]%2'[_0x294b5d(0x824)](_0x64c8f4,_0x516e2e);}}this[_0x294b5d(0x97b)](_0x90c2ff,_0x294b5d(0x895),!![],_0x4ddf06);}else{if(!_0xb75f6c)continue;_0xb75f6c[_0x294b5d(0xafa)](_0x1c9235,_0x5bb76d);}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x17d),_0x3a075d=>{const _0x2eb874=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;VisuMZ[_0x2eb874(0x866)](_0x3a075d,_0x3a075d);const _0x436d9f=VisuMZ['CreateActionSequenceTargets'](_0x3a075d[_0x2eb874(0x637)]);let _0x36b239=$gameVariables[_0x2eb874(0x9b5)](_0x3a075d[_0x2eb874(0x499)]);Imported['VisuMZ_0_CoreEngine']&&_0x3a075d[_0x2eb874(0x31d)]&&(_0x36b239=VisuMZ[_0x2eb874(0x57b)](_0x36b239));const _0x4a571c=String(_0x36b239),_0x4849ef={'textColor':ColorManager[_0x2eb874(0x658)](_0x3a075d['TextColor']),'flashColor':_0x3a075d['FlashColor'],'flashDuration':_0x3a075d[_0x2eb874(0x7f2)]};for(const _0x1ebba4 of _0x436d9f){if(!_0x1ebba4)continue;_0x1ebba4[_0x2eb874(0xafa)](_0x4a571c,_0x4849ef);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x3f2),_0x24f1c8=>{const _0x11474c=_0x5bdce9;if(!SceneManager[_0x11474c(0x5ea)]())return;const _0x414a7d=$gameTemp[_0x11474c(0xb48)]();if(!_0x414a7d)return;_0x414a7d[_0x11474c(0x73c)](_0x11474c(0x497));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Motion_ClearFreezeFrame',_0x1d9979=>{const _0x2e8a27=_0x5bdce9;if(!SceneManager[_0x2e8a27(0x5ea)]())return;VisuMZ[_0x2e8a27(0x866)](_0x1d9979,_0x1d9979);const _0x1343f0=VisuMZ[_0x2e8a27(0x1f5)](_0x1d9979['Targets']);for(const _0xc84d84 of _0x1343f0){if(!_0xc84d84)continue;_0xc84d84[_0x2e8a27(0x8f1)]();}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x2eb),_0x264af0=>{const _0x452307=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;VisuMZ[_0x452307(0x866)](_0x264af0,_0x264af0);const _0xfe4158=VisuMZ[_0x452307(0x1f5)](_0x264af0[_0x452307(0x637)]),_0x2246c6=_0x264af0['MotionType'][_0x452307(0x63a)]()[_0x452307(0x92d)]();let _0x5c5632=_0x264af0['ShowWeapon'];const _0x52a7ad=_0x264af0[_0x452307(0x27e)];!['attack',_0x452307(0x90c),_0x452307(0x81d),_0x452307(0xae1)][_0x452307(0x8ed)](_0x2246c6)&&(_0x5c5632=![]);for(const _0x5b68f6 of _0xfe4158){if(_0x452307(0x839)===_0x452307(0x5f0))this[_0x452307(0x867)]=0x0;else{if(!_0x5b68f6)continue;_0x5b68f6[_0x452307(0xb5b)](_0x2246c6,_0x5c5632,_0x52a7ad);}}}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x7e1),_0x641438=>{const _0x95a875=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;VisuMZ[_0x95a875(0x866)](_0x641438,_0x641438);const _0x25561c=VisuMZ[_0x95a875(0x1f5)](_0x641438[_0x95a875(0x637)]),_0x4a1b57=_0x641438[_0x95a875(0x9ea)][_0x95a875(0x63a)]()['trim'](),_0x48ac98=_0x641438[_0x95a875(0xa0a)];for(const _0x551f66 of _0x25561c){if(_0x95a875(0x47d)!==_0x95a875(0x5d6)){if(!_0x551f66)continue;if(_0x4a1b57['match'](/ATTACK[ ](\d+)/i))_0x95a875(0x538)!==_0x95a875(0x382)?_0x551f66[_0x95a875(0x99c)](Number(RegExp['$1'])):(_0x59a62c['BattleCore'][_0x95a875(0xac7)][_0x95a875(0x4b1)](this),_0x1ba6eb['onBattleStartOnceParallels']());else _0x4a1b57===_0x95a875(0x33d)?_0x551f66[_0x95a875(0x722)]():_0x551f66[_0x95a875(0x319)](_0x4a1b57);if(!_0x48ac98)_0x551f66['startWeaponAnimation'](0x0);else{if(_0x48ac98&&[_0x95a875(0x90c),'swing',_0x95a875(0x2e8)][_0x95a875(0x8ed)](_0x4a1b57)){}}}else{if(_0x5290a0[_0x95a875(0x438)](_0x562cf6))return!![];return![];}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x7e7),_0x11fc50=>{const _0xc21ef2=_0x5bdce9;if(!SceneManager[_0xc21ef2(0x5ea)]())return;VisuMZ[_0xc21ef2(0x866)](_0x11fc50,_0x11fc50);const _0xab34db=BattleManager[_0xc21ef2(0x5ae)];if(!_0xab34db)return;if(!_0xab34db[_0xc21ef2(0xa8a)]())return;const _0x351224=VisuMZ[_0xc21ef2(0x1f5)](_0x11fc50[_0xc21ef2(0x637)]);for(const _0x4bbc40 of _0x351224){if(_0xc21ef2(0x800)===_0xc21ef2(0x54b)){const _0x31686e=_0x273e6c['max'](this[_0xc21ef2(0x3c7)](),_0x5ac8ad[_0xc21ef2(0x8a0)]),_0x23bf08=_0x50886e['floor'](_0x31686e*0x1e),_0x15e837=this[_0xc21ef2(0x814)](_0x23bf08,_0x31686e),_0x30485d=_0x400ae1[_0xc21ef2(0x9e1)]/0x2,_0x21f49d=_0x15e837[_0xc21ef2(0x454)][_0xc21ef2(0x84f)](_0x30e69b+'\x20');_0x15e837[_0xc21ef2(0x454)][_0xc21ef2(0x9ac)]=_0x29fcef['getColor'](_0x1b6d19[_0xc21ef2(0x9ac)]),_0x15e837[_0xc21ef2(0x454)][_0xc21ef2(0x683)](_0x431d2f,_0x30485d,0x0,_0x23bf08-_0x30485d,_0x31686e,_0xc21ef2(0x4ed));const _0x13b987=_0x68cea[_0xc21ef2(0xb3f)]((_0x31686e-_0x51d77b['iconHeight'])/0x2),_0x32cb62=_0x23bf08/0x2-_0x2fd4c9[_0xc21ef2(0x9e1)]-_0x21f49d/0x2+_0x30485d/0x2,_0x4f9df0=_0x2eea14[_0xc21ef2(0x691)]('IconSet'),_0x116912=_0x1e180a[_0xc21ef2(0x9e1)],_0x22a10b=_0x1c5a76[_0xc21ef2(0x8a0)],_0x9ffde7=_0x5939fc%0x10*_0x116912,_0x11972b=_0x5da089['floor'](_0x23adb4/0x10)*_0x22a10b;_0x15e837['bitmap'][_0xc21ef2(0x7ed)](_0x4f9df0,_0x9ffde7,_0x11972b,_0x116912,_0x22a10b,_0x32cb62,_0x13b987),this[_0xc21ef2(0x4f2)]=_0x5ea4aa[_0xc21ef2(0x65f)]||[0x0,0x0,0x0,0x0],this['_flashColor']=_0x1894db[_0xc21ef2(0x87e)](this['_flashColor']),this[_0xc21ef2(0x88c)]=_0x3a810c[_0xc21ef2(0x43e)]||0x0,_0x15e837['dy']=0x0;}else{if(!_0x4bbc40)continue;_0x4bbc40[_0xc21ef2(0x23a)](_0xab34db);}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x3ff),_0x188ad3=>{const _0x10848c=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;VisuMZ[_0x10848c(0x866)](_0x188ad3,_0x188ad3);const _0x311512=VisuMZ[_0x10848c(0x1f5)](_0x188ad3[_0x10848c(0x637)]);for(const _0x20de90 of _0x311512){if(!_0x20de90)continue;if(!_0x20de90[_0x10848c(0xb0d)]())continue;_0x20de90[_0x10848c(0xb0d)]()['refreshMotion']();}}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x77e),_0x49a983=>{const _0x5a5b80=_0x5bdce9;if(!SceneManager[_0x5a5b80(0x5ea)]())return;VisuMZ[_0x5a5b80(0x866)](_0x49a983,_0x49a983);const _0x250a52=$gameTemp['getLastPluginCommandInterpreter'](),_0x54dab2=_0x49a983['MotionFrameWait']*Sprite_Battler[_0x5a5b80(0x2cf)];_0x250a52[_0x5a5b80(0x156)](_0x54dab2);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x667),_0x3fa5c1=>{const _0x465752=_0x5bdce9;if(!SceneManager[_0x465752(0x5ea)]())return;VisuMZ[_0x465752(0x866)](_0x3fa5c1,_0x3fa5c1);const _0x4baea4=$gameTemp[_0x465752(0xb48)](),_0x283efc=BattleManager['_action'];if(!_0x4baea4||!_0x283efc)return;if(!_0x283efc[_0x465752(0xa8a)]())return;const _0x377565=VisuMZ[_0x465752(0x1f5)](_0x3fa5c1[_0x465752(0x637)]);for(const _0x34e726 of _0x377565){if(!_0x34e726)continue;_0x34e726[_0x465752(0x187)](_0x283efc);}if(_0x3fa5c1['WaitForMovement'])_0x4baea4['setWaitMode']('battleMove');}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x8cc),_0x1dc603=>{const _0x39c751=_0x5bdce9;if(!SceneManager[_0x39c751(0x5ea)]())return;if(!$gameSystem[_0x39c751(0x68b)]())return;VisuMZ['ConvertParams'](_0x1dc603,_0x1dc603);const _0x3c9485=$gameTemp[_0x39c751(0xb48)](),_0x49df67=VisuMZ[_0x39c751(0x1f5)](_0x1dc603[_0x39c751(0x637)]),_0x498903=_0x1dc603[_0x39c751(0x961)],_0xdd2497=_0x1dc603[_0x39c751(0x6bf)],_0x2430d4=_0x1dc603[_0x39c751(0x37c)],_0x9a0d5b=_0x1dc603[_0x39c751(0x26c)],_0x12a708=_0x1dc603[_0x39c751(0x518)],_0xb02f83=_0x1dc603[_0x39c751(0x752)],_0x332ee8=_0x1dc603[_0x39c751(0x9ea)],_0x4cc0fe=_0x1dc603['WaitForMovement'];if(!_0x3c9485)return;for(const _0x58e77a of _0x49df67){if(!_0x58e77a)continue;let _0x2e1e60=_0xdd2497,_0x2b8533=_0x2430d4;if(_0x498903['match'](/horz/i))_0x2e1e60*=_0x58e77a[_0x39c751(0x491)]()?-0x1:0x1;if(_0x498903[_0x39c751(0x16b)](/vert/i))_0x2b8533*=_0x58e77a[_0x39c751(0x491)]()?-0x1:0x1;_0x58e77a[_0x39c751(0x967)](_0x2e1e60,_0x2b8533,_0x9a0d5b,_0x12a708,_0xb02f83),_0x58e77a[_0x39c751(0x319)](_0x332ee8);}if(_0x4cc0fe)_0x3c9485[_0x39c751(0x73c)](_0x39c751(0x286));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x89f),_0x2fee95=>{const _0x36c937=_0x5bdce9;if(!SceneManager[_0x36c937(0x5ea)]())return;if(!$gameSystem[_0x36c937(0x68b)]())return;VisuMZ[_0x36c937(0x866)](_0x2fee95,_0x2fee95);const _0x5d4567=$gameTemp['getLastPluginCommandInterpreter'](),_0x29124c=VisuMZ[_0x36c937(0x1f5)](_0x2fee95[_0x36c937(0x637)]),_0x513653=_0x2fee95[_0x36c937(0x23c)],_0x40a193=_0x2fee95[_0x36c937(0x39c)],_0x1e5168=_0x2fee95[_0x36c937(0x6b7)],_0x1c6063=_0x2fee95['OffsetY'],_0x358f36=_0x2fee95[_0x36c937(0x26c)],_0x78ece7=_0x2fee95[_0x36c937(0x518)],_0x5ad861=_0x2fee95[_0x36c937(0x752)],_0x30230b=_0x2fee95[_0x36c937(0x9ea)],_0x27a0de=_0x2fee95[_0x36c937(0x201)];if(!_0x5d4567)return;for(const _0x177055 of _0x29124c){if(_0x36c937(0x553)!==_0x36c937(0x553))this[_0x36c937(0xa9b)]=new _0xd1f2f9(),this[_0x36c937(0xa9b)][_0x36c937(0x887)]['x']=0.5,this[_0x36c937(0xa9b)][_0x36c937(0x887)]['y']=0.5,this['addChild'](this['_distortionSprite']);else{if(!_0x177055)continue;let _0x347501=_0x177055[_0x36c937(0xb0d)]()['_baseX'],_0x1595c1=_0x177055[_0x36c937(0xb0d)]()[_0x36c937(0x4c9)];if(_0x513653[_0x36c937(0x16b)](/home/i)){if('sVsWE'==='qwrCg')return _0x124c63[_0x36c937(0x61c)][_0x36c937(0x76e)][_0x36c937(0x40f)]['SkillItemStandardCols'];else _0x347501=_0x177055[_0x36c937(0xb0d)]()[_0x36c937(0x666)],_0x1595c1=_0x177055[_0x36c937(0xb0d)]()[_0x36c937(0x51a)];}else{if(_0x513653[_0x36c937(0x16b)](/center/i)){if(_0x36c937(0x119)===_0x36c937(0x7ca)){const _0x573d2e=_0x237dc4['battleMembers']()[_0xe3c1c4],_0x2b62a5=new _0xc26978();_0x2b62a5[_0x36c937(0x3f9)](_0x573d2e),_0x2b62a5[_0x36c937(0x23d)](_0x573d2e),_0x2b62a5[_0x36c937(0x367)](),this[_0x36c937(0xa4b)][_0x36c937(0x838)](_0x2b62a5),this[_0x36c937(0x98a)]['addChild'](_0x2b62a5);}else _0x347501=Graphics[_0x36c937(0x7fb)]/0x2,_0x1595c1=Graphics[_0x36c937(0x51f)]/0x2;}else _0x513653[_0x36c937(0x16b)](/point (\d+), (\d+)/i)&&(_0x347501=Number(RegExp['$1']),_0x1595c1=Number(RegExp['$2']));}if(_0x40a193[_0x36c937(0x16b)](/none/i))_0x347501+=_0x1e5168,_0x1595c1+=_0x1c6063;else{if(_0x40a193['match'](/horz/i)&&_0x40a193[_0x36c937(0x16b)](/vert/i))_0x36c937(0x6e7)!==_0x36c937(0x6e7)?this[_0x36c937(0xa53)](_0x1b3256,_0x2b8e8d,_0x7563dd):(_0x347501+=_0x177055['isActor']()?-_0x1e5168:_0x1e5168,_0x1595c1+=_0x177055[_0x36c937(0x491)]()?-_0x1c6063:_0x1c6063);else{if(_0x40a193[_0x36c937(0x16b)](/horz/i))_0x347501+=_0x177055[_0x36c937(0x491)]()?-_0x1e5168:_0x1e5168,_0x1595c1+=_0x1c6063;else _0x40a193[_0x36c937(0x16b)](/vert/i)&&(_0x347501+=_0x1e5168,_0x1595c1+=_0x177055[_0x36c937(0x491)]()?-_0x1c6063:_0x1c6063);}}_0x177055[_0x36c937(0x476)](_0x347501,_0x1595c1,_0x358f36,_0x78ece7,_0x5ad861,-0x1),_0x177055[_0x36c937(0x319)](_0x30230b);}}if(_0x27a0de)_0x5d4567[_0x36c937(0x73c)](_0x36c937(0x286));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x6f7),_0x8cb71e=>{const _0x1bd2d5=_0x5bdce9;if(!SceneManager[_0x1bd2d5(0x5ea)]())return;if(!$gameSystem['isSideView']())return;VisuMZ['ConvertParams'](_0x8cb71e,_0x8cb71e);const _0x80d7a2=$gameTemp[_0x1bd2d5(0xb48)](),_0x3f9cd7=VisuMZ[_0x1bd2d5(0x1f5)](_0x8cb71e[_0x1bd2d5(0x530)]),_0x381f5b=VisuMZ['CreateActionSequenceTargets'](_0x8cb71e[_0x1bd2d5(0x145)]),_0x233dd3=_0x8cb71e['TargetLocation'];let _0x4ac4d2=_0x8cb71e[_0x1bd2d5(0x621)];const _0x5b0af1=_0x8cb71e[_0x1bd2d5(0x39c)],_0x2c0fb9=_0x8cb71e[_0x1bd2d5(0x6b7)],_0x3224f3=_0x8cb71e[_0x1bd2d5(0x4b4)],_0x4b44f6=_0x8cb71e[_0x1bd2d5(0x26c)],_0x33fac5=_0x8cb71e[_0x1bd2d5(0x518)],_0x9928f9=_0x8cb71e[_0x1bd2d5(0x752)],_0x1e25c1=_0x8cb71e[_0x1bd2d5(0x9ea)],_0xb83eb7=_0x8cb71e['WaitForMovement'],_0x374bc5=Math['min'](..._0x381f5b[_0x1bd2d5(0x782)](_0x4d5485=>_0x4d5485[_0x1bd2d5(0xb0d)]()[_0x1bd2d5(0x8f0)]-_0x4d5485['battler']()[_0x1bd2d5(0x1af)]()/0x2)),_0x39607e=Math['max'](..._0x381f5b[_0x1bd2d5(0x782)](_0x1a0e85=>_0x1a0e85[_0x1bd2d5(0xb0d)]()['_baseX']+_0x1a0e85[_0x1bd2d5(0xb0d)]()[_0x1bd2d5(0x1af)]()/0x2)),_0x54a152=Math[_0x1bd2d5(0x339)](..._0x381f5b['map'](_0x319f99=>_0x319f99[_0x1bd2d5(0xb0d)]()[_0x1bd2d5(0x4c9)]-_0x319f99[_0x1bd2d5(0xb0d)]()['mainSpriteHeight']())),_0x43e3f4=Math[_0x1bd2d5(0xa5e)](..._0x381f5b['map'](_0xe6f012=>_0xe6f012[_0x1bd2d5(0xb0d)]()[_0x1bd2d5(0x4c9)])),_0x572281=_0x381f5b['filter'](_0x559f26=>_0x559f26[_0x1bd2d5(0x491)]())[_0x1bd2d5(0x12d)],_0x31ebf6=_0x381f5b[_0x1bd2d5(0xb85)](_0x4fd8c9=>_0x4fd8c9[_0x1bd2d5(0x203)]())[_0x1bd2d5(0x12d)];let _0x581c2b=0x0,_0x2aaf58=0x0;if(_0x233dd3['match'](/front/i))_0x1bd2d5(0xa1a)!==_0x1bd2d5(0x56e)?_0x581c2b=_0x572281>=_0x31ebf6?_0x374bc5:_0x39607e:(this[_0x1bd2d5(0x21f)]=new _0x59f8fc(),this['addChild'](this[_0x1bd2d5(0x21f)]));else{if(_0x233dd3[_0x1bd2d5(0x16b)](/middle/i)){if(_0x1bd2d5(0x5fa)!==_0x1bd2d5(0x6f4))_0x581c2b=(_0x374bc5+_0x39607e)/0x2,_0x4ac4d2=-0x1;else{if(this['isHidden']())return![];if(this['isAlive']()&&this['isAppeared']())return!![];if(this[_0x1bd2d5(0x203)]()&&this[_0x1bd2d5(0x3a3)]()){if(this['isDead']()&&this[_0x1bd2d5(0x4a0)]())return![];}else{if(this[_0x1bd2d5(0x9a3)]())return![];}return!![];}}else _0x233dd3['match'](/back/i)&&(_0x1bd2d5(0x7d5)!=='VgXtr'?(_0x26d559[_0x1bd2d5(0x61c)]['Window_BattleLog_pushBaseLine']['call'](this),this[_0x1bd2d5(0x670)]()):_0x581c2b=_0x572281>=_0x31ebf6?_0x39607e:_0x374bc5);}if(_0x233dd3['match'](/head/i)){if(_0x1bd2d5(0x2c7)===_0x1bd2d5(0xac4)){this[_0x1bd2d5(0x9bf)](_0x7eca);for(const _0x1e6c80 of _0x32db64[_0x1bd2d5(0x1c1)]){_0x1e6c80['endAnimation']&&_0x1e6c80[_0x1bd2d5(0xa0c)]();}_0x4b5414[_0x1bd2d5(0x7a3)]();}else _0x2aaf58=_0x54a152;}else{if(_0x233dd3[_0x1bd2d5(0x16b)](/center/i))_0x2aaf58=(_0x54a152+_0x43e3f4)/0x2;else _0x233dd3[_0x1bd2d5(0x16b)](/base/i)&&('CdVbo'!=='CdVbo'?this['drawTextEx'](_0x264b19,_0x462630['x']+_0x54fdb8[_0x1bd2d5(0x3b2)]-_0x87ee7d,_0x1869f7['y'],_0x38e663):_0x2aaf58=_0x43e3f4);}if(!_0x80d7a2)return;for(const _0xf3e936 of _0x3f9cd7){if('dmfBP'!=='dmfBP')_0x4eac50['wtypeId']=_0xedbfb6['getWtypeIdWithName'](_0x324a55['$1']);else{if(!_0xf3e936)continue;let _0x256493=_0x581c2b,_0x1b3712=_0x2aaf58;if(_0x5b0af1[_0x1bd2d5(0x16b)](/none/i)){if(_0x1bd2d5(0xf9)===_0x1bd2d5(0x715)){const _0x14f5ed=_0x41c0bb['format'](_0x55aa21[_0x1bd2d5(0x74e)](),_0x9c42d1['param'](_0x35bae2));this[_0x1bd2d5(0x838)](_0x1bd2d5(0x73f)),this['push'](_0x1bd2d5(0x6ea)),this[_0x1bd2d5(0x838)](_0x1bd2d5(0xa19),_0x14f5ed),this[_0x1bd2d5(0x838)](_0x1bd2d5(0x156));}else _0x256493+=_0x2c0fb9,_0x1b3712+=_0x3224f3;}else{if(_0x5b0af1['match'](/horz/i)&&_0x5b0af1['match'](/vert/i))_0x256493+=_0xf3e936['isActor']()?-_0x2c0fb9:_0x2c0fb9,_0x1b3712+=_0xf3e936[_0x1bd2d5(0x491)]()?-_0x3224f3:_0x3224f3;else{if(_0x5b0af1[_0x1bd2d5(0x16b)](/horz/i))_0x1bd2d5(0xa18)!==_0x1bd2d5(0x39e)?(_0x256493+=_0xf3e936[_0x1bd2d5(0x491)]()?-_0x2c0fb9:_0x2c0fb9,_0x1b3712+=_0x3224f3):_0x28aa4c=_0x3376f3;else _0x5b0af1[_0x1bd2d5(0x16b)](/vert/i)&&(_0x256493+=_0x2c0fb9,_0x1b3712+=_0xf3e936['isActor']()?-_0x3224f3:_0x3224f3);}}_0xf3e936[_0x1bd2d5(0x476)](_0x256493,_0x1b3712,_0x4b44f6,_0x33fac5,_0x9928f9,_0x4ac4d2),_0xf3e936[_0x1bd2d5(0x319)](_0x1e25c1);}}if(_0xb83eb7)_0x80d7a2[_0x1bd2d5(0x73c)](_0x1bd2d5(0x286));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x8ef),_0x5b2757=>{const _0x476d46=_0x5bdce9;if(!SceneManager[_0x476d46(0x5ea)]())return;if(!$gameSystem[_0x476d46(0x68b)]())return;VisuMZ['ConvertParams'](_0x5b2757,_0x5b2757);const _0x2333e8=VisuMZ[_0x476d46(0x1f5)](_0x5b2757[_0x476d46(0x637)]);let _0x17287d=_0x5b2757['Direction'][_0x476d46(0x16b)](/back/i);for(const _0x3801b6 of _0x2333e8){if(_0x476d46(0xa65)!=='GqQdQ'){if(!this[_0x476d46(0x976)][_0x476d46(0x3e7)]())return;const _0x3a3751=_0x20b110[_0x476d46(0x61c)][_0x476d46(0x76e)]['Damage'],_0x257c76=new _0x1162ee();_0x257c76[_0x476d46(0x388)]=_0x3a3751[_0x476d46(0x638)],this[_0x476d46(0x6fb)](_0x257c76),_0x257c76[_0x476d46(0x974)](_0x1f3368,_0x4d4c97,_0x5abdf3),this[_0x476d46(0x50b)](_0x257c76);}else{if(!_0x3801b6)continue;if(_0x5b2757[_0x476d46(0x631)][_0x476d46(0x16b)](/rand/i))_0x17287d=Math[_0x476d46(0xaf7)](0x2);_0x3801b6[_0x476d46(0x781)](!!_0x17287d);}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x385),_0x2b1434=>{const _0x337fd5=_0x5bdce9;if(!SceneManager[_0x337fd5(0x5ea)]())return;if(!$gameSystem[_0x337fd5(0x68b)]())return;VisuMZ[_0x337fd5(0x866)](_0x2b1434,_0x2b1434);const _0x2d7d1d=VisuMZ[_0x337fd5(0x1f5)](_0x2b1434[_0x337fd5(0x637)]);let _0x2e8191=_0x2b1434[_0x337fd5(0x257)];const _0x52983a=_0x2b1434[_0x337fd5(0x6b1)];for(const _0x53361c of _0x2d7d1d){if(!_0x53361c)continue;let _0x1d20cf=_0x53361c[_0x337fd5(0xb0d)]()[_0x337fd5(0x8f0)],_0x4622a1=_0x53361c[_0x337fd5(0xb0d)]()['_baseY'];if(_0x2e8191[_0x337fd5(0x16b)](/home/i)){if(_0x337fd5(0x50d)!==_0x337fd5(0x50d)){const _0x11875d=_0x26b2b8(_0x307cc3['$1']);return[_0x59d442[_0x337fd5(0xad6)](_0x11875d)];}else _0x1d20cf=_0x53361c[_0x337fd5(0xb0d)]()[_0x337fd5(0x666)],_0x4622a1=_0x53361c[_0x337fd5(0xb0d)]()['_homeY'];}else{if(_0x2e8191[_0x337fd5(0x16b)](/center/i)){if(_0x337fd5(0x3c0)===_0x337fd5(0x103))return _0x24bb80[_0x337fd5(0xed)]();else _0x1d20cf=Graphics[_0x337fd5(0x7fb)]/0x2,_0x4622a1=Graphics[_0x337fd5(0x51f)]/0x2;}else _0x2e8191['match'](/point (\d+), (\d+)/i)&&(_0x1d20cf=Number(RegExp['$1']),_0x4622a1=Number(RegExp['$2']));}_0x53361c[_0x337fd5(0xa7e)](Math['round'](_0x1d20cf),Math[_0x337fd5(0xb3f)](_0x4622a1),!!_0x52983a);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x93a),_0x423d25=>{const _0x27c44c=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!$gameSystem['isSideView']())return;VisuMZ[_0x27c44c(0x866)](_0x423d25,_0x423d25);const _0x1958f2=VisuMZ[_0x27c44c(0x1f5)](_0x423d25[_0x27c44c(0x530)]),_0x1a96d3=VisuMZ[_0x27c44c(0x1f5)](_0x423d25[_0x27c44c(0x145)]),_0x1fcb6a=_0x1a96d3[_0x27c44c(0x782)](_0x37af9a=>_0x37af9a&&_0x37af9a[_0x27c44c(0xb0d)]()?_0x37af9a[_0x27c44c(0xb0d)]()[_0x27c44c(0x8f0)]:0x0)/(_0x1a96d3['length']||0x1),_0x4848f7=_0x1a96d3['map'](_0x381155=>_0x381155&&_0x381155['battler']()?_0x381155[_0x27c44c(0xb0d)]()[_0x27c44c(0x4c9)]:0x0)/(_0x1a96d3[_0x27c44c(0x12d)]||0x1),_0x3321ea=_0x423d25['FaceAway'];for(const _0x1ca41b of _0x1958f2){if(_0x27c44c(0xa46)!=='bwUcv'){if(!_0x1ca41b)continue;_0x1ca41b[_0x27c44c(0xa7e)](Math[_0x27c44c(0xb3f)](_0x1fcb6a),Math[_0x27c44c(0xb3f)](_0x4848f7),!!_0x3321ea);}else this[_0x27c44c(0x375)]()?delete _0x53f5f8[_0x27c44c(0xab7)][_0x27c44c(0x5c1)]:_0x3f9839[_0x27c44c(0x456)](_0x27c44c(0x5c1),this['actorCommandCancelTPB'][_0x27c44c(0x124)](this));}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x470),_0x324ac9=>{const _0x1864ab=_0x5bdce9;if(!SceneManager[_0x1864ab(0x5ea)]())return;VisuMZ[_0x1864ab(0x866)](_0x324ac9,_0x324ac9);const _0x596a60=$gameTemp[_0x1864ab(0xb48)](),_0x576344=VisuMZ[_0x1864ab(0x1f5)](_0x324ac9['Targets']),_0x1d99ad=_0x324ac9[_0x1864ab(0x6ce)],_0x1c0879=_0x324ac9['Duration'],_0xe8cd35=_0x324ac9[_0x1864ab(0x752)],_0xf40073=_0x324ac9[_0x1864ab(0x848)];if(!_0x596a60)return;for(const _0x192ee6 of _0x576344){if(!_0x192ee6)continue;_0x192ee6[_0x1864ab(0xb56)](_0x1d99ad,_0x1c0879,_0xe8cd35);}if(_0xf40073)_0x596a60['setWaitMode'](_0x1864ab(0xa25));}),PluginManager['registerCommand'](pluginData['name'],'ActSeq_Movement_HomeReset',_0x676d5f=>{const _0x4a2820=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;VisuMZ['ConvertParams'](_0x676d5f,_0x676d5f);const _0x55c3f0=$gameTemp[_0x4a2820(0xb48)]();if(!_0x55c3f0)return;const _0x137791=VisuMZ[_0x4a2820(0x1f5)](_0x676d5f[_0x4a2820(0x637)]);for(const _0x231946 of _0x137791){if(!_0x231946)continue;_0x231946['performActionEndMembers']();}BattleManager[_0x4a2820(0xb40)]&&BattleManager[_0x4a2820(0xb40)][_0x4a2820(0x154)]();if(_0x676d5f[_0x4a2820(0x201)])_0x55c3f0['setWaitMode'](_0x4a2820(0x286));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0xab2),_0x2c64d5=>{const _0x5ca10e=_0x5bdce9;if(!SceneManager[_0x5ca10e(0x5ea)]())return;VisuMZ[_0x5ca10e(0x866)](_0x2c64d5,_0x2c64d5);const _0x4387d5=$gameTemp[_0x5ca10e(0xb48)](),_0x280106=VisuMZ['CreateActionSequenceTargets'](_0x2c64d5[_0x5ca10e(0x637)]),_0x1e0a53=_0x2c64d5[_0x5ca10e(0x6ce)],_0x28bf86=_0x2c64d5[_0x5ca10e(0x26c)],_0x5a9964=_0x2c64d5[_0x5ca10e(0x6d3)];if(!_0x4387d5)return;for(const _0x444259 of _0x280106){if(!_0x444259)continue;_0x444259[_0x5ca10e(0x4ba)](_0x1e0a53,_0x28bf86);}if(_0x5a9964)_0x4387d5[_0x5ca10e(0x73c)](_0x5ca10e(0xaf0));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],'ActSeq_Movement_MoveBy',_0x34fc54=>{const _0x1a2eea=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!$gameSystem[_0x1a2eea(0x68b)]())return;VisuMZ[_0x1a2eea(0x866)](_0x34fc54,_0x34fc54);const _0x34310a=$gameTemp[_0x1a2eea(0xb48)](),_0x5b4efc=VisuMZ[_0x1a2eea(0x1f5)](_0x34fc54[_0x1a2eea(0x637)]),_0x4df100=_0x34fc54[_0x1a2eea(0x961)],_0x647304=_0x34fc54['DistanceX'],_0x4d5115=_0x34fc54[_0x1a2eea(0x37c)],_0x1e8a8e=_0x34fc54[_0x1a2eea(0x26c)],_0x48cb65=_0x34fc54[_0x1a2eea(0x518)],_0x44b3eb=_0x34fc54[_0x1a2eea(0x752)],_0x5ead1f=_0x34fc54['MotionType'],_0x47a5e0=_0x34fc54[_0x1a2eea(0x201)];if(!_0x34310a)return;for(const _0x556f1e of _0x5b4efc){if(!_0x556f1e)continue;let _0x229fd1=_0x647304,_0x377fc2=_0x4d5115;if(_0x4df100[_0x1a2eea(0x16b)](/horz/i))_0x229fd1*=_0x556f1e['isActor']()?-0x1:0x1;if(_0x4df100[_0x1a2eea(0x16b)](/vert/i))_0x377fc2*=_0x556f1e[_0x1a2eea(0x491)]()?-0x1:0x1;_0x556f1e[_0x1a2eea(0x8a2)](_0x229fd1,_0x377fc2,_0x1e8a8e,_0x48cb65,_0x44b3eb),_0x556f1e['requestMotion'](_0x5ead1f);}if(_0x47a5e0)_0x34310a['setWaitMode'](_0x1a2eea(0x286));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],'ActSeq_Movement_MoveToPoint',_0x137710=>{const _0x16c19d=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!$gameSystem['isSideView']())return;VisuMZ[_0x16c19d(0x866)](_0x137710,_0x137710);const _0x155d2e=$gameTemp[_0x16c19d(0xb48)](),_0x58138b=VisuMZ[_0x16c19d(0x1f5)](_0x137710['Targets']),_0x58fcf3=_0x137710[_0x16c19d(0x23c)],_0x27c31c=_0x137710[_0x16c19d(0x39c)],_0x31c042=_0x137710['OffsetX'],_0x1d84c2=_0x137710[_0x16c19d(0x4b4)],_0x1d2fc4=_0x137710[_0x16c19d(0x26c)],_0x33a6a5=_0x137710['FaceDirection'],_0x163575=_0x137710[_0x16c19d(0x752)],_0x5596ed=_0x137710[_0x16c19d(0x9ea)],_0x1e37dc=_0x137710['WaitForMovement'];if(!_0x155d2e)return;for(const _0x53f5ed of _0x58138b){if(!_0x53f5ed)continue;let _0x3a4698=_0x53f5ed[_0x16c19d(0xb0d)]()[_0x16c19d(0x8f0)],_0x47179a=_0x53f5ed[_0x16c19d(0xb0d)]()[_0x16c19d(0x4c9)];if(_0x58fcf3['match'](/home/i)){if(_0x16c19d(0x527)!==_0x16c19d(0x527)){const _0x2dfa50=_0x31ae54[_0x16c19d(0xad6)]();if(_0x2dfa50&&_0x2dfa50['battler'])_0x2dfa50['battler']()[_0x16c19d(0x2d4)]();_0x1d54ff[_0x16c19d(0x61c)][_0x16c19d(0x62d)]['call'](this);}else _0x3a4698=_0x53f5ed[_0x16c19d(0xb0d)]()[_0x16c19d(0x666)],_0x47179a=_0x53f5ed[_0x16c19d(0xb0d)]()['_homeY'];}else{if(_0x58fcf3[_0x16c19d(0x16b)](/center/i))_0x3a4698=Graphics['boxWidth']/0x2,_0x47179a=Graphics[_0x16c19d(0x51f)]/0x2;else _0x58fcf3[_0x16c19d(0x16b)](/point (\d+), (\d+)/i)&&(_0x3a4698=Number(RegExp['$1']),_0x47179a=Number(RegExp['$2']));}if(_0x27c31c[_0x16c19d(0x16b)](/none/i))_0x3a4698+=_0x31c042,_0x47179a+=_0x1d84c2;else{if(_0x27c31c['match'](/horz/i)&&_0x27c31c[_0x16c19d(0x16b)](/vert/i))_0x3a4698+=_0x53f5ed[_0x16c19d(0x491)]()?-_0x31c042:_0x31c042,_0x47179a+=_0x53f5ed[_0x16c19d(0x491)]()?-_0x1d84c2:_0x1d84c2;else{if(_0x27c31c[_0x16c19d(0x16b)](/horz/i))_0x3a4698+=_0x53f5ed[_0x16c19d(0x491)]()?-_0x31c042:_0x31c042,_0x47179a+=_0x1d84c2;else _0x27c31c[_0x16c19d(0x16b)](/vert/i)&&(_0x3a4698+=_0x31c042,_0x47179a+=_0x53f5ed['isActor']()?-_0x1d84c2:_0x1d84c2);}}_0x53f5ed[_0x16c19d(0xa3e)](_0x3a4698,_0x47179a,_0x1d2fc4,_0x33a6a5,_0x163575,-0x1),_0x53f5ed['requestMotion'](_0x5596ed);}if(_0x1e37dc)_0x155d2e['setWaitMode'](_0x16c19d(0x286));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],'ActSeq_Movement_MoveToTarget',_0x431b76=>{const _0x31ae1a=_0x5bdce9;if(!SceneManager[_0x31ae1a(0x5ea)]())return;if(!$gameSystem[_0x31ae1a(0x68b)]())return;VisuMZ[_0x31ae1a(0x866)](_0x431b76,_0x431b76);const _0x28449b=$gameTemp[_0x31ae1a(0xb48)](),_0xd43d14=VisuMZ[_0x31ae1a(0x1f5)](_0x431b76[_0x31ae1a(0x530)]),_0x5df44b=VisuMZ['CreateActionSequenceTargets'](_0x431b76[_0x31ae1a(0x145)]),_0x1a2165=_0x431b76[_0x31ae1a(0x909)];let _0x5ac496=_0x431b76[_0x31ae1a(0x621)];const _0x4358cc=_0x431b76[_0x31ae1a(0x39c)],_0x195229=_0x431b76[_0x31ae1a(0x6b7)],_0x204809=_0x431b76[_0x31ae1a(0x4b4)],_0x5bf490=_0x431b76[_0x31ae1a(0x26c)],_0x541a07=_0x431b76[_0x31ae1a(0x518)],_0x147ec5=_0x431b76[_0x31ae1a(0x752)],_0x552e9f=_0x431b76['MotionType'],_0x54dba9=_0x431b76['WaitForMovement'],_0x4be5f1=Math[_0x31ae1a(0x339)](..._0x5df44b['map'](_0xaf2cb2=>_0xaf2cb2[_0x31ae1a(0xb0d)]()[_0x31ae1a(0x8f0)]-_0xaf2cb2['battler']()['mainSpriteWidth']()/0x2)),_0x50fca0=Math[_0x31ae1a(0xa5e)](..._0x5df44b[_0x31ae1a(0x782)](_0x4a1d9b=>_0x4a1d9b[_0x31ae1a(0xb0d)]()[_0x31ae1a(0x8f0)]+_0x4a1d9b[_0x31ae1a(0xb0d)]()[_0x31ae1a(0x1af)]()/0x2)),_0x184bab=Math['min'](..._0x5df44b[_0x31ae1a(0x782)](_0x24178a=>_0x24178a[_0x31ae1a(0xb0d)]()[_0x31ae1a(0x4c9)]-_0x24178a[_0x31ae1a(0xb0d)]()[_0x31ae1a(0x1a1)]())),_0x595097=Math[_0x31ae1a(0xa5e)](..._0x5df44b['map'](_0x16ad8d=>_0x16ad8d[_0x31ae1a(0xb0d)]()['_baseY'])),_0xe57109=_0x5df44b[_0x31ae1a(0xb85)](_0x21fb11=>_0x21fb11[_0x31ae1a(0x491)]())[_0x31ae1a(0x12d)],_0x5912a9=_0x5df44b['filter'](_0x4acb8e=>_0x4acb8e[_0x31ae1a(0x203)]())[_0x31ae1a(0x12d)];let _0x11a723=0x0,_0x2c8dce=0x0;if(_0x1a2165[_0x31ae1a(0x16b)](/front/i))_0x31ae1a(0x883)!==_0x31ae1a(0x883)?(this['_activeWeaponSlot']=_0x5cefd0,this['_cache']={}):_0x11a723=_0xe57109>=_0x5912a9?_0x4be5f1:_0x50fca0;else{if(_0x1a2165[_0x31ae1a(0x16b)](/middle/i))_0x31ae1a(0x3c5)==='tjDQF'?_0x160b88[_0x31ae1a(0x335)](_0x31ae1a(0x80f)):(_0x11a723=(_0x4be5f1+_0x50fca0)/0x2,_0x5ac496=-0x1);else _0x1a2165[_0x31ae1a(0x16b)](/back/i)&&('aJPtW'==='LgqSw'?(this['_text']=this['enemy']()[_0x31ae1a(0x74e)](),this['refresh']()):_0x11a723=_0xe57109>=_0x5912a9?_0x50fca0:_0x4be5f1);}if(_0x1a2165[_0x31ae1a(0x16b)](/head/i)){if('aFCjJ'===_0x31ae1a(0x38e))return _0x2f6047['isActor']()?_0x2e0192['weapons']()[_0x31ae1a(0x12d)]||0x1:0x1;else _0x2c8dce=_0x184bab;}else{if(_0x1a2165['match'](/center/i))_0x31ae1a(0x430)!=='iyDKl'?_0x59dc55=_0x15ecfa>=_0x40dbdd?_0x1b86c6:_0x2479e6:_0x2c8dce=(_0x184bab+_0x595097)/0x2;else _0x1a2165[_0x31ae1a(0x16b)](/base/i)&&('gMwcE'!==_0x31ae1a(0xb52)?this['selectNextActor']():_0x2c8dce=_0x595097);}if(!_0x28449b)return;for(const _0x4aab9a of _0xd43d14){if(!_0x4aab9a)continue;let _0x1c25c9=_0x11a723,_0x1dd7c0=_0x2c8dce;if(_0x4358cc[_0x31ae1a(0x16b)](/none/i))'EdFlt'===_0x31ae1a(0x420)?(_0x1c25c9+=_0x195229,_0x1dd7c0+=_0x204809):this['requestMotion'](_0x31ae1a(0xe9));else{if(_0x4358cc['match'](/horz/i)&&_0x4358cc['match'](/vert/i))_0x1c25c9+=_0x4aab9a[_0x31ae1a(0x491)]()?-_0x195229:_0x195229,_0x1dd7c0+=_0x4aab9a[_0x31ae1a(0x491)]()?-_0x204809:_0x204809;else{if(_0x4358cc['match'](/horz/i))_0x1c25c9+=_0x4aab9a[_0x31ae1a(0x491)]()?-_0x195229:_0x195229,_0x1dd7c0+=_0x204809;else _0x4358cc['match'](/vert/i)&&(_0x1c25c9+=_0x195229,_0x1dd7c0+=_0x4aab9a[_0x31ae1a(0x491)]()?-_0x204809:_0x204809);}}_0x4aab9a[_0x31ae1a(0xa3e)](_0x1c25c9,_0x1dd7c0,_0x5bf490,_0x541a07,_0x147ec5,_0x5ac496),_0x4aab9a[_0x31ae1a(0x319)](_0x552e9f);}if(_0x54dba9)_0x28449b[_0x31ae1a(0x73c)](_0x31ae1a(0x286));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x69b),_0x29efc6=>{const _0x371469=_0x5bdce9;if(!SceneManager[_0x371469(0x5ea)]())return;VisuMZ[_0x371469(0x866)](_0x29efc6,_0x29efc6);const _0x8a719c=$gameTemp[_0x371469(0xb48)](),_0x4251a2=VisuMZ[_0x371469(0x1f5)](_0x29efc6[_0x371469(0x637)]),_0x42bb8a=_0x29efc6[_0x371469(0x170)],_0x2c7280=_0x29efc6[_0x371469(0x26c)],_0x404eff=_0x29efc6[_0x371469(0x752)],_0x2aa58e=_0x29efc6[_0x371469(0x2a3)];if(!_0x8a719c)return;for(const _0x3ff29c of _0x4251a2){if(!_0x3ff29c)continue;_0x3ff29c[_0x371469(0x7ea)](_0x42bb8a,_0x2c7280,_0x404eff);}if(_0x2aa58e)_0x8a719c[_0x371469(0x73c)](_0x371469(0x72c));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],'ActSeq_Movement_Scale',_0x2e977c=>{const _0xaec324=_0x5bdce9;if(!SceneManager[_0xaec324(0x5ea)]())return;VisuMZ['ConvertParams'](_0x2e977c,_0x2e977c);const _0x589e41=$gameTemp[_0xaec324(0xb48)](),_0xaf7709=VisuMZ['CreateActionSequenceTargets'](_0x2e977c['Targets']),_0x9b7c20=_0x2e977c[_0xaec324(0x876)],_0x8850c6=_0x2e977c['ScaleY'],_0x2e228a=_0x2e977c['Duration'],_0x731a61=_0x2e977c['EasingType'],_0x4cc94b=_0x2e977c['WaitForScale'];if(!_0x589e41)return;for(const _0x3db517 of _0xaf7709){if(_0xaec324(0x7db)===_0xaec324(0x7db)){if(!_0x3db517)continue;_0x3db517[_0xaec324(0x547)](_0x9b7c20,_0x8850c6,_0x2e228a,_0x731a61);}else _0x2e787d['BattleCore'][_0xaec324(0x7ff)]['call'](this);}if(_0x4cc94b)_0x589e41[_0xaec324(0x73c)](_0xaec324(0x751));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x8dd),_0x26920c=>{const _0x51cdf0=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;VisuMZ['ConvertParams'](_0x26920c,_0x26920c);const _0x5ea0e7=$gameTemp[_0x51cdf0(0xb48)](),_0x558952=VisuMZ[_0x51cdf0(0x1f5)](_0x26920c[_0x51cdf0(0x637)]),_0x49d700=_0x26920c['SkewX'],_0xecf558=_0x26920c['SkewY'],_0x40a838=_0x26920c['Duration'],_0x465ad1=_0x26920c[_0x51cdf0(0x752)],_0x306a37=_0x26920c[_0x51cdf0(0x7a2)];if(!_0x5ea0e7)return;for(const _0x4261ee of _0x558952){if(_0x51cdf0(0x16c)===_0x51cdf0(0x285))return _0x5e3e03=_0x27e56d[_0x51cdf0(0x61c)][_0x51cdf0(0x76e)][_0x51cdf0(0x40d)][_0x51cdf0(0x8c1)][_0x51cdf0(0x4b1)](this,_0x20a12d),_0x2ccb09=this[_0x51cdf0(0x167)][_0x51cdf0(0x96b)]*_0x411600+this[_0x51cdf0(0x167)][_0x51cdf0(0x2f0)],_0x1cfa6d;else{if(!_0x4261ee)continue;_0x4261ee[_0x51cdf0(0x6f2)](_0x49d700,_0xecf558,_0x40a838,_0x465ad1);}}if(_0x306a37)_0x5ea0e7[_0x51cdf0(0x73c)]('battleSpriteSkew');}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],'ActSeq_Movement_Spin',_0x564b25=>{const _0x213887=_0x5bdce9;if(!SceneManager[_0x213887(0x5ea)]())return;VisuMZ[_0x213887(0x866)](_0x564b25,_0x564b25);const _0x4399e1=$gameTemp[_0x213887(0xb48)](),_0x5a88d5=VisuMZ[_0x213887(0x1f5)](_0x564b25[_0x213887(0x637)]),_0x43aa4c=_0x564b25[_0x213887(0x47c)],_0x5b980f=_0x564b25[_0x213887(0x26c)],_0x2fe804=_0x564b25[_0x213887(0x752)],_0x494a08=_0x564b25[_0x213887(0x87d)],_0x1529e7=_0x564b25[_0x213887(0x789)];if(!_0x4399e1)return;for(const _0x287d3c of _0x5a88d5){if(!_0x287d3c)continue;_0x287d3c[_0x213887(0x353)](_0x43aa4c,_0x5b980f,_0x2fe804,_0x494a08);}if(_0x1529e7)_0x4399e1[_0x213887(0x73c)](_0x213887(0x4fa));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Movement_WaitForFloat',_0xef9ce6=>{const _0x1f3b75=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;const _0x3a692f=$gameTemp[_0x1f3b75(0xb48)]();if(!_0x3a692f)return;_0x3a692f[_0x1f3b75(0x73c)](_0x1f3b75(0xa25));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x62a),_0x1eee39=>{const _0x4dd480=_0x5bdce9;if(!SceneManager[_0x4dd480(0x5ea)]())return;const _0x1a2f82=$gameTemp[_0x4dd480(0xb48)]();if(!_0x1a2f82)return;_0x1a2f82[_0x4dd480(0x73c)](_0x4dd480(0xaf0));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x41e),_0x5e871a=>{const _0x259a21=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;const _0x24b237=$gameTemp[_0x259a21(0xb48)]();if(!_0x24b237)return;_0x24b237[_0x259a21(0x73c)]('battleMove');}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x4a7),_0x3f3b3f=>{const _0x3cd9af=_0x5bdce9;if(!SceneManager[_0x3cd9af(0x5ea)]())return;const _0x27ac17=$gameTemp[_0x3cd9af(0xb48)]();if(!_0x27ac17)return;_0x27ac17[_0x3cd9af(0x73c)]('battleOpacity');}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x802),_0x142954=>{const _0x29de9a=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;const _0x4a8334=$gameTemp[_0x29de9a(0xb48)]();if(!_0x4a8334)return;_0x4a8334[_0x29de9a(0x73c)](_0x29de9a(0x751));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Movement_WaitForSkew',_0x380dd3=>{const _0x4cc254=_0x5bdce9;if(!SceneManager[_0x4cc254(0x5ea)]())return;const _0x2c1e10=$gameTemp[_0x4cc254(0xb48)]();if(!_0x2c1e10)return;_0x2c1e10[_0x4cc254(0x73c)](_0x4cc254(0x2ce));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x361),_0x23d24f=>{const _0x1ea53a=_0x5bdce9;if(!SceneManager[_0x1ea53a(0x5ea)]())return;const _0x4322e4=$gameTemp['getLastPluginCommandInterpreter']();if(!_0x4322e4)return;_0x4322e4[_0x1ea53a(0x73c)](_0x1ea53a(0x4fa));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x174),_0x5901a0=>{const _0x287dae=_0x5bdce9;if(!SceneManager[_0x287dae(0x5ea)]())return;if(!Imported[_0x287dae(0x684)])return;VisuMZ[_0x287dae(0x866)](_0x5901a0,_0x5901a0);const _0x3b7796=$gameTemp[_0x287dae(0xb48)](),_0x3c85a5=_0x5901a0['WaitForProjectile'];if(!_0x3b7796)return;const _0x1d382c=BattleManager[_0x287dae(0x25a)];if(!_0x1d382c)return;_0x1d382c[_0x287dae(0x3f6)](_0x5901a0);if(_0x3c85a5)_0x3b7796['setWaitMode'](_0x287dae(0xd1));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Projectile_Icon',_0x1a49c8=>{const _0x1adafa=_0x5bdce9;if(!SceneManager[_0x1adafa(0x5ea)]())return;if(!Imported[_0x1adafa(0x684)])return;VisuMZ[_0x1adafa(0x866)](_0x1a49c8,_0x1a49c8);const _0x35cbe6=$gameTemp[_0x1adafa(0xb48)](),_0x38c501=_0x1a49c8[_0x1adafa(0x404)];if(!_0x35cbe6)return;const _0x237a23=BattleManager[_0x1adafa(0x25a)];if(!_0x237a23)return;_0x237a23[_0x1adafa(0x3f6)](_0x1a49c8);if(_0x38c501)_0x35cbe6['setWaitMode'](_0x1adafa(0xd1));}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x676),_0x51fba1=>{const _0x335b5d=_0x5bdce9;if(!SceneManager[_0x335b5d(0x5ea)]())return;if(!Imported['VisuMZ_3_ActSeqProjectiles'])return;VisuMZ['ConvertParams'](_0x51fba1,_0x51fba1);const _0x5af847=$gameTemp['getLastPluginCommandInterpreter'](),_0x348582=_0x51fba1['WaitForProjectile'];if(!_0x5af847)return;const _0x453e5b=BattleManager[_0x335b5d(0x25a)];if(!_0x453e5b)return;_0x453e5b['createActionSequenceProjectile'](_0x51fba1);if(_0x348582)_0x5af847[_0x335b5d(0x73c)](_0x335b5d(0xd1));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x69f),_0x4d5fd3=>{const _0x530147=_0x5bdce9;if(!SceneManager[_0x530147(0x5ea)]())return;if(!Imported['VisuMZ_3_ActSeqCamera'])return;VisuMZ[_0x530147(0x866)](_0x4d5fd3,_0x4d5fd3);const _0x7ebe3f=$gameTemp[_0x530147(0xb48)](),_0x2db8da=_0x4d5fd3[_0x530147(0x7a2)];if(!_0x7ebe3f)return;$gameScreen['setBattleSkew'](_0x4d5fd3[_0x530147(0x208)],_0x4d5fd3[_0x530147(0x7e4)],_0x4d5fd3[_0x530147(0x26c)],_0x4d5fd3[_0x530147(0x752)]);if(_0x2db8da)_0x7ebe3f[_0x530147(0x73c)]('battleSkew');}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Skew_Reset',_0x1f5c36=>{const _0x648733=_0x5bdce9;if(!SceneManager[_0x648733(0x5ea)]())return;if(!Imported['VisuMZ_3_ActSeqCamera'])return;VisuMZ[_0x648733(0x866)](_0x1f5c36,_0x1f5c36);const _0xf2d9d2=$gameTemp[_0x648733(0xb48)](),_0x37f1e1=_0x1f5c36['WaitForSkew'];if(!_0xf2d9d2)return;$gameScreen['setBattleSkew'](0x0,0x0,_0x1f5c36[_0x648733(0x26c)],_0x1f5c36[_0x648733(0x752)]);if(_0x37f1e1)_0xf2d9d2['setWaitMode'](_0x648733(0x693));}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x43c),_0xa25bf5=>{const _0x78b19e=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x78b19e(0x27b)])return;const _0x201ab5=$gameTemp[_0x78b19e(0xb48)]();if(!_0x201ab5)return;_0x201ab5[_0x78b19e(0x73c)]('battleSkew');}),PluginManager['registerCommand'](pluginData['name'],_0x5bdce9(0xb8a),_0x352f60=>{const _0xded86b=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;VisuMZ[_0xded86b(0x866)](_0x352f60,_0x352f60);const _0x57ce35=$gameTemp[_0xded86b(0xb48)](),_0x456fa7=_0x352f60[_0xded86b(0x6ae)],_0x297ccc=_0x352f60[_0xded86b(0x369)];if(!_0x57ce35)return;BattleManager[_0xded86b(0x34d)]=_0x456fa7,BattleManager[_0xded86b(0xaa8)]=BattleManager[_0xded86b(0x8be)]?BattleManager[_0xded86b(0x8be)][BattleManager[_0xded86b(0x34d)]]||null:null,BattleManager[_0xded86b(0xaa8)]&&_0x297ccc[_0xded86b(0x673)]()[_0xded86b(0x92d)]()!=='UNTITLED'&&_0x57ce35[_0xded86b(0x29b)]([_0x297ccc]);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Target_NextTarget',_0x5b2434=>{const _0x3b01e7=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;VisuMZ[_0x3b01e7(0x866)](_0x5b2434,_0x5b2434);const _0x3e653c=$gameTemp[_0x3b01e7(0xb48)](),_0x9c6b33=_0x5b2434[_0x3b01e7(0x369)];if(!_0x3e653c)return;BattleManager['_targetIndex']++,BattleManager['_target']=BattleManager[_0x3b01e7(0x8be)][BattleManager[_0x3b01e7(0x34d)]]||null;if(BattleManager[_0x3b01e7(0xaa8)]&&_0x9c6b33[_0x3b01e7(0x673)]()[_0x3b01e7(0x92d)]()!==_0x3b01e7(0xae4)){if(_0x3b01e7(0x440)===_0x3b01e7(0x440))_0x3e653c[_0x3b01e7(0x29b)]([_0x9c6b33]);else{if(this[_0x3b01e7(0xb29)]>0x0)this[_0x3b01e7(0xb29)]-=0x10;}}}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Target_PrevTarget',_0x4f1933=>{const _0x1ccc3c=_0x5bdce9;if(!SceneManager[_0x1ccc3c(0x5ea)]())return;VisuMZ[_0x1ccc3c(0x866)](_0x4f1933,_0x4f1933);const _0x340a38=$gameTemp['getLastPluginCommandInterpreter'](),_0x40d8a7=_0x4f1933[_0x1ccc3c(0x369)];if(!_0x340a38)return;BattleManager[_0x1ccc3c(0x34d)]--,BattleManager[_0x1ccc3c(0xaa8)]=BattleManager[_0x1ccc3c(0x8be)][BattleManager[_0x1ccc3c(0x34d)]]||null,BattleManager[_0x1ccc3c(0xaa8)]&&_0x40d8a7[_0x1ccc3c(0x673)]()[_0x1ccc3c(0x92d)]()!==_0x1ccc3c(0xae4)&&_0x340a38['command119']([_0x40d8a7]);}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x50e),_0x331a93=>{const _0x55310e=_0x5bdce9;if(!SceneManager[_0x55310e(0x5ea)]())return;VisuMZ[_0x55310e(0x866)](_0x331a93,_0x331a93);const _0xaa5397=$gameTemp[_0x55310e(0xb48)](),_0x510767=_0x331a93[_0x55310e(0xad2)],_0x62f127=_0x331a93[_0x55310e(0x369)];if(!_0xaa5397)return;const _0x19c77f=BattleManager[_0x55310e(0x34d)];for(;;){BattleManager[_0x55310e(0x34d)]=Math[_0x55310e(0xaf7)](BattleManager[_0x55310e(0x8be)]['length']);if(!_0x510767)break;if(BattleManager[_0x55310e(0x34d)]!==_0x19c77f)break;if(BattleManager[_0x55310e(0x8be)][_0x55310e(0x12d)]<=0x1){BattleManager[_0x55310e(0x34d)]=0x0;break;}}BattleManager['_target']=BattleManager[_0x55310e(0x8be)][BattleManager[_0x55310e(0x34d)]]||null,BattleManager[_0x55310e(0xaa8)]&&_0x62f127[_0x55310e(0x673)]()[_0x55310e(0x92d)]()!==_0x55310e(0xae4)&&_0xaa5397[_0x55310e(0x29b)]([_0x62f127]);}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x56c),_0x1fee0e=>{const _0x1d03f1=_0x5bdce9;if(!SceneManager[_0x1d03f1(0x5ea)]())return;VisuMZ[_0x1d03f1(0x866)](_0x1fee0e,_0x1fee0e);const _0x5d9cbd=VisuMZ[_0x1d03f1(0x1f5)](_0x1fee0e[_0x1d03f1(0x637)]);for(const _0x3c4ea4 of _0x5d9cbd){if(!_0x3c4ea4)continue;if(!_0x3c4ea4[_0x1d03f1(0x491)]())continue;_0x3c4ea4['clearActiveWeaponSlot']();}}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],'ActSeq_Weapon_NextActiveWeapon',_0x429da0=>{const _0x8f6b9e=_0x5bdce9;if(!SceneManager[_0x8f6b9e(0x5ea)]())return;VisuMZ['ConvertParams'](_0x429da0,_0x429da0);const _0x32b426=$gameTemp[_0x8f6b9e(0xb48)]();let _0x43aca4=![];const _0x361c8a=_0x429da0[_0x8f6b9e(0x369)],_0x3bd4a5=VisuMZ[_0x8f6b9e(0x1f5)](_0x429da0[_0x8f6b9e(0x637)]);for(const _0x2652a5 of _0x3bd4a5){if(!_0x2652a5)continue;if(!_0x2652a5[_0x8f6b9e(0x491)]())continue;_0x2652a5[_0x8f6b9e(0x62e)](),_0x2652a5['weapons']()['length']>0x0?_0x43aca4=!![]:_0x2652a5[_0x8f6b9e(0x44a)]();}if(_0x43aca4&&_0x361c8a['toUpperCase']()[_0x8f6b9e(0x92d)]()!=='UNTITLED'){if('UPFnb'===_0x8f6b9e(0x79d)){const _0x373b0c=_0x369c8b[_0x8f6b9e(0x664)];if(_0x373b0c[_0x8f6b9e(0x16b)](/<SIDEVIEW SHADOW (?:SCALE|SCALE Y):[ ](\d+)([%%])>/i))return _0x5631b2(_0xe584fb['$1'])*0.01;else{if(_0x373b0c['match'](/<SIDEVIEW SHADOW (?:SCALE|SCALE Y):[ ](.*)>/i))return _0x2c2774(_0x386ed7['$1'])||0x0;}}else _0x32b426[_0x8f6b9e(0x29b)]([_0x361c8a]);}}),PluginManager['registerCommand'](pluginData[_0x5bdce9(0x74e)],'ActSeq_Weapon_SetActiveWeapon',_0x45d5e1=>{const _0x20ae31=_0x5bdce9;if(!SceneManager[_0x20ae31(0x5ea)]())return;VisuMZ[_0x20ae31(0x866)](_0x45d5e1,_0x45d5e1);let _0xc86656=_0x45d5e1['SlotID'];_0xc86656--,_0xc86656=Math[_0x20ae31(0xa5e)](_0xc86656,0x0);const _0x11c7cd=VisuMZ['CreateActionSequenceTargets'](_0x45d5e1[_0x20ae31(0x637)]);for(const _0xeac71c of _0x11c7cd){if(!_0xeac71c)continue;if(!_0xeac71c[_0x20ae31(0x491)]())continue;_0xeac71c[_0x20ae31(0x894)](_0xc86656);}}),PluginManager[_0x5bdce9(0x1b1)](pluginData['name'],_0x5bdce9(0x805),_0x314817=>{const _0x568ff9=_0x5bdce9;if(!SceneManager[_0x568ff9(0x5ea)]())return;if(!Imported[_0x568ff9(0x27b)])return;VisuMZ[_0x568ff9(0x866)](_0x314817,_0x314817);const _0x470d74=$gameTemp[_0x568ff9(0xb48)](),_0x32c535=_0x314817['WaitForZoom'];if(!_0x470d74)return;$gameScreen[_0x568ff9(0xb89)](_0x314817[_0x568ff9(0x736)],_0x314817[_0x568ff9(0x26c)],_0x314817[_0x568ff9(0x752)]);if(_0x32c535)_0x470d74[_0x568ff9(0x73c)](_0x568ff9(0xa68));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],'ActSeq_Zoom_Reset',_0x4c4471=>{const _0x173473=_0x5bdce9;if(!SceneManager[_0x173473(0x5ea)]())return;if(!Imported[_0x173473(0x27b)])return;VisuMZ['ConvertParams'](_0x4c4471,_0x4c4471);const _0x6b2c39=$gameTemp['getLastPluginCommandInterpreter'](),_0x34a965=_0x4c4471[_0x173473(0x146)];if(!_0x6b2c39)return;$gameScreen['setBattleZoom'](0x1,_0x4c4471[_0x173473(0x26c)],_0x4c4471[_0x173473(0x752)]);if(_0x34a965)_0x6b2c39['setWaitMode'](_0x173473(0xa68));}),PluginManager[_0x5bdce9(0x1b1)](pluginData[_0x5bdce9(0x74e)],_0x5bdce9(0x69c),_0x43cf43=>{const _0x4b2993=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;if(!Imported[_0x4b2993(0x27b)])return;const _0x421973=$gameTemp[_0x4b2993(0xb48)]();if(!_0x421973)return;_0x421973[_0x4b2993(0x73c)]('battleZoom');}),VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x129)]=Scene_Boot['prototype'][_0x5bdce9(0x60b)],Scene_Boot[_0x5bdce9(0x768)]['onDatabaseLoaded']=function(){const _0x5e6ced=_0x5bdce9;this['process_VisuMZ_BattleCore_Failsafes'](),this['process_VisuMZ_BattleCore_PluginParams'](),this['process_VisuMZ_BattleCore_DamageStyles'](),this['process_VisuMZ_BattleCore_CreateRegExp'](),VisuMZ[_0x5e6ced(0x61c)][_0x5e6ced(0x129)][_0x5e6ced(0x4b1)](this),this[_0x5e6ced(0x2f1)](),this[_0x5e6ced(0x8f4)](),this[_0x5e6ced(0x794)](),this['process_VisuMZ_BattleCore_CommonEventKeys']();},Scene_Boot['prototype'][_0x5bdce9(0x2f1)]=function(){const _0x37960e=_0x5bdce9;if(VisuMZ['ParseAllNotetags'])return;this['process_VisuMZ_BattleCore_Action_Notetags'](),this[_0x37960e(0x843)](),this[_0x37960e(0x13b)]();},Scene_Boot[_0x5bdce9(0x768)][_0x5bdce9(0xaac)]=function(){const _0x28438a=_0x5bdce9,_0x1c06c3=$dataSystem[_0x28438a(0x6a9)][_0x28438a(0x12d)];for(let _0x40cc7f=0x0;_0x40cc7f<_0x1c06c3;_0x40cc7f++){const _0x47c271=$dataSystem[_0x28438a(0x300)][_0x40cc7f];if(_0x47c271)continue;$dataSystem[_0x28438a(0x300)][_0x40cc7f]=JsonEx['makeDeepCopy']($dataSystem[_0x28438a(0x300)][0x0]);}},Scene_Boot['prototype'][_0x5bdce9(0x123)]=function(){const _0x4b3b6d=_0x5bdce9,_0x1f6e8b=VisuMZ[_0x4b3b6d(0x61c)][_0x4b3b6d(0x76e)];_0x1f6e8b[_0x4b3b6d(0x40d)][_0x4b3b6d(0x36f)]===undefined&&(_0x1f6e8b[_0x4b3b6d(0x40d)][_0x4b3b6d(0x36f)]='base'),_0x1f6e8b['Actor'][_0x4b3b6d(0x338)]===undefined&&('wsfpQ'!=='uZcoN'?_0x1f6e8b['Actor'][_0x4b3b6d(0x338)]=![]:_0x5bfcba[_0x4b3b6d(0x454)]=_0x4e97b7[_0x4b3b6d(0x9a5)]),_0x1f6e8b[_0x4b3b6d(0x14a)][_0x4b3b6d(0x338)]===undefined&&(_0x4b3b6d(0x6fd)===_0x4b3b6d(0x6fd)?_0x1f6e8b[_0x4b3b6d(0x14a)][_0x4b3b6d(0x338)]=!![]:(_0x74c876['prototype'][_0x4b3b6d(0x367)]['call'](this),this[_0x4b3b6d(0x9d0)](),this[_0x4b3b6d(0x2ab)]())),_0x1f6e8b[_0x4b3b6d(0xe6)][_0x4b3b6d(0x9df)]===undefined&&(_0x4b3b6d(0x19f)===_0x4b3b6d(0x19f)?_0x1f6e8b['Actor'][_0x4b3b6d(0x9df)]=![]:(this['unshift']('actionSplicePoint'),_0x599b76[_0x4b3b6d(0x8cd)](_0x51d919,_0x3dd9a1),this[_0x4b3b6d(0x670)]())),_0x1f6e8b[_0x4b3b6d(0xe6)][_0x4b3b6d(0x305)]===undefined&&(_0x1f6e8b['Actor'][_0x4b3b6d(0x305)]=!![]);},VisuMZ[_0x5bdce9(0xb78)]={},Scene_Boot['prototype'][_0x5bdce9(0x9f8)]=function(){const _0x48f35f=_0x5bdce9;for(const _0x137f9f of VisuMZ[_0x48f35f(0x61c)][_0x48f35f(0x76e)][_0x48f35f(0x40d)][_0x48f35f(0x68a)]){if(!_0x137f9f)continue;const _0x463c7c=_0x137f9f[_0x48f35f(0x9b6)]['toUpperCase']()['trim']();VisuMZ[_0x48f35f(0xb78)][_0x463c7c]=_0x137f9f;}},VisuMZ['BattleCore'][_0x5bdce9(0x3a1)]={},Scene_Boot[_0x5bdce9(0x768)][_0x5bdce9(0xa52)]=function(){const _0x5644f7=_0x5bdce9,_0x38cb52=VisuMZ[_0x5644f7(0x61c)][_0x5644f7(0x3a1)],_0x497e7a=_0x5644f7(0x611),_0x26151b=[[_0x5644f7(0x7f4),_0x5644f7(0x6e2)],[_0x5644f7(0x9c9),'POST-']],_0x489988=[[_0x5644f7(0xd5),'JS\x20%1APPLY\x20%2'],[_0x5644f7(0x531),'JS\x20%1DAMAGE\x20%2']],_0x456911=[['',''],['AsUser','AS\x20USER'],[_0x5644f7(0x53b),_0x5644f7(0x23b)]];for(const _0x38ec55 of _0x489988){if(_0x5644f7(0x57c)!==_0x5644f7(0x57c))_0x2a99b9[_0x5644f7(0x894)](_0x4c6c59);else for(const _0x159336 of _0x456911){for(const _0x1d8b93 of _0x26151b){if(_0x5644f7(0xb0a)===_0x5644f7(0xb0a)){const _0x2324fa=_0x38ec55[0x0][_0x5644f7(0x824)](_0x1d8b93[0x0],_0x159336[0x0]),_0x34368c=_0x38ec55[0x1][_0x5644f7(0x824)](_0x1d8b93[0x1],_0x159336[0x1])['trim'](),_0x2c3f73=new RegExp(_0x497e7a[_0x5644f7(0x824)](_0x34368c),'i');_0x38cb52[_0x2324fa]=_0x2c3f73;}else{const _0xa0d5a2=this['_actor'][_0x5644f7(0xa39)](),_0x18e90a=_0xa0d5a2[_0x5644f7(0xb85)](_0x21f10a=>_0x235734['getSkillTypes'](_0x2e3fa3)[_0x5644f7(0x8ed)](_0x21f10a));return _0x18e90a[_0x5644f7(0x12d)]<=0x0;}}}}const _0x63ef6a=[[_0x5644f7(0x216),_0x5644f7(0x9c1)],[_0x5644f7(0x9ab),_0x5644f7(0x31a)]];for(const _0x241005 of _0x63ef6a){if(_0x5644f7(0x1b7)!==_0x5644f7(0x690))for(const _0x227a6c of _0x26151b){const _0x235c94=_0x241005[0x0][_0x5644f7(0x824)](_0x227a6c[0x0]),_0x1eb525=_0x241005[0x1][_0x5644f7(0x824)](_0x227a6c[0x1]),_0x504b92=new RegExp(_0x497e7a[_0x5644f7(0x824)](_0x1eb525),'i');_0x38cb52[_0x235c94]=_0x504b92;}else{const _0x4beed1=_0x50e348(_0x1cc29f['$1']);return[_0x3328aa[_0x5644f7(0x2b7)]()[_0x4beed1]];}}const _0x2189da=[[_0x5644f7(0x109),_0x5644f7(0x61e)],[_0x5644f7(0x49f),_0x5644f7(0xb80)],[_0x5644f7(0x973),'JS\x20BATTLE\x20VICTORY'],['BattleDefeatJS','JS\x20BATTLE\x20DEFEAT'],[_0x5644f7(0xa1b),_0x5644f7(0x13e)],[_0x5644f7(0x662),_0x5644f7(0x7a4)],[_0x5644f7(0x54e),_0x5644f7(0x20a)],[_0x5644f7(0x669),_0x5644f7(0x8d6)],[_0x5644f7(0xa22),_0x5644f7(0x38d)]];for(const _0xaff79e of _0x2189da){if(_0x5644f7(0x435)!==_0x5644f7(0x435)){const _0x1d980a=_0x38e90e(_0x2ff962['$1'])[_0x5644f7(0x761)](/[\r\n]+/)['remove'](''),_0x136a2c=this[_0x5644f7(0x169)](_0x1d980a);_0x132dc8=this['getEnemyIdWithName'](_0x136a2c)||_0x2433e3,_0x27e0cb=_0x10e9aa[_0x5644f7(0xaee)](_0x59a9b1);}else for(const _0x264903 of _0x26151b){if(_0x5644f7(0x10e)===_0x5644f7(0x53d))this[_0x5644f7(0x475)](this[_0x5644f7(0x66b)]);else{const _0x3643ce=_0xaff79e[0x0][_0x5644f7(0x824)](_0x264903[0x0]),_0x1c534f=_0xaff79e[0x1][_0x5644f7(0x824)](_0x264903[0x1]),_0x967433=new RegExp(_0x497e7a[_0x5644f7(0x824)](_0x1c534f),'i');_0x38cb52[_0x3643ce]=_0x967433;}}}},Scene_Boot[_0x5bdce9(0x768)][_0x5bdce9(0x34e)]=function(){const _0x10e552=_0x5bdce9,_0x2ea727=$dataSkills['concat']($dataItems);for(const _0x150e85 of _0x2ea727){if(_0x10e552(0xfe)!=='uiXzx'){if(!_0x150e85)continue;VisuMZ[_0x10e552(0x61c)][_0x10e552(0x601)](_0x150e85);}else this[_0x10e552(0x9dd)](_0x10e552(0xb81)),_0x4ed51a['BattleCore'][_0x10e552(0x224)][_0x10e552(0x4b1)](this),this['processBattleCoreJS']('PostEndTurnJS');}},Scene_Boot[_0x5bdce9(0x768)][_0x5bdce9(0x843)]=function(){const _0x4abe98=_0x5bdce9,_0x9e22a1=$dataActors[_0x4abe98(0x331)]($dataClasses,$dataWeapons,$dataArmors,$dataEnemies,$dataStates);for(const _0x33412e of _0x9e22a1){if('QmuUx'!=='QmuUx')this[_0x4abe98(0xb6a)]=this['_onceParallelInterpreters']||[],this['_onceParallelInterpreters'][_0x4abe98(0x838)](_0x1de201);else{if(!_0x33412e)continue;VisuMZ['BattleCore']['Parse_Notetags_TraitObjects'](_0x33412e);}}},Scene_Boot['prototype'][_0x5bdce9(0x8f4)]=function(){const _0x2c37cc=_0x5bdce9,_0x487643=VisuMZ[_0x2c37cc(0x61c)][_0x2c37cc(0x76e)][_0x2c37cc(0x817)][_0x2c37cc(0x327)],_0x340e80=[];for(const _0xde60bf of _0x487643){const _0xf59a88=$dataTroops[_0xde60bf];if(_0xf59a88)_0x340e80[_0x2c37cc(0x838)](JsonEx[_0x2c37cc(0x87e)](_0xf59a88));}for(const _0x399b6a of $dataTroops){if(_0x2c37cc(0xd9)!=='EqsUQ'){if(!_0x399b6a)continue;for(const _0x1104cd of _0x340e80){if(_0x1104cd['id']===_0x399b6a['id'])continue;_0x399b6a['pages']=_0x399b6a[_0x2c37cc(0x4b9)][_0x2c37cc(0x331)](_0x1104cd['pages']);}}else{this[_0x2c37cc(0x9e0)]=!![];const _0x50ea9c=this[_0x2c37cc(0x8ce)]();for(let _0x3bd75a=0x0;_0x3bd75a<_0x50ea9c[_0x2c37cc(0x12d)];_0x3bd75a++){_0x50ea9c[_0x3bd75a]===0x1&&this['_activeWeaponSlot']!==_0x3bd75a&&(_0xf3c204[_0x3bd75a]=null);}this[_0x2c37cc(0x9e0)]=_0x56e239;}}},Scene_Boot[_0x5bdce9(0x768)][_0x5bdce9(0x794)]=function(){const _0x3ab5ca=_0x5bdce9,_0x4750d8=VisuMZ[_0x3ab5ca(0x61c)][_0x3ab5ca(0x76e)]['Mechanics'];if(_0x4750d8[_0x3ab5ca(0x1ac)]>0x0&&$dataCommonEvents[_0x4750d8[_0x3ab5ca(0x1ac)]]){if(_0x3ab5ca(0x389)===_0x3ab5ca(0x389)){const _0x2fbd4d=$dataCommonEvents[_0x4750d8[_0x3ab5ca(0x1ac)]],_0x9c7731=_0x2fbd4d[_0x3ab5ca(0x3cd)][_0x3ab5ca(0x12d)]-0x2,_0x22c4a5=_0x2fbd4d[_0x3ab5ca(0x3cd)][_0x9c7731];if(_0x22c4a5&&_0x22c4a5[_0x3ab5ca(0xabe)]!==0xe6){const _0x139820={'code':0xe6,'indent':0x0,'parameters':[0x1]},_0x3e59a2=_0x2fbd4d[_0x3ab5ca(0x3cd)][_0x3ab5ca(0xa49)]();_0x2fbd4d[_0x3ab5ca(0x3cd)]['unshift'](_0x139820),_0x2fbd4d[_0x3ab5ca(0x3cd)][_0x3ab5ca(0x1d2)](_0x3e59a2);}}else this[_0x3ab5ca(0x214)](),this[_0x3ab5ca(0x9dd)](_0x3ab5ca(0x8a8));}},Scene_Boot[_0x5bdce9(0x768)]['process_VisuMZ_BattleCore_CommonEventKeys']=function(){const _0x5baa67=_0x5bdce9;VisuMZ[_0x5baa67(0x61c)]['CreateCommonEventKeys'](),VisuMZ[_0x5baa67(0x61c)][_0x5baa67(0x7fa)]($dataSkills),VisuMZ[_0x5baa67(0x61c)][_0x5baa67(0x7fa)]($dataItems);},VisuMZ[_0x5bdce9(0x61c)]['CreateCommonEventKeys']=function(){const _0x3bab18=_0x5bdce9;VisuMZ[_0x3bab18(0x61c)][_0x3bab18(0x85b)]={};for(const _0x7a340b of $dataCommonEvents){if(!_0x7a340b)continue;if(_0x7a340b[_0x3bab18(0x74e)][_0x3bab18(0x16b)](/\[(.*)\]/i)){if(_0x3bab18(0xb16)!==_0x3bab18(0x87c)){let _0xadee77=String(RegExp['$1'])[_0x3bab18(0x3a7)](/,/g,'')['toUpperCase']()['trim']();VisuMZ[_0x3bab18(0x61c)][_0x3bab18(0x85b)][_0xadee77]=_0x7a340b['id'];}else{if(_0x5cc3c4===_0x3bb1f8[_0x3bab18(0xad6)]())return![];}}}},VisuMZ['BattleCore']['BindCommonEventKeysForGroup']=function(_0x550d3e){for(const _0x843061 of _0x550d3e){if(!_0x843061)continue;VisuMZ['BattleCore']['BindCommonEventKeysForObj'](_0x843061);}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x180)]=function(_0x2cc4eb){const _0x51a6ed=_0x5bdce9;if(!_0x2cc4eb)return;if(!_0x2cc4eb['effects'])return;VisuMZ[_0x51a6ed(0x61c)][_0x51a6ed(0x85b)]=VisuMZ[_0x51a6ed(0x61c)][_0x51a6ed(0x85b)]||{};const _0x43bc44=/<COMMON EVENT (?:KEY|KEYS):[ ](.*)>/gi,_0x3a32bf=/<COMMON EVENT (?:KEY|KEYS)>\s*([\s\S]*)\s*<\/COMMON EVENT (?:KEY|KEYS)>/i;let _0xd66d45=[];const _0x1c41a9=_0x2cc4eb[_0x51a6ed(0x664)][_0x51a6ed(0x16b)](_0x43bc44);if(_0x1c41a9){if(_0x51a6ed(0x2e4)===_0x51a6ed(0xac9))!_0x5d94ed[_0x51a6ed(0x61c)][_0x51a6ed(0x76e)][_0x51a6ed(0x2c4)]['ShowMissEvasion']?this[_0x51a6ed(0x838)]('performMiss',_0x138171):_0x5b46cd[_0x51a6ed(0x61c)]['Window_BattleLog_displayMiss'][_0x51a6ed(0x4b1)](this,_0x4fe559);else{for(const _0x344029 of _0x1c41a9){_0x344029[_0x51a6ed(0x16b)](_0x43bc44);const _0xad5e65=String(RegExp['$1'])[_0x51a6ed(0x761)](',')[_0x51a6ed(0x782)](_0x449f7e=>String(_0x449f7e)[_0x51a6ed(0x673)]()[_0x51a6ed(0x92d)]());_0xd66d45=_0xd66d45[_0x51a6ed(0x331)](_0xad5e65);}!_0x2cc4eb[_0x51a6ed(0x664)][_0x51a6ed(0x16b)](/<CUSTOM ACTION SEQUENCE>/i)&&(_0x2cc4eb[_0x51a6ed(0x664)]+='<CUSTOM\x20ACTION\x20SEQUENCE>');;}}if(_0x2cc4eb['note'][_0x51a6ed(0x16b)](_0x3a32bf)){if(_0x51a6ed(0x4c4)!=='qVXbw')_0x4bfbd4[_0x51a6ed(0x61c)]['ParseStateNotetags']&&_0x35b086[_0x51a6ed(0x61c)][_0x51a6ed(0x3ae)][_0x51a6ed(0x4b1)](this,_0x505ff1),_0x226609[_0x51a6ed(0x61c)][_0x51a6ed(0x57e)](_0x2f3e01);else{const _0x1d2783=String(RegExp['$1'])[_0x51a6ed(0x761)](/[\r\n]+/)[_0x51a6ed(0x782)](_0x238c6e=>String(_0x238c6e)['toUpperCase']()[_0x51a6ed(0x92d)]());_0xd66d45=_0xd66d45['concat'](_0x1d2783);!_0x2cc4eb['note'][_0x51a6ed(0x16b)](/<CUSTOM ACTION SEQUENCE>/i)&&(_0x2cc4eb[_0x51a6ed(0x664)]+=_0x51a6ed(0xb38));;}}for(const _0x35bcd2 of _0xd66d45){if(_0x51a6ed(0x190)===_0x51a6ed(0x806))this[_0x51a6ed(0xb69)]();else{if(VisuMZ['BattleCore'][_0x51a6ed(0x85b)][_0x35bcd2]){const _0xf474ba=VisuMZ[_0x51a6ed(0x61c)]['_commonEventKey'][_0x35bcd2],_0x484576={'code':0x2c,'dataId':_0xf474ba,'value1':0x1,'value2':0x0};_0x2cc4eb[_0x51a6ed(0xa4a)][_0x51a6ed(0x838)](_0x484576);}}}},Scene_Boot[_0x5bdce9(0x768)]['process_VisuMZ_BattleCore_jsFunctions']=function(){const _0x521bae=_0x5bdce9,_0x5890b9=$dataSkills[_0x521bae(0x331)]($dataItems);for(const _0x23843f of _0x5890b9){if(_0x521bae(0x14d)===_0x521bae(0x506)){_0x43478d=_0x559060||0x1,_0x5e97ef--;const _0x162468=this[_0x521bae(0xabf)](),_0x26e41d=_0x162468[_0x3868ca]?_0x162468[_0x4cee66][_0x521bae(0xa36)]:0x0;return _0x3016db['attackMotions'][_0x26e41d];}else{if(!_0x23843f)continue;VisuMZ['BattleCore']['Parse_Notetags_Targets'](_0x23843f);}}},VisuMZ['BattleCore'][_0x5bdce9(0x853)]=VisuMZ[_0x5bdce9(0x853)],VisuMZ['ParseActorNotetags']=function(_0x4ff86e){const _0x2408b3=_0x5bdce9;VisuMZ[_0x2408b3(0x61c)][_0x2408b3(0x853)]&&VisuMZ[_0x2408b3(0x61c)][_0x2408b3(0x853)][_0x2408b3(0x4b1)](this,_0x4ff86e),VisuMZ[_0x2408b3(0x61c)][_0x2408b3(0x57e)](_0x4ff86e);},VisuMZ[_0x5bdce9(0x61c)]['ParseClassNotetags']=VisuMZ['ParseClassNotetags'],VisuMZ[_0x5bdce9(0x85e)]=function(_0x5e253a){const _0x442710=_0x5bdce9;VisuMZ[_0x442710(0x61c)][_0x442710(0x85e)]&&VisuMZ[_0x442710(0x61c)]['ParseClassNotetags']['call'](this,_0x5e253a),VisuMZ['BattleCore']['Parse_Notetags_TraitObjects'](_0x5e253a);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x323)]=VisuMZ['ParseSkillNotetags'],VisuMZ[_0x5bdce9(0x323)]=function(_0x44ad88){const _0x1c3f7e=_0x5bdce9;VisuMZ[_0x1c3f7e(0x61c)][_0x1c3f7e(0x323)]&&VisuMZ[_0x1c3f7e(0x61c)][_0x1c3f7e(0x323)][_0x1c3f7e(0x4b1)](this,_0x44ad88),VisuMZ['BattleCore'][_0x1c3f7e(0x601)](_0x44ad88),VisuMZ[_0x1c3f7e(0x61c)][_0x1c3f7e(0xa80)](_0x44ad88);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x2e1)]=VisuMZ[_0x5bdce9(0x2e1)],VisuMZ[_0x5bdce9(0x2e1)]=function(_0x545abe){const _0x2b8a16=_0x5bdce9;if(VisuMZ['BattleCore']['ParseItemNotetags']){if(_0x2b8a16(0x4a8)===_0x2b8a16(0x184)){if(this[_0x2b8a16(0x1a9)]<=0x0)return;if(!this[_0x2b8a16(0xa9b)])return;const _0x27e96d=this[_0x2b8a16(0x1a9)],_0x5d2a41=this[_0x2b8a16(0x7e3)],_0x115e50=this[_0x2b8a16(0xa01)],_0x2c620f=this[_0x2b8a16(0xa9b)];_0x4eb043[_0x2b8a16(0x9f2)]?(_0x2c620f['skew']['x']=this['applyEasing'](_0x2c620f['skew']['x'],this[_0x2b8a16(0x35e)],_0x27e96d,_0x5d2a41,_0x115e50),_0x2c620f['skew']['y']=this[_0x2b8a16(0x99a)](_0x2c620f['skew']['y'],this['_targetSkewY'],_0x27e96d,_0x5d2a41,_0x115e50)):(_0x2c620f[_0x2b8a16(0x696)]['x']=(_0x2c620f[_0x2b8a16(0x696)]['x']*(_0x27e96d-0x1)+this[_0x2b8a16(0x35e)])/_0x27e96d,_0x2c620f[_0x2b8a16(0x696)]['y']=(_0x2c620f[_0x2b8a16(0x696)]['y']*(_0x27e96d-0x1)+this['_targetSkewY'])/_0x27e96d);this[_0x2b8a16(0x1a9)]--;if(this[_0x2b8a16(0x1a9)]<=0x0)this[_0x2b8a16(0xa62)]();}else VisuMZ[_0x2b8a16(0x61c)][_0x2b8a16(0x2e1)][_0x2b8a16(0x4b1)](this,_0x545abe);}VisuMZ[_0x2b8a16(0x61c)][_0x2b8a16(0x601)](_0x545abe),VisuMZ['BattleCore']['Parse_Notetags_Targets'](_0x545abe);},VisuMZ[_0x5bdce9(0x61c)]['ParseWeaponNotetags']=VisuMZ[_0x5bdce9(0xa0b)],VisuMZ['ParseWeaponNotetags']=function(_0x2d0758){const _0x443b=_0x5bdce9;if(VisuMZ[_0x443b(0x61c)][_0x443b(0xa0b)]){if('kRhUI'!==_0x443b(0xa81))return this[_0x443b(0x3d8)]>0x0;else VisuMZ[_0x443b(0x61c)][_0x443b(0xa0b)][_0x443b(0x4b1)](this,_0x2d0758);}VisuMZ['BattleCore'][_0x443b(0x57e)](_0x2d0758);},VisuMZ['BattleCore'][_0x5bdce9(0xb36)]=VisuMZ[_0x5bdce9(0xb36)],VisuMZ[_0x5bdce9(0xb36)]=function(_0x9bdff3){const _0x335324=_0x5bdce9;if(VisuMZ[_0x335324(0x61c)]['ParseArmorNotetags']){if(_0x335324(0x619)!=='qbbYH'){_0x4f72d6[_0x335324(0x9f2)]&&this[_0x335324(0x271)]()&&this[_0x335324(0x47e)]();const _0x5635be=_0x48c637[_0x335324(0x2b7)](),_0x4e1ede=[];for(const _0x24b5f4 of _0x5635be){_0x4e1ede[_0x335324(0x838)](new _0x2e497(_0x24b5f4));}_0x4e1ede[_0x335324(0xadb)](this['compareEnemySprite']['bind'](this));for(const _0x3bfcc5 of _0x4e1ede){this[_0x335324(0x98a)][_0x335324(0xa8d)](_0x3bfcc5);}this['_enemySprites']=_0x4e1ede;}else VisuMZ[_0x335324(0x61c)][_0x335324(0xb36)]['call'](this,_0x9bdff3);}VisuMZ['BattleCore'][_0x335324(0x57e)](_0x9bdff3);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xb86)]=VisuMZ[_0x5bdce9(0xb86)],VisuMZ[_0x5bdce9(0xb86)]=function(_0x18c894){const _0x546ea8=_0x5bdce9;if(VisuMZ[_0x546ea8(0x61c)][_0x546ea8(0xb86)]){if(_0x546ea8(0x6c7)!=='qOlqe')VisuMZ[_0x546ea8(0x61c)][_0x546ea8(0xb86)][_0x546ea8(0x4b1)](this,_0x18c894);else return this[_0x546ea8(0x43f)][_0x546ea8(0xa49)]();}VisuMZ['BattleCore'][_0x546ea8(0x57e)](_0x18c894);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x3ae)]=VisuMZ[_0x5bdce9(0x3ae)],VisuMZ['ParseStateNotetags']=function(_0x211f2a){const _0x145c1d=_0x5bdce9;VisuMZ['BattleCore'][_0x145c1d(0x3ae)]&&VisuMZ[_0x145c1d(0x61c)]['ParseStateNotetags'][_0x145c1d(0x4b1)](this,_0x211f2a),VisuMZ[_0x145c1d(0x61c)]['Parse_Notetags_TraitObjects'](_0x211f2a);},VisuMZ['BattleCore']['Parse_Notetags_Action']=function(_0x3bddff){const _0x29026c=_0x5bdce9,_0x183626=[_0x29026c(0x386),_0x29026c(0x552),_0x29026c(0x412),'PostDamageJS',_0x29026c(0xb15),_0x29026c(0x80f),'PreEndActionJS','PostEndActionJS'];for(const _0x543a30 of _0x183626){VisuMZ[_0x29026c(0x61c)][_0x29026c(0x240)](_0x3bddff,_0x543a30);}const _0x5730af=_0x3bddff[_0x29026c(0x664)];if(_0x5730af[_0x29026c(0x16b)](/<ALWAYS CRITICAL/i)){if('ztghs'===_0x29026c(0x897)){const _0x208da4=_0x2eaa21[_0x29026c(0x61c)]['Settings'][_0x29026c(0x817)];_0x4cb05a!==_0x29026c(0x2d9)&&_0x208da4[_0x29026c(0x355)]&&_0x58be39[_0x29026c(0x61c)][_0x29026c(0x144)](_0x208da4[_0x29026c(0x355)])&&_0x493dd0[_0x29026c(0x32e)](_0x208da4[_0x29026c(0x355)]);const _0x3a6947=_0x29026c(0x307)[_0x29026c(0x824)](_0x104c67);_0x208da4[_0x3a6947]&&_0x4d00ba[_0x29026c(0x61c)][_0x29026c(0x144)](_0x208da4[_0x3a6947])&&_0x3c6b35[_0x29026c(0x32e)](_0x208da4[_0x3a6947]);}else _0x3bddff['damage'][_0x29026c(0x580)]=!![];}_0x5730af['match'](/<(?:REPEAT|REPEATS|REPEAT HITS):[ ](\d+)/i)&&(_0x3bddff[_0x29026c(0x1f8)]=Math[_0x29026c(0xa5e)](0x1,Number(RegExp['$1']))),_0x5730af[_0x29026c(0x16b)](/<TARGET:[ ](.*)>/i)&&(_0x29026c(0x3e8)===_0x29026c(0x766)?(_0x5149ab['_scene'][_0x29026c(0x25a)][_0x29026c(0x582)](),_0x2399a2[_0x29026c(0x73c)](_0x29026c(0x9bc))):_0x3bddff[_0x29026c(0xa9f)]=String(RegExp['$1'])[_0x29026c(0x673)]()[_0x29026c(0x92d)]());},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x57e)]=function(_0x429e5e){const _0x2ef787=_0x5bdce9,_0x34c8d0=[_0x2ef787(0x2f2),'PostApplyAsUserJS',_0x2ef787(0x366),_0x2ef787(0x5eb),_0x2ef787(0x3e3),_0x2ef787(0x1fa),_0x2ef787(0x39a),_0x2ef787(0xb5e),'PreStartActionJS',_0x2ef787(0x80f),_0x2ef787(0x791),_0x2ef787(0x773),'PreStartBattleJS',_0x2ef787(0x4f7),_0x2ef787(0x5b4),_0x2ef787(0x56b),_0x2ef787(0x973),_0x2ef787(0x9ef),_0x2ef787(0xa1b),_0x2ef787(0x662),_0x2ef787(0x5d3),_0x2ef787(0x17c),'PreEndTurnJS',_0x2ef787(0x7b9),_0x2ef787(0x68f),_0x2ef787(0x8a8)];for(const _0x58aa75 of _0x34c8d0){_0x2ef787(0x603)===_0x2ef787(0xb34)?this[_0x2ef787(0x198)](_0x45567a,'tp',_0x17c35e+0x88*0x2+(_0x55dea5[_0x2ef787(0x7d2)]||0x0),_0x35a2a2+(_0x585989[_0x2ef787(0x10c)]||0x0)):VisuMZ[_0x2ef787(0x61c)][_0x2ef787(0x240)](_0x429e5e,_0x58aa75);}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xa80)]=function(_0x27a333){const _0x540845=_0x5bdce9,_0x2edb9e=_0x27a333[_0x540845(0x664)];if(_0x2edb9e[_0x540845(0x16b)](/<JS TARGETS>\s*([\s\S]*)\s*<\/JS TARGETS>/i)){if(_0x540845(0x24a)===_0x540845(0x24a)){const _0x50e7f2=String(RegExp['$1']),_0x1668bb=VisuMZ[_0x540845(0x61c)][_0x540845(0xaa5)](_0x27a333,_0x540845(0x637));VisuMZ[_0x540845(0x61c)][_0x540845(0x5b0)](_0x50e7f2,_0x1668bb);}else{const _0x4c3de3=this[_0x540845(0x87a)](_0x3b8594),_0xb8858=new(_0x4c3de3?_0x558c1f:_0x3e394c)(),_0x36d037=this[_0x540845(0x320)](_0x597490);this[_0x540845(0x919)](_0x352d87[0x0])&&(_0x30bfd9=!_0x784084),_0xb8858['targetObjects']=_0x5658ed,_0xb8858[_0x540845(0x5aa)](_0x36d037,_0x11aaf9,_0xcdd9cf,_0x30c8ee),this[_0x540845(0x1a6)](_0xb8858);}}if(_0x2edb9e['match'](/<JS COMMAND (?:VISIBLE|SHOW|HIDE)>\s*([\s\S]*)\s*<\/JS COMMAND (?:VISIBLE|SHOW|HIDE)>/i)){if('FSwrI'!==_0x540845(0x4b5)){const _0x4e8983=String(RegExp['$1']),_0x129fc9=VisuMZ[_0x540845(0x61c)][_0x540845(0xaa5)](_0x27a333,_0x540845(0x229));VisuMZ[_0x540845(0x61c)]['createCommandVisibleJS'](_0x4e8983,_0x129fc9);}else this['performCollapse'](),this[_0x540845(0xb69)]();}},VisuMZ[_0x5bdce9(0x61c)]['JS']={},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x240)]=function(_0x22753f,_0x52c416){const _0x22c6e5=_0x5bdce9,_0x25765d=_0x22753f[_0x22c6e5(0x664)];if(_0x25765d[_0x22c6e5(0x16b)](VisuMZ[_0x22c6e5(0x61c)][_0x22c6e5(0x3a1)][_0x52c416])){const _0x4df152=RegExp['$1'],_0x29ce56='\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Declare\x20Arguments\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20user\x20=\x20arguments[0];\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20target\x20=\x20arguments[1];\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20obj\x20=\x20arguments[2];\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20let\x20value\x20=\x20arguments[3]\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20let\x20originalValue\x20=\x20value;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Declare\x20Constants\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20action\x20=\x20(this.constructor\x20===\x20Game_Action)\x20?\x20this\x20:\x20user.currentAction();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20a\x20=\x20user;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20b\x20=\x20target;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20attacker\x20=\x20user;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20defender\x20=\x20target;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20healer\x20=\x20user;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20receiver\x20=\x20target;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20actor\x20=\x20obj;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20currentClass\x20=\x20obj;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20skill\x20=\x20(this.constructor\x20===\x20Game_Action)\x20?\x20this.item()\x20:\x20obj;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20item\x20=\x20(this.constructor\x20===\x20Game_Action)\x20?\x20this.item()\x20:\x20obj;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20weapon\x20=\x20obj;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20armor\x20=\x20obj;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20enemy\x20=\x20obj;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20state\x20=\x20obj;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Create\x20Compatibility\x20Variables\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20let\x20origin\x20=\x20user;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(Imported.VisuMZ_1_SkillsStatesCore\x20&&\x20$dataStates.includes(obj))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20origin\x20=\x20target.getStateOrigin(obj.id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Process\x20Code\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%1\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20($gameTemp.isPlaytest())\x20console.log(e);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20NaN\x20Check\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(isNaN(value)){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20($gameTemp.isPlaytest())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27NaN\x20value\x20created\x20by\x20%2\x27.format(\x27\x27,obj.name));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20console.log(\x27Restoring\x20value\x20to\x20%2\x27.format(\x27\x27,originalValue));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20value\x20=\x20originalValue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Return\x20Value\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20value;\x0a\x20\x20\x20\x20\x20\x20\x20\x20'[_0x22c6e5(0x824)](_0x4df152),_0x3a9f6d=VisuMZ['BattleCore'][_0x22c6e5(0xaa5)](_0x22753f,_0x52c416);VisuMZ[_0x22c6e5(0x61c)]['JS'][_0x3a9f6d]=new Function(_0x29ce56);}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xaa5)]=function(_0x181c58,_0x168f18){const _0x1bda9f=_0x5bdce9;let _0x299629='';if($dataActors['includes'](_0x181c58))_0x299629=_0x1bda9f(0x632)[_0x1bda9f(0x824)](_0x181c58['id'],_0x168f18);if($dataClasses[_0x1bda9f(0x8ed)](_0x181c58))_0x299629='Class-%1-%2'['format'](_0x181c58['id'],_0x168f18);if($dataSkills['includes'](_0x181c58))_0x299629='Skill-%1-%2'[_0x1bda9f(0x824)](_0x181c58['id'],_0x168f18);if($dataItems[_0x1bda9f(0x8ed)](_0x181c58))_0x299629=_0x1bda9f(0x4e6)[_0x1bda9f(0x824)](_0x181c58['id'],_0x168f18);if($dataWeapons[_0x1bda9f(0x8ed)](_0x181c58))_0x299629='Weapon-%1-%2'[_0x1bda9f(0x824)](_0x181c58['id'],_0x168f18);if($dataArmors[_0x1bda9f(0x8ed)](_0x181c58))_0x299629=_0x1bda9f(0x9c6)[_0x1bda9f(0x824)](_0x181c58['id'],_0x168f18);if($dataEnemies[_0x1bda9f(0x8ed)](_0x181c58))_0x299629='Enemy-%1-%2'[_0x1bda9f(0x824)](_0x181c58['id'],_0x168f18);if($dataStates['includes'](_0x181c58))_0x299629='State-%1-%2'[_0x1bda9f(0x824)](_0x181c58['id'],_0x168f18);return _0x299629;},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x5b0)]=function(_0x427b5a,_0x198a60){const _0x38508a=_0x5bdce9,_0x1dafca='\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Declare\x20Arguments\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20user\x20=\x20arguments[0];\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20a\x20=\x20user;\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20b\x20=\x20user;\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20targets\x20=\x20arguments[1];\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Process\x20Code\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%1\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20($gameTemp.isPlaytest())\x20console.log(e);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Return\x20Value\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20targets\x20||\x20[];\x0a\x20\x20\x20\x20'[_0x38508a(0x824)](_0x427b5a);VisuMZ[_0x38508a(0x61c)]['JS'][_0x198a60]=new Function(_0x1dafca);},VisuMZ['BattleCore'][_0x5bdce9(0x415)]=function(_0x56ee81,_0x6392a9){const _0x42dbd2=_0x5bdce9,_0x1715ea=_0x42dbd2(0xa6a)['format'](_0x56ee81);VisuMZ[_0x42dbd2(0x61c)]['JS'][_0x6392a9]=new Function(_0x1715ea);},TextManager[_0x5bdce9(0xa63)]=VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x76e)][_0x5bdce9(0x71c)][_0x5bdce9(0x60e)],TextManager['autoBattleStart']=VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x76e)][_0x5bdce9(0xa97)][_0x5bdce9(0xb58)],TextManager['autoBattleStyle']=VisuMZ['BattleCore'][_0x5bdce9(0x76e)][_0x5bdce9(0xa97)]['StyleName'],TextManager[_0x5bdce9(0xa03)]=VisuMZ['BattleCore']['Settings'][_0x5bdce9(0x9d6)]['Name'],ColorManager[_0x5bdce9(0x658)]=function(_0x44dccc){const _0x585479=_0x5bdce9;return _0x44dccc=String(_0x44dccc),_0x44dccc[_0x585479(0x16b)](/#(.*)/i)?_0x585479(0x68c)[_0x585479(0x824)](String(RegExp['$1'])):_0x585479(0x79a)!==_0x585479(0x949)?this['textColor'](Number(_0x44dccc)):_0x30eb75[_0x585479(0xed)]()[_0x585479(0xb85)](_0x105793=>_0x105793!==_0x2abdcb);},DataManager[_0x5bdce9(0x294)]=function(_0x3dfc62){const _0x40db5b=_0x5bdce9;if(_0x3dfc62['note'][_0x40db5b(0x16b)](/<DAMAGE STYLE:[ ](.*)>/i)){const _0x471e49=String(RegExp['$1'])[_0x40db5b(0x673)]()[_0x40db5b(0x92d)]();if(_0x471e49===_0x40db5b(0x590))return _0x40db5b(0x590);if(VisuMZ['DamageStyles'][_0x471e49])return _0x471e49;}const _0xfb4e86=VisuMZ[_0x40db5b(0x61c)]['Settings'][_0x40db5b(0x40d)][_0x40db5b(0xa37)]['toUpperCase']()[_0x40db5b(0x92d)]();if(VisuMZ['DamageStyles'][_0xfb4e86])return _0xfb4e86;return _0x40db5b(0x590);},DataManager[_0x5bdce9(0x31e)]=function(_0x225fb5){const _0x516594=_0x5bdce9;_0x225fb5=_0x225fb5['toUpperCase']()['trim'](),this[_0x516594(0xa79)]=this['_stypeIDs']||{};if(this['_stypeIDs'][_0x225fb5])return this[_0x516594(0xa79)][_0x225fb5];for(let _0x22b423=0x1;_0x22b423<0x64;_0x22b423++){if(!$dataSystem[_0x516594(0xa39)][_0x22b423])continue;let _0x424752=$dataSystem[_0x516594(0xa39)][_0x22b423][_0x516594(0x673)]()[_0x516594(0x92d)]();_0x424752=_0x424752[_0x516594(0x3a7)](/\x1I\[(\d+)\]/gi,''),_0x424752=_0x424752[_0x516594(0x3a7)](/\\I\[(\d+)\]/gi,''),this[_0x516594(0xa79)][_0x424752]=_0x22b423;}return this[_0x516594(0xa79)][_0x225fb5]||0x0;},DataManager[_0x5bdce9(0x5f3)]=function(_0x5af5c0){const _0x43498f=_0x5bdce9;_0x5af5c0=_0x5af5c0[_0x43498f(0x673)]()['trim'](),this[_0x43498f(0x58d)]=this['_skillIDs']||{};if(this[_0x43498f(0x58d)][_0x5af5c0])return this[_0x43498f(0x58d)][_0x5af5c0];for(const _0x7988e9 of $dataSkills){if(_0x43498f(0x213)===_0x43498f(0x2c5)){_0x5dae48[_0x43498f(0x68e)](_0x111e6f);let _0x50856e=this[_0x43498f(0x211)]();return _0x29f323[_0x43498f(0xaa0)](-_0x50856e,_0x50856e);}else{if(!_0x7988e9)continue;this[_0x43498f(0x58d)][_0x7988e9[_0x43498f(0x74e)][_0x43498f(0x673)]()[_0x43498f(0x92d)]()]=_0x7988e9['id'];}}return this['_skillIDs'][_0x5af5c0]||0x0;},DataManager['getEnemyIdWithName']=function(_0x4b3696){const _0x44de71=_0x5bdce9;_0x4b3696=_0x4b3696[_0x44de71(0x673)]()['trim'](),this[_0x44de71(0x3dc)]=this[_0x44de71(0x3dc)]||{};if(this[_0x44de71(0x3dc)][_0x4b3696])return this[_0x44de71(0x3dc)][_0x4b3696];for(const _0x351ce8 of $dataEnemies){if(!_0x351ce8)continue;this[_0x44de71(0x3dc)][_0x351ce8[_0x44de71(0x74e)]['toUpperCase']()[_0x44de71(0x92d)]()]=_0x351ce8['id'];}return this[_0x44de71(0x3dc)][_0x4b3696]||0x0;},DataManager[_0x5bdce9(0x914)]=function(_0x28442f){const _0x565c0f=_0x5bdce9;_0x28442f=_0x28442f[_0x565c0f(0x673)]()['trim'](),this[_0x565c0f(0xa96)]=this[_0x565c0f(0xa96)]||{};if(this[_0x565c0f(0xa96)][_0x28442f])return this[_0x565c0f(0xa96)][_0x28442f];for(let _0x1d888e=0x1;_0x1d888e<0x64;_0x1d888e++){if(!$dataSystem[_0x565c0f(0x6a9)][_0x1d888e])continue;let _0x20dc1e=$dataSystem[_0x565c0f(0x6a9)][_0x1d888e][_0x565c0f(0x673)]()[_0x565c0f(0x92d)]();_0x20dc1e=_0x20dc1e[_0x565c0f(0x3a7)](/\x1I\[(\d+)\]/gi,''),_0x20dc1e=_0x20dc1e[_0x565c0f(0x3a7)](/\\I\[(\d+)\]/gi,''),this[_0x565c0f(0xa96)][_0x20dc1e]=_0x1d888e;}return this[_0x565c0f(0xa96)]['BARE\x20HANDS']=0x0,this['_wtypeIDs'][_0x28442f]||0x0;},DataManager[_0x5bdce9(0x416)]=function(_0x43c0f0){const _0x356dc4=_0x5bdce9,_0x153504=_0x356dc4(0x5a6);let _0x29a118=_0x43c0f0[_0x356dc4(0x9bd)],_0x2be855=_0x43c0f0['name'];const _0x2c6815=_0x43c0f0[_0x356dc4(0x664)];return _0x2c6815['match'](/<DISPLAY ICON: (\d+)>/i)&&(_0x29a118=Number(RegExp['$1'])),_0x2c6815[_0x356dc4(0x16b)](/<DISPLAY TEXT: (.*)>/i)&&(_0x2be855=String(RegExp['$1'])),_0x153504[_0x356dc4(0x824)](_0x29a118,_0x2be855);},DataManager[_0x5bdce9(0x70f)]=function(_0x1e9682){const _0x3d274d=_0x5bdce9;if(_0x1e9682[_0x3d274d(0x664)][_0x3d274d(0x16b)](/<COMMAND TEXT: (.*)>/i)){if(_0x3d274d(0xaf8)===_0x3d274d(0x3a4)){const _0x5b9de2=_0x2b4c50['item']();this[_0x3d274d(0x563)](_0x30df60,_0x331555,_0x1a98d7),this[_0x3d274d(0x2ba)](_0x7abcb2,_0x29768f,_0x5f2952),this[_0x3d274d(0x8c7)](_0x1f42ff,_0x14acfa,_0x33e3bf);}else return String(RegExp['$1']);}else{if(_0x3d274d(0x9ff)!==_0x3d274d(0x9ff))_0x3533ec--;else return _0x1e9682[_0x3d274d(0x74e)];}},DataManager['battleCommandIcon']=function(_0x392fc1){const _0x5c97d0=_0x5bdce9;if(_0x392fc1[_0x5c97d0(0x664)]['match'](/<COMMAND ICON: (\d+)>/i))return Number(RegExp['$1']);else{if('csfPa'!=='csfPa'){if(!_0x47e9c4['isSceneBattle']())return;const _0x460138=_0x4d14d8[_0x5c97d0(0x5c4)];_0x460138[_0x5c97d0(0x6ea)]();}else return _0x392fc1[_0x5c97d0(0x9bd)];}},DataManager['swapEnemyIDs']=function(_0x2d1fd6){const _0x4ad3b4=_0x5bdce9,_0x407125=$dataEnemies[_0x2d1fd6];if(_0x407125){if(_0x407125[_0x4ad3b4(0x664)]['match'](/<SWAP ENEMIES>\s*([\s\S]*)\s*<\/SWAP ENEMIES>/i)){if(_0x4ad3b4(0x910)===_0x4ad3b4(0x910)){const _0x2f022d=String(RegExp['$1'])[_0x4ad3b4(0x761)](/[\r\n]+/)[_0x4ad3b4(0x671)](''),_0x2fd58a=this[_0x4ad3b4(0x169)](_0x2f022d);_0x2d1fd6=this[_0x4ad3b4(0x217)](_0x2fd58a)||_0x2d1fd6,_0x2d1fd6=DataManager[_0x4ad3b4(0xaee)](_0x2d1fd6);}else _0x5684d9[_0x4ad3b4(0x239)]=![];}}return _0x2d1fd6;},DataManager[_0x5bdce9(0x169)]=function(_0xcbe285){const _0x4cff9f=_0x5bdce9;let _0x27f385=0x0;const _0x37028d={};for(const _0x377f58 of _0xcbe285){if(_0x377f58[_0x4cff9f(0x16b)](/(.*):[ ](\d+)/i)){const _0x5095be=String(RegExp['$1'])['trim'](),_0x1707c8=Number(RegExp['$2']);_0x37028d[_0x5095be]=_0x1707c8,_0x27f385+=_0x1707c8;}else{if(_0x377f58[_0x4cff9f(0x16b)](/(.*):[ ](\d+\.?\d+)/i)){if(_0x4cff9f(0x11a)!==_0x4cff9f(0x11a))return this['svBattlerData']()[_0x4cff9f(0x999)];else{const _0xe98b8d=String(RegExp['$1'])[_0x4cff9f(0x92d)](),_0x15770e=Number(RegExp['$2']);_0x37028d[_0xe98b8d]=_0x15770e,_0x27f385+=_0x15770e;}}else{if(_0x377f58!==''){if(_0x4cff9f(0x4ff)===_0x4cff9f(0x516)){this[_0x4cff9f(0x730)][_0x4cff9f(0x671)](_0x44ed20);if(_0x36a839===this[_0x4cff9f(0xb40)])return;const _0x45f3ee=_0x2c0515[_0x4cff9f(0x87e)](_0x93e975[_0x4cff9f(0x76b)]());this[_0x4cff9f(0x2cd)][_0x4cff9f(0x838)]([_0x5348df,_0x45f3ee]);}else _0x37028d[_0x377f58]=0x1,_0x27f385++;}}}}if(_0x27f385<=0x0)return'';let _0x5565a7=Math['random']()*_0x27f385;for(const _0x5745c4 in _0x37028d){if('WuBbX'!==_0x4cff9f(0x2e7)){_0x5565a7-=_0x37028d[_0x5745c4];if(_0x5565a7<=0x0)return _0x5745c4;}else this['visible']=_0x3f7a8a[_0x4cff9f(0xb63)];}return'';},DataManager[_0x5bdce9(0x91f)]=function(_0x8913a){const _0xa087c2=_0x5bdce9;if(!_0x8913a)return![];if(!VisuMZ['BattleCore'][_0xa087c2(0x76e)][_0xa087c2(0x964)][_0xa087c2(0x6eb)])return![];if(_0x8913a[_0xa087c2(0x664)]['match'](/<AUTO ACTION SEQUENCE>/i))return![];if(_0x8913a[_0xa087c2(0x664)]['match'](/<COMMON (?:EVENT|EVENTS):[ ](.*)>/gi))return!![];for(const _0x1253e6 of _0x8913a[_0xa087c2(0xa4a)]){if(!_0x1253e6)continue;if(_0x1253e6[_0xa087c2(0xabe)]===Game_Action[_0xa087c2(0x358)])return!![];}return![];},DataManager[_0x5bdce9(0x649)]=function(_0x16e4b5){const _0x15ba97=_0x5bdce9,_0x176f4f=$dataTroops[_0x16e4b5];if(!_0x176f4f)return'';let _0x3fc9bc='';_0x3fc9bc+=_0x176f4f[_0x15ba97(0x74e)];for(const _0x7545a6 of _0x176f4f[_0x15ba97(0x4b9)]){if(_0x15ba97(0x82a)!==_0x15ba97(0x82a))this[_0x15ba97(0xb2d)]();else for(const _0x342740 of _0x7545a6['list']){[0x6c,0x198][_0x15ba97(0x8ed)](_0x342740['code'])&&(_0x3fc9bc+='\x0a',_0x3fc9bc+=_0x342740[_0x15ba97(0x2f6)][0x0]);}}return _0x3fc9bc;},ConfigManager[_0x5bdce9(0x40e)]=ConfigManager[_0x5bdce9(0x40e)]??![],ConfigManager[_0x5bdce9(0x25c)]=ConfigManager[_0x5bdce9(0x25c)]??![],ConfigManager[_0x5bdce9(0xa03)]=ConfigManager[_0x5bdce9(0xa03)]??!![],VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x648)]=ConfigManager['makeData'],ConfigManager[_0x5bdce9(0x162)]=function(){const _0x28b374=_0x5bdce9,_0xeb7bf=VisuMZ[_0x28b374(0x61c)][_0x28b374(0x648)]['call'](this);return _0xeb7bf['autoBattleAtStart']=this[_0x28b374(0x40e)],_0xeb7bf[_0x28b374(0x25c)]=this['autoBattleUseSkills'],_0xeb7bf[_0x28b374(0xa03)]=this[_0x28b374(0xa03)],_0xeb7bf;},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x85c)]=ConfigManager[_0x5bdce9(0x4e3)],ConfigManager[_0x5bdce9(0x4e3)]=function(_0xc5940f){const _0x409b43=_0x5bdce9;VisuMZ[_0x409b43(0x61c)]['ConfigManager_applyData']['call'](this,_0xc5940f);if(_0x409b43(0x40e)in _0xc5940f)_0x409b43(0x15c)==='UEQZd'?this[_0x409b43(0x40e)]=_0xc5940f[_0x409b43(0x40e)]:this[_0x409b43(0x329)](_0x4acaa2,_0x35f8b7,_0x1de53e);else{if('DpFOa'!==_0x409b43(0x468))this['autoBattleAtStart']=![];else{if(!this['_battler'][_0x409b43(0x3e7)]())return;const _0x38792a=_0x47fe33['BattleCore']['Settings'][_0x409b43(0x40d)],_0x4dfff3=new _0x51a2a5();_0x4dfff3[_0x409b43(0x388)]=_0x38792a[_0x409b43(0x638)],this[_0x409b43(0x6fb)](_0x4dfff3),_0x4dfff3['setupTextPopup'](_0x337ac4,_0x10d694),this[_0x409b43(0x50b)](_0x4dfff3);}}_0x409b43(0x25c)in _0xc5940f?this['autoBattleUseSkills']=_0xc5940f['autoBattleUseSkills']:this['autoBattleUseSkills']=![];if(_0x409b43(0xa03)in _0xc5940f)this['visualHpGauge']=_0xc5940f[_0x409b43(0xa03)];else{if(_0x409b43(0x67a)!=='zIKaP')return _0xaba80c['Formula'][_0x409b43(0x4b1)](this,_0x25d0ae);else this[_0x409b43(0xa03)]=!![];}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x71e)]=BattleManager[_0x5bdce9(0x3b5)],BattleManager[_0x5bdce9(0x3b5)]=function(){const _0x1e086=_0x5bdce9;VisuMZ['BattleCore'][_0x1e086(0x71e)][_0x1e086(0x4b1)](this),this[_0x1e086(0x2cd)]=[];},BattleManager[_0x5bdce9(0x4eb)]=function(){const _0x4ec126=_0x5bdce9;if(!SceneManager['isSceneBattle']())return;const _0x5a0f3f=SceneManager[_0x4ec126(0x352)][_0x4ec126(0x3e2)];if(_0x5a0f3f)_0x5a0f3f[_0x4ec126(0xb13)]();},BattleManager[_0x5bdce9(0x668)]=function(){const _0x36f073=_0x5bdce9;if(BattleManager[_0x36f073(0x985)]())return _0x36f073(0x244);return _0x36f073(0x5c0);},BattleManager[_0x5bdce9(0x566)]=function(_0x3641dd){const _0x238b09=_0x5bdce9;return _0x3641dd=_0x3641dd['toUpperCase']()['trim'](),this[_0x238b09(0x668)]()===_0x3641dd;},BattleManager[_0x5bdce9(0x441)]=function(){const _0x4d8385=_0x5bdce9;return this[_0x4d8385(0x566)](_0x4d8385(0x5c0));},BattleManager[_0x5bdce9(0x581)]=function(){return this['isDTB']();},BattleManager[_0x5bdce9(0x63b)]=function(){const _0xc82018=_0x5bdce9;return!this[_0xc82018(0x581)]();},BattleManager[_0x5bdce9(0x749)]=function(){const _0x5680ed=_0x5bdce9;return!this[_0x5680ed(0x581)]()&&!this[_0x5680ed(0x63b)]();},BattleManager['processBattleCoreJS']=function(_0xe99503){const _0xa8579a=_0x5bdce9;$gameParty[_0xa8579a(0x9dd)](_0xe99503),$gameTroop[_0xa8579a(0x9dd)](_0xe99503);},VisuMZ[_0x5bdce9(0x61c)]['BattleManager_startBattle']=BattleManager[_0x5bdce9(0x828)],BattleManager[_0x5bdce9(0x828)]=function(){const _0x3a2db0=_0x5bdce9;this[_0x3a2db0(0x28c)]=![],this['_autoBattle']=ConfigManager['autoBattleAtStart'],this[_0x3a2db0(0x9dd)]('PreStartBattleJS'),VisuMZ[_0x3a2db0(0x61c)][_0x3a2db0(0x79c)]['call'](this),this[_0x3a2db0(0x9dd)](_0x3a2db0(0x4f7));},BattleManager[_0x5bdce9(0x8c0)]=function(_0x3df5e3){const _0x3ddac4=_0x5bdce9,_0x248c81=VisuMZ[_0x3ddac4(0x61c)][_0x3ddac4(0x76e)]['Mechanics'];_0x3df5e3!==_0x3ddac4(0x2d9)&&_0x248c81[_0x3ddac4(0x355)]&&VisuMZ[_0x3ddac4(0x61c)][_0x3ddac4(0x144)](_0x248c81[_0x3ddac4(0x355)])&&(_0x3ddac4(0x267)===_0x3ddac4(0xb05)?_0x2ab7d9[_0x3ddac4(0x768)]['drawSkillCost'][_0x3ddac4(0x4b1)](this,_0x439937,_0x377b12,_0x270d63,_0x3b90a5):$gameTemp[_0x3ddac4(0x32e)](_0x248c81['BattleEndEvent']));const _0xdee4a3='%1Event'['format'](_0x3df5e3);if(_0x248c81[_0xdee4a3]&&VisuMZ['BattleCore'][_0x3ddac4(0x144)](_0x248c81[_0xdee4a3])){if(_0x3ddac4(0x864)!=='VhqIf'){this[_0x3ddac4(0x47b)]=_0x397c5a,this[_0x3ddac4(0x6f5)]='';const _0x3aad67=new _0x1e55ca(0x0,0x0,_0x127c2a[_0x3ddac4(0x7fb)],this['lineHeight']()*0x4);_0x1fb4d7[_0x3ddac4(0x768)]['initialize'][_0x3ddac4(0x4b1)](this,_0x3aad67),this[_0x3ddac4(0xa69)](0x2),this[_0x3ddac4(0xb29)]=0x0;}else $gameTemp[_0x3ddac4(0x32e)](_0x248c81[_0xdee4a3]);}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x957)]=BattleManager[_0x5bdce9(0x8cb)],BattleManager[_0x5bdce9(0x8cb)]=function(){const _0xf4dcfc=_0x5bdce9;if(this[_0xf4dcfc(0x788)]==='turn'){if($gameTemp['isCommonEventReserved']())return![];}return VisuMZ[_0xf4dcfc(0x61c)]['BattleManager_checkBattleEnd'][_0xf4dcfc(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)]['BattleManager_processVictory']=BattleManager[_0x5bdce9(0x75a)],BattleManager[_0x5bdce9(0x75a)]=function(){const _0x36c9f8=_0x5bdce9;this[_0x36c9f8(0x9dd)](_0x36c9f8(0x973)),VisuMZ[_0x36c9f8(0x61c)][_0x36c9f8(0x485)][_0x36c9f8(0x4b1)](this),this[_0x36c9f8(0x8c0)](_0x36c9f8(0x42f));},VisuMZ['BattleCore']['BattleManager_processDefeat']=BattleManager[_0x5bdce9(0xa10)],BattleManager[_0x5bdce9(0xa10)]=function(){const _0x4f2c33=_0x5bdce9;this[_0x4f2c33(0x9dd)](_0x4f2c33(0x9ef)),VisuMZ[_0x4f2c33(0x61c)][_0x4f2c33(0x417)][_0x4f2c33(0x4b1)](this),this[_0x4f2c33(0x8c0)](_0x4f2c33(0x9e7));},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x9a8)]=BattleManager['endBattle'],BattleManager[_0x5bdce9(0x1ff)]=function(_0xebc960){const _0x2da035=_0x5bdce9;this[_0x2da035(0x28c)]=!![],this[_0x2da035(0xb63)]=![],this['processBattleCoreJS'](_0x2da035(0x5b4)),VisuMZ['BattleCore'][_0x2da035(0x9a8)][_0x2da035(0x4b1)](this,_0xebc960),this[_0x2da035(0x9dd)](_0x2da035(0x56b));},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x969)]=BattleManager['startTurn'],BattleManager[_0x5bdce9(0x61b)]=function(){const _0x341cf5=_0x5bdce9;if(this[_0x341cf5(0x581)]())this[_0x341cf5(0x9dd)](_0x341cf5(0x5d3));VisuMZ['BattleCore'][_0x341cf5(0x969)][_0x341cf5(0x4b1)](this);if(this[_0x341cf5(0x581)]())this[_0x341cf5(0x9dd)](_0x341cf5(0x17c));},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x33c)]=BattleManager['startAction'],BattleManager[_0x5bdce9(0x63f)]=function(){const _0x1c2ebe=_0x5bdce9,_0x84574a=this[_0x1c2ebe(0xb40)][_0x1c2ebe(0x76b)](),_0x121067=this[_0x1c2ebe(0xb40)];if(_0x84574a&&_0x84574a['subject']()===_0x121067){if(_0x1c2ebe(0x78d)!=='GfYKA'){const _0x50c9db=_0x7c155c[0x0]['format'](_0x3b21f8[0x0]),_0x29ddee=_0x46f660[0x1][_0x1c2ebe(0x824)](_0x4c5284[0x1]),_0x4c7494=new _0xc890dd(_0x23abbc[_0x1c2ebe(0x824)](_0x29ddee),'i');_0x26ff9f[_0x50c9db]=_0x4c7494;}else _0x84574a[_0x1c2ebe(0x335)](_0x1c2ebe(0xb15));}VisuMZ[_0x1c2ebe(0x61c)]['BattleManager_startAction'][_0x1c2ebe(0x4b1)](this),_0x84574a&&_0x84574a[_0x1c2ebe(0xb83)]()===_0x121067&&(_0x1c2ebe(0x141)==='fYhIv'?(_0x5f0e48[_0x1c2ebe(0x61c)]['ParseEnemyNotetags']&&_0x34a1a5[_0x1c2ebe(0x61c)]['ParseEnemyNotetags']['call'](this,_0x4a6392),_0x2e9e70[_0x1c2ebe(0x61c)]['Parse_Notetags_TraitObjects'](_0x3dba2a)):_0x84574a[_0x1c2ebe(0x335)](_0x1c2ebe(0x80f)));},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xaaa)]=BattleManager[_0x5bdce9(0x3b1)],BattleManager[_0x5bdce9(0x3b1)]=function(){const _0xb53cf7=_0x5bdce9,_0x5e26ce=this[_0xb53cf7(0x5ae)],_0x4ad572=this[_0xb53cf7(0xb40)];_0x5e26ce&&_0x5e26ce!==this[_0xb53cf7(0x5f2)]&&_0x5e26ce['subject']()===_0x4ad572&&_0x5e26ce['actionBattleCoreJS'](_0xb53cf7(0x791)),VisuMZ[_0xb53cf7(0x61c)][_0xb53cf7(0xaaa)][_0xb53cf7(0x4b1)](this),_0x5e26ce&&_0x5e26ce!==this['_lastAction']&&_0x5e26ce['subject']()===_0x4ad572&&_0x5e26ce[_0xb53cf7(0x335)]('PostEndActionJS'),this[_0xb53cf7(0x3fc)](this[_0xb53cf7(0x8b1)]()),this['_lastAction']=this[_0xb53cf7(0x5ae)];},BattleManager[_0x5bdce9(0x3fc)]=function(_0xcadb18){const _0x567b24=_0x5bdce9;for(const _0xe88d17 of _0xcadb18){if('WiPcp'!=='QiTWz'){if(!_0xe88d17)continue;if(!_0xe88d17[_0x567b24(0xb0d)]())continue;_0xe88d17[_0x567b24(0xb0d)]()['refreshMotion']();}else{const _0x31e4df=this['isAlive']();this['_immortal']=![],_0x31e4df&&this[_0x567b24(0xb87)]&&this[_0x567b24(0x31b)](),this[_0x567b24(0xb87)]=![],this[_0x567b24(0xf7)](),this['isDead']()&&_0x31e4df&&(this['performCollapse'](),this[_0x567b24(0xb69)]());}}},BattleManager[_0x5bdce9(0xa85)]=function(){const _0x23e430=_0x5bdce9;!this[_0x23e430(0x5c4)][_0x23e430(0x585)]()&&(_0x23e430(0xb7e)===_0x23e430(0xb7e)?this[_0x23e430(0x3b1)]():this['isQueueOptionsMenu']()?(this['_callSceneOptions']=!![],this[_0x23e430(0x5c4)][_0x23e430(0x838)](_0x23e430(0xa19),_0x4e4254[_0x23e430(0x61c)][_0x23e430(0x76e)][_0x23e430(0x71c)][_0x23e430(0x6ff)])):this[_0x23e430(0x745)]());},Game_Battler[_0x5bdce9(0x768)]['onAllActionsEnd']=function(){const _0x55be99=_0x5bdce9;this[_0x55be99(0xb45)]();if(Imported[_0x55be99(0x47a)]){const _0x770ae2=VisuMZ[_0x55be99(0x4e1)]['Settings'][_0x55be99(0x8d2)];_0x770ae2&&_0x770ae2[_0x55be99(0x6e4)]===![]&&(_0x55be99(0xa3b)===_0x55be99(0xa3b)?this[_0x55be99(0x8ab)](0x1):_0x204609['push'](new _0x8da723(_0x52d2e0)));}else{if('cnZoN'==='cnZoN')this[_0x55be99(0x8ab)](0x1);else return _0x12853f[_0x55be99(0x7e0)]['Settings'][_0x55be99(0x4c6)][_0x55be99(0xa3a)];}this[_0x55be99(0x3e4)]();},BattleManager[_0x5bdce9(0x9ae)]=function(){const _0x485bb9=_0x5bdce9;this[_0x485bb9(0x780)]=VisuMZ['BattleCore'][_0x485bb9(0x76e)]['Mechanics'][_0x485bb9(0x3b7)][_0x485bb9(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x952)]=BattleManager[_0x5bdce9(0x544)],BattleManager[_0x5bdce9(0x544)]=function(){const _0x381478=_0x5bdce9;this[_0x381478(0x9dd)](_0x381478(0xa1b)),BattleManager[_0x381478(0x25a)][_0x381478(0x836)](),VisuMZ[_0x381478(0x61c)][_0x381478(0x952)]['call'](this),this[_0x381478(0x8c0)](_0x381478(0x626));},VisuMZ[_0x5bdce9(0x61c)]['BattleManager_onEscapeFailure']=BattleManager[_0x5bdce9(0x577)],BattleManager[_0x5bdce9(0x577)]=function(){const _0x15c105=_0x5bdce9;this['processBattleCoreJS'](_0x15c105(0x662));const _0x559133=this['_escapeRatio'];VisuMZ['BattleCore']['BattleManager_onEscapeFailure'][_0x15c105(0x4b1)](this),this[_0x15c105(0x780)]=_0x559133+VisuMZ['BattleCore']['Settings'][_0x15c105(0x817)][_0x15c105(0xaf1)][_0x15c105(0x4b1)](this),this[_0x15c105(0x8c0)](_0x15c105(0x2d9));},BattleManager[_0x5bdce9(0x46f)]=function(){const _0x23ee27=_0x5bdce9;let _0x37c14d=![];if(this[_0x23ee27(0x6a3)]()){if(_0x23ee27(0x7a7)==='rJKOR'){const _0x184d18=this[_0x23ee27(0x301)];_0x184d18[_0x23ee27(0xb32)]['clear']();const _0x330ecc=this[_0x23ee27(0x49b)](this[_0x23ee27(0x1fd)]());if(_0x330ecc===_0x23ee27(0x98e)&&this[_0x23ee27(0x95a)]()>0x0){const _0x52a8e4=this[_0x23ee27(0x101)](this['index']());let _0x524e44=this[_0x23ee27(0x3fa)](this[_0x23ee27(0x1fd)]());_0x524e44=_0x524e44[_0x23ee27(0x3a7)](/\\I\[(\d+)\]/gi,''),_0x184d18[_0x23ee27(0x689)](),this[_0x23ee27(0x3a0)](_0x524e44,_0x52a8e4),this['commandNameWindowDrawText'](_0x524e44,_0x52a8e4),this[_0x23ee27(0x980)](_0x524e44,_0x52a8e4);}}else for(const _0x32e74e of $gameTroop[_0x23ee27(0x655)]()){this['_logWindow'][_0x23ee27(0x838)]('addText',TextManager[_0x23ee27(0x6ab)][_0x23ee27(0x824)](_0x32e74e)),this['_logWindow'][_0x23ee27(0x838)](_0x23ee27(0x156)),_0x37c14d=!![];}}if(this['_preemptive']){if('acXLG'===_0x23ee27(0x629)){const _0xebfaf=this['getAttackMotion']();return _0xebfaf?_0xebfaf[_0x23ee27(0x1dc)]:0x0;}else this['_logWindow'][_0x23ee27(0x838)](_0x23ee27(0xa19),TextManager[_0x23ee27(0x529)]['format']($gameParty['name']())),this['_logWindow']['push'](_0x23ee27(0x156));}else this[_0x23ee27(0x10f)]&&(this['_logWindow'][_0x23ee27(0x838)]('addText',TextManager[_0x23ee27(0x907)][_0x23ee27(0x824)]($gameParty[_0x23ee27(0x74e)]())),this[_0x23ee27(0x5c4)][_0x23ee27(0x838)]('wait'));_0x37c14d&&(this[_0x23ee27(0x5c4)][_0x23ee27(0x838)]('wait'),this['_logWindow'][_0x23ee27(0x838)]('clear')),this[_0x23ee27(0x985)]()&&this[_0x23ee27(0x4fe)]()&&(_0x23ee27(0xf0)!==_0x23ee27(0xf0)?(_0x5706bb[_0x23ee27(0xb63)]=!![],_0x36c3ec[_0x23ee27(0xa95)](),this[_0x23ee27(0x427)](),_0x3523aa[_0x23ee27(0x985)]()&&(_0x4727e[_0x23ee27(0x75c)]=![])):this[_0x23ee27(0x9b2)]=![]);},BattleManager[_0x5bdce9(0x6a3)]=function(){const _0x2b40de=_0x5bdce9;if(BattleManager['_autoBattle'])return![];return VisuMZ[_0x2b40de(0x61c)][_0x2b40de(0x76e)][_0x2b40de(0x14a)][_0x2b40de(0x4d0)];},VisuMZ[_0x5bdce9(0x61c)]['BattleManager_startInput']=BattleManager[_0x5bdce9(0x6dd)],BattleManager[_0x5bdce9(0x6dd)]=function(){const _0x161619=_0x5bdce9;VisuMZ[_0x161619(0x61c)][_0x161619(0x1f1)][_0x161619(0x4b1)](this),this['isDTB']()&&this[_0x161619(0x4fe)]()&&!this[_0x161619(0x10f)]&&$gameParty[_0x161619(0xe3)]()&&this[_0x161619(0x427)]();},BattleManager['isSkipPartyCommandWindow']=function(){const _0xecfabc=_0x5bdce9;return VisuMZ[_0xecfabc(0x61c)][_0xecfabc(0x76e)][_0xecfabc(0x71c)]['SkipPartyCmd'];},BattleManager[_0x5bdce9(0x5e8)]=function(){const _0x238d38=_0x5bdce9;this[_0x238d38(0x8fc)]()&&this[_0x238d38(0x427)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x533)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x46c)],Scene_Battle['prototype']['startActorCommandSelection']=function(){const _0x16f9ee=_0x5bdce9;VisuMZ[_0x16f9ee(0x61c)]['Scene_Battle_startActorCommandSelection'][_0x16f9ee(0x4b1)](this),BattleManager[_0x16f9ee(0x985)]()&&BattleManager['_tpbNeedsPartyCommand']&&(BattleManager[_0x16f9ee(0x9b2)]=![],this['actorCommandCancelTPB']());},BattleManager['invokeMagicReflection']=function(_0x111cf1,_0x9042fd){const _0x369c4c=_0x5bdce9;this[_0x369c4c(0x5ae)][_0x369c4c(0x1c9)]=_0x9042fd,this[_0x369c4c(0x5c4)][_0x369c4c(0x970)](_0x9042fd),this[_0x369c4c(0x5c4)]['displayReflectionPlayBack'](_0x111cf1,this[_0x369c4c(0x5ae)]),this[_0x369c4c(0x5ae)][_0x369c4c(0x76c)](_0x111cf1),this[_0x369c4c(0x5c4)][_0x369c4c(0x594)](_0x111cf1,_0x111cf1);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x64f)]=BattleManager[_0x5bdce9(0x872)],BattleManager['makeActionOrders']=function(){const _0x5f242d=_0x5bdce9;VisuMZ[_0x5f242d(0x61c)][_0x5f242d(0x64f)][_0x5f242d(0x4b1)](this),this['_actionBattlers']=this[_0x5f242d(0x730)][_0x5f242d(0xb85)](_0x45eb52=>_0x45eb52&&_0x45eb52[_0x5f242d(0x6ed)]());},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x469)]=BattleManager[_0x5bdce9(0x219)],BattleManager[_0x5bdce9(0x219)]=function(_0x27f4fd){const _0x418bc=_0x5bdce9;if(this['_phase']==='custom')this[_0x418bc(0x711)]();else this['_phase']===_0x418bc(0x896)?this[_0x418bc(0x1bb)]():VisuMZ[_0x418bc(0x61c)][_0x418bc(0x469)][_0x418bc(0x4b1)](this,_0x27f4fd);},BattleManager['prepareCustomActionSequence']=function(){const _0x61d37f=_0x5bdce9;this[_0x61d37f(0x8be)]=this[_0x61d37f(0x89a)][_0x61d37f(0x2ca)](0x0),this['_targetIndex']=0x0,this[_0x61d37f(0xaa8)]=this[_0x61d37f(0x8be)][0x0]||null,this[_0x61d37f(0x788)]=_0x61d37f(0x8a6);},BattleManager['updateCustomActionSequence']=function(){const _0x31393e=_0x5bdce9;if(!this[_0x31393e(0x886)]()&&!this[_0x31393e(0x5c4)][_0x31393e(0x585)]()){if(_0x31393e(0x785)!==_0x31393e(0x785))return _0x4d513a[_0x31393e(0x61c)][_0x31393e(0x76e)][_0x31393e(0x14a)][_0x31393e(0xacf)];else this['_phase']='action';}},BattleManager[_0x5bdce9(0x896)]=function(_0x40b62c){const _0x462bc7=_0x5bdce9;this[_0x462bc7(0x730)][_0x462bc7(0x671)](_0x40b62c);if(_0x40b62c===this[_0x462bc7(0xb40)])return;const _0x560b72=JsonEx['makeDeepCopy'](_0x40b62c['currentAction']());this[_0x462bc7(0x2cd)][_0x462bc7(0x838)]([_0x40b62c,_0x560b72]);},BattleManager[_0x5bdce9(0x405)]=function(){},BattleManager[_0x5bdce9(0x94c)]=function(){const _0x3204d0=_0x5bdce9;if(this[_0x3204d0(0x985)]())this[_0x3204d0(0x788)]=_0x3204d0(0x641);else this['_forcedBattlers'][_0x3204d0(0x12d)]>0x0?this[_0x3204d0(0x788)]=_0x3204d0(0x641):this['startInput']();},BattleManager['getNextSubject']=function(){const _0x35f493=_0x5bdce9,_0x168606=this[_0x35f493(0xb40)];_0x168606&&this[_0x35f493(0x985)]()&&('dDcfo'!==_0x35f493(0x35c)?_0x168606[_0x35f493(0xb5c)](_0x35f493(0x8b2)):(this[_0x35f493(0x3e2)][_0x35f493(0x243)](),this[_0x35f493(0x1ea)][_0x35f493(0x137)](),this[_0x35f493(0x8df)][_0x35f493(0x11b)]()));for(;;){const _0x59441c=this['getNextSubjectFromPool']();if(!_0x59441c)return null;if(_0x59441c[_0x35f493(0x6b3)]()&&_0x59441c[_0x35f493(0x4d2)]())return _0x59441c;}},BattleManager['getNextSubjectFromPool']=function(){const _0x2ab0f4=_0x5bdce9;if(this[_0x2ab0f4(0x2cd)][_0x2ab0f4(0x12d)]>0x0){const _0x477b9c=this[_0x2ab0f4(0x2cd)][_0x2ab0f4(0x52e)](),_0xb9ed8c=_0x477b9c[0x0];return _0xb9ed8c['_actions']=_0xb9ed8c[_0x2ab0f4(0x53e)]||[],_0xb9ed8c['_actions'][0x0]=_0x477b9c[0x1],_0xb9ed8c;}else{if('YBRUf'===_0x2ab0f4(0x5c7)){const _0x38e757=_0x488b17(_0x1b4aab['$1'])['split'](/[\r\n]+/)[_0x2ab0f4(0x671)]('');_0x54855b[_0x2ab0f4(0x74e)]=_0x2f8236['processRandomizedData'](_0x38e757);}else return this[_0x2ab0f4(0x730)][_0x2ab0f4(0x52e)]();}},VisuMZ[_0x5bdce9(0x61c)]['Game_Battler_forceAction']=Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x896)],Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x896)]=function(_0xbd6985,_0x453955){const _0x7151b8=_0x5bdce9;VisuMZ['BattleCore'][_0x7151b8(0x1c3)][_0x7151b8(0x4b1)](this,_0xbd6985,_0x453955),this[_0x7151b8(0x53e)][this[_0x7151b8(0x53e)][_0x7151b8(0x12d)]-0x1][_0x7151b8(0xaf3)]=!![];},Game_Interpreter[_0x5bdce9(0x768)][_0x5bdce9(0x69d)]=function(_0x453ed7){const _0x363873=_0x5bdce9;return this[_0x363873(0x42c)](_0x453ed7[0x0],_0x453ed7[0x1],_0x5173cb=>{const _0x14bdaa=_0x363873;!_0x5173cb['isDeathStateAffected']()&&(_0x5173cb[_0x14bdaa(0x896)](_0x453ed7[0x2],_0x453ed7[0x3]),BattleManager['forceAction'](_0x5173cb));}),!![];},VisuMZ[_0x5bdce9(0x61c)]['Game_Battler_makeSpeed']=Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x342)],Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x342)]=function(){const _0x34e17f=_0x5bdce9;VisuMZ['BattleCore']['Game_Battler_makeSpeed'][_0x34e17f(0x4b1)](this),this['_actions'][_0x34e17f(0x12d)]<=0x0&&(this[_0x34e17f(0x97f)]=Number[_0x34e17f(0x5da)]);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x284)]=BattleManager[_0x5bdce9(0x427)],BattleManager['selectNextCommand']=function(){const _0x4c5572=_0x5bdce9;this['isTpb']()?this[_0x4c5572(0x798)]():_0x4c5572(0x93e)==='OqdBP'?(this[_0x4c5572(0x5c4)]['push']('wait'),this[_0x4c5572(0x5c4)][_0x4c5572(0x838)]('clear')):VisuMZ['BattleCore'][_0x4c5572(0x284)][_0x4c5572(0x4b1)](this);},BattleManager[_0x5bdce9(0x798)]=function(){const _0x27a89a=_0x5bdce9;if(this[_0x27a89a(0x983)]){if(_0x27a89a(0xa98)===_0x27a89a(0xa98)){if(this[_0x27a89a(0x983)][_0x27a89a(0x427)]())return;this['finishActorInput'](),this[_0x27a89a(0xb3c)]();if(!this[_0x27a89a(0xb40)]&&!this[_0x27a89a(0x983)]){if(_0x27a89a(0xa35)===_0x27a89a(0x508)){if(!_0x3783ea[_0x27a89a(0x5ea)]())return;const _0xedb87d=_0xc259ae[_0x27a89a(0x5c4)];_0xedb87d['clear']();}else SceneManager[_0x27a89a(0x352)][_0x27a89a(0x620)]();}}else{const _0x4c76b1=_0x30dbbf[_0x4674a6];if(!_0x4c76b1)return![];if(_0x4c76b1[_0x27a89a(0x3cd)][_0x27a89a(0x12d)]<=0x1)return![];return!![];}}else!this[_0x27a89a(0xb40)]&&this[_0x27a89a(0xa9d)]();},BattleManager[_0x5bdce9(0xb3c)]=function(){const _0x5b78fc=_0x5bdce9;if(!this[_0x5b78fc(0x8fc)]()||this[_0x5b78fc(0x20d)]()){if(this[_0x5b78fc(0x793)]){if(_0x5b78fc(0x4db)!==_0x5b78fc(0x57d))!$gameParty[_0x5b78fc(0xb6f)]()[_0x5b78fc(0x8ed)](this['_tpbSceneChangeCacheActor'])&&(this[_0x5b78fc(0x793)]=null);else{if(_0x5e177f[_0x5b78fc(0x548)]&&_0x23e98f['isCTB']())return![];else{if(!_0x1e3336[_0x5b78fc(0x61c)]['TpbActiveChangeEnabled'])return![];const _0x4a40d5=_0x43e0c3[_0x5b78fc(0xed)]()['filter'](_0x2c339a=>_0x2c339a['isTpbCharged']()&&_0x2c339a[_0x5b78fc(0xe3)]());return _0x4a40d5[_0x5b78fc(0x12d)]>0x0&&_0x14fa5c[_0x5b78fc(0xad6)]()!==_0x4a40d5[_0x4a40d5[_0x5b78fc(0x12d)]-0x1];}}}if(!this['_tpbSceneChangeCacheActor'])this[_0x5b78fc(0x1ed)](),this[_0x5b78fc(0x983)]=null,this[_0x5b78fc(0x75c)]=![];else{if(_0x5b78fc(0xb7a)===_0x5b78fc(0xb7a))this[_0x5b78fc(0x343)]();else{if(_0x12355b[_0x5b78fc(0x4c3)])return;_0x11b9b5[_0x5b78fc(0x61c)][_0x5b78fc(0x8d4)][_0x5b78fc(0x4b1)](this);}}}},BattleManager[_0x5bdce9(0x343)]=function(){const _0x128ac6=_0x5bdce9;!$gameParty[_0x128ac6(0xb6f)]()[_0x128ac6(0x8ed)](this[_0x128ac6(0x793)])&&(_0x128ac6(0x522)!=='gccRs'?this[_0x128ac6(0x793)]=null:(_0x7c0fca[_0x128ac6(0x61c)][_0x128ac6(0xa87)][_0x128ac6(0x4b1)](this),this[_0x128ac6(0x699)]())),this[_0x128ac6(0x793)]?_0x128ac6(0x4b7)!==_0x128ac6(0x4b7)?(_0x43760d+=_0x52a0d0[_0x128ac6(0x14a)][_0x128ac6(0x6b7)]||0x0,_0x19d103+=_0x4f3998['Enemy'][_0x128ac6(0x4b4)]||0x0):(this[_0x128ac6(0x983)]=this[_0x128ac6(0x793)],this[_0x128ac6(0x983)][_0x128ac6(0x309)]=_0x128ac6(0x6ca),this['_inputting']=!![],this[_0x128ac6(0x793)]=null):_0x128ac6(0x387)!=='ROZln'?this['updateForceAction']():(this[_0x128ac6(0x1ed)](),this[_0x128ac6(0x983)]=null,this[_0x128ac6(0x75c)]=![]);},VisuMZ['BattleCore'][_0x5bdce9(0x659)]=BattleManager['isTpbMainPhase'],BattleManager[_0x5bdce9(0x5b2)]=function(){const _0xbe2fb5=_0x5bdce9;return this['_phase']===_0xbe2fb5(0x8a6)?_0xbe2fb5(0x9b9)===_0xbe2fb5(0x9b9)?this['battleCoreTpbMainPhase']():0x0:VisuMZ['BattleCore']['BattleManager_isTpbMainPhase'][_0xbe2fb5(0x4b1)](this);},BattleManager['battleCoreTpbMainPhase']=function(){return this['isActiveTpb']();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x465)]=BattleManager[_0x5bdce9(0x1ed)],BattleManager['cancelActorInput']=function(){const _0xd24a4=_0x5bdce9;this[_0xd24a4(0x985)]()&&this[_0xd24a4(0x788)]==='battleEnd'&&(_0xd24a4(0x7d3)===_0xd24a4(0x63e)?(this['damageContainer']()[_0xd24a4(0x18f)](_0x15c5dc),this['_damages'][_0xd24a4(0x671)](_0x3c044c),_0xf289ff[_0xd24a4(0x7a3)]()):this[_0xd24a4(0x983)]=null),VisuMZ['BattleCore'][_0xd24a4(0x465)][_0xd24a4(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xa41)]=BattleManager['inputtingAction'],BattleManager[_0x5bdce9(0x504)]=function(){const _0x5d3e7d=_0x5bdce9,_0x1211ee=this[_0x5d3e7d(0x983)];if(_0x1211ee&&!_0x1211ee[_0x5d3e7d(0x504)]()){const _0x484fc4=_0x1211ee[_0x5d3e7d(0x54c)];_0x1211ee[_0x5d3e7d(0x53e)][_0x484fc4]=new Game_Action(_0x1211ee);}return VisuMZ[_0x5d3e7d(0x61c)][_0x5d3e7d(0xa41)][_0x5d3e7d(0x4b1)](this);},VisuMZ['BattleCore']['BattleManager_checkSubstitute']=BattleManager[_0x5bdce9(0x247)],BattleManager[_0x5bdce9(0x247)]=function(_0x28da99){const _0x56d9ff=_0x5bdce9;if(this[_0x56d9ff(0x5ae)][_0x56d9ff(0xb77)]())return![];return VisuMZ[_0x56d9ff(0x61c)][_0x56d9ff(0x56f)][_0x56d9ff(0x4b1)](this,_0x28da99);},SceneManager['isSceneBattle']=function(){const _0x52f412=_0x5bdce9;return this['_scene']&&this[_0x52f412(0x352)][_0x52f412(0x56d)]===Scene_Battle;},SceneManager[_0x5bdce9(0x345)]=function(){const _0x40ecb2=_0x5bdce9;return Spriteset_Battle['prototype'][_0x40ecb2(0xb1f)]();},SceneManager[_0x5bdce9(0x8e7)]=function(){if(SceneManager['isPreviousScene'](Scene_Options))return!![];return![];},SceneManager[_0x5bdce9(0x3d9)]=function(){const _0x3ece5a=_0x5bdce9;if(SceneManager[_0x3ece5a(0x438)](Scene_Options))return!![];return![];},SceneManager['checkSceneBattleTransitionable']=function(_0x30792a){const _0x194552=_0x5bdce9;if(!SceneManager[_0x194552(0x5ea)]())return!![];const _0x57b655=[_0x194552(0x7c6),_0x194552(0x3ab)];return _0x57b655[_0x194552(0x8ed)](_0x30792a[_0x194552(0x74e)]);},VisuMZ[_0x5bdce9(0x61c)]['SceneManager_push']=SceneManager[_0x5bdce9(0x838)],SceneManager[_0x5bdce9(0x838)]=function(_0x2570cf){const _0x48292c=_0x5bdce9;if(!SceneManager[_0x48292c(0x65e)](_0x2570cf))return this[_0x48292c(0x519)](_0x2570cf);VisuMZ[_0x48292c(0x61c)][_0x48292c(0x807)]['call'](this,_0x2570cf);},SceneManager[_0x5bdce9(0x519)]=function(_0x111bb6){const _0x39dfd5=_0x5bdce9;if(!$gameTemp[_0x39dfd5(0x466)]())return;if(this[_0x39dfd5(0xb5d)])return;this['_displayBattleCoreTransitionErrorMsg']=!![];let _0x5aa0c3='';_0x5aa0c3+='VisuMZ_1_BattleCore\x20does\x20NOT\x20support\x20changing',_0x5aa0c3+='\x20to\x20%1\x20midbattle.'[_0x39dfd5(0x824)](_0x111bb6[_0x39dfd5(0x74e)]),alert(_0x5aa0c3);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xaed)]=Game_Temp[_0x5bdce9(0x768)][_0x5bdce9(0x905)],Game_Temp['prototype'][_0x5bdce9(0x905)]=function(_0x3ca3b8,_0x2f59c5,_0x24632f){const _0x121254=_0x5bdce9;_0x3ca3b8=_0x3ca3b8['filter']((_0x4968de,_0x4f1ac9,_0x63fa9b)=>_0x63fa9b[_0x121254(0x977)](_0x4968de)===_0x4f1ac9),SceneManager[_0x121254(0x5ea)]()&&SceneManager[_0x121254(0x345)]()&&(_0x24632f=!_0x24632f),VisuMZ[_0x121254(0x61c)]['Game_Temp_requestAnimation']['call'](this,_0x3ca3b8,_0x2f59c5,_0x24632f),SceneManager[_0x121254(0x5ea)]()&&(_0x121254(0x347)===_0x121254(0x347)?BattleManager[_0x121254(0x25a)]['processAnimationRequests']():_0x59e184=_0x53106b[_0x121254(0x2fd)]);},Game_Temp[_0x5bdce9(0x768)]['setLastPluginCommandInterpreter']=function(_0x134750){const _0xf7bbb1=_0x5bdce9;this[_0xf7bbb1(0x51b)]=_0x134750;},Game_Temp[_0x5bdce9(0x768)][_0x5bdce9(0xb48)]=function(){const _0x3b4afe=_0x5bdce9;return this[_0x3b4afe(0x51b)];},Game_Temp[_0x5bdce9(0x768)][_0x5bdce9(0x2e2)]=function(){const _0x1f649c=_0x5bdce9;this[_0x1f649c(0x168)]=undefined;},Game_Temp['prototype'][_0x5bdce9(0x3d4)]=function(_0x2dace4){const _0x29d4b8=_0x5bdce9;$gameMap&&$dataMap&&$dataMap[_0x29d4b8(0x664)]&&this[_0x29d4b8(0x576)]($dataMap[_0x29d4b8(0x664)]);const _0x48b13a=$dataTroops[_0x2dace4];if(_0x48b13a){let _0x55a26c=DataManager[_0x29d4b8(0x649)](_0x48b13a['id']);this[_0x29d4b8(0x576)](_0x55a26c);}},Game_Temp[_0x5bdce9(0x768)][_0x5bdce9(0x576)]=function(_0x36ed82){const _0x3322d3=_0x5bdce9;if(!_0x36ed82)return;if(_0x36ed82[_0x3322d3(0x16b)](/<(?:BATTLELAYOUT|BATTLE LAYOUT|LAYOUT):[ ](.*)>/i)){if(_0x3322d3(0x4c5)===_0x3322d3(0x17a)){if(this[_0x3322d3(0x9eb)][_0x3322d3(0x127)])this[_0x3322d3(0x3b6)]=(this['_pattern']+0x1)%0x4;else this[_0x3322d3(0x3b6)]<0x2?this[_0x3322d3(0x3b6)]++:this[_0x3322d3(0xadc)]();this[_0x3322d3(0x5f5)]=0x0;}else{const _0x28ffb5=String(RegExp['$1']);if(_0x28ffb5[_0x3322d3(0x16b)](/DEFAULT/i))this[_0x3322d3(0x168)]='default';else{if(_0x28ffb5[_0x3322d3(0x16b)](/LIST/i))this[_0x3322d3(0x168)]=_0x3322d3(0x3cd);else{if(_0x28ffb5[_0x3322d3(0x16b)](/XP/i))this[_0x3322d3(0x168)]='xp';else{if(_0x28ffb5['match'](/PORTRAIT/i)){if(_0x3322d3(0x879)!=='geLSS')this[_0x3322d3(0x168)]=_0x3322d3(0x71f);else{let _0x576764=0x0;if(this[_0x3322d3(0xa9b)]&&this[_0x3322d3(0x56d)]!==_0x2c2ead){const _0x5e4fe3=this[_0x3322d3(0xa9b)][_0x3322d3(0x91d)]['y'];_0x576764-=(_0x5e4fe3-0x1)*this['height'];}return _0x576764;}}else{if(_0x28ffb5[_0x3322d3(0x16b)](/BORDER/i)){if('OifHx'===_0x3322d3(0x4e8))this[_0x3322d3(0x168)]=_0x3322d3(0x5f1);else{if(_0x261536>_0x41d10c[_0x3322d3(0x8f0)])_0x1e925b=![];if(_0x3fb2cc<_0x4b79fc[_0x3322d3(0x8f0)])_0x40f7f3=!![];}}else{if(_0x28ffb5['match'](/(?:SIDEVIEW UI|SIDEVIEW)/i)){if(Imported[_0x3322d3(0x8fd)]){if('MfXVf'!==_0x3322d3(0x232))this[_0x3322d3(0x168)]=_0x3322d3(0x74f);else{return _0x1baf0[_0x3322d3(0x768)]['isRightInputMode'][_0x3322d3(0x4b1)](this);;}}else _0x3322d3(0x6fc)!==_0x3322d3(0x6fa)?this[_0x3322d3(0x168)]=_0x3322d3(0xa34):this[_0x3322d3(0x780)]=_0x7d57bf['BattleCore'][_0x3322d3(0x76e)][_0x3322d3(0x817)][_0x3322d3(0x3b7)][_0x3322d3(0x4b1)](this);}}}}}}}}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xa87)]=Game_System['prototype']['initialize'],Game_System[_0x5bdce9(0x768)][_0x5bdce9(0x490)]=function(){const _0x3dfb61=_0x5bdce9;VisuMZ[_0x3dfb61(0x61c)][_0x3dfb61(0xa87)][_0x3dfb61(0x4b1)](this),this['initBattleCore']();},Game_System[_0x5bdce9(0x768)][_0x5bdce9(0x699)]=function(){const _0xb3974b=_0x5bdce9;this[_0xb3974b(0x406)]=this[_0xb3974b(0x406)]||[];},Game_System['prototype']['getDefeatedEnemies']=function(){const _0xfb61e2=_0x5bdce9;if(this['_defeatedEnemies']===undefined)this[_0xfb61e2(0x699)]();return this[_0xfb61e2(0x406)];},Game_System[_0x5bdce9(0x768)][_0x5bdce9(0x88a)]=function(_0x114b5e){const _0x4ed683=_0x5bdce9;if(this[_0x4ed683(0x406)]===undefined)this[_0x4ed683(0x699)]();if(!_0x114b5e)return;if(this[_0x4ed683(0x406)]['includes'](_0x114b5e))return;this['_defeatedEnemies'][_0x4ed683(0x838)](_0x114b5e),this[_0x4ed683(0x406)][_0x4ed683(0xadb)]((_0x32b37f,_0x134d92)=>_0x32b37f-_0x134d92);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x692)]=Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x972)],Game_BattlerBase[_0x5bdce9(0x768)]['addNewState']=function(_0x3f1b74){const _0x4a3b7f=_0x5bdce9,_0x368ae2=this[_0x4a3b7f(0x4d2)](),_0x230321=this[_0x4a3b7f(0xd6)]();VisuMZ[_0x4a3b7f(0x61c)]['Game_BattlerBase_addNewState']['call'](this,_0x3f1b74),this[_0x4a3b7f(0x203)]()&&_0x368ae2&&this['isDead']()&&(this[_0x4a3b7f(0x18a)]=!this['hasBeenDefeatedBefore'](),$gameSystem[_0x4a3b7f(0x88a)](this[_0x4a3b7f(0x737)]())),SceneManager[_0x4a3b7f(0x5ea)]()&&_0x230321!==this[_0x4a3b7f(0xd6)]()&&(this[_0x4a3b7f(0xb0d)]()&&this[_0x4a3b7f(0xb0d)]()[_0x4a3b7f(0xadc)]());},Game_Enemy['prototype']['hasBeenDefeatedBefore']=function(){const _0xba0144=_0x5bdce9;return $gameSystem[_0xba0144(0x913)]()[_0xba0144(0x8ed)](this[_0xba0144(0x8a7)]);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x237)]=Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x4ea)],Game_BattlerBase['prototype'][_0x5bdce9(0x4ea)]=function(_0x4601c1){const _0x5a2e1b=_0x5bdce9;VisuMZ['BattleCore']['Game_BattlerBase_eraseState']['call'](this,_0x4601c1),this[_0x5a2e1b(0x203)]()&&_0x4601c1===this[_0x5a2e1b(0x555)]()&&this[_0x5a2e1b(0x4d2)]()&&(_0x5a2e1b(0xa08)===_0x5a2e1b(0x7b2)?_0x503e77[_0x5a2e1b(0x95c)][_0x5a2e1b(0x580)]=!![]:this['_visualHpGauge_JustDied']=![]),!this[_0x5a2e1b(0x477)]&&!this['_tempBattler']&&SceneManager['isSceneBattle']()&&this[_0x5a2e1b(0xb69)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x484)]=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x89d)],Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x89d)]=function(){const _0x14a4c4=_0x5bdce9;VisuMZ[_0x14a4c4(0x61c)][_0x14a4c4(0x484)]['call'](this),this[_0x14a4c4(0x742)]={'arPenRate':0x0,'arPenFlat':0x0,'arRedRate':0x0,'arRedFlat':0x0},this['_multipliers']={'criticalHitRate':0x1,'criticalHitFlat':0x0,'criticalDmgRate':0x1,'criticalDmgFlat':0x0,'damageRate':0x1,'damageFlat':0x0,'hitRate':0x1,'hitFlat':0x0},this[_0x14a4c4(0x3e9)]='default';},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x7ad)]=function(_0x15bb62,_0x1baf79){const _0x4dc067=_0x5bdce9;return VisuMZ[_0x4dc067(0x61c)]['Settings'][_0x4dc067(0x40d)][_0x4dc067(0x8d5)][_0x4dc067(0x4b1)](this,_0x15bb62,_0x1baf79);},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x7d8)]=function(_0x322db4,_0x5d8f0f){const _0x1ea36f=_0x5bdce9;return VisuMZ[_0x1ea36f(0x61c)][_0x1ea36f(0x76e)]['Damage'][_0x1ea36f(0x241)]['call'](this,_0x322db4,_0x5d8f0f);},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x713)]=function(_0x3592ea,_0x5bb9c9){const _0x3dd697=_0x5bdce9;return VisuMZ[_0x3dd697(0x61c)][_0x3dd697(0x76e)][_0x3dd697(0x40d)][_0x3dd697(0x1c8)]['call'](this,_0x3592ea,_0x5bb9c9);},VisuMZ['BattleCore'][_0x5bdce9(0x776)]=Game_Action[_0x5bdce9(0x768)]['itemHit'],Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x72e)]=function(_0x6a5bd8){const _0x250bf4=_0x5bdce9,_0x141b16=this[_0x250bf4(0xa8a)]()[_0x250bf4(0x664)];if(_0x141b16[_0x250bf4(0x16b)](/<ALWAYS HIT>/i))return 0x1;else{if(_0x141b16['match'](/<ALWAYS HIT RATE: (\d+)([%%])>/i))return _0x250bf4(0xb3d)===_0x250bf4(0x677)?this[_0x250bf4(0x74a)]()[_0x250bf4(0x74e)]:Number(RegExp['$1'])/0x64;else{let _0x35000f=VisuMZ[_0x250bf4(0x61c)][_0x250bf4(0x776)][_0x250bf4(0x4b1)](this,_0x6a5bd8);return _0x35000f=this[_0x250bf4(0x167)][_0x250bf4(0x756)]*_0x35000f+this[_0x250bf4(0x167)][_0x250bf4(0x42b)],_0x35000f;}}},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x40c)]=function(_0x125947){const _0x352274=_0x5bdce9;if(!this[_0x352274(0xa8a)]()['damage'][_0x352274(0x580)])return 0x0;let _0x15cc25=VisuMZ['BattleCore'][_0x352274(0x76e)]['Damage']['CriticalHitRateJS'][_0x352274(0x4b1)](this,_0x125947);return _0x15cc25=this[_0x352274(0x167)][_0x352274(0x287)]*_0x15cc25+this['_multipliers'][_0x352274(0x6d0)],_0x15cc25;},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x41f)]=function(_0x2360e6){const _0x3f072f=_0x5bdce9;return _0x2360e6=VisuMZ[_0x3f072f(0x61c)][_0x3f072f(0x76e)][_0x3f072f(0x40d)][_0x3f072f(0x8c1)][_0x3f072f(0x4b1)](this,_0x2360e6),_0x2360e6=this[_0x3f072f(0x167)][_0x3f072f(0x96b)]*_0x2360e6+this[_0x3f072f(0x167)]['criticalDmgFlat'],_0x2360e6;},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x790)]=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x76a)],Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x76a)]=function(_0x1f89eb){const _0xd095d7=_0x5bdce9;if(this[_0xd095d7(0x3e9)]!==_0xd095d7(0xa34))return'qNnZQ'!=='sbJXh'?this[_0xd095d7(0x7df)](_0x1f89eb):![];else{if(DataManager['getDamageStyle'](this[_0xd095d7(0xa8a)]())===_0xd095d7(0x590)){if('DITfC'==='gleub'){if(!_0x2aa799[_0xd095d7(0x5ea)]())return;_0x5b069f[_0xd095d7(0x866)](_0x49d97e,_0x514449);const _0x31ed5b=_0x46df8d[_0xd095d7(0xb48)](),_0x3d2287=_0x1478e9[_0xd095d7(0x5ae)],_0x57c422=_0x35bb92['_subject'],_0x3ed884=_0x51de74[_0xd095d7(0x1f5)](_0x3543e2['Targets']),_0x53fd2b=_0x3cb697[_0xd095d7(0x5c2)],_0x3c863b=_0x28515a[_0xd095d7(0x5c4)];if(!_0x31ed5b||!_0x3d2287||!_0x57c422)return;if(!_0x3d2287[_0xd095d7(0xa8a)]())return;let _0x2594c2=_0x3d2287[_0xd095d7(0xa8a)]()[_0xd095d7(0x6e3)];if(_0x2594c2<0x0)_0x2594c2=_0x57c422[_0xd095d7(0x17b)]();_0x7a9946[_0xd095d7(0x905)](_0x3ed884,_0x2594c2,_0x53fd2b),_0x2eed40[_0xd095d7(0x108)]&&_0x31ed5b[_0xd095d7(0x73c)](_0xd095d7(0x9bc));}else return VisuMZ[_0xd095d7(0x61c)]['Game_Action_evalDamageFormula'][_0xd095d7(0x4b1)](this,_0x1f89eb);}else return this[_0xd095d7(0x392)](_0x1f89eb);}},Game_Action[_0x5bdce9(0x768)]['setCustomDamageFormula']=function(_0x362a0d){const _0xfc2aeb=_0x5bdce9;this[_0xfc2aeb(0x3e9)]=_0x362a0d;},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x7df)]=function(_0x5ccfcb){const _0x48f2ed=_0x5bdce9,_0x4e9a46=this[_0x48f2ed(0xa8a)](),_0x690477=_0x4e9a46['damage'][_0x48f2ed(0x7b8)];_0x4e9a46['damage'][_0x48f2ed(0x7b8)]=this[_0x48f2ed(0x3e9)];let _0x3edc52=VisuMZ['BattleCore'][_0x48f2ed(0x790)][_0x48f2ed(0x4b1)](this,_0x5ccfcb);return _0x4e9a46[_0x48f2ed(0x95c)][_0x48f2ed(0x7b8)]=_0x690477,_0x3edc52;},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0xb64)]=function(){const _0x5cbd20=_0x5bdce9;if(this['item']()[_0x5cbd20(0x664)][_0x5cbd20(0x16b)](/<DAMAGE STYLE:[ ](.*)>/i)){if(_0x5cbd20(0xb30)!=='iVAKe'){if(!_0x5c75fa['isSceneBattle']())return;_0x350453[_0x5cbd20(0x866)](_0x3d675a,_0x2d91ca);const _0x2999bc=_0x2262ca[_0x5cbd20(0x663)];_0x16fbe[_0x5cbd20(0x352)][_0x5cbd20(0x3f8)](_0x2999bc);}else{const _0x449fad=String(RegExp['$1'])[_0x5cbd20(0x673)]()[_0x5cbd20(0x92d)]();return _0x449fad;}}return _0x5cbd20(0x590);},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x392)]=function(_0x341c69){const _0x694f5b=_0x5bdce9,_0x3e47ed=DataManager[_0x694f5b(0x294)](this[_0x694f5b(0xa8a)]()),_0x3f9a35=VisuMZ['DamageStyles'][_0x3e47ed];try{return _0x3f9a35['Formula'][_0x694f5b(0x4b1)](this,_0x341c69);}catch(_0x3edfb7){if('MFzEP'!==_0x694f5b(0xa6f))_0x40b026[_0x694f5b(0x32e)](_0x36d10e[_0x694f5b(0x355)]);else{if($gameTemp['isPlaytest']())console[_0x694f5b(0x68e)](_0x3edfb7);return VisuMZ[_0x694f5b(0x61c)]['Game_Action_evalDamageFormula'][_0x694f5b(0x4b1)](this);}}},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x63c)]=function(_0x58b098,_0x31b38c){const _0x3796b2=_0x5bdce9;if(this[_0x3796b2(0x38f)]())return _0x31b38c;const _0x281c53=this[_0x3796b2(0xb83)](),_0x24658e=_0x58b098;let _0xda4d2f=[],_0x48e072=[];_0xda4d2f[_0x3796b2(0x838)](this['_armorPenetration']['arPenFlat'],this[_0x3796b2(0x742)][_0x3796b2(0x841)]),_0x48e072[_0x3796b2(0x838)](this[_0x3796b2(0x742)][_0x3796b2(0x419)],this[_0x3796b2(0x742)][_0x3796b2(0x20e)]);const _0x38e2a2=this[_0x3796b2(0x5c8)]()?/<ARMOR REDUCTION:[ ](\d+\.?\d*)>/i:/<MAGIC REDUCTION:[ ](\d+\.?\d*)>/i,_0x69d5e7=this[_0x3796b2(0x5c8)]()?/<ARMOR REDUCTION:[ ](\d+\.?\d*)([%%])>/i:/<MAGIC REDUCTION:[ ](\d+\.?\d*)([%%])>/i,_0x4c4859=this['isPhysical']()?/<ARMOR PENETRATION:[ ](\d+\.?\d*)>/i:/<MAGIC PENETRATION:[ ](\d+\.?\d*)>/i,_0x389fe1=this[_0x3796b2(0x5c8)]()?/<ARMOR PENETRATION:[ ](\d+\.?\d*)([%%])>/i:/<MAGIC PENETRATION:[ ](\d+\.?\d*)([%%])>/i;return _0xda4d2f=_0xda4d2f[_0x3796b2(0x331)](_0x24658e[_0x3796b2(0xb51)]()[_0x3796b2(0x782)](_0x1db7e3=>_0x1db7e3&&_0x1db7e3[_0x3796b2(0x664)]['match'](_0x38e2a2)?Number(RegExp['$1']):0x0)),_0x48e072=_0x48e072[_0x3796b2(0x331)](_0x24658e[_0x3796b2(0xb51)]()[_0x3796b2(0x782)](_0x1ad854=>_0x1ad854&&_0x1ad854[_0x3796b2(0x664)][_0x3796b2(0x16b)](_0x69d5e7)?Number(RegExp['$1'])/0x64:0x0)),_0xda4d2f=_0xda4d2f[_0x3796b2(0x331)](_0x281c53[_0x3796b2(0xb51)]()[_0x3796b2(0x782)](_0x2f9a00=>_0x2f9a00&&_0x2f9a00['note'][_0x3796b2(0x16b)](_0x4c4859)?Number(RegExp['$1']):0x0)),_0x48e072=_0x48e072[_0x3796b2(0x331)](_0x281c53[_0x3796b2(0xb51)]()['map'](_0x42fd14=>_0x42fd14&&_0x42fd14[_0x3796b2(0x664)]['match'](_0x389fe1)?Number(RegExp['$1'])/0x64:0x0)),this[_0x3796b2(0xa8a)]()['note'][_0x3796b2(0x16b)](_0x4c4859)&&_0xda4d2f['push'](Number(RegExp['$1'])),this[_0x3796b2(0xa8a)]()[_0x3796b2(0x664)][_0x3796b2(0x16b)](_0x389fe1)&&_0x48e072['push'](Number(RegExp['$1'])),_0x31b38c=_0xda4d2f['reduce']((_0x1f8eee,_0x58db7)=>_0x1f8eee-_0x58db7,_0x31b38c),_0x31b38c>0x0&&(_0x3796b2(0x5b6)===_0x3796b2(0x5b6)?_0x31b38c=_0x48e072['reduce']((_0xfb8f88,_0x1b93a1)=>_0xfb8f88*(0x1-_0x1b93a1),_0x31b38c):_0x201489['_subject']['stbGainInstant'](_0x1f1f87)),_0x31b38c;},VisuMZ[_0x5bdce9(0x61c)]['Game_Action_executeDamage']=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0xb1c)],Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0xb1c)]=function(_0x197807,_0x1670ba){const _0xa191e3=_0x5bdce9;_0x1670ba=_0x1670ba*this[_0xa191e3(0x167)][_0xa191e3(0xa13)],_0x1670ba+=this['_multipliers']['damageFlat']*(_0x1670ba>=0x0?0x1:-0x1),_0x1670ba=this[_0xa191e3(0x459)]('PreDamage%1JS',_0x197807,_0x1670ba,![]),_0x1670ba=this[_0xa191e3(0x125)](_0x1670ba),_0x1670ba=Math['round'](_0x1670ba),this[_0xa191e3(0x507)]=_0x1670ba,this[_0xa191e3(0x9d1)]=this['_totalValue']||0x0,this['_totalValue']+=_0x1670ba,VisuMZ[_0xa191e3(0x61c)][_0xa191e3(0x57f)]['call'](this,_0x197807,_0x1670ba),this[_0xa191e3(0x459)](_0xa191e3(0x1d3),_0x197807,_0x1670ba,!![]);},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x125)]=function(_0x228c7e){const _0x380787=_0x5bdce9;if(this[_0x380787(0x8cf)]())return _0x228c7e;return _0x228c7e=this[_0x380787(0xb37)](_0x228c7e),_0x228c7e=this[_0x380787(0x815)](_0x228c7e),_0x228c7e;},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x8cf)]=function(){const _0x4f6904=_0x5bdce9,_0x50c9c5=/<BYPASS DAMAGE CAP>/i;if(this[_0x4f6904(0xa8a)]()['note'][_0x4f6904(0x16b)](_0x50c9c5))return!![];if(this[_0x4f6904(0xb83)]()[_0x4f6904(0xb51)]()['some'](_0x4a9695=>_0x4a9695&&_0x4a9695['note'][_0x4f6904(0x16b)](_0x50c9c5)))return!![];return!VisuMZ[_0x4f6904(0x61c)]['Settings'][_0x4f6904(0x40d)][_0x4f6904(0x656)];},Game_Action['prototype'][_0x5bdce9(0xb37)]=function(_0xf88889){const _0x5d2501=_0x5bdce9;if(!VisuMZ['BattleCore'][_0x5d2501(0x76e)][_0x5d2501(0x40d)][_0x5d2501(0x4ac)])return _0xf88889;const _0x281b2a=/<BYPASS SOFT DAMAGE CAP>/i;if(this['item']()[_0x5d2501(0x664)][_0x5d2501(0x16b)](_0x281b2a))return _0xf88889;if(this['subject']()[_0x5d2501(0xb51)]()[_0x5d2501(0x82d)](_0x44c3b8=>_0x44c3b8&&_0x44c3b8[_0x5d2501(0x664)]['match'](_0x281b2a)))return _0xf88889;const _0x163752=_0xf88889<0x0?-0x1:0x1;_0xf88889=Math[_0x5d2501(0x41b)](_0xf88889);let _0x57a6a1=this[_0x5d2501(0xb83)]()[_0x5d2501(0xdc)]();if(this['item']()[_0x5d2501(0x664)]['match'](/<SOFT DAMAGE CAP:[ ]([\+\-]\d+)([%%])>/i)){if('SJmjG'==='GHILY'){if(this[_0x5d2501(0x1a8)]<=0x0)return;const _0x29956e=this[_0x5d2501(0x1a8)],_0x1cce35=this[_0x5d2501(0x21a)],_0x4ec699=this[_0x5d2501(0x953)];_0x2009ec[_0x5d2501(0x9f2)]?(this[_0x5d2501(0x666)]=this[_0x5d2501(0x99a)](this[_0x5d2501(0x666)],this[_0x5d2501(0xa67)],_0x29956e,_0x1cce35,_0x4ec699),this[_0x5d2501(0x51a)]=this[_0x5d2501(0x99a)](this['_homeY'],this[_0x5d2501(0x8fb)],_0x29956e,_0x1cce35,_0x4ec699)):(this[_0x5d2501(0x666)]=(this['_homeX']*(_0x29956e-0x1)+this[_0x5d2501(0xa67)])/_0x29956e,this[_0x5d2501(0x51a)]=(this[_0x5d2501(0x51a)]*(_0x29956e-0x1)+this[_0x5d2501(0x8fb)])/_0x29956e);this['_homeDuration']--;if(this['_homeDuration']<=0x0)this[_0x5d2501(0x3af)]();}else _0x57a6a1+=Number(RegExp['$1'])/0x64;}_0x57a6a1=_0x57a6a1[_0x5d2501(0xaa0)](0.01,0x1);const _0x597ce8=this['getHardDamageCap'](),_0x30cf8e=_0x57a6a1*_0x597ce8;if(_0xf88889>_0x30cf8e&&_0x597ce8>_0x30cf8e){if(_0x5d2501(0x1b0)==='COZxm'){_0xf88889-=_0x30cf8e;const _0x44787a=VisuMZ['BattleCore']['Settings'][_0x5d2501(0x40d)][_0x5d2501(0xb62)],_0x349957=Math['max'](0x1-_0xf88889/((_0x597ce8-_0x30cf8e)*_0x44787a+_0xf88889),0.01);_0xf88889*=_0x349957,_0xf88889+=_0x30cf8e;}else{if(!_0x2c73d1[_0x5d2501(0x68b)]())return;const _0x52575e=this['battler']();if(!_0x52575e)return;this[_0x5d2501(0x491)]()&&(_0x5250ae*=-0x1,_0x404412*=-0x1),_0x52575e[_0x5d2501(0x53f)](_0x8db17b,_0x32e649,_0x2b5a27,_0x408a03);}}return _0xf88889*_0x163752;},Game_Action['prototype'][_0x5bdce9(0x211)]=function(){const _0x5c42c9=_0x5bdce9;if(this[_0x5c42c9(0xa8a)]()[_0x5c42c9(0x664)][_0x5c42c9(0x16b)](/<DAMAGE CAP:[ ](\d+)>/i))return Number(RegExp['$1']);else{if(_0x5c42c9(0xa11)===_0x5c42c9(0xa11))return this[_0x5c42c9(0xb83)]()[_0x5c42c9(0x33a)]();else this[_0x5c42c9(0x97f)]=_0x173519[_0x5c42c9(0x5da)];}},Game_Action['prototype']['applyHardDamageCap']=function(_0x54b03b){const _0x389952=_0x5bdce9;console[_0x389952(0x68e)](_0x54b03b);let _0x123bd1=this[_0x389952(0x211)]();return _0x54b03b[_0x389952(0xaa0)](-_0x123bd1,_0x123bd1);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xaae)]=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x76c)],Game_Action[_0x5bdce9(0x768)]['apply']=function(_0x332030){const _0x4373f1=_0x5bdce9;this['applyBattleCoreJS'](_0x4373f1(0x49a),_0x332030,0x0,!![]),VisuMZ[_0x4373f1(0x61c)][_0x4373f1(0xaae)]['call'](this,_0x332030),this[_0x4373f1(0x459)](_0x4373f1(0x7a8),_0x332030,this['_executedValue']||0x0,!![]),this['applyResultSwitches'](_0x332030);},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x459)]=function(_0x1adfae,_0x2640ed,_0x1de044,_0x328139){const _0x533411=_0x5bdce9;if(this['_tempBattler']||this[_0x533411(0x477)])return;_0x1de044=_0x1de044||0x0;const _0x3eba35=_0x1de044,_0x5d3a74=VisuMZ[_0x533411(0x61c)][_0x533411(0x76e)][_0x533411(0x817)],_0x402f0e=_0x1adfae[_0x533411(0x824)]('');if(_0x5d3a74[_0x402f0e]){if(_0x533411(0x83e)===_0x533411(0x83e)){_0x1de044=_0x5d3a74[_0x402f0e][_0x533411(0x4b1)](this,_0x1de044,_0x2640ed);if(_0x328139)_0x1de044=_0x3eba35;}else _0x27678b[_0x533411(0x61c)]['ParseWeaponNotetags']&&_0x218b4f['BattleCore'][_0x533411(0xa0b)][_0x533411(0x4b1)](this,_0x5be8b6),_0x4fc1b7[_0x533411(0x61c)][_0x533411(0x57e)](_0x8744c9);}let _0x26be3b=VisuMZ[_0x533411(0x61c)][_0x533411(0xaa5)](this[_0x533411(0xa8a)](),_0x1adfae['format'](''));if(VisuMZ[_0x533411(0x61c)]['JS'][_0x26be3b]){_0x1de044=VisuMZ[_0x533411(0x61c)]['JS'][_0x26be3b][_0x533411(0x4b1)](this,this[_0x533411(0xb83)](),_0x2640ed,this[_0x533411(0xa8a)](),_0x1de044);if(_0x328139)_0x1de044=_0x3eba35;}for(const _0x5be57c of this[_0x533411(0xb83)]()[_0x533411(0xb51)]()){if(_0x533411(0x5ed)===_0x533411(0x8a5))_0x29cf19['push'](_0x1c9925[_0x533411(0x2db)]());else{if(!_0x5be57c)continue;_0x26be3b=VisuMZ[_0x533411(0x61c)][_0x533411(0xaa5)](_0x5be57c,_0x1adfae[_0x533411(0x824)]('AsUser'));if(VisuMZ[_0x533411(0x61c)]['JS'][_0x26be3b]){_0x1de044=VisuMZ[_0x533411(0x61c)]['JS'][_0x26be3b][_0x533411(0x4b1)](this,this[_0x533411(0xb83)](),_0x2640ed,_0x5be57c,_0x1de044);if(_0x328139)_0x1de044=_0x3eba35;}}}for(const _0x12259d of _0x2640ed[_0x533411(0xb51)]()){if(!_0x12259d)continue;_0x26be3b=VisuMZ[_0x533411(0x61c)]['createKeyJS'](_0x12259d,_0x1adfae[_0x533411(0x824)](_0x533411(0x53b)));if(VisuMZ[_0x533411(0x61c)]['JS'][_0x26be3b]){_0x1de044=VisuMZ[_0x533411(0x61c)]['JS'][_0x26be3b][_0x533411(0x4b1)](this,this[_0x533411(0xb83)](),_0x2640ed,_0x12259d,_0x1de044);if(_0x328139)_0x1de044=_0x3eba35;}}return _0x1de044;},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x335)]=function(_0x12ce9c){const _0x50fd1b=_0x5bdce9,_0xa1d724=this['_totalValue']||0x0,_0x1f8e42=VisuMZ['BattleCore'][_0x50fd1b(0x76e)][_0x50fd1b(0x817)],_0x157b4e=_0x12ce9c[_0x50fd1b(0x824)]('');if(_0x1f8e42[_0x157b4e]){if(_0x50fd1b(0x540)===_0x50fd1b(0x540))_0x1f8e42[_0x157b4e][_0x50fd1b(0x4b1)](this,_0xa1d724);else{const _0x2c18a7=_0x50fd1b(0x55a)[_0x50fd1b(0x824)](_0x2c88ce['actorId']()),_0x3f1a9c=this['createInnerPortrait'](_0x2c18a7,_0x1b4a85),_0x240b37=_0xd6db7['getBattlePortraitFilename']();_0x240b37!==''?_0x3f1a9c[_0x50fd1b(0x454)]=_0x46dac8[_0x50fd1b(0x255)](_0x240b37):_0x3f1a9c[_0x50fd1b(0x454)]=_0x1f409e[_0x50fd1b(0x9a5)];const _0x37aa8b=this[_0x50fd1b(0x5c3)](_0x52c9b9);_0x3f1a9c[_0x50fd1b(0x887)]['x']=0.5,_0x3f1a9c[_0x50fd1b(0x887)]['y']=0x1;let _0x2447fd=_0x2f5c10[_0x50fd1b(0xb3f)](_0x37aa8b['x']+_0x37aa8b[_0x50fd1b(0x3b2)]/0x2)+this[_0x50fd1b(0xaff)];_0x2447fd+=_0xae2b04[_0x50fd1b(0x44e)]();let _0x37eeaf=_0x4fe032['round'](this[_0x50fd1b(0x3b0)]);_0x37eeaf+=_0x3fea12[_0x50fd1b(0x3ca)](),_0x3f1a9c[_0x50fd1b(0x5e7)](_0x2447fd,_0x37eeaf);const _0x435079=_0x3d7966['BattleCore']['Settings'][_0x50fd1b(0x40f)][_0x50fd1b(0xa89)];_0x3f1a9c[_0x50fd1b(0x91d)]['x']=_0x435079,_0x3f1a9c[_0x50fd1b(0x91d)]['y']=_0x435079,_0x3f1a9c[_0x50fd1b(0x243)]();}}let _0x465fa0=VisuMZ[_0x50fd1b(0x61c)][_0x50fd1b(0xaa5)](this[_0x50fd1b(0xa8a)](),_0x12ce9c);VisuMZ[_0x50fd1b(0x61c)]['JS'][_0x465fa0]&&VisuMZ[_0x50fd1b(0x61c)]['JS'][_0x465fa0][_0x50fd1b(0x4b1)](this,this[_0x50fd1b(0xb83)](),this[_0x50fd1b(0xb83)](),this[_0x50fd1b(0xa8a)](),_0xa1d724);for(const _0x2ddeee of this['subject']()[_0x50fd1b(0xb51)]()){if(!_0x2ddeee)continue;_0x465fa0=VisuMZ[_0x50fd1b(0x61c)][_0x50fd1b(0xaa5)](_0x2ddeee,_0x12ce9c),VisuMZ[_0x50fd1b(0x61c)]['JS'][_0x465fa0]&&VisuMZ['BattleCore']['JS'][_0x465fa0][_0x50fd1b(0x4b1)](this,this[_0x50fd1b(0xb83)](),this[_0x50fd1b(0xb83)](),_0x2ddeee,_0xa1d724);}},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x43d)]=function(){const _0x5f09b6=_0x5bdce9;return VisuMZ[_0x5f09b6(0x61c)][_0x5f09b6(0x76e)][_0x5f09b6(0x817)][_0x5f09b6(0x3ee)]['call'](this);},Game_Action[_0x5bdce9(0x768)]['allowRandomSpeed']=function(){const _0x17acd0=_0x5bdce9;return VisuMZ[_0x17acd0(0x61c)]['Settings'][_0x17acd0(0x817)][_0x17acd0(0x2a1)];},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x4ab)]=function(){const _0x4d6cbe=_0x5bdce9;return this[_0x4d6cbe(0xa8a)]()[_0x4d6cbe(0x664)][_0x4d6cbe(0x16b)](/<JS TARGETS>/i);},Game_Action['prototype']['isBattleCoreTargetScope']=function(){const _0x146d10=_0x5bdce9;if(!this[_0x146d10(0x502)]&&this['subject']()[_0x146d10(0x86e)]())return![];if(this[_0x146d10(0x4ab)]())return!![];return typeof this['item']()[_0x146d10(0xa9f)]===_0x146d10(0x60d);},VisuMZ['BattleCore'][_0x5bdce9(0x651)]=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0xb74)],Game_Action['prototype'][_0x5bdce9(0xb74)]=function(){const _0x3cd95b=_0x5bdce9;if(this['isBattleCoreTargetScope']()&&!this[_0x3cd95b(0x4ab)]())return this[_0x3cd95b(0x22e)]();else{if(_0x3cd95b(0x223)===_0x3cd95b(0x223))return VisuMZ[_0x3cd95b(0x61c)]['Game_Action_isForOpponent'][_0x3cd95b(0x4b1)](this);else _0x2c23b7[_0x3cd95b(0x61c)][_0x3cd95b(0x6cf)][_0x3cd95b(0x4b1)](this);}},Game_Action['prototype'][_0x5bdce9(0x22e)]=function(){const _0x4afff4=_0x5bdce9,_0x4e01d0=this[_0x4afff4(0xa8a)]()['scope'];return _0x4e01d0[_0x4afff4(0x16b)](/(?:ENEMY|ENEMIES|FOE|FOES)/i);},VisuMZ[_0x5bdce9(0x61c)]['Game_Action_isForFriend']=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0xb77)],Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0xb77)]=function(){const _0x40e040=_0x5bdce9;if(this['isBattleCoreTargetScope']()&&!this[_0x40e040(0x4ab)]()){if(_0x40e040(0x822)===_0x40e040(0x703)){let _0x1f8d76=_0x211f5f[_0x40e040(0x87e)](_0x3ef653[_0x40e040(0x61c)][_0x40e040(0x75d)][_0x40e040(0x4b1)](this));return _0x3ce7f8['BattleCore'][_0x40e040(0x90a)](_0x1f8d76);}else return this[_0x40e040(0x3c1)]();}else{if('whZQa'!=='whZQa')_0x1b7aa6=_0x1ae97f['CastPhysical'];else return VisuMZ[_0x40e040(0x61c)][_0x40e040(0x443)]['call'](this);}},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x3c1)]=function(){const _0x48b5dc=_0x5bdce9,_0x2223a5=this['item']()[_0x48b5dc(0xa9f)];return _0x2223a5[_0x48b5dc(0x16b)](/(?:ALLY|ALLIES|FRIEND|FRIENDS)/i);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xb08)]=Game_Action['prototype'][_0x5bdce9(0x642)],Game_Action['prototype'][_0x5bdce9(0x642)]=function(){const _0x34863f=_0x5bdce9;if(this[_0x34863f(0xa71)]()&&!this[_0x34863f(0x4ab)]())return this[_0x34863f(0x36e)]();else{if(_0x34863f(0x82f)===_0x34863f(0x82f))return VisuMZ['BattleCore'][_0x34863f(0xb08)]['call'](this);else{const _0x17b26a=_0x8185c4[_0x34863f(0x61c)][_0x34863f(0x76e)][_0x34863f(0x2c4)];_0x17b26a[_0x34863f(0xa20)]&&this[_0x34863f(0x838)](_0x34863f(0xa19),_0x34863f(0xa1d)['format'](_0xd1f9b5[_0x34863f(0x416)](_0x29fce7)));if(_0x2fac61[_0x34863f(0x7c3)](_0x34931e)){if(_0x17b26a['ActionSkillMsg1'])this[_0x34863f(0x25d)](_0x525f56[_0x34863f(0x8b4)],_0xbcc716,_0x3a7262);if(_0x17b26a[_0x34863f(0x551)])this[_0x34863f(0x25d)](_0x2b6566[_0x34863f(0x772)],_0x4ed289,_0x5d61a0);}else{if(_0x17b26a[_0x34863f(0x161)])this[_0x34863f(0x25d)](_0x5c41ba['useItem'],_0x3c06d3,_0x57fa00);}}}},Game_Action[_0x5bdce9(0x768)]['isForRandomBattleCore']=function(){const _0x19c11e=_0x5bdce9,_0x1715a2=this[_0x19c11e(0xa8a)]()['scope'];return _0x1715a2[_0x19c11e(0x16b)](/(?:RAND|RANDOM)/i);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x7c2)]=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x1cf)],Game_Action['prototype']['needsSelection']=function(){const _0x4975a9=_0x5bdce9;if(this['isBattleCoreTargetScope']()&&!this[_0x4975a9(0x4ab)]())return _0x4975a9(0x7be)==='Lgdzc'?this['needsSelectionBattleCore']():0x24;else{if(_0x4975a9(0x88b)!==_0x4975a9(0x88b)){const _0x28dc70=this['getNextSubjectFromPool']();if(!_0x28dc70)return null;if(_0x28dc70[_0x4975a9(0x6b3)]()&&_0x28dc70[_0x4975a9(0x4d2)]())return _0x28dc70;}else return VisuMZ[_0x4975a9(0x61c)][_0x4975a9(0x7c2)][_0x4975a9(0x4b1)](this);}},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x29f)]=function(){const _0xb85837=_0x5bdce9,_0x4c624f=this[_0xb85837(0xa8a)]()[_0xb85837(0xa9f)];if(_0x4c624f[_0xb85837(0x16b)](/RANDOM/i))return![];if(_0x4c624f[_0xb85837(0x16b)](/ALL (?:ALLY|ALLIES|FRIEND|FRIENDS)/i))return![];if(_0x4c624f[_0xb85837(0x16b)](/ALL (?:ENEMY|ENEMIES|FOE|FOES)/i))return![];return VisuMZ['BattleCore'][_0xb85837(0x7c2)]['call'](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x6c1)]=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x707)],Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x707)]=function(){const _0x36a9e9=_0x5bdce9;let _0x35b9b3=[];return this['isBattleCoreTargetScope']()?_0x35b9b3=this[_0x36a9e9(0x478)]():_0x35b9b3=VisuMZ[_0x36a9e9(0x61c)][_0x36a9e9(0x6c1)][_0x36a9e9(0x4b1)](this),_0x35b9b3=this[_0x36a9e9(0x411)](_0x35b9b3),_0x35b9b3;},Game_Action['prototype'][_0x5bdce9(0x478)]=function(){const _0x182535=_0x5bdce9;let _0x4cefb8=[];const _0x19c031=String(this[_0x182535(0xa8a)]()[_0x182535(0xa9f)]),_0x35cb86=VisuMZ[_0x182535(0x61c)][_0x182535(0xaa5)](this['item'](),_0x182535(0x637));if(VisuMZ[_0x182535(0x61c)]['JS'][_0x35cb86]){if(_0x182535(0x283)===_0x182535(0x283)){_0x4cefb8=VisuMZ[_0x182535(0x61c)][_0x182535(0x6c1)]['call'](this);const _0x1e89b7=VisuMZ['BattleCore'][_0x182535(0xaa5)](this[_0x182535(0xa8a)](),_0x182535(0x637));return _0x4cefb8=VisuMZ[_0x182535(0x61c)]['JS'][_0x1e89b7][_0x182535(0x4b1)](this,this['subject'](),_0x4cefb8),this[_0x182535(0x665)](_0x4cefb8);}else{let _0x849be6='battleUIOffsetY';if(this[_0x182535(0x17f)](_0x849be6))return this[_0x182535(0x1f3)][_0x849be6];return this[_0x182535(0x1f3)][_0x849be6]=this[_0x182535(0xf6)](this[_0x182535(0xad6)]()),this['_cache'][_0x849be6];}}if(_0x19c031[_0x182535(0x16b)](/(\d+) RANDOM ANY/i)){let _0x33fed7=Number(RegExp['$1']);while(_0x33fed7--){const _0x1aa982=Math[_0x182535(0xaf7)](0x2)===0x0?this['opponentsUnit']():this['friendsUnit']();_0x4cefb8[_0x182535(0x838)](_0x1aa982['trueRandomTarget']());}return this[_0x182535(0x665)](_0x4cefb8);}if(_0x19c031['match'](/(\d+) RANDOM (?:ENEMY|ENEMIES|FOE|FOES)/i)){if('AkrQJ'!==_0x182535(0x698)){let _0x26b6ad=Number(RegExp['$1']);while(_0x26b6ad--){_0x4cefb8[_0x182535(0x838)](this['opponentsUnit']()[_0x182535(0x2db)]());}return this[_0x182535(0x665)](_0x4cefb8);}else _0x356a45[_0x182535(0x61c)]['Window_BattleLog_performReflection'][_0x182535(0x4b1)](this,_0x3448bf),this[_0x182535(0x670)]();}if(_0x19c031[_0x182535(0x16b)](/(\d+) RANDOM (?:ALLY|ALLIES|FRIEND|FRIENDS)/i)){if(_0x182535(0x687)===_0x182535(0x18d))return this['attackAnimationId1']();else{let _0xa0de11=Number(RegExp['$1']);while(_0xa0de11--){_0x4cefb8['push'](this[_0x182535(0x712)]()[_0x182535(0x2db)]());}return this[_0x182535(0x665)](_0x4cefb8);}}if(_0x19c031[_0x182535(0x16b)](/ALL (?:ALLY|ALLIES|FRIEND|FRIENDS) (?:BUT|EXCEPT) (?:USER|SELF)/i))return _0x4cefb8[_0x182535(0x838)](...this[_0x182535(0x712)]()[_0x182535(0xed)]()[_0x182535(0xb85)](_0x3f724f=>_0x3f724f!==this[_0x182535(0xb83)]())),this['repeatTargets'](_0x4cefb8);return VisuMZ[_0x182535(0x61c)][_0x182535(0x6c1)][_0x182535(0x4b1)](this);},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x8af)]=function(_0x535f83){const _0x5e46ff=_0x5bdce9,_0x15f5d3=[];for(let _0x59d6f2=0x0;_0x59d6f2<this[_0x5e46ff(0x4cf)]();_0x59d6f2++){_0x15f5d3['push'](_0x535f83[_0x5e46ff(0x2db)]());}return _0x15f5d3;},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x411)]=function(_0x1821d4){const _0x2f9fcc=_0x5bdce9;if(!this['item']())return _0x1821d4;const _0x5b4f18=this[_0x2f9fcc(0xa8a)]()[_0x2f9fcc(0x664)];if(_0x5b4f18[_0x2f9fcc(0x16b)](/(?:BUT|EXCEPT) (?:USER|SELF)/i)){if(_0x2f9fcc(0xa48)===_0x2f9fcc(0xa48))_0x1821d4['remove'](this['subject']());else{if(_0x456b04[_0x2f9fcc(0x4c3)])return![];return _0x3c4189['BattleCore'][_0x2f9fcc(0xb00)][_0x2f9fcc(0x4b1)](this);}}return _0x1821d4;},VisuMZ['BattleCore'][_0x5bdce9(0x282)]=Game_Action['prototype']['itemEffectAddAttackState'],Game_Action['prototype'][_0x5bdce9(0x33b)]=function(_0x695b43,_0x1a051e){const _0x3fc4c9=_0x5bdce9;VisuMZ[_0x3fc4c9(0x61c)][_0x3fc4c9(0x282)][_0x3fc4c9(0x4b1)](this,_0x695b43,_0x1a051e);if(!_0x695b43[_0x3fc4c9(0x606)]())return;for(const _0x335b39 of this[_0x3fc4c9(0xb83)]()[_0x3fc4c9(0xab8)]()){if(_0x335b39===_0x695b43['deathStateId']()){if('ClUKM'===_0x3fc4c9(0x570))return;else{let _0x42c89f=_0x1a051e['value1'];_0x42c89f*=_0x695b43[_0x3fc4c9(0x5b7)](_0x335b39),_0x42c89f*=this[_0x3fc4c9(0xb83)]()['attackStatesRate'](_0x335b39),_0x42c89f*=this[_0x3fc4c9(0x2ef)](_0x695b43),Math[_0x3fc4c9(0x3df)]()<_0x42c89f&&(_0x695b43[_0x3fc4c9(0xb87)]=!![],this[_0x3fc4c9(0xa4c)](_0x695b43));}}}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x28d)]=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0xb79)],Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0xb79)]=function(_0x170aef,_0x38217f){const _0x1a0148=_0x5bdce9;VisuMZ[_0x1a0148(0x61c)][_0x1a0148(0x28d)][_0x1a0148(0x4b1)](this,_0x170aef,_0x38217f);if(!_0x170aef['isImmortal']())return;if(_0x38217f[_0x1a0148(0x357)]!==_0x170aef[_0x1a0148(0x555)]())return;let _0x46abe6=_0x38217f[_0x1a0148(0x2c6)];!this[_0x1a0148(0x38f)]()&&(_0x46abe6*=_0x170aef[_0x1a0148(0x5b7)](_0x38217f[_0x1a0148(0x357)]),_0x46abe6*=this['lukEffectRate'](_0x170aef)),Math[_0x1a0148(0x3df)]()<_0x46abe6&&(_0x170aef[_0x1a0148(0xb87)]=!![],this[_0x1a0148(0xa4c)](_0x170aef));},VisuMZ[_0x5bdce9(0x61c)]['Game_Action_applyGlobal']=Game_Action['prototype'][_0x5bdce9(0x1c0)],Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x1c0)]=function(){const _0x4a79d6=_0x5bdce9;VisuMZ[_0x4a79d6(0x61c)][_0x4a79d6(0x963)][_0x4a79d6(0x4b1)](this),this['applyGlobalCommonEventNotetags'](),this['resetResultSwitches']();},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x891)]=function(){const _0x4d81e7=_0x5bdce9;if(!SceneManager[_0x4d81e7(0x5ea)]())return;const _0x5e8800=/<COMMON (?:EVENT|EVENTS):[ ](.*)>/gi,_0x525678=this[_0x4d81e7(0xa8a)]()[_0x4d81e7(0x664)][_0x4d81e7(0x16b)](_0x5e8800);if(_0x525678){if(_0x4d81e7(0x3ac)===_0x4d81e7(0x9f3))_0x197169['BattleCore'][_0x4d81e7(0x2e1)][_0x4d81e7(0x4b1)](this,_0xc8db8b);else for(const _0x2c2b5c of _0x525678){if(_0x4d81e7(0x106)!=='LOYNP'){if(!this[_0x4d81e7(0xa8a)]()[_0x4d81e7(0x95c)]['critical'])return 0x0;let _0x561804=_0x3df502[_0x4d81e7(0x61c)][_0x4d81e7(0x76e)][_0x4d81e7(0x40d)][_0x4d81e7(0x143)][_0x4d81e7(0x4b1)](this,_0x9e8e21);return _0x561804=this['_multipliers']['criticalHitRate']*_0x561804+this[_0x4d81e7(0x167)][_0x4d81e7(0x6d0)],_0x561804;}else{if(!_0x2c2b5c)continue;_0x2c2b5c[_0x4d81e7(0x16b)](_0x5e8800);const _0x580988=String(RegExp['$1'])['split'](',')[_0x4d81e7(0x782)](_0x3c1dc3=>String(_0x3c1dc3)[_0x4d81e7(0x92d)]()),_0x4f03f8=_0x580988[_0x4d81e7(0x782)](_0x46a9af=>DataManager['getCommonEventIdWithName'](_0x46a9af));for(const _0x5b555f of _0x4f03f8){const _0x4063e6=$dataCommonEvents[_0x5b555f];_0x4063e6&&$gameTemp[_0x4d81e7(0x32e)](_0x5b555f);}}}}},DataManager[_0x5bdce9(0x292)]=function(_0x5de0bd){const _0x11fc76=_0x5bdce9;_0x5de0bd=_0x5de0bd[_0x11fc76(0x673)]()[_0x11fc76(0x92d)](),this[_0x11fc76(0x564)]=this['_commonEventIDs']||{};if(this['_commonEventIDs'][_0x5de0bd])return this[_0x11fc76(0x564)][_0x5de0bd];for(const _0x407376 of $dataCommonEvents){if(!_0x407376)continue;let _0x4da13a=_0x407376[_0x11fc76(0x74e)];_0x4da13a=_0x4da13a[_0x11fc76(0x3a7)](/\x1I\[(\d+)\]/gi,''),_0x4da13a=_0x4da13a['replace'](/\\I\[(\d+)\]/gi,''),this[_0x11fc76(0x564)][_0x4da13a['toUpperCase']()[_0x11fc76(0x92d)]()]=_0x407376['id'];}return this['_commonEventIDs'][_0x5de0bd]||0x0;},Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x47f)]=function(){const _0x5c523d=_0x5bdce9;if(!SceneManager[_0x5c523d(0x5ea)]())return;const _0x5d8a88=VisuMZ[_0x5c523d(0x61c)][_0x5c523d(0x76e)][_0x5c523d(0x817)];_0x5d8a88[_0x5c523d(0x5db)]&&$gameSwitches['setValue'](_0x5d8a88[_0x5c523d(0x5db)],![]);_0x5d8a88[_0x5c523d(0x463)]&&$gameSwitches[_0x5c523d(0xadf)](_0x5d8a88['SwitchMissEvade'],![]);_0x5d8a88[_0x5c523d(0x2ed)]&&(_0x5c523d(0x33f)!==_0x5c523d(0x33f)?(this['_shadowScaleX']=this[_0x5c523d(0x371)]??0x1,this['_shadowScaleY']=this['_shadowScaleY']??0x1,this[_0x5c523d(0x748)][_0x5c523d(0x91d)]['x']=this[_0x5c523d(0xa9b)]['scale']['x']*this[_0x5c523d(0x371)],this[_0x5c523d(0x748)]['scale']['y']=this[_0x5c523d(0xa9b)][_0x5c523d(0x91d)]['y']*this[_0x5c523d(0x183)]):$gameVariables[_0x5c523d(0xadf)](_0x5d8a88[_0x5c523d(0x2ed)],0x0));if(_0x5d8a88['VariableHeal']){if(_0x5c523d(0x195)===_0x5c523d(0x195))$gameVariables[_0x5c523d(0xadf)](_0x5d8a88['VariableHeal'],0x0);else return![];}},Game_Action['prototype'][_0x5bdce9(0x5af)]=function(_0x648353){const _0x16c8f2=_0x5bdce9;if(!SceneManager[_0x16c8f2(0x5ea)]())return;if(!_0x648353)return;const _0x55fea8=_0x648353[_0x16c8f2(0x2c3)](),_0x21dade=VisuMZ[_0x16c8f2(0x61c)]['Settings']['Mechanics'];_0x21dade[_0x16c8f2(0x5db)]&&_0x55fea8[_0x16c8f2(0x580)]&&(_0x16c8f2(0x2b6)!=='EDrKE'?_0x588128=_0x5a78c7['CastMagical']:$gameSwitches['setValue'](_0x21dade[_0x16c8f2(0x5db)],!![]));if(_0x21dade[_0x16c8f2(0x463)]&&(_0x55fea8[_0x16c8f2(0xaef)]||_0x55fea8[_0x16c8f2(0x728)])){if(_0x16c8f2(0x495)===_0x16c8f2(0x1c2)){if(!this['isOptionsCommandAdded']())return;const _0x2111ef=this[_0x16c8f2(0x865)](),_0x35d75f=_0x3ef2fc[_0x16c8f2(0x61c)]['Settings'][_0x16c8f2(0x71c)][_0x16c8f2(0x8f6)],_0x23c241=_0x2111ef===_0x16c8f2(0x160)?_0x280555[_0x16c8f2(0x2d5)]:_0x16c8f2(0x5a6)[_0x16c8f2(0x824)](_0x35d75f,_0x395727[_0x16c8f2(0x2d5)]),_0x5b29ea=this['isOptionsCommandEnabled']();this[_0x16c8f2(0x97b)](_0x23c241,_0x16c8f2(0x2d5),_0x5b29ea);}else $gameSwitches[_0x16c8f2(0xadf)](_0x21dade[_0x16c8f2(0x463)],!![]);}if(_0x21dade[_0x16c8f2(0x2ed)]){if(_0x16c8f2(0x743)===_0x16c8f2(0xa74)){const _0x33039a=_0x588d49[_0x16c8f2(0xb0d)]();this[_0x16c8f2(0x838)](_0x16c8f2(0x4de),[_0x244b93],_0x51aec6,_0x467ed1),this['push'](_0x16c8f2(0x6d2),_0x49e2cb,_0x33039a[_0x16c8f2(0x666)],_0x33039a[_0x16c8f2(0x51a)],_0x270249,![],'Linear'),this[_0x16c8f2(0x838)]('requestMotion',[_0x1d325a],_0x16c8f2(0x545)),this[_0x16c8f2(0x838)](_0x16c8f2(0x3ba)),this[_0x16c8f2(0x838)](_0x16c8f2(0x319),[_0x39f442],_0x16c8f2(0x6c4));}else{let _0x239216=$gameVariables[_0x16c8f2(0x9b5)](_0x21dade[_0x16c8f2(0x2ed)]);_0x55fea8[_0x16c8f2(0x78f)]>0x0&&(_0x239216+=Math['abs'](_0x55fea8[_0x16c8f2(0x78f)])),$gameVariables['setValue'](_0x21dade[_0x16c8f2(0x2ed)],_0x239216);}}if(_0x21dade[_0x16c8f2(0x235)]){if(_0x16c8f2(0x818)===_0x16c8f2(0x818)){let _0x219d7e=$gameVariables[_0x16c8f2(0x9b5)](_0x21dade[_0x16c8f2(0x235)]);_0x55fea8[_0x16c8f2(0x78f)]<0x0&&(_0x16c8f2(0x614)==='CAOnr'?(this[_0x16c8f2(0x1ed)](),this[_0x16c8f2(0x983)]=null,this[_0x16c8f2(0x75c)]=![]):_0x219d7e+=Math[_0x16c8f2(0x41b)](_0x55fea8[_0x16c8f2(0x78f)])),$gameVariables[_0x16c8f2(0xadf)](_0x21dade[_0x16c8f2(0x235)],_0x219d7e);}else{const _0x1d2c93=_0x2cbf6d[_0x16c8f2(0x664)];if(_0x1d2c93[_0x16c8f2(0x16b)](/<JS TARGETS>\s*([\s\S]*)\s*<\/JS TARGETS>/i)){const _0x43e2e8=_0x4140e7(_0x8eecdf['$1']),_0x462295=_0x2fbcad['BattleCore'][_0x16c8f2(0xaa5)](_0x1eca6b,_0x16c8f2(0x637));_0x22e1a8[_0x16c8f2(0x61c)][_0x16c8f2(0x5b0)](_0x43e2e8,_0x462295);}if(_0x1d2c93[_0x16c8f2(0x16b)](/<JS COMMAND (?:VISIBLE|SHOW|HIDE)>\s*([\s\S]*)\s*<\/JS COMMAND (?:VISIBLE|SHOW|HIDE)>/i)){const _0x4931a4=_0x5be5b4(_0x4b50a7['$1']),_0x529c91=_0x51eae['BattleCore'][_0x16c8f2(0xaa5)](_0x14d738,'CommandVisible');_0x3b9260[_0x16c8f2(0x61c)][_0x16c8f2(0x415)](_0x4931a4,_0x529c91);}}}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x9b4)]=Game_BattlerBase['prototype'][_0x5bdce9(0x3b5)],Game_BattlerBase['prototype'][_0x5bdce9(0x3b5)]=function(){const _0x172a3e=_0x5bdce9;VisuMZ['BattleCore'][_0x172a3e(0x9b4)][_0x172a3e(0x4b1)](this),this[_0x172a3e(0x858)]();},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x858)]=function(){const _0x9f7428=_0x5bdce9;this[_0x9f7428(0x87b)]=![];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x245)]=Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0xf7)],Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0xf7)]=function(){const _0x39d62c=_0x5bdce9;this[_0x39d62c(0x1f3)]={},VisuMZ['BattleCore']['Game_BattlerBase_refresh'][_0x39d62c(0x4b1)](this);},Game_BattlerBase[_0x5bdce9(0x768)]['checkCacheKey']=function(_0x186516){const _0xcae54c=_0x5bdce9;return this['_cache']=this[_0xcae54c(0x1f3)]||{},this[_0xcae54c(0x1f3)][_0x186516]!==undefined;},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x33a)]=function(){const _0x27f06d=_0x5bdce9;if(this[_0x27f06d(0x1f3)][_0x27f06d(0x33a)]!==undefined)return this[_0x27f06d(0x1f3)]['hardDamageCap'];const _0x2e62e8=/<DAMAGE CAP:[ ](\d+)>/i,_0x37b9e0=this['traitObjects']()['map'](_0x279519=>_0x279519&&_0x279519[_0x27f06d(0x664)][_0x27f06d(0x16b)](_0x2e62e8)?Number(RegExp['$1']):0x0);let _0x844f60=_0x37b9e0[_0x27f06d(0x12d)]>0x0?Math[_0x27f06d(0xa5e)](..._0x37b9e0):0x0;if(_0x844f60<=0x0)_0x844f60=VisuMZ[_0x27f06d(0x61c)][_0x27f06d(0x76e)]['Damage'][_0x27f06d(0x210)];return this[_0x27f06d(0x1f3)][_0x27f06d(0x33a)]=_0x844f60,this['_cache']['hardDamageCap'];},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0xdc)]=function(){const _0x233d36=_0x5bdce9;if(this['_cache'][_0x233d36(0x6f1)]!==undefined)return this[_0x233d36(0x1f3)][_0x233d36(0x6f1)];let _0x550efe=VisuMZ['BattleCore'][_0x233d36(0x76e)][_0x233d36(0x40d)][_0x233d36(0x4da)];const _0x412d25=/<SOFT DAMAGE CAP:[ ]([\+\-]\d+)([%%])>/i,_0x3db78c=this[_0x233d36(0xb51)]()['map'](_0x2f0ac2=>_0x2f0ac2&&_0x2f0ac2['note'][_0x233d36(0x16b)](_0x412d25)?Number(RegExp['$1'])/0x64:0x0);return _0x550efe=_0x3db78c['reduce']((_0x1b7bf1,_0xaa5da1)=>_0x1b7bf1+_0xaa5da1,_0x550efe),this[_0x233d36(0x1f3)]['softDamageCap']=_0x550efe,this[_0x233d36(0x1f3)][_0x233d36(0x6f1)][_0x233d36(0xaa0)](0.01,0x1);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x2be)]=Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x31b)],Game_BattlerBase['prototype'][_0x5bdce9(0x31b)]=function(){const _0x5ecadd=_0x5bdce9;VisuMZ[_0x5ecadd(0x61c)]['Game_BattlerBase_die'][_0x5ecadd(0x4b1)](this),SceneManager[_0x5ecadd(0x5ea)]()&&this['requestMotion'](_0x5ecadd(0x325));},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0xb0d)]=function(){const _0x7455ae=_0x5bdce9;if(!SceneManager['isSceneBattle']())return null;if(!SceneManager[_0x7455ae(0x352)][_0x7455ae(0x25a)])return null;return SceneManager[_0x7455ae(0x352)][_0x7455ae(0x25a)]['findTargetSprite'](this);},Game_BattlerBase[_0x5bdce9(0x768)]['svBattlerAnchorX']=function(){const _0x2c953c=_0x5bdce9;return VisuMZ[_0x2c953c(0x61c)]['Settings'][_0x2c953c(0xe6)][_0x2c953c(0x1e5)];},Game_BattlerBase['prototype']['svBattlerAnchorY']=function(){const _0x429b8e=_0x5bdce9;return VisuMZ[_0x429b8e(0x61c)][_0x429b8e(0x76e)]['Actor'][_0x429b8e(0x192)];},Game_BattlerBase[_0x5bdce9(0x768)]['svBattlerShadowVisible']=function(){const _0x4c05a9=_0x5bdce9;return this['isActor']&&this[_0x4c05a9(0x491)]()?VisuMZ[_0x4c05a9(0x61c)][_0x4c05a9(0x76e)][_0x4c05a9(0xe6)]['Shadow']:VisuMZ[_0x4c05a9(0x61c)][_0x4c05a9(0x76e)][_0x4c05a9(0x14a)]['Shadow'];},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x987)]=function(){return!![];},Game_BattlerBase[_0x5bdce9(0x768)]['battleUIOffsetX']=function(){return 0x0;},Game_BattlerBase[_0x5bdce9(0x768)]['battleUIOffsetY']=function(){return 0x0;},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x979)]=function(_0x426ce6){const _0xdc1e30=_0x5bdce9;if(!_0x426ce6)return 0x0;let _0x3efaea=0x0;const _0x2fdaef=_0x426ce6[_0xdc1e30(0x664)];_0x2fdaef[_0xdc1e30(0x16b)](/<BATTLE UI OFFSET X:[ ]([\+\-]\d+)>/i)&&(_0x3efaea+=Number(RegExp['$1']));if(_0x2fdaef[_0xdc1e30(0x16b)](/<BATTLE UI OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i)){if(_0xdc1e30(0x2ae)!==_0xdc1e30(0x289))_0x3efaea+=Number(RegExp['$1']);else return _0x2e9067[_0xdc1e30(0x9bd)];}return _0x3efaea;},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0xf6)]=function(_0x336b33){const _0x5e2918=_0x5bdce9;if(!_0x336b33)return 0x0;let _0x161e89=0x0;const _0x5b1280=_0x336b33[_0x5e2918(0x664)];_0x5b1280[_0x5e2918(0x16b)](/<BATTLE UI OFFSET Y:[ ]([\+\-]\d+)>/i)&&(_0x161e89+=Number(RegExp['$1']));if(_0x5b1280[_0x5e2918(0x16b)](/<BATTLE UI OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i)){if('sUmOO'!=='sUmOO'){if(!_0x105c06[_0x5e2918(0xa03)])return;if(this['constructor']===_0x56192c)return;const _0x2958f7=_0x500d50[_0x5e2918(0x61c)]['Settings'][_0x5e2918(0x9d6)],_0x380da4=new _0x538585();_0x380da4['anchor']['x']=_0x2958f7[_0x5e2918(0x1e5)],_0x380da4[_0x5e2918(0x887)]['y']=_0x2958f7['AnchorY'],_0x380da4[_0x5e2918(0x91d)]['x']=_0x380da4[_0x5e2918(0x91d)]['y']=_0x2958f7[_0x5e2918(0x736)],this['_hpGaugeSprite']=_0x380da4,this['addChild'](this[_0x5e2918(0x53c)]),_0xe867e[_0x5e2918(0x69e)]&&_0x768ab4[_0x5e2918(0x89c)](this[_0x5e2918(0x53c)]);}else _0x161e89+=Number(RegExp['$2']);}return _0x161e89;},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x708)]=Game_BattlerBase['prototype'][_0x5bdce9(0xa73)],Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0xa73)]=function(_0x160911){const _0x4fa44a=_0x5bdce9;if(_0x160911===this[_0x4fa44a(0x555)]()&&this[_0x4fa44a(0x606)]())return!![];return VisuMZ[_0x4fa44a(0x61c)][_0x4fa44a(0x708)][_0x4fa44a(0x4b1)](this,_0x160911);},Game_BattlerBase[_0x5bdce9(0x768)]['isImmortal']=function(){const _0x372811=_0x5bdce9;return this[_0x372811(0x87b)];},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x78c)]=function(_0x440a05){const _0x2c433f=_0x5bdce9;if(_0x440a05){if('BKDHG'!==_0x2c433f(0x221)){const _0x552fd3=_0x2c433f(0x5a6);let _0x104525=_0x2048ba[_0x2c433f(0x9bd)],_0x15198c=_0xa7e49f['name'];const _0xb0e157=_0x40e4d5[_0x2c433f(0x664)];return _0xb0e157[_0x2c433f(0x16b)](/<DISPLAY ICON: (\d+)>/i)&&(_0x104525=_0x691189(_0x5c1a71['$1'])),_0xb0e157[_0x2c433f(0x16b)](/<DISPLAY TEXT: (.*)>/i)&&(_0x15198c=_0x3f5aee(_0x121073['$1'])),_0x552fd3[_0x2c433f(0x824)](_0x104525,_0x15198c);}else this[_0x2c433f(0x901)]();}else this[_0x2c433f(0x981)]();},Game_BattlerBase[_0x5bdce9(0x768)]['addImmortal']=function(){const _0x43ce3e=_0x5bdce9;if(this[_0x43ce3e(0x9a3)]())return;this['_immortal']=!![],this[_0x43ce3e(0xb87)]=![];},Game_BattlerBase[_0x5bdce9(0x768)]['removeImmortal']=function(){const _0x2a549a=_0x5bdce9,_0x4c9682=this[_0x2a549a(0x4d2)]();this['_immortal']=![];_0x4c9682&&this[_0x2a549a(0xb87)]&&this[_0x2a549a(0x31b)]();this['_deathStateApplied']=![],this[_0x2a549a(0xf7)]();if(this[_0x2a549a(0x9a3)]()&&_0x4c9682){if(_0x2a549a(0x50c)===_0x2a549a(0x7eb)){const _0x446d72=_0x1b2738[_0x2a549a(0xad6)]();_0x444681[_0x2a549a(0x61c)]['Scene_Battle_selectNextCommand'][_0x2a549a(0x4b1)](this);if(_0x446d72){if(_0x446d72===_0x214eb3[_0x2a549a(0xad6)]())return;if(_0x446d72===_0x6c420f[_0x2a549a(0xb40)])return;if(_0x446d72[_0x2a549a(0xb0d)]())_0x446d72[_0x2a549a(0xb0d)]()['stepBack']();}}else this['performCollapse'](),this[_0x2a549a(0xb69)]();}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x4bb)]=Game_Action[_0x5bdce9(0x768)]['numRepeats'],Game_Action['prototype'][_0x5bdce9(0x4bd)]=function(){const _0x165027=_0x5bdce9;return this[_0x165027(0xa8a)]()?VisuMZ['BattleCore'][_0x165027(0x4bb)][_0x165027(0x4b1)](this):0x0;},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x7ff)]=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x39f)],Game_Action[_0x5bdce9(0x768)]['setAttack']=function(){const _0x24fd8a=_0x5bdce9;this['subject']()&&this[_0x24fd8a(0xb83)]()[_0x24fd8a(0x9fc)]()?VisuMZ['BattleCore'][_0x24fd8a(0x7ff)][_0x24fd8a(0x4b1)](this):this['clear']();},VisuMZ[_0x5bdce9(0x61c)]['Game_BattlerBase_canAttack']=Game_BattlerBase['prototype'][_0x5bdce9(0x9fc)],Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x9fc)]=function(){const _0x3b011a=_0x5bdce9;if(!this[_0x3b011a(0x6b8)]())return![];return VisuMZ[_0x3b011a(0x61c)]['Game_BattlerBase_canAttack'][_0x3b011a(0x4b1)](this);},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x6b8)]=function(){const _0x5bb136=_0x5bdce9;for(const _0x962fc4 of this[_0x5bb136(0xb51)]()){if('RzRNn'!==_0x5bb136(0x7ac)){if(!_0x962fc4)continue;if(_0x962fc4[_0x5bb136(0x664)]['match'](/<(?:ATTACK SEAL|SEAL ATTACK)>/i))return![];}else _0x3e65be[_0x5bb136(0x61c)][_0x5bb136(0x85e)]&&_0x4680f9[_0x5bb136(0x61c)][_0x5bb136(0x85e)][_0x5bb136(0x4b1)](this,_0xf44140),_0x252d62['BattleCore'][_0x5bb136(0x57e)](_0x2dc174);}return!![];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x609)]=Game_Action[_0x5bdce9(0x768)][_0x5bdce9(0x464)],Game_Action[_0x5bdce9(0x768)]['setGuard']=function(){const _0x22b2a5=_0x5bdce9;this[_0x22b2a5(0xb83)]()['canGuard']()&&VisuMZ[_0x22b2a5(0x61c)]['Game_Action_setGuard'][_0x22b2a5(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x3c8)]=Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x277)],Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x277)]=function(){const _0xb4110c=_0x5bdce9;if(!this['canGuardBattleCore']())return![];return VisuMZ[_0xb4110c(0x61c)][_0xb4110c(0x3c8)][_0xb4110c(0x4b1)](this);},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x9d2)]=function(){const _0x2f25cf=_0x5bdce9;for(const _0x256554 of this[_0x2f25cf(0xb51)]()){if(!_0x256554)continue;if(_0x256554['note'][_0x2f25cf(0x16b)](/<(?:GUARD SEAL|SEAL GUARD)>/i))return![];}return!![];},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0xaf2)]=function(){const _0x3551ec=_0x5bdce9;for(const _0x4fb62a of this[_0x3551ec(0xb51)]()){if(_0x3551ec(0x89e)!==_0x3551ec(0x89e)){if(!_0x5834bd[_0x3551ec(0x9f2)])return;if(!_0x108a74[_0x3551ec(0x5ea)]())return;if(this[_0x3551ec(0x9a3)]())return;if(this['isHidden']())return;if(_0x5b07e4[_0x3551ec(0x664)]['match'](/<(?:REGENERATE|REGEN|DEGEN|DOT|SLIP)[ ]ANIMATION:[ ](\d+)>/i)){const _0xbf9c2a=_0x62066b(_0x26315a['$1']);_0x4bd93c[_0x3551ec(0x9b3)]([this],_0xbf9c2a,![],![]);}}else{if(!_0x4fb62a)continue;if(_0x4fb62a[_0x3551ec(0x664)][_0x3551ec(0x16b)](/<(?:ITEM SEAL|SEAL ITEM|SEAL ITEMS)>/i))return![];}}return!![];},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x390)]=function(){const _0x124f43=_0x5bdce9;return VisuMZ[_0x124f43(0x61c)]['Settings'][_0x124f43(0x817)][_0x124f43(0x2a1)];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x9cb)]=Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x4d4)],Game_Battler['prototype'][_0x5bdce9(0x4d4)]=function(){const _0x44d6f5=_0x5bdce9;if(SceneManager[_0x44d6f5(0x5ea)]()){if('uuFdZ'!=='WzJEc'){if(BattleManager['isTpb']()){if(this[_0x44d6f5(0x7a0)]()<=0x0)return;}else{if($gameTroop[_0x44d6f5(0x7a0)]()<=0x0)return;}}else _0x4a4f93[_0x44d6f5(0x61c)][_0x44d6f5(0x20f)][_0x44d6f5(0x4b1)](this,_0x1e8b58),this[_0x44d6f5(0x670)]();}if(SceneManager[_0x44d6f5(0x5ea)]()&&BattleManager[_0x44d6f5(0x985)]()&&this[_0x44d6f5(0x873)]===Graphics[_0x44d6f5(0x2bc)])return;this[_0x44d6f5(0x873)]=Graphics['frameCount'];SceneManager['isSceneBattle']()&&this[_0x44d6f5(0x9dd)](_0x44d6f5(0x68f));VisuMZ['BattleCore']['Game_Battler_regenerateAll'][_0x44d6f5(0x4b1)](this);if(SceneManager[_0x44d6f5(0x5ea)]()){if(_0x44d6f5(0x775)===_0x44d6f5(0x775))this[_0x44d6f5(0x214)](),this[_0x44d6f5(0x9dd)](_0x44d6f5(0x8a8));else return _0x38508d['BattleCore']['Settings']['AutoBattle'][_0x44d6f5(0x990)];}},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x214)]=function(){const _0x2ef559=_0x5bdce9;if(SceneManager[_0x2ef559(0x5ea)]())for(const _0x791f4b of this[_0x2ef559(0xb51)]()){if(!_0x791f4b)continue;this['onRegeneratePlayStateAnimation'](_0x791f4b);}},Game_Battler['prototype'][_0x5bdce9(0x4a5)]=function(_0x27a6f8){const _0x38d7b5=_0x5bdce9;if(!Imported['VisuMZ_0_CoreEngine'])return;if(!SceneManager[_0x38d7b5(0x5ea)]())return;if(this[_0x38d7b5(0x9a3)]())return;if(this[_0x38d7b5(0x90e)]())return;if(_0x27a6f8[_0x38d7b5(0x664)][_0x38d7b5(0x16b)](/<(?:REGENERATE|REGEN|DEGEN|DOT|SLIP)[ ]ANIMATION:[ ](\d+)>/i)){const _0x2063bd=Number(RegExp['$1']);$gameTemp['requestFauxAnimation']([this],_0x2063bd,![],![]);}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x1f2)]=Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x21c)],Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x21c)]=function(){const _0x5491e2=_0x5bdce9;this[_0x5491e2(0x9dd)]('PreStartTurnJS'),VisuMZ[_0x5491e2(0x61c)][_0x5491e2(0x1f2)][_0x5491e2(0x4b1)](this),this[_0x5491e2(0x9dd)](_0x5491e2(0x17c));},VisuMZ['BattleCore'][_0x5bdce9(0x224)]=Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x45b)],Game_Battler['prototype'][_0x5bdce9(0x45b)]=function(){const _0x212149=_0x5bdce9;this[_0x212149(0x9dd)](_0x212149(0xb81)),VisuMZ[_0x212149(0x61c)][_0x212149(0x224)][_0x212149(0x4b1)](this),this[_0x212149(0x9dd)](_0x212149(0x7b9));},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x9dd)]=function(_0x2107cd){const _0x12d14d=_0x5bdce9;if(this['_tempBattler']||this['_tempActor'])return;const _0x507f62=VisuMZ['BattleCore'][_0x12d14d(0x76e)][_0x12d14d(0x817)];if(_0x507f62[_0x2107cd])_0x507f62[_0x2107cd][_0x12d14d(0x4b1)](this);for(const _0x286171 of this[_0x12d14d(0xb51)]()){if(!_0x286171)continue;key=VisuMZ[_0x12d14d(0x61c)][_0x12d14d(0xaa5)](_0x286171,_0x2107cd),VisuMZ[_0x12d14d(0x61c)]['JS'][key]&&VisuMZ[_0x12d14d(0x61c)]['JS'][key][_0x12d14d(0x4b1)](this,this,this,_0x286171,0x0);}},Game_Battler[_0x5bdce9(0x768)]['chantStyle']=function(){const _0x470194=_0x5bdce9;return VisuMZ[_0x470194(0x61c)][_0x470194(0x76e)][_0x470194(0xe6)][_0x470194(0x97d)]||![];},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x6cb)]=function(){const _0x2a8178=_0x5bdce9;if(this['isWaiting']()){if(this[_0x2a8178(0x191)]()){if(this['_actions']['some'](_0x3a2ec7=>_0x3a2ec7[_0x2a8178(0xa8a)]()&&_0x3a2ec7[_0x2a8178(0xfb)]())){if(_0x2a8178(0x986)==='fkWij')this[_0x2a8178(0xaff)]=0x8;else return!![];}}else{if(this[_0x2a8178(0x53e)][_0x2a8178(0x82d)](_0x5c884f=>_0x5c884f[_0x2a8178(0xa8a)]()&&_0x5c884f[_0x2a8178(0xe7)]()))return!![];}}if(BattleManager[_0x2a8178(0x985)]()&&this['_tpbState']==='casting'){if(this[_0x2a8178(0x191)]()){if(_0x2a8178(0x268)!==_0x2a8178(0x851))return this[_0x2a8178(0x76b)]()&&this[_0x2a8178(0x76b)]()['item']()&&this[_0x2a8178(0x76b)]()[_0x2a8178(0xfb)]();else{if(!_0x27db5f[_0x2a8178(0x5ea)]())return;if(!_0x20c8f9[_0x2a8178(0x27b)])return;_0x5a294c[_0x2a8178(0x866)](_0x1d339c,_0x4272c1);const _0x349c3b=_0x56201d[_0x2a8178(0xb48)](),_0x3600b4=_0x50b05a[_0x2a8178(0xaec)];if(!_0x349c3b)return;_0x25fdc2[_0x2a8178(0x7ee)](0x0,_0x55aac5['Duration'],_0x5316e3['EasingType']);if(_0x3600b4)_0x349c3b[_0x2a8178(0x73c)](_0x2a8178(0x3f5));}}else return _0x2a8178(0x8dc)===_0x2a8178(0x259)?this[_0x2a8178(0x3b2)]*this[_0x2a8178(0x6ee)]():this[_0x2a8178(0x76b)]()&&this['currentAction']()[_0x2a8178(0xa8a)]()&&this[_0x2a8178(0x76b)]()['isMagicSkill']();}return![];},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0xb31)]=function(){const _0x2e9a86=_0x5bdce9;if(BattleManager[_0x2e9a86(0x985)]()&&this[_0x2e9a86(0x309)]===_0x2e9a86(0xa17)){if(this['chantStyle']())return this[_0x2e9a86(0x76b)]()&&this[_0x2e9a86(0x76b)]()['item']()&&!this[_0x2e9a86(0x76b)]()[_0x2e9a86(0xfb)]();else{if(_0x2e9a86(0x18e)!=='WSyhV'){_0x29c142[_0x2e9a86(0x768)][_0x2e9a86(0x11b)][_0x2e9a86(0x4b1)](this);const _0x21c22c=this[_0x2e9a86(0x19d)]();_0x21c22c===_0x2e9a86(0x5f1)&&this[_0x2e9a86(0xafd)]();}else return this['currentAction']()&&this[_0x2e9a86(0x76b)]()[_0x2e9a86(0xa8a)]()&&!this[_0x2e9a86(0x76b)]()[_0x2e9a86(0xe7)]();}}return![];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x6c9)]=Game_Battler['prototype'][_0x5bdce9(0x403)],Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x403)]=function(){const _0x1ca140=_0x5bdce9;VisuMZ[_0x1ca140(0x61c)][_0x1ca140(0x6c9)][_0x1ca140(0x4b1)](this),this[_0x1ca140(0x43f)]=[];},Game_Battler['prototype'][_0x5bdce9(0x968)]=function(){const _0x31ea1d=_0x5bdce9;if(!this[_0x31ea1d(0x43f)])this[_0x31ea1d(0x403)]();return this['_damagePopupArray'][_0x31ea1d(0x12d)]>0x0;},Game_Battler['prototype'][_0x5bdce9(0x189)]=function(){const _0x252e83=_0x5bdce9;if(!SceneManager[_0x252e83(0x5ea)]())return;if(!this[_0x252e83(0x43f)])this['clearDamagePopup']();this[_0x252e83(0x51d)]();const _0x3cb71e=this['battler']();if(_0x3cb71e)_0x3cb71e['setupDamagePopup']();},Game_Battler['prototype'][_0x5bdce9(0x51d)]=function(){const _0xd7dbd2=_0x5bdce9,_0x2fd142=this[_0xd7dbd2(0x2c3)]();if(_0x2fd142['missed']||_0x2fd142[_0xd7dbd2(0x728)]){if('bnIby'===_0xd7dbd2(0x59d))this[_0xd7dbd2(0x16a)]=this[_0xd7dbd2(0x99a)](this[_0xd7dbd2(0x16a)],this[_0xd7dbd2(0x3ce)],_0x2669cd,_0x137fdb,_0x4fe8bc);else{const _0x91fd70=JsonEx[_0xd7dbd2(0x87e)](_0x2fd142);_0x91fd70[_0xd7dbd2(0x825)]=![],_0x91fd70[_0xd7dbd2(0x9c0)]=0x0,this['_damagePopupArray']['push'](_0x91fd70);}}if(_0x2fd142['hpAffected']){const _0x445141=JsonEx[_0xd7dbd2(0x87e)](_0x2fd142);_0x445141['missed']=![],_0x445141['evaded']=![],_0x445141[_0xd7dbd2(0x9c0)]=0x0,this['_damagePopupArray'][_0xd7dbd2(0x838)](_0x445141);}if(_0x2fd142[_0xd7dbd2(0x9c0)]!==0x0){const _0x572b59=JsonEx['makeDeepCopy'](_0x2fd142);_0x572b59[_0xd7dbd2(0xaef)]=![],_0x572b59[_0xd7dbd2(0x728)]=![],_0x572b59[_0xd7dbd2(0x825)]=![],this['_damagePopupArray'][_0xd7dbd2(0x838)](_0x572b59);}},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x30e)]=function(){const _0x5d193f=_0x5bdce9;if(!this['_damagePopupArray'])this['clearDamagePopup']();return VisuMZ[_0x5d193f(0x61c)][_0x5d193f(0x76e)][_0x5d193f(0x40d)]['NewPopupBottom']?this['_damagePopupArray'][_0x5d193f(0x52e)]():this[_0x5d193f(0x43f)][_0x5d193f(0xa49)]();},Game_Battler[_0x5bdce9(0x768)]['setupTextPopup']=function(_0x19dbe8,_0x295ec5){const _0x59a774=_0x5bdce9;if(!SceneManager[_0x59a774(0x5ea)]())return;if(!this[_0x59a774(0xb0d)]())return;if(_0x19dbe8[_0x59a774(0x12d)]<=0x0)return;_0x295ec5=_0x295ec5||{},_0x295ec5[_0x59a774(0x9ac)]=_0x295ec5['textColor']||_0x59a774(0xaf6),_0x295ec5[_0x59a774(0x65f)]=_0x295ec5[_0x59a774(0x65f)]||[0x0,0x0,0x0,0x0],_0x295ec5[_0x59a774(0x43e)]=_0x295ec5['flashDuration']||0x0,this[_0x59a774(0xb0d)]()[_0x59a774(0xafa)](_0x19dbe8,_0x295ec5);},Game_Battler['prototype']['setupIconTextPopup']=function(_0x34c1dc,_0x4cea77,_0x4d30e9){const _0x2f2052=_0x5bdce9;if(!SceneManager[_0x2f2052(0x5ea)]())return;if(!this[_0x2f2052(0xb0d)]())return;if(_0x4cea77[_0x2f2052(0x12d)]<=0x0)return;_0x4d30e9=_0x4d30e9||{},_0x4d30e9[_0x2f2052(0x9ac)]=_0x4d30e9[_0x2f2052(0x9ac)]||'#ffffff',_0x4d30e9['flashColor']=_0x4d30e9[_0x2f2052(0x65f)]||[0x0,0x0,0x0,0x0],_0x4d30e9[_0x2f2052(0x43e)]=_0x4d30e9[_0x2f2052(0x43e)]||0x0,this['battler']()[_0x2f2052(0x974)](_0x34c1dc,_0x4cea77,_0x4d30e9);},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x66a)]=function(){const _0x406099=_0x5bdce9;if(this['isHidden']())return![];if(this[_0x406099(0x4d2)]()&&this[_0x406099(0x6ed)]())return!![];if(this[_0x406099(0x203)]()&&this[_0x406099(0x3a3)]()){if(this[_0x406099(0x9a3)]()&&this[_0x406099(0x4a0)]())return![];}else{if(this[_0x406099(0x9a3)]())return![];}return!![];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x647)]=Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x593)],Game_Battler['prototype']['clearMotion']=function(){const _0x21ddb8=_0x5bdce9;VisuMZ[_0x21ddb8(0x61c)][_0x21ddb8(0x647)]['call'](this),this[_0x21ddb8(0x8f1)]();},Game_Battler[_0x5bdce9(0x768)]['canBattlerMove']=function(){return!![];},Game_Battler['prototype'][_0x5bdce9(0x5c9)]=function(){return![];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xad8)]=Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x81c)],Game_Battler['prototype'][_0x5bdce9(0x81c)]=function(_0x18ac90){const _0x40d77c=_0x5bdce9;VisuMZ[_0x40d77c(0x61c)][_0x40d77c(0xad8)][_0x40d77c(0x4b1)](this,_0x18ac90),this[_0x40d77c(0x821)](_0x18ac90);},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x821)]=function(_0x38011c){const _0x1a028b=_0x5bdce9;this[_0x1a028b(0x781)](![]),this[_0x1a028b(0x185)]=undefined,this[_0x1a028b(0x9fa)]=undefined;},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x912)]=Game_Battler['prototype'][_0x5bdce9(0x9d5)],Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x9d5)]=function(){const _0x501265=_0x5bdce9;VisuMZ[_0x501265(0x61c)][_0x501265(0x912)][_0x501265(0x4b1)](this),this[_0x501265(0x3db)]();},Game_Battler[_0x5bdce9(0x768)]['onBattleEndBattleCore']=function(){const _0x4663a5=_0x5bdce9;this['_forcedHomeX']=undefined,this[_0x4663a5(0x9fa)]=undefined;},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x3f7)]=Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x187)],Game_Battler['prototype']['performActionStart']=function(_0x1e98f8){const _0x43c83d=_0x5bdce9;VisuMZ[_0x43c83d(0x61c)]['Game_Battler_performActionStart'][_0x43c83d(0x4b1)](this,_0x1e98f8);if(!_0x1e98f8[_0x43c83d(0x8b8)]()){if('soIVQ'===_0x43c83d(0x157)){const _0x5e1ddf=this[_0x43c83d(0xb0d)]();_0x5e1ddf&&_0x5e1ddf[_0x43c83d(0x373)]();}else{if(!_0x295ba4[_0x43c83d(0x5ea)]())return![];if(!_0x366c3a)return![];if(!_0x3a117b[_0x43c83d(0xa8a)]())return![];if(_0x39ef70[_0x43c83d(0xa8a)]()['note']['match'](/<CUSTOM ACTION SEQUENCE>/i))return!![];if(_0xde127f[_0x43c83d(0x91f)](_0x4339c5[_0x43c83d(0xa8a)]()))return!![];return![];}}this['setBattlerFlip'](![]);},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x27c)]=function(){const _0x40a192=_0x5bdce9,_0xb675ed=this[_0x40a192(0x5a8)];this[_0x40a192(0x5a8)]=![];if(BattleManager['isActiveTpb']()&&this['isInputting']()){const _0x5f38c5=this[_0x40a192(0xb0d)]();if(_0x5f38c5&&_0xb675ed)_0x5f38c5[_0x40a192(0x373)]();return;}const _0x4e8913=this[_0x40a192(0xb0d)]();if(_0x4e8913)_0x4e8913['stepBack']();this[_0x40a192(0x781)](![]),this[_0x40a192(0xb69)]();},Game_Battler[_0x5bdce9(0x768)]['performActionMotions']=function(_0x358321){const _0x3721f7=_0x5bdce9;if(_0x358321[_0x3721f7(0x514)]()){if('JeQAJ'==='JeQAJ')this['performAttack']();else return _0x208ef5[_0x3721f7(0x61c)]['Game_Interpreter_command301']['call'](this,_0x127c60),_0x28e4c9['setEventCallback'](_0x468056=>{const _0x40962a=_0x3721f7;this['_branch'][this[_0x40962a(0x83b)]]=_0x468056;}),!![];}else{if(_0x358321[_0x3721f7(0x8b8)]()){if(_0x3721f7(0x446)!==_0x3721f7(0x446)){if(_0x37a898['_battler']&&_0xeae511[_0x3721f7(0x976)]){if(_0x4fc07d[_0x3721f7(0x976)][_0x3721f7(0x491)]()&&_0x2583c4['_battler'][_0x3721f7(0x203)]())return 0x1;else{if(_0x566373[_0x3721f7(0x976)][_0x3721f7(0x491)]()&&_0x2ad4da[_0x3721f7(0x976)][_0x3721f7(0x203)]())return-0x1;}}}else this[_0x3721f7(0x319)](_0x3721f7(0xe9));}else{if(_0x358321['isMagical']())this[_0x3721f7(0x319)](_0x3721f7(0x293));else{if(_0x358321['isSkill']()){if(_0x358321[_0x3721f7(0xa8a)]()[_0x3721f7(0x95c)][_0x3721f7(0x900)]>0x0){if(_0x3721f7(0xb2b)!=='gJgto')this[_0x3721f7(0x722)]();else return this['isBattleCoreTargetScope']()&&!this[_0x3721f7(0x4ab)]()?this[_0x3721f7(0x36e)]():_0x31de42[_0x3721f7(0x61c)][_0x3721f7(0xb08)][_0x3721f7(0x4b1)](this);}else this[_0x3721f7(0x319)](_0x3721f7(0x895));}else _0x358321[_0x3721f7(0x846)]()&&this['requestMotion']('item');}}}},Game_Battler['prototype'][_0x5bdce9(0xacd)]=function(){const _0x274796=_0x5bdce9;return $dataSystem[_0x274796(0x300)][0x0];},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x870)]=function(){const _0x488907=_0x5bdce9,_0x19d70b=this[_0x488907(0xacd)]();return _0x19d70b?_0x19d70b[_0x488907(0x1dc)]:0x0;},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0xaeb)]=function(_0x21c789){const _0x29e31e=_0x5bdce9;if(!$gameSystem[_0x29e31e(0x68b)]())return;const _0x2f5ff3=this[_0x29e31e(0xb0d)](),_0x5b0bc2=_0x21c789[_0x29e31e(0xb0d)]();if(!_0x2f5ff3||!_0x5b0bc2)return;const _0x316244=_0x5b0bc2[_0x29e31e(0x8f0)],_0x3ab4fc=_0x5b0bc2['_baseY'];this[_0x29e31e(0xa3e)](_0x316244,_0x3ab4fc,0x0,![],'Linear',-0x1),_0x2f5ff3['updatePosition']();const _0x32c118=VisuMZ[_0x29e31e(0x61c)][_0x29e31e(0x76e)][_0x29e31e(0x964)];let _0x5a9a15=(_0x5b0bc2[_0x29e31e(0x3b2)]+_0x2f5ff3[_0x29e31e(0x3b2)])/0x2;_0x5a9a15*=this['isActor']()?0x1:-0x1;let _0x426e49=_0x32c118[_0x29e31e(0xa5a)]*(this[_0x29e31e(0x491)]()?0x1:-0x1);_0x21c789[_0x29e31e(0x8a2)](_0x5a9a15,_0x426e49,0x0,![],'Linear'),_0x5b0bc2[_0x29e31e(0x37f)]();},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x319)]=function(_0x1de9ed){const _0x3d7f5b=_0x5bdce9;if(SceneManager['isSceneBattle']()){const _0x6658c1=this[_0x3d7f5b(0xb0d)]();if(_0x6658c1){_0x6658c1[_0x3d7f5b(0xae5)](_0x1de9ed);if([_0x3d7f5b(0x81d),'thrust','missile'][_0x3d7f5b(0x8ed)](_0x1de9ed)){if(_0x3d7f5b(0x5d7)!==_0x3d7f5b(0x5d7))return 0x0;else this[_0x3d7f5b(0xb2e)]();}}}this[_0x3d7f5b(0x8f1)]();},Game_Battler['prototype'][_0x5bdce9(0xb2e)]=function(){},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x2d6)]=function(_0x49654c){const _0x1c3eaa=_0x5bdce9;if(SceneManager[_0x1c3eaa(0x5ea)]()){const _0x367be0=this[_0x1c3eaa(0xb0d)]();if(_0x367be0)_0x367be0[_0x1c3eaa(0x460)](_0x49654c);}},Game_Battler[_0x5bdce9(0x768)]['startAttackWeaponAnimation']=function(){const _0x2ad80d=_0x5bdce9;if(SceneManager[_0x2ad80d(0x5ea)]()){const _0x4b128a=this[_0x2ad80d(0x870)]();this[_0x2ad80d(0x2d6)](_0x4b128a);}},Game_Battler['prototype']['performCastAnimation']=function(_0x2a231b,_0x11ffc3){const _0x4e5aa9=_0x5bdce9;if(!_0x2a231b)return;if(!_0x2a231b['item']())return;if(_0x2a231b[_0x4e5aa9(0x514)]())return;if(_0x2a231b[_0x4e5aa9(0x8b8)]())return;if(_0x2a231b[_0x4e5aa9(0x846)]())return;let _0x298f25=0x0;const _0x2311b9=VisuMZ['BattleCore']['Settings'][_0x4e5aa9(0x964)],_0x34b11f=_0x2a231b[_0x4e5aa9(0xa8a)]()[_0x4e5aa9(0x664)];if(_0x34b11f['match'](/<CAST ANIMATION: (\d+)>/i))_0x298f25=Number(RegExp['$1']);else{if(_0x34b11f[_0x4e5aa9(0x16b)](/<NO CAST ANIMATION>/i))return;else{if(_0x2a231b['isCertainHit']()){if(_0x4e5aa9(0xa0d)!==_0x4e5aa9(0xa0d)){if(!_0x241afb[_0x4e5aa9(0x5ea)]())return;if(!_0x35d606[_0x4e5aa9(0x27b)])return;_0x130267[_0x4e5aa9(0x866)](_0x2f5d83,_0x525d69);const _0x3a13ee=_0x487360['getLastPluginCommandInterpreter'](),_0xf9f1a0=_0x21ff3d[_0x4e5aa9(0xaec)];if(!_0x3a13ee)return;_0x3fdf74[_0x4e5aa9(0x7ee)](_0x48b658[_0x4e5aa9(0x47c)],_0x574677['Duration'],_0x309a75[_0x4e5aa9(0x752)]);if(_0xf9f1a0)_0x3a13ee[_0x4e5aa9(0x73c)](_0x4e5aa9(0x3f5));}else _0x298f25=_0x2311b9[_0x4e5aa9(0x80a)];}else{if(_0x2a231b[_0x4e5aa9(0x5c8)]())_0x298f25=_0x2311b9[_0x4e5aa9(0x142)];else _0x2a231b[_0x4e5aa9(0xfb)]()&&(_0x298f25=_0x2311b9[_0x4e5aa9(0x5fe)]);}}}if(_0x298f25>0x0){if(_0x4e5aa9(0x380)!==_0x4e5aa9(0x380))return this[_0x4e5aa9(0x74a)]()['anchorY'];else $gameTemp['requestAnimation']([this],_0x298f25,!!_0x11ffc3);}},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x8a3)]=function(){const _0x2263aa=_0x5bdce9;SoundManager[_0x2263aa(0x151)]();let _0x1841f1=VisuMZ[_0x2263aa(0x61c)]['Settings']['ActionSequence'][_0x2263aa(0x2bd)];if(_0x1841f1>0x0){if(Imported[_0x2263aa(0x9f2)])$gameTemp[_0x2263aa(0x9b3)]([this],_0x1841f1);else{if(_0x2263aa(0x1d1)!=='baMiF')$gameTemp['requestAnimation']([this],_0x1841f1);else{if(this[_0x2263aa(0x94f)]<=0x0)return;const _0x46d842=this[_0x2263aa(0xa07)]-this['_jumpDuration'],_0x3897d4=this['_jumpWholeDuration']/0x2,_0x23c1c9=this['_jumpMaxHeight'],_0x36cad9=-_0x23c1c9/_0x4d5573[_0x2263aa(0x710)](_0x3897d4,0x2);this[_0x2263aa(0x80d)]=_0x36cad9*_0x2e32f0[_0x2263aa(0x710)](_0x46d842-_0x3897d4,0x2)+_0x23c1c9,this[_0x2263aa(0x94f)]--;if(this['_jumpDuration']<=0x0)return this[_0x2263aa(0x644)]();}}}},VisuMZ['BattleCore'][_0x5bdce9(0x5bb)]=Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x15f)],Game_Battler['prototype'][_0x5bdce9(0x15f)]=function(){const _0x3d7004=_0x5bdce9;VisuMZ[_0x3d7004(0x61c)][_0x3d7004(0x5bb)]['call'](this),this[_0x3d7004(0x779)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x451)]=Game_Battler[_0x5bdce9(0x768)]['performMiss'],Game_Battler['prototype'][_0x5bdce9(0x960)]=function(){const _0x31af90=_0x5bdce9;VisuMZ[_0x31af90(0x61c)][_0x31af90(0x451)][_0x31af90(0x4b1)](this),this[_0x31af90(0x779)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x445)]=Game_Battler[_0x5bdce9(0x768)]['performEvasion'],Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x2d8)]=function(){const _0x13a18a=_0x5bdce9;VisuMZ[_0x13a18a(0x61c)]['Game_Battler_performEvasion'][_0x13a18a(0x4b1)](this),this['performFlinch']();},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x779)]=function(){const _0x1565bb=_0x5bdce9;if(!$gameSystem[_0x1565bb(0x68b)]())return;if(this[_0x1565bb(0x5a8)])return;this[_0x1565bb(0x5a8)]=!![];const _0x3a4551=this[_0x1565bb(0xb0d)]();if(_0x3a4551)_0x3a4551[_0x1565bb(0x135)]();},Game_Battler[_0x5bdce9(0x768)]['requestMotionRefresh']=function(){const _0x1c0529=_0x5bdce9;if(this['isDead']()&&this[_0x1c0529(0xad4)]!=='dead'){this[_0x1c0529(0x319)](_0x1c0529(0x325));return;}if(this[_0x1c0529(0x9a3)]()&&this[_0x1c0529(0xad4)]===_0x1c0529(0x325))return;if(!!this[_0x1c0529(0x3be)])return;if(this[_0x1c0529(0x203)]()){if(_0x1c0529(0x610)===_0x1c0529(0x37a))_0x50cde3['command119']([_0xf18e]);else{if(!this[_0x1c0529(0x925)]()&&this!==BattleManager['_subject']){if(this['battler']())this[_0x1c0529(0xb0d)]()['refreshMotion']();}this[_0x1c0529(0x8f1)]();return;}}if(this[_0x1c0529(0xad4)]==='victory')return;if(this[_0x1c0529(0xad4)]===_0x1c0529(0x6ec)&&!BattleManager['isInputting']())return;if(this[_0x1c0529(0xad4)]===_0x1c0529(0xe9)&&!BattleManager[_0x1c0529(0x923)]())return;this[_0x1c0529(0x593)]();if(this[_0x1c0529(0xb0d)]()&&BattleManager[_0x1c0529(0x923)]()){this[_0x1c0529(0xb0d)]()[_0x1c0529(0xadc)](),this['clearFreezeMotion']();return;}},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x925)]=function(){const _0x5a016b=_0x5bdce9;if(!this[_0x5a016b(0x3a3)]())return![];const _0x5c041b=this[_0x5a016b(0xb0d)]();if(!_0x5c041b)return![];const _0x47a955=_0x5c041b[_0x5a016b(0x3d6)];if(!_0x47a955)return![];const _0x24989e=_0x47a955[_0x5a016b(0x9eb)];return _0x24989e&&!_0x24989e['loop'];},Game_Battler[_0x5bdce9(0x768)]['isBattlerFlipped']=function(){const _0x1098b5=_0x5bdce9;return this[_0x1098b5(0x6e1)];},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x781)]=function(_0x45f97b){const _0xb44d14=_0x5bdce9;if(!$gameSystem[_0xb44d14(0x68b)]())return;this[_0xb44d14(0x6e1)]=_0x45f97b;const _0x2b2a93=this[_0xb44d14(0xb0d)]();if(_0x2b2a93)_0x2b2a93[_0xb44d14(0x700)]();},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0xa7e)]=function(_0x17730b,_0x480eeb,_0x14af0c){const _0x5bacae=_0x5bdce9;if(!$gameSystem[_0x5bacae(0x68b)]())return;const _0x49c9c6=this[_0x5bacae(0xb0d)]();if(!_0x49c9c6)return;if(_0x17730b===_0x49c9c6[_0x5bacae(0x8f0)])return;let _0x5acddf=![];if(this[_0x5bacae(0x491)]()){if(_0x5bacae(0x7f5)==='zbXkO'){if(_0x17730b>_0x49c9c6[_0x5bacae(0x8f0)])_0x5acddf=!![];if(_0x17730b<_0x49c9c6['_baseX'])_0x5acddf=![];}else _0x518049[_0x5bacae(0x29b)]([_0x4fcf04]);}else{if(this['isEnemy']()){if(_0x17730b>_0x49c9c6[_0x5bacae(0x8f0)])_0x5acddf=![];if(_0x17730b<_0x49c9c6[_0x5bacae(0x8f0)])_0x5acddf=!![];}};this[_0x5bacae(0x781)](_0x14af0c?!_0x5acddf:_0x5acddf),_0x49c9c6[_0x5bacae(0x700)]();},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x8a2)]=function(_0x2232c7,_0xd5df8c,_0x54b935,_0x1d6aa7,_0x54eca9){const _0x5a12f2=_0x5bdce9;if(!$gameSystem[_0x5a12f2(0x68b)]())return;const _0x724ea6=this[_0x5a12f2(0xb0d)]();if(!_0x724ea6)return;if(_0x1d6aa7)this[_0x5a12f2(0xa7e)](_0x2232c7+_0x724ea6[_0x5a12f2(0x8f0)],_0xd5df8c+_0x724ea6['_baseY'],![]);_0x2232c7+=_0x724ea6[_0x5a12f2(0x8f0)]-_0x724ea6[_0x5a12f2(0x666)],_0xd5df8c+=_0x724ea6[_0x5a12f2(0x4c9)]-_0x724ea6['_homeY'],_0x724ea6[_0x5a12f2(0x120)](_0x2232c7,_0xd5df8c,_0x54b935);if(Imported[_0x5a12f2(0x9f2)])_0x724ea6['setMoveEasingType'](_0x54eca9||_0x5a12f2(0x32d));},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0xa3e)]=function(_0x17ae7c,_0x587f30,_0x54ea43,_0x287a9f,_0x5a5330,_0x15a46d){const _0x5cc3cb=_0x5bdce9;if(!$gameSystem[_0x5cc3cb(0x68b)]())return;const _0x1ab613=this[_0x5cc3cb(0xb0d)]();if(!_0x1ab613)return;if(_0x17ae7c===Infinity||_0x587f30===Infinity)return;if(isNaN(_0x17ae7c)||isNaN(_0x587f30))return;_0x15a46d=_0x15a46d||0x0;if(_0x15a46d>0x0){if(_0x1ab613[_0x5cc3cb(0x8f0)]>_0x17ae7c)_0x17ae7c+=_0x1ab613[_0x5cc3cb(0x3b2)]/0x2+_0x15a46d;if(_0x1ab613[_0x5cc3cb(0x8f0)]<_0x17ae7c)_0x17ae7c-=_0x1ab613[_0x5cc3cb(0x3b2)]/0x2+_0x15a46d;}if(_0x287a9f)this['setBattlerFacePoint'](_0x17ae7c,_0x587f30,![]);_0x17ae7c-=_0x1ab613[_0x5cc3cb(0x666)],_0x587f30-=_0x1ab613[_0x5cc3cb(0x51a)],_0x1ab613[_0x5cc3cb(0x120)](_0x17ae7c,_0x587f30,_0x54ea43);if(Imported[_0x5cc3cb(0x9f2)])_0x1ab613[_0x5cc3cb(0x6e5)](_0x5a5330||'Linear');},Game_Battler['prototype']['moveBattlerHomeDistance']=function(_0x1d6e7a,_0x3c20dd,_0x194dd6,_0xd2acc4,_0x730ce1){const _0x465de5=_0x5bdce9;if(!$gameSystem[_0x465de5(0x68b)]())return;const _0x43259e=this[_0x465de5(0xb0d)]();if(!_0x43259e)return;if(_0xd2acc4)this[_0x465de5(0xa7e)](_0x1d6e7a+_0x43259e['_baseX'],_0x3c20dd+_0x43259e['_baseY'],![]);_0x1d6e7a+=_0x43259e['_homeX'],_0x3c20dd+=_0x43259e[_0x465de5(0x51a)],_0x43259e['startHomeMove'](_0x1d6e7a,_0x3c20dd,_0x194dd6,_0x730ce1),this[_0x465de5(0x185)]=_0x1d6e7a,this[_0x465de5(0x9fa)]=_0x3c20dd;},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x476)]=function(_0x559a55,_0x2f5827,_0x155c87,_0x12444b,_0x903e92,_0x44e62c){const _0x2bf42a=_0x5bdce9;if(!$gameSystem['isSideView']())return;const _0x509d74=this['battler']();if(!_0x509d74)return;_0x44e62c=_0x44e62c||0x0;if(_0x44e62c>0x0){if(_0x2bf42a(0x6f8)===_0x2bf42a(0x6f8)){if(_0x509d74[_0x2bf42a(0x8f0)]>_0x559a55)_0x559a55+=_0x509d74[_0x2bf42a(0x3b2)]/0x2+_0x44e62c;if(_0x509d74[_0x2bf42a(0x8f0)]<_0x559a55)_0x559a55-=_0x509d74[_0x2bf42a(0x3b2)]/0x2+_0x44e62c;}else return 0x1;}if(_0x12444b)this[_0x2bf42a(0xa7e)](_0x559a55,_0x2f5827,![]);_0x509d74[_0x2bf42a(0x8b7)](_0x559a55,_0x2f5827,_0x155c87,_0x903e92),this[_0x2bf42a(0x185)]=_0x559a55,this[_0x2bf42a(0x9fa)]=_0x2f5827;},Game_Battler['prototype'][_0x5bdce9(0xb56)]=function(_0x2eeef0,_0x5ba980,_0x19224c){const _0x20cbf0=_0x5bdce9;if(!$gameSystem[_0x20cbf0(0x68b)]())return;const _0x545ed6=this[_0x20cbf0(0xb0d)]();if(!_0x545ed6)return;_0x545ed6['startFloat'](_0x2eeef0,_0x5ba980,_0x19224c);},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x4ba)]=function(_0xd38539,_0x151e54){const _0x19c790=_0x5bdce9;if(!$gameSystem[_0x19c790(0x68b)]())return;const _0x1a9740=this[_0x19c790(0xb0d)]();if(!_0x1a9740)return;_0x1a9740[_0x19c790(0x275)](_0xd38539,_0x151e54);},Game_Battler['prototype'][_0x5bdce9(0x353)]=function(_0xf08d3e,_0x381cdf,_0x26217d,_0x258f10){const _0x342be1=_0x5bdce9;if(!$gameSystem[_0x342be1(0x68b)]())return;const _0x60d7cc=this[_0x342be1(0xb0d)]();if(!_0x60d7cc)return;_0x60d7cc[_0x342be1(0x501)](_0xf08d3e,_0x381cdf,_0x26217d,_0x258f10);},Game_Battler['prototype'][_0x5bdce9(0x6f2)]=function(_0x5638f3,_0x382e14,_0x467b70,_0x467ae5){const _0x35a826=_0x5bdce9;if(!$gameSystem[_0x35a826(0x68b)]())return;const _0x2ae1cb=this[_0x35a826(0xb0d)]();if(!_0x2ae1cb)return;this[_0x35a826(0x491)]()&&(_0x5638f3*=-0x1,_0x382e14*=-0x1),_0x2ae1cb[_0x35a826(0x53f)](_0x5638f3,_0x382e14,_0x467b70,_0x467ae5);},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x547)]=function(_0x282c52,_0x154b92,_0x30ea84,_0x18de07){const _0x281dba=_0x5bdce9;if(!$gameSystem[_0x281dba(0x68b)]())return;const _0x177687=this[_0x281dba(0xb0d)]();if(!_0x177687)return;_0x177687[_0x281dba(0x3c2)](_0x282c52,_0x154b92,_0x30ea84,_0x18de07);},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x7ea)]=function(_0x5b793f,_0x522978,_0x169b36){const _0x56beaa=_0x5bdce9;if(!$gameSystem[_0x56beaa(0x68b)]())return;const _0x58d9d7=this[_0x56beaa(0xb0d)]();if(!_0x58d9d7)return;_0x58d9d7[_0x56beaa(0x462)](_0x5b793f,_0x522978,_0x169b36);},Game_Battler[_0x5bdce9(0x768)]['clearFreezeMotion']=function(){const _0x51cf72=_0x5bdce9,_0x2d7e4e=!!this[_0x51cf72(0x3be)];this[_0x51cf72(0x3be)]=undefined,_0x2d7e4e&&(this[_0x51cf72(0xb69)](),this[_0x51cf72(0x34b)]());},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x34b)]=function(){const _0x118af5=_0x5bdce9;if(!SceneManager[_0x118af5(0x5ea)]())return;const _0x14eba2=this[_0x118af5(0xb0d)]();if(!_0x14eba2)return;let _0x359d3a=this[_0x118af5(0x491)]()?_0x14eba2[_0x118af5(0x826)]:_0x14eba2[_0x118af5(0x3d6)][_0x118af5(0x826)];_0x359d3a&&_0x359d3a[_0x118af5(0x5aa)](0x0);},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0xb5b)]=function(_0x347328,_0x4efdf8,_0x55107b){const _0x3c37a7=_0x5bdce9;if(this['isEnemy']()&&!this['hasSvBattler']())return;let _0xf95000=0x0,_0x2cbd45=0x0;_0x347328['match'](/ATTACK[ ](\d+)/i)&&(_0x2cbd45=Number(RegExp['$1']),_0x2cbd45--);if(this['isActor']()){const _0x12907d=this['weapons']();_0xf95000=_0x12907d[_0x2cbd45]?_0x12907d[_0x2cbd45][_0x3c37a7(0xa36)]:0x0;}else this[_0x3c37a7(0x203)]()&&(_0x3c37a7(0x4cb)===_0x3c37a7(0x844)?_0x1d10d0=_0x2968ca(_0x487b27['$1']):_0xf95000=this[_0x3c37a7(0x74a)]()[_0x3c37a7(0xa36)]||0x0);const _0xbcaa43=$dataSystem[_0x3c37a7(0x300)][_0xf95000];_0x347328[_0x3c37a7(0x16b)](/attack/i)&&(_0x347328=[_0x3c37a7(0x90c),'swing',_0x3c37a7(0xae1)][_0xbcaa43[_0x3c37a7(0x900)]]||'swing'),this[_0x3c37a7(0x3be)]={'motionType':_0x347328,'weaponImageId':_0x4efdf8?_0xbcaa43['weaponImageId']:0x0,'pattern':_0x55107b};},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x8c8)]=function(_0x3191f9){const _0x290dc7=_0x5bdce9;if(!_0x3191f9)return![];return _0x3191f9[_0x290dc7(0x712)]()===this[_0x290dc7(0x712)]();},Game_Battler[_0x5bdce9(0x768)]['isOpponent']=function(_0x2fbec6){const _0x5eba9f=_0x5bdce9;if(!_0x2fbec6)return![];return _0x2fbec6[_0x5eba9f(0x41c)]()===this[_0x5eba9f(0x712)]();},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x8bc)]=function(){return![];},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x8bc)]=function(){const _0x30c215=_0x5bdce9;return this[_0x30c215(0xb8b)]()['match'](/\$/i);},Game_Enemy[_0x5bdce9(0x768)]['hasStaticSvBattler']=function(){const _0x2ba968=_0x5bdce9;return this[_0x2ba968(0x3a3)]()&&this[_0x2ba968(0x269)]()[_0x2ba968(0x16b)](/\$/i);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x14e)]=Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x5aa)],Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x5aa)]=function(_0x4cc833){const _0xe4147d=_0x5bdce9;VisuMZ['BattleCore'][_0xe4147d(0x14e)][_0xe4147d(0x4b1)](this,_0x4cc833),this[_0xe4147d(0x6b4)]();},Game_Actor['prototype'][_0x5bdce9(0x6b4)]=function(){const _0x501876=_0x5bdce9;this[_0x501876(0xff)]='',this[_0x501876(0xad6)]()&&this[_0x501876(0xad6)]()['note']['match'](/<BATTLE (?:IMAGE|PORTRAIT):[ ](.*)>/i)&&(this[_0x501876(0xff)]=String(RegExp['$1']));},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x4cc)]=function(){const _0x2806d8=_0x5bdce9;if(this['getBattlePortrait']()!=='')return this[_0x2806d8(0x67d)]();else{if(Imported['VisuMZ_1_MainMenuCore']&&this[_0x2806d8(0x3e6)]()!==''){if(_0x2806d8(0x754)!==_0x2806d8(0x754))this[_0x2806d8(0x80d)]=0x0;else return this[_0x2806d8(0x3e6)]();}}return'';},Game_Actor[_0x5bdce9(0x768)]['getBattlePortrait']=function(){const _0x58f21c=_0x5bdce9;if(this[_0x58f21c(0xff)]===undefined)this[_0x58f21c(0x6b4)]();return this[_0x58f21c(0xff)];},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x7fc)]=function(_0x2119d0){const _0x37344f=_0x5bdce9;if(this['_battlePortrait']===undefined)this[_0x37344f(0x6b4)]();this['_battlePortrait']=_0x2119d0;if(SceneManager[_0x37344f(0x5ea)]()&&$gameParty['battleMembers']()[_0x37344f(0x8ed)](this)){if(_0x37344f(0x829)===_0x37344f(0x732))return this['isForOpponentBattleCore']();else{const _0x30be48=SceneManager['_scene'][_0x37344f(0x3e2)];if(_0x30be48)_0x30be48['refreshActorPortrait'](this);}}},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x3e7)]=function(){return!![];},Game_Actor['prototype'][_0x5bdce9(0x777)]=function(){const _0x3e10bc=_0x5bdce9;if(!this['isConfused']()&&BattleManager['_autoBattle'])return!![];return Game_Battler[_0x3e10bc(0x768)][_0x3e10bc(0x777)][_0x3e10bc(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x3a5)]=Game_Actor['prototype']['makeActionList'],Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x811)]=function(){const _0x155da1=_0x5bdce9;if(BattleManager[_0x155da1(0xb63)]&&!ConfigManager[_0x155da1(0x25c)])return _0x155da1(0xaab)!==_0x155da1(0xa7d)?this['makeActionListAutoAttack']():_0x1f565d[_0x155da1(0x61c)][_0x155da1(0x76e)][_0x155da1(0x40d)]['VarianceFormulaJS'][_0x155da1(0x4b1)](this,_0x1ef7ae,_0x40c597);else{return VisuMZ[_0x155da1(0x61c)]['Game_Actor_makeActionList'][_0x155da1(0x4b1)](this);;}},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x1f9)]=function(){const _0x15b6a5=_0x5bdce9,_0x504b05=[],_0x4f128e=new Game_Action(this);return _0x4f128e[_0x15b6a5(0x39f)](),_0x504b05['push'](_0x4f128e),_0x504b05;},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x877)]=function(){const _0x279cfa=_0x5bdce9;if(this['currentClass']()[_0x279cfa(0x664)][_0x279cfa(0x16b)](/<BATTLE COMMANDS>\s*([\s\S]*)\s*<\/BATTLE COMMANDS>/i))return String(RegExp['$1'])[_0x279cfa(0x761)](/[\r\n]+/);else{if(_0x279cfa(0x5d5)!==_0x279cfa(0x5d5))this['_baseX']=0x0,this[_0x279cfa(0x4c9)]=0x0,this[_0x279cfa(0x16a)]=0x0,this[_0x279cfa(0x3ce)]=0x0,this[_0x279cfa(0x91e)]=0x0,this[_0x279cfa(0x8ff)]=0x0,this[_0x279cfa(0x7aa)]=_0x279cfa(0x32d),this[_0x279cfa(0x80d)]=0x0,this['_jumpMaxHeight']=0x0,this[_0x279cfa(0x94f)]=0x0,this['_jumpWholeDuration']=0x0,this[_0x279cfa(0x546)]=0xff,this[_0x279cfa(0x65b)]=0x0,this[_0x279cfa(0x5d0)]=0x0,this['_opacityEasing']='Linear',this[_0x279cfa(0xa60)]=0x0,this[_0x279cfa(0xaea)]=0x0,this['_angleDuration']=0x0,this['_angleWholeDuration']=0x0,this[_0x279cfa(0x1da)]=_0x279cfa(0x32d),this['_angleRevertOnFinish']=!![],this[_0x279cfa(0xa23)]=0x0,this[_0x279cfa(0x1c7)]=0x0,this[_0x279cfa(0x35e)]=0x0,this[_0x279cfa(0x69a)]=0x0,this['_skewDuration']=0x0,this['_skewWholeDuration']=0x0,this['_skewEasing']=_0x279cfa(0x32d),this[_0x279cfa(0x326)]=0x1,this[_0x279cfa(0x461)]=0x1,this[_0x279cfa(0x4a9)]=0x1,this[_0x279cfa(0x739)]=0x1,this['_growDuration']=0x0,this[_0x279cfa(0xaf4)]=0x0,this[_0x279cfa(0x729)]='Linear',this[_0x279cfa(0x7b1)]=0x1,this[_0x279cfa(0xa67)]=0x0,this[_0x279cfa(0x8fb)]=0x0,this[_0x279cfa(0x1a8)]=0x0,this[_0x279cfa(0x21a)]=0x0,this[_0x279cfa(0x953)]=_0x279cfa(0x32d);else return VisuMZ['BattleCore'][_0x279cfa(0x76e)][_0x279cfa(0x59c)][_0x279cfa(0x2a2)];}},Game_Actor['prototype']['svBattlerAnchorX']=function(){const _0x311fa3=_0x5bdce9;if(this['_cache'][_0x311fa3(0x1f4)]!==undefined)return this['_cache'][_0x311fa3(0x1f4)];if(this[_0x311fa3(0xad6)]()['note'][_0x311fa3(0x16b)](/<SIDEVIEW ANCHOR: (.*), (.*)>/i)){if(_0x311fa3(0x19c)===_0x311fa3(0x4f3))return _0x346736[_0x311fa3(0x61c)][_0x311fa3(0x76e)][_0x311fa3(0x817)][_0x311fa3(0x2a1)];else this[_0x311fa3(0x1f3)][_0x311fa3(0x1f4)]=eval(RegExp['$1']),this[_0x311fa3(0x1f3)]['svAnchorY']=eval(RegExp['$2']);}else this[_0x311fa3(0x1f3)][_0x311fa3(0x1f4)]=Game_Battler[_0x311fa3(0x768)][_0x311fa3(0x90f)][_0x311fa3(0x4b1)](this);return this[_0x311fa3(0x1f3)]['svAnchorX'];},Game_Actor[_0x5bdce9(0x768)]['svBattlerAnchorY']=function(){const _0x414324=_0x5bdce9;if(this[_0x414324(0x1f3)][_0x414324(0xa70)]!==undefined)return this['_cache'][_0x414324(0xa70)];return this['actor']()[_0x414324(0x664)][_0x414324(0x16b)](/<SIDEVIEW ANCHOR: (.*), (.*)>/i)?(this['_cache'][_0x414324(0x1f4)]=eval(RegExp['$1']),this[_0x414324(0x1f3)][_0x414324(0xa70)]=eval(RegExp['$2'])):this['_cache'][_0x414324(0xa70)]=Game_Battler[_0x414324(0x768)]['svBattlerAnchorY'][_0x414324(0x4b1)](this),this['_cache']['svAnchorY'];},Game_Actor['prototype'][_0x5bdce9(0x892)]=function(){const _0x1f13f9=_0x5bdce9;if(this[_0x1f13f9(0x1f3)]['svShadow']!==undefined)return this[_0x1f13f9(0x1f3)][_0x1f13f9(0x1ba)];if(this[_0x1f13f9(0xad6)]()[_0x1f13f9(0x664)][_0x1f13f9(0x16b)](/<SIDEVIEW SHOW SHADOW>/i))this[_0x1f13f9(0x1f3)][_0x1f13f9(0x1ba)]=!![];else this['actor']()[_0x1f13f9(0x664)][_0x1f13f9(0x16b)](/<SIDEVIEW HIDE SHADOW>/i)?'KnHlB'!==_0x1f13f9(0x337)?(_0x1bbca6[_0x1f13f9(0x61c)][_0x1f13f9(0x71e)]['call'](this),this[_0x1f13f9(0x2cd)]=[]):this[_0x1f13f9(0x1f3)][_0x1f13f9(0x1ba)]=![]:this[_0x1f13f9(0x1f3)][_0x1f13f9(0x1ba)]=Game_Battler[_0x1f13f9(0x768)][_0x1f13f9(0x892)]['call'](this);return this[_0x1f13f9(0x1f3)][_0x1f13f9(0x1ba)];},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x987)]=function(){const _0x2d03c7=_0x5bdce9;return VisuMZ[_0x2d03c7(0x61c)][_0x2d03c7(0x76e)][_0x2d03c7(0xe6)][_0x2d03c7(0x338)];},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0xb2e)]=function(){const _0x51c39c=_0x5bdce9,_0x5ea14c=this[_0x51c39c(0xabf)](),_0x2b4b71=_0x5ea14c[0x0]?_0x5ea14c[0x0][_0x51c39c(0xa36)]:0x0,_0x346c26=$dataSystem[_0x51c39c(0x300)][_0x2b4b71];if(_0x346c26){if(_0x51c39c(0x84a)!==_0x51c39c(0x513))this[_0x51c39c(0x2d6)](_0x346c26[_0x51c39c(0x1dc)]);else return _0x5af071[_0x51c39c(0x61c)][_0x51c39c(0x76e)][_0x51c39c(0x14a)][_0x51c39c(0x295)]?this['_battler'][_0x51c39c(0x24b)]():_0x46e498[_0x51c39c(0x352)][_0x51c39c(0x22b)]&&_0x4bdbe2[_0x51c39c(0x352)]['_enemyWindow']['active']&&_0x3f4414[_0x51c39c(0x352)][_0x51c39c(0x22b)][_0x51c39c(0xa38)]['includes'](this[_0x51c39c(0x976)]);}},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x23a)]=function(_0x46dc70){const _0xa994db=_0x5bdce9;Game_Battler[_0xa994db(0x768)][_0xa994db(0x23a)][_0xa994db(0x4b1)](this,_0x46dc70),this[_0xa994db(0x924)](_0x46dc70);},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0xacd)]=function(){const _0x2c77c6=_0x5bdce9,_0x1c552f=this[_0x2c77c6(0xabf)](),_0x475e4e=_0x1c552f[0x0]?_0x1c552f[0x0][_0x2c77c6(0xa36)]:0x0;return $dataSystem['attackMotions'][_0x475e4e];},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0xab3)]=function(_0x392b15){const _0x47b9fd=_0x5bdce9;_0x392b15=_0x392b15||0x1,_0x392b15--;const _0x25ca0b=this[_0x47b9fd(0xabf)]();return _0x25ca0b[_0x392b15]?_0x25ca0b[_0x392b15][_0x47b9fd(0x6e3)]:0x0;},Game_Actor['prototype'][_0x5bdce9(0x41d)]=function(_0x10b9c2){const _0xce60c4=_0x5bdce9;_0x10b9c2=_0x10b9c2||0x1,_0x10b9c2--;const _0x33d8ff=this[_0xce60c4(0xabf)](),_0x486dc7=_0x33d8ff[_0x10b9c2]?_0x33d8ff[_0x10b9c2][_0xce60c4(0xa36)]:0x0;return $dataSystem[_0xce60c4(0x300)][_0x486dc7];},Game_Actor[_0x5bdce9(0x768)]['performAttackSlot']=function(_0xaa541d){const _0x9cb5a7=_0x5bdce9;_0xaa541d=_0xaa541d||0x1,_0xaa541d--;const _0x56a7ce=this[_0x9cb5a7(0xabf)](),_0x48044a=_0x56a7ce[_0xaa541d]?_0x56a7ce[_0xaa541d][_0x9cb5a7(0xa36)]:0x0,_0x47ecf3=$dataSystem[_0x9cb5a7(0x300)][_0x48044a];if(_0x47ecf3){if(_0x47ecf3[_0x9cb5a7(0x900)]===0x0)this[_0x9cb5a7(0x319)](_0x9cb5a7(0x90c));else{if(_0x47ecf3[_0x9cb5a7(0x900)]===0x1)this[_0x9cb5a7(0x319)](_0x9cb5a7(0x81d));else _0x47ecf3['type']===0x2&&this[_0x9cb5a7(0x319)](_0x9cb5a7(0xae1));}this[_0x9cb5a7(0x2d6)](_0x47ecf3['weaponImageId']);}},Game_Battler['prototype'][_0x5bdce9(0x894)]=function(_0x33a595){const _0x4ca674=_0x5bdce9;this[_0x4ca674(0x8d9)]=_0x33a595||0x0,this['_cache']={};},Game_Battler['prototype'][_0x5bdce9(0x62e)]=function(){const _0x34a46f=_0x5bdce9;this[_0x34a46f(0x8d9)]=this[_0x34a46f(0x8d9)]||0x0,this[_0x34a46f(0x8d9)]++,this['_cache']={};},Game_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x44a)]=function(){const _0x3eae3d=_0x5bdce9;this[_0x3eae3d(0x8d9)]=undefined,this['_cache']={};},VisuMZ[_0x5bdce9(0x61c)]['Game_Actor_equips']=Game_Actor['prototype'][_0x5bdce9(0xb12)],Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0xb12)]=function(){const _0x43f5c0=_0x5bdce9;let _0x173d0b=VisuMZ[_0x43f5c0(0x61c)][_0x43f5c0(0x306)][_0x43f5c0(0x4b1)](this);if(this[_0x43f5c0(0x9e0)])return _0x173d0b;if(this[_0x43f5c0(0x8d9)]!==undefined){this['_tempEquipCheck']=!![];const _0x4d82a6=this[_0x43f5c0(0x8ce)]();for(let _0x3def86=0x0;_0x3def86<_0x4d82a6[_0x43f5c0(0x12d)];_0x3def86++){_0x4d82a6[_0x3def86]===0x1&&this['_activeWeaponSlot']!==_0x3def86&&(_0x173d0b[_0x3def86]=null);}this['_tempEquipCheck']=undefined;}return _0x173d0b;},Window_BattleLog['prototype'][_0x5bdce9(0xb4c)]=function(_0x1a7255){const _0x51da36=_0x5bdce9;return _0x1a7255[_0x51da36(0x491)]()?_0x1a7255[_0x51da36(0xabf)]()[_0x51da36(0x12d)]||0x1:0x1;},Window_BattleLog[_0x5bdce9(0x768)]['setActiveWeaponSet']=function(_0x92e87e,_0xff2d0b){const _0x20b8a4=_0x5bdce9;_0x92e87e&&_0x92e87e[_0x20b8a4(0x491)]()&&_0x92e87e[_0x20b8a4(0x894)](_0xff2d0b),this[_0x20b8a4(0x670)]();},Window_BattleLog['prototype'][_0x5bdce9(0x496)]=function(_0x4d7c45){const _0x209867=_0x5bdce9;if(_0x4d7c45&&_0x4d7c45[_0x209867(0x491)]()){if(_0x209867(0x437)!==_0x209867(0x437))return;else _0x4d7c45[_0x209867(0x44a)]();}this['callNextMethod']();},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x5d1)]=function(){const _0x49d7f7=_0x5bdce9;let _0xafb108=_0x49d7f7(0x5d1);if(this['checkCacheKey'](_0xafb108))return this[_0x49d7f7(0x1f3)][_0xafb108];return this['_cache'][_0xafb108]=this[_0x49d7f7(0x979)](this[_0x49d7f7(0xad6)]()),this[_0x49d7f7(0x1f3)][_0xafb108];},Game_Actor[_0x5bdce9(0x768)]['battleUIOffsetY']=function(){const _0x24542f=_0x5bdce9;let _0x4bf8ef=_0x24542f(0xb18);if(this[_0x24542f(0x17f)](_0x4bf8ef))return this[_0x24542f(0x1f3)][_0x4bf8ef];return this['_cache'][_0x4bf8ef]=this['createBattleUIOffsetY'](this[_0x24542f(0xad6)]()),this['_cache'][_0x4bf8ef];},VisuMZ['BattleCore'][_0x5bdce9(0xaad)]=Game_Enemy['prototype'][_0x5bdce9(0x5aa)],Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x5aa)]=function(_0x4cd04b,_0x5ae31b,_0x2bb1dd){const _0x500000=_0x5bdce9;_0x4cd04b=DataManager[_0x500000(0xaee)](_0x4cd04b),VisuMZ['BattleCore'][_0x500000(0xaad)][_0x500000(0x4b1)](this,_0x4cd04b,_0x5ae31b,_0x2bb1dd),Imported[_0x500000(0x238)]&&this['initElementStatusCore'](),this[_0x500000(0x7b6)](),this[_0x500000(0x933)](),Imported[_0x500000(0x238)]&&this[_0x500000(0x56a)]();},Game_Enemy[_0x5bdce9(0x768)]['clearBattleCoreData']=function(){const _0x42a862=_0x5bdce9,_0x381d60=VisuMZ['BattleCore'][_0x42a862(0x76e)]['Enemy'];this['_attackAnimationId']=_0x381d60[_0x42a862(0x117)],this['_svBattlerData']={};},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x933)]=function(){const _0x10a17a=_0x5bdce9,_0x3c6f89=VisuMZ[_0x10a17a(0x61c)][_0x10a17a(0x76e)][_0x10a17a(0x14a)],_0x143a9a=this[_0x10a17a(0x1fc)]()['note'];this[_0x10a17a(0x4d9)]={'name':'','wtypeId':_0x3c6f89['WtypeId'],'collapse':_0x3c6f89['AllowCollapse'],'motionIdle':_0x3c6f89[_0x10a17a(0x50f)],'width':_0x3c6f89[_0x10a17a(0x97a)]||0x40,'height':_0x3c6f89[_0x10a17a(0x6ce)]||0x40,'anchorX':_0x3c6f89['AnchorX']||0x0,'anchorY':_0x3c6f89[_0x10a17a(0x192)]||0x0,'shadow':_0x3c6f89['Shadow']};_0x143a9a[_0x10a17a(0x16b)](/<ATTACK ANIMATION:[ ](\d+)>/i)&&(this[_0x10a17a(0x48b)]=Number(RegExp['$1']));const _0x3ad2f8=this[_0x10a17a(0x4d9)];if(_0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW BATTLER: (.*)>/i))_0x3ad2f8[_0x10a17a(0x74e)]=String(RegExp['$1']);else{if(_0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW BATTLERS>\s*([\s\S]*)\s*<\/SIDEVIEW BATTLERS>/i)){if(_0x10a17a(0x784)===_0x10a17a(0x863))this[_0x10a17a(0x793)]=null;else{const _0x390bb=String(RegExp['$1'])[_0x10a17a(0x761)](/[\r\n]+/)[_0x10a17a(0x671)]('');_0x3ad2f8['name']=DataManager[_0x10a17a(0x169)](_0x390bb);}}}_0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW ANCHOR: (.*), (.*)>/i)&&(_0x3ad2f8['anchorX']=eval(RegExp['$1']),_0x3ad2f8['anchorY']=eval(RegExp['$2']));if(_0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW COLLAPSE>/i))_0x10a17a(0x4d8)===_0x10a17a(0x4d8)?_0x3ad2f8['collapse']=!![]:this[_0x10a17a(0x2b8)]();else _0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW NO COLLAPSE>/i)&&(_0x3ad2f8[_0x10a17a(0x5ee)]=![]);if(_0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW SHOW SHADOW>/i))_0x3ad2f8[_0x10a17a(0x239)]=!![];else _0x143a9a['match'](/<SIDEVIEW HIDE SHADOW>/i)&&(_0x3ad2f8[_0x10a17a(0x239)]=![]);if(_0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW IDLE MOTION: (.*)>/i))_0x3ad2f8['motionIdle']=String(RegExp['$1'])[_0x10a17a(0x63a)]()[_0x10a17a(0x92d)]();else{if(_0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW IDLE MOTIONS>\s*([\s\S]*)\s*<\/SIDEVIEW IDLE MOTIONS>/i)){const _0x5961fb=String(RegExp['$1'])[_0x10a17a(0x761)](/[\r\n]+/)[_0x10a17a(0x671)]('');_0x3ad2f8[_0x10a17a(0x220)]=DataManager['processRandomizedData'](_0x5961fb);}}if(_0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW SIZE: (\d+), (\d+)>/i)){if('nYySz'!==_0x10a17a(0x40a))_0x3ad2f8[_0x10a17a(0x3b2)]=Number(RegExp['$1']),_0x3ad2f8[_0x10a17a(0x3b0)]=Number(RegExp['$2']);else{const _0x3a8cb8=_0x4826fc['round'](_0x1247e6[_0x10a17a(0x3b2)]/0x2),_0x39accc=_0x3dd8f9[_0x10a17a(0xb3f)](_0x5ec3a3['height']/0x2);_0x505e57[_0x10a17a(0x4ce)](_0x3a8cb8,_0x39accc,_0x212dc8['Duration'],_0xb944a5[_0x10a17a(0x752)]);}}if(_0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW WEAPON: (.*)>/i)){if(_0x10a17a(0x77a)===_0x10a17a(0x77a))_0x3ad2f8[_0x10a17a(0xa36)]=DataManager['getWtypeIdWithName'](RegExp['$1']);else{if(!this[_0x10a17a(0x3a3)]())return![];const _0x343525=this['battler']();if(!_0x343525)return![];const _0x21ef0f=_0x343525[_0x10a17a(0x3d6)];if(!_0x21ef0f)return![];const _0x1f281c=_0x21ef0f['_motion'];return _0x1f281c&&!_0x1f281c[_0x10a17a(0x127)];}}else{if(_0x143a9a[_0x10a17a(0x16b)](/<SIDEVIEW WEAPONS>\s*([\s\S]*)\s*<\/SIDEVIEW WEAPONS>/i)){const _0xd1ad30=String(RegExp['$1'])[_0x10a17a(0x761)](/[\r\n]+/)[_0x10a17a(0x671)](''),_0x51a008=DataManager[_0x10a17a(0x169)](_0xd1ad30);_0x3ad2f8['wtypeId']=DataManager[_0x10a17a(0x914)](_0x51a008);}}if(Imported[_0x10a17a(0x238)]){const _0x3258e0=this['getTraitSetKeys']();for(const _0x10c57a of _0x3258e0){const _0x3429b8=this[_0x10a17a(0x9af)](_0x10c57a)['Name'][_0x10a17a(0x673)]()[_0x10a17a(0x92d)](),_0x476bc0=_0x10c57a['toUpperCase']()[_0x10a17a(0x92d)]();if(_0x143a9a[_0x10a17a(0x16b)](VisuMZ['ElementStatusCore']['RegExp'][_0x10a17a(0xb6e)['format'](_0x476bc0,_0x3429b8)]))_0x10a17a(0x956)!=='bKIft'?this[_0x10a17a(0x319)](_0x10a17a(0x895)):_0x3ad2f8[_0x10a17a(0x74e)]=String(RegExp['$1']);else{if(_0x143a9a[_0x10a17a(0x16b)](VisuMZ[_0x10a17a(0x5e2)][_0x10a17a(0x3a1)]['SvBattlerMass-%1-%2'[_0x10a17a(0x824)](_0x476bc0,_0x3429b8)])){const _0x109e96=String(RegExp['$1'])['split'](/[\r\n]+/)[_0x10a17a(0x671)]('');_0x3ad2f8['name']=DataManager['processRandomizedData'](_0x109e96);}}if(_0x143a9a[_0x10a17a(0x16b)](VisuMZ[_0x10a17a(0x5e2)]['RegExp'][_0x10a17a(0x88e)[_0x10a17a(0x824)](_0x476bc0,_0x3429b8)])){if(_0x10a17a(0x72f)==='UCqRj')_0x3ad2f8['wtypeId']=DataManager['getWtypeIdWithName'](RegExp['$1']);else{const _0x34945e=_0x362513[0x0]['format'](_0x168fef[0x0]),_0x3a1c6d=_0x30f4b2[0x1][_0x10a17a(0x824)](_0x3a2b3c[0x1]),_0x5c2cad=new _0x15f555(_0x4e71f2['format'](_0x3a1c6d),'i');_0x2d6e2b[_0x34945e]=_0x5c2cad;}}else{if(_0x143a9a[_0x10a17a(0x16b)](VisuMZ[_0x10a17a(0x5e2)]['RegExp'][_0x10a17a(0x1b4)['format'](_0x476bc0,_0x3429b8)])){const _0x2e521f=String(RegExp['$1'])['split'](/[\r\n]+/)['remove'](''),_0x22dfdd=DataManager[_0x10a17a(0x169)](_0x2e521f);_0x3ad2f8['wtypeId']=DataManager[_0x10a17a(0x914)](_0x22dfdd);}}if(_0x143a9a[_0x10a17a(0x16b)](VisuMZ[_0x10a17a(0x5e2)][_0x10a17a(0x3a1)][_0x10a17a(0x6aa)[_0x10a17a(0x824)](_0x476bc0,_0x3429b8)]))_0x3ad2f8[_0x10a17a(0x220)]=String(RegExp['$1'])[_0x10a17a(0x63a)]()[_0x10a17a(0x92d)]();else{if(_0x143a9a[_0x10a17a(0x16b)](VisuMZ[_0x10a17a(0x5e2)][_0x10a17a(0x3a1)][_0x10a17a(0x634)[_0x10a17a(0x824)](_0x476bc0,_0x3429b8)])){const _0x58635e=String(RegExp['$1'])[_0x10a17a(0x761)](/[\r\n]+/)[_0x10a17a(0x671)]('');_0x3ad2f8[_0x10a17a(0x220)]=DataManager[_0x10a17a(0x169)](_0x58635e);}}}}},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x17b)]=function(){const _0x2704ea=_0x5bdce9;return this[_0x2704ea(0x48b)]||0x0;},Game_Enemy['prototype'][_0x5bdce9(0x559)]=function(){const _0x3ed24e=_0x5bdce9;return this[_0x3ed24e(0x17b)]();},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0xab3)]=function(_0x142d4f){const _0x2df720=_0x5bdce9;return this[_0x2df720(0x17b)]();},Game_Enemy['prototype'][_0x5bdce9(0x270)]=function(){const _0x47df8a=_0x5bdce9;if(this[_0x47df8a(0x1fc)]()[_0x47df8a(0x664)]['match'](/<BATTLER SPRITE CANNOT MOVE>/i))return![];return Game_Battler['prototype'][_0x47df8a(0x270)][_0x47df8a(0x4b1)](this);},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x5c9)]=function(){const _0x56f3ef=_0x5bdce9;if(this[_0x56f3ef(0x1fc)]()[_0x56f3ef(0x664)][_0x56f3ef(0x16b)](/<BATTLER SPRITE GROUNDED>/i))return!![];return![];},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x5f9)]=function(){const _0x26e9c3=_0x5bdce9,_0x1efc6c=[];for(const _0x359607 of this['enemy']()[_0x26e9c3(0xb20)]){const _0x22b3d5=$dataSkills[_0x359607['skillId']];if(_0x22b3d5&&!_0x1efc6c[_0x26e9c3(0x8ed)](_0x22b3d5))_0x1efc6c[_0x26e9c3(0x838)](_0x22b3d5);}return _0x1efc6c;},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x5d1)]=function(){const _0x2c03a8=_0x5bdce9;let _0x468add=_0x2c03a8(0x5d1);if(this['checkCacheKey'](_0x468add))return this[_0x2c03a8(0x1f3)][_0x468add];return this[_0x2c03a8(0x1f3)][_0x468add]=this['createBattleUIOffsetX'](this['enemy']()),this[_0x2c03a8(0x1f3)][_0x468add];},Game_Enemy['prototype']['battleUIOffsetY']=function(){const _0xaee289=_0x5bdce9;let _0xf041eb=_0xaee289(0xb18);if(this[_0xaee289(0x17f)](_0xf041eb))return this['_cache'][_0xf041eb];return this['_cache'][_0xf041eb]=this['createBattleUIOffsetY'](this[_0xaee289(0x1fc)]()),this[_0xaee289(0x1f3)][_0xf041eb];},Game_Enemy[_0x5bdce9(0x768)]['svBattlerData']=function(){const _0x4a5f31=_0x5bdce9;if(this['_svBattlerData']!==undefined)return this[_0x4a5f31(0x4d9)];return this['setupBattleCoreData'](),this[_0x4a5f31(0x4d9)];},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x3a3)]=function(){const _0x102d59=_0x5bdce9;return this['svBattlerData']()[_0x102d59(0x74e)]!=='';},Game_Enemy['prototype'][_0x5bdce9(0x269)]=function(){const _0x855944=_0x5bdce9;return this[_0x855944(0x74a)]()[_0x855944(0x74e)];},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x987)]=function(){const _0x2a1d7b=_0x5bdce9;return this[_0x2a1d7b(0x3a3)]()?VisuMZ[_0x2a1d7b(0x61c)]['Settings']['Actor'][_0x2a1d7b(0x338)]:VisuMZ[_0x2a1d7b(0x61c)][_0x2a1d7b(0x76e)][_0x2a1d7b(0x14a)]['SmoothImage'];},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x23a)]=function(_0x278714){const _0x2c7404=_0x5bdce9;Game_Battler[_0x2c7404(0x768)][_0x2c7404(0x23a)]['call'](this,_0x278714);if(this['hasSvBattler']())this[_0x2c7404(0x924)](_0x278714);},Game_Enemy[_0x5bdce9(0x768)]['performAttack']=function(){const _0xfd7eac=_0x5bdce9,_0x7a4972=this['svBattlerData']()[_0xfd7eac(0xa36)]||0x0,_0x39e36c=$dataSystem[_0xfd7eac(0x300)][_0x7a4972];if(_0x39e36c){if(_0x39e36c[_0xfd7eac(0x900)]===0x0)this[_0xfd7eac(0x319)](_0xfd7eac(0x90c));else{if(_0x39e36c[_0xfd7eac(0x900)]===0x1)this[_0xfd7eac(0x319)]('swing');else _0x39e36c[_0xfd7eac(0x900)]===0x2&&(_0xfd7eac(0x73e)!==_0xfd7eac(0x73e)?this[_0xfd7eac(0x197)](_0xfd7eac(0x177)):this['requestMotion'](_0xfd7eac(0xae1)));}}},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0xb2e)]=function(){const _0x7a7915=_0x5bdce9,_0x4308ee=this[_0x7a7915(0x74a)]()['wtypeId']||0x0,_0x173787=$dataSystem[_0x7a7915(0x300)][_0x4308ee];_0x173787&&this[_0x7a7915(0x2d6)](_0x173787[_0x7a7915(0x1dc)]);},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0xacd)]=function(){const _0x211d74=_0x5bdce9,_0x5af85f=this[_0x211d74(0x74a)]()[_0x211d74(0xa36)]||0x0;return $dataSystem[_0x211d74(0x300)][_0x5af85f];},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x41d)]=function(_0x9c3009){const _0x50a004=_0x5bdce9;return this[_0x50a004(0xacd)]();},Game_Enemy['prototype']['performDamage']=function(){const _0x233f95=_0x5bdce9;Game_Battler[_0x233f95(0x768)][_0x233f95(0x15f)][_0x233f95(0x4b1)](this),this[_0x233f95(0x3e7)]()&&this[_0x233f95(0x3a3)]()&&this[_0x233f95(0x319)](_0x233f95(0x95c)),SoundManager[_0x233f95(0xd0)]();},Game_Enemy[_0x5bdce9(0x768)]['performEvasion']=function(){const _0x4ab437=_0x5bdce9;Game_Battler[_0x4ab437(0x768)][_0x4ab437(0x2d8)][_0x4ab437(0x4b1)](this),this['requestMotion']('evade');},Game_Enemy[_0x5bdce9(0x768)]['performMagicEvasion']=function(){const _0x3a57c4=_0x5bdce9;Game_Battler[_0x3a57c4(0x768)][_0x3a57c4(0xb24)][_0x3a57c4(0x4b1)](this),this[_0x3a57c4(0x319)](_0x3a57c4(0x545));},Game_Enemy['prototype'][_0x5bdce9(0x3bb)]=function(){const _0x214253=_0x5bdce9;Game_Battler['prototype'][_0x214253(0x3bb)][_0x214253(0x4b1)](this),this[_0x214253(0x722)]();},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x4a0)]=function(){const _0x539414=_0x5bdce9;if(this['hasSvBattler']()){if(_0x539414(0x8ac)!==_0x539414(0x8ac)){this[_0x539414(0x6f5)]=this[_0x539414(0x1fc)]()[_0x539414(0x74e)]();const _0x1d38a5=this[_0x539414(0xa5d)](this[_0x539414(0x6f5)])[_0x539414(0x3b2)],_0x20869b=_0x134813[_0x539414(0xb3f)]((this[_0x539414(0x1fb)]-_0x1d38a5)/0x2);this['drawTextEx'](this[_0x539414(0x6f5)],_0x20869b,0x0,_0x1d38a5+0x8);}else{if(this[_0x539414(0x3c9)]()>=0x1)return!![];return this[_0x539414(0x74a)]()[_0x539414(0x5ee)];}}else{if(_0x539414(0x744)!==_0x539414(0x744)){const _0x5e9700=_0x3b5149['BattleCore'][_0x539414(0x76e)][_0x539414(0x40f)];_0x5e9700[_0x539414(0x18b)]?this[_0x539414(0x856)]=_0x283aad[_0x539414(0x691)](_0x5e9700[_0x539414(0x18b)]):_0x4bfd80[_0x539414(0x768)][_0x539414(0x942)][_0x539414(0x4b1)](this);}else return!![];}},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x90f)]=function(){const _0x541dfd=_0x5bdce9;return this[_0x541dfd(0x74a)]()[_0x541dfd(0x999)];},Game_Enemy['prototype'][_0x5bdce9(0xa3f)]=function(){const _0x1cd049=_0x5bdce9;return this[_0x1cd049(0x74a)]()[_0x1cd049(0x561)];},Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x892)]=function(){const _0x154447=_0x5bdce9;return this[_0x154447(0x74a)]()[_0x154447(0x239)];},VisuMZ['BattleCore'][_0x5bdce9(0x4b2)]=Game_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x113)],Game_Enemy['prototype']['transform']=function(_0x4109e5){const _0x59abe9=_0x5bdce9;VisuMZ[_0x59abe9(0x61c)][_0x59abe9(0x4b2)]['call'](this,_0x4109e5),this['clearBattleCoreData'](),this[_0x59abe9(0x933)]();const _0x5566cb=this[_0x59abe9(0xb0d)]();if(_0x5566cb)_0x5566cb[_0x59abe9(0x23d)](this);},Game_Unit[_0x5bdce9(0x768)]['processBattleCoreJS']=function(_0x3ca91e){const _0x17ee6c=_0x5bdce9;for(const _0x45c159 of this[_0x17ee6c(0x2b7)]()){if(_0x45c159)_0x45c159[_0x17ee6c(0x9dd)](_0x3ca91e);}},Game_Unit['prototype']['trueRandomTarget']=function(){const _0x17ddb5=_0x5bdce9,_0x3a2998=this[_0x17ddb5(0xed)]();return _0x3a2998[Math[_0x17ddb5(0xaf7)](_0x3a2998[_0x17ddb5(0x12d)])];},VisuMZ[_0x5bdce9(0x61c)]['Game_Party_addActor']=Game_Party[_0x5bdce9(0x768)][_0x5bdce9(0x5a5)],Game_Party[_0x5bdce9(0x768)][_0x5bdce9(0x5a5)]=function(_0x4b669e){const _0x292d36=_0x5bdce9;VisuMZ[_0x292d36(0x61c)]['Game_Party_addActor'][_0x292d36(0x4b1)](this,_0x4b669e),BattleManager['refreshStatusWindow']();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x10d)]=Game_Party[_0x5bdce9(0x768)][_0x5bdce9(0xa00)],Game_Party[_0x5bdce9(0x768)]['removeActor']=function(_0x1e4e94){const _0x4b1d9a=_0x5bdce9;VisuMZ['BattleCore'][_0x4b1d9a(0x10d)]['call'](this,_0x1e4e94),BattleManager[_0x4b1d9a(0x4eb)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xa16)]=Game_Troop[_0x5bdce9(0x768)]['setup'],Game_Troop['prototype'][_0x5bdce9(0x5aa)]=function(_0x1aa20f){const _0x4624ab=_0x5bdce9;$gameTemp[_0x4624ab(0x2e2)](),$gameTemp[_0x4624ab(0x3d4)](_0x1aa20f),VisuMZ[_0x4624ab(0x61c)][_0x4624ab(0xa16)][_0x4624ab(0x4b1)](this,_0x1aa20f);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x604)]=Game_Troop[_0x5bdce9(0x768)][_0x5bdce9(0x77f)],Game_Troop[_0x5bdce9(0x768)]['expTotal']=function(){const _0x15ad3f=_0x5bdce9;let _0x4d7f4f=VisuMZ['BattleCore'][_0x15ad3f(0x604)][_0x15ad3f(0x4b1)](this);return this[_0x15ad3f(0x55f)]&&(_0x4d7f4f*=this[_0x15ad3f(0x55f)]()),Math[_0x15ad3f(0xa44)](_0x4d7f4f);},Game_Troop['prototype'][_0x5bdce9(0x55f)]=function(){return 0x1;},VisuMZ['BattleCore'][_0x5bdce9(0x46a)]=Game_Map['prototype']['setupBattleback'],Game_Map['prototype'][_0x5bdce9(0x9cc)]=function(){const _0x4d4c17=_0x5bdce9;VisuMZ[_0x4d4c17(0x61c)][_0x4d4c17(0x46a)]['call'](this),this['setupBattlebackBattleCore']();},Game_Map[_0x5bdce9(0x768)][_0x5bdce9(0x6d4)]=function(){const _0x33e19b=_0x5bdce9;this['_regionBattleback1']={},this[_0x33e19b(0x685)]={};if(!$dataMap)return;const _0x31e1fb=$dataMap[_0x33e19b(0x664)];if(!_0x31e1fb)return;const _0xadd5d2=_0x31e1fb['match'](/<REGION (\d+) BATTLEBACK(\d+): (.*)>/gi);if(_0xadd5d2)for(const _0x371863 of _0xadd5d2){_0x371863['match'](/<REGION (\d+) BATTLEBACK(\d+): (.*)>/i);const _0x3db1c1=Number(RegExp['$1']),_0x1e05a7=Number(RegExp['$2']),_0x4d2ab1=_0x1e05a7===0x1?this[_0x33e19b(0x175)]:this[_0x33e19b(0x685)],_0x481a2c=String(RegExp['$3']);_0x4d2ab1[_0x3db1c1]=_0x481a2c;}},VisuMZ['BattleCore'][_0x5bdce9(0x81a)]=Game_Map[_0x5bdce9(0x768)][_0x5bdce9(0x4e4)],Game_Map[_0x5bdce9(0x768)][_0x5bdce9(0x4e4)]=function(){const _0xbb438b=_0x5bdce9;if(!BattleManager[_0xbb438b(0x1b6)]()){const _0x2dd129=$gamePlayer['regionId']($gamePlayer['x'],$gamePlayer['y']);if(this[_0xbb438b(0x175)]&&this[_0xbb438b(0x175)][_0x2dd129])return this['_regionBattleback1'][_0x2dd129];}return VisuMZ[_0xbb438b(0x61c)]['Game_Map_battleback1Name']['call'](this);},VisuMZ['BattleCore'][_0x5bdce9(0x25f)]=Game_Map[_0x5bdce9(0x768)][_0x5bdce9(0x908)],Game_Map[_0x5bdce9(0x768)][_0x5bdce9(0x908)]=function(){const _0x105bb0=_0x5bdce9;if(!BattleManager[_0x105bb0(0x1b6)]()){const _0x22ad2d=$gamePlayer[_0x105bb0(0x40b)]($gamePlayer['x'],$gamePlayer['y']);if(this[_0x105bb0(0x175)]&&this['_regionBattleback2'][_0x22ad2d])return this[_0x105bb0(0x685)][_0x22ad2d];}return VisuMZ[_0x105bb0(0x61c)]['Game_Map_battleback2Name'][_0x105bb0(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)]['Game_Map_encounterList']=Game_Map[_0x5bdce9(0x768)]['encounterList'],Game_Map['prototype']['encounterList']=function(){const _0x51025e=_0x5bdce9;let _0x3a824b=JsonEx[_0x51025e(0x87e)](VisuMZ[_0x51025e(0x61c)][_0x51025e(0x75d)][_0x51025e(0x4b1)](this));return VisuMZ[_0x51025e(0x61c)][_0x51025e(0x90a)](_0x3a824b);},VisuMZ['BattleCore'][_0x5bdce9(0x90a)]=function(_0x3a1f89){const _0x1dcb8f=_0x5bdce9;var _0x1d8c50,_0x283c34,_0x1ccc3d;for(_0x1ccc3d=_0x3a1f89[_0x1dcb8f(0x12d)]-0x1;_0x1ccc3d>0x0;_0x1ccc3d--){_0x1d8c50=Math[_0x1dcb8f(0x618)](Math[_0x1dcb8f(0x3df)]()*(_0x1ccc3d+0x1)),_0x283c34=_0x3a1f89[_0x1ccc3d],_0x3a1f89[_0x1ccc3d]=_0x3a1f89[_0x1d8c50],_0x3a1f89[_0x1d8c50]=_0x283c34;}return _0x3a1f89;},VisuMZ[_0x5bdce9(0x61c)]['Game_Interpreter_PluginCommand']=Game_Interpreter[_0x5bdce9(0x768)][_0x5bdce9(0x511)],Game_Interpreter[_0x5bdce9(0x768)][_0x5bdce9(0x511)]=function(_0x4818c2){const _0x2ce4da=_0x5bdce9;return $gameTemp['setLastPluginCommandInterpreter'](this),VisuMZ['BattleCore'][_0x2ce4da(0x6b5)][_0x2ce4da(0x4b1)](this,_0x4818c2);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x929)]=Game_Interpreter[_0x5bdce9(0x768)]['updateWaitMode'],Game_Interpreter[_0x5bdce9(0x768)]['updateWaitMode']=function(){const _0x567444=_0x5bdce9;if(SceneManager['isSceneBattle']()){if(_0x567444(0x288)==='qcYtt'){if(this[_0x567444(0xb29)]>0x0)this['contentsOpacity']-=0x10;}else switch(this[_0x567444(0x29a)]){case _0x567444(0x3f5):if(Imported[_0x567444(0x27b)]){if(_0x567444(0x248)==='JoscD'){if($gameScreen[_0x567444(0x592)]()[_0x567444(0x222)]>0x0)return!![];this[_0x567444(0x29a)]='';}else _0x94c8b1[_0x567444(0x418)]();}break;case _0x567444(0x9bc):if(BattleManager[_0x567444(0x25a)][_0x567444(0x660)]())return!![];this[_0x567444(0x29a)]='';break;case'battleCamera':if(Imported[_0x567444(0x27b)]){if($gameScreen['battleCameraData']()[_0x567444(0x717)]>0x0)return!![];if($gameScreen[_0x567444(0x592)]()[_0x567444(0x926)]>0x0)return!![];this[_0x567444(0x29a)]='';}break;case _0x567444(0x497):if(BattleManager['_spriteset']['isEffecting']())return!![];this[_0x567444(0x29a)]='';break;case _0x567444(0xa25):if(BattleManager[_0x567444(0x25a)][_0x567444(0x15d)]())return!![];this[_0x567444(0x29a)]='';break;case'battleJump':if(BattleManager[_0x567444(0x25a)]['isAnyoneJumping']())return!![];this[_0x567444(0x29a)]='';break;case'battlelog':if(BattleManager[_0x567444(0x5c4)][_0x567444(0x585)]())return!![];this[_0x567444(0x29a)]='';break;case _0x567444(0x286):if(BattleManager['_spriteset'][_0x567444(0x12a)]())return!![];this[_0x567444(0x29a)]='';break;case'battleOpacity':if(BattleManager[_0x567444(0x25a)][_0x567444(0x52f)]())return!![];this[_0x567444(0x29a)]='';break;case _0x567444(0x751):if(BattleManager[_0x567444(0x25a)][_0x567444(0x64a)]())return!![];this['_waitMode']='';break;case _0x567444(0x2ce):if(BattleManager[_0x567444(0x25a)][_0x567444(0xaa3)]())return!![];this[_0x567444(0x29a)]='';break;case'battleProjectiles':if(Imported[_0x567444(0x684)]){if(BattleManager[_0x567444(0x25a)][_0x567444(0x2d7)]())return!![];this[_0x567444(0x29a)]='';}break;case'battleSkew':if(Imported[_0x567444(0x27b)]){if('GlbCc'===_0x567444(0x2c0)){if($gameScreen[_0x567444(0x592)]()[_0x567444(0x904)]>0x0)return!![];this[_0x567444(0x29a)]='';}else{let _0x32cf1f=_0x5c5e39(_0xf56daa['$1']);while(_0x32cf1f--){_0x3f8f61[_0x567444(0x838)](this['opponentsUnit']()['trueRandomTarget']());}return this['repeatTargets'](_0x3ee6b1);}}break;case _0x567444(0x4fa):if(BattleManager[_0x567444(0x25a)]['isAnyoneSpinning']())return!![];this[_0x567444(0x29a)]='';break;case _0x567444(0xa68):if(Imported[_0x567444(0x27b)]){if(_0x567444(0x6d6)!=='DIZeE'){if($gameScreen[_0x567444(0x592)]()[_0x567444(0xb66)]>0x0)return!![];this[_0x567444(0x29a)]='';}else return this[_0x567444(0x7ef)]()[_0x567444(0x664)][_0x567444(0x16b)](/<BATTLE COMMANDS>\s*([\s\S]*)\s*<\/BATTLE COMMANDS>/i)?_0x1b0682(_0x63c8a['$1'])[_0x567444(0x761)](/[\r\n]+/):_0x2ae090[_0x567444(0x61c)][_0x567444(0x76e)][_0x567444(0x59c)][_0x567444(0x2a2)];}break;}}return VisuMZ['BattleCore'][_0x567444(0x929)][_0x567444(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x59b)]=Game_Interpreter['prototype'][_0x5bdce9(0x3d2)],Game_Interpreter['prototype'][_0x5bdce9(0x3d2)]=function(_0x297b34){const _0x5b6b70=_0x5bdce9;return!$gameParty[_0x5b6b70(0xa04)]()?this['command301_PreBattleEvent'](_0x297b34):VisuMZ[_0x5b6b70(0x61c)]['Game_Interpreter_command301']['call'](this,_0x297b34);},Game_Interpreter[_0x5bdce9(0x768)][_0x5bdce9(0x8ec)]=function(_0xf3afdb){const _0x5d75a3=_0x5bdce9;return VisuMZ['BattleCore'][_0x5d75a3(0x59b)][_0x5d75a3(0x4b1)](this,_0xf3afdb),BattleManager[_0x5d75a3(0x439)](_0xf43f74=>{this['_branch'][this['_indent']]=_0xf43f74;}),!![];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x144)]=function(_0x5c8e44){const _0x5601c0=_0x5bdce9,_0x388486=$dataCommonEvents[_0x5c8e44];if(!_0x388486)return![];if(_0x388486[_0x5601c0(0x3cd)][_0x5601c0(0x12d)]<=0x1)return![];return!![];},Game_Interpreter[_0x5bdce9(0x768)][_0x5bdce9(0x982)]=function(_0x253e89){const _0x3c4cd3=_0x5bdce9,_0x4ebdd8=VisuMZ[_0x3c4cd3(0x61c)][_0x3c4cd3(0x76e)][_0x3c4cd3(0x817)],_0x20cc69=_0x4ebdd8[_0x3c4cd3(0x1ac)],_0x298ca0=$dataCommonEvents[_0x20cc69];if(_0x298ca0&&VisuMZ[_0x3c4cd3(0x61c)]['CheckMapBattleEventValid'](_0x20cc69)){const _0x57cd37=this[_0x3c4cd3(0x2a9)]()?this[_0x3c4cd3(0x812)]:0x0,_0x4ca299=_0x298ca0[_0x3c4cd3(0x3cd)];this[_0x3c4cd3(0xa77)](_0x4ca299,_0x57cd37),this[_0x3c4cd3(0x27d)]=JsonEx[_0x3c4cd3(0x87e)](this[_0x3c4cd3(0x27d)]);const _0x130f6c={'code':0xbc3,'indent':this['_indent'],'parameters':JsonEx[_0x3c4cd3(0x87e)](_0x253e89)};return this[_0x3c4cd3(0x27d)][_0x3c4cd3(0x532)](this[_0x3c4cd3(0x365)]+0x1,0x0,_0x130f6c),!![];}else return VisuMZ[_0x3c4cd3(0x61c)][_0x3c4cd3(0x59b)]['call'](this,_0x253e89);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xa56)]=BattleManager[_0x5bdce9(0x449)],BattleManager[_0x5bdce9(0x449)]=function(){const _0x5d8f27=_0x5bdce9;VisuMZ[_0x5d8f27(0x61c)][_0x5d8f27(0xa56)]['call'](this),this[_0x5d8f27(0x86f)]();},BattleManager[_0x5bdce9(0x86f)]=function(){const _0x5e2848=_0x5bdce9,_0x54d993=VisuMZ[_0x5e2848(0x61c)][_0x5e2848(0x76e)][_0x5e2848(0x817)],_0x100a86=_0x54d993['BattleStartEvent'];_0x100a86&&VisuMZ[_0x5e2848(0x61c)][_0x5e2848(0x144)](_0x100a86)&&(this[_0x5e2848(0x4c3)]=!![],$gameTemp[_0x5e2848(0x32e)](_0x54d993[_0x5e2848(0x1ac)]),$gameMap['updateInterpreter'](),$gameMap[_0x5e2848(0x9e5)][_0x5e2848(0x9d4)]=!![]);if(_0x54d993[_0x5e2848(0x262)]>0x0){if(_0x5e2848(0x359)!==_0x5e2848(0x359))return this[_0x5e2848(0x3c1)]();else this[_0x5e2848(0x720)]=!![];}},VisuMZ[_0x5bdce9(0x61c)]['Scene_Map_updateCallMenu']=Scene_Map[_0x5bdce9(0x768)][_0x5bdce9(0x18c)],Scene_Map[_0x5bdce9(0x768)][_0x5bdce9(0x18c)]=function(){const _0x3ba5b0=_0x5bdce9;if(BattleManager[_0x3ba5b0(0x4c3)])return;VisuMZ[_0x3ba5b0(0x61c)]['Scene_Map_updateCallMenu'][_0x3ba5b0(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)]['Scene_Map_launchBattle']=Scene_Map[_0x5bdce9(0x768)][_0x5bdce9(0x8e9)],Scene_Map['prototype'][_0x5bdce9(0x8e9)]=function(){const _0x22508d=_0x5bdce9;if(BattleManager['_battleCoreBattleStartEvent'])this[_0x22508d(0x61a)]();else{if(_0x22508d(0x250)===_0x22508d(0xa82))return _0x1a5ce5[_0x22508d(0xb0d)]()[_0x22508d(0x8f0)]-_0x1556e4[_0x22508d(0xb0d)]()['_baseX'];else VisuMZ[_0x22508d(0x61c)][_0x22508d(0x6f6)]['call'](this);}},Scene_Map[_0x5bdce9(0x768)][_0x5bdce9(0x61a)]=function(){const _0x46ff3e=_0x5bdce9;this[_0x46ff3e(0x8fa)]=!![];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xb00)]=SceneManager['isSceneChanging'],SceneManager[_0x5bdce9(0x8b5)]=function(){const _0x4b2cc3=_0x5bdce9;if(BattleManager[_0x4b2cc3(0x4c3)])return![];return VisuMZ[_0x4b2cc3(0x61c)][_0x4b2cc3(0xb00)]['call'](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x3d7)]=Game_Interpreter['prototype']['terminate'],Game_Interpreter['prototype']['terminate']=function(){const _0x2133a3=_0x5bdce9;VisuMZ[_0x2133a3(0x61c)][_0x2133a3(0x3d7)][_0x2133a3(0x4b1)](this);if(this[_0x2133a3(0x9d4)]){if(_0x2133a3(0x852)!==_0x2133a3(0x852)){this[_0x2133a3(0x9dd)](_0x2133a3(0x662));const _0x3654bd=this[_0x2133a3(0x780)];_0x2edc11['BattleCore'][_0x2133a3(0xdb)][_0x2133a3(0x4b1)](this),this[_0x2133a3(0x780)]=_0x3654bd+_0x36a986[_0x2133a3(0x61c)][_0x2133a3(0x76e)][_0x2133a3(0x817)][_0x2133a3(0xaf1)][_0x2133a3(0x4b1)](this),this[_0x2133a3(0x8c0)](_0x2133a3(0x2d9));}else this[_0x2133a3(0x9d4)]=undefined,SceneManager[_0x2133a3(0x352)]['battleCoreResumeLaunchBattle']();}},Scene_Map[_0x5bdce9(0x768)][_0x5bdce9(0x1ae)]=function(){const _0x503132=_0x5bdce9;BattleManager[_0x503132(0x4c3)]=undefined,BattleManager[_0x503132(0xb25)]=!![],this['stop']();},VisuMZ['BattleCore'][_0x5bdce9(0x4ec)]=Scene_Map['prototype'][_0x5bdce9(0x490)],Scene_Map[_0x5bdce9(0x768)][_0x5bdce9(0x490)]=function(){const _0x7f60db=_0x5bdce9;VisuMZ[_0x7f60db(0x61c)][_0x7f60db(0x4ec)][_0x7f60db(0x4b1)](this),BattleManager[_0x7f60db(0xb25)]&&(this['_active']=!![],BattleManager[_0x7f60db(0xb25)]=undefined);},VisuMZ[_0x5bdce9(0x61c)]['Scene_Map_initialize']=Scene_Map[_0x5bdce9(0x768)]['initialize'],Scene_Map[_0x5bdce9(0x768)][_0x5bdce9(0x490)]=function(){const _0x9fc64d=_0x5bdce9;VisuMZ['BattleCore'][_0x9fc64d(0xf2)][_0x9fc64d(0x4b1)](this),$gameTemp['clearForcedGameTroopSettingsBattleCore']();},VisuMZ[_0x5bdce9(0x61c)]['Scene_ItemBase_applyItem']=Scene_ItemBase[_0x5bdce9(0x768)][_0x5bdce9(0xa5f)],Scene_ItemBase[_0x5bdce9(0x768)][_0x5bdce9(0xa5f)]=function(){const _0x2467b9=_0x5bdce9;VisuMZ[_0x2467b9(0x61c)][_0x2467b9(0x6af)]['call'](this);if(this[_0x2467b9(0xa8a)]()[_0x2467b9(0x664)][_0x2467b9(0x16b)](/<BYPASS AUTO ACTION SEQUENCE>/i))return;this[_0x2467b9(0xa8a)]()['note'][_0x2467b9(0x16b)](/<CUSTOM ACTION SEQUENCE>/i)&&($gameTemp[_0x2467b9(0xa32)]=[]),DataManager[_0x2467b9(0x91f)](this[_0x2467b9(0xa8a)]())&&($gameTemp['_commonEventQueue']=[]);},VisuMZ[_0x5bdce9(0x61c)]['Scene_Options_maxCommands']=Scene_Options[_0x5bdce9(0x768)][_0x5bdce9(0x674)],Scene_Options['prototype'][_0x5bdce9(0x674)]=function(){const _0x2b3b41=_0x5bdce9;let _0x26d68c=VisuMZ[_0x2b3b41(0x61c)][_0x2b3b41(0x173)][_0x2b3b41(0x4b1)](this);const _0x16a319=VisuMZ['BattleCore']['Settings'];if(_0x16a319['AutoBattle'][_0x2b3b41(0x2e0)]&&_0x16a319[_0x2b3b41(0xa97)]['AdjustRect'])_0x26d68c+=0x2;if(_0x16a319[_0x2b3b41(0x9d6)]['AddOption']&&_0x16a319['HpGauge'][_0x2b3b41(0x4a6)])_0x26d68c+=0x1;return _0x26d68c;},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x26e)]=Scene_Battle[_0x5bdce9(0x768)]['initialize'],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x490)]=function(){const _0x3aa428=_0x5bdce9;VisuMZ[_0x3aa428(0x61c)][_0x3aa428(0x26e)][_0x3aa428(0x4b1)](this),this[_0x3aa428(0x98d)]();},VisuMZ[_0x5bdce9(0x61c)]['Scene_Battle_start']=Scene_Battle[_0x5bdce9(0x768)]['start'],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0xade)]=function(){const _0x62780b=_0x5bdce9;if(SceneManager['isPreviousSceneBattleTransitionable']()){Scene_Message[_0x62780b(0x768)][_0x62780b(0xade)][_0x62780b(0x4b1)](this);this[_0x62780b(0x25a)]&&(_0x62780b(0x8c5)===_0x62780b(0x8c5)?this[_0x62780b(0x25a)]['update']():_0x3b66e5+=_0x2f1673(_0x5d8c79['$1'])/0x64);if(BattleManager['_tpbSceneChangeCacheActor']){if(_0x62780b(0x7d4)===_0x62780b(0x7d4))BattleManager[_0x62780b(0x343)]();else return this[_0x62780b(0x44b)]=this[_0x62780b(0x44b)]||_0x556cd3[_0x62780b(0x768)]['lineHeight']()||0x24,this[_0x62780b(0x44b)]*0x4;}}else VisuMZ[_0x62780b(0x61c)][_0x62780b(0xac7)][_0x62780b(0x4b1)](this),$gameTroop[_0x62780b(0x38b)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xb35)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x73d)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x73d)]=function(){const _0x2ba991=_0x5bdce9;SceneManager[_0x2ba991(0x3d9)]()?Scene_Message['prototype']['stop']['call'](this):VisuMZ[_0x2ba991(0x61c)][_0x2ba991(0xb35)][_0x2ba991(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x5bd)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x6b2)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x6b2)]=function(){const _0x52d1e7=_0x5bdce9;SceneManager[_0x52d1e7(0x3d9)]()?Scene_Message[_0x52d1e7(0x768)][_0x52d1e7(0x6b2)][_0x52d1e7(0x4b1)](this):VisuMZ['BattleCore'][_0x52d1e7(0x5bd)][_0x52d1e7(0x4b1)](this),this[_0x52d1e7(0x98d)]();},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x396)]=function(){const _0x1bf530=_0x5bdce9;if(ConfigManager[_0x1bf530(0x3c4)]&&ConfigManager[_0x1bf530(0x36b)]!==undefined)return _0x1bf530(0x188)!=='SLUNO'?this['_regionBattleback1'][_0x17e2e6]:ConfigManager[_0x1bf530(0x36b)];else{if(this[_0x1bf530(0x19d)]()===_0x1bf530(0x5f1))return![];else{return Scene_Message[_0x1bf530(0x768)][_0x1bf530(0x396)][_0x1bf530(0x4b1)](this);;}}},VisuMZ['BattleCore'][_0x5bdce9(0x28b)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x263)],Scene_Battle['prototype'][_0x5bdce9(0x263)]=function(){const _0x569c31=_0x5bdce9;this['createEnemyNameContainer'](),VisuMZ['BattleCore'][_0x569c31(0x28b)][_0x569c31(0x4b1)](this),this[_0x569c31(0x8bf)]();},VisuMZ['BattleCore'][_0x5bdce9(0x234)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x73b)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x73b)]=function(){const _0x5e1347=_0x5bdce9;VisuMZ['BattleCore'][_0x5e1347(0x234)][_0x5e1347(0x4b1)](this),this['battleLayoutStyle']()===_0x5e1347(0x5f1)&&this[_0x5e1347(0x424)]();},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x3f0)]=function(_0x3b7951){const _0x526a25=_0x5bdce9;_0x3b7951?(this[_0x526a25(0xb84)]['x']=(Graphics['width']-Graphics[_0x526a25(0x7fb)])/0x2,this[_0x526a25(0xb84)]['y']=(Graphics[_0x526a25(0x3b0)]-Graphics[_0x526a25(0x51f)])/0x2):(this[_0x526a25(0xb84)]['x']=Graphics[_0x526a25(0x3b2)]*0xa,this[_0x526a25(0xb84)]['y']=Graphics['height']*0xa);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x7b5)]=Scene_Battle['prototype'][_0x5bdce9(0x427)],Scene_Battle['prototype'][_0x5bdce9(0x427)]=function(){const _0x52129c=_0x5bdce9,_0x5e6c33=BattleManager[_0x52129c(0xad6)]();VisuMZ[_0x52129c(0x61c)]['Scene_Battle_selectNextCommand'][_0x52129c(0x4b1)](this);if(_0x5e6c33){if(_0x5e6c33===BattleManager['actor']())return;if(_0x5e6c33===BattleManager['_subject'])return;if(_0x5e6c33[_0x52129c(0xb0d)]())_0x5e6c33['battler']()[_0x52129c(0x2d4)]();}},VisuMZ[_0x5bdce9(0x61c)]['Scene_Battle_selectPreviousCommand']=Scene_Battle['prototype'][_0x5bdce9(0x8c2)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x8c2)]=function(){const _0x55fe37=_0x5bdce9,_0x188909=BattleManager[_0x55fe37(0xad6)]();if(_0x188909&&_0x188909[_0x55fe37(0xb0d)])_0x188909[_0x55fe37(0xb0d)]()['stepBack']();VisuMZ[_0x55fe37(0x61c)]['Scene_Battle_selectPreviousCommand'][_0x55fe37(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x9c2)]=Scene_Battle['prototype'][_0x5bdce9(0x6d5)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x6d5)]=function(){const _0x53d1a3=_0x5bdce9;if(VisuMZ['BattleCore'][_0x53d1a3(0x76e)][_0x53d1a3(0x2c4)]['BattleLogRectJS'])return VisuMZ[_0x53d1a3(0x61c)]['Settings'][_0x53d1a3(0x2c4)][_0x53d1a3(0x630)][_0x53d1a3(0x4b1)](this);return VisuMZ['BattleCore'][_0x53d1a3(0x9c2)][_0x53d1a3(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x943)]=Scene_Battle[_0x5bdce9(0x768)]['createPartyCommandWindow'],Scene_Battle[_0x5bdce9(0x768)]['createPartyCommandWindow']=function(){const _0x58650c=_0x5bdce9;VisuMZ[_0x58650c(0x61c)]['Scene_Battle_createPartyCommandWindow'][_0x58650c(0x4b1)](this),this[_0x58650c(0x9ce)]();},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x9ce)]=function(){const _0x8c4f41=_0x5bdce9,_0x501367=this[_0x8c4f41(0x95e)];_0x501367[_0x8c4f41(0x456)](_0x8c4f41(0xa63),this[_0x8c4f41(0x657)][_0x8c4f41(0x124)](this)),_0x501367[_0x8c4f41(0x456)]('options',this[_0x8c4f41(0xa2f)]['bind'](this));const _0xf17cee=this[_0x8c4f41(0x19d)]();switch(_0xf17cee){case'xp':case'portrait':return this['_partyCommandWindow'][_0x8c4f41(0xa69)](0x1);break;}},Scene_Battle['prototype'][_0x5bdce9(0x657)]=function(){const _0xaf0307=_0x5bdce9;BattleManager['_autoBattle']=!![],$gameParty[_0xaf0307(0xa95)](),this[_0xaf0307(0x427)]();if(BattleManager[_0xaf0307(0x985)]()){if(_0xaf0307(0xa7a)!==_0xaf0307(0xacc))BattleManager['_inputting']=![];else{if(this[_0xaf0307(0x2c2)]>0x0){const _0x1dde0f=this[_0xaf0307(0x2c2)],_0x323f62=this[_0xaf0307(0x65c)];_0x323f62['x']=(_0x323f62['x']*(_0x1dde0f-0x1)+this[_0xaf0307(0x5fb)])/_0x1dde0f,_0x323f62['opacity']=(_0x323f62['opacity']*(_0x1dde0f-0x1)+0xff)/_0x1dde0f,this[_0xaf0307(0x2c2)]--;}}}},Scene_Battle['prototype'][_0x5bdce9(0xa2f)]=function(){const _0x45e5b6=_0x5bdce9;if(this[_0x45e5b6(0xab1)]())_0x45e5b6(0x9b7)!==_0x45e5b6(0x9b7)?(_0x10c3a5['BattleCore']['Sprite_Enemy_updateStateSprite']['call'](this),this[_0x45e5b6(0x401)]()):(this[_0x45e5b6(0x1df)]=!![],this['_logWindow'][_0x45e5b6(0x838)]('addText',VisuMZ[_0x45e5b6(0x61c)]['Settings']['PartyCmd'][_0x45e5b6(0x6ff)]));else{if(_0x45e5b6(0x225)!==_0x45e5b6(0x42e))this[_0x45e5b6(0x745)]();else{if(!_0x591ed2[_0x45e5b6(0x61c)]['TpbActiveChangeEnabled'])return;if(_0x5239e2[_0x45e5b6(0x548)]&&_0x498cd8['isCTB']())return;const _0x58d60a=_0x7ddb8a[_0x45e5b6(0xed)]()[_0x45e5b6(0xb85)](_0x5dbf09=>_0x5dbf09['isTpbCharged']()&&_0x5dbf09[_0x45e5b6(0xe3)]());_0x4a9caa[_0x45e5b6(0x983)]=_0x58d60a[0x0]||null,_0x207079[_0x45e5b6(0x983)]&&_0x440cff[_0x45e5b6(0x983)][_0x45e5b6(0xb5c)](_0x45e5b6(0x9f7));}}},Scene_Battle[_0x5bdce9(0x768)]['isQueueOptionsMenu']=function(){const _0x5bfdf5=_0x5bdce9;return BattleManager[_0x5bfdf5(0x6e9)]();},Scene_Battle['prototype']['callOptions']=function(){const _0x14350d=_0x5bdce9;this['_callSceneOptions']=![],this[_0x14350d(0x25a)]['update'](),this[_0x14350d(0xb84)][_0x14350d(0x8e1)]=![];if(BattleManager[_0x14350d(0x1b6)]()){if(_0x14350d(0x1cd)===_0x14350d(0x7bd))this[_0x14350d(0x8ab)](0x1);else{if($dataSystem[_0x14350d(0x4e4)]||$dataSystem[_0x14350d(0x908)]){if(_0x14350d(0x7e5)===_0x14350d(0x7e5))SceneManager[_0x14350d(0x3c6)]();else return this[_0x14350d(0x471)][_0x14350d(0x4a0)]();}}}else($gameMap['battleback1Name']()||$gameMap[_0x14350d(0x908)]())&&SceneManager['snapForBackground']();SceneManager['push'](Scene_Options),BattleManager[_0x14350d(0x985)]()&&(BattleManager[_0x14350d(0x793)]=BattleManager[_0x14350d(0xad6)]());},VisuMZ['BattleCore'][_0x5bdce9(0x354)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x620)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x620)]=function(){const _0x470b19=_0x5bdce9;VisuMZ[_0x470b19(0x61c)][_0x470b19(0x354)][_0x470b19(0x4b1)](this);if(this[_0x470b19(0x1df)]&&!BattleManager[_0x470b19(0xb40)])this['callOptions']();},VisuMZ[_0x5bdce9(0x61c)]['Scene_Battle_update']=Scene_Battle[_0x5bdce9(0x768)]['update'],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x367)]=function(){const _0x4367fa=_0x5bdce9;VisuMZ[_0x4367fa(0x61c)][_0x4367fa(0x79b)][_0x4367fa(0x4b1)](this),this[_0x4367fa(0x14c)]();},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x8bf)]=function(){const _0x4c126d=_0x5bdce9,_0xf65454=this[_0x4c126d(0x8ba)]();this[_0x4c126d(0x9c4)]=new Window_AutoBattleCancel(_0xf65454),this[_0x4c126d(0x9c4)][_0x4c126d(0x137)](),this['addChild'](this[_0x4c126d(0x9c4)]);},Scene_Battle['prototype']['autoBattleWindowRect']=function(){const _0x2967e8=_0x5bdce9;return VisuMZ[_0x2967e8(0x61c)][_0x2967e8(0x76e)][_0x2967e8(0xa97)]['AutoBattleRect'][_0x2967e8(0x4b1)](this);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x98d)]=function(){const _0x3c1279=_0x5bdce9;this[_0x3c1279(0xb6a)]=[];},Scene_Battle[_0x5bdce9(0x768)]['updateOnceParallelInterpreters']=function(){const _0x493902=_0x5bdce9;if(!this[_0x493902(0xb6a)])return;for(const _0x1458bd of this['_onceParallelInterpreters']){_0x1458bd&&_0x1458bd[_0x493902(0x367)]();}},Scene_Battle['prototype'][_0x5bdce9(0x3f8)]=function(_0x346281){const _0x54eedf=$dataCommonEvents[_0x346281];if(!_0x54eedf)return;const _0x1d770e=new Game_BattleOnceParallelInterpreter();this['addOnceParallelInterpreter'](_0x1d770e),_0x1d770e['setCommonEvent'](_0x346281);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x5cc)]=function(_0x371eca){const _0x5b9c17=_0x5bdce9;this[_0x5b9c17(0xb6a)]=this[_0x5b9c17(0xb6a)]||[],this['_onceParallelInterpreters'][_0x5b9c17(0x838)](_0x371eca);},Scene_Battle['prototype']['removeOnceParallelInterpreter']=function(_0x3a5ad7){const _0x2ea5bf=_0x5bdce9;this['_onceParallelInterpreters']=this[_0x2ea5bf(0xb6a)]||[],this[_0x2ea5bf(0xb6a)]['remove'](_0x3a5ad7);},Game_Troop[_0x5bdce9(0x768)]['onBattleStartOnceParallels']=function(){const _0x62c047=_0x5bdce9;for(const _0xb78636 of this['troop']()['pages']){if(_0x62c047(0x64b)===_0x62c047(0xa0e))_0x24bed9[_0x62c047(0x29b)]([_0x203428]);else{if(!this[_0x62c047(0xa2a)](_0xb78636))continue;SceneManager[_0x62c047(0x352)][_0x62c047(0xae9)](_0xb78636);}}},Game_Troop[_0x5bdce9(0x768)][_0x5bdce9(0xa2a)]=function(_0x52a39f){const _0x56a667=_0x5bdce9;if(!_0x52a39f)return;for(const _0x25ed0e of _0x52a39f[_0x56a667(0x3cd)]){if([0x6c,0x198][_0x56a667(0x8ed)](_0x25ed0e[_0x56a667(0xabe)])){if(_0x56a667(0x322)!==_0x56a667(0x322))return this[_0x56a667(0x9ee)]();else{const _0x31e000=_0x25ed0e['parameters'][0x0];if(_0x31e000['match'](/<ONCE PARALLEL WHEN START BATTLE>/i))return!![];}}}return![];},Scene_Battle['prototype']['playOnceParallelTroopPage']=function(_0x70f15a){const _0x56a312=_0x5bdce9;if(!_0x70f15a)return;const _0x49b407=new Game_BattleOnceParallelInterpreter();this[_0x56a312(0x5cc)](_0x49b407),_0x49b407[_0x56a312(0x8e8)](_0x70f15a);};function Game_BattleOnceParallelInterpreter(){const _0x1e8610=_0x5bdce9;this[_0x1e8610(0x490)](...arguments);}Game_BattleOnceParallelInterpreter[_0x5bdce9(0x768)]=Object[_0x5bdce9(0xdf)](Game_Interpreter[_0x5bdce9(0x768)]),Game_BattleOnceParallelInterpreter['prototype']['constructor']=Game_BattleOnceParallelInterpreter,Game_BattleOnceParallelInterpreter[_0x5bdce9(0x768)]['setCommonEvent']=function(_0x2dc558){const _0x2d152b=_0x5bdce9,_0x242aaa=$dataCommonEvents[_0x2dc558];if(_0x242aaa)this['setup'](_0x242aaa[_0x2d152b(0x3cd)],0x0);else{if(_0x2d152b(0x421)===_0x2d152b(0x421))this[_0x2d152b(0x6b2)]();else{if(_0xc9b602)_0x15f2d7['processBattleCoreJS'](_0x1c8a67);}}},Game_BattleOnceParallelInterpreter[_0x5bdce9(0x768)][_0x5bdce9(0x6b2)]=function(){const _0xed12ce=_0x5bdce9;if(!SceneManager[_0xed12ce(0x5ea)]())return;SceneManager[_0xed12ce(0x352)][_0xed12ce(0x7f8)](this),Game_Interpreter['prototype'][_0xed12ce(0x6b2)][_0xed12ce(0x4b1)](this);},Game_BattleOnceParallelInterpreter[_0x5bdce9(0x768)]['setTroopPage']=function(_0x1af84e){const _0x37e8a1=_0x5bdce9;_0x1af84e?this[_0x37e8a1(0x5aa)](_0x1af84e['list'],0x0):this['terminate']();},Scene_Battle[_0x5bdce9(0x768)]['isPartyCommandWindowDisabled']=function(){const _0x41e488=_0x5bdce9;return VisuMZ[_0x41e488(0x61c)][_0x41e488(0x76e)][_0x41e488(0x71c)][_0x41e488(0x4c7)];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x398)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x316)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x316)]=function(){const _0x2b8636=_0x5bdce9;this[_0x2b8636(0x375)]()?this[_0x2b8636(0x5f7)]():VisuMZ[_0x2b8636(0x61c)][_0x2b8636(0x398)][_0x2b8636(0x4b1)](this);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x5f7)]=function(){const _0x22d96b=_0x5bdce9;if(BattleManager['isDTB']())this[_0x22d96b(0x427)]();else BattleManager[_0x22d96b(0x985)]()&&VisuMZ['BattleCore'][_0x22d96b(0x398)][_0x22d96b(0x4b1)](this);},VisuMZ['BattleCore'][_0x5bdce9(0x902)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0xb47)],Scene_Battle['prototype']['commandFight']=function(){const _0x5434da=_0x5bdce9;BattleManager[_0x5434da(0x985)]()?(this[_0x5434da(0x7ae)](),this[_0x5434da(0x46c)]()):VisuMZ[_0x5434da(0x61c)]['Scene_Battle_commandFight'][_0x5434da(0x4b1)](this);},Scene_Battle['prototype'][_0x5bdce9(0x7ae)]=function(){const _0x352682=_0x5bdce9;if(!VisuMZ[_0x352682(0x61c)][_0x352682(0xe0)])return;if(Imported[_0x352682(0x548)]&&BattleManager[_0x352682(0xa8e)]())return;const _0x49c1be=$gameParty[_0x352682(0xed)]()['filter'](_0x12422a=>_0x12422a[_0x352682(0x9c8)]()&&_0x12422a[_0x352682(0xe3)]());BattleManager[_0x352682(0x983)]=_0x49c1be[0x0]||null,BattleManager[_0x352682(0x983)]&&BattleManager[_0x352682(0x983)][_0x352682(0xb5c)](_0x352682(0x9f7));},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x2a7)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x6ba)],Scene_Battle['prototype'][_0x5bdce9(0x6ba)]=function(){const _0x34c2f6=_0x5bdce9;VisuMZ['BattleCore'][_0x34c2f6(0x2a7)][_0x34c2f6(0x4b1)](this),this[_0x34c2f6(0x906)]();},Scene_Battle['prototype']['createActorCommandWindowBattleCore']=function(){const _0x4d8c94=_0x5bdce9,_0x15358b=this[_0x4d8c94(0x8df)];_0x15358b[_0x4d8c94(0x456)](_0x4d8c94(0x6ec),this[_0x4d8c94(0x832)]['bind'](this)),_0x15358b[_0x4d8c94(0x456)](_0x4d8c94(0xa63),this[_0x4d8c94(0x4e2)][_0x4d8c94(0x124)](this)),_0x15358b[_0x4d8c94(0x456)]('singleSkill',this[_0x4d8c94(0x615)]['bind'](this));if(BattleManager['isTpb']()){if(this[_0x4d8c94(0x375)]())delete _0x15358b['_handlers'][_0x4d8c94(0x5c1)];else{if(_0x4d8c94(0x767)!=='UOWtr')_0x15358b[_0x4d8c94(0x456)](_0x4d8c94(0x5c1),this[_0x4d8c94(0xeb)]['bind'](this));else{if(this['enemy']()[_0x4d8c94(0x664)][_0x4d8c94(0x16b)](/<BATTLER SPRITE CANNOT MOVE>/i))return![];return _0x598d39['prototype'][_0x4d8c94(0x270)][_0x4d8c94(0x4b1)](this);}}}},Scene_Battle['prototype'][_0x5bdce9(0x832)]=function(){const _0x5d405c=_0x5bdce9;this[_0x5d405c(0x112)]();},Scene_Battle['prototype'][_0x5bdce9(0x4e2)]=function(){const _0x544bda=_0x5bdce9;BattleManager[_0x544bda(0xad6)]()[_0x544bda(0x49c)](),BattleManager['finishActorInput'](),BattleManager[_0x544bda(0xa9d)](),this[_0x544bda(0xaaf)]();},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x615)]=function(){const _0x491f2c=_0x5bdce9,_0x3e52f4=BattleManager[_0x491f2c(0x504)]();_0x3e52f4[_0x491f2c(0x5ab)](this['_actorCommandWindow'][_0x491f2c(0x3fd)]()),this[_0x491f2c(0xd7)]();},Scene_Battle['prototype'][_0x5bdce9(0xeb)]=function(){const _0x30e586=_0x5bdce9;if(this['tpbActorSwitchConditionsMet']())this['performTpbActiveCheckSwitch']();else{if('nXWek'!==_0x30e586(0x55d))return _0x4aca12[_0x30e586(0x61c)][_0x30e586(0x76e)][_0x30e586(0x71c)]['CommandAddAutoBattle'];else this[_0x30e586(0x8d1)]();}},VisuMZ['BattleCore'][_0x5bdce9(0xe0)]=![],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x4fb)]=function(){const _0x4fe09b=_0x5bdce9;if(Imported['VisuMZ_2_BattleSystemCTB']&&BattleManager['isCTB']())return![];else{if(_0x4fe09b(0x194)!=='VapOc')_0x10a594=_0x1045f0*this[_0x4fe09b(0x167)][_0x4fe09b(0xa13)],_0x2cb8c0+=this[_0x4fe09b(0x167)]['damageFlat']*(_0xb2b806>=0x0?0x1:-0x1),_0x1b4c0a=this[_0x4fe09b(0x459)](_0x4fe09b(0x4a1),_0x2d0877,_0x4dbbec,![]),_0x2e61f5=this[_0x4fe09b(0x125)](_0x3da8b1),_0x5141a7=_0x821c13[_0x4fe09b(0xb3f)](_0x45a39f),this[_0x4fe09b(0x507)]=_0x1ff58b,this['_totalValue']=this[_0x4fe09b(0x9d1)]||0x0,this[_0x4fe09b(0x9d1)]+=_0x210743,_0x22fde4[_0x4fe09b(0x61c)]['Game_Action_executeDamage'][_0x4fe09b(0x4b1)](this,_0x216a4f,_0x567399),this[_0x4fe09b(0x459)](_0x4fe09b(0x1d3),_0x318fb3,_0x734dd4,!![]);else{if(!VisuMZ[_0x4fe09b(0x61c)][_0x4fe09b(0xe0)])return![];const _0x248168=$gameParty[_0x4fe09b(0xed)]()[_0x4fe09b(0xb85)](_0x28cfe5=>_0x28cfe5[_0x4fe09b(0x9c8)]()&&_0x28cfe5['canInput']());return _0x248168['length']>0x0&&BattleManager[_0x4fe09b(0xad6)]()!==_0x248168[_0x248168[_0x4fe09b(0x12d)]-0x1];}}},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x378)]=function(){const _0x30e98e=_0x5bdce9,_0x1d6758=BattleManager[_0x30e98e(0xad6)](),_0x505e60=_0x1d6758[_0x30e98e(0xb0d)]();if(_0x505e60)_0x505e60[_0x30e98e(0x2d4)]();const _0x2e0464=$gameParty[_0x30e98e(0xed)]()[_0x30e98e(0xb85)](_0x4f64d7=>_0x4f64d7[_0x30e98e(0x9c8)]()&&_0x4f64d7[_0x30e98e(0xe3)]()),_0x5e5f52=_0x2e0464[_0x30e98e(0x977)](_0x1d6758),_0x28e2be=_0x2e0464[_0x5e5f52+0x1];BattleManager[_0x30e98e(0x983)]=_0x28e2be||null;if(_0x28e2be)_0x28e2be[_0x30e98e(0xb5c)](_0x30e98e(0x9f7));_0x1d6758[_0x30e98e(0xb5c)](_0x30e98e(0x8b2)),this[_0x30e98e(0xaaf)]();},Scene_Battle['prototype'][_0x5bdce9(0x8d1)]=function(){const _0x18e745=_0x5bdce9;this[_0x18e745(0x95e)]['setup'](),this[_0x18e745(0x8df)][_0x18e745(0x6de)]();if(!VisuMZ[_0x18e745(0x61c)]['TpbActiveChangeEnabled'])return;if(Imported[_0x18e745(0x548)]&&BattleManager[_0x18e745(0xa8e)]())return;if(BattleManager[_0x18e745(0x983)]){if(_0x18e745(0x605)===_0x18e745(0x605)){BattleManager[_0x18e745(0x983)][_0x18e745(0xb5c)]('undecided');const _0x94f4b2=BattleManager[_0x18e745(0x983)][_0x18e745(0xb0d)]();if(_0x94f4b2)_0x94f4b2[_0x18e745(0x2d4)]();}else this['performAttack']();}BattleManager[_0x18e745(0x983)]=null;},VisuMZ['BattleCore']['Scene_Battle_createHelpWindow']=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x1e0)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x1e0)]=function(){const _0x22423c=_0x5bdce9;VisuMZ[_0x22423c(0x61c)][_0x22423c(0x431)][_0x22423c(0x4b1)](this),this[_0x22423c(0x2df)]();},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x2df)]=function(){const _0x112867=_0x5bdce9;this[_0x112867(0x8df)][_0x112867(0x797)](this[_0x112867(0xa0f)]),this[_0x112867(0x95e)][_0x112867(0x797)](this[_0x112867(0xa0f)]);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x19d)]=function(){const _0x4cf37c=_0x5bdce9;if($gameTemp['_forcedBattleLayout']!==undefined)return $gameTemp['_forcedBattleLayout'];if(this[_0x4cf37c(0x4e7)])return this[_0x4cf37c(0x4e7)];return this['_battleLayoutStyle']=VisuMZ[_0x4cf37c(0x61c)][_0x4cf37c(0x76e)][_0x4cf37c(0x40f)]['Style'][_0x4cf37c(0x63a)]()[_0x4cf37c(0x92d)](),this[_0x4cf37c(0x4e7)]===_0x4cf37c(0x74f)&&!Imported[_0x4cf37c(0x8fd)]&&(this['_battleLayoutStyle']=_0x4cf37c(0xa34)),this[_0x4cf37c(0x4e7)];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x200)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x578)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x578)]=function(){const _0x44d576=_0x5bdce9,_0x32f663=this['battleLayoutStyle']();switch(_0x32f663){case'list':return this[_0x44d576(0x599)](Math[_0x44d576(0xa5e)](0x1,$gameParty[_0x44d576(0x535)]()),!![]);break;default:return VisuMZ['BattleCore'][_0x44d576(0x200)][_0x44d576(0x4b1)](this);break;}},VisuMZ['BattleCore']['Scene_Battle_helpWindowRect']=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x5bc)],Scene_Battle[_0x5bdce9(0x768)]['helpWindowRect']=function(){const _0x3ee74f=_0x5bdce9,_0xec2b74=this[_0x3ee74f(0x19d)]();switch(_0xec2b74){case _0x3ee74f(0x5f1):return this[_0x3ee74f(0x831)]();break;case'default':case _0x3ee74f(0x3cd):case'xp':case _0x3ee74f(0x71f):default:return VisuMZ[_0x3ee74f(0x61c)][_0x3ee74f(0xa43)][_0x3ee74f(0x4b1)](this);break;}},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x97e)]=function(){const _0x3fc704=_0x5bdce9,_0x436bb1=this[_0x3fc704(0x19d)]();switch(_0x436bb1){case'xp':case'portrait':return this[_0x3fc704(0x182)]();break;case _0x3fc704(0x5f1):return this[_0x3fc704(0x6c6)]();break;case'default':case _0x3fc704(0x3cd):default:return this[_0x3fc704(0xa64)]();break;}},VisuMZ[_0x5bdce9(0x61c)]['Scene_Battle_partyCommandWindowRect']=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x7d1)],Scene_Battle['prototype'][_0x5bdce9(0x7d1)]=function(){const _0x10193f=_0x5bdce9,_0x49e196=this[_0x10193f(0x19d)]();switch(_0x49e196){case'xp':case'portrait':return this[_0x10193f(0x30b)]();break;case'border':return this[_0x10193f(0xb39)]();case _0x10193f(0xa34):case _0x10193f(0x3cd):default:return this[_0x10193f(0x550)]();break;}},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x550)]=function(){const _0x5431d8=_0x5bdce9,_0x59c171=VisuMZ[_0x5431d8(0x61c)][_0x5431d8(0x76e)][_0x5431d8(0x40f)],_0x3f5acb=_0x59c171['CommandWidth']||0xc0,_0x27997b=this[_0x5431d8(0x578)](),_0x3b1811=this[_0x5431d8(0x396)]()?Graphics['boxWidth']-_0x3f5acb:0x0,_0x7ae3aa=Graphics[_0x5431d8(0x51f)]-_0x27997b;return new Rectangle(_0x3b1811,_0x7ae3aa,_0x3f5acb,_0x27997b);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x1a2)]=function(){const _0x6afd93=_0x5bdce9;return this[_0x6afd93(0x7d1)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x163)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x59e)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x59e)]=function(){const _0x146d2c=_0x5bdce9,_0x33d5d5=this[_0x146d2c(0x19d)]();switch(_0x33d5d5){case'xp':case _0x146d2c(0x71f):case _0x146d2c(0x5f1):break;case _0x146d2c(0xa34):case _0x146d2c(0x3cd):default:VisuMZ[_0x146d2c(0x61c)]['Scene_Battle_updateStatusWindowPosition'][_0x146d2c(0x4b1)](this);break;}},VisuMZ['BattleCore'][_0x5bdce9(0x1b5)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x64c)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x64c)]=function(){const _0x4e9eb5=_0x5bdce9;VisuMZ[_0x4e9eb5(0x61c)][_0x4e9eb5(0x1b5)][_0x4e9eb5(0x4b1)](this),this[_0x4e9eb5(0x176)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x52d)]=Scene_Battle[_0x5bdce9(0x768)]['startEnemySelection'],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x1ef)]=function(){const _0x53978b=_0x5bdce9;VisuMZ['BattleCore']['Scene_Battle_startEnemySelection'][_0x53978b(0x4b1)](this),this[_0x53978b(0x22b)]['autoSelect'](),this[_0x53978b(0x176)]();},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x176)]=function(){const _0x407ce0=_0x5bdce9,_0x3b322d=this[_0x407ce0(0x19d)]();['xp',_0x407ce0(0x71f),_0x407ce0(0x5f1)]['includes'](_0x3b322d)&&this[_0x407ce0(0x8df)]['close'](),(_0x3b322d===_0x407ce0(0x5f1)||this['isSkillItemWindowsMiddle']())&&('HNiem'==='UkRHH'?(_0x29d125=_0x38de07[_0x407ce0(0x3a7)](/\x1I\[(\d+)\]/gi,''),_0x5e81a1=_0x2b4e47['replace'](/\\I\[(\d+)\]/gi,'')):(this[_0x407ce0(0xa94)][_0x407ce0(0x6de)](),this['_itemWindow'][_0x407ce0(0x6de)]()));},VisuMZ[_0x5bdce9(0x61c)]['Scene_Battle_onActorOk']=Scene_Battle[_0x5bdce9(0x768)]['onActorOk'],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x4ae)]=function(){const _0x12e24e=_0x5bdce9;VisuMZ[_0x12e24e(0x61c)]['Scene_Battle_onActorOk'][_0x12e24e(0x4b1)](this),this[_0x12e24e(0x3f3)]();},Scene_Battle['prototype'][_0x5bdce9(0x771)]=function(){const _0x48e3ff=_0x5bdce9;return['attack',_0x48e3ff(0xe9),_0x48e3ff(0x9b0)][_0x48e3ff(0x8ed)](this['_actorCommandWindow'][_0x48e3ff(0x733)]());},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x4c8)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x927)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x927)]=function(){const _0x5dbf7f=_0x5bdce9;this['isNonSubmenuCancel']()?(this['_statusWindow'][_0x5dbf7f(0x243)](),this[_0x5dbf7f(0x1ea)][_0x5dbf7f(0x137)](),this[_0x5dbf7f(0x8df)][_0x5dbf7f(0x11b)]()):VisuMZ['BattleCore'][_0x5dbf7f(0x4c8)][_0x5dbf7f(0x4b1)](this),this[_0x5dbf7f(0x2ad)]();},VisuMZ['BattleCore'][_0x5bdce9(0x3a2)]=Scene_Battle[_0x5bdce9(0x768)]['onEnemyOk'],Scene_Battle['prototype']['onEnemyOk']=function(){const _0x1dcde6=_0x5bdce9;VisuMZ[_0x1dcde6(0x61c)]['Scene_Battle_onEnemyOk'][_0x1dcde6(0x4b1)](this),this[_0x1dcde6(0x3f3)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x6cf)]=Scene_Battle['prototype'][_0x5bdce9(0x890)],Scene_Battle[_0x5bdce9(0x768)]['onEnemyCancel']=function(){const _0x227e49=_0x5bdce9;this[_0x227e49(0x771)]()?(this[_0x227e49(0x3e2)]['show'](),this[_0x227e49(0x22b)][_0x227e49(0x137)](),this[_0x227e49(0x8df)][_0x227e49(0x11b)]()):VisuMZ[_0x227e49(0x61c)][_0x227e49(0x6cf)][_0x227e49(0x4b1)](this),this['cancelTargetSelectionVisibility']();},Scene_Battle['prototype']['okTargetSelectionVisibility']=function(){const _0x2ef62b=_0x5bdce9,_0x23b785=this[_0x2ef62b(0x19d)]();if(_0x23b785===_0x2ef62b(0x5f1)||this[_0x2ef62b(0x493)]()){if(_0x2ef62b(0x799)!==_0x2ef62b(0x946)){this[_0x2ef62b(0xa94)][_0x2ef62b(0x9a0)]();if(this[_0x2ef62b(0xa94)][_0x2ef62b(0x672)]){if('Azayx'===_0x2ef62b(0x6c8))this[_0x2ef62b(0xa94)][_0x2ef62b(0x243)]();else{if(_0x50611e[_0x2ef62b(0x976)][_0x2ef62b(0x491)]()&&_0x19451e[_0x2ef62b(0x976)][_0x2ef62b(0x203)]())return 0x1;else{if(_0x38f6fd[_0x2ef62b(0x976)][_0x2ef62b(0x491)]()&&_0x3fe30f[_0x2ef62b(0x976)][_0x2ef62b(0x203)]())return-0x1;}}}this['_itemWindow'][_0x2ef62b(0x9a0)]();if(this['_itemWindow']['active']){if(_0x2ef62b(0xb01)!==_0x2ef62b(0xb01)){_0x2213e2[_0x2ef62b(0x983)][_0x2ef62b(0xb5c)](_0x2ef62b(0x8b2));const _0x5e9f85=_0x257074['_currentActor']['battler']();if(_0x5e9f85)_0x5e9f85[_0x2ef62b(0x2d4)]();}else this[_0x2ef62b(0x855)][_0x2ef62b(0x243)]();}}else this[_0x2ef62b(0x168)]=_0x2ef62b(0x71f);}},Scene_Battle['prototype'][_0x5bdce9(0x2ad)]=function(){const _0x5ebb1c=_0x5bdce9,_0x4b08a5=this['battleLayoutStyle']();['xp',_0x5ebb1c(0x71f),_0x5ebb1c(0x5f1)][_0x5ebb1c(0x8ed)](_0x4b08a5)&&this['_actorCommandWindow'][_0x5ebb1c(0x9a0)](),this['okTargetSelectionVisibility']();},Scene_Battle['prototype'][_0x5bdce9(0xa64)]=function(){const _0x4b2b47=_0x5bdce9,_0x3a43a7=VisuMZ['BattleCore'][_0x4b2b47(0x76e)][_0x4b2b47(0x40f)],_0x491506=Window_BattleStatus['prototype'][_0x4b2b47(0xaa7)](),_0x298c2c=Graphics[_0x4b2b47(0x7fb)]-(_0x3a43a7['CommandWidth']||0xc0),_0x1bff27=this['windowAreaHeight']()+_0x491506,_0x245753=this[_0x4b2b47(0x396)]()?0x0:Graphics['boxWidth']-_0x298c2c,_0x373e45=Graphics[_0x4b2b47(0x51f)]-_0x1bff27+_0x491506;return new Rectangle(_0x245753,_0x373e45,_0x298c2c,_0x1bff27);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x182)]=function(){const _0x3c2d3a=_0x5bdce9,_0x37eefe=Window_BattleStatus[_0x3c2d3a(0x768)][_0x3c2d3a(0xaa7)](),_0x5ab41a=Graphics[_0x3c2d3a(0x7fb)],_0x342960=this[_0x3c2d3a(0x578)]()+_0x37eefe,_0x21bfec=0x0,_0x5c17e3=Graphics[_0x3c2d3a(0x51f)]-_0x342960+_0x37eefe;return new Rectangle(_0x21bfec,_0x5c17e3,_0x5ab41a,_0x342960);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x30b)]=function(){const _0x5b8e79=_0x5bdce9,_0x2de93a=Graphics[_0x5b8e79(0x7fb)]/0x2,_0x34a395=this[_0x5b8e79(0x599)](VisuMZ[_0x5b8e79(0x61c)][_0x5b8e79(0x76e)]['BattleLayout'][_0x5b8e79(0x997)],!![]),_0x11e29a=Math[_0x5b8e79(0xb3f)]((Graphics[_0x5b8e79(0x7fb)]-_0x2de93a)/0x2),_0x2cf94b=Graphics[_0x5b8e79(0x51f)]-_0x34a395-this['statusWindowRectXPStyle']()[_0x5b8e79(0x3b0)];return new Rectangle(_0x11e29a,_0x2cf94b,_0x2de93a,_0x34a395);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x831)]=function(){const _0x485040=_0x5bdce9,_0x4c2aed=Graphics[_0x485040(0x3b2)],_0x40794b=Math[_0x485040(0xb3f)]((Graphics['boxWidth']-_0x4c2aed)/0x2),_0x59d368=this[_0x485040(0x714)](),_0x2036ce=(Graphics[_0x485040(0x3b0)]-Graphics[_0x485040(0x51f)])/-0x2;return new Rectangle(_0x40794b,_0x2036ce,_0x4c2aed,_0x59d368);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x6c6)]=function(){const _0x9cde46=_0x5bdce9,_0x369c36=Graphics[_0x9cde46(0x3b2)],_0xd0b0d6=Math[_0x9cde46(0xb3f)]((Graphics[_0x9cde46(0x7fb)]-_0x369c36)/0x2),_0x553054=this['calcWindowHeight'](0x4,!![]),_0x1c99de=Graphics[_0x9cde46(0x51f)]-_0x553054+(Graphics['height']-Graphics[_0x9cde46(0x51f)])/0x2;return new Rectangle(_0xd0b0d6,_0x1c99de,_0x369c36,_0x553054);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0xb39)]=function(){const _0x33f0bd=_0x5bdce9,_0x390029=Math['floor'](Graphics[_0x33f0bd(0x3b2)]/0x3),_0x8695d0=this['isRightInputMode']()?(Graphics[_0x33f0bd(0x3b2)]+Graphics['boxWidth'])/0x2-_0x390029:(Graphics[_0x33f0bd(0x3b2)]-Graphics[_0x33f0bd(0x7fb)])/-0x2,_0x516b26=this[_0x33f0bd(0x831)](),_0x3bc05d=_0x516b26['y']+_0x516b26[_0x33f0bd(0x3b0)],_0x11ea77=this[_0x33f0bd(0x6c6)](),_0x329f8e=_0x11ea77['y']-_0x3bc05d;return new Rectangle(_0x8695d0,_0x3bc05d,_0x390029,_0x329f8e);},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x9ee)]=function(){const _0x46168e=_0x5bdce9,_0x33e579=Math[_0x46168e(0xa44)](Graphics[_0x46168e(0x3b2)]/0x3),_0x438ef0=Math['round']((Graphics['boxWidth']-_0x33e579)/0x2),_0x2c3c3c=this[_0x46168e(0xb39)](),_0x306540=_0x2c3c3c['y'],_0xcc8941=_0x2c3c3c[_0x46168e(0x3b0)];return new Rectangle(_0x438ef0,_0x306540,_0x33e579,_0xcc8941);},Scene_Battle[_0x5bdce9(0x768)]['repositionCancelButtonBorderStyle']=function(){const _0x21a268=_0x5bdce9;this[_0x21a268(0x4a2)]['y']=this['_helpWindow']['y']+this[_0x21a268(0xa0f)][_0x21a268(0x3b0)];if(this[_0x21a268(0x396)]()){if(this[_0x21a268(0x19d)]()===_0x21a268(0x5f1)){if(_0x21a268(0x9c7)!=='jmnck')this[_0x21a268(0x4a2)]['x']=0x8;else{if(!_0x4d935a[_0x21a268(0x5ea)]())return;const _0x516bdf=_0x50cddf['getLastPluginCommandInterpreter']();if(!_0x516bdf)return;_0x516bdf[_0x21a268(0x73c)]('battleGrow');}}else this[_0x21a268(0x4a2)]['x']=-this['_cancelButton'][_0x21a268(0x3b2)]-0x4;}else{if(_0x21a268(0x425)!==_0x21a268(0x425)){const _0x3527cc=_0x21a268(0x5d4)[_0x21a268(0x824)](_0x343290);_0x1c48cf[_0x21a268(0x61c)]['JS'][_0x1117f5]=new _0x5cadc1(_0x3527cc);}else this[_0x21a268(0x4a2)]['x']=Graphics[_0x21a268(0x3b2)]-(Graphics[_0x21a268(0x3b2)]-Graphics[_0x21a268(0x7fb)])/0x2-this[_0x21a268(0x4a2)][_0x21a268(0x3b2)]-0x4;}},VisuMZ[_0x5bdce9(0x61c)]['Scene_Battle_skillWindowRect']=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0xabb)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0xabb)]=function(){const _0x53cebe=_0x5bdce9;if(this[_0x53cebe(0x19d)]()===_0x53cebe(0x5f1)){if(_0x53cebe(0xb75)===_0x53cebe(0x76d))this['startWeaponAnimation'](_0x2c4460[_0x53cebe(0x1dc)]);else return this[_0x53cebe(0x9ee)]();}else{if(this['isSkillItemWindowsMiddle']()){if(_0x53cebe(0xb27)!==_0x53cebe(0x63d))return this['skillItemWindowRectMiddle']();else _0x264b55[_0x53cebe(0x61c)][_0x53cebe(0x853)][_0x53cebe(0x4b1)](this,_0x578f7b);}else{if(_0x53cebe(0x21b)!==_0x53cebe(0x21b)){if(!_0x90003a[_0x53cebe(0x68b)]())return;const _0x5879a5=this[_0x53cebe(0xb0d)]();if(!_0x5879a5)return;_0x5879a5[_0x53cebe(0x3c2)](_0x3950c4,_0x555f67,_0x1f9ab9,_0x1f4198);}else return VisuMZ[_0x53cebe(0x61c)][_0x53cebe(0xea)]['call'](this);}}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x5e6)]=Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x291)],Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x291)]=function(){const _0x20cf44=_0x5bdce9;if(this[_0x20cf44(0x19d)]()==='border')return this[_0x20cf44(0x9ee)]();else{if(this[_0x20cf44(0x493)]()){if('rYgWx'!=='rYgWx'){const _0x105710=_0x1f5017(_0x58368['$1'])[_0x20cf44(0x761)](/[\r\n]+/)[_0x20cf44(0x671)]('');_0x25844d['motionIdle']=_0x47d07c['processRandomizedData'](_0x105710);}else return this['skillItemWindowRectMiddle']();}else return VisuMZ[_0x20cf44(0x61c)][_0x20cf44(0x5e6)][_0x20cf44(0x4b1)](this);}},Scene_Battle[_0x5bdce9(0x768)]['isSkillItemWindowsMiddle']=function(){const _0x1f7c64=_0x5bdce9;return VisuMZ['BattleCore'][_0x1f7c64(0x76e)][_0x1f7c64(0x40f)][_0x1f7c64(0x5df)];},Scene_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x394)]=function(){const _0x2fbdcb=_0x5bdce9,_0x4b8dad=Sprite_Button[_0x2fbdcb(0x768)][_0x2fbdcb(0x16d)]()*0x2+0x4;let _0x43a3b3=Graphics[_0x2fbdcb(0x7fb)]-_0x4b8dad;if(Imported['VisuMZ_0_CoreEngine']&&SceneManager[_0x2fbdcb(0xa33)]()){if(_0x2fbdcb(0x395)==='ccsal')return _0xb4661b[_0x2fbdcb(0x61c)][_0x2fbdcb(0x76e)][_0x2fbdcb(0x14a)][_0x2fbdcb(0x996)];else _0x43a3b3+=_0x4b8dad;}const _0x276c91=this[_0x2fbdcb(0x882)](),_0x21128d=Graphics[_0x2fbdcb(0x51f)]-_0x276c91-this[_0x2fbdcb(0x97e)]()[_0x2fbdcb(0x3b0)]+Window_BattleStatus[_0x2fbdcb(0x768)]['extraHeight'](),_0x5e50d2=0x0;return new Rectangle(_0x5e50d2,_0x276c91,_0x43a3b3,_0x21128d);},Scene_Battle['prototype'][_0x5bdce9(0x8f8)]=function(){const _0x3890d7=_0x5bdce9;if(!VisuMZ[_0x3890d7(0x61c)]['Settings']['Enemy'][_0x3890d7(0xb57)])return;this['_enemyNameContainer']=new Sprite(),this['_enemyNameContainer']['x']=this[_0x3890d7(0xb84)]['x'],this[_0x3890d7(0x763)]['y']=this[_0x3890d7(0xb84)]['y'];const _0x5cc77f=this[_0x3890d7(0x317)][_0x3890d7(0x977)](this[_0x3890d7(0xb84)]);this[_0x3890d7(0x783)](this['_enemyNameContainer'],_0x5cc77f);for(let _0x25d80e=0x0;_0x25d80e<0x8;_0x25d80e++){if(_0x3890d7(0x7b4)==='pIJQp'){_0x1e4854[_0x3890d7(0x61c)][_0x3890d7(0x282)][_0x3890d7(0x4b1)](this,_0x5a0b0f,_0x2a22ba);if(!_0x317e97[_0x3890d7(0x606)]())return;for(const _0x23ec19 of this[_0x3890d7(0xb83)]()[_0x3890d7(0xab8)]()){if(_0x23ec19===_0x24db46[_0x3890d7(0x555)]()){let _0x40cdc4=_0x15cd28['value1'];_0x40cdc4*=_0x1b0107[_0x3890d7(0x5b7)](_0x23ec19),_0x40cdc4*=this[_0x3890d7(0xb83)]()[_0x3890d7(0x5e3)](_0x23ec19),_0x40cdc4*=this[_0x3890d7(0x2ef)](_0x3237db),_0x27204d[_0x3890d7(0x3df)]()<_0x40cdc4&&(_0x20ce2b[_0x3890d7(0xb87)]=!![],this[_0x3890d7(0xa4c)](_0x265382));}}}else{const _0x69c5d2=new Window_EnemyName(_0x25d80e);this[_0x3890d7(0x763)]['addChild'](_0x69c5d2);}}},Sprite_Battler[_0x5bdce9(0x2cf)]=VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x76e)][_0x5bdce9(0xe6)][_0x5bdce9(0x61f)],VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xad7)]=Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3b5)],Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3b5)]=function(){const _0x535f33=_0x5bdce9;VisuMZ[_0x535f33(0x61c)][_0x535f33(0xad7)][_0x535f33(0x4b1)](this),this['initMembersBattleCore']();if(this[_0x535f33(0x56d)]===Sprite_Enemy)this[_0x535f33(0x598)]();this[_0x535f33(0xa91)]();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x858)]=function(){const _0xa5ddda=_0x5bdce9;this[_0xa5ddda(0x8f0)]=0x0,this[_0xa5ddda(0x4c9)]=0x0,this[_0xa5ddda(0x16a)]=0x0,this['_targetFloatHeight']=0x0,this['_floatDuration']=0x0,this[_0xa5ddda(0x8ff)]=0x0,this[_0xa5ddda(0x7aa)]='Linear',this['_jumpHeight']=0x0,this['_jumpMaxHeight']=0x0,this['_jumpDuration']=0x0,this[_0xa5ddda(0xa07)]=0x0,this[_0xa5ddda(0x546)]=0xff,this[_0xa5ddda(0x65b)]=0x0,this[_0xa5ddda(0x5d0)]=0x0,this[_0xa5ddda(0xa21)]=_0xa5ddda(0x32d),this[_0xa5ddda(0xa60)]=0x0,this['_targetAngle']=0x0,this['_angleDuration']=0x0,this[_0xa5ddda(0x7f0)]=0x0,this['_angleEasing']=_0xa5ddda(0x32d),this['_angleRevertOnFinish']=!![],this[_0xa5ddda(0xa23)]=0x0,this[_0xa5ddda(0x1c7)]=0x0,this[_0xa5ddda(0x35e)]=0x0,this[_0xa5ddda(0x69a)]=0x0,this[_0xa5ddda(0x1a9)]=0x0,this['_skewWholeDuration']=0x0,this['_skewEasing']=_0xa5ddda(0x32d),this[_0xa5ddda(0x326)]=0x1,this[_0xa5ddda(0x461)]=0x1,this['_targetGrowX']=0x1,this[_0xa5ddda(0x739)]=0x1,this['_growDuration']=0x0,this['_growWholeDuration']=0x0,this[_0xa5ddda(0x729)]='Linear',this[_0xa5ddda(0x7b1)]=0x1,this['_targetHomeX']=0x0,this[_0xa5ddda(0x8fb)]=0x0,this[_0xa5ddda(0x1a8)]=0x0,this[_0xa5ddda(0x21a)]=0x0,this['_homeEasing']=_0xa5ddda(0x32d);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x598)]=function(){const _0x37ceab=_0x5bdce9;this[_0x37ceab(0x748)]=new Sprite(),this[_0x37ceab(0x748)]['bitmap']=ImageManager[_0x37ceab(0x691)]('Shadow2'),this['_shadowSprite'][_0x37ceab(0x454)][_0x37ceab(0x302)]=VisuMZ['BattleCore']['Settings'][_0x37ceab(0xe6)][_0x37ceab(0x338)],this[_0x37ceab(0x748)][_0x37ceab(0x887)]['x']=0.5,this[_0x37ceab(0x748)][_0x37ceab(0x887)]['y']=0.5,this[_0x37ceab(0x748)]['y']=-0x2,this[_0x37ceab(0x748)]['visible']=![],this[_0x37ceab(0xa8d)](this[_0x37ceab(0x748)]);},Sprite_Battler[_0x5bdce9(0x768)]['createDistortionSprite']=function(){const _0x59b836=_0x5bdce9;this[_0x59b836(0xa9b)]=new Sprite(),this[_0x59b836(0xa9b)][_0x59b836(0x887)]['x']=0.5,this[_0x59b836(0xa9b)][_0x59b836(0x887)]['y']=0.5,this[_0x59b836(0xa8d)](this[_0x59b836(0xa9b)]);},Sprite_Battler[_0x5bdce9(0x768)]['attachSpritesToDistortionSprite']=function(){const _0x5d3383=_0x5bdce9;if(!this[_0x5d3383(0xa9b)])return;if(this[_0x5d3383(0x748)]){if(_0x5d3383(0xa84)===_0x5d3383(0xa4e)){if(!_0x1b8a94)return;for(const _0x5830bb of _0x17f545[_0x5d3383(0x3cd)]){if([0x6c,0x198][_0x5d3383(0x8ed)](_0x5830bb[_0x5d3383(0xabe)])){const _0xa2b992=_0x5830bb[_0x5d3383(0x2f6)][0x0];if(_0xa2b992[_0x5d3383(0x16b)](/<ONCE PARALLEL WHEN START BATTLE>/i))return!![];}}return![];}else{const _0x34c668=this[_0x5d3383(0xd4)](this[_0x5d3383(0xa9b)]);this['addChildAt'](this[_0x5d3383(0x748)],_0x34c668),this[_0x5d3383(0x643)]();}}this[_0x5d3383(0x3d6)]&&this[_0x5d3383(0xa9b)][_0x5d3383(0xa8d)](this[_0x5d3383(0x3d6)]);if(this[_0x5d3383(0x826)]){if(_0x5d3383(0x82c)!==_0x5d3383(0x82c)){const _0x5d5edf=_0x1bd849[_0x5d3383(0x61c)][_0x5d3383(0x76e)][_0x5d3383(0x2c4)];if(!_0x5d5edf[_0x5d3383(0x356)])return;this[_0x5d3383(0x838)]('addText',_0x5d5edf[_0x5d3383(0x804)]['format'](_0x2f7343[_0x5d3383(0x7a0)]())),this[_0x5d3383(0x838)]('waitCount',_0x5d5edf[_0x5d3383(0xac5)]),this['push'](_0x5d3383(0x89d));}else this[_0x5d3383(0xa9b)][_0x5d3383(0xa8d)](this[_0x5d3383(0x826)]);}this['_mainSprite']&&this['_distortionSprite'][_0x5d3383(0xa8d)](this[_0x5d3383(0xa5b)]);if(this[_0x5d3383(0x30c)]){if(_0x5d3383(0x3e5)==='CCBjF')this[_0x5d3383(0xa9b)][_0x5d3383(0xa8d)](this[_0x5d3383(0x30c)]);else return 0x0;}},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x643)]=function(){const _0x15cb77=_0x5bdce9;if(!this['_shadowSprite'])return;if(this['_battler']&&this[_0x15cb77(0x976)]['svBattlerShadowVisible']()){const _0x291b7d=this[_0x15cb77(0x748)][_0x15cb77(0x454)];this[_0x15cb77(0x748)]['setFrame'](0x0,0x0,_0x291b7d[_0x15cb77(0x3b2)],_0x291b7d[_0x15cb77(0x3b0)]);}else this[_0x15cb77(0x748)][_0x15cb77(0x8da)](0x0,0x0,0x0,0x0);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x32f)]=function(){const _0x40eaed=_0x5bdce9;if(SceneManager[_0x40eaed(0x5ea)]())return'ezSrJ'===_0x40eaed(0x888)?SceneManager['_scene'][_0x40eaed(0x25a)][_0x40eaed(0x3ad)]:_0x155723['BattleCore'][_0x40eaed(0x76e)][_0x40eaed(0x59c)]['CmdTextAlign'];else{if('XYcIb'!==_0x40eaed(0x242))return this[_0x40eaed(0x80c)];else _0x4cf8e8[_0x40eaed(0x4c3)]=_0x34d663,_0x59b33f[_0x40eaed(0xb25)]=!![],this[_0x40eaed(0x73d)]();}},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0xafa)]=function(_0x537f4a,_0x25b53e){const _0x15f518=_0x5bdce9;if(!this['_battler'][_0x15f518(0x3e7)]())return;const _0xd929ea=VisuMZ[_0x15f518(0x61c)][_0x15f518(0x76e)][_0x15f518(0x40d)],_0x154cb6=new Sprite_Damage();_0x154cb6[_0x15f518(0x388)]=_0xd929ea[_0x15f518(0x638)],this[_0x15f518(0x6fb)](_0x154cb6),_0x154cb6['setupTextPopup'](_0x537f4a,_0x25b53e),this[_0x15f518(0x50b)](_0x154cb6);},Sprite_Battler['prototype']['setupIconTextPopup']=function(_0x367a9f,_0x590cc0,_0x1fb31d){const _0x46702d=_0x5bdce9;if(!this['_battler'][_0x46702d(0x3e7)]())return;const _0x49a7a2=VisuMZ['BattleCore'][_0x46702d(0x76e)][_0x46702d(0x40d)],_0x45b4e3=new Sprite_Damage();_0x45b4e3['_duration']=_0x49a7a2[_0x46702d(0x638)],this[_0x46702d(0x6fb)](_0x45b4e3),_0x45b4e3[_0x46702d(0x974)](_0x367a9f,_0x590cc0,_0x1fb31d),this[_0x46702d(0x50b)](_0x45b4e3);},Sprite_Battler['prototype'][_0x5bdce9(0x8b0)]=function(){const _0x1f0e23=_0x5bdce9;if(!this['_battler'][_0x1f0e23(0x968)]())return;while(this['_battler']['isDamagePopupRequested']()){if(this[_0x1f0e23(0x976)]['isSpriteVisible']()){if(_0x1f0e23(0xac2)==='NeTSQ')this[_0x1f0e23(0x1d7)]();else return _0x2989be[_0x1f0e23(0xb0d)]()['_baseX']===_0x2abcda['battler']()['_baseX']?_0x4e38f5[_0x1f0e23(0xb0d)]()[_0x1f0e23(0x4c9)]-_0x488bdf[_0x1f0e23(0xb0d)]()[_0x1f0e23(0x4c9)]:_0x1aa837[_0x1f0e23(0xb0d)]()[_0x1f0e23(0x8f0)]-_0x59255e[_0x1f0e23(0xb0d)]()[_0x1f0e23(0x8f0)];}}this[_0x1f0e23(0x976)][_0x1f0e23(0x403)](),this[_0x1f0e23(0x976)]['clearResult']();},Sprite_Battler[_0x5bdce9(0x768)]['createDamageSprite']=function(){const _0x58a48f=_0x5bdce9,_0x437721=VisuMZ[_0x58a48f(0x61c)][_0x58a48f(0x76e)][_0x58a48f(0x40d)],_0x774f11=new Sprite_Damage();_0x774f11[_0x58a48f(0x388)]=_0x437721['PopupDuration'],this[_0x58a48f(0x6fb)](_0x774f11),_0x774f11[_0x58a48f(0x5aa)](this[_0x58a48f(0x976)]),_0x774f11[_0x58a48f(0x10b)](this[_0x58a48f(0x976)]),this[_0x58a48f(0x50b)](_0x774f11);},Sprite_Battler[_0x5bdce9(0x768)]['addDamageSprite']=function(_0x405f11){const _0x415c83=_0x5bdce9;this['_damages'][_0x415c83(0x838)](_0x405f11);if(this[_0x415c83(0x8bd)]())_0x415c83(0x8bb)===_0x415c83(0x55b)?(this[_0x415c83(0x8f0)]=this['x'],this['_baseY']=this['y'],this[_0x415c83(0x1e3)](),this[_0x415c83(0x39b)](),this['x']+=this[_0x415c83(0x5e0)](),this['y']+=this[_0x415c83(0x640)](),this['y']+=this[_0x415c83(0x3cf)](),this['x']=_0x558547['floor'](this['x']),this['y']=_0x52cb03[_0x415c83(0x618)](this['y'])):SceneManager[_0x415c83(0x352)][_0x415c83(0x3e2)][_0x415c83(0x50b)](_0x405f11,this[_0x415c83(0x976)]);else{this[_0x415c83(0x32f)]()[_0x415c83(0xa8d)](_0x405f11);if(SceneManager['isBattleFlipped']())_0x405f11[_0x415c83(0x91d)]['x']=-0x1;}},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x8bd)]=function(){const _0x41a541=_0x5bdce9;return!$gameSystem[_0x41a541(0x68b)]()&&this['_battler']&&this[_0x41a541(0x976)][_0x41a541(0x491)]();},Sprite_Battler['prototype']['sortDamageSprites']=function(_0x3dcf9a){const _0x2a31b5=_0x5bdce9;this[_0x2a31b5(0x7cd)](_0x3dcf9a,!![]);const _0x37bb5d=VisuMZ['BattleCore'][_0x2a31b5(0x76e)][_0x2a31b5(0x40d)],_0x241fa9=SceneManager['isBattleFlipped']()?-0x1:0x1;if(_0x37bb5d[_0x2a31b5(0xa29)])for(const _0x16206f of this[_0x2a31b5(0x104)]){_0x16206f['x']+=_0x37bb5d[_0x2a31b5(0x808)]*_0x241fa9,_0x16206f['y']+=_0x37bb5d[_0x2a31b5(0x9aa)];}else{const _0x51a8cf=this['_damages'][this['_damages'][_0x2a31b5(0x12d)]-0x1];_0x51a8cf&&(_0x3dcf9a['x']=_0x51a8cf['x']+_0x37bb5d[_0x2a31b5(0x808)]*_0x241fa9,_0x3dcf9a['y']=_0x51a8cf['y']+_0x37bb5d[_0x2a31b5(0x9aa)]);}},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x7cd)]=function(_0x48f5fb,_0x9b11f6){const _0x29ea85=_0x5bdce9,_0x1adcdf=SceneManager[_0x29ea85(0x345)]()?-0x1:0x1;let _0x11fa1a=this[_0x29ea85(0x8f0)];_0x11fa1a+=this[_0x29ea85(0x5e0)]();let _0x186f8b=this[_0x29ea85(0x4c9)];const _0x48f919=this['_distortionSprite']['scale']['y'];_0x186f8b+=this[_0x29ea85(0x640)]();const _0x51d2e8=SceneManager[_0x29ea85(0x352)][_0x29ea85(0x3e2)];if(_0x51d2e8&&this['parent']===_0x51d2e8){_0x11fa1a+=_0x51d2e8['x']-this[_0x29ea85(0x3e0)]();const _0x377d63=_0x51d2e8[_0x29ea85(0x429)]()*0x3/0x4;_0x186f8b=_0x51d2e8['y']+_0x377d63,_0x186f8b=Math[_0x29ea85(0x339)](_0x186f8b,_0x51d2e8['y']+this['y']-this[_0x29ea85(0x3b0)]+_0x377d63);}_0x48f5fb['x']=Math[_0x29ea85(0xb3f)](_0x11fa1a+this[_0x29ea85(0x3e0)]()*_0x1adcdf),_0x48f5fb['y']=Math[_0x29ea85(0xb3f)](_0x186f8b+this[_0x29ea85(0xb7d)]());},VisuMZ['BattleCore'][_0x5bdce9(0x820)]=Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3e0)],Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3e0)]=function(){const _0x53ec94=_0x5bdce9;let _0x4b03e2=VisuMZ['BattleCore'][_0x53ec94(0x820)]['call'](this),_0x372e5d=VisuMZ[_0x53ec94(0x61c)][_0x53ec94(0x76e)][_0x53ec94(0x40d)][_0x53ec94(0x82b)]||0x0;return Math['round'](_0x4b03e2+_0x372e5d);},VisuMZ[_0x5bdce9(0x61c)]['Sprite_Battler_damageOffsetY']=Sprite_Battler['prototype'][_0x5bdce9(0xb7d)],Sprite_Battler[_0x5bdce9(0x768)]['damageOffsetY']=function(){const _0xda5299=_0x5bdce9;let _0x52f898=VisuMZ[_0xda5299(0x61c)][_0xda5299(0x8c6)]['call'](this);switch(VisuMZ['BattleCore'][_0xda5299(0x76e)][_0xda5299(0x40d)][_0xda5299(0x36f)]){case'head':_0x52f898-=this[_0xda5299(0x3b0)]*this[_0xda5299(0x91d)]['y'];break;case _0xda5299(0x4ed):_0x52f898-=this[_0xda5299(0x3b0)]*this['scale']['y']*0.5;break;}let _0x5a6281=VisuMZ[_0xda5299(0x61c)][_0xda5299(0x76e)][_0xda5299(0x40d)][_0xda5299(0x489)]||0x0;return Math[_0xda5299(0xb3f)](_0x52f898+_0x5a6281);},Sprite_Actor[_0x5bdce9(0x768)]['damageOffsetX']=function(){const _0x145679=_0x5bdce9;return Sprite_Battler[_0x145679(0x768)][_0x145679(0x3e0)][_0x145679(0x4b1)](this);},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0xb7d)]=function(){const _0xfe70ba=_0x5bdce9;return Sprite_Battler['prototype']['damageOffsetY'][_0xfe70ba(0x4b1)](this);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x747)]=function(_0xe8a641){const _0x2f6d5b=_0x5bdce9;if(this[_0x2f6d5b(0x8bd)]())SceneManager[_0x2f6d5b(0x352)][_0x2f6d5b(0x3e2)]['removeDamageSprite'](_0xe8a641);else{if('cKNpZ'!==_0x2f6d5b(0xb72)){if(!_0x1bbc30[_0x2f6d5b(0x768)][_0x2f6d5b(0xb41)][_0x2f6d5b(0x4b1)](this,_0x38f1f9))return!![];if(!_0x5eeef9[_0x2f6d5b(0x768)][_0x2f6d5b(0x315)][_0x2f6d5b(0x4b1)](this,_0x1a1187))return!![];if(!_0x218c67[_0x2f6d5b(0x768)][_0x2f6d5b(0x6a6)][_0x2f6d5b(0x4b1)](this,_0x51ae2a))return!![];return![];}else this[_0x2f6d5b(0x32f)]()[_0x2f6d5b(0x18f)](_0xe8a641),this[_0x2f6d5b(0x104)][_0x2f6d5b(0x671)](_0xe8a641),_0xe8a641['destroy']();}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x966)]=Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x273)],Sprite_Battler['prototype'][_0x5bdce9(0x273)]=function(_0xf897ef,_0x3d0f51){const _0x2a2d60=_0x5bdce9,_0x2aa2cf=VisuMZ[_0x2a2d60(0x61c)][_0x2a2d60(0x76e)];if(this[_0x2a2d60(0x56d)]===Sprite_Actor)_0xf897ef+=_0x2aa2cf['Actor']['OffsetX']||0x0,_0x3d0f51+=_0x2aa2cf[_0x2a2d60(0xe6)][_0x2a2d60(0x4b4)]||0x0;else this[_0x2a2d60(0x56d)]===Sprite_Enemy&&(_0xf897ef+=_0x2aa2cf[_0x2a2d60(0x14a)][_0x2a2d60(0x6b7)]||0x0,_0x3d0f51+=_0x2aa2cf[_0x2a2d60(0x14a)][_0x2a2d60(0x4b4)]||0x0);this[_0x2a2d60(0x976)]&&(_0xf897ef=this[_0x2a2d60(0x976)]['_forcedHomeX']??_0xf897ef,_0x3d0f51=this[_0x2a2d60(0x976)][_0x2a2d60(0x9fa)]??_0x3d0f51),VisuMZ[_0x2a2d60(0x61c)][_0x2a2d60(0x966)][_0x2a2d60(0x4b1)](this,_0xf897ef,_0x3d0f51),this['_targetHomeX']=this[_0x2a2d60(0x666)],this[_0x2a2d60(0x8fb)]=this[_0x2a2d60(0x51a)],this['_homeDuration']=0x0,this[_0x2a2d60(0x21a)]=0x0,this['_homeEasing']=_0x2a2d60(0x32d);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x5a2)]=Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x367)],Sprite_Battler['prototype'][_0x5bdce9(0x367)]=function(){const _0x36d97b=_0x5bdce9;VisuMZ[_0x36d97b(0x61c)][_0x36d97b(0x5a2)]['call'](this),!this[_0x36d97b(0x976)]&&this[_0x36d97b(0x53c)]&&(this[_0x36d97b(0x53c)][_0x36d97b(0x8e1)]=![]);},VisuMZ['BattleCore'][_0x5bdce9(0x432)]=Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x650)],Sprite_Battler['prototype'][_0x5bdce9(0x650)]=function(){const _0x5191ca=_0x5bdce9;this[_0x5191ca(0x9fb)](),this[_0x5191ca(0x467)](),this[_0x5191ca(0x3b4)](),this[_0x5191ca(0x700)](),this[_0x5191ca(0xee)](),VisuMZ[_0x5191ca(0x61c)]['Sprite_Battler_updateMain']['call'](this);if(this['constructor']===Sprite_Enemy)this[_0x5191ca(0x837)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x76f)]=Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x37f)],Sprite_Battler[_0x5bdce9(0x768)]['updatePosition']=function(){const _0x84deb=_0x5bdce9;this[_0x84deb(0x36a)](),VisuMZ[_0x84deb(0x61c)][_0x84deb(0x76f)][_0x84deb(0x4b1)](this),this[_0x84deb(0x32b)](),this['updateOpacity']();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x8b7)]=function(_0x30bb16,_0x27df79,_0x4d53c6,_0x26c5a0){const _0x1152ac=_0x5bdce9;(this[_0x1152ac(0xa67)]!==_0x30bb16||this[_0x1152ac(0x8fb)]!==_0x27df79)&&(_0x1152ac(0x932)===_0x1152ac(0x206)?(_0x4d0598[_0x1152ac(0x768)][_0x1152ac(0x367)]['call'](this),this[_0x1152ac(0x1fc)]()&&this[_0x1152ac(0x1fc)]()[_0x1152ac(0x74e)]()!==this[_0x1152ac(0x6f5)]&&(this[_0x1152ac(0x6f5)]=this[_0x1152ac(0x1fc)]()[_0x1152ac(0x74e)](),this[_0x1152ac(0xf7)]()),this[_0x1152ac(0x4f8)](),this[_0x1152ac(0x37f)]()):(this[_0x1152ac(0xa67)]=_0x30bb16,this['_targetHomeY']=_0x27df79,this[_0x1152ac(0x1a8)]=_0x4d53c6,this[_0x1152ac(0x21a)]=_0x4d53c6,this['_homeEasing']=_0x26c5a0,_0x4d53c6<=0x0&&this[_0x1152ac(0x3af)]()));},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x36a)]=function(){const _0x33fc02=_0x5bdce9;if(this[_0x33fc02(0x1a8)]<=0x0)return;const _0x360a34=this[_0x33fc02(0x1a8)],_0x34df07=this[_0x33fc02(0x21a)],_0x2c4075=this[_0x33fc02(0x953)];Imported[_0x33fc02(0x9f2)]?(this[_0x33fc02(0x666)]=this['applyEasing'](this['_homeX'],this[_0x33fc02(0xa67)],_0x360a34,_0x34df07,_0x2c4075),this[_0x33fc02(0x51a)]=this[_0x33fc02(0x99a)](this[_0x33fc02(0x51a)],this[_0x33fc02(0x8fb)],_0x360a34,_0x34df07,_0x2c4075)):(this['_homeX']=(this[_0x33fc02(0x666)]*(_0x360a34-0x1)+this[_0x33fc02(0xa67)])/_0x360a34,this[_0x33fc02(0x51a)]=(this[_0x33fc02(0x51a)]*(_0x360a34-0x1)+this[_0x33fc02(0x8fb)])/_0x360a34);this[_0x33fc02(0x1a8)]--;if(this[_0x33fc02(0x1a8)]<=0x0)this[_0x33fc02(0x3af)]();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3af)]=function(){const _0x553fab=_0x5bdce9;this['_homeX']=this[_0x553fab(0xa67)],this['_homeY']=this[_0x553fab(0x8fb)];},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x32b)]=function(){const _0x43207c=_0x5bdce9;this[_0x43207c(0x8f0)]=this['x'],this[_0x43207c(0x4c9)]=this['y'],this[_0x43207c(0x1e3)](),this['updateJump'](),this['x']+=this[_0x43207c(0x5e0)](),this['y']+=this['extraPositionY'](),this['y']+=this[_0x43207c(0x3cf)](),this['x']=Math[_0x43207c(0x618)](this['x']),this['y']=Math[_0x43207c(0x618)](this['y']);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x5e0)]=function(){let _0x34ae75=0x0;return _0x34ae75;},Sprite_Battler[_0x5bdce9(0x768)]['extraPositionY']=function(){const _0x2c280e=_0x5bdce9;let _0x1eaea4=0x0;return this['_battler']&&!this[_0x2c280e(0x976)][_0x2c280e(0x5c9)]()&&(_0x2c280e(0x84e)!==_0x2c280e(0x84e)?_0x4dd5c0[_0x2c280e(0x61c)][_0x2c280e(0x5bd)][_0x2c280e(0x4b1)](this):(_0x1eaea4-=this['_floatHeight'],_0x1eaea4-=this[_0x2c280e(0x80d)])),_0x1eaea4;},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3cf)]=function(){const _0x29acb7=_0x5bdce9;let _0x523a72=0x0;if(this[_0x29acb7(0xa9b)]&&this[_0x29acb7(0x56d)]!==Sprite_SvEnemy){const _0x1162bf=this[_0x29acb7(0xa9b)][_0x29acb7(0x91d)]['y'];_0x523a72-=(_0x1162bf-0x1)*this[_0x29acb7(0x3b0)];}return _0x523a72;},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x700)]=function(){const _0x1f03f8=_0x5bdce9,_0x555aed=this[_0x1f03f8(0x976)]&&this[_0x1f03f8(0x976)]['isBattlerFlipped']();this[_0x1f03f8(0x7b1)]=(_0x555aed?-0x1:0x1)*Math[_0x1f03f8(0x41b)](this[_0x1f03f8(0x91d)]['x']);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x758)]=function(_0x15f4ad,_0x4af22f,_0x1c2e86){const _0x11ea43=_0x5bdce9;if(!this[_0x11ea43(0x524)]())return;if(this['_targetFloatHeight']===_0x15f4ad)return;this['_targetFloatHeight']=_0x15f4ad,this['_floatDuration']=_0x4af22f,this['_floatWholeDuration']=_0x4af22f,this['_floatEasing']=_0x1c2e86||_0x11ea43(0x32d);if(_0x4af22f<=0x0)this[_0x11ea43(0x16a)]=_0x15f4ad;},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x1e3)]=function(){const _0x56ae96=_0x5bdce9;if(this[_0x56ae96(0x91e)]<=0x0)return;const _0x11e75e=this[_0x56ae96(0x91e)],_0x251f8e=this[_0x56ae96(0x8ff)],_0x3c162c=this[_0x56ae96(0x7aa)];Imported[_0x56ae96(0x9f2)]?_0x56ae96(0x3fe)!=='AtgjB'?this[_0x56ae96(0x16a)]=this['applyEasing'](this['_floatHeight'],this[_0x56ae96(0x3ce)],_0x11e75e,_0x251f8e,_0x3c162c):_0x28599c=_0x316c38:this[_0x56ae96(0x16a)]=(this[_0x56ae96(0x16a)]*(_0x11e75e-0x1)+this['_targetFloatHeight'])/_0x11e75e;this[_0x56ae96(0x91e)]--;if(this[_0x56ae96(0x91e)]<=0x0)this[_0x56ae96(0x1c6)]();},Sprite_Battler['prototype'][_0x5bdce9(0x1c6)]=function(){const _0x5441d4=_0x5bdce9;this[_0x5441d4(0x16a)]=this[_0x5441d4(0x3ce)];},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x4d6)]=function(){return this['_floatDuration']>0x0;},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x275)]=function(_0x351554,_0x2400cf){const _0x320689=_0x5bdce9;if(!this[_0x320689(0x524)]())return;if(_0x2400cf<=0x0)return;this[_0x320689(0x7f9)]=_0x351554,this[_0x320689(0x94f)]=_0x2400cf,this['_jumpWholeDuration']=_0x2400cf;},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x39b)]=function(){const _0x26fa4c=_0x5bdce9;if(this['_jumpDuration']<=0x0)return;const _0x81dd34=this['_jumpWholeDuration']-this[_0x26fa4c(0x94f)],_0x268727=this[_0x26fa4c(0xa07)]/0x2,_0x560342=this[_0x26fa4c(0x7f9)],_0x321ef7=-_0x560342/Math['pow'](_0x268727,0x2);this['_jumpHeight']=_0x321ef7*Math[_0x26fa4c(0x710)](_0x81dd34-_0x268727,0x2)+_0x560342,this['_jumpDuration']--;if(this[_0x26fa4c(0x94f)]<=0x0)return this[_0x26fa4c(0x644)]();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x644)]=function(){const _0x2d7438=_0x5bdce9;this[_0x2d7438(0x80d)]=0x0;},Sprite_Battler['prototype']['isJumping']=function(){const _0x479b61=_0x5bdce9;return this[_0x479b61(0x94f)]>0x0;},Sprite_Battler[_0x5bdce9(0x768)]['startOpacity']=function(_0x327d03,_0x3e3cff,_0x1dd019){const _0x13985c=_0x5bdce9;if(this[_0x13985c(0x546)]===_0x327d03)return;this[_0x13985c(0x546)]=_0x327d03,this['_opacityDuration']=_0x3e3cff,this[_0x13985c(0x5d0)]=_0x3e3cff,this[_0x13985c(0xa21)]=_0x1dd019||_0x13985c(0x32d);if(_0x3e3cff<=0x0)this[_0x13985c(0x867)]=_0x327d03;},Sprite_Battler['prototype'][_0x5bdce9(0x4f8)]=function(){const _0xbe82b0=_0x5bdce9;if(this[_0xbe82b0(0x56d)][_0xbe82b0(0x74e)]==='Sprite_SvEnemy')return;if(this[_0xbe82b0(0x65b)]<=0x0)return;const _0x20f1a1=this[_0xbe82b0(0x65b)],_0x1d015d=this[_0xbe82b0(0x5d0)],_0x588fa7=this[_0xbe82b0(0xa21)];if(Imported[_0xbe82b0(0x9f2)])this[_0xbe82b0(0x867)]=this[_0xbe82b0(0x99a)](this[_0xbe82b0(0x867)],this[_0xbe82b0(0x546)],_0x20f1a1,_0x1d015d,_0x588fa7);else{if(_0xbe82b0(0x114)===_0xbe82b0(0x52a))return this[_0xbe82b0(0x491)]&&this['isActor']()?_0x13585b[_0xbe82b0(0x61c)]['Settings']['Actor'][_0xbe82b0(0x996)]:_0x5468d1[_0xbe82b0(0x61c)][_0xbe82b0(0x76e)][_0xbe82b0(0x14a)][_0xbe82b0(0x996)];else this[_0xbe82b0(0x867)]=(this[_0xbe82b0(0x867)]*(_0x20f1a1-0x1)+this[_0xbe82b0(0x546)])/_0x20f1a1;}this[_0xbe82b0(0x65b)]--;if(this[_0xbe82b0(0x65b)]<=0x0)this[_0xbe82b0(0x9a9)]();},Sprite_Battler['prototype'][_0x5bdce9(0x9a9)]=function(){const _0x4b4fb3=_0x5bdce9;this['opacity']=this[_0x4b4fb3(0x546)];},Sprite_Battler['prototype'][_0x5bdce9(0x727)]=function(){return this['_opacityDuration']>0x0;},Sprite_Battler['prototype'][_0x5bdce9(0x837)]=function(){const _0x13a2df=_0x5bdce9;this[_0x13a2df(0x748)][_0x13a2df(0x8e1)]=this[_0x13a2df(0x976)][_0x13a2df(0x3a3)](),this[_0x13a2df(0x3b9)]();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3b9)]=function(){const _0x5c7b88=_0x5bdce9;if(!this[_0x5c7b88(0x748)])return;this[_0x5c7b88(0x748)]['y']=this['_baseY']-this['y']-0x2;},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x251)]=function(){const _0x15569a=_0x5bdce9;if(!this[_0x15569a(0x976)])return;this[_0x15569a(0x371)]=this[_0x15569a(0x976)][_0x15569a(0x503)](),this[_0x15569a(0x183)]=this['_battler']['battlerShadowScaleY']();},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0x503)]=function(){const _0x1ca612=_0x5bdce9,_0x1fcd93=this[_0x1ca612(0x491)]()?this['actor']():this[_0x1ca612(0x1fc)]();if(_0x1fcd93){if('tvAIm'!==_0x1ca612(0x845)){const _0x209cc7=_0x130736[_0x1ca612(0x61c)][_0x1ca612(0x76e)][_0x1ca612(0x817)],_0x44f604=_0x209cc7[_0x1ca612(0x1ac)],_0x25a6ca=_0x2c8155[_0x44f604];if(_0x25a6ca&&_0x382c48[_0x1ca612(0x61c)][_0x1ca612(0x144)](_0x44f604)){const _0x457a48=this[_0x1ca612(0x2a9)]()?this[_0x1ca612(0x812)]:0x0,_0x46e227=_0x25a6ca[_0x1ca612(0x3cd)];this[_0x1ca612(0xa77)](_0x46e227,_0x457a48),this['_list']=_0x6f153[_0x1ca612(0x87e)](this[_0x1ca612(0x27d)]);const _0x4ee55c={'code':0xbc3,'indent':this[_0x1ca612(0x83b)],'parameters':_0x49188b['makeDeepCopy'](_0x237284)};return this[_0x1ca612(0x27d)][_0x1ca612(0x532)](this[_0x1ca612(0x365)]+0x1,0x0,_0x4ee55c),!![];}else return _0x41e3c6[_0x1ca612(0x61c)]['Game_Interpreter_command301'][_0x1ca612(0x4b1)](this,_0x4c185c);}else{const _0xe467aa=_0x1fcd93[_0x1ca612(0x664)];if(_0xe467aa[_0x1ca612(0x16b)](/<SIDEVIEW SHADOW (?:SCALE|SCALE X):[ ](\d+)([%%])>/i)){if(_0x1ca612(0xa90)!=='RZSXB')return Number(RegExp['$1'])*0.01;else _0x300bfb=_0x157a08[_0x1ca612(0x7cc)]((_0x211ea6,_0xcadb74)=>_0x211ea6*(0x1-_0xcadb74),_0x39d5c4);}else{if(_0xe467aa[_0x1ca612(0x16b)](/<SIDEVIEW SHADOW (?:SCALE|SCALE X):[ ](.*)>/i))return Number(RegExp['$1'])||0x0;}}}return 0x1;},Game_BattlerBase[_0x5bdce9(0x768)][_0x5bdce9(0xb14)]=function(){const _0x4b7559=_0x5bdce9,_0x5c544f=this[_0x4b7559(0x491)]()?this[_0x4b7559(0xad6)]():this[_0x4b7559(0x1fc)]();if(_0x5c544f){if(_0x4b7559(0x1e6)!==_0x4b7559(0x15e)){const _0x4f434e=_0x5c544f['note'];if(_0x4f434e[_0x4b7559(0x16b)](/<SIDEVIEW SHADOW (?:SCALE|SCALE Y):[ ](\d+)([%%])>/i)){if(_0x4b7559(0xe5)==='vthMB')return Number(RegExp['$1'])*0.01;else this[_0x4b7559(0x951)](),this[_0x4b7559(0x12f)](),_0x1ba10a[_0x4b7559(0x768)][_0x4b7559(0x719)][_0x4b7559(0x4b1)](this),this['_createDamageContainer']();}else{if(_0x4f434e[_0x4b7559(0x16b)](/<SIDEVIEW SHADOW (?:SCALE|SCALE Y):[ ](.*)>/i))return Number(RegExp['$1'])||0x0;}}else _0x1e73ec=_0x362640[this[_0x4b7559(0x27d)][_0x102671][_0x4b7559(0x3fb)]];}return 0x1;},Sprite_Battler['prototype'][_0x5bdce9(0x9fb)]=function(){const _0x1aa35c=_0x5bdce9;if(this[_0x1aa35c(0x56d)]===Sprite_SvEnemy)return;this[_0x1aa35c(0x4f4)](),this[_0x1aa35c(0x75f)]();},Sprite_Battler['prototype'][_0x5bdce9(0x75f)]=function(){const _0x8f1c59=_0x5bdce9,_0x3c34e2=this[_0x8f1c59(0xa9b)];_0x3c34e2&&(_0x3c34e2['scale']['x']=this[_0x8f1c59(0x6ee)](),_0x3c34e2[_0x8f1c59(0x91d)]['y']=this['mainSpriteScaleY']());},Sprite_Battler['prototype']['mainSpriteScaleX']=function(){const _0x5cc914=_0x5bdce9;let _0xbbf923=0x1;return _0xbbf923*=this['_flipScaleX'],_0xbbf923*=this[_0x5cc914(0x326)],_0xbbf923;},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x809)]=function(){const _0x3ae030=_0x5bdce9;return 0x1*this[_0x3ae030(0x461)];},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x1af)]=function(){const _0x39ea7f=_0x5bdce9;return this[_0x39ea7f(0x3b2)]*this['mainSpriteScaleX']();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x1a1)]=function(){const _0x3c85df=_0x5bdce9;return this[_0x3c85df(0x3b0)]*this[_0x3c85df(0x809)]();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3c2)]=function(_0x1f45bf,_0x4162fb,_0x13e86b,_0x124631){const _0x18ce03=_0x5bdce9;if(!this['canMove']())return;if(!this['_distortionSprite'])return;if(this[_0x18ce03(0x4a9)]===_0x1f45bf&&this[_0x18ce03(0x739)]===_0x4162fb)return;this[_0x18ce03(0x4a9)]=_0x1f45bf,this[_0x18ce03(0x739)]=_0x4162fb,this[_0x18ce03(0x9ba)]=_0x13e86b,this['_growWholeDuration']=_0x13e86b,this[_0x18ce03(0x729)]=_0x124631||'Linear';if(_0x13e86b<=0x0){if(_0x18ce03(0x928)===_0x18ce03(0x45c)){if(!_0x3f301f[_0x18ce03(0x68b)]())return;const _0x12b64a=this[_0x18ce03(0xb0d)]();if(!_0x12b64a)return;_0x12b64a['startOpacity'](_0x5e6c0b,_0x2048fb,_0x4f2ee9);}else this['_growX']=this[_0x18ce03(0x4a9)],this[_0x18ce03(0x461)]=this[_0x18ce03(0x739)];}},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x4f4)]=function(){const _0x9990f7=_0x5bdce9;if(this[_0x9990f7(0x9ba)]<=0x0)return;if(!this[_0x9990f7(0xa9b)])return;const _0x18df76=this[_0x9990f7(0x9ba)],_0x58f7ca=this[_0x9990f7(0xaf4)],_0xcc06ff=this[_0x9990f7(0x729)];if(Imported['VisuMZ_0_CoreEngine']){if(_0x9990f7(0x58b)==='nTBUa'){if(!_0x33f1c4[_0x9990f7(0x5ea)]())return;_0x46e8da[_0x9990f7(0x866)](_0x56c905,_0x147c66);const _0x25a0a1=_0x14d600[_0x9990f7(0x5ae)];if(!_0x25a0a1)return;let _0x4326f2=_0x5661d0[_0x9990f7(0x586)];_0x25a0a1[_0x9990f7(0x1fe)](_0x4326f2);}else this[_0x9990f7(0x326)]=this['applyEasing'](this[_0x9990f7(0x326)],this[_0x9990f7(0x4a9)],_0x18df76,_0x58f7ca,_0xcc06ff),this[_0x9990f7(0x461)]=this[_0x9990f7(0x99a)](this[_0x9990f7(0x461)],this[_0x9990f7(0x739)],_0x18df76,_0x58f7ca,_0xcc06ff);}else this[_0x9990f7(0x326)]=(this['_growX']*(_0x18df76-0x1)+this[_0x9990f7(0x4a9)])/_0x18df76,this['_growY']=(this[_0x9990f7(0x461)]*(_0x18df76-0x1)+this['_targetGrowY'])/_0x18df76;this[_0x9990f7(0x9ba)]--;if(this[_0x9990f7(0x9ba)]<=0x0)this[_0x9990f7(0x4bc)]();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x4bc)]=function(){const _0x93e6d9=_0x5bdce9;this[_0x93e6d9(0x326)]=this[_0x93e6d9(0x4a9)],this[_0x93e6d9(0x461)]=this[_0x93e6d9(0x739)];},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x48a)]=function(){const _0x3a2500=_0x5bdce9;return this[_0x3a2500(0x9ba)]>0x0;},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x53f)]=function(_0x9fbad9,_0x4ca21d,_0x5e9ff3,_0x8cc8a6){const _0x3ba1bf=_0x5bdce9;if(!this['canMove']())return;if(!this[_0x3ba1bf(0xa9b)])return;if(this[_0x3ba1bf(0x35e)]===_0x9fbad9&&this[_0x3ba1bf(0x69a)]===_0x4ca21d)return;this[_0x3ba1bf(0x35e)]=_0x9fbad9,this[_0x3ba1bf(0x69a)]=_0x4ca21d,this[_0x3ba1bf(0x1a9)]=_0x5e9ff3,this['_skewWholeDuration']=_0x5e9ff3,this[_0x3ba1bf(0xa01)]=_0x8cc8a6||_0x3ba1bf(0x32d),_0x5e9ff3<=0x0&&(this[_0x3ba1bf(0xa9b)][_0x3ba1bf(0x696)]['x']=this[_0x3ba1bf(0x35e)],this[_0x3ba1bf(0xa9b)][_0x3ba1bf(0x696)]['y']=this[_0x3ba1bf(0x69a)]);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x467)]=function(){const _0x34ed09=_0x5bdce9;if(this[_0x34ed09(0x1a9)]<=0x0)return;if(!this['_distortionSprite'])return;const _0x2fbda1=this[_0x34ed09(0x1a9)],_0x5ac3f2=this[_0x34ed09(0x7e3)],_0x4108bc=this['_skewEasing'],_0x44755c=this[_0x34ed09(0xa9b)];if(Imported[_0x34ed09(0x9f2)]){if(_0x34ed09(0x102)!==_0x34ed09(0xa02))_0x44755c[_0x34ed09(0x696)]['x']=this['applyEasing'](_0x44755c[_0x34ed09(0x696)]['x'],this[_0x34ed09(0x35e)],_0x2fbda1,_0x5ac3f2,_0x4108bc),_0x44755c[_0x34ed09(0x696)]['y']=this[_0x34ed09(0x99a)](_0x44755c[_0x34ed09(0x696)]['y'],this['_targetSkewY'],_0x2fbda1,_0x5ac3f2,_0x4108bc);else{if(!_0x13b5de[_0x34ed09(0x5ea)]())return;if(!_0x70cc48[_0x34ed09(0x27b)])return;_0x1431cf[_0x34ed09(0x866)](_0x340a07,_0x3a610c);const _0x3962bb=_0x2d8049[_0x34ed09(0xb48)](),_0x27967f=_0x4d4d92[_0x34ed09(0x7a2)];if(!_0x3962bb)return;_0x539619[_0x34ed09(0x8a4)](0x0,0x0,_0x48d7ab[_0x34ed09(0x26c)],_0x4e62ec[_0x34ed09(0x752)]);if(_0x27967f)_0x3962bb[_0x34ed09(0x73c)](_0x34ed09(0x693));}}else _0x44755c[_0x34ed09(0x696)]['x']=(_0x44755c[_0x34ed09(0x696)]['x']*(_0x2fbda1-0x1)+this[_0x34ed09(0x35e)])/_0x2fbda1,_0x44755c[_0x34ed09(0x696)]['y']=(_0x44755c[_0x34ed09(0x696)]['y']*(_0x2fbda1-0x1)+this['_targetSkewY'])/_0x2fbda1;this[_0x34ed09(0x1a9)]--;if(this['_skewDuration']<=0x0)this[_0x34ed09(0xa62)]();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0xa62)]=function(){const _0x534977=_0x5bdce9;this[_0x534977(0xa9b)][_0x534977(0x696)]['x']=this[_0x534977(0x35e)],this[_0x534977(0xa9b)]['skew']['y']=this[_0x534977(0x69a)];},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x35f)]=function(){const _0x5343a1=_0x5bdce9;return this[_0x5343a1(0x1a9)]>0x0;},Sprite_Battler['prototype']['startSpin']=function(_0x26b026,_0x12ee7a,_0x21e506,_0x415672){const _0xe488af=_0x5bdce9;if(!this[_0xe488af(0x524)]())return;if(!this[_0xe488af(0xa9b)])return;if(this[_0xe488af(0xaea)]===_0x26b026)return;this[_0xe488af(0xaea)]=_0x26b026,this[_0xe488af(0x3d8)]=_0x12ee7a,this[_0xe488af(0x7f0)]=_0x12ee7a,this[_0xe488af(0x1da)]=_0x21e506||_0xe488af(0x32d),this['_angleRevertOnFinish']=_0x415672,this[_0xe488af(0xa8c)]===undefined&&('sQOtE'!==_0xe488af(0xa6d)?_0x3de689[_0xe488af(0x61c)][_0xe488af(0x76e)][_0xe488af(0x14a)][_0xe488af(0x854)]&&(this[_0xe488af(0x21f)]=new _0xc1f9b2(),this[_0xe488af(0xa8d)](this['_stateIconSprite'])):this[_0xe488af(0xa8c)]=!![]),_0x12ee7a<=0x0&&('aguRV'===_0xe488af(0x209)?(this[_0xe488af(0xa60)]=_0x26b026,this[_0xe488af(0xa8c)]&&(this[_0xe488af(0xaea)]=0x0,this['_currentAngle']=0x0)):this[_0xe488af(0x981)]());},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3b4)]=function(){const _0xdfc0d5=_0x5bdce9;this[_0xdfc0d5(0x8b3)](),this['applyAngleChange']();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x8b3)]=function(){const _0x39f057=_0x5bdce9;if(this[_0x39f057(0x3d8)]<=0x0)return;const _0x2c599f=this['_angleDuration'],_0x158aea=this['_angleWholeDuration'],_0xcd8ef2=this[_0x39f057(0x1da)];if(Imported[_0x39f057(0x9f2)])this[_0x39f057(0xa60)]=this[_0x39f057(0x99a)](this[_0x39f057(0xa60)],this['_targetAngle'],_0x2c599f,_0x158aea,_0xcd8ef2);else{if(_0x39f057(0x5bf)!==_0x39f057(0x5bf)){if(!_0x48d67c['isSceneBattle']())return;_0x31498f['ConvertParams'](_0x246f4c,_0x2caac8);const _0x21763f=_0x48b3d4[_0x39f057(0xb48)](),_0x134724=_0x4c696d[_0x39f057(0x369)];if(!_0x21763f)return;_0x152670[_0x39f057(0x34d)]++,_0x4922bc[_0x39f057(0xaa8)]=_0x5ca05d['_allTargets'][_0x4748f9[_0x39f057(0x34d)]]||null,_0x49e7b4[_0x39f057(0xaa8)]&&_0x134724[_0x39f057(0x673)]()[_0x39f057(0x92d)]()!=='UNTITLED'&&_0x21763f[_0x39f057(0x29b)]([_0x134724]);}else this[_0x39f057(0xa60)]=(this[_0x39f057(0xa60)]*(_0x2c599f-0x1)+this[_0x39f057(0xaea)])/_0x2c599f;}this[_0x39f057(0x3d8)]--;if(this[_0x39f057(0x3d8)]<=0x0)this[_0x39f057(0x3cc)]();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3cc)]=function(){const _0x17224a=_0x5bdce9;this[_0x17224a(0xa60)]=this[_0x17224a(0xaea)],this['_angleRevertOnFinish']&&(this[_0x17224a(0xaea)]=0x0,this['_currentAngle']=0x0);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x86c)]=function(){const _0x3d60d9=_0x5bdce9;return this[_0x3d60d9(0x3d8)]>0x0;},Sprite_Battler[_0x5bdce9(0x768)]['applyAngleChange']=function(){const _0x4262c6=_0x5bdce9;if(!this[_0x4262c6(0xa9b)])return;const _0x415b7c=this['_currentAngle'],_0x240309=this[_0x4262c6(0x91d)]['x'],_0x30320e=this[_0x4262c6(0x976)][_0x4262c6(0x491)]()?-0x1:0x1;this[_0x4262c6(0xa9b)][_0x4262c6(0x697)]=_0x415b7c*_0x240309*_0x30320e;const _0x3066be=this[_0x4262c6(0xa9b)]['scale']['y'];this[_0x4262c6(0xa9b)]['y']=this[_0x4262c6(0x3b0)]*-0.5*(0x2-_0x3066be),this['_distortionSprite']['y']=Math[_0x4262c6(0xa44)](this[_0x4262c6(0xa9b)]['y']);const _0x280699=[this[_0x4262c6(0xa5b)],this[_0x4262c6(0x3d6)],this[_0x4262c6(0x30c)]];for(const _0x5b3cef of _0x280699){if(!_0x5b3cef)continue;_0x5b3cef['y']=this[_0x4262c6(0x3b0)]*0.5;}this[_0x4262c6(0x748)]&&('nmcLn'===_0x4262c6(0x7c9)?(this[_0x4262c6(0x371)]=this[_0x4262c6(0x371)]??0x1,this[_0x4262c6(0x183)]=this[_0x4262c6(0x183)]??0x1,this[_0x4262c6(0x748)][_0x4262c6(0x91d)]['x']=this[_0x4262c6(0xa9b)][_0x4262c6(0x91d)]['x']*this['_shadowScaleX'],this[_0x4262c6(0x748)][_0x4262c6(0x91d)]['y']=this[_0x4262c6(0xa9b)][_0x4262c6(0x91d)]['y']*this[_0x4262c6(0x183)]):this['_distortionSprite'][_0x4262c6(0xa8d)](this[_0x4262c6(0x30c)]));},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x930)]=Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x813)],Sprite_Actor['prototype'][_0x5bdce9(0x813)]=function(){const _0x27c94a=_0x5bdce9;VisuMZ[_0x27c94a(0x61c)][_0x27c94a(0x930)][_0x27c94a(0x4b1)](this),VisuMZ[_0x27c94a(0x61c)]['Settings']['HpGauge'][_0x27c94a(0x984)]&&this[_0x27c94a(0x2b8)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x6e0)]=Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x9d7)],Sprite_Enemy[_0x5bdce9(0x768)]['createStateIconSprite']=function(){const _0x234660=_0x5bdce9;VisuMZ[_0x234660(0x61c)][_0x234660(0x76e)][_0x234660(0x9d6)][_0x234660(0x16f)]&&this[_0x234660(0x2b8)](),VisuMZ['BattleCore'][_0x234660(0x6e0)][_0x234660(0x4b1)](this);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x2b8)]=function(){const _0x1ad223=_0x5bdce9;if(!ConfigManager['visualHpGauge'])return;if(this[_0x1ad223(0x56d)]===Sprite_SvEnemy)return;const _0x549524=VisuMZ[_0x1ad223(0x61c)][_0x1ad223(0x76e)]['HpGauge'],_0x27bb83=new Sprite_HpGauge();_0x27bb83['anchor']['x']=_0x549524['AnchorX'],_0x27bb83[_0x1ad223(0x887)]['y']=_0x549524[_0x1ad223(0x192)],_0x27bb83[_0x1ad223(0x91d)]['x']=_0x27bb83['scale']['y']=_0x549524['Scale'],this[_0x1ad223(0x53c)]=_0x27bb83,this[_0x1ad223(0xa8d)](this['_hpGaugeSprite']),Spriteset_Battle[_0x1ad223(0x69e)]&&BattleManager['addChildToUiContainer'](this[_0x1ad223(0x53c)]);},VisuMZ[_0x5bdce9(0x61c)]['Sprite_Battler_setBattler']=Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x23d)],Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x23d)]=function(_0x23fec2){const _0x3a3843=_0x5bdce9,_0x3ae940=this[_0x3a3843(0x976)];VisuMZ[_0x3a3843(0x61c)][_0x3a3843(0x79e)][_0x3a3843(0x4b1)](this,_0x23fec2),this[_0x3a3843(0x5fc)](_0x23fec2);if(_0x3ae940!==_0x23fec2)this[_0x3a3843(0x251)]();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x5fc)]=function(_0x5d8d46){const _0x2b4a9b=_0x5bdce9;if(!_0x5d8d46)return;if(!this['_hpGaugeSprite'])return;if(_0x5d8d46[_0x2b4a9b(0x491)]()){}else{if(_0x5d8d46[_0x2b4a9b(0x203)]()){if(this['constructor']===Sprite_SvEnemy&&!_0x5d8d46[_0x2b4a9b(0x3a3)]())return;}}this['_hpGaugeSprite'][_0x2b4a9b(0x5aa)](_0x5d8d46,'hp');},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x8bc)]=function(){const _0x2fe285=_0x5bdce9;return this[_0x2fe285(0x976)]&&this[_0x2fe285(0x976)][_0x2fe285(0x8bc)]();},Sprite_Battler['prototype']['updateStaticSvBattlerFrames']=function(){const _0x2b75f2=_0x5bdce9,_0x16f885=this[_0x2b75f2(0xa5b)]['bitmap'];if(!_0x16f885)return;const _0x486e0b=_0x16f885[_0x2b75f2(0x3b2)];let _0xb4271e=_0x16f885[_0x2b75f2(0x3b0)];if(this[_0x2b75f2(0x976)][_0x2b75f2(0x9a3)]()){if(_0x2b75f2(0x1d8)==='MBscq'){if(_0xb24273>_0x222bae['_baseX'])_0xe17f2a=!![];if(_0x1943fc<_0x5de8fa['_baseX'])_0x4527c5=![];}else{if(this[_0x2b75f2(0x6ef)])_0xb4271e=Math['max'](0x0,this[_0x2b75f2(0x6ef)][_0x2b75f2(0x3b0)]-0x4);}}this[_0x2b75f2(0xa5b)][_0x2b75f2(0x8da)](0x0,0x0,_0x486e0b,_0xb4271e),this[_0x2b75f2(0x8da)](0x0,0x0,_0x486e0b,_0xb4271e);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0xee)]=function(){const _0x1ee7c9=_0x5bdce9;if(!this[_0x1ee7c9(0x976)])return;if(!this['_hpGaugeSprite'])return;const _0x3cf12=VisuMZ['BattleCore'][_0x1ee7c9(0x76e)][_0x1ee7c9(0x9d6)],_0x21e806=this[_0x1ee7c9(0x53c)];_0x21e806[_0x1ee7c9(0x8e1)]=this[_0x1ee7c9(0x528)]();const _0x4943cb=_0x3cf12['OffsetX'],_0x581f5a=_0x3cf12['OffsetY'];_0x21e806['x']=_0x4943cb,_0x21e806['x']+=this[_0x1ee7c9(0x976)][_0x1ee7c9(0x5d1)](),_0x21e806['y']=-this['height']+_0x581f5a,_0x21e806['y']+=this['_battler'][_0x1ee7c9(0xb18)](),Spriteset_Battle[_0x1ee7c9(0x69e)]&&SceneManager[_0x1ee7c9(0x352)][_0x1ee7c9(0x25a)]&&(_0x21e806['x']+=this['x'],_0x21e806['y']+=this['y']);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x528)]=function(){const _0x505cfd=_0x5bdce9;if(!this[_0x505cfd(0x976)])return![];if(this['_battler'][_0x505cfd(0x491)]())return!![];if(this['_battler']['isHidden']())return![];if(this[_0x505cfd(0x867)]<=0x0)return![];const _0x1a353d=this[_0x505cfd(0x976)][_0x505cfd(0x1fc)]()[_0x505cfd(0x664)];if(_0x1a353d['match'](/<SHOW HP GAUGE>/i))return!![];if(_0x1a353d[_0x505cfd(0x16b)](/<HIDE HP GAUGE>/i))return![];const _0x3e56f5=VisuMZ['BattleCore'][_0x505cfd(0x76e)][_0x505cfd(0x9d6)];if(_0x3e56f5[_0x505cfd(0x78a)]){if('wXMfy'==='ZZvcx')return 0x1;else{if(_0x3e56f5['BTestBypass']&&BattleManager[_0x505cfd(0x1b6)]())return!![];if(this[_0x505cfd(0x976)]['_visualHpGauge_JustDied'])return![];return this[_0x505cfd(0x976)][_0x505cfd(0x7da)]();}}return!![];},VisuMZ['BattleCore']['Sprite_Battler_isMoving']=Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3a8)],Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x3a8)]=function(){const _0x2fe080=_0x5bdce9;if(!this[_0x2fe080(0x976)])return![];if(this[_0x2fe080(0x1a8)]>0x0)return!![];return VisuMZ[_0x2fe080(0x61c)][_0x2fe080(0x5ca)][_0x2fe080(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x786)]=Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x120)],Sprite_Battler['prototype'][_0x5bdce9(0x120)]=function(_0x32f515,_0x3747e7,_0x349a02){const _0x4d1bd6=_0x5bdce9;this['canMove']()&&VisuMZ['BattleCore']['Sprite_Battler_startMove'][_0x4d1bd6(0x4b1)](this,_0x32f515,_0x3747e7,_0x349a02);},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x524)]=function(){const _0x791b38=_0x5bdce9;if(this[_0x791b38(0x976)]&&this[_0x791b38(0x976)][_0x791b38(0x9a3)]())return![];if(this[_0x791b38(0x976)]&&!this[_0x791b38(0x976)][_0x791b38(0x270)]())return![];return $gameSystem[_0x791b38(0x68b)]();},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x373)]=function(){},Sprite_Battler['prototype']['stepBack']=function(){const _0x2c65d1=_0x5bdce9;this[_0x2c65d1(0x120)](0x0,0x0,0xc);},Sprite_Battler['prototype'][_0x5bdce9(0x5d8)]=function(){},Sprite_Battler[_0x5bdce9(0x768)][_0x5bdce9(0x135)]=function(){const _0x30c0bf=_0x5bdce9,_0x448a3e=VisuMZ[_0x30c0bf(0x61c)][_0x30c0bf(0x76e)][_0x30c0bf(0xe6)],_0x550e04=this['_battler']&&this[_0x30c0bf(0x976)][_0x30c0bf(0x491)]()?0x1:-0x1,_0xe03ce6=this[_0x30c0bf(0x8f0)]-this[_0x30c0bf(0x666)]+_0x550e04*_0x448a3e[_0x30c0bf(0x13c)],_0x472bcc=this[_0x30c0bf(0x4c9)]-this[_0x30c0bf(0x51a)]+_0x550e04*_0x448a3e[_0x30c0bf(0x6d8)],_0x34944a=_0x448a3e['FlinchDuration'];this['startMove'](_0xe03ce6,_0x472bcc,_0x34944a);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xb70)]=Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x3b5)],Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x3b5)]=function(){const _0x48b974=_0x5bdce9;VisuMZ[_0x48b974(0x61c)]['Sprite_Actor_initMembers']['call'](this),this['attachSpritesToDistortionSprite']();},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x878)]=function(){const _0x298bf5=_0x5bdce9;return this[_0x298bf5(0xa9b)]||this['_mainSprite']||this;},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x1ab)]=Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0xaba)],Sprite_Actor['prototype'][_0x5bdce9(0xaba)]=function(){},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x3f9)]=function(_0x5260ee){const _0xd745ba=_0x5bdce9;if(SceneManager[_0xd745ba(0x8e7)]())return;if(!_0x5260ee)return;if(!_0x5260ee[_0xd745ba(0x524)]())return;VisuMZ[_0xd745ba(0x61c)][_0xd745ba(0x1ab)][_0xd745ba(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x231)]=Sprite_Actor['prototype'][_0x5bdce9(0x2d2)],Sprite_Actor['prototype']['setActorHome']=function(_0x39288f){const _0x238794=_0x5bdce9;if(VisuMZ[_0x238794(0x61c)][_0x238794(0x76e)][_0x238794(0xe6)]['HomePosJS']){if(_0x238794(0x397)!==_0x238794(0x397)){if(!this[_0x238794(0x524)]())return;if(!this['_distortionSprite'])return;if(this[_0x238794(0x4a9)]===_0x403e4c&&this[_0x238794(0x739)]===_0x3291c9)return;this[_0x238794(0x4a9)]=_0x5e055d,this[_0x238794(0x739)]=_0x57dc0e,this[_0x238794(0x9ba)]=_0x31511d,this[_0x238794(0xaf4)]=_0x1157f1,this['_growEasing']=_0x3d3d21||_0x238794(0x32d),_0x2b8b2a<=0x0&&(this['_growX']=this[_0x238794(0x4a9)],this['_growY']=this[_0x238794(0x739)]);}else VisuMZ[_0x238794(0x61c)]['Settings'][_0x238794(0xe6)][_0x238794(0x181)][_0x238794(0x4b1)](this,_0x39288f);}else VisuMZ[_0x238794(0x61c)][_0x238794(0x231)][_0x238794(0x4b1)](this,_0x39288f);},VisuMZ['BattleCore'][_0x5bdce9(0x8ad)]=Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x23d)],Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x23d)]=function(_0x2f5a26){const _0x45364a=_0x5bdce9;VisuMZ[_0x45364a(0x61c)][_0x45364a(0x8ad)][_0x45364a(0x4b1)](this,_0x2f5a26),this[_0x45364a(0x9e4)](_0x2f5a26);},Sprite_Actor[_0x5bdce9(0x768)]['setBattlerBattleCore']=function(_0x55978d){const _0x5ba260=_0x5bdce9;if(!_0x55978d)return;if(!this[_0x5ba260(0xa5b)])return;this[_0x5ba260(0xa5b)][_0x5ba260(0x887)]['x']=this[_0x5ba260(0xa72)][_0x5ba260(0x90f)](),this[_0x5ba260(0xa5b)]['anchor']['y']=this['_actor'][_0x5ba260(0xa3f)](),this[_0x5ba260(0x643)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x583)]=Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x367)],Sprite_Actor['prototype']['update']=function(){const _0x495271=_0x5bdce9;VisuMZ[_0x495271(0x61c)][_0x495271(0x583)]['call'](this),this[_0x495271(0xa72)]&&(this[_0x495271(0x898)](),this[_0x495271(0x410)]());},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x750)]=Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x575)],Sprite_Actor[_0x5bdce9(0x768)]['updateBitmap']=function(){const _0x386bcd=_0x5bdce9;VisuMZ[_0x386bcd(0x61c)]['Sprite_Actor_updateBitmap'][_0x386bcd(0x4b1)](this),this[_0x386bcd(0xa5b)]&&this[_0x386bcd(0xa5b)]['bitmap']&&this['_battler']&&(this[_0x386bcd(0xa5b)][_0x386bcd(0x454)][_0x386bcd(0x302)]!==this[_0x386bcd(0x976)][_0x386bcd(0x987)]()&&(this['_mainSprite'][_0x386bcd(0x454)][_0x386bcd(0x302)]=this[_0x386bcd(0x976)][_0x386bcd(0x987)]()));},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x8eb)]=Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x837)],Sprite_Actor[_0x5bdce9(0x768)]['updateShadow']=function(){const _0xcc5623=_0x5bdce9;VisuMZ[_0xcc5623(0x61c)][_0xcc5623(0x8eb)][_0xcc5623(0x4b1)](this),this['updateShadowBattleCore']();},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x875)]=function(){const _0x52fc5c=_0x5bdce9;if(!this[_0x52fc5c(0xa5b)])return;if(!this[_0x52fc5c(0x748)])return;this[_0x52fc5c(0x643)](),this[_0x52fc5c(0x3b9)]();},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x898)]=function(){const _0x3ac359=_0x5bdce9;this[_0x3ac359(0x569)][_0x3ac359(0x91d)]['x']=0x1/(this[_0x3ac359(0x91d)]['x']||0.001),this[_0x3ac359(0x569)][_0x3ac359(0x91d)]['y']=0x1/(this[_0x3ac359(0x91d)]['y']||0.001);},Sprite_Actor['prototype']['updateStyleOpacity']=function(){const _0x218bd8=_0x5bdce9;if(!$gameSystem['isSideView']()&&this[_0x218bd8(0x56d)]===Sprite_Actor){const _0x4bdd24=Scene_Battle['prototype'][_0x218bd8(0x19d)]();[_0x218bd8(0xa34),_0x218bd8(0x3cd),_0x218bd8(0x71f),_0x218bd8(0x5f1)][_0x218bd8(0x8ed)](_0x4bdd24)&&(this[_0x218bd8(0x867)]=0x0);}},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0xadc)]=function(){const _0x3a34b3=_0x5bdce9,_0x20b348=this[_0x3a34b3(0xa72)];if(_0x20b348){if('XtftK'===_0x3a34b3(0x7ab))this[_0x3a34b3(0x838)]('fnordRemovedStates'),this[_0x3a34b3(0x838)](_0x3a34b3(0x73f)),this[_0x3a34b3(0x838)]('pushBaseLine'),this[_0x3a34b3(0x838)](_0x3a34b3(0xa19),_0x48d8cf[_0x3a34b3(0x2d1)][_0x3a34b3(0x824)](_0x33f4c6[_0x3a34b3(0x74e)]())),this[_0x3a34b3(0x838)]('wait');else{const _0x5992cd=_0x20b348[_0x3a34b3(0xd6)]();if(_0x20b348[_0x3a34b3(0x923)]()||_0x20b348['isActing']()){if('nlJjG'!=='Ozkof')this[_0x3a34b3(0x197)](_0x3a34b3(0x6c4));else{if(!_0x375cca)return 0x0;let _0x6771ac=0x0;const _0x438b49=_0x26f245['note'];return _0x438b49[_0x3a34b3(0x16b)](/<BATTLE UI OFFSET Y:[ ]([\+\-]\d+)>/i)&&(_0x6771ac+=_0x10e5ba(_0x46256f['$1'])),_0x438b49[_0x3a34b3(0x16b)](/<BATTLE UI OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i)&&(_0x6771ac+=_0x3d21a2(_0x3f6c44['$2'])),_0x6771ac;}}else{if(_0x5992cd===0x3)this['startMotion'](_0x3a34b3(0x325));else{if(_0x5992cd===0x2)_0x3a34b3(0xab9)!==_0x3a34b3(0x50a)?this[_0x3a34b3(0x197)](_0x3a34b3(0x70d)):this[_0x3a34b3(0x378)]();else{if(this['forceEscapeSprite'])this[_0x3a34b3(0x197)](_0x3a34b3(0x6ec));else{if(_0x20b348[_0x3a34b3(0xb31)]())this[_0x3a34b3(0x197)](_0x3a34b3(0x156));else{if(_0x20b348[_0x3a34b3(0x6cb)]())_0x3a34b3(0xadd)===_0x3a34b3(0x130)?(_0x1bb475=(_0x39b8d3+_0xe859a2)/0x2,_0x55d4b0=-0x1):this[_0x3a34b3(0x197)](_0x3a34b3(0x177));else{if(_0x20b348[_0x3a34b3(0x8b8)]()||_0x20b348[_0x3a34b3(0x447)]())this[_0x3a34b3(0x197)](_0x3a34b3(0xe9));else{if(_0x5992cd===0x1)'ynrRS'!==_0x3a34b3(0x1ca)?this[_0x3a34b3(0x197)]('abnormal'):(_0x483553['BattleCore'][_0x3a34b3(0x76e)][_0x3a34b3(0x9d6)]['ShowEnemyGauge']&&this[_0x3a34b3(0x2b8)](),_0x31e5c1[_0x3a34b3(0x61c)][_0x3a34b3(0x6e0)][_0x3a34b3(0x4b1)](this));else{if(_0x20b348['isDying']())this[_0x3a34b3(0x197)]('dying');else{if(_0x20b348['isUndecided']())_0x3a34b3(0xa12)!==_0x3a34b3(0xa12)?(_0x37cf84=(_0x47ad2f+_0x1a14d5)/0x2,_0x3f04ba=-0x1):this['startMotion']('walk');else _0x20b348['currentAction']()?_0x3a34b3(0x71a)===_0x3a34b3(0x6b0)?(_0x27d880*=_0x35f04e[_0x3a34b3(0x5b7)](_0x38fac9[_0x3a34b3(0x357)]),_0x3f9b9a*=this[_0x3a34b3(0x2ef)](_0x4928ae)):this[_0x3a34b3(0x197)](_0x3a34b3(0x156)):this[_0x3a34b3(0x197)](_0x3a34b3(0x6c4));}}}}}}}}}}}},Sprite_Actor[_0x5bdce9(0x768)]['retreat']=function(){const _0x45886d=_0x5bdce9,_0x3b8269=0xa,_0x387983=0x12c*_0x3b8269,_0x5e012b=0x1e*_0x3b8269;this[_0x45886d(0x120)](_0x387983,0x0,_0x5e012b);},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x1d9)]=function(){const _0x4ebac1=_0x5bdce9;Sprite_Battler[_0x4ebac1(0x768)]['onMoveEnd']['call'](this);},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x297)]=function(){return Sprite_Battler['_motionSpeed'];},Sprite_Weapon[_0x5bdce9(0x768)][_0x5bdce9(0x370)]=function(){return Sprite_Battler['_motionSpeed'];},Sprite_Actor[_0x5bdce9(0x768)]['setupMotion']=function(){},Sprite_Actor[_0x5bdce9(0x768)]['setupWeaponAnimation']=function(){},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x911)]=function(){const _0x54d638=_0x5bdce9;if(this[_0x54d638(0x9eb)]&&++this[_0x54d638(0x5f5)]>=this[_0x54d638(0x297)]()){if(this[_0x54d638(0x9eb)][_0x54d638(0x127)])'OOpVU'===_0x54d638(0x762)?this[_0x54d638(0x3b6)]=(this['_pattern']+0x1)%0x4:_0x53c463[_0x54d638(0x2d6)](0x0);else this['_pattern']<0x2?_0x54d638(0x280)!=='LOcYq'?this['_pattern']++:this['_cancelButton']['x']=-this[_0x54d638(0x4a2)][_0x54d638(0x3b2)]-0x4:this[_0x54d638(0xadc)]();this[_0x54d638(0x5f5)]=0x0;}},Sprite_Actor['prototype'][_0x5bdce9(0xae5)]=function(_0x37f21d){const _0x12b3a3=_0x5bdce9;if(_0x37f21d===_0x12b3a3(0x55c))this[_0x12b3a3(0x42d)]=!![];if(this[_0x12b3a3(0x976)]&&this['_battler'][_0x12b3a3(0x9a3)]()){if(_0x12b3a3(0x442)===_0x12b3a3(0xda)){let _0x12ed74=[];for(const _0x34b42f of _0xf68dbd){_0x12ed74=_0x12ed74[_0x12b3a3(0x331)](_0x415f92[_0x12b3a3(0xaa1)](_0x34b42f));}return _0x12ed74[_0x12b3a3(0xb85)](_0x35fe01=>_0x35fe01);}else{this[_0x12b3a3(0x9eb)]=Sprite_Actor[_0x12b3a3(0x49d)][_0x12b3a3(0x325)];return;}}const _0x1aa48e=Sprite_Actor[_0x12b3a3(0x49d)][_0x37f21d];this[_0x12b3a3(0x9eb)]=_0x1aa48e,this[_0x12b3a3(0x5f5)]=0x0,this[_0x12b3a3(0x3b6)]=0x0;},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x460)]=function(_0x41806e){const _0xf803ce=_0x5bdce9;if(this[_0xf803ce(0x8bc)]())return;this['adjustWeaponSpriteOffset'](),this['_weaponSprite'][_0xf803ce(0x5aa)](_0x41806e),this[_0xf803ce(0xa72)][_0xf803ce(0x816)]();},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x5ba)]=function(){const _0x3b2f6d=_0x5bdce9;let _0x499f71=-0x10,_0x65398f=this[_0x3b2f6d(0x3b0)]*0.5;const _0x3c0478=/<SIDEVIEW WEAPON OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i,_0x5c9046=this[_0x3b2f6d(0x976)][_0x3b2f6d(0xb51)]()[_0x3b2f6d(0x782)](_0x208dcb=>_0x208dcb&&_0x208dcb['note'][_0x3b2f6d(0x16b)](_0x3c0478)?Number(RegExp['$1']):0x0),_0x351a8e=this[_0x3b2f6d(0x976)][_0x3b2f6d(0xb51)]()[_0x3b2f6d(0x782)](_0x56b413=>_0x56b413&&_0x56b413[_0x3b2f6d(0x664)][_0x3b2f6d(0x16b)](_0x3c0478)?Number(RegExp['$2']):0x0);_0x499f71=_0x5c9046[_0x3b2f6d(0x7cc)]((_0x2e9fb1,_0x1b265b)=>_0x2e9fb1+_0x1b265b,_0x499f71),_0x65398f=_0x351a8e[_0x3b2f6d(0x7cc)]((_0x438825,_0x5c3c50)=>_0x438825+_0x5c3c50,_0x65398f),this[_0x3b2f6d(0x826)]['x']=_0x499f71,this[_0x3b2f6d(0x826)]['y']=_0x65398f,this[_0x3b2f6d(0x826)][_0x3b2f6d(0x367)]();},Sprite_Weapon[_0x5bdce9(0x768)][_0x5bdce9(0x5aa)]=function(_0x363506){const _0x38e5ee=_0x5bdce9;this[_0x38e5ee(0x765)]=_0x363506,this[_0x38e5ee(0x92a)]=-0x1,this['_pattern']=0x0,this[_0x38e5ee(0x2f4)](),this[_0x38e5ee(0x46d)]();},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x4af)]=function(){},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x373)]=function(){const _0x127586=_0x5bdce9,_0x55d258=VisuMZ['BattleCore'][_0x127586(0x76e)]['ActionSequence'],_0x13eeee=_0x55d258[_0x127586(0x436)],_0x199a82=_0x55d258['StepDistanceY'],_0x4e32c9=_0x55d258['StepDuration'];this[_0x127586(0x120)](-_0x13eeee,-_0x199a82,_0x4e32c9);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xb6c)]=Sprite_Actor[_0x5bdce9(0x768)]['updateFrame'],Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x46d)]=function(){const _0x352a92=_0x5bdce9;if(this[_0x352a92(0x8bc)]()){if(_0x352a92(0x8d0)===_0x352a92(0xb2c))return this[_0x352a92(0x73a)]()?0x0:0xa;else this['updateStaticSvBattlerFrames']();}else this[_0x352a92(0x746)](),VisuMZ['BattleCore'][_0x352a92(0xb6c)]['call'](this);},Sprite_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x746)]=function(){const _0x43ee46=_0x5bdce9;if(this[_0x43ee46(0x976)]&&this[_0x43ee46(0x976)][_0x43ee46(0x3be)]){const _0x1342fb=this[_0x43ee46(0x976)]['_freezeMotionData'];this['_motion']=Sprite_Actor[_0x43ee46(0x49d)][_0x1342fb[_0x43ee46(0x1be)]],this['_pattern']=_0x1342fb[_0x43ee46(0x3ef)];const _0x3422f6=this[_0x43ee46(0x826)];_0x3422f6[_0x43ee46(0x236)](_0x1342fb[_0x43ee46(0x1dc)],_0x1342fb[_0x43ee46(0x3ef)]),this[_0x43ee46(0x5ba)]();}},Sprite_Weapon['prototype'][_0x5bdce9(0x236)]=function(_0x4a9cac,_0x339987){const _0x38e426=_0x5bdce9;this['_weaponImageId']=_0x4a9cac,this[_0x38e426(0x92a)]=-Infinity,this[_0x38e426(0x3b6)]=_0x339987,this[_0x38e426(0x2f4)](),this[_0x38e426(0x46d)]();},Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x3b5)]=function(){const _0x46a241=_0x5bdce9;Sprite_Battler[_0x46a241(0x768)][_0x46a241(0x3b5)]['call'](this),this[_0x46a241(0x471)]=null,this['_appeared']=![],this[_0x46a241(0xa1c)]='',this[_0x46a241(0x2ee)]=0x0,this[_0x46a241(0x409)]=null,this[_0x46a241(0x100)]=0x0,this['_shake']=0x0,this[_0x46a241(0x7ce)](),this[_0x46a241(0x9d7)]();},VisuMZ[_0x5bdce9(0x61c)]['Sprite_Enemy_update']=Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x367)],Sprite_Enemy['prototype'][_0x5bdce9(0x367)]=function(){const _0x114c73=_0x5bdce9;VisuMZ[_0x114c73(0x61c)][_0x114c73(0x91a)][_0x114c73(0x4b1)](this),this[_0x114c73(0x643)]();},Sprite_Enemy['prototype'][_0x5bdce9(0x7ce)]=function(){const _0x5c084a=_0x5bdce9;this[_0x5c084a(0xa5b)]=new Sprite(),this[_0x5c084a(0xa5b)][_0x5c084a(0x887)]['x']=0.5,this[_0x5c084a(0xa5b)][_0x5c084a(0x887)]['y']=0x1,this[_0x5c084a(0xa8d)](this['_mainSprite']),this[_0x5c084a(0x12b)]();},Sprite_Enemy[_0x5bdce9(0x768)]['mainSprite']=function(){const _0x3e4402=_0x5bdce9;return this['_distortionSprite']||this[_0x3e4402(0xa5b)]||this;},Sprite_Enemy['prototype'][_0x5bdce9(0x2f4)]=function(_0x45a09c){const _0x337b68=_0x5bdce9;this['bitmap']=new Bitmap(0x1,0x1);if(this[_0x337b68(0x3a3)]()){if(_0x337b68(0xab5)!==_0x337b68(0xab5)){if(!_0x1bbd91['isSceneBattle']())return;if(!_0x50a619[_0x337b68(0x27b)])return;_0xc1af29[_0x337b68(0x866)](_0x4d0251,_0x511b44);const _0x41306a=_0x5cc7b2[_0x337b68(0xb48)](),_0x3e5474=_0x3251ac[_0x337b68(0x146)];if(!_0x41306a)return;_0x278f9c[_0x337b68(0xb89)](0x1,_0x84d343['Duration'],_0x46180d[_0x337b68(0x752)]);if(_0x3e5474)_0x41306a[_0x337b68(0x73c)](_0x337b68(0xa68));}else{const _0x38b3a9=this[_0x337b68(0x471)][_0x337b68(0x74a)]();this[_0x337b68(0x454)]=new Bitmap(_0x38b3a9['width'],_0x38b3a9[_0x337b68(0x3b0)]),this[_0x337b68(0xa5b)]['bitmap']=new Bitmap(0x1,0x1);}}else $gameSystem[_0x337b68(0x68b)]()?(this[_0x337b68(0xa5b)][_0x337b68(0x454)]=ImageManager[_0x337b68(0x3f1)](_0x45a09c),this['_mainSprite'][_0x337b68(0x454)]['addLoadListener'](this[_0x337b68(0x3d1)]['bind'](this))):(this[_0x337b68(0xa5b)][_0x337b68(0x454)]=ImageManager[_0x337b68(0x121)](_0x45a09c),this['_mainSprite'][_0x337b68(0x454)][_0x337b68(0x4e9)](this[_0x337b68(0x3d1)]['bind'](this)));},Sprite_Enemy['prototype'][_0x5bdce9(0x3d1)]=function(){const _0x4ef1f4=_0x5bdce9,_0x4abb35=this[_0x4ef1f4(0xa5b)]['bitmap'];_0x4abb35&&(this['bitmap']=new Bitmap(_0x4abb35[_0x4ef1f4(0x3b2)],_0x4abb35[_0x4ef1f4(0x3b0)]));},VisuMZ['BattleCore']['Sprite_Enemy_setHue']=Sprite_Enemy[_0x5bdce9(0x768)]['setHue'],Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x44d)]=function(_0x251a23){const _0x3f4dc4=_0x5bdce9;if(this[_0x3f4dc4(0xa5b)]){if(_0x3f4dc4(0x869)!=='GHZVN')this[_0x3f4dc4(0xa5b)][_0x3f4dc4(0x44d)](_0x251a23);else{const _0x1a6b25=_0x5a18d3[_0x3f4dc4(0x977)](_0x14bf6b);return _0x1a6b25>=0x0?[_0x2da863[_0x1a6b25+0x1]||_0x5f528b]:[_0x18d7f2];}}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x8ca)]=Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x1a7)],Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x1a7)]=function(){const _0x4916d9=_0x5bdce9;this['allowCollapse']()?VisuMZ[_0x4916d9(0x61c)][_0x4916d9(0x8ca)][_0x4916d9(0x4b1)](this):(this[_0x4916d9(0xb7f)]=!this[_0x4916d9(0x471)]['isHidden'](),!this[_0x4916d9(0xb7f)]&&('WGpLC'!=='WGpLC'?(_0x2d8fd3=_0x11d3f6(_0x1a70f2['$1']),_0x24b9e7=_0x4f26f3(_0x4e4f20['$2'])):this['opacity']=0x0));},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x1e1)]=Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x9db)],Sprite_Enemy[_0x5bdce9(0x768)]['updateCollapse']=function(){const _0x27fc0b=_0x5bdce9;if(this[_0x27fc0b(0x4a0)]())VisuMZ['BattleCore'][_0x27fc0b(0x1e1)][_0x27fc0b(0x4b1)](this);},Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x46d)]=function(){const _0xe50e16=_0x5bdce9;Sprite_Battler['prototype'][_0xe50e16(0x46d)][_0xe50e16(0x4b1)](this);const _0xd52e7b=this[_0xe50e16(0x878)]()||this;if(!_0xd52e7b)return;if(!_0xd52e7b[_0xe50e16(0x454)]){if(_0xe50e16(0xac6)!==_0xe50e16(0x12c))_0xd52e7b[_0xe50e16(0x454)]=new Bitmap(this['width'],this[_0xe50e16(0x3b0)]);else return!![];}this[_0xe50e16(0x409)]===_0xe50e16(0x31f)?this['_mainSprite']['setFrame'](0x0,0x0,this[_0xe50e16(0xa5b)][_0xe50e16(0x3b2)],this['_effectDuration']):_0xd52e7b['setFrame'](0x0,0x0,_0xd52e7b[_0xe50e16(0x454)][_0xe50e16(0x3b2)],this['bitmap']['height']);},VisuMZ['BattleCore'][_0x5bdce9(0x702)]=Sprite_Enemy[_0x5bdce9(0x768)]['updateBossCollapse'],Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x340)]=function(){const _0x2505fb=_0x5bdce9;if(this[_0x2505fb(0x4a0)]())VisuMZ[_0x2505fb(0x61c)][_0x2505fb(0x702)]['call'](this);},Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x3a8)]=function(){const _0x1088e7=_0x5bdce9;return Sprite_Battler[_0x1088e7(0x768)]['isMoving'][_0x1088e7(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x272)]=Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x898)],Sprite_Enemy[_0x5bdce9(0x768)]['updateStateSprite']=function(){const _0x4f9e95=_0x5bdce9;VisuMZ['BattleCore'][_0x4f9e95(0x272)]['call'](this),this[_0x4f9e95(0x401)]();},Sprite_Enemy[_0x5bdce9(0x768)]['updateStateSpriteBattleCore']=function(){const _0xab0e65=_0x5bdce9,_0x57e40c=VisuMZ[_0xab0e65(0x61c)][_0xab0e65(0x76e)][_0xab0e65(0x14a)];if(_0x57e40c[_0xab0e65(0x854)]&&!_0x57e40c['NameLegacy']){this[_0xab0e65(0x21f)]['opacity']=0x0;return;}this[_0xab0e65(0x21f)]['x']=0x0,this[_0xab0e65(0x21f)]['x']+=this[_0xab0e65(0x976)][_0xab0e65(0x5d1)](),this[_0xab0e65(0x21f)]['y']=-this[_0xab0e65(0x454)]['height']-this[_0xab0e65(0x21f)][_0xab0e65(0x3b0)]-0x4,this[_0xab0e65(0x21f)]['y']+=this[_0xab0e65(0x976)]['battleUIOffsetY'](),this['_stateIconSprite'][_0xab0e65(0x91d)]['x']=0x1/(this['scale']['x']||0.001),this[_0xab0e65(0x21f)][_0xab0e65(0x91d)]['y']=0x1/(this[_0xab0e65(0x91d)]['y']||0.001),this[_0xab0e65(0x3a3)]()&&(this[_0xab0e65(0x3d6)][_0xab0e65(0x569)]['scale']['x']=-0x1/(this[_0xab0e65(0x91d)]['x']||0.001),this[_0xab0e65(0x3d6)][_0xab0e65(0x569)]['scale']['y']=0x1/(this['scale']['y']||0.001));},VisuMZ[_0x5bdce9(0x61c)]['Sprite_Enemy_setBattler']=Sprite_Enemy[_0x5bdce9(0x768)]['setBattler'],Sprite_Enemy['prototype']['setBattler']=function(_0x5370c8){const _0x362b7a=_0x5bdce9;VisuMZ['BattleCore'][_0x362b7a(0x19a)]['call'](this,_0x5370c8),this[_0x362b7a(0x318)](_0x5370c8);},Sprite_Enemy['prototype'][_0x5bdce9(0x318)]=function(_0x71803a){const _0x2b185e=_0x5bdce9;!this['_svBattlerSprite']&&(this[_0x2b185e(0x3d6)]=new Sprite_SvEnemy(_0x71803a),this[_0x2b185e(0x12b)]()),this[_0x2b185e(0x3d6)][_0x2b185e(0x23d)](_0x71803a);},Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x3a3)]=function(){const _0x4f7d5c=_0x5bdce9;return this[_0x4f7d5c(0x471)]&&this[_0x4f7d5c(0x471)][_0x4f7d5c(0x3a3)]();},Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x4a0)]=function(){const _0x488a15=_0x5bdce9;if(this[_0x488a15(0x3a3)]()){if(_0x488a15(0x9d3)===_0x488a15(0x937))this['_battler'][_0x488a15(0x3e7)]()&&this[_0x488a15(0x1d7)]();else return this['_enemy'][_0x488a15(0x4a0)]();}else{if('BPTyp'!==_0x488a15(0x45d)){const _0x3fa630=this[_0x488a15(0x814)](_0x293696,_0x596cf7);_0x3fa630[_0x488a15(0x454)][_0x488a15(0x683)](_0x575c31[_0x1c5213],0x0,0x0,_0x3517e4,_0x595cb5,_0x488a15(0x4ed)),_0x3fa630['x']=(_0x5ba8e4-(_0x2b21d9[_0x488a15(0x12d)]-0x1)/0x2)*_0x308bce,_0x3fa630['dy']=-_0x202416;}else return!![];}},Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0xadc)]=function(){const _0x19c665=_0x5bdce9;if(this['hasSvBattler']()){if('PZcCx'===_0x19c665(0x7a1))return _0x6cf823[_0x19c665(0x61c)][_0x19c665(0x4bb)][_0x19c665(0x4b1)](this);else this[_0x19c665(0x3d6)][_0x19c665(0xadc)]();}},Sprite_Enemy['prototype'][_0x5bdce9(0xae5)]=function(_0x2cbd99){const _0x424430=_0x5bdce9;if(this[_0x424430(0x3a3)]())this[_0x424430(0x3d6)]['forceMotion'](_0x2cbd99);},Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x460)]=function(_0x28c1d4){const _0x22aa8f=_0x5bdce9;if(this[_0x22aa8f(0x3a3)]())this['_svBattlerSprite']['forceWeaponAnimation'](_0x28c1d4);},Sprite_Enemy[_0x5bdce9(0x768)][_0x5bdce9(0x373)]=function(){const _0x481b0d=_0x5bdce9,_0x30a36d=VisuMZ[_0x481b0d(0x61c)]['Settings']['ActionSequence'],_0x5f130a=_0x30a36d[_0x481b0d(0x436)],_0x982234=_0x30a36d[_0x481b0d(0xa5a)],_0x2f59b3=_0x30a36d[_0x481b0d(0x998)];this['startMove'](_0x5f130a,_0x982234,_0x2f59b3);};function Sprite_SvEnemy(){const _0x4b433f=_0x5bdce9;this[_0x4b433f(0x490)](...arguments);}function _0x9b05(_0x24cb6e,_0x85ea33){const _0x1d5cd8=_0x1d5c();return _0x9b05=function(_0x9b052e,_0x536643){_0x9b052e=_0x9b052e-0xd0;let _0x21d8db=_0x1d5cd8[_0x9b052e];return _0x21d8db;},_0x9b05(_0x24cb6e,_0x85ea33);}Sprite_SvEnemy['prototype']=Object[_0x5bdce9(0xdf)](Sprite_Actor[_0x5bdce9(0x768)]),Sprite_SvEnemy[_0x5bdce9(0x768)]['constructor']=Sprite_SvEnemy,Sprite_SvEnemy[_0x5bdce9(0x768)]['initialize']=function(_0x3c6d21){const _0x13bac7=_0x5bdce9;Sprite_Actor['prototype']['initialize'][_0x13bac7(0x4b1)](this,_0x3c6d21),this[_0x13bac7(0x91d)]['x']=-0x1,this['_stateSprite'][_0x13bac7(0x91d)]['x']=-0x1;},Sprite_SvEnemy[_0x5bdce9(0x768)][_0x5bdce9(0x598)]=function(){},Sprite_SvEnemy['prototype'][_0x5bdce9(0xaba)]=function(){},Sprite_SvEnemy[_0x5bdce9(0x768)]['setActorHome']=function(_0x4ab5b5){},Sprite_SvEnemy[_0x5bdce9(0x768)][_0x5bdce9(0x837)]=function(){},Sprite_SvEnemy['prototype'][_0x5bdce9(0x3b9)]=function(){},Sprite_SvEnemy[_0x5bdce9(0x768)][_0x5bdce9(0x898)]=function(){const _0x194b21=_0x5bdce9;this['_stateSprite'][_0x194b21(0x8e1)]=![];},Sprite_SvEnemy['prototype']['updateBitmap']=function(){const _0x3248da=_0x5bdce9;Sprite_Battler[_0x3248da(0x768)][_0x3248da(0x575)]['call'](this);const _0x31d754=this[_0x3248da(0xa72)]['svBattlerName']();this[_0x3248da(0xa1c)]!==_0x31d754&&(this[_0x3248da(0xa1c)]=_0x31d754,this[_0x3248da(0xa5b)][_0x3248da(0x454)]=ImageManager['loadSvActor'](_0x31d754));if(this[_0x3248da(0xa5b)]&&this[_0x3248da(0xa5b)][_0x3248da(0x454)]&&this[_0x3248da(0x976)]){if(_0x3248da(0x4c1)===_0x3248da(0x4c1)){if(this[_0x3248da(0xa5b)]['bitmap'][_0x3248da(0x302)]!==this['_battler'][_0x3248da(0x987)]()){if(_0x3248da(0xa78)!==_0x3248da(0x635))this[_0x3248da(0xa5b)][_0x3248da(0x454)][_0x3248da(0x302)]=this[_0x3248da(0x976)]['battlerSmoothImage']();else{if(!_0x3d0e67['BattleCore'][_0x3248da(0x76e)][_0x3248da(0x40f)][_0x3248da(0x2d0)])return;const _0x38459d=this[_0x3248da(0xad6)](_0x39689c),_0x273fb4=this[_0x3248da(0x5c3)](_0x55ed58);_0x273fb4[_0x3248da(0x3b2)]=_0x326268[_0x3248da(0x2a8)],_0x273fb4[_0x3248da(0x3b0)]-=0x2,this['drawActorFace'](_0x38459d,_0x273fb4['x']+0x1,_0x273fb4['y']+0x1,_0x273fb4[_0x3248da(0x3b2)],_0x273fb4[_0x3248da(0x3b0)]);}}}else _0x1e521f['repeats']=_0x5db449[_0x3248da(0xa5e)](0x1,_0x11b01c(_0x319c6d['$1']));}},Sprite_SvEnemy[_0x5bdce9(0x768)]['retreat']=function(){},Sprite_SvEnemy[_0x5bdce9(0x768)]['startMove']=function(_0xbfc499,_0x339855,_0x25d53e){const _0x52320e=_0x5bdce9;if(this[_0x52320e(0x80c)])this['parent'][_0x52320e(0x120)](_0xbfc499,_0x339855,_0x25d53e);},Sprite_SvEnemy[_0x5bdce9(0x768)][_0x5bdce9(0xadc)]=function(){const _0x5f05c9=_0x5bdce9,_0x1da2ad=this[_0x5f05c9(0xa72)];if(_0x1da2ad){const _0x39f144=_0x1da2ad['stateMotionIndex']();if(_0x1da2ad[_0x5f05c9(0x923)]()||_0x1da2ad['isActing']())this[_0x5f05c9(0x197)](_0x5f05c9(0x6c4));else{if(_0x39f144===0x3)this[_0x5f05c9(0x197)](_0x5f05c9(0x325));else{if(_0x39f144===0x2)this[_0x5f05c9(0x197)](_0x5f05c9(0x70d));else{if(_0x1da2ad[_0x5f05c9(0x6cb)]())'FLyAf'==='FLyAf'?this[_0x5f05c9(0x197)](_0x5f05c9(0x177)):this[_0x5f05c9(0x197)](_0x5f05c9(0x156));else{if(_0x1da2ad[_0x5f05c9(0x8b8)]()||_0x1da2ad['isGuardWaiting']())this[_0x5f05c9(0x197)](_0x5f05c9(0xe9));else{if(_0x39f144===0x1)this[_0x5f05c9(0x197)]('abnormal');else{if(_0x1da2ad[_0x5f05c9(0x152)]())this[_0x5f05c9(0x197)](_0x5f05c9(0x58c));else{if(_0x1da2ad[_0x5f05c9(0x98b)]()){if('PPRvn'!==_0x5f05c9(0x333))this[_0x5f05c9(0x197)](_0x5f05c9(0x6c4));else return-0x1;}else this[_0x5f05c9(0x197)](_0x1da2ad[_0x5f05c9(0x74a)]()[_0x5f05c9(0x220)]||_0x5f05c9(0x6c4));}}}}}}}}},Sprite_SvEnemy[_0x5bdce9(0x768)][_0x5bdce9(0x9a2)]=function(){const _0x6cfd31=_0x5bdce9;return this['parent']?this['parent'][_0x6cfd31(0x2a5)]===0x0&&this[_0x6cfd31(0x80c)][_0x6cfd31(0x7bb)]===0x0:!![];},Sprite_SvEnemy[_0x5bdce9(0x768)][_0x5bdce9(0x700)]=function(){},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xa28)]=Sprite_Animation[_0x5bdce9(0x768)]['targetSpritePosition'],Sprite_Animation['prototype'][_0x5bdce9(0xb4f)]=function(_0x23755f){const _0x342745=_0x5bdce9;if(_0x23755f[_0x342745(0xa9b)]){if(_0x342745(0x510)!==_0x342745(0x8ae))return this[_0x342745(0x4f5)](_0x23755f);else _0x173172=_0x414a13[_0x342745(0xb0d)]()[_0x342745(0x666)],_0x2f0c9b=_0x3e22f4[_0x342745(0xb0d)]()['_homeY'];}else{if(_0x342745(0x787)!=='kvjCM')return VisuMZ[_0x342745(0x61c)]['Sprite_Animation_targetSpritePosition']['call'](this,_0x23755f);else{const _0x46a37f=this[_0x342745(0x104)][this['_damages']['length']-0x1];_0x46a37f&&(_0x5d6390['x']=_0x46a37f['x']+_0x580cf9[_0x342745(0x808)]*_0x36591e,_0x4ea1ca['y']=_0x46a37f['y']+_0x1c14e3[_0x342745(0x9aa)]);}}},Sprite_Animation['prototype'][_0x5bdce9(0x4f5)]=function(_0x57b00c){const _0x397374=_0x5bdce9;let _0x99189f=_0x57b00c['x'],_0x27c0f1=_0x57b00c['y'],_0x520030=_0x57b00c['height'],_0x19e8a6=_0x57b00c[_0x397374(0xa9b)][_0x397374(0x91d)]['y'];_0x57b00c['x']=_0x57b00c[_0x397374(0x8f0)]+_0x57b00c[_0x397374(0x5e0)](),_0x57b00c['y']=_0x57b00c[_0x397374(0x4c9)]+_0x57b00c['extraPositionY'](),_0x57b00c[_0x397374(0x3b0)]*=_0x19e8a6;let _0x344ece=VisuMZ[_0x397374(0x61c)][_0x397374(0xa28)][_0x397374(0x4b1)](this,_0x57b00c);return _0x57b00c['x']=_0x99189f,_0x57b00c['y']=_0x27c0f1,_0x57b00c[_0x397374(0x3b0)]=_0x520030,_0x344ece;},VisuMZ[_0x5bdce9(0x61c)]['Sprite_AnimationMV_updatePosition']=Sprite_AnimationMV[_0x5bdce9(0x768)]['updatePosition'],Sprite_AnimationMV[_0x5bdce9(0x768)]['updatePosition']=function(){const _0x5a0808=_0x5bdce9;VisuMZ[_0x5a0808(0x61c)][_0x5a0808(0x734)]['call'](this);if(this[_0x5a0808(0x274)][_0x5a0808(0x32a)]===0x3){if(this['x']===0x0)this['x']=Math['round'](Graphics[_0x5a0808(0x3b2)]/0x2);if(this['y']===0x0)this['y']=Math[_0x5a0808(0xb3f)](Graphics[_0x5a0808(0x3b0)]/0x2);}},Sprite_Damage[_0x5bdce9(0x768)][_0x5bdce9(0x10b)]=function(_0x355af1){const _0x48e88a=_0x5bdce9,_0x575ee2=_0x355af1[_0x48e88a(0x30e)]()||_0x355af1[_0x48e88a(0x2c3)]();if(_0x575ee2[_0x48e88a(0xaef)]||_0x575ee2[_0x48e88a(0x728)])this[_0x48e88a(0xa31)]=0x0,this[_0x48e88a(0xaf9)]();else{if(_0x575ee2[_0x48e88a(0x825)])this[_0x48e88a(0xa31)]=_0x575ee2[_0x48e88a(0x78f)]>=0x0?0x0:0x1,this[_0x48e88a(0x3bd)](_0x575ee2[_0x48e88a(0x78f)]);else{if(_0x355af1[_0x48e88a(0x4d2)]()&&_0x575ee2[_0x48e88a(0x9c0)]!==0x0){if(_0x48e88a(0x5e4)!==_0x48e88a(0xaa2))this[_0x48e88a(0xa31)]=_0x575ee2[_0x48e88a(0x9c0)]>=0x0?0x2:0x3,this[_0x48e88a(0x3bd)](_0x575ee2['mpDamage']);else{if(!_0xaa72e9)return![];return _0x1146c8[_0x48e88a(0x712)]()===this[_0x48e88a(0x712)]();}}}}if(_0x575ee2[_0x48e88a(0x580)]){if(_0x48e88a(0x131)!==_0x48e88a(0x72b))this[_0x48e88a(0x29c)]();else{const _0x4cf0a7=this['_additionalSprites'];if(_0x4cf0a7[_0x3fa9df])return _0x4cf0a7[_0x509b6d];else{const _0x79d764=new _0x20ef11();return _0x4cf0a7[_0x538227]=_0x79d764,this[_0x48e88a(0x475)](_0x79d764),this[_0x48e88a(0x475)](this['_cursorArea']),_0x79d764;}}}},Sprite_Damage['prototype'][_0x5bdce9(0x5aa)]=function(_0x104774){},Sprite_Damage['prototype']['createDigits']=function(_0x5da418){const _0x2b1405=_0x5bdce9;let _0x53782d=this['createString'](_0x5da418);const _0x3ade3e=this[_0x2b1405(0x3c7)](),_0x268bbe=Math[_0x2b1405(0x618)](_0x3ade3e*0.75);for(let _0x44d06c=0x0;_0x44d06c<_0x53782d['length'];_0x44d06c++){const _0x18ab5a=this[_0x2b1405(0x814)](_0x268bbe,_0x3ade3e);_0x18ab5a[_0x2b1405(0x454)]['drawText'](_0x53782d[_0x44d06c],0x0,0x0,_0x268bbe,_0x3ade3e,_0x2b1405(0x4ed)),_0x18ab5a['x']=(_0x44d06c-(_0x53782d[_0x2b1405(0x12d)]-0x1)/0x2)*_0x268bbe,_0x18ab5a['dy']=-_0x44d06c;}},Sprite_Damage[_0x5bdce9(0x768)][_0x5bdce9(0x3de)]=function(_0xd51489){const _0x1bc42f=_0x5bdce9;let _0x203e21=Math[_0x1bc42f(0x41b)](_0xd51489)[_0x1bc42f(0x515)]();this['useDigitGrouping']()&&(_0x203e21=VisuMZ[_0x1bc42f(0x57b)](_0x203e21));const _0x5876fb=VisuMZ['BattleCore'][_0x1bc42f(0x76e)][_0x1bc42f(0x40d)];let _0x3e5477='',_0x54002a='';switch(this[_0x1bc42f(0xa31)]){case 0x0:_0x3e5477=_0x5876fb[_0x1bc42f(0x7f3)]||'-%1',_0x54002a=TextManager['hp'];if(_0xd51489===0x0)_0x3e5477='%1';break;case 0x1:_0x3e5477=_0x5876fb[_0x1bc42f(0x193)]||_0x1bc42f(0x85f),_0x54002a=TextManager['hp'];break;case 0x2:_0x3e5477=_0x5876fb['mpDamageFmt']||_0x1bc42f(0x9de),_0x54002a=TextManager['mp'];break;case 0x3:_0x3e5477=_0x5876fb[_0x1bc42f(0xafe)]||_0x1bc42f(0x645),_0x54002a=TextManager['mp'];break;}return _0x3e5477[_0x1bc42f(0x824)](_0x203e21,_0x54002a)[_0x1bc42f(0x92d)]();},Sprite_Damage['prototype'][_0x5bdce9(0x328)]=function(){const _0x187fba=_0x5bdce9;return Imported['VisuMZ_0_CoreEngine']?VisuMZ['CoreEngine'][_0x187fba(0x76e)][_0x187fba(0x4c6)]['DigitGroupingDamageSprites']:![];},Sprite_Damage[_0x5bdce9(0x768)][_0x5bdce9(0x29c)]=function(){const _0x2baf20=_0x5bdce9,_0x1a1a2c=VisuMZ[_0x2baf20(0x61c)][_0x2baf20(0x76e)][_0x2baf20(0x40d)];this[_0x2baf20(0x4f2)]=_0x1a1a2c[_0x2baf20(0x607)]['slice'](0x0),this[_0x2baf20(0x88c)]=_0x1a1a2c[_0x2baf20(0x5a7)];},Sprite_Damage[_0x5bdce9(0x768)][_0x5bdce9(0xafa)]=function(_0x1fc42a,_0x1bcf39){const _0xee7b69=_0x5bdce9;this['_flashColor']=_0x1bcf39[_0xee7b69(0x65f)]||[0x0,0x0,0x0,0x0],this[_0xee7b69(0x4f2)]=JsonEx[_0xee7b69(0x87e)](this[_0xee7b69(0x4f2)]),this[_0xee7b69(0x88c)]=_0x1bcf39[_0xee7b69(0x43e)]||0x0;const _0x513141=this[_0xee7b69(0x3c7)](),_0x4be798=Math[_0xee7b69(0x618)](_0x513141*0x1e),_0x2c88a7=this[_0xee7b69(0x814)](_0x4be798,_0x513141);_0x2c88a7[_0xee7b69(0x454)][_0xee7b69(0x9ac)]=ColorManager['getColor'](_0x1bcf39[_0xee7b69(0x9ac)]),_0x2c88a7[_0xee7b69(0x454)]['drawText'](_0x1fc42a,0x0,0x0,_0x4be798,_0x513141,_0xee7b69(0x4ed)),_0x2c88a7['dy']=0x0;},Sprite_Damage[_0x5bdce9(0x768)][_0x5bdce9(0x974)]=function(_0x41a38a,_0x58a121,_0x1ccfe7){const _0x5b8179=_0x5bdce9,_0x2c195c=Math['max'](this[_0x5b8179(0x3c7)](),ImageManager['iconHeight']),_0xc66edf=Math['floor'](_0x2c195c*0x1e),_0x1972be=this['createChildSprite'](_0xc66edf,_0x2c195c),_0x56c6c3=ImageManager[_0x5b8179(0x9e1)]/0x2,_0x5b4257=_0x1972be[_0x5b8179(0x454)]['measureTextWidth'](_0x58a121+'\x20');_0x1972be['bitmap'][_0x5b8179(0x9ac)]=ColorManager[_0x5b8179(0x658)](_0x1ccfe7[_0x5b8179(0x9ac)]),_0x1972be['bitmap'][_0x5b8179(0x683)](_0x58a121,_0x56c6c3,0x0,_0xc66edf-_0x56c6c3,_0x2c195c,_0x5b8179(0x4ed));const _0x117386=Math['round']((_0x2c195c-ImageManager[_0x5b8179(0x8a0)])/0x2),_0x5e7f0a=_0xc66edf/0x2-ImageManager[_0x5b8179(0x9e1)]-_0x5b4257/0x2+_0x56c6c3/0x2,_0x32bed8=ImageManager[_0x5b8179(0x691)](_0x5b8179(0x695)),_0x13dfc1=ImageManager[_0x5b8179(0x9e1)],_0x203a6b=ImageManager[_0x5b8179(0x8a0)],_0x4f0e2a=_0x41a38a%0x10*_0x13dfc1,_0x27369b=Math['floor'](_0x41a38a/0x10)*_0x203a6b;_0x1972be[_0x5b8179(0x454)]['blt'](_0x32bed8,_0x4f0e2a,_0x27369b,_0x13dfc1,_0x203a6b,_0x5e7f0a,_0x117386),this['_flashColor']=_0x1ccfe7['flashColor']||[0x0,0x0,0x0,0x0],this[_0x5b8179(0x4f2)]=JsonEx[_0x5b8179(0x87e)](this[_0x5b8179(0x4f2)]),this[_0x5b8179(0x88c)]=_0x1ccfe7[_0x5b8179(0x43e)]||0x0,_0x1972be['dy']=0x0;},VisuMZ['BattleCore'][_0x5bdce9(0xb54)]=Sprite_Damage['prototype'][_0x5bdce9(0x814)],Sprite_Damage[_0x5bdce9(0x768)][_0x5bdce9(0x814)]=function(_0x3e3ca0,_0x2536e4){const _0x28651c=_0x5bdce9;return _0x2536e4=Math['round'](_0x2536e4*1.2),VisuMZ[_0x28651c(0x61c)][_0x28651c(0xb54)][_0x28651c(0x4b1)](this,_0x3e3ca0,_0x2536e4);},VisuMZ[_0x5bdce9(0x61c)]['Sprite_StateIcon_updateFrame']=Sprite_StateIcon[_0x5bdce9(0x768)][_0x5bdce9(0x46d)],Sprite_StateIcon[_0x5bdce9(0x768)]['updateFrame']=function(){const _0x413984=_0x5bdce9;VisuMZ[_0x413984(0x61c)]['Sprite_StateIcon_updateFrame'][_0x413984(0x4b1)](this),this[_0x413984(0x867)]=this[_0x413984(0xe2)]>0x0?0xff:0x0;},VisuMZ['BattleCore'][_0x5bdce9(0x4f6)]=Sprite_Weapon[_0x5bdce9(0x768)][_0x5bdce9(0x2f4)],Sprite_Weapon[_0x5bdce9(0x768)][_0x5bdce9(0x2f4)]=function(){const _0x104ba6=_0x5bdce9;VisuMZ['BattleCore']['Sprite_Weapon_loadBitmap'][_0x104ba6(0x4b1)](this),this[_0x104ba6(0x454)]&&(this['bitmap'][_0x104ba6(0x302)]=VisuMZ[_0x104ba6(0x61c)][_0x104ba6(0x76e)][_0x104ba6(0xe6)][_0x104ba6(0x338)]);};function Sprite_HpGauge(){const _0x1ea59f=_0x5bdce9;this[_0x1ea59f(0x490)](...arguments);}function _0x1d5c(){const _0x370576=['UNTITLED','forceMotion','drain','MhYTk','dgmWT','playOnceParallelTroopPage','_targetAngle','performSubstitute','WaitForAngle','Game_Temp_requestAnimation','swapEnemyIDs','missed','battleJump','CalcEscapeRaiseJS','canUseItemCommand','_forceAction','_growWholeDuration','ActSeq_Mechanics_StbRemoveExcessActions','#ffffff','randomInt','DvVTZ','createMiss','setupTextPopup','ShowCritical','dimColor1','showHelpWindow','mpHealingFmt','padding','SceneManager_isSceneChanging','ngGlN','drawItemImageListStyle','autoSelectPriority','cameraClamp','hHMkj','alphabetic','HelpEscape','Game_Action_isForRandom','drawSkillCost','qJlpK','Immortal','dimColor2','battler','ResetFocus','getItemDamageAmountLabelOriginal','addedStateObjects','Window_PartyCommand_initialize','equips','requestRefresh','battlerShadowScaleY','PreStartActionJS','KecFr','23909530fHkoYT','battleUIOffsetY','FhHLn','FullActions','processRefresh','executeDamage','float','resizeWindowBorderStyle','isFlipped','actions','setHorrorEffectSettings','displayMiss','displayAddedStates','performMagicEvasion','_battleCoreBattleResumeAfter','XPSpriteYLocation','cDFwj','VisuMZ_2_HorrorEffects','contentsOpacity','ActSeq_BattleLog_DisplayAction','WvWAo','jOmOe','addPartyCommand','performWeaponAnimation','alive\x20friends\x20not\x20user','iVAKe','isCharging','contents','displayEvasion','PAxzX','Scene_Battle_stop','ParseArmorNotetags','applySoftDamageCap','<CUSTOM\x20ACTION\x20SEQUENCE>','partyCommandWindowRectBorderStyle','dead\x20friends','GhUoy','checkTpbInputClose','NJHaT','ActSeq_BattleLog_PopBaseLine','round','_subject','checkShowHideBattleNotetags','BHjNM','isAtbChargingState','BackColor','clearResult','canAddSkillCommand','commandFight','getLastPluginCommandInterpreter','setCursorRect','Window_BattleLog_performActionEnd','exit','getDualWieldTimes','setHelpWindowItem','movement','targetSpritePosition','opacityStart','traitObjects','gMwcE','ELOrc','Sprite_Damage_createChildSprite','BravePoints','floatBattler','NameLegacy','StartName','Mute','weatherPower','freezeMotion','setActionState','_displayBattleCoreTransitionErrorMsg','PostDamageAsTargetJS','_updateClientArea','changePaintOpacity','isFastForward','DefaultSoftScaler','_autoBattle','damageStyle','jYwOe','zoomDuration','sliceMax','nWfbn','requestMotionRefresh','_onceParallelInterpreters','ActSeq_Impact_MotionTrailRemove','Sprite_Actor_updateFrame','addEscapeCommand','SvBattlerSolo-%1-%2','battleMembers','Sprite_Actor_initMembers','fnJTt','cKNpZ','pointX','isForOpponent','NlhdI','AutoMeleeAoE','isForFriend','DamageStyles','itemEffectAddNormalState','zxjOH','command236','fxpkm','damageOffsetY','qiPGw','_appeared','JS\x20%1END\x20BATTLE','PreEndTurnJS','drawIcon','subject','_windowLayer','filter','ParseEnemyNotetags','_deathStateApplied','Radius','setBattleZoom','ActSeq_Target_CurrentIndex','battlerName','playEnemyDamage','battleProjectiles','usePremadeActionSequence','autoSelectLastSelected','getChildIndex','%1Apply%2JS','stateMotionIndex','onSelectAction','oVjKY','ddYtP','OYMfa','BattleManager_onEscapeFailure','softDamageCapRate','bufxG','Window_BattleLog_displayActionResults','create','TpbActiveChangeEnabled','updateBattlebackBitmap2','_iconIndex','canInput','WaitForCamera','vthMB','Actor','isMagicSkill','fillRect','guard','Scene_Battle_skillWindowRect','actorCommandCancelTPB','ActSeq_Camera_Reset','aliveMembers','updateHpGaugePosition','VisuMZ_2_BattleSystemBTB','scpnO','skillId','Scene_Map_initialize','ActSeq_BattleLog_Clear','encDq','isOptionsCommandEnabled','createBattleUIOffsetY','refresh','adjustPosition_ScaleUp','ECehX','AttdG','isMagical','CTGdi','isBorderStylePortraitShown','CNPbV','_battlePortrait','_effectDuration','itemLineRect','KibLH','Ubmso','_damages','logActionList','LOYNP','updateRefresh','WaitForAnimation','%1StartBattleJS','isActionSelectionValid','setupBattleCore','TpGaugeOffsetY','Game_Party_removeActor','wXvhN','_surprise','left','GUARD','commandEscape','transform','ZrnGt','putActiveBattlerOnTop','addSingleSkillCommands','AttackAnimation','xICOH','vXSWp','yHSym','activate','HP_Flat','placeActorName','VisuMZ_3_BoostAction','Window_BattleStatus_initialize','startMove','loadEnemy','_effectsContainer','process_VisuMZ_BattleCore_PluginParams','bind','applyDamageCaps','CmdIconFight','loop','isBattleRefreshRequested','Scene_Boot_onDatabaseLoaded','isAnyoneMoving','attachSpritesToDistortionSprite','lRwOb','length','Wave','_createEffectsContainer','HAEKV','jPKMf','statusTextAutoBattleStyle','fittingHeight','setupZoomBlurImpactFilter','stepFlinch','kkzRg','hide','MpGaugeOffsetY','StatusWindowAttachmentBackOffsetX','changeWeather','process_VisuMZ_BattleCore_jsFunctions','FlinchDistanceX','WaitComplete','JS\x20ESCAPE\x20SUCCESS','LhWBP','aVKnR','TGCku','CastPhysical','CriticalHitRateJS','CheckMapBattleEventValid','Targets2','WaitForZoom','displayReflectionPlayBack','ATTACK','windowPadding','Enemy','clearBattlerMotionTrailData','updateOnceParallelInterpreters','FMwaH','Game_Actor_setup','EDhZb','makeBattleCommand','playReflection','isDying','updateEffectContainers','performActionEnd','linkSprite','wait','soIVQ','Style','_cursorArea','ActionEffect','siGUy','UEQZd','isAnyoneFloating','Oppiz','performDamage','text','ActionItemMsg','makeData','Scene_Battle_updateStatusWindowPosition','pJaXE','drawGauge','pbrjp','_multipliers','_forcedBattleLayout','processRandomizedData','_floatHeight','match','KmIJs','blockWidth','status','ShowEnemyGauge','Opacity','attackSkillId','gainHalfActionsPTB','Scene_Options_maxCommands','ActSeq_Projectile_Animation','_regionBattleback1','makeTargetSelectionMoreVisible','chant','drawItemStyleIconText','isATB','CdHQS','attackAnimationId1','PostStartTurnJS','ActSeq_Mechanics_VariablePopup','ActSeq_Mechanics_PtbConvert','checkCacheKey','BindCommonEventKeysForObj','HomePosJS','statusWindowRectXPStyle','_shadowScaleY','GMJwV','_forcedHomeX','ActSeq_Impact_ZoomBlurTargetCenter','performActionStart','SLUNO','startDamagePopup','_visualHpGauge_JustDied','StatusWindowSkinFilename','updateCallMenu','wxFvi','WSyhV','removeChild','Ipnxb','chantStyle','AnchorY','hpHealingFmt','VapOc','VNWbH','ActSeq_DB_DragonbonesMotionAni','startMotion','placeGauge','addDebuff','Sprite_Enemy_setBattler','ninRk','dmMzP','battleLayoutStyle','actorId','ejsCz','isJumping','mainSpriteHeight','actorCommandWindowRect','ChangeOrderBy','addOptionsCommand','updateAttachmentSprites','addAnimationSpriteToContainer','initVisibility','_homeDuration','_skewDuration','klrRk','Sprite_Actor_moveToStartPosition','BattleStartEvent','drawEnemyName','battleCoreResumeLaunchBattle','mainSpriteWidth','COZxm','registerCommand','ActSeq_Mechanics_AtbGauge','unchanged','SvWeaponMass-%1-%2','Scene_Battle_startActorSelection','isBattleTest','flDsC','removeBuff','actionEffect','svShadow','updateForceAction','bSMsI','dead\x20battlers','motionType','WaitCount1','applyGlobal','targetObjects','NzEPI','Game_Battler_forceAction','ShowHpDmg','adjustPosition_1for1','onFloatEnd','_skewY','GuardFormulaJS','_reflectionTarget','OtBdi','SzczT','ActSeq_Animation_PlayAtCoordinate','InivH','TiAoQ','needsSelection','ActSeq_Mechanics_AddBuffDebuff','hjKEg','unshift','PostDamage%1JS','Window_BattleLog_performCollapse','ActSeq_Impact_MotionTrailCreate','maxCols','createDamageSprite','nkyix','onMoveEnd','_angleEasing','BoostPoints','weaponImageId','current\x20target','noSimilarSTypes','_callSceneOptions','createHelpWindow','Sprite_Enemy_updateCollapse','setBattleCameraOffset','updateFloat','shouldPopupDamage','AnchorX','dhLDy','WIoiU','isClicked','isAnyoneSpinning','_actorWindow','hue','ActSeq_Camera_Offset','cancelActorInput','MDF','startEnemySelection','Amp','BattleManager_startInput','Game_Battler_startTpbTurn','_cache','svAnchorX','CreateActionSequenceTargets','_item','preparePartyRefresh','repeats','makeActionListAutoAttack','PostApplyAsTargetJS','innerWidth','enemy','index','setCustomDamageFormula','endBattle','Scene_Battle_windowAreaHeight','WaitForMovement','rowSpacing','isEnemy','AGI','GALNN','ivvLa','ErzPu','SkewX','aguRV','JS\x20%1START\x20TURN','ActSeq_Mechanics_ActionEffect','ParseAllNotetags','needsActorInputCancel','arRedRate','Window_BattleLog_performMagicEvasion','DefaultHardCap','getHardDamageCap','dqoUe','xnQiQ','regenerateAllBattleCore','KqEGa','%1StartActionJS','getEnemyIdWithName','addCustomCommands','updatePhase','_homeWholeDuration','rsnEM','startTpbTurn','NameAlwaysHidden','VisuMZ_2_BattleSystemFTB','_stateIconSprite','motionIdle','BKDHG','angleDuration','zWMJX','Game_Battler_onTurnEnd','nDcvG','clNcw','ActSeq_Mechanics_DeathBreak','forceSelect','CommandVisible','SideviewSelect','_enemyWindow','ActionEnd','okmaH','isForOpponentBattleCore','_updateCursorArea','OROoP','Sprite_Actor_setActorHome','JYTbf','addShowHpGaugeCommand','Scene_Battle_createCancelButton','VariableHeal','freezeFrame','Game_BattlerBase_eraseState','VisuMZ_1_ElementStatusCore','shadow','performAction','AS\x20TARGET','Destination','setBattler','SXGGa','isLearnedSkill','createJS','VarianceFormulaJS','wzJBu','show','TPB','Game_BattlerBase_refresh','GZUrh','checkSubstitute','JoscD','magicReflection','pjpBu','isSelected','createBattleFieldBattleCore','ActSeq_Horror_NoiseRemove','lineRect','Debuffs','GncZG','updateShadowScale','2845598LgVLRO','QRMDl','_linkedSprite','loadPicture','qnthe','Point','Window_BattleLog_pushBaseLine','kCqnw','_spriteset','filters','autoBattleUseSkills','displayItemMessage','charging','Game_Map_battleback2Name','ActSeq_Horror_TVCreate','MessageWait','DefeatEvent','createAllWindows','LnpQW','dwUjh','ydbNy','PxXLK','STUqN','svBattlerName','fnordRemovedStates','addBattleCoreAutoBattleStyleCommand','Duration','jqemV','Scene_Battle_initialize','DamageDisplay','canBattlerMove','coreEngineRepositionEnemies','Sprite_Enemy_updateStateSprite','setHome','_animation','startJump','textWidth','canGuard','displayAction','playCancel','placeStateIcon','VisuMZ_3_ActSeqCamera','performActionEndMembers','_list','Frame','displayMpDamage','felZn','ApplyImmortal','Game_Action_itemEffectAddAttackState','nOZQa','BattleManager_selectNextCommand','GKkap','battleMove','criticalHitRate','BOGGa','VTyUy','_createCursorSprite','Scene_Battle_createAllWindows','_endBattle','Game_Action_itemEffectAddNormalState','validTargets','getItemDamageAmountTextBattleCore','ActSeq_Mechanics_Multipliers','itemWindowRect','getCommonEventIdWithName','spell','getDamageStyle','NameAlwaysSelectOnly','11888721gokcCI','motionSpeed','WROpU','_waitCount','_waitMode','command119','setupCriticalEffect','alive\x20enemies\x20not\x20target','noaeU','needsSelectionBattleCore','prepareCustomActionSequence','AllowRandomSpeed','BattleCmdList','WaitForOpacity','WaitCount2','_offsetX','drawItem','Scene_Battle_createActorCommandWindow','faceWidth','isOnCurrentMap','Window_BattleLog_performReflection','updateCancel','ShowCosts','cancelTargetSelectionVisibility','kkhdV','njMkL','ActSeq_Horror_NoiseCreate','battleStatusWindowAnimationContainer','ActSeq_Mechanics_BreakShieldChange','alive\x20friends','_back2Sprite','drawItemImageXPStyle','EDrKE','members','createHpGaugeSprite','StateIconOffsetX','createEffectActionSet','removeHorrorEffect','frameCount','ReflectAnimation','Game_BattlerBase_die','CmdStyle','GlbCc','addBattleCoreAutoBattleStartupCommand','_borderPortraitDuration','result','BattleLog','UxZxR','value1','JfdXD','LzKqI','removedBuffs','slice','oIlnX','Spriteset_Battle_createBattleField','_forcedBattlers','battleSpriteSkew','_motionSpeed','ShowFacesListStyle','message4','setActorHome','Window_BattleEnemy_initialize','stepBack','options','startWeaponAnimation','isAnyProjectilePresent','performEvasion','EscapeFail','ActSeq_Angle_WaitForAngle','trueRandomTarget','mhp','nQGQx','cVGgv','createHelpWindowBattleCore','AddOption','ParseItemNotetags','clearForcedGameTroopSettingsBattleCore','return\x200','RuZLA','updateBorderSprite','isFightCommandEnabled','qNKyr','missle','Ekeeh','createEnemyNames','ActSeq_Motion_FreezeMotionFrame','ActSeq_Impact_MotionBlurTarget','VariableDmg','_battlerHue','lukEffectRate','criticalDmgFlat','process_VisuMZ_BattleCore_Notetags','PreApplyAsUserJS','createActors','loadBitmap','WadxZ','parameters','resizeWindowXPStyle','GWrVM','ScaleUp','stypeId','FocusX','AdhXf','FrontViewSelect','Window_ActorCommand_initialize','Xgjtc','attackMotions','_commandNameWindow','smooth','VisuMZ_2_DragonbonesUnion','ShowAddedDebuff','PrioritySortActors','Game_Actor_equips','%1Event','AMuGw','_tpbState','ActSeq_Mechanics_Immortal','partyCommandWindowRectXPStyle','_dragonbonesSpriteContainer','front\x20base','getNextDamagePopup','user','delay','Nkmrn','gainTp','WeaponTypeID','JGGCO','checkShowHideSwitchNotetags','startPartyCommandSelection','children','setSvBattlerSprite','requestMotion','JS\x20%1END\x20ACTION','die','yIBVF','DigitGrouping','getStypeIdWithName','bossCollapse','makeTargetSprites','%1\x20is\x20missing\x20a\x20required\x20plugin.\x0aPlease\x20install\x20%2\x20into\x20the\x20Plugin\x20Manager.','HzQsN','ParseSkillNotetags','CWDQT','dead','_growX','BaseTroopIDs','useDigitGrouping','wholeActionSet','position','updatePositionBattleCore','Window_BattleLog_displayMiss','Linear','reserveCommonEvent','damageContainer','iJXDb','concat','StatusWindowAttachmentBack','lHWEH','setupRgbSplitImpactFilter','actionBattleCoreJS','isOTB','KnHlB','SmoothImage','min','hardDamageCap','itemEffectAddAttackState','BattleManager_startAction','attack','EWQfx','aWNwn','updateBossCollapse','IconStypeNorm','makeSpeed','revertTpbCachedActor','Window_Options_addGeneralOptions','isBattleFlipped','isSTB','KcpkH','VKtPr','ActSeq_BattleLog_UI','loadBattleback1','clearFreezeMotionForWeapons','EKdEJ','_targetIndex','process_VisuMZ_BattleCore_Action_Notetags','hEVie','ActSeq_Mechanics_PtbFullHalfAction','applyImmortal','_scene','spinBattler','Scene_Battle_updateBattleProcess','BattleEndEvent','StartTurnShow','dataId','EFFECT_COMMON_EVENT','XfKGN','MAT','Filename','vQRLa','LUK','_targetSkewX','isSkewing','createLowerLayer','ActSeq_Movement_WaitForSpin','alive\x20actors\x20not\x20target','CmdIconEscape','HoHej','_index','PreDamageAsUserJS','update','removeDamageSprite','JumpToLabel','updateHomeMove','uiInputPosition','VisuMZ_2_BattleSystemOTB','itemHeight','isForRandomBattleCore','PopupPosition','animationWait','_shadowScaleX','updateHelp','stepForward','addedBuffs','isPartyCommandWindowDisabled','addGuardCommand','ActionSkillMsg1','performTpbActiveCheckSwitch','Window_ActorCommand_setup','BEafY','ATK','DistanceY','_battleField','resetBreakShield','updatePosition','QOflf','compareEnemySprite','cjZaa','AddHpGaugeOption','ChargeRate','ActSeq_Movement_FacePoint','PreApplyJS','ROZln','_duration','RtcWd','updateLink','onBattleStartOnceParallels','itemTextAlign','JS\x20%1REGENERATE','yhdvl','isCertainHit','allowRandomSpeed','UIUDn','evalDamageFormulaBattleCore','Slot','skillItemWindowRectMiddle','mdVyh','isRightInputMode','UhXqX','Scene_Battle_startPartyCommandSelection','_animationSprites','PreDamageAsTargetJS','updateJump','OffsetAdjust','adVHG','oPMnD','setAttack','commandNameWindowDrawBackground','RegExp','Scene_Battle_onEnemyOk','hasSvBattler','oUWfk','Game_Actor_makeActionList','VisuMZ_2_WeaponSwapSystem','replace','isMoving','buffRemove','Window_BattleLog_performDamage','Scene_Party','RySQi','_damageContainer','ParseStateNotetags','onHomeMoveEnd','height','endAction','width','HpGaugeOffsetY','updateSpin','initMembers','_pattern','CalcEscapeRatioJS','fight','updateShadowPosition','waitForMovement','performCounter','MJZQk','createDigits','_freezeMotionData','Window_BattleLog_performSubstitute','nxpKx','isForFriendBattleCore','startGrow','CombatLogIcon','uiMenuStyle','BlJRx','snapForBackground','fontSize','Game_BattlerBase_canGuard','collapseType','getBattlePortraitOffsetY','battlelog','onAngleEnd','list','_targetFloatHeight','extraPositionScaledY','iAFna','createEmptyBitmap','command301','1:1','applyForcedGameTroopSettingsBattleCore','DEF','_svBattlerSprite','Game_Interpreter_terminate','_angleDuration','isNextSceneBattleTransitionable','CheckSkillCommandShowSwitches','onBattleEndBattleCore','_enemyIDs','adjustPosition','createString','random','damageOffsetX','NkSWk','_statusWindow','PreApplyAsTargetJS','removeBuffsAuto','CCBjF','getMenuImage','isSpriteVisible','nxXPB','_customDamageFormula','removeState','ConvertCount','ActSeq_Animation_ActionAnimation','clearElementChanges','CalcActionSpeedJS','pattern','setVisibleUI','loadSvEnemy','ActSeq_Mechanics_WaitForEffect','okTargetSelectionVisibility','refreshDimmerBitmap','battleAngle','createActionSequenceProjectile','Game_Battler_performActionStart','playOnceParallelInterpreter','moveToStartPositionBattleCore','commandName','ext','refreshBattlerMotions','currentExt','XXLlc','ActSeq_Motion_RefreshMotion','ptHgY','updateStateSpriteBattleCore','Nxbgr','clearDamagePopup','WaitForProjectile','processForcedAction','_defeatedEnemies','makeHpDamageText','Window_BattleStatus_drawItemImage','_effectType','gFYZw','regionId','itemCri','Damage','autoBattleAtStart','BattleLayout','updateStyleOpacity','applyTargetFilters','PreDamageJS','VuWzD','hasSkill','createCommandVisibleJS','battleDisplayText','BattleManager_processDefeat','performCollapse','arPenRate','_back1Sprite','abs','opponentsUnit','getAttackMotionSlot','ActSeq_Movement_WaitForMovement','applyCritical','EdFlt','tKLvg','changeTurnOrderByCTB','foZor','repositionCancelButtonBorderStyle','bIhaS','isMeleeSingleTargetAction','selectNextCommand','TextColor','lineHeight','12856vqovJn','hitFlat','iterateBattler','_checkOn','tjCbD','Victory','iyDKl','Scene_Battle_createHelpWindow','Sprite_Battler_updateMain','TeSDn','VisuMZ_2_BattleSystemETB','Iauev','StepDistanceX','aHXyG','isNextScene','setEventCallback','ActSeq_Element_ForceElements','khWMP','ActSeq_Skew_WaitForSkew','speed','flashDuration','_damagePopupArray','olTPy','isDTB','QakuE','Game_Action_isForFriend','drawItemBackground','Game_Battler_performEvasion','vRAIv','isGuardWaiting','cancelButtonText','onEncounter','clearActiveWeaponSlot','_lineHeight','VisuMZ_1_MainMenuCore','setHue','getBattlePortraitOffsetX','alive\x20battlers\x20not\x20target','Window_BattleLog_popBaseLine','Game_Battler_performMiss','showNormalAnimation','ActSeq_Animation_AttackAnimation2','bitmap','iRvZi','setHandler','filterArea','waitCount','applyBattleCoreJS','duration','onTurnEnd','lYjfc','BPTyp','restore','ActSeq_Horror_GlitchRemove','forceWeaponAnimation','_growY','startOpacity','SwitchMissEvade','setGuard','BattleManager_cancelActorInput','isPlaytest','updateSkew','NntJt','BattleManager_updatePhase','Game_Map_setupBattleback','bIFWI','startActorCommandSelection','updateFrame','vIfre','displayStartMessages','ActSeq_Movement_Float','_enemy','command283','qfXmX','alive\x20battlers\x20not\x20user','addChildToBack','moveBattlerHomeToPoint','_tempActor','makeTargetsBattleCore','frontviewSpriteY','VisuMZ_1_SkillsStatesCore','_enemyID','Angle','CmHCH','repositionEnemiesByResolution','resetResultSwitches','updateBattlerContainer','createAttachedSprites','HjBUo','ActSeq_Camera_Clamp','Game_Action_clear','BattleManager_processVictory','TimeScale','Window_BattleLog_displayMpDamage','_updateCursorFilterArea','PopupOffsetY','isGrowing','_attackAnimationId','description','sQohB','bottom','ActSeq_Mechanics_BreakShieldReset','initialize','isActor','Turns','isSkillItemWindowsMiddle','Skills','nYQTC','clearActiveWeaponSet','battleEffect','isCustomActionSequence','Variable','PreApply%1JS','commandStyleCheck','makeAutoBattleActions','MOTIONS','compareBattlerSprites','%1EndBattleJS','allowCollapse','PreDamage%1JS','_cancelButton','Zokbu','ShowMissEvasion','onRegeneratePlayStateAnimation','AdjustRect','ActSeq_Movement_WaitForOpacity','PssEu','_targetGrowX','mBieX','isCustomBattleScope','EnableSoftCap','addSkillTypeCommand','onActorOk','updateTargetPosition','ActSeq_Mechanics_DamagePopup','call','Game_Enemy_transform','waitForEffect','OffsetY','nOTsi','_createDamageContainer','ihMqI','refreshActorPortrait','pages','jumpBattler','Game_Action_numRepeats','onGrowEnd','numRepeats','CmdTextAlign','Window_BattleLog_displayEvasion','addAutoBattleCommand','HCSlN','CekhY','_battleCoreBattleStartEvent','qVXbw','SRVNn','QoL','DisablePartyCmd','Scene_Battle_onActorCancel','_baseY','DxwSg','EUixf','getBattlePortraitFilename','gainCurrentActionsFTB','setBattleCameraPoint','numTargets','EmergeText','displayType','isAlive','528mkNTWJ','regenerateAll','useItem','isFloating','cVOCG','DmMaO','_svBattlerData','DefaultSoftCap','yFzbq','auto','waitForFloat','performJump','_lines','changeCtbChargeTime','SkillsStatesCore','actorCommandAutoBattle','applyData','battleback1Name','ActSeq_Mechanics_AnalyzeWeakness','Item-%1-%2','_battleLayoutStyle','OifHx','addLoadListener','eraseState','refreshStatusWindow','Scene_Map_initializeAfter','center','MQqbh','basicGaugesY','DefaultStyle','setSTBExploited','_flashColor','SdscM','updateGrow','targetDistortionSpritePosition','Sprite_Weapon_loadBitmap','PostStartBattleJS','updateOpacity','AutoBattleBgType','battleSpin','tpbActorSwitchConditionsMet','vcpQp','Eblrj','isSkipPartyCommandWindow','wCPeF','StatusWindowAttachmentFrontOffsetY','startSpin','_forcing','battlerShadowScaleX','inputtingAction','revealNewWeaknesses','NzaRz','_executedValue','omRQB','callUpdateHelp','PmJUN','addDamageSprite','EzBmr','siwEF','ActSeq_Target_RandTarget','MotionIdle','kxgbM','command357','OUqDt','hHyXO','isAttack','toString','gmMCy','occasion','FaceDirection','displayBattleCoreTransitionErrorMsg','_homeY','_lastPluginCommandInterpreter','maxTp','createSeparateDamagePopups','targetActionSet','boxHeight','addBuff','ActSeq_Mechanics_BoostPointsStoreData','ZoTyY','ShowAddedState','canMove','ARRAYFUNC','CriticalHitFlat','JYlDk','isVisualHpGaugeDisplayed','preemptive','mVYeA','glJtP','ARRAYNUM','Scene_Battle_startEnemySelection','shift','isAnyoneChangingOpacity','Targets1','%1Damage%2JS','splice','Scene_Battle_startActorCommandSelection','Exploiter','maxBattleMembers','ActSeq_Set_WholeActionSet','globalAlpha','VYQtF','StateIconOffsetY','all\x20targets','AsTarget','_hpGaugeSprite','kiWVi','_actions','startSkew','JHiVj','bitmapWidth','FkiKZ','ScnIJ','onEscapeSuccess','evade','_targetOpacity','growBattler','VisuMZ_2_BattleSystemCTB','TP_Rate','VFQnB','rqWik','_actionInputIndex','changeBattlebacks','%1StartTurnJS','iSWZc','partyCommandWindowRectDefaultStyle','ActionSkillMsg2','PostApplyJS','kfURB','VisuMZ_3_ActSeqImpact','deathStateId','text\x20target','nPnuV','CmdIconAutoBattle','attackAnimationId2','actor%1-portrait','PDVWy','victory','nXWek','Window_BattleLog_performEvasion','expRate','esAhs','anchorY','ActSeq_Animation_CastAnimation','setupActionSet','_commonEventIDs','ActSeq_Camera_FocusTarget','isBattleSys','Interrupt','isDeathStateAffected','_stateSprite','recoverAll','PostEndBattleJS','ActSeq_Weapon_ClearActiveWeapon','constructor','FPKhw','BattleManager_checkSubstitute','KxaNR','canUse','popupDamage','Window_BattleLog_performRecovery','maxLines','updateBitmap','parseForcedGameTroopSettingsBattleCore','onEscapeFailure','windowAreaHeight','effect','currentValue','GroupDigits','Jcdco','KWkjY','Parse_Notetags_TraitObjects','Game_Action_executeDamage','critical','isTurnBased','updatePointAnimations','Sprite_Actor_update','StatusWindowAttachmentFrontOffsetX','isBusy','Formula','VisuMZ_2_BattleSystemSTB','isForAll','ICBvu','param','zdwLX','dying','_skillIDs','HalfActions','ActSeq_Mechanics_Collapse','MANUAL','Spriteset_Battle_createLowerLayer','battleCameraData','clearMotion','displayActionResults','waitForOpacity','%1\x20is\x20incorrectly\x20placed\x20on\x20the\x20plugin\x20list.\x0aIt\x20is\x20a\x20Tier\x20%2\x20plugin\x20placed\x20over\x20other\x20Tier\x20%3\x20plugins.\x0aPlease\x20reorder\x20the\x20plugin\x20list\x20from\x20smallest\x20to\x20largest\x20tier\x20numbers.','_battleCoreAddedElements','createShadowSprite','calcWindowHeight','PEXUc','Game_Interpreter_command301','ActorCmd','DDfGm','updateStatusWindowPosition','addWeaponSwapCommand','updateBattlebackBitmap1','CopyCombatLog','Sprite_Battler_update','BuCxF','callOkHandler','addActor','\x5cI[%1]%2','CriticalDuration','_flinched','Battleback','setup','setSkill','ulkZD','commandNameWindowDrawText','_action','applyResultSwitches','createTargetsJS','iconText','isTpbMainPhase','jUodN','PreEndBattleJS','setupMotionBlurImpactFilter','APmym','stateRate','hnTSe','AutoBattleCancel','adjustWeaponSpriteOffset','Game_Battler_performDamage','helpWindowRect','Scene_Battle_terminate','alterPriority','YhjsZ','DTB','cancel','Mirror','itemRect','_logWindow','ActSeq_Mechanics_BoostPointsChange','gainCurrentActionsETB','Inxms','isPhysical','isBattlerGrounded','Sprite_Battler_isMoving','1WLnTIk','addOnceParallelInterpreter','Reveal','ScaleToFit','optDisplayTp','_opacityWholeDuration','battleUIOffsetX','Buffs','PreStartTurnJS','\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Declare\x20Arguments\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20user\x20=\x20arguments[0];\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20a\x20=\x20user;\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20b\x20=\x20user;\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20targets\x20=\x20arguments[1];\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Process\x20Code\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%1\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20($gameTemp.isPlaytest())\x20console.log(e);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Return\x20Value\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20targets\x20||\x20[];\x0a\x20\x20\x20\x20','RxkOf','DYaLf','FLMKH','retreat','isAlwaysHidden','MIN_SAFE_INTEGER','SwitchCritical','Window_BattleLog_performActionStart','gqlqR','isTriggered','SkillItemMiddleLayout','extraPositionX','displayChangedBuffs','ElementStatusCore','attackStatesRate','Jjmyw','CurrentTurn','Scene_Battle_itemWindowRect','move','checkTpbInputOpen','updateWaitMode','isSceneBattle','PostDamageAsUserJS','xuKGH','gniHR','collapse','ActSeq_Element_NullElements','OFClF','border','_lastAction','getSkillIdWithName','createCommandNameWindow','_motionCount','frameVisible','onDisabledPartyCommandSelection','createAttachmentSprites','skills','ubMca','_borderPortraitTargetX','setupHpGaugeSprite','redraw','CastMagical','ARRAYSTR','ShowCurrentState','Parse_Notetags_Action','_padding','kZdVs','Game_Troop_expTotal','fnPva','isImmortal','CriticalColor','MAXHP','Game_Action_setGuard','ActSeq_Animation_AttackAnimation','onDatabaseLoaded','BCNBx','string','CmdTextAutoBattle','MgvBm','ZTPtp','<%1>\x5cs*([\x5cs\x5cS]*)\x5cs*<\x5c/%1>','cCcWu','HelpAutoBattle','OspPH','actorCommandSingleSkill','Window_BattleLog_update','HelpSkillType','floor','qbbYH','battleCorePreBattleCommonEvent','startTurn','BattleCore','placeTimeGauge','JS\x20%1START\x20BATTLE','MotionSpeed','updateBattleProcess','MeleeDistance','ZQgZl','NameOffsetX','priority','removedStateObjects','EscapeSuccess','dGyUD','SoMgN','MMzso','ActSeq_Movement_WaitForJump','isAlwaysVisible','_cursorSprite','Scene_Battle_selectPreviousCommand','nextActiveWeaponSlot','sliceMin','BattleLogRectJS','Direction','Actor-%1-%2','performMoveToTargets','SvMotionIdleMass-%1-%2','sDEKJ','displayFailure','Targets','PopupDuration','displayCritical','toLowerCase','isTickBased','applyArmorModifiers','MMGcd','eethH','startAction','extraPositionY','turn','isForRandom','updateShadowVisibility','onJumpEnd','+%1\x20MP','alterBreakShield','Game_Battler_clearMotion','ConfigManager_makeData','createTroopNote','isAnyoneGrowing','DDrmz','startActorSelection','power','Rate','BattleManager_makeActionOrders','updateMain','Game_Action_isForOpponent','Strength','isOkEnabled','Exploited','enemyNames','EnableDamageCap','commandAutoBattle','getColor','BattleManager_isTpbMainPhase','alterCost','_opacityDuration','_borderPortraitSprite','STRUCT','checkSceneBattleTransitionable','flashColor','isAnimationPlaying','ActSeq_Animation_ChangeBattlePortrait','EscapeFailureJS','CommonEventID','note','repeatTargets','_homeX','ActSeq_Movement_BattleStep','battleSys','%1EndTurnJS','notFocusValid','_backAttachmentSprite','XdQvo','VisuMZ_4_BreakShields','createBattleFieldContainer','gEOBg','callNextMethod','remove','active','toUpperCase','maxCommands','isBTB','ActSeq_Projectile_Picture','kvgxH','FollowTurn','LnnUy','zIKaP','toUseBoostPoints','getInputButtonString','getBattlePortrait','isEscapeCommandEnabled','isPTB','ARRAYJSON','Window_BattleLog_refresh','djkIU','drawText','VisuMZ_3_ActSeqProjectiles','_regionBattleback2','setFullActionsPTB','JqBtK','isMeleeMultiTargetAction','resetFontSettings','DamageStyleList','isSideView','#%1','ActSeq_Mechanics_OnceParallel','log','PreRegenerateJS','mijni','loadSystem','Game_BattlerBase_addNewState','battleSkew','MP_Rate','IconSet','skew','angle','HdGHH','initBattleCore','_targetSkewY','ActSeq_Movement_Opacity','ActSeq_Zoom_WaitForZoom','command339','ANTI_TINT_UI','ActSeq_ChangeSkew','removeAnimation','not\x20focus','LtONb','isDisplayEmergedEnemies','NjyPq','ActSeq_Mechanics_SwapWeapon','checkShowHideSkillNotetags','CastAnimation','ActSeq_Mechanics_RemoveBuffDebuff','weaponTypes','SvMotionIdleSolo-%1-%2','emerge','Window_BattleLog_performCounter','CriticalHitRate','Index','Scene_ItemBase_applyItem','wUIZQ','FaceAway','terminate','isBattleMember','initBattlePortrait','Game_Interpreter_PluginCommand','ShowCounter','OffsetX','canAttackBattleCore','Window_BattleEnemy_show','createActorCommandWindow','HelpFight','ActSeq_Camera_WaitForCamera','parse','ActionAnimation','DistanceX','makeCommandList','Game_Action_makeTargets','getItemDamageAmountTextOriginal','ZYteD','walk','_makeFontNameText','statusWindowRectBorderStyle','pkaBD','Azayx','Game_Battler_clearDamagePopup','charged','isChanting','isAnimationShownOnBattlePortrait','statusText','Height','Scene_Battle_onEnemyCancel','criticalHitFlat','Game_Interpreter_command283','performMoveToPoint','WaitForJump','setupBattlebackBattleCore','logWindowRect','gKhAJ','VisuMZ_3_WeaknessDisplay','FlinchDistanceY','Hhyja','guardSkillId','COMBATLOG','createContents','startInput','close','nameY','Sprite_Enemy_createStateIconSprite','_isBattlerFlipped','PRE-','animationId','ActionEndUpdate','setMoveEasingType','Window_BattleLog_popupDamage','hZeuN','compatibilityVisible','isActiveTpb','pushBaseLine','AutoNotetag','escape','isAppeared','mainSpriteScaleX','_frame','performRecovery','softDamageCap','skewBattler','CCHzZ','VhAnN','_text','Scene_Map_launchBattle','ActSeq_Movement_HomeMoveToTarget','osiIq','weatherType','XfXsW','sortDamageSprites','xsKiV','fkXVH','edKtj','ActiveTpbOptionsMessage','updateFlip','drawItemStyleIcon','Sprite_Enemy_updateBossCollapse','wzZjf','ShowRemovedState','AutoMeleeSolo','IyYsA','makeTargets','Game_BattlerBase_isStateResist','RkvjS','front\x20center','createAnimationSprite','performCastAnimation','sleep','mainFontSize','battleCommandName','pow','updateCustomActionSequence','friendsUnit','applyGuard','helpAreaHeight','lDYMv','WIXku','cameraDuration','waitForNewLine','_createClientArea','HDiND','ESCAPE','PartyCmd','battlerSprites','BattleManager_initMembers','portrait','_canLose','processBorderActor','performAttack','drawTextEx','ArRedRate','Rvofe','ITEM','isChangingOpacity','evaded','_growEasing','clearBattleRefreshRequest','tvAWZ','battleOpacity','addAutoBattleCommands','itemHit','UCqRj','_actionBattlers','ActSeq_Impact_ColorBreak','kkpJV','currentSymbol','Sprite_AnimationMV_updatePosition','AntiTintUiElements','Scale','enemyId','WaitForNewLine','_targetGrowY','isFrameVisible','createCancelButton','setWaitMode','stop','qkePu','popBaseLine','isCommandEnabled','autoSelect','_armorPenetration','hjySL','dPimh','callOptions','applyFreezeMotionFrames','destroyDamageSprite','_shadowSprite','isTeamBased','svBattlerData','physical','canAlterActionCostPTB','ShowAddedBuff','name','sideview_ui','Sprite_Actor_updateBitmap','battleGrow','EasingType','actionSplicePoint','YNnyJ','aVDoF','hitRate','ActSeq_Element_AddElements','startFloat','gainFullActionsPTB','processVictory','updateStateIconSprite','_inputting','Game_Map_encounterList','addTextToCombatLog','finalizeScale','NameFontSize','split','OOpVU','_enemyNameContainer','_requestRefresh','_weaponImageId','vaCFl','BSjHM','prototype','CUhla','evalDamageFormula','currentAction','apply','BllVt','Settings','Sprite_Battler_updatePosition','IconStypeMagic','isNonSubmenuCancel','message2','PostEndActionJS','changeAtbChargeTime','HtYjb','Game_Action_itemHit','isAutoBattle','Intensity','performFlinch','clUEp','displayRemovedStates','CommandAddOptions','Sprite_Battleback_adjustPosition','ActSeq_Motion_WaitMotionFrame','expTotal','_escapeRatio','setBattlerFlip','map','addChildAt','krxmm','dzRDP','Sprite_Battler_startMove','GRgrf','_phase','WaitForSpin','RequiresDefeat','_baseTexture','setImmortal','GfYKA','ActSeq_Mechanics_EnemyEscape','hpDamage','Game_Action_evalDamageFormula','PreEndActionJS','clearRect','_tpbSceneChangeCacheActor','process_VisuMZ_BattleCore_PreBattleCommonEvent','spriteId','iBzBr','setHelpWindow','selectNextCommandTpb','ARjmR','jrLOj','Scene_Battle_update','BattleManager_startBattle','ApRAB','Sprite_Battler_setBattler','jump','turnCount','WCYwV','WaitForSkew','destroy','JS\x20ESCAPE\x20FAILURE','ActSeq_Horror_GlitchCreate','BZSvM','tQVgO','PostApply%1JS','waitForAnimation','_floatEasing','CXybL','JoWDn','makeDamageValue','tpbCommandFight','displayCounter','addedDebuffs','_flipScaleX','qPoTf','CriticalDmgFlat','xSoTK','Scene_Battle_selectNextCommand','clearBattleCoreData','VIHvm','formula','PostEndTurnJS','ActSeq_Mechanics_OtbOrder','_offsetY','updateWeather','fPMGw','Lgdzc','finishActorInput','isCancelled','JSON','Game_Action_needsSelection','isSkill','12QgOHMH','lIvRx','Scene_Options','ActSeq_ChangeAngle','displayBuffs','nmcLn','ECphz','_updateFilterArea','reduce','alignBattleCoreDamageSprite','createMainSprite','CmdIconItem','TpbGaugeOffsetX','partyCommandWindowRect','TpGaugeOffsetX','fzVaK','idHns','VgXtr','ActSeq_Animation_ShowAnimation','updateCommandNameWindow','applyVariance','Spriteset_Battle_updateActors','hasBeenDefeatedBefore','qWGnR','ornfT','PsFQG','yZKUG','customDamageFormula','CoreEngine','ActSeq_Motion_MotionType','_baseLineStack','_skewWholeDuration','SkewY','CjeMC','clearHorrorEffects','ActSeq_Motion_PerformAction','_battleCoreNoElement','_drawTextOutline','changeBattlerOpacity','hnFcm','ALL\x20SKILLS','blt','setBattleAngle','currentClass','_angleWholeDuration','LzTeo','FlashDuration','hpDamageFmt','Pre','zbXkO','reverse','updateAttachedSprites','removeOnceParallelInterpreter','_jumpMaxHeight','BindCommonEventKeysForGroup','boxWidth','setBattlePortrait','ytEsB','ActionStart','Game_Action_setAttack','GiuYW','autoBattleStyle','ActSeq_Movement_WaitForScale','createInnerPortrait','StartTurnMsg','ActSeq_Zoom_Scale','CJglQ','SceneManager_push','PopupShiftX','mainSpriteScaleY','CastCertain','HYwvp','parent','_jumpHeight','MpGaugeOffsetX','PostStartActionJS','gainBravePoints','makeActionList','_eventId','createStateSprite','createChildSprite','applyHardDamageCap','clearWeaponAnimation','Mechanics','LnaGS','prepareBorderActor','Game_Map_battleback1Name','glitch','onBattleStart','swing','MuHdy','getHalfActionsPTB','Sprite_Battler_damageOffsetX','onBattleStartBattleCore','itHjn','TzIUq','format','hpAffected','_weaponSprite','BreakShields','startBattle','WRKGQ','QGKTq','PopupOffsetX','gMSMl','some','adjustFlippedBattlefield','MygOL','StatusWindowAttachmentFront','helpWindowRectBorderStyle','actorCommandEscape','GIAkU','drawLineText','UDJVR','processEscape','updateShadow','push','cpHiq','visibilityState','_indent','vjGHm','_additionalSprites','kazzK','wwpAH','displayTpDamage','arRedFlat','Spriteset_Battle_update','process_VisuMZ_BattleCore_TraitObject_Notetags','iwnRq','tvAIm','isItem','vPtHE','WaitForFloat','showAnimation','VxmcB','ActSeq_Mechanics_CustomDmgFormula','updateEffectsContainer','isHiddenSkill','rqRPe','measureTextWidth','refreshCursor','xesau','QZlNa','ParseActorNotetags','NameAttachStateIcon','_itemWindow','windowskin','uuffc','initMembersBattleCore','updateUiContainerPosition','Sprite_StateIcon_updateFrame','_commonEventKey','ConfigManager_applyData','adjustPosition_ScaleToFit','ParseClassNotetags','+%1','glSdq','isFTB','magicSkills','QVcYV','VhqIf','commandStyle','ConvertParams','opacity','setText','Ebkmh','Elements','requestDragonbonesAnimation','isSpinning','Setting','isConfused','onEncounterBattleCore','getAttackWeaponAnimationId','RQTKM','makeActionOrders','_lastRegenFrameCount','addAttackCommand','updateShadowBattleCore','ScaleX','battleCommands','mainSprite','pqpAO','isMVAnimation','_immortal','SvrWm','RevertAngle','makeDeepCopy','ActSeq_Impact_ShockwaveEachTargets','Scene_Battle_onActorOk','YfduC','helpAreaBottom','eFQgx','createWeather','3198462hlhGZl','updateEventMain','anchor','ezSrJ','Window_BattleLog_displayCritical','registerDefeatedEnemy','seJDW','_flashDuration','createUIContainer','SvWeaponSolo-%1-%2','qXSgB','onEnemyCancel','applyGlobalCommonEventNotetags','svBattlerShadowVisible','Window_BattleLog_clear','setActiveWeaponSlot','skill','forceAction','dWPhK','updateStateSprite','ForceExploited','_targets','isItemCommandEnabled','addChildToUiContainer','clear','ecQDF','ActSeq_Movement_HomeMoveToPoint','iconHeight','battleCommandIcon','moveBattlerDistance','performReflection','setBattleSkew','SIWLy','custom','_enemyId','PostRegenerateJS','CpYuJ','DisplayAction','removeStatesAuto','buoqC','Sprite_Actor_setBattler','fnSwC','randomTargets','setupDamagePopup','allBattleMembers','undecided','updateAngleCalculations','message1','isSceneChanging','YkSMI','startHomeMove','isGuard','ActSeq_Mechanics_BtbGain','autoBattleWindowRect','vBDCG','hasStaticSvBattler','isShownOnBattlePortrait','_allTargets','createAutoBattleWindow','processPostBattleCommonEvents','CriticalHitMultiplier','selectPreviousCommand','ActSeq_Horror_Clear','setHalfActionsPTB','dMpRT','Sprite_Battler_damageOffsetY','finishActionSet','isFriendly','xOBxo','Sprite_Enemy_initVisibility','checkBattleEnd','ActSeq_Movement_HomeMoveBy','invokeAction','equipSlots','isBypassDamageCap','srZyW','processActorCommandCancelTPB','States','drawItemImagePortraitStyle','Scene_Map_updateCallMenu','OverallFormulaJS','JS\x20%1END\x20TURN','atbInterrupt','isBreakStunned','_activeWeaponSlot','setFrame','bitmapHeight','Hzgjp','ActSeq_Movement_Skew','battleCamera','_actorCommandWindow','_ptbActionCost','visible','SeHHj','dead\x20actors','playEnemyAttack','drawItemStatusXPStyle','gainStoredBoostPoints','isPreviousSceneBattleTransitionable','setTroopPage','launchBattle','UVLSP','Sprite_Actor_updateShadow','command3011','includes','HP_Rate','ActSeq_Movement_FaceDirection','_baseX','clearFreezeMotion','StyleON','MAXMP','process_VisuMZ_BattleCore_BaseTroops','ONkGv','CmdIconOptions','COMBAT\x20LOG','createEnemyNameContainer','YIaXZ','_active','_targetHomeY','isPartyTpbInputtable','VisuMZ_3_SideviewBattleUI','focus','_floatWholeDuration','type','addImmortal','Scene_Battle_commandFight','displaySubstitute','skewDuration','requestAnimation','createActorCommandWindowBattleCore','surprise','battleback2Name','TargetLocation','ShuffleArray','DamageFlat','thrust','StatusWindowSkinHide','isHidden','svBattlerAnchorX','RMorV','updateMotionCount','Game_Battler_onBattleEnd','getDefeatedEnemies','getWtypeIdWithName','gainMp','EzbJx','ClearBattleLog','_uiContainer','animationShouldMirror','Sprite_Enemy_update','deadMembers','alive\x20battlers','scale','_floatDuration','checkAutoCustomActionSequenceNotetagEffect','addFightCommand','Window_BattleLog_performMiss','_animationContainer','isInputting','performActionMotions','isDuringNonLoopingMotion','cameraOffsetDuration','onActorCancel','RNbKa','Game_Interpreter_updateWaitMode','_animationCount','HelpOptions','ForceDeath','trim','drawSingleSkillCost','vOemx','Sprite_Actor_createStateSprite','isOpen','bNJAo','setupBattleCoreData','setupFont','isAnyoneJumping','gradientFillRect','FfybF','worldTransform','dOFVs','ActSeq_Movement_FaceTarget','dVPbY','MaxLines','RJkMO','uldCa','LkHuK','isOptionsCommandAdded','ArPenRate','loadWindowskin','Scene_Battle_createPartyCommandWindow','drawItemStatus','Window_BattleLog_displayTpDamage','xooWO','gDyNs','VisuMZ_2_BattleSystemPTB','ZTlkm','displayHpDamage','messageSpeed','updateStart','_battleCoreForcedElements','dragonbonesData','_jumpDuration','mEfkT','_createCursorArea','BattleManager_onEscapeSuccess','_homeEasing','gqopE','context','bKIft','BattleManager_checkBattleEnd','MMxej','guPEV','maxItems','%1\x27s\x20version\x20does\x20not\x20match\x20plugin\x27s.\x20Please\x20update\x20it\x20in\x20the\x20Plugin\x20Manager.','damage','UTGkA','_partyCommandWindow','WaitForEffect','performMiss','DistanceAdjust','uuceH','Game_Action_applyGlobal','ActionSequence','isAtbCastingState','Sprite_Battler_setHome','moveBattlerHomeDistance','isDamagePopupRequested','BattleManager_startTurn','addSingleSkillCommand','criticalDmgRate','KEPbf','TpbGaugeOffsetY','setActiveWeaponSet','contains','displayReflection','MsXOm','addNewState','BattleVictoryJS','setupIconTextPopup','DxAcg','_battler','indexOf','_dimmerSprite','createBattleUIOffsetX','Width','addCommand','drawItemStatusListStyle','ChantStyle','statusWindowRect','_speed','commandNameWindowCenter','removeImmortal','command301_PreBattleEvent','_currentActor','ShowActorGauge','isTpb','zjJbZ','battlerSmoothImage','forceEscapeSprite','getConfigValue','_battlerContainer','isUndecided','addGeneralOptions','clearOnceParallelInterpreters','icon','innerHeight','AutoBattleOK','clone','commandSymbol','SRKKW','right','Text','Shadow','XPActorCommandLines','StepDuration','anchorX','applyEasing','performSTBExploiter','performAttackSlot','showEnemyAttackAnimation','VisuMZ_4_CombatLog','CANQV','open','sortEnemies','inHomePosition','isDead','kIbIB','_emptyBitmap','CNHDP','yxQlN','BattleManager_endBattle','onOpacityEnd','PopupShiftY','%1EndActionJS','textColor','jXVHV','makeEscapeRatio','traitSet','singleSkill','wMliA','_tpbNeedsPartyCommand','requestFauxAnimation','Game_BattlerBase_initMembers','value','Name','dETAG','drawTextTopAligned','tEujn','_growDuration','ActSeq_Mechanics_RemoveState','battleAnimation','iconIndex','join','removeAnimationFromContainer','mpDamage','JS\x20%1START\x20ACTION','Scene_Battle_logWindowRect','ShowSubstitute','_autoBattleWindow','ActSeq_Impact_ShockwavePoint','Armor-%1-%2','vhNmB','isTpbCharged','Post','Window_BattleLog_displayCurrentState','Game_Battler_regenerateAll','setupBattleback','updateBorderStyle','createPartyCommandWindowBattleCore','759955sdHFZK','updateVisibility','_totalValue','canGuardBattleCore','dlvCN','_preBattleCommonEvent','onBattleEnd','HpGauge','createStateIconSprite','7164976pZGAmJ','isAffectedByBreakShield','createEnemies','updateCollapse','_lastEnemy','processBattleCoreJS','-%1\x20MP','PrioritySortActive','_tempEquipCheck','iconWidth','stbGainInstant','ActSeq_Mechanics_TextPopup','setBattlerBattleCore','_interpreter','isETB','Defeat','Window_ItemList_maxCols','XlYEd','MotionType','_motion','BvhXr','centerFrontViewSprite','skillItemWindowRectBorderStyle','BattleDefeatJS','displayAffectedStatus','_enemySprites','VisuMZ_0_CoreEngine','ZHlIQ','updatePadding','STYPES','turnOrderChangeOTB','inputting','process_VisuMZ_BattleCore_DamageStyles','AttachStateOffsetX','_forcedHomeY','updateScale','canAttack','Actions','StatusWindowSelectableBackHide','KIPWb','removeActor','_skewEasing','OJtOL','visualHpGauge','inBattle','alterChange','isAutoBattleCommandEnabled','_jumpWholeDuration','OlOHX','NYYBC','ShowWeapon','ParseWeaponNotetags','endAnimation','WeyfK','rsuNO','_helpWindow','processDefeat','imlvJ','ztKMk','damageRate','KULFs','SkillItemBorderCols','Game_Troop_setup','casting','aJmIC','addText','VUVjQ','EscapeSuccessJS','_battlerName','<CENTER>%1','Window_BattleLog_performAction','ActSeq_Mechanics_CtbSpeed','ActionCenteredName','_opacityEasing','%1RegenerateJS','_skewX','Chfle','battleFloat','aadJL','autoBattleStart','Sprite_Animation_targetSpritePosition','NewPopupBottom','doesPageHaveOnceParallelStart','_methods','alive\x20enemies\x20not\x20user','isIncludedInEnemyWindow','WaitCount','commandOptions','ActSeq_Mechanics_StbExtraAction','_colorType','_commonEventQueue','isSideButtonLayout','default','cLICQ','wtypeId','DefaultDamageStyle','_enemies','skillTypes','DigitGroupingDamageSprites','VCEwM','GFdyY','createAnimationContainer','moveBattlerToPoint','svBattlerAnchorY','DualWield','BattleManager_inputtingAction','slices','Scene_Battle_helpWindowRect','ceil','StyleOFF','dMGpN','changeAtbCastTime','nOArr','pop','effects','_actorSprites','makeSuccess','isAutoBattleCommandAdded','eEyfD','PARTY','ScaleDown','switchToWeaponType','process_VisuMZ_BattleCore_CreateRegExp','autoMeleeSingleTargetActionSet','loadBattleback2','ActSeq_BattleLog_AddText','BattleManager_onEncounter','ActSeq_Angle_Reset','ArRedFlat','isBuffAffected','StepDistanceY','_mainSprite','addSkillCommands','textSizeEx','max','applyItem','_currentAngle','isForOne','onSkewEnd','autoBattle','statusWindowRectDefaultStyle','GqQdQ','GLVsm','_targetHomeX','battleZoom','setBackgroundType','\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Declare\x20Arguments\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20user\x20=\x20arguments[0];\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20skill\x20=\x20arguments[1];\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20a\x20=\x20user;\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20b\x20=\x20user;\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20visible\x20=\x20true;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Process\x20Code\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20%1\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20($gameTemp.isPlaytest())\x20console.log(e);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Return\x20Value\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20visible;\x0a\x20\x20\x20\x20','origin','MtonW','sQOtE','feuUy','MFzEP','svAnchorY','isBattleCoreTargetScope','_actor','isStateResist','xKFBL','jVfWJ','_cacheTextWidth','setupChild','jVYdD','_stypeIDs','KnmHH','_weather','ShowFailure','xXAgS','setBattlerFacePoint','ActSeq_Set_FinishAction','Parse_Notetags_Targets','kRhUI','XveKp','noise','pXEJt','updateAction','waitForJump','Game_System_initialize','getFullActionsPTB','PortraitScale','item','NameOffsetY','_angleRevertOnFinish','addChild','isCTB','ShowRemovedBuff','IAZaK','createDistortionSprite','bgType','isEffecting','_skillWindow','makeActions','_wtypeIDs','AutoBattle','Nyldi','setupShockwaveImpactFilter','cHWLS','_distortionSprite','alive\x20actors','selectNextActor','textAlign','scope','clamp','ConvertActionSequenceTarget','gRgfl','isAnyoneSkewing','dneln','createKeyJS','PerformAction','extraHeight','_target','11zEcFKE','BattleManager_endAction','oPJrN','process_VisuMZ_BattleCore_Failsafes','Game_Enemy_setup','Game_Action_apply','changeInputWindow','aEwKo','isQueueOptionsMenu','ActSeq_Movement_Jump','attackAnimationIdSlot','createDamageContainer','eBGfb','prev\x20target','_handlers','attackStates','LKghf','moveToStartPosition','skillWindowRect','createBorderStylePortraitSprite','createBattleField','code','weapons','ActSeq_DB_DragonbonesTimeScale','okButtonText','NeTSQ','gaugeLineHeight','bBQge','StartTurnWait','cctjZ','Scene_Battle_start','HJOxm','AbQTG','UVAGr','Window_BattleLog_displayFailure','GxDRp','getAttackMotion','FlashColor','NameAlwaysVisible','alive\x20enemies','resize','ForceRandom','ShowMpDmg','_motionType','pointY','actor','Sprite_Battler_initMembers','Game_Battler_onBattleStart','_frontAttachmentSprite','ZfEoB','sort','refreshMotion','uRLcM','start','setValue','Window_Options_statusText','missile','NextTurn','_branch'];_0x1d5c=function(){return _0x370576;};return _0x1d5c();}Sprite_HpGauge[_0x5bdce9(0x768)]=Object[_0x5bdce9(0xdf)](Sprite_Gauge[_0x5bdce9(0x768)]),Sprite_HpGauge[_0x5bdce9(0x768)][_0x5bdce9(0x56d)]=Sprite_HpGauge,Sprite_HpGauge[_0x5bdce9(0x768)][_0x5bdce9(0x490)]=function(){const _0x5bdcbb=_0x5bdce9;Sprite_Gauge[_0x5bdcbb(0x768)][_0x5bdcbb(0x490)][_0x5bdcbb(0x4b1)](this);},Sprite_HpGauge[_0x5bdce9(0x768)]['gaugeX']=function(){return 0x0;},Sprite_HpGauge[_0x5bdce9(0x768)][_0x5bdce9(0x5fd)]=function(){const _0x5f2690=_0x5bdce9;this[_0x5f2690(0x454)]['clear']();const _0x3eee02=this[_0x5f2690(0x57a)]();!isNaN(_0x3eee02)&&this['drawGauge']();};function Sprite_EnemyName(){this['initialize'](...arguments);}Sprite_EnemyName[_0x5bdce9(0x768)]=Object[_0x5bdce9(0xdf)](Sprite_Name['prototype']),Sprite_EnemyName['prototype'][_0x5bdce9(0x56d)]=Sprite_EnemyName,Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x490)]=function(){const _0x3ebdbf=_0x5bdce9;Sprite_Name[_0x3ebdbf(0x768)]['initialize'][_0x3ebdbf(0x4b1)](this),this[_0x3ebdbf(0x481)]();},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x3b5)]=function(){const _0xcafdc9=_0x5bdce9;Sprite_Name['prototype']['initMembers'][_0xcafdc9(0x4b1)](this),this['opacity']=0x0,this['_linkedSprite']=null,this['anchor']['x']=0.5,this[_0xcafdc9(0x887)]['y']=0x0;},Sprite_EnemyName['prototype'][_0x5bdce9(0x481)]=function(){const _0x3a1c74=_0x5bdce9;VisuMZ[_0x3a1c74(0x61c)][_0x3a1c74(0x76e)][_0x3a1c74(0x14a)]['NameAttachStateIcon']&&('qfXmX'!==_0x3a1c74(0x473)?this[_0x3a1c74(0x197)](_0x3a1c74(0xe9)):(this[_0x3a1c74(0x21f)]=new Sprite_StateIcon(),this[_0x3a1c74(0xa8d)](this['_stateIconSprite'])));},Sprite_EnemyName[_0x5bdce9(0x768)]['bitmapWidth']=function(){const _0x47223c=_0x5bdce9;return Graphics[_0x47223c(0x7fb)];},Sprite_EnemyName[_0x5bdce9(0x768)]['bitmapHeight']=function(){const _0xe96add=_0x5bdce9;return this[_0xe96add(0x44b)]=this[_0xe96add(0x44b)]||Window_Base[_0xe96add(0x768)][_0xe96add(0x429)]()||0x24,this[_0xe96add(0x44b)]*0x4;},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x3c7)]=function(){const _0x4235e0=_0x5bdce9;return VisuMZ[_0x4235e0(0x61c)][_0x4235e0(0x76e)][_0x4235e0(0x14a)]['NameFontSize']||$gameSystem[_0x4235e0(0x70e)]();},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x155)]=function(_0x4ebf63){const _0x228e6f=_0x5bdce9;this[_0x228e6f(0x254)]=_0x4ebf63;},Sprite_EnemyName['prototype'][_0x5bdce9(0x367)]=function(){const _0x57c4a5=_0x5bdce9;Sprite_Name[_0x57c4a5(0x768)][_0x57c4a5(0x367)]['call'](this),this[_0x57c4a5(0x38a)](),this[_0x57c4a5(0x37f)](),this['updateAttachedSprites'](),this[_0x57c4a5(0x4f8)]();},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x5fd)]=function(){const _0x49e86f=_0x5bdce9;this[_0x49e86f(0xa76)]=undefined;const _0x24b959=this[_0x49e86f(0x74e)](),_0x464678=this[_0x49e86f(0x541)](),_0x45c44b=Window_Base[_0x49e86f(0x768)][_0x49e86f(0x429)]();this[_0x49e86f(0x934)](),this['bitmap'][_0x49e86f(0x89d)](),this[_0x49e86f(0x454)][_0x49e86f(0x683)](_0x24b959,0x0,0x0,_0x464678,_0x45c44b,_0x49e86f(0x4ed));},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x38a)]=function(){const _0x3f19a4=_0x5bdce9;if(!this['_linkedSprite'])return;this[_0x3f19a4(0x976)]!==this[_0x3f19a4(0x254)][_0x3f19a4(0x976)]&&this[_0x3f19a4(0x5aa)](this[_0x3f19a4(0x254)][_0x3f19a4(0x976)]);},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x37f)]=function(){const _0xd0ac19=_0x5bdce9;if(!this['_linkedSprite'])return;this[_0xd0ac19(0x44b)]=this['_lineHeight']||Window_Base[_0xd0ac19(0x768)][_0xd0ac19(0x429)](),this['x']=this[_0xd0ac19(0x254)]['_baseX'],this['y']=this[_0xd0ac19(0x254)]['_baseY']-this[_0xd0ac19(0x44b)]*0.5;const _0x12c2d7=VisuMZ[_0xd0ac19(0x61c)][_0xd0ac19(0x76e)]['Enemy'];this['x']+=_0x12c2d7['NameOffsetX']||0x0,this['y']+=_0x12c2d7[_0xd0ac19(0xa8b)]||0x0;},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x7f7)]=function(){const _0xa9bd00=_0x5bdce9;this[_0xa9bd00(0x75b)]();},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x75b)]=function(){const _0x41c2bc=_0x5bdce9;if(!this[_0x41c2bc(0x21f)])return;this[_0x41c2bc(0x976)]!==this[_0x41c2bc(0x21f)][_0x41c2bc(0x976)]&&(_0x41c2bc(0x455)!=='vNxbI'?this[_0x41c2bc(0x21f)][_0x41c2bc(0x5aa)](this[_0x41c2bc(0x976)]):_0x1ef8cd=_0x597540[_0x41c2bc(0x22a)]);const _0x11645a=this[_0x41c2bc(0x276)]();this['_lineHeight']=this[_0x41c2bc(0x44b)]||Window_Base[_0x41c2bc(0x768)][_0x41c2bc(0x429)](),this['_stateIconSprite']['x']=Math['round']((_0x11645a+ImageManager['iconWidth'])/0x2)+0x8,this[_0x41c2bc(0x21f)]['y']=this['_lineHeight']/0x2;const _0x1bc539=VisuMZ['BattleCore'][_0x41c2bc(0x76e)]['Enemy'];this[_0x41c2bc(0x21f)]['x']+=_0x1bc539[_0x41c2bc(0x9f9)]||0x0,this[_0x41c2bc(0x21f)]['y']+=_0x1bc539['AttachStateOffsetY']||0x0;},Sprite_EnemyName[_0x5bdce9(0x768)]['updateOpacity']=function(){const _0x279cab=_0x5bdce9,_0x54b351=this[_0x279cab(0x83a)]();if(_0x54b351&&this[_0x279cab(0x867)]<0xff)this['opacity']+=0x10;else!_0x54b351&&this[_0x279cab(0x867)]>0x0&&(_0x279cab(0x6fe)==='edKtj'?this[_0x279cab(0x867)]-=0x10:this['autoMeleeMultiTargetActionSet'](_0x5eafb4,_0x577582,_0x68400f));},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x83a)]=function(){const _0x677bec=_0x5bdce9;if(this[_0x677bec(0x5d9)]())return![];else{if(!this[_0x677bec(0x976)]){if(_0x677bec(0x54f)!=='iSWZc'){const _0x5e54b6=_0x36eb90[_0x677bec(0x61c)][_0x677bec(0x76e)]['BattleLayout'],_0x57336b=this[_0x677bec(0xad6)](_0x21e59a),_0x48895f=this['itemRect'](_0x12b860),_0x3e7171=_0x1e71c6[_0x677bec(0xb3f)](_0x48895f['x']+(_0x48895f[_0x677bec(0x3b2)]-0x80)/0x2),_0x5da758=this['nameY'](_0x48895f);let _0x4fa56a=_0x3e7171-_0x57bcbc[_0x677bec(0x9e1)]/0x2-0x4,_0x32b701=_0x5da758+_0x42c738[_0x677bec(0x8a0)]/0x2;_0x4fa56a-_0x178a05[_0x677bec(0x9e1)]/0x2<_0x48895f['x']&&(_0x4fa56a=_0x3e7171+_0x475904[_0x677bec(0x9e1)]/0x2-0x4,_0x32b701=_0x5da758-_0x4b9406[_0x677bec(0x8a0)]/0x2);const _0x13a2fd=_0x3e7171,_0x41386f=this[_0x677bec(0x4ef)](_0x48895f);this[_0x677bec(0x61d)](_0x57336b,_0x3e7171+(_0x5e54b6[_0x677bec(0x7d0)]||0x0),_0x5da758+(_0x5e54b6[_0x677bec(0x96d)]||0x0)),this[_0x677bec(0x11d)](_0x57336b,_0x3e7171+(_0x5e54b6['NameOffsetX']||0x0),_0x5da758+(_0x5e54b6[_0x677bec(0xa8b)]||0x0)),this[_0x677bec(0x27a)](_0x57336b,_0x4fa56a+(_0x5e54b6['StateIconOffsetX']||0x0),_0x32b701+(_0x5e54b6[_0x677bec(0x539)]||0x0)),this['placeGauge'](_0x57336b,'hp',_0x13a2fd+(_0x5e54b6['HpGaugeOffsetX']||0x0),_0x41386f+(_0x5e54b6[_0x677bec(0x3b3)]||0x0)),this[_0x677bec(0x198)](_0x57336b,'mp',_0x13a2fd+(_0x5e54b6['MpGaugeOffsetX']||0x0),_0x41386f+this[_0x677bec(0xac3)]()+(_0x5e54b6[_0x677bec(0x138)]||0x0)),_0x31286a[_0x677bec(0x5cf)]&&this[_0x677bec(0x198)](_0x57336b,'tp',_0x13a2fd+(_0x5e54b6[_0x677bec(0x7d2)]||0x0),_0x41386f+this[_0x677bec(0xac3)]()*0x2+(_0x5e54b6['TpGaugeOffsetY']||0x0));}else return![];}else{if(this[_0x677bec(0x976)][_0x677bec(0x9a3)]()){if(_0x677bec(0x962)===_0x677bec(0x939)){let _0x55f22b=this[_0x677bec(0x3de)](_0x43e73a);const _0x2167f9=this[_0x677bec(0x3c7)](),_0x15f1cf=_0x581099[_0x677bec(0x618)](_0x2167f9*0.75);for(let _0x4f3b72=0x0;_0x4f3b72<_0x55f22b['length'];_0x4f3b72++){const _0x588692=this[_0x677bec(0x814)](_0x15f1cf,_0x2167f9);_0x588692[_0x677bec(0x454)][_0x677bec(0x683)](_0x55f22b[_0x4f3b72],0x0,0x0,_0x15f1cf,_0x2167f9,'center'),_0x588692['x']=(_0x4f3b72-(_0x55f22b[_0x677bec(0x12d)]-0x1)/0x2)*_0x15f1cf,_0x588692['dy']=-_0x4f3b72;}}else return![];}else{if(!this[_0x677bec(0x976)][_0x677bec(0x6ed)]())return![];else{if(this[_0x677bec(0x6e8)]())return!![];else{if(this[_0x677bec(0x62b)]())return!![];else{if(this[_0x677bec(0xa2d)]())return!![];else{if(this['opacity']>0x0)return![];}}}}}}}},Sprite_EnemyName['prototype'][_0x5bdce9(0x5d9)]=function(){const _0x21955c=_0x5bdce9;return VisuMZ[_0x21955c(0x61c)]['Settings'][_0x21955c(0x14a)][_0x21955c(0x21d)];},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x6e8)]=function(){return![];},Sprite_EnemyName[_0x5bdce9(0x768)]['isAlwaysVisible']=function(){const _0x38d5d9=_0x5bdce9;return VisuMZ[_0x38d5d9(0x61c)][_0x38d5d9(0x76e)][_0x38d5d9(0x14a)][_0x38d5d9(0xacf)];},Sprite_EnemyName[_0x5bdce9(0x768)]['isIncludedInEnemyWindow']=function(){const _0x2f452b=_0x5bdce9;return VisuMZ[_0x2f452b(0x61c)][_0x2f452b(0x76e)]['Enemy']['NameAlwaysSelectOnly']?this[_0x2f452b(0x976)][_0x2f452b(0x24b)]():SceneManager[_0x2f452b(0x352)][_0x2f452b(0x22b)]&&SceneManager['_scene']['_enemyWindow']['active']&&SceneManager[_0x2f452b(0x352)][_0x2f452b(0x22b)][_0x2f452b(0xa38)][_0x2f452b(0x8ed)](this[_0x2f452b(0x976)]);},Sprite_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x276)]=function(){const _0x42c896=_0x5bdce9;if(!this[_0x42c896(0x976)])return 0x0;if(this[_0x42c896(0xa76)])return this[_0x42c896(0xa76)];const _0x33be77=this['name']();return this[_0x42c896(0x934)](),this[_0x42c896(0xa76)]=this['bitmap'][_0x42c896(0x84f)](_0x33be77)||0x1,this[_0x42c896(0xa76)];},VisuMZ[_0x5bdce9(0x61c)]['Sprite_Battleback_adjustPosition']=Sprite_Battleback[_0x5bdce9(0x768)]['adjustPosition'],Sprite_Battleback[_0x5bdce9(0x768)]['adjustPosition']=function(){const _0x425401=_0x5bdce9,_0x202963=VisuMZ['BattleCore']['Settings'][_0x425401(0x5a9)];if(!_0x202963)return VisuMZ[_0x425401(0x61c)][_0x425401(0x77d)][_0x425401(0x4b1)](this);const _0x45292f=String(_0x202963[_0x425401(0x4f0)])||'MZ';switch(_0x45292f){case'MZ':VisuMZ[_0x425401(0x61c)][_0x425401(0x77d)]['call'](this);break;case _0x425401(0x3d3):this['adjustPosition_1for1']();break;case _0x425401(0x5ce):this[_0x425401(0x85d)]();break;case _0x425401(0xa50):this['adjustPosition_ScaleDown']();break;case _0x425401(0x2f9):this[_0x425401(0xf8)]();break;}},Sprite_Battleback[_0x5bdce9(0x768)][_0x5bdce9(0x1c5)]=function(){const _0x32f9e8=_0x5bdce9;this[_0x32f9e8(0x3b2)]=Graphics['width'],this[_0x32f9e8(0x3b0)]=Graphics[_0x32f9e8(0x3b0)];const _0x279247=0x1;this['scale']['x']=_0x279247,this['scale']['y']=_0x279247,this['x']=0x0,this['y']=0x0;},Sprite_Battleback[_0x5bdce9(0x768)][_0x5bdce9(0x85d)]=function(){const _0x2a3199=_0x5bdce9;this[_0x2a3199(0x3b2)]=Graphics[_0x2a3199(0x3b2)],this[_0x2a3199(0x3b0)]=Graphics[_0x2a3199(0x3b0)];const _0x575900=this[_0x2a3199(0x3b2)]/this['bitmap'][_0x2a3199(0x3b2)],_0x483972=this['height']/this[_0x2a3199(0x454)]['height'],_0x84bde8=Math['max'](_0x575900,_0x483972);this[_0x2a3199(0x91d)]['x']=_0x84bde8,this[_0x2a3199(0x91d)]['y']=_0x84bde8,this['x']=(Graphics['width']-this[_0x2a3199(0x3b2)])/0x2,this['y']=Graphics[_0x2a3199(0x3b0)]-this['height'];},Sprite_Battleback[_0x5bdce9(0x768)]['adjustPosition_ScaleDown']=function(){const _0x32a764=_0x5bdce9;this[_0x32a764(0x3b2)]=Graphics['width'],this[_0x32a764(0x3b0)]=Graphics['height'];const _0x498c01=Math[_0x32a764(0x339)](0x1,this['width']/this[_0x32a764(0x454)][_0x32a764(0x3b2)]),_0x2d86b5=Math[_0x32a764(0x339)](0x1,this[_0x32a764(0x3b0)]/this[_0x32a764(0x454)][_0x32a764(0x3b0)]),_0x263e60=Math[_0x32a764(0xa5e)](_0x498c01,_0x2d86b5);this['scale']['x']=_0x263e60,this[_0x32a764(0x91d)]['y']=_0x263e60,this['x']=(Graphics[_0x32a764(0x3b2)]-this['width'])/0x2,this['y']=Graphics[_0x32a764(0x3b0)]-this['height'];},Sprite_Battleback[_0x5bdce9(0x768)][_0x5bdce9(0xf8)]=function(){const _0x446e22=_0x5bdce9;this[_0x446e22(0x3b2)]=Graphics[_0x446e22(0x3b2)],this[_0x446e22(0x3b0)]=Graphics[_0x446e22(0x3b0)];const _0x196419=Math[_0x446e22(0xa5e)](0x1,this['width']/this[_0x446e22(0x454)][_0x446e22(0x3b2)]),_0xe892a=Math[_0x446e22(0xa5e)](0x1,this[_0x446e22(0x3b0)]/this[_0x446e22(0x454)][_0x446e22(0x3b0)]),_0x39bc13=Math['max'](_0x196419,_0xe892a);this[_0x446e22(0x91d)]['x']=_0x39bc13,this['scale']['y']=_0x39bc13,this['x']=(Graphics['width']-this[_0x446e22(0x3b2)])/0x2,this['y']=Graphics[_0x446e22(0x3b0)]-this[_0x446e22(0x3b0)];},Spriteset_Battle[_0x5bdce9(0x69e)]=VisuMZ[_0x5bdce9(0x61c)]['Settings'][_0x5bdce9(0x40f)][_0x5bdce9(0x735)]??!![],Spriteset_Battle['prototype'][_0x5bdce9(0xb1f)]=function(){const _0x316925=_0x5bdce9;if(!$gameSystem[_0x316925(0x68b)]())return![];return![];},Spriteset_Battle['prototype']['animationBaseDelay']=function(){return 0x0;},Spriteset_Battle[_0x5bdce9(0x768)]['animationNextDelay']=function(){return 0x0;},VisuMZ[_0x5bdce9(0x61c)]['Spriteset_Battle_createLowerLayer']=Spriteset_Battle['prototype'][_0x5bdce9(0x360)],Spriteset_Battle['prototype'][_0x5bdce9(0x360)]=function(){const _0x40b9c0=_0x5bdce9;VisuMZ[_0x40b9c0(0x61c)][_0x40b9c0(0x591)][_0x40b9c0(0x4b1)](this),this[_0x40b9c0(0x884)](),this[_0x40b9c0(0x2ea)]();},VisuMZ['BattleCore'][_0x5bdce9(0x842)]=Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x367)],Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x367)]=function(){const _0x2e9c34=_0x5bdce9;VisuMZ['BattleCore'][_0x2e9c34(0x842)][_0x2e9c34(0x4b1)](this),this['updateUiContainerPosition'](),this['updateWeather']();},Spriteset_Battle[_0x5bdce9(0x768)]['createWeather']=function(){const _0x8c0c23=_0x5bdce9;this['_weather']=new Weather(),this[_0x8c0c23(0x37d)][_0x8c0c23(0xa8d)](this[_0x8c0c23(0xa7b)]);},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x7bc)]=function(){const _0x104247=_0x5bdce9;this[_0x104247(0xa7b)][_0x104247(0x900)]=$gameScreen[_0x104247(0x6f9)](),this[_0x104247(0xa7b)][_0x104247(0x64d)]=$gameScreen['weatherPower']();},Game_Interpreter[_0x5bdce9(0x768)][_0x5bdce9(0xb7b)]=function(_0x561b29){const _0x1b7358=_0x5bdce9;$gameScreen[_0x1b7358(0x13a)](_0x561b29[0x0],_0x561b29[0x1],_0x561b29[0x2]);if(_0x561b29[0x3])this[_0x1b7358(0x156)](_0x561b29[0x2]);return!![];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x6d1)]=Game_Interpreter[_0x5bdce9(0x768)][_0x5bdce9(0x472)],Game_Interpreter[_0x5bdce9(0x768)][_0x5bdce9(0x472)]=function(_0x201709){const _0x3ec35c=_0x5bdce9;return SceneManager[_0x3ec35c(0x5ea)]()?(SceneManager['_scene'][_0x3ec35c(0x25a)][_0x3ec35c(0x54d)](_0x201709[0x0],_0x201709[0x1]),!![]):VisuMZ['BattleCore'][_0x3ec35c(0x6d1)][_0x3ec35c(0x4b1)](this,_0x201709);},Spriteset_Battle[_0x5bdce9(0x768)]['updateBattlebackBitmap']=function(_0x1c78ca,_0x3a70b6){const _0x1db9ff=_0x5bdce9;_0x1c78ca[_0x1db9ff(0x454)]=_0x3a70b6;},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x54d)]=function(_0x4b1754,_0x576812){const _0x57c473=_0x5bdce9;_0x4b1754=_0x4b1754||'',_0x576812=_0x576812||'';if(_0x4b1754===''&&_0x576812===''){if(_0x57c473(0x93b)===_0x57c473(0xae7)){const _0x4d34b3=_0x3c5902['BattleCore']['ConfigManager_makeData'][_0x57c473(0x4b1)](this);return _0x4d34b3[_0x57c473(0x40e)]=this[_0x57c473(0x40e)],_0x4d34b3[_0x57c473(0x25c)]=this[_0x57c473(0x25c)],_0x4d34b3[_0x57c473(0xa03)]=this[_0x57c473(0xa03)],_0x4d34b3;}else _0x4b1754=this['_back1Sprite'][_0x57c473(0x4e4)](),_0x576812=this[_0x57c473(0x2b4)][_0x57c473(0x908)]();}const _0x4e81a8=ImageManager[_0x57c473(0x34a)](_0x4b1754),_0x2d68ec=ImageManager[_0x57c473(0xa54)](_0x576812);_0x4e81a8['addLoadListener'](this[_0x57c473(0x5a0)][_0x57c473(0x124)](this,this[_0x57c473(0x41a)],this['_back2Sprite'],_0x4e81a8,_0x2d68ec));},Spriteset_Battle[_0x5bdce9(0x768)]['updateBattlebackBitmap1']=function(_0x146a2b,_0x562091,_0x356d64,_0x856c13){const _0x239d3f=_0x5bdce9;_0x856c13[_0x239d3f(0x4e9)](this['updateBattlebackBitmap2'][_0x239d3f(0x124)](this,_0x146a2b,_0x562091,_0x356d64,_0x856c13));},Spriteset_Battle['prototype'][_0x5bdce9(0xe1)]=function(_0x161062,_0x8e254f,_0x892fa1,_0x33e38b){const _0x8abdb2=_0x5bdce9;_0x161062[_0x8abdb2(0x454)]=_0x892fa1,_0x8e254f['bitmap']=_0x33e38b,_0x161062[_0x8abdb2(0x3dd)](),_0x8e254f[_0x8abdb2(0x3dd)]();},VisuMZ['BattleCore'][_0x5bdce9(0x2cc)]=Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0xabd)],Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0xabd)]=function(){const _0x548450=_0x5bdce9;VisuMZ['BattleCore']['Spriteset_Battle_createBattleField'][_0x548450(0x4b1)](this),this['createBattleFieldBattleCore']();},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x24c)]=function(){const _0x51b1c1=_0x5bdce9;this[_0x51b1c1(0x66e)](),this[_0x51b1c1(0x88d)](),this[_0x51b1c1(0xa3d)](),this['createDamageContainer'](),this[_0x51b1c1(0x82e)]();},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x66e)]=function(){const _0x46bdcb=_0x5bdce9;this['_battlerContainer']=new Sprite(),this[_0x46bdcb(0x37d)][_0x46bdcb(0xa8d)](this['_battlerContainer']);},Spriteset_Battle[_0x5bdce9(0x768)]['createAnimationContainer']=function(){const _0x57dbe6=_0x5bdce9;this[_0x57dbe6(0x922)]=new Sprite(),Spriteset_Battle[_0x57dbe6(0x69e)]?'PFrgi'!=='aZBUF'?this[_0x57dbe6(0xa8d)](this[_0x57dbe6(0x922)]):_0x12c809=this[_0x57dbe6(0x7e2)][this[_0x57dbe6(0x7e2)][_0x57dbe6(0x12d)]-0x1]:this['_battleField']['addChild'](this[_0x57dbe6(0x922)]);},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0xab4)]=function(){const _0x53c237=_0x5bdce9;this[_0x53c237(0x3ad)]=new Sprite(),this[_0x53c237(0x3ad)]['x']=this[_0x53c237(0x37d)]['x'],this['_damageContainer']['y']=this[_0x53c237(0x37d)]['y'],this[_0x53c237(0xa8d)](this[_0x53c237(0x3ad)]);},Spriteset_Battle[_0x5bdce9(0x768)]['adjustFlippedBattlefield']=function(){const _0x319933=_0x5bdce9;if(!this[_0x319933(0xb1f)]())return;this[_0x319933(0x98a)][_0x319933(0x91d)]['x']=-0x1,this['_battlerContainer']['x']=this[_0x319933(0x37d)][_0x319933(0x3b2)],this['_uiContainer'][_0x319933(0x91d)]['x']=-0x1,this[_0x319933(0x918)]['x']=this[_0x319933(0x37d)][_0x319933(0x3b2)],this[_0x319933(0x922)]['scale']['x']=-0x1,this['_animationContainer']['x']=this[_0x319933(0x37d)][_0x319933(0x3b2)],this['_damageContainer'][_0x319933(0x91d)]['x']=-0x1,this[_0x319933(0x3ad)]['x']=this[_0x319933(0x37d)]['x']+this[_0x319933(0x37d)][_0x319933(0x3b2)];},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x9da)]=function(){const _0x3545cd=_0x5bdce9;Imported[_0x3545cd(0x9f2)]&&this[_0x3545cd(0x271)]()&&(_0x3545cd(0x6a4)===_0x3545cd(0x6a4)?this[_0x3545cd(0x47e)]():this[_0x3545cd(0x8bd)]()?_0xfc671e[_0x3545cd(0x352)]['_statusWindow'][_0x3545cd(0x368)](_0x21b9c8):(this['damageContainer']()['removeChild'](_0x1a804f),this[_0x3545cd(0x104)][_0x3545cd(0x671)](_0x366eaa),_0x20655b[_0x3545cd(0x7a3)]()));const _0x260d83=$gameTroop[_0x3545cd(0x2b7)](),_0x233f92=[];for(const _0x4485e9 of _0x260d83){if(_0x3545cd(0x364)===_0x3545cd(0x364))_0x233f92[_0x3545cd(0x838)](new Sprite_Enemy(_0x4485e9));else{if(!_0x1ec735[_0x3545cd(0x5ea)]())return;_0x31f747['ConvertParams'](_0x252262,_0x4231b5);const _0x4c9a58=_0x541f06[_0x3545cd(0xb48)](),_0x1a080d=_0x207ec7[_0x3545cd(0xb40)],_0x134076=_0x3887b0['JumpToLabel'];if(!_0x4c9a58)return;if(!_0x1a080d)return;_0x1a080d&&_0x1a080d[_0x3545cd(0x9a3)]()&&_0x134076[_0x3545cd(0x673)]()[_0x3545cd(0x92d)]()!==_0x3545cd(0xae4)&&_0x4c9a58['command119']([_0x134076]);}}_0x233f92[_0x3545cd(0xadb)](this[_0x3545cd(0x381)]['bind'](this));for(const _0x2195d9 of _0x233f92){this[_0x3545cd(0x98a)][_0x3545cd(0xa8d)](_0x2195d9);}this[_0x3545cd(0x9f1)]=_0x233f92;},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x2f3)]=function(){const _0x5738bc=_0x5bdce9;this[_0x5738bc(0xa4b)]=[];for(let _0x8bf274=0x0;_0x8bf274<$gameParty['maxBattleMembers']();_0x8bf274++){const _0x5997b5=$gameParty['battleMembers']()[_0x8bf274],_0x74f0cf=new Sprite_Actor();_0x74f0cf['moveToStartPositionBattleCore'](_0x5997b5),_0x74f0cf['setBattler'](_0x5997b5),_0x74f0cf['update'](),this[_0x5738bc(0xa4b)]['push'](_0x74f0cf),this['_battlerContainer'][_0x5738bc(0xa8d)](_0x74f0cf);}},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x70b)]=function(_0x4957dd,_0x217d61,_0x5f0f85,_0x3e6809){const _0x3876b9=_0x5bdce9,_0x3d21c6=this[_0x3876b9(0x87a)](_0x217d61),_0x533b84=new(_0x3d21c6?Sprite_AnimationMV:Sprite_Animation)(),_0x5cc023=this['makeTargetSprites'](_0x4957dd);this[_0x3876b9(0x919)](_0x4957dd[0x0])&&(_0x5f0f85=!_0x5f0f85),_0x533b84[_0x3876b9(0x1c1)]=_0x4957dd,_0x533b84['setup'](_0x5cc023,_0x217d61,_0x5f0f85,_0x3e6809),this[_0x3876b9(0x1a6)](_0x533b84);},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x1a6)]=function(_0x239a6e){const _0x4dc19d=_0x5bdce9;this['isAnimationShownOnBattlePortrait'](_0x239a6e)?this[_0x4dc19d(0x2b1)]()[_0x4dc19d(0xa8d)](_0x239a6e):this[_0x4dc19d(0x922)][_0x4dc19d(0xa8d)](_0x239a6e),this[_0x4dc19d(0x399)][_0x4dc19d(0x838)](_0x239a6e);},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x6cc)]=function(_0x28b50b){const _0xc23001=_0x5bdce9;if(!_0x28b50b)return![];if(!_0x28b50b['_animation'])return![];if(!_0x28b50b['targetObjects'][0x0])return![];if(_0x28b50b[_0xc23001(0x1c1)][0x0][_0xc23001(0x491)]&&!_0x28b50b['targetObjects'][0x0][_0xc23001(0x491)]())return![];if($gameSystem[_0xc23001(0x68b)]())return![];if(!this['battleStatusWindowAnimationContainer']())return![];if(_0x28b50b[_0xc23001(0x56d)]===Sprite_Animation){if(_0x28b50b['_animation'][_0xc23001(0x4d1)]!==0x0)return![];}else{if(_0x28b50b[_0xc23001(0x56d)]===Sprite_AnimationMV){if(_0x28b50b['_animation'][_0xc23001(0x32a)]===0x3)return![];}}return!![];const _0x3418c3=Window_BattleStatus[_0xc23001(0x768)][_0xc23001(0x19d)]();return['xp',_0xc23001(0x71f)][_0xc23001(0x96f)](_0x3418c3);},Spriteset_Battle[_0x5bdce9(0x768)]['battleStatusWindowAnimationContainer']=function(){const _0x57c797=_0x5bdce9;if(!SceneManager['_scene'])return null;if(!SceneManager[_0x57c797(0x352)]['_statusWindow'])return null;if(!SceneManager['_scene'][_0x57c797(0x3e2)][_0x57c797(0x122)])return null;return SceneManager[_0x57c797(0x352)]['_statusWindow'][_0x57c797(0x122)];},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x6a0)]=function(_0x6b7655){const _0x33fe9b=_0x5bdce9;this[_0x33fe9b(0x9bf)](_0x6b7655);for(const _0x5198ed of _0x6b7655[_0x33fe9b(0x1c1)]){_0x5198ed['endAnimation']&&_0x5198ed['endAnimation']();}_0x6b7655[_0x33fe9b(0x7a3)]();},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x9bf)]=function(_0x49790f){const _0x3ff67d=_0x5bdce9;this[_0x3ff67d(0x399)][_0x3ff67d(0x671)](_0x49790f),this[_0x3ff67d(0x6cc)](_0x49790f)?this[_0x3ff67d(0x2b1)]()[_0x3ff67d(0x18f)](_0x49790f):this[_0x3ff67d(0x922)][_0x3ff67d(0x18f)](_0x49790f);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x7d9)]=Spriteset_Battle['prototype']['updateActors'],Spriteset_Battle[_0x5bdce9(0x768)]['updateActors']=function(){const _0x4ab254=_0x5bdce9;VisuMZ['BattleCore'][_0x4ab254(0x7d9)][_0x4ab254(0x4b1)](this),this['updateBattlerContainer']();},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x480)]=function(){const _0x5917fc=_0x5bdce9;this[_0x5917fc(0x98a)]['children'][_0x5917fc(0xadb)](this[_0x5917fc(0x49e)][_0x5917fc(0x124)](this)),this[_0x5917fc(0x115)]();},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x49e)]=function(_0x1b1b1f,_0x25667a){const _0xf8106c=_0x5bdce9;if(VisuMZ[_0xf8106c(0x61c)][_0xf8106c(0x76e)]['Actor'][_0xf8106c(0x305)]){if(_0x1b1b1f['_battler']&&_0x25667a[_0xf8106c(0x976)]){if(_0x1b1b1f[_0xf8106c(0x976)][_0xf8106c(0x491)]()&&_0x25667a[_0xf8106c(0x976)][_0xf8106c(0x203)]())return 0x1;else{if(_0x25667a[_0xf8106c(0x976)][_0xf8106c(0x491)]()&&_0x1b1b1f['_battler'][_0xf8106c(0x203)]())return-0x1;}}}return _0x1b1b1f[_0xf8106c(0x4c9)]!==_0x25667a[_0xf8106c(0x4c9)]?_0x1b1b1f[_0xf8106c(0x4c9)]-_0x25667a[_0xf8106c(0x4c9)]:_0x25667a[_0xf8106c(0x795)]-_0x1b1b1f[_0xf8106c(0x795)];},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x115)]=function(){const _0x2d913d=_0x5bdce9;if(!VisuMZ[_0x2d913d(0x61c)][_0x2d913d(0x76e)]['Actor'][_0x2d913d(0x9df)])return;const _0x4da73c=BattleManager['_subject'];if(_0x4da73c){if(_0x4da73c[_0x2d913d(0x491)]()&&!$gameSystem[_0x2d913d(0x68b)]())return;const _0xc3d64=_0x4da73c['battler']();if(_0xc3d64&&_0x4da73c[_0x2d913d(0x491)]())this[_0x2d913d(0x98a)][_0x2d913d(0xa8d)](_0xc3d64);}},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x836)]=function(){const _0x2b939b=_0x5bdce9;for(const _0x3e1c91 of $gameParty[_0x2b939b(0xed)]()){if(!_0x3e1c91)continue;if(!_0x3e1c91[_0x2b939b(0xb0d)]())continue;_0x3e1c91[_0x2b939b(0xb0d)]()[_0x2b939b(0x988)]=!![],_0x3e1c91['battler']()[_0x2b939b(0x5d8)]();}},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x88d)]=function(){const _0xde24a0=_0x5bdce9;this['_uiContainer']=new Sprite();if(Spriteset_Battle[_0xde24a0(0x69e)]){if('xOBxo'!==_0xde24a0(0x8c9)){if(this['_cache'][_0xde24a0(0x33a)]!==_0x4fe2ad)return this[_0xde24a0(0x1f3)][_0xde24a0(0x33a)];const _0x1ace66=/<DAMAGE CAP:[ ](\d+)>/i,_0xb5c6a1=this[_0xde24a0(0xb51)]()['map'](_0xdb2765=>_0xdb2765&&_0xdb2765[_0xde24a0(0x664)][_0xde24a0(0x16b)](_0x1ace66)?_0x7d41a9(_0x500085['$1']):0x0);let _0x616334=_0xb5c6a1[_0xde24a0(0x12d)]>0x0?_0x37365a[_0xde24a0(0xa5e)](..._0xb5c6a1):0x0;if(_0x616334<=0x0)_0x616334=_0xb46049[_0xde24a0(0x61c)][_0xde24a0(0x76e)][_0xde24a0(0x40d)][_0xde24a0(0x210)];return this[_0xde24a0(0x1f3)]['hardDamageCap']=_0x616334,this[_0xde24a0(0x1f3)][_0xde24a0(0x33a)];}else this[_0xde24a0(0xa8d)](this[_0xde24a0(0x918)]);}else this[_0xde24a0(0x37d)][_0xde24a0(0xa8d)](this['_uiContainer']);SceneManager[_0xde24a0(0x352)][_0xde24a0(0x918)]=this[_0xde24a0(0x918)];},Spriteset_Battle[_0x5bdce9(0x768)]['createEnemyNames']=function(){const _0x20acd5=_0x5bdce9;if(VisuMZ[_0x20acd5(0x61c)][_0x20acd5(0x76e)][_0x20acd5(0x14a)][_0x20acd5(0xb57)])return;this['_enemyNameContainer']=new Sprite(),BattleManager[_0x20acd5(0x89c)](this[_0x20acd5(0x763)]);for(const _0x2325a1 of this[_0x20acd5(0x9f1)]){if(_0x20acd5(0xb3b)===_0x20acd5(0x716))this[_0x20acd5(0x98a)][_0x20acd5(0x317)][_0x20acd5(0xadb)](this[_0x20acd5(0x49e)]['bind'](this)),this[_0x20acd5(0x115)]();else{const _0x4998a0=new Sprite_EnemyName();this[_0x20acd5(0x763)][_0x20acd5(0xa8d)](_0x4998a0),_0x4998a0[_0x20acd5(0x155)](_0x2325a1);}}},Spriteset_Battle['prototype'][_0x5bdce9(0x859)]=function(){const _0x1d8621=_0x5bdce9;if(!this[_0x1d8621(0x3ad)])return;if(!this[_0x1d8621(0x918)])return;const _0x2f0946=Spriteset_Battle['ANTI_TINT_UI']?this[_0x1d8621(0x3ad)]['x']:0x0,_0x591459=Spriteset_Battle[_0x1d8621(0x69e)]?this[_0x1d8621(0x3ad)]['y']:0x0,_0x5bee57=Imported[_0x1d8621(0x27b)]?this[_0x1d8621(0x37d)]['x']:0x0,_0xfd0d92=Imported[_0x1d8621(0x27b)]?this[_0x1d8621(0x37d)]['y']:0x0;this[_0x1d8621(0x918)]['x']=_0x2f0946+_0x5bee57,this[_0x1d8621(0x918)]['y']=_0x591459+_0xfd0d92;},BattleManager['addChildToUiContainer']=function(_0x2cd26b){const _0x311440=_0x5bdce9;if(!SceneManager[_0x311440(0x352)][_0x311440(0x918)])return;SceneManager[_0x311440(0x352)]['_uiContainer'][_0x311440(0xa8d)](_0x2cd26b);},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x585)]=function(){return![];},Spriteset_Battle['prototype'][_0x5bdce9(0x15d)]=function(){const _0x3cb2d0=_0x5bdce9;return this[_0x3cb2d0(0x71d)]()[_0x3cb2d0(0x82d)](_0x16740a=>_0x16740a[_0x3cb2d0(0x4d6)]());},Spriteset_Battle['prototype'][_0x5bdce9(0x935)]=function(){const _0x18db19=_0x5bdce9;return this[_0x18db19(0x71d)]()[_0x18db19(0x82d)](_0x59ba01=>_0x59ba01[_0x18db19(0x1a0)]());},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0x64a)]=function(){const _0x583850=_0x5bdce9;return this[_0x583850(0x71d)]()[_0x583850(0x82d)](_0x401093=>_0x401093[_0x583850(0x48a)]());},Spriteset_Battle[_0x5bdce9(0x768)][_0x5bdce9(0xaa3)]=function(){const _0x2ee818=_0x5bdce9;return this['battlerSprites']()[_0x2ee818(0x82d)](_0x18ef58=>_0x18ef58[_0x2ee818(0x35f)]());},Spriteset_Battle['prototype'][_0x5bdce9(0x1e9)]=function(){const _0x5c4238=_0x5bdce9;return this[_0x5c4238(0x71d)]()['some'](_0x55fdfb=>_0x55fdfb[_0x5c4238(0x86c)]());},Spriteset_Battle[_0x5bdce9(0x768)]['isAnyoneChangingOpacity']=function(){const _0x43d56e=_0x5bdce9;return this[_0x43d56e(0x71d)]()['some'](_0x36f523=>_0x36f523[_0x43d56e(0x727)]());},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x9e8)]=Window_ItemList['prototype'][_0x5bdce9(0x1d6)],Window_ItemList[_0x5bdce9(0x768)][_0x5bdce9(0x1d6)]=function(){const _0x521c93=_0x5bdce9;if(SceneManager['isSceneBattle']()){if(_0x521c93(0x950)!=='MVxiu'){if(SceneManager[_0x521c93(0x352)][_0x521c93(0x19d)]()===_0x521c93(0x5f1)){if('YcQQQ'!=='YcQQQ')_0x3e2ad9[_0x521c93(0x61c)][_0x521c93(0x85a)][_0x521c93(0x4b1)](this),this[_0x521c93(0x867)]=this[_0x521c93(0xe2)]>0x0?0xff:0x0;else return VisuMZ[_0x521c93(0x61c)]['Settings']['BattleLayout'][_0x521c93(0xa15)];}else{if(_0x521c93(0x847)!=='dZxXY')return VisuMZ[_0x521c93(0x61c)][_0x521c93(0x76e)]['BattleLayout']['SkillItemStandardCols'];else{this[_0x521c93(0x21f)][_0x521c93(0x867)]=0x0;return;}}}else _0x3faf55[_0x521c93(0xadf)](_0x10ea24[_0x521c93(0x235)],0x0);}else{if(_0x521c93(0xb68)!=='KHdWi')return VisuMZ[_0x521c93(0x61c)][_0x521c93(0x9e8)][_0x521c93(0x4b1)](this);else{if(this['battler']())this[_0x521c93(0xb0d)]()['refreshMotion']();}}},VisuMZ['BattleCore']['Window_SkillList_maxCols']=Window_SkillList['prototype'][_0x5bdce9(0x1d6)],Window_SkillList[_0x5bdce9(0x768)][_0x5bdce9(0x1d6)]=function(){const _0x3853a4=_0x5bdce9;return SceneManager[_0x3853a4(0x5ea)]()?SceneManager['_scene'][_0x3853a4(0x19d)]()==='border'?_0x3853a4(0x622)!==_0x3853a4(0x622)?_0x17ab28['BattleCore'][_0x3853a4(0xae0)][_0x3853a4(0x4b1)](this,_0x5c1edb):VisuMZ[_0x3853a4(0x61c)][_0x3853a4(0x76e)][_0x3853a4(0x40f)]['SkillItemBorderCols']:VisuMZ['BattleCore'][_0x3853a4(0x76e)][_0x3853a4(0x40f)]['SkillItemStandardCols']:VisuMZ['BattleCore']['Window_SkillList_maxCols']['call'](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x344)]=Window_Options[_0x5bdce9(0x768)]['addGeneralOptions'],Window_Options[_0x5bdce9(0x768)][_0x5bdce9(0x98c)]=function(){const _0x2201b9=_0x5bdce9;VisuMZ[_0x2201b9(0x61c)][_0x2201b9(0x344)][_0x2201b9(0x4b1)](this),this[_0x2201b9(0x72d)](),this[_0x2201b9(0x233)]();},Window_Options[_0x5bdce9(0x768)][_0x5bdce9(0x72d)]=function(){const _0x15613a=_0x5bdce9;VisuMZ[_0x15613a(0x61c)][_0x15613a(0x76e)]['AutoBattle']['AddOption']&&(_0x15613a(0x7f1)==='LzTeo'?(this['addBattleCoreAutoBattleStartupCommand'](),this[_0x15613a(0x26b)]()):this[_0x15613a(0x720)]=!![]);},Window_Options[_0x5bdce9(0x768)][_0x5bdce9(0x233)]=function(){const _0x24375c=_0x5bdce9;if(!VisuMZ['BattleCore']['Settings'][_0x24375c(0x9d6)][_0x24375c(0x383)])return;const _0x3fd171=TextManager['visualHpGauge'],_0x4c7160=_0x24375c(0xa03);this['addCommand'](_0x3fd171,_0x4c7160);},Window_Options[_0x5bdce9(0x768)][_0x5bdce9(0x2c1)]=function(){const _0x57f647=_0x5bdce9,_0x258775=TextManager[_0x57f647(0xa27)],_0x58a242=_0x57f647(0x40e);this[_0x57f647(0x97b)](_0x258775,_0x58a242);},Window_Options[_0x5bdce9(0x768)]['addBattleCoreAutoBattleStyleCommand']=function(){const _0x1c9284=_0x5bdce9,_0x49e306=TextManager[_0x1c9284(0x801)],_0x4ad953='autoBattleUseSkills';this[_0x1c9284(0x97b)](_0x49e306,_0x4ad953);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xae0)]=Window_Options[_0x5bdce9(0x768)][_0x5bdce9(0x6cd)],Window_Options[_0x5bdce9(0x768)][_0x5bdce9(0x6cd)]=function(_0x47dbe6){const _0x21d645=_0x5bdce9,_0x4be480=this[_0x21d645(0x992)](_0x47dbe6);if(_0x4be480===_0x21d645(0x25c)){if(_0x21d645(0x4d7)!==_0x21d645(0x4d7))_0x1527d1['BattleCore']['Window_BattleLog_popupDamage'][_0x21d645(0x4b1)](this,_0x2b3786),this[_0x21d645(0x670)]();else return this[_0x21d645(0x132)]();}else return VisuMZ['BattleCore'][_0x21d645(0xae0)][_0x21d645(0x4b1)](this,_0x47dbe6);},Window_Options[_0x5bdce9(0x768)][_0x5bdce9(0x132)]=function(){const _0x53ca50=_0x5bdce9,_0x4cbd0d=VisuMZ['BattleCore'][_0x53ca50(0x76e)][_0x53ca50(0xa97)],_0x3476c4=this[_0x53ca50(0x989)]('autoBattleUseSkills');return _0x3476c4?_0x4cbd0d[_0x53ca50(0x8f2)]:_0x4cbd0d[_0x53ca50(0xa45)];},Window_ShopStatus[_0x5bdce9(0x768)]['getItemDamageAmountLabelBattleCore']=function(){const _0x1c107e=_0x5bdce9,_0x350656=DataManager[_0x1c107e(0x294)](this[_0x1c107e(0x1f6)]),_0x229a71=VisuMZ[_0x1c107e(0xb78)][_0x350656];if(!_0x229a71)return this[_0x1c107e(0xb0f)]();const _0x5144ac='DamageType%1'[_0x1c107e(0x824)](this[_0x1c107e(0x1f6)][_0x1c107e(0x95c)]['type']),_0x13654c=[null,TextManager['hp'],TextManager['mp'],TextManager['hp'],TextManager['mp'],TextManager['hp'],TextManager['mp']][this['_item']['damage'][_0x1c107e(0x900)]];return _0x229a71[_0x5144ac][_0x1c107e(0x824)](_0x13654c);},Window_ShopStatus[_0x5bdce9(0x768)][_0x5bdce9(0x28f)]=function(){const _0x3b5638=_0x5bdce9,_0x43ba70=DataManager[_0x3b5638(0x294)](this[_0x3b5638(0x1f6)]),_0xd04f2c=VisuMZ[_0x3b5638(0xb78)][_0x43ba70];if(!_0xd04f2c)return this[_0x3b5638(0x6c2)]();return _0xd04f2c[_0x3b5638(0x26f)][_0x3b5638(0x4b1)](this);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xb11)]=Window_PartyCommand['prototype'][_0x5bdce9(0x490)],Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x490)]=function(_0x2aa01f){const _0x2c6902=_0x5bdce9;VisuMZ[_0x2c6902(0x61c)][_0x2c6902(0xb11)][_0x2c6902(0x4b1)](this,_0x2aa01f),this['createCommandNameWindow'](_0x2aa01f);},Window_PartyCommand['prototype'][_0x5bdce9(0x5f4)]=function(_0x429cd7){const _0x13f90b=_0x5bdce9,_0x487350=new Rectangle(0x0,0x0,_0x429cd7[_0x13f90b(0x3b2)],_0x429cd7[_0x13f90b(0x3b0)]);this[_0x13f90b(0x301)]=new Window_Base(_0x487350),this[_0x13f90b(0x301)][_0x13f90b(0x867)]=0x0,this['addChild'](this[_0x13f90b(0x301)]),this[_0x13f90b(0x7d7)]();},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x509)]=function(){const _0x1ba28a=_0x5bdce9;Window_Command[_0x1ba28a(0x768)]['callUpdateHelp'][_0x1ba28a(0x4b1)](this);if(this['_commandNameWindow'])this['updateCommandNameWindow']();},Window_PartyCommand[_0x5bdce9(0x768)]['updateCommandNameWindow']=function(){const _0x115337=_0x5bdce9,_0x50a65b=this[_0x115337(0x301)];_0x50a65b['contents'][_0x115337(0x89d)]();const _0x103b29=this['commandStyleCheck'](this['index']());if(_0x103b29===_0x115337(0x98e)&&this[_0x115337(0x95a)]()>0x0){const _0x4534e2=this[_0x115337(0x101)](this[_0x115337(0x1fd)]());let _0x413c28=this['commandName'](this[_0x115337(0x1fd)]());_0x413c28=_0x413c28[_0x115337(0x3a7)](/\\I\[(\d+)\]/gi,''),_0x50a65b[_0x115337(0x689)](),this[_0x115337(0x3a0)](_0x413c28,_0x4534e2),this[_0x115337(0x5ad)](_0x413c28,_0x4534e2),this[_0x115337(0x980)](_0x413c28,_0x4534e2);}},Window_PartyCommand['prototype'][_0x5bdce9(0x3a0)]=function(_0x5c6888,_0x46db08){},Window_PartyCommand[_0x5bdce9(0x768)]['commandNameWindowDrawText']=function(_0x3cb958,_0x5bed9d){const _0x373ba7=_0x5bdce9,_0x167cc=this[_0x373ba7(0x301)];_0x167cc[_0x373ba7(0x683)](_0x3cb958,0x0,_0x5bed9d['y'],_0x167cc[_0x373ba7(0x1fb)],_0x373ba7(0x4ed));},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x980)]=function(_0x3e03df,_0x18f9a0){const _0xd792bc=_0x5bdce9,_0x74cef4=this[_0xd792bc(0x301)],_0x17cbbc=$gameSystem[_0xd792bc(0x149)](),_0x4930f0=_0x18f9a0['x']+Math['floor'](_0x18f9a0[_0xd792bc(0x3b2)]/0x2)+_0x17cbbc;_0x74cef4['x']=_0x74cef4[_0xd792bc(0x3b2)]/-0x2+_0x4930f0,_0x74cef4['y']=Math[_0xd792bc(0x618)](_0x18f9a0[_0xd792bc(0x3b0)]/0x2);},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x6c0)]=function(){const _0x499d32=_0x5bdce9;this[_0x499d32(0x920)](),this['addAutoBattleCommand'](),this[_0x499d32(0x218)](),this[_0x499d32(0x1a4)](),this[_0x499d32(0xb6d)]();},Window_PartyCommand['prototype'][_0x5bdce9(0x920)]=function(){const _0x1a2910=_0x5bdce9,_0x3c4e2a=this[_0x1a2910(0x865)](),_0x371e26=VisuMZ[_0x1a2910(0x61c)]['Settings'][_0x1a2910(0x71c)][_0x1a2910(0x126)],_0x4fa260=_0x3c4e2a===_0x1a2910(0x160)?TextManager[_0x1a2910(0x3b8)]:'\x5cI[%1]%2'[_0x1a2910(0x824)](_0x371e26,TextManager[_0x1a2910(0x3b8)]),_0x3d79f5=this[_0x1a2910(0x2e6)]();this['addCommand'](_0x4fa260,'fight',_0x3d79f5);},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x2e6)]=function(){return!![];},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x4c0)]=function(){const _0x5ea721=_0x5bdce9;if(!this[_0x5ea721(0xa4d)]())return;const _0x5960b6=this[_0x5ea721(0x865)](),_0xa765e1=VisuMZ[_0x5ea721(0x61c)][_0x5ea721(0x76e)][_0x5ea721(0x71c)]['CmdIconAutoBattle'],_0x3623d4=_0x5960b6===_0x5ea721(0x160)?TextManager['autoBattle']:_0x5ea721(0x5a6)[_0x5ea721(0x824)](_0xa765e1,TextManager[_0x5ea721(0xa63)]),_0x4afdd7=this['isAutoBattleCommandEnabled']();this[_0x5ea721(0x97b)](_0x3623d4,'autoBattle',_0x4afdd7);},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0xa4d)]=function(){const _0x1cd506=_0x5bdce9;return VisuMZ['BattleCore']['Settings'][_0x1cd506(0x71c)]['CommandAddAutoBattle'];},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0xa06)]=function(){return!![];},Window_PartyCommand['prototype'][_0x5bdce9(0x218)]=function(){},Window_PartyCommand['prototype'][_0x5bdce9(0x1a4)]=function(){const _0x3212a9=_0x5bdce9;if(!this['isOptionsCommandAdded']())return;const _0x2c9116=this['commandStyle'](),_0x215927=VisuMZ[_0x3212a9(0x61c)][_0x3212a9(0x76e)][_0x3212a9(0x71c)][_0x3212a9(0x8f6)],_0x4a8b54=_0x2c9116===_0x3212a9(0x160)?TextManager[_0x3212a9(0x2d5)]:_0x3212a9(0x5a6)[_0x3212a9(0x824)](_0x215927,TextManager[_0x3212a9(0x2d5)]),_0x167f66=this[_0x3212a9(0xf5)]();this['addCommand'](_0x4a8b54,_0x3212a9(0x2d5),_0x167f66);},Window_PartyCommand['prototype'][_0x5bdce9(0x940)]=function(){const _0x259da7=_0x5bdce9;return VisuMZ[_0x259da7(0x61c)][_0x259da7(0x76e)][_0x259da7(0x71c)][_0x259da7(0x77c)];},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0xf5)]=function(){return!![];},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0xb6d)]=function(){const _0x56c8a6=_0x5bdce9,_0x114d8c=this['commandStyle'](),_0x319052=VisuMZ['BattleCore'][_0x56c8a6(0x76e)]['PartyCmd'][_0x56c8a6(0x363)],_0x4a01ac=_0x114d8c===_0x56c8a6(0x160)?TextManager[_0x56c8a6(0x6ec)]:_0x56c8a6(0x5a6)[_0x56c8a6(0x824)](_0x319052,TextManager[_0x56c8a6(0x6ec)]),_0x379728=this[_0x56c8a6(0x67e)]();this[_0x56c8a6(0x97b)](_0x4a01ac,_0x56c8a6(0x6ec),_0x379728);},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x67e)]=function(){return BattleManager['canEscape']();},Window_PartyCommand[_0x5bdce9(0x768)]['itemTextAlign']=function(){const _0x540bc9=_0x5bdce9;return VisuMZ[_0x540bc9(0x61c)][_0x540bc9(0x76e)][_0x540bc9(0x71c)][_0x540bc9(0x4be)];},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x2a6)]=function(_0x557c3d){const _0x2423d6=_0x5bdce9,_0x5d120b=this[_0x2423d6(0x49b)](_0x557c3d);if(_0x5d120b==='iconText')this['drawItemStyleIconText'](_0x557c3d);else _0x5d120b===_0x2423d6(0x98e)?this[_0x2423d6(0x701)](_0x557c3d):Window_Command['prototype'][_0x2423d6(0x2a6)][_0x2423d6(0x4b1)](this,_0x557c3d);},Window_PartyCommand['prototype'][_0x5bdce9(0x865)]=function(){const _0x10d565=_0x5bdce9;return VisuMZ[_0x10d565(0x61c)][_0x10d565(0x76e)][_0x10d565(0x71c)][_0x10d565(0x2bf)];},Window_PartyCommand['prototype'][_0x5bdce9(0x49b)]=function(_0x3f6651){const _0x8e5ebb=_0x5bdce9;if(_0x3f6651<0x0)return'text';const _0x55c77c=this['commandStyle']();if(_0x55c77c!==_0x8e5ebb(0x4dc)){if(_0x8e5ebb(0x205)===_0x8e5ebb(0x324))this[_0x8e5ebb(0x9dd)](_0x8e5ebb(0x9ef)),_0x46c124['BattleCore'][_0x8e5ebb(0x417)][_0x8e5ebb(0x4b1)](this),this['processPostBattleCommonEvents']('Defeat');else return _0x55c77c;}else{if(this['maxItems']()>0x0){if(_0x8e5ebb(0x971)===_0x8e5ebb(0x971)){const _0x5368ca=this[_0x8e5ebb(0x3fa)](_0x3f6651);if(_0x5368ca[_0x8e5ebb(0x16b)](/\\I\[(\d+)\]/i)){if('EDhZb'===_0x8e5ebb(0x14f)){const _0x1707f4=this[_0x8e5ebb(0x101)](_0x3f6651),_0x3286bd=this[_0x8e5ebb(0xa5d)](_0x5368ca)[_0x8e5ebb(0x3b2)];if(_0x3286bd<=_0x1707f4['width'])return _0x8e5ebb(0x5b1);else{if(_0x8e5ebb(0x3d0)!==_0x8e5ebb(0x3d0))this[_0x8e5ebb(0x4a0)]()?_0x578a02['BattleCore'][_0x8e5ebb(0x8ca)][_0x8e5ebb(0x4b1)](this):(this[_0x8e5ebb(0xb7f)]=!this[_0x8e5ebb(0x471)][_0x8e5ebb(0x90e)](),!this['_appeared']&&(this[_0x8e5ebb(0x867)]=0x0));else return _0x8e5ebb(0x98e);}}else this[_0x8e5ebb(0x4a2)]['x']=_0x488589[_0x8e5ebb(0x3b2)]-(_0x25a558[_0x8e5ebb(0x3b2)]-_0x5b7dfc[_0x8e5ebb(0x7fb)])/0x2-this[_0x8e5ebb(0x4a2)]['width']-0x4;}}else{let _0x1ebf8d=[];return this[_0x8e5ebb(0xa71)]()?_0x1ebf8d=this['makeTargetsBattleCore']():_0x1ebf8d=_0x36447d[_0x8e5ebb(0x61c)][_0x8e5ebb(0x6c1)][_0x8e5ebb(0x4b1)](this),_0x1ebf8d=this[_0x8e5ebb(0x411)](_0x1ebf8d),_0x1ebf8d;}}}return'text';},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x178)]=function(_0x56d0a4){const _0x4a5312=_0x5bdce9,_0x518408=this[_0x4a5312(0x101)](_0x56d0a4),_0x3960b1=this[_0x4a5312(0x3fa)](_0x56d0a4),_0x27d595=this[_0x4a5312(0xa5d)](_0x3960b1)['width'];this[_0x4a5312(0xb60)](this[_0x4a5312(0x740)](_0x56d0a4));const _0x540362=this[_0x4a5312(0x38c)]();if(_0x540362===_0x4a5312(0x994))this[_0x4a5312(0x723)](_0x3960b1,_0x518408['x']+_0x518408[_0x4a5312(0x3b2)]-_0x27d595,_0x518408['y'],_0x27d595);else{if(_0x540362===_0x4a5312(0x4ed)){if(_0x4a5312(0xae8)===_0x4a5312(0xae8)){const _0x15203a=_0x518408['x']+Math[_0x4a5312(0x618)]((_0x518408[_0x4a5312(0x3b2)]-_0x27d595)/0x2);this['drawTextEx'](_0x3960b1,_0x15203a,_0x518408['y'],_0x27d595);}else{if(this[_0x4a5312(0x38f)]())return _0x4bad3b;const _0x3afaff=this[_0x4a5312(0xb83)](),_0x13307c=_0x33d3f6;let _0x490ae4=[],_0x410e6f=[];_0x490ae4['push'](this[_0x4a5312(0x742)]['arPenFlat'],this[_0x4a5312(0x742)]['arRedFlat']),_0x410e6f[_0x4a5312(0x838)](this[_0x4a5312(0x742)]['arPenRate'],this[_0x4a5312(0x742)]['arRedRate']);const _0x599941=this[_0x4a5312(0x5c8)]()?/<ARMOR REDUCTION:[ ](\d+\.?\d*)>/i:/<MAGIC REDUCTION:[ ](\d+\.?\d*)>/i,_0x5d6796=this[_0x4a5312(0x5c8)]()?/<ARMOR REDUCTION:[ ](\d+\.?\d*)([%%])>/i:/<MAGIC REDUCTION:[ ](\d+\.?\d*)([%%])>/i,_0x37e40b=this[_0x4a5312(0x5c8)]()?/<ARMOR PENETRATION:[ ](\d+\.?\d*)>/i:/<MAGIC PENETRATION:[ ](\d+\.?\d*)>/i,_0x53d00a=this[_0x4a5312(0x5c8)]()?/<ARMOR PENETRATION:[ ](\d+\.?\d*)([%%])>/i:/<MAGIC PENETRATION:[ ](\d+\.?\d*)([%%])>/i;return _0x490ae4=_0x490ae4[_0x4a5312(0x331)](_0x13307c['traitObjects']()[_0x4a5312(0x782)](_0x553372=>_0x553372&&_0x553372[_0x4a5312(0x664)][_0x4a5312(0x16b)](_0x599941)?_0x37365e(_0x54c8f3['$1']):0x0)),_0x410e6f=_0x410e6f[_0x4a5312(0x331)](_0x13307c['traitObjects']()[_0x4a5312(0x782)](_0x38d8a4=>_0x38d8a4&&_0x38d8a4[_0x4a5312(0x664)][_0x4a5312(0x16b)](_0x5d6796)?_0x31a51a(_0x50afdc['$1'])/0x64:0x0)),_0x490ae4=_0x490ae4[_0x4a5312(0x331)](_0x3afaff[_0x4a5312(0xb51)]()[_0x4a5312(0x782)](_0x19975a=>_0x19975a&&_0x19975a['note'][_0x4a5312(0x16b)](_0x37e40b)?_0x4643dc(_0x18b0d1['$1']):0x0)),_0x410e6f=_0x410e6f[_0x4a5312(0x331)](_0x3afaff['traitObjects']()[_0x4a5312(0x782)](_0x234479=>_0x234479&&_0x234479['note']['match'](_0x53d00a)?_0x15a533(_0x168289['$1'])/0x64:0x0)),this['item']()[_0x4a5312(0x664)][_0x4a5312(0x16b)](_0x37e40b)&&_0x490ae4[_0x4a5312(0x838)](_0x5cfb5f(_0x3894ed['$1'])),this['item']()[_0x4a5312(0x664)]['match'](_0x53d00a)&&_0x410e6f[_0x4a5312(0x838)](_0x27f435(_0x426835['$1'])),_0x24f38d=_0x490ae4['reduce']((_0x3b516a,_0x5ea1f5)=>_0x3b516a-_0x5ea1f5,_0x16d0fd),_0x50f567>0x0&&(_0x40529c=_0x410e6f[_0x4a5312(0x7cc)]((_0x25cc1f,_0x38781d)=>_0x25cc1f*(0x1-_0x38781d),_0x4e8c4f)),_0x6463ae;}}else _0x4a5312(0x60f)!==_0x4a5312(0xa14)?this['drawTextEx'](_0x3960b1,_0x518408['x'],_0x518408['y'],_0x27d595):_0x2c37a7[_0x4a5312(0x768)][_0x4a5312(0x9f4)][_0x4a5312(0x4b1)](this);}},Window_PartyCommand['prototype'][_0x5bdce9(0x701)]=function(_0x23f32b){const _0x283594=_0x5bdce9;this[_0x283594(0x3fa)](_0x23f32b)[_0x283594(0x16b)](/\\I\[(\d+)\]/i);const _0x6bae4f=Number(RegExp['$1'])||0x0,_0x34f544=this[_0x283594(0x101)](_0x23f32b),_0x47df19=_0x34f544['x']+Math[_0x283594(0x618)]((_0x34f544[_0x283594(0x3b2)]-ImageManager[_0x283594(0x9e1)])/0x2),_0x3db4ad=_0x34f544['y']+(_0x34f544[_0x283594(0x3b0)]-ImageManager[_0x283594(0x8a0)])/0x2;this[_0x283594(0xb82)](_0x6bae4f,_0x47df19,_0x3db4ad);},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x137)]=function(){},Window_PartyCommand[_0x5bdce9(0x768)]['activate']=function(){const _0x163155=_0x5bdce9;Window_Command['prototype'][_0x163155(0x11b)][_0x163155(0x4b1)](this);const _0x19cb1a=this['battleLayoutStyle']();if(_0x19cb1a===_0x163155(0x5f1)){if(_0x163155(0x34f)!=='EPkwo')this[_0x163155(0xafd)]();else return _0x489f2f['BattleCore']['Settings'][_0x163155(0x817)][_0x163155(0x2a1)];}},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x19d)]=function(){const _0x105640=_0x5bdce9;if(this['_battleLayoutStyle'])return this[_0x105640(0x4e7)];return this[_0x105640(0x4e7)]=SceneManager['_scene'][_0x105640(0x19d)](),this[_0x105640(0x4e7)];},Window_PartyCommand[_0x5bdce9(0x768)][_0x5bdce9(0x372)]=function(){const _0x39ca90=_0x5bdce9,_0x312c18=VisuMZ['BattleCore']['Settings'][_0x39ca90(0x71c)],_0x2e31cc=this[_0x39ca90(0x733)]();switch(_0x2e31cc){case _0x39ca90(0x3b8):this[_0x39ca90(0xa0f)][_0x39ca90(0x868)](_0x312c18[_0x39ca90(0x6bb)]);break;case _0x39ca90(0xa63):this['_helpWindow'][_0x39ca90(0x868)](_0x312c18['HelpAutoBattle']);break;case'options':this[_0x39ca90(0xa0f)][_0x39ca90(0x868)](_0x312c18[_0x39ca90(0x92b)]);break;case _0x39ca90(0x6ec):this[_0x39ca90(0xa0f)][_0x39ca90(0x868)](_0x312c18[_0x39ca90(0xb07)]);break;default:this[_0x39ca90(0xa0f)]['setText']('');break;}},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x2fe)]=Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x490)],Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x490)]=function(_0x48c8cf){const _0x23d5a3=_0x5bdce9;VisuMZ['BattleCore'][_0x23d5a3(0x2fe)][_0x23d5a3(0x4b1)](this,_0x48c8cf),this[_0x23d5a3(0x5f4)](_0x48c8cf);},Window_ActorCommand[_0x5bdce9(0x768)]['createCommandNameWindow']=function(_0x2e98a0){const _0x398e21=_0x5bdce9,_0x108795=new Rectangle(0x0,0x0,_0x2e98a0['width'],_0x2e98a0[_0x398e21(0x3b0)]);this['_commandNameWindow']=new Window_Base(_0x108795),this[_0x398e21(0x301)][_0x398e21(0x867)]=0x0,this[_0x398e21(0xa8d)](this[_0x398e21(0x301)]),this[_0x398e21(0x7d7)]();},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x509)]=function(){const _0x4b96d0=_0x5bdce9;Window_Command[_0x4b96d0(0x768)][_0x4b96d0(0x509)][_0x4b96d0(0x4b1)](this);if(this[_0x4b96d0(0x301)])this[_0x4b96d0(0x7d7)]();},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x7d7)]=function(){const _0x94713=_0x5bdce9,_0x34e109=this['_commandNameWindow'];_0x34e109[_0x94713(0xb32)][_0x94713(0x89d)]();const _0x20f09c=this['commandStyleCheck'](this[_0x94713(0x1fd)]());if(_0x20f09c===_0x94713(0x98e)&&this[_0x94713(0x95a)]()>0x0){const _0x7b5203=this[_0x94713(0x101)](this[_0x94713(0x1fd)]());let _0x49fb95=this[_0x94713(0x3fa)](this[_0x94713(0x1fd)]());_0x49fb95=_0x49fb95[_0x94713(0x3a7)](/\\I\[(\d+)\]/gi,''),_0x34e109[_0x94713(0x689)](),this[_0x94713(0x3a0)](_0x49fb95,_0x7b5203),this['commandNameWindowDrawText'](_0x49fb95,_0x7b5203),this[_0x94713(0x980)](_0x49fb95,_0x7b5203);}},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x3a0)]=function(_0x1d6058,_0x49fae1){},Window_ActorCommand['prototype'][_0x5bdce9(0x5ad)]=function(_0x13d036,_0x2be759){const _0x56060c=_0x5bdce9,_0xcccde0=this['_commandNameWindow'];_0xcccde0['drawText'](_0x13d036,0x0,_0x2be759['y'],_0xcccde0[_0x56060c(0x1fb)],_0x56060c(0x4ed));},Window_ActorCommand[_0x5bdce9(0x768)]['commandNameWindowCenter']=function(_0x3ed49a,_0x5c1eec){const _0x46afa9=_0x5bdce9,_0x3a790f=this['_commandNameWindow'],_0x40f8b5=$gameSystem[_0x46afa9(0x149)](),_0x3e777b=_0x5c1eec['x']+Math[_0x46afa9(0x618)](_0x5c1eec[_0x46afa9(0x3b2)]/0x2)+_0x40f8b5;_0x3a790f['x']=_0x3a790f[_0x46afa9(0x3b2)]/-0x2+_0x3e777b,_0x3a790f['y']=Math[_0x46afa9(0x618)](_0x5c1eec['height']/0x2);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x6c0)]=function(){const _0x48a54f=_0x5bdce9;if(!this[_0x48a54f(0xa72)])return;const _0x474a90=this['_actor'][_0x48a54f(0x877)]();for(const _0x2f0350 of _0x474a90){this[_0x48a54f(0x150)](_0x2f0350['toUpperCase']()[_0x48a54f(0x92d)]());}},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x150)]=function(_0x9866d4){const _0xf94acf=_0x5bdce9;_0x9866d4===_0xf94acf(0x148)&&this[_0xf94acf(0x874)]();[_0xf94acf(0x9f5),'SKILLS'][_0xf94acf(0x8ed)](_0x9866d4)&&this[_0xf94acf(0xa5c)]();_0x9866d4===_0xf94acf(0x111)&&this[_0xf94acf(0x376)]();_0x9866d4===_0xf94acf(0x726)&&this['addItemCommand']();if(_0x9866d4===_0xf94acf(0x71b)){if('BCNBx'!==_0xf94acf(0x60c))for(const _0x20c260 of _0x5ddb95){const _0x5e67bf=_0x2d6f77[0x0]['format'](_0x20c260[0x0]),_0x1016e1=_0x100125[0x1][_0xf94acf(0x824)](_0x20c260[0x1]),_0x59ef73=new _0x546648(_0x36d1fa[_0xf94acf(0x824)](_0x1016e1),'i');_0x31f9b6[_0x5e67bf]=_0x59ef73;}else this[_0xf94acf(0xb6d)]();}_0x9866d4==='AUTO\x20BATTLE'&&this['addAutoBattleCommand']();if(_0x9866d4['match'](/STYPE: (\d+)/i)){if(_0xf94acf(0x6c3)!=='nAnOW'){const _0x1fd4d4=Number(RegExp['$1']);this['addSkillTypeCommand'](_0x1fd4d4);}else _0x198b5e['prototype'][_0xf94acf(0x490)][_0xf94acf(0x4b1)](this),this[_0xf94acf(0x481)]();}else{if(_0x9866d4['match'](/STYPE: (.*)/i)){if(_0xf94acf(0xb71)!==_0xf94acf(0xb71))return _0xaca350['BattleCore'][_0xf94acf(0x9e8)][_0xf94acf(0x4b1)](this);else{const _0x7b3e0b=DataManager[_0xf94acf(0x31e)](RegExp['$1']);this[_0xf94acf(0x4ad)](_0x7b3e0b);}}}if(_0x9866d4===_0xf94acf(0x7ec)){if(_0xf94acf(0x88f)!==_0xf94acf(0x88f)){const _0x2b943c=this[_0xf94acf(0x19d)]();['xp',_0xf94acf(0x71f),'border']['includes'](_0x2b943c)&&this[_0xf94acf(0x8df)]['close'](),(_0x2b943c===_0xf94acf(0x5f1)||this[_0xf94acf(0x493)]())&&(this[_0xf94acf(0xa94)][_0xf94acf(0x6de)](),this[_0xf94acf(0x855)]['close']());}else this[_0xf94acf(0x116)]();}if(_0x9866d4[_0xf94acf(0x16b)](/SKILL: (\d+)/i)){const _0x2d7368=Number(RegExp['$1']);this[_0xf94acf(0x96a)]($dataSkills[_0x2d7368]);}else{if(_0x9866d4[_0xf94acf(0x16b)](/SKILL: (.*)/i)){if(_0xf94acf(0x7dd)==='PsFQG'){const _0x301b1b=DataManager[_0xf94acf(0x5f3)](RegExp['$1']);this[_0xf94acf(0x96a)]($dataSkills[_0x301b1b]);}else _0x44699e[_0xf94acf(0x61c)]['Sprite_Enemy_update'][_0xf94acf(0x4b1)](this),this['updateShadowVisibility']();}}_0x9866d4===_0xf94acf(0xa4f)&&Imported['VisuMZ_2_PartySystem']&&this[_0xf94acf(0xb2d)]();[_0xf94acf(0x6db),_0xf94acf(0x8f7)]['includes'](_0x9866d4)&&Imported[_0xf94acf(0x99e)]&&(_0xf94acf(0x230)===_0xf94acf(0x755)?_0x5b7a39[_0xf94acf(0x774)](_0x52e463):this['addCombatLogCommand']());if(_0x9866d4==='WEAPON\x20SWAP'&&Imported[_0xf94acf(0x3a6)]){if(_0xf94acf(0x725)==='Rvofe')this[_0xf94acf(0x59f)](!![]);else return this[_0xf94acf(0x71d)]()[_0xf94acf(0x82d)](_0x9ab644=>_0x9ab644[_0xf94acf(0x86c)]());}},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x874)]=function(){const _0x41c303=_0x5bdce9,_0x19cfdf=$dataSkills[this['_actor'][_0x41c303(0x171)]()];if(!_0x19cfdf)return;if(!this[_0x41c303(0xb46)](_0x19cfdf))return;const _0xb2197f=this[_0x41c303(0x865)](),_0x5013f4=DataManager['battleCommandName'](_0x19cfdf),_0x29bb06=DataManager[_0x41c303(0x8a1)](_0x19cfdf),_0x5075c0=_0xb2197f==='text'?_0x5013f4:_0x41c303(0x5a6)[_0x41c303(0x824)](_0x29bb06,_0x5013f4);this[_0x41c303(0x97b)](_0x5075c0,_0x41c303(0x33d),this[_0x41c303(0xa72)][_0x41c303(0x9fc)]());},Window_ActorCommand['prototype']['addGuardCommand']=function(){const _0x54676d=_0x5bdce9,_0x257794=$dataSkills[this[_0x54676d(0xa72)]['guardSkillId']()];if(!_0x257794)return;if(!this[_0x54676d(0xb46)](_0x257794))return;const _0x35ee10=this[_0x54676d(0x865)](),_0x541f47=DataManager['battleCommandName'](_0x257794),_0x356fcd=DataManager['battleCommandIcon'](_0x257794),_0x405c37=_0x35ee10===_0x54676d(0x160)?_0x541f47:_0x54676d(0x5a6)[_0x54676d(0x824)](_0x356fcd,_0x541f47);this[_0x54676d(0x97b)](_0x405c37,_0x54676d(0xe9),this[_0x54676d(0xa72)][_0x54676d(0x277)]());},Window_ActorCommand[_0x5bdce9(0x768)]['addItemCommand']=function(){const _0x23d9d6=_0x5bdce9,_0x35d193=this[_0x23d9d6(0x865)](),_0x6535aa=VisuMZ[_0x23d9d6(0x61c)][_0x23d9d6(0x76e)][_0x23d9d6(0x59c)][_0x23d9d6(0x7cf)],_0x4723f3=_0x35d193===_0x23d9d6(0x160)?TextManager['item']:'\x5cI[%1]%2'['format'](_0x6535aa,TextManager[_0x23d9d6(0xa8a)]),_0x5444bf=this[_0x23d9d6(0x89b)]();this[_0x23d9d6(0x97b)](_0x4723f3,_0x23d9d6(0xa8a),_0x5444bf);},Window_ActorCommand['prototype']['isItemCommandEnabled']=function(){const _0x4356f1=_0x5bdce9;return this['_actor']&&this['_actor'][_0x4356f1(0xaf2)]();},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0xa5c)]=function(){const _0x333bbd=_0x5bdce9,_0x4f92a3=this[_0x333bbd(0xa72)][_0x333bbd(0xa39)]();for(const _0x53202a of _0x4f92a3){this[_0x333bbd(0x4ad)](_0x53202a);}},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x4ad)]=function(_0x139a7d){const _0x5db976=_0x5bdce9;let _0x5432c9=$dataSystem[_0x5db976(0xa39)][_0x139a7d];if(!_0x5432c9)return;let _0x14acbe=_0x5432c9;const _0x2899a4=this[_0x5db976(0x865)]();if(_0x2899a4==='text')_0x14acbe=_0x14acbe[_0x5db976(0x3a7)](/\x1I\[(\d+)\]/gi,''),_0x14acbe=_0x14acbe[_0x5db976(0x3a7)](/\\I\[(\d+)\]/gi,'');else{if(!_0x5432c9[_0x5db976(0x16b)](/\\I\[(\d+)\]/i)){const _0x1fd051=Imported[_0x5db976(0x47a)]?VisuMZ[_0x5db976(0x4e1)]['Settings'][_0x5db976(0x494)]:VisuMZ[_0x5db976(0x61c)]['Settings'][_0x5db976(0x59c)],_0x41a7a2=$dataSystem[_0x5db976(0x862)][_0x5db976(0x8ed)](_0x139a7d),_0x3ecf49=_0x41a7a2?_0x1fd051[_0x5db976(0x770)]:_0x1fd051[_0x5db976(0x341)];_0x14acbe=_0x5db976(0x5a6)[_0x5db976(0x824)](_0x3ecf49,_0x5432c9);}}this[_0x5db976(0x97b)](_0x14acbe,'skill',!![],_0x139a7d);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x116)]=function(){const _0xf10b12=_0x5bdce9,_0x56d329=this['_actor']['skillTypes'](),_0x56f144=this[_0xf10b12(0xa72)][_0xf10b12(0x5f9)]();for(const _0x32f836 of _0x56f144){if(!_0x32f836)continue;if(Imported['VisuMZ_1_SkillsStatesCore']){if('Exvjf'===_0xf10b12(0x9a7))_0x50eae8+=_0x14656f,_0x5f0bf3+=_0x5ea949[_0xf10b12(0x491)]()?-_0x57e93a:_0x38046c;else{if(this['noSimilarSTypes'](_0x32f836))continue;if(this['isHiddenSkill'](_0x32f836))continue;}}else{if(!_0x56d329[_0xf10b12(0x8ed)](_0x32f836[_0xf10b12(0x2fa)])){if(_0xf10b12(0x1aa)===_0xf10b12(0x857))return _0x9ab8a0[_0xf10b12(0x61c)][_0xf10b12(0x76e)][_0xf10b12(0x2c4)][_0xf10b12(0x261)];else continue;}}this[_0xf10b12(0x96a)](_0x32f836);}},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x1de)]=function(_0x562797){const _0x1a20f1=_0x5bdce9,_0x57c3d3=this[_0x1a20f1(0xa72)][_0x1a20f1(0xa39)](),_0x439ce9=_0x57c3d3[_0x1a20f1(0xb85)](_0xb92148=>DataManager['getSkillTypes'](_0x562797)[_0x1a20f1(0x8ed)](_0xb92148));return _0x439ce9['length']<=0x0;},Window_ActorCommand['prototype'][_0x5bdce9(0x84d)]=function(_0x2caf5b){const _0x1496d7=_0x5bdce9;if(!Window_SkillList[_0x1496d7(0x768)][_0x1496d7(0xb41)][_0x1496d7(0x4b1)](this,_0x2caf5b))return!![];if(!Window_SkillList[_0x1496d7(0x768)][_0x1496d7(0x315)]['call'](this,_0x2caf5b))return!![];if(!Window_SkillList[_0x1496d7(0x768)]['checkShowHideSkillNotetags'][_0x1496d7(0x4b1)](this,_0x2caf5b))return!![];return![];},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x96a)]=function(_0x139cbb){const _0x4b43c1=_0x5bdce9;if(!_0x139cbb)return;if(!this[_0x4b43c1(0xb46)](_0x139cbb))return;const _0x539b7a=this['commandStyle'](),_0x2c824d=DataManager[_0x4b43c1(0x70f)](_0x139cbb),_0xd89759=DataManager[_0x4b43c1(0x8a1)](_0x139cbb),_0x1d403b=_0x539b7a==='text'?_0x2c824d:_0x4b43c1(0x5a6)[_0x4b43c1(0x824)](_0xd89759,_0x2c824d),_0x2cbf6e=this['_actor'][_0x4b43c1(0x571)](_0x139cbb);this[_0x4b43c1(0x97b)](_0x1d403b,_0x4b43c1(0x9b0),_0x2cbf6e,_0x139cbb['id']);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0xb46)]=function(_0x17220e){const _0x3c768c=_0x5bdce9,_0x2de698=_0x17220e[_0x3c768c(0x664)];if(_0x2de698['match'](/<COMMAND REQUIRE LEARN>/i)){if('aimnY'!==_0x3c768c(0x833)){if(!this[_0x3c768c(0xa72)][_0x3c768c(0x23f)](_0x17220e['id']))return![];}else this[_0x3c768c(0xb2e)]();}if(_0x2de698[_0x3c768c(0x16b)](/<COMMAND REQUIRE ACCESS>/i)){if(!this[_0x3c768c(0xa72)][_0x3c768c(0x414)](_0x17220e['id']))return![];}const _0x1b08b7=VisuMZ[_0x3c768c(0x61c)][_0x3c768c(0xaa5)](_0x17220e,_0x3c768c(0x229));if(VisuMZ[_0x3c768c(0x61c)]['JS'][_0x1b08b7]){if(!VisuMZ[_0x3c768c(0x61c)]['JS'][_0x1b08b7]['call'](this,this[_0x3c768c(0xa72)],_0x17220e))return![];}return VisuMZ[_0x3c768c(0x61c)][_0x3c768c(0x3da)](_0x17220e);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x3da)]=function(_0x2cc186){const _0x1d809a=_0x5bdce9,_0xa259f6=_0x2cc186[_0x1d809a(0x664)];if(_0xa259f6[_0x1d809a(0x16b)](/<COMMAND SHOW[ ](?:SW|SWITCH|SWITCHES):[ ]*(\d+(?:\s*,\s*\d+)*)>/i)){const _0x42bf0f=JSON[_0x1d809a(0x6bd)]('['+RegExp['$1'][_0x1d809a(0x16b)](/\d+/g)+']');for(const _0x5406f0 of _0x42bf0f){if('BZSvM'!==_0x1d809a(0x7a6)){const _0x1b3649=[];for(const _0x2c25ff of this[_0x1d809a(0x1fc)]()[_0x1d809a(0xb20)]){const _0x51a2e9=_0x4c6f4a[_0x2c25ff[_0x1d809a(0xf1)]];if(_0x51a2e9&&!_0x1b3649['includes'](_0x51a2e9))_0x1b3649[_0x1d809a(0x838)](_0x51a2e9);}return _0x1b3649;}else{if(!$gameSwitches[_0x1d809a(0x9b5)](_0x5406f0))return![];}}return!![];}if(_0xa259f6[_0x1d809a(0x16b)](/<COMMAND SHOW ALL[ ](?:SW|SWITCH|SWITCHES):[ ]*(\d+(?:\s*,\s*\d+)*)>/i)){if(_0x1d809a(0xfa)!==_0x1d809a(0x871)){const _0x4f623a=JSON[_0x1d809a(0x6bd)]('['+RegExp['$1'][_0x1d809a(0x16b)](/\d+/g)+']');for(const _0xf5289b of _0x4f623a){if(_0x1d809a(0x947)===_0x1d809a(0x947)){if(!$gameSwitches[_0x1d809a(0x9b5)](_0xf5289b))return![];}else{if(this[_0x1d809a(0xb29)]<0xff)this[_0x1d809a(0xb29)]+=0x10;}}return!![];}else _0x576a88=this[_0x1d809a(0x976)]['_forcedHomeX']??_0x57589d,_0x30c4bb=this['_battler']['_forcedHomeY']??_0x4687f7;}if(_0xa259f6[_0x1d809a(0x16b)](/<COMMAND SHOW ANY[ ](?:SW|SWITCH|SWITCHES):[ ]*(\d+(?:\s*,\s*\d+)*)>/i)){if(_0x1d809a(0x29e)===_0x1d809a(0x5dd))_0x4ac9b9[_0x1d809a(0xb40)][_0x1d809a(0x154)]();else{const _0xb91597=JSON[_0x1d809a(0x6bd)]('['+RegExp['$1'][_0x1d809a(0x16b)](/\d+/g)+']');for(const _0x1a07d0 of _0xb91597){if(_0x1d809a(0x769)===_0x1d809a(0x769)){if($gameSwitches[_0x1d809a(0x9b5)](_0x1a07d0))return!![];}else this['setup'](_0x1d98b6['list'],0x0);}return![];}}if(_0xa259f6[_0x1d809a(0x16b)](/<COMMAND HIDE[ ](?:SW|SWITCH|SWITCHES):[ ]*(\d+(?:\s*,\s*\d+)*)>/i)){const _0x1160c2=JSON[_0x1d809a(0x6bd)]('['+RegExp['$1'][_0x1d809a(0x16b)](/\d+/g)+']');for(const _0x512629 of _0x1160c2){if(_0x1d809a(0x264)===_0x1d809a(0x264)){if(!$gameSwitches[_0x1d809a(0x9b5)](_0x512629))return!![];}else return null;}return![];}if(_0xa259f6[_0x1d809a(0x16b)](/<COMMAND HIDE ALL[ ](?:SW|SWITCH|SWITCHES):[ ]*(\d+(?:\s*,\s*\d+)*)>/i)){const _0x352650=JSON[_0x1d809a(0x6bd)]('['+RegExp['$1'][_0x1d809a(0x16b)](/\d+/g)+']');for(const _0x4234de of _0x352650){if(_0x1d809a(0x2af)===_0x1d809a(0x2af)){if(!$gameSwitches[_0x1d809a(0x9b5)](_0x4234de))return!![];}else this[_0x1d809a(0x326)]=this[_0x1d809a(0x99a)](this[_0x1d809a(0x326)],this[_0x1d809a(0x4a9)],_0x229cce,_0xe826c1,_0x162a97),this[_0x1d809a(0x461)]=this[_0x1d809a(0x99a)](this['_growY'],this[_0x1d809a(0x739)],_0x441b1e,_0x37468d,_0x57769b);}return![];}if(_0xa259f6[_0x1d809a(0x16b)](/<COMMAND HIDE ANY[ ](?:SW|SWITCH|SWITCHES):[ ]*(\d+(?:\s*,\s*\d+)*)>/i)){const _0x5ddc44=JSON[_0x1d809a(0x6bd)]('['+RegExp['$1'][_0x1d809a(0x16b)](/\d+/g)+']');for(const _0x2d2583 of _0x5ddc44){if(_0x1d809a(0x589)===_0x1d809a(0x589)){if($gameSwitches[_0x1d809a(0x9b5)](_0x2d2583))return![];}else _0x39ed12=_0x1204e9[_0x1d809a(0x618)](_0x16d84c[_0x1d809a(0x3df)]()*(_0x5ea8e7+0x1)),_0x4ae782=_0x5d2b0d[_0x140925],_0x169879[_0x312ffa]=_0x3ba356[_0x202de2],_0x220bed[_0x464165]=_0x556083;}return!![];}return!![];},Window_ActorCommand[_0x5bdce9(0x768)]['addEscapeCommand']=function(){const _0x14a4b2=_0x5bdce9,_0x1bf077=this[_0x14a4b2(0x865)](),_0x3173d8=VisuMZ[_0x14a4b2(0x61c)]['Settings'][_0x14a4b2(0x71c)][_0x14a4b2(0x363)],_0x2cd3ec=_0x1bf077==='text'?TextManager[_0x14a4b2(0x6ec)]:_0x14a4b2(0x5a6)[_0x14a4b2(0x824)](_0x3173d8,TextManager[_0x14a4b2(0x6ec)]),_0x2eabca=this['isEscapeCommandEnabled']();this['addCommand'](_0x2cd3ec,'escape',_0x2eabca);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x67e)]=function(){return BattleManager['canEscape']();},Window_ActorCommand['prototype'][_0x5bdce9(0x4c0)]=function(){const _0x2716e2=_0x5bdce9,_0xa07af6=this[_0x2716e2(0x865)](),_0x5524d8=VisuMZ[_0x2716e2(0x61c)][_0x2716e2(0x76e)][_0x2716e2(0x71c)]['CmdIconAutoBattle'],_0x8c4a72=_0xa07af6===_0x2716e2(0x160)?TextManager[_0x2716e2(0xa63)]:_0x2716e2(0x5a6)[_0x2716e2(0x824)](_0x5524d8,TextManager[_0x2716e2(0xa63)]),_0x5d644c=this[_0x2716e2(0xa06)]();this[_0x2716e2(0x97b)](_0x8c4a72,_0x2716e2(0xa63),_0x5d644c);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0xa06)]=function(){return!![];},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x38c)]=function(){const _0x335aa3=_0x5bdce9;return VisuMZ[_0x335aa3(0x61c)][_0x335aa3(0x76e)][_0x335aa3(0x59c)][_0x335aa3(0x4be)];},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x2a6)]=function(_0x2a9215){const _0x14f0e5=_0x5bdce9,_0x5ed3bd=this['commandStyleCheck'](_0x2a9215);if(_0x5ed3bd===_0x14f0e5(0x5b1))this['drawItemStyleIconText'](_0x2a9215);else _0x5ed3bd===_0x14f0e5(0x98e)?this['drawItemStyleIcon'](_0x2a9215):Window_Command['prototype'][_0x14f0e5(0x2a6)][_0x14f0e5(0x4b1)](this,_0x2a9215);this[_0x14f0e5(0x92e)](_0x2a9215);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x865)]=function(){const _0x28c923=_0x5bdce9;return VisuMZ[_0x28c923(0x61c)][_0x28c923(0x76e)]['ActorCmd'][_0x28c923(0x2bf)];},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x49b)]=function(_0x362217){const _0x3d2994=_0x5bdce9;if(_0x362217<0x0)return'text';const _0x4da4ec=this[_0x3d2994(0x865)]();if(_0x4da4ec!=='auto')return _0x4da4ec;else{if(this[_0x3d2994(0x95a)]()>0x0){const _0x523b63=this[_0x3d2994(0x3fa)](_0x362217);if(_0x523b63['match'](/\\I\[(\d+)\]/i)){if(_0x3d2994(0x975)!=='DxAcg')return _0x343207[_0x3d2994(0x61c)]['Settings'][_0x3d2994(0x59c)][_0x3d2994(0x2bf)];else{const _0x18ce58=this[_0x3d2994(0x101)](_0x362217),_0x573fbc=this[_0x3d2994(0xa5d)](_0x523b63)[_0x3d2994(0x3b2)];if(_0x573fbc<=_0x18ce58['width']){if(_0x3d2994(0x8f5)===_0x3d2994(0x5b8)){if(!_0x271b20[_0x3d2994(0xb63)])return;(_0x55a3ca[_0x3d2994(0x5de)]('ok')||_0x78a428['isTriggered'](_0x3d2994(0x5c1))||_0x5d1f79[_0x3d2994(0x1e8)]()||_0x224ce8[_0x3d2994(0x7c0)]())&&(_0x393166[_0x3d2994(0x279)](),_0x5fe0f8['_autoBattle']=![],_0x93c349[_0x3d2994(0x89d)](),_0x4aa519[_0x3d2994(0x89d)]());}else return'iconText';}else{if('IZwpQ'==='IZwpQ')return _0x3d2994(0x98e);else _0xf9c693[_0x3d2994(0xae5)](_0x575ab8),[_0x3d2994(0x81d),_0x3d2994(0x90c),'missile'][_0x3d2994(0x8ed)](_0x440033)&&this[_0x3d2994(0xb2e)]();}}}}}return _0x3d2994(0x160);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x178)]=function(_0x4aacb8){const _0x44fa64=_0x5bdce9,_0x2c1452=this[_0x44fa64(0x101)](_0x4aacb8),_0x3fe628=this['commandName'](_0x4aacb8),_0x4c1a9e=this[_0x44fa64(0xa5d)](_0x3fe628)[_0x44fa64(0x3b2)];this[_0x44fa64(0xb60)](this[_0x44fa64(0x740)](_0x4aacb8));const _0x59f614=this[_0x44fa64(0x38c)]();if(_0x59f614==='right'){if(_0x44fa64(0x433)===_0x44fa64(0x433))this[_0x44fa64(0x723)](_0x3fe628,_0x2c1452['x']+_0x2c1452[_0x44fa64(0x3b2)]-_0x4c1a9e,_0x2c1452['y'],_0x4c1a9e);else return![];}else{if(_0x59f614===_0x44fa64(0x4ed)){if(_0x44fa64(0x23e)!=='vnchP'){const _0x4fa696=_0x2c1452['x']+Math[_0x44fa64(0x618)]((_0x2c1452['width']-_0x4c1a9e)/0x2);this[_0x44fa64(0x723)](_0x3fe628,_0x4fa696,_0x2c1452['y'],_0x4c1a9e);}else{if(!this[_0x44fa64(0x524)]())return;if(_0x293a16<=0x0)return;this[_0x44fa64(0x7f9)]=_0x14dd81,this[_0x44fa64(0x94f)]=_0x250183,this[_0x44fa64(0xa07)]=_0x2e333d;}}else{if('tsLRr'!=='tsLRr')return 0x1*this['_growY'];else this['drawTextEx'](_0x3fe628,_0x2c1452['x'],_0x2c1452['y'],_0x4c1a9e);}}},Window_ActorCommand['prototype'][_0x5bdce9(0x701)]=function(_0x908c33){const _0x1cfccf=_0x5bdce9;this[_0x1cfccf(0x3fa)](_0x908c33)[_0x1cfccf(0x16b)](/\\I\[(\d+)\]/i);const _0x1d21e0=Number(RegExp['$1'])||0x0,_0x56d056=this[_0x1cfccf(0x101)](_0x908c33),_0x36758c=_0x56d056['x']+Math[_0x1cfccf(0x618)]((_0x56d056['width']-ImageManager['iconWidth'])/0x2),_0x9fce2a=_0x56d056['y']+(_0x56d056['height']-ImageManager[_0x1cfccf(0x8a0)])/0x2;this['drawIcon'](_0x1d21e0,_0x36758c,_0x9fce2a);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x92e)]=function(_0x7bca9f){const _0x38e6f7=_0x5bdce9;if(!(VisuMZ[_0x38e6f7(0x61c)][_0x38e6f7(0x76e)]['ActorCmd'][_0x38e6f7(0x2ac)]??!![]))return;const _0x9bbd75=this[_0x38e6f7(0x992)](_0x7bca9f);if(![_0x38e6f7(0x33d),_0x38e6f7(0xe9),'singleSkill']['includes'](_0x9bbd75))return;const _0x12dc75=this[_0x38e6f7(0x101)](_0x7bca9f);let _0x3b8302=null;if(_0x9bbd75===_0x38e6f7(0x33d))_0x3b8302=$dataSkills[this[_0x38e6f7(0xa72)][_0x38e6f7(0x171)]()];else _0x9bbd75===_0x38e6f7(0xe9)?_0x3b8302=$dataSkills[this[_0x38e6f7(0xa72)][_0x38e6f7(0x6da)]()]:_0x38e6f7(0x118)==='xICOH'?_0x3b8302=$dataSkills[this[_0x38e6f7(0x27d)][_0x7bca9f][_0x38e6f7(0x3fb)]]:_0x4467b2['wtypeId']=_0x422669['getWtypeIdWithName'](_0x3a2edf['$1']);this[_0x38e6f7(0xb09)](this['_actor'],_0x3b8302,_0x12dc75['x'],_0x12dc75['y'],_0x12dc75[_0x38e6f7(0x3b2)]);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0xb09)]=function(_0x4d72a9,_0xe8b787,_0x5c3faf,_0xd75add,_0x33679a){const _0x3445cb=_0x5bdce9;if(!_0xe8b787)return;Imported[_0x3445cb(0x47a)]?Window_Command[_0x3445cb(0x768)][_0x3445cb(0xb09)][_0x3445cb(0x4b1)](this,_0x4d72a9,_0xe8b787,_0x5c3faf,_0xd75add,_0x33679a):Window_SkillList[_0x3445cb(0x768)][_0x3445cb(0xb09)][_0x3445cb(0x4b1)](this,_0xe8b787,_0x5c3faf,_0xd75add,_0x33679a);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x137)]=function(){},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x11b)]=function(){const _0x584f81=_0x5bdce9;Window_Command['prototype'][_0x584f81(0x11b)][_0x584f81(0x4b1)](this);const _0x2125d2=this[_0x584f81(0x19d)]();_0x2125d2===_0x584f81(0x5f1)&&this[_0x584f81(0xafd)]();},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x19d)]=function(){const _0x285087=_0x5bdce9;if(this[_0x285087(0x4e7)])return this['_battleLayoutStyle'];return this[_0x285087(0x4e7)]=SceneManager[_0x285087(0x352)]['battleLayoutStyle'](),this[_0x285087(0x4e7)];},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x379)]=Window_ActorCommand['prototype'][_0x5bdce9(0x5aa)],Window_ActorCommand[_0x5bdce9(0x768)]['setup']=function(_0xc75009){const _0x1e003=_0x5bdce9,_0x3c12ee=this[_0x1e003(0x19d)]();if(_0xc75009&&['xp','portrait'][_0x1e003(0x8ed)](_0x3c12ee)){if(_0x1e003(0xa3c)===_0x1e003(0x4aa)){if(_0xa951da[_0x1e003(0x377)])this['displayItemMessage'](_0x52c9e4[_0x1e003(0x8b4)],_0x1648d4,_0x2928d4);if(_0x36f5e4[_0x1e003(0x551)])this[_0x1e003(0x25d)](_0x3fe3f1[_0x1e003(0x772)],_0x2f84ae,_0x567c6f);}else this[_0x1e003(0x2f7)](_0xc75009);}else _0xc75009&&[_0x1e003(0x5f1)][_0x1e003(0x8ed)](_0x3c12ee)&&(this['resizeWindowBorderStyle'](_0xc75009),this[_0x1e003(0xafd)]());VisuMZ[_0x1e003(0x61c)][_0x1e003(0x379)]['call'](this,_0xc75009),_0xc75009&&$gameTroop[_0x1e003(0xed)]()[_0x1e003(0x12d)]>0x0&&_0xc75009['battler']()&&_0xc75009['battler']()[_0x1e003(0x373)]();},Window_ActorCommand['prototype']['resizeWindowXPStyle']=function(_0x3bb0ad){const _0x2db5a4=_0x5bdce9,_0x442143=Math[_0x2db5a4(0xb3f)](Graphics[_0x2db5a4(0x7fb)]/0x3),_0xde6c0=Math[_0x2db5a4(0xb3f)](Graphics['boxWidth']/$gameParty[_0x2db5a4(0xb6f)]()['length']),_0x236144=Math['min'](_0x442143,_0xde6c0),_0x3c8b3d=this[_0x2db5a4(0x133)](VisuMZ[_0x2db5a4(0x61c)]['Settings']['BattleLayout'][_0x2db5a4(0x997)]),_0x3f3e78=_0xde6c0*_0x3bb0ad['index']()+(_0xde6c0-_0x236144)/0x2,_0x1a4be4=SceneManager[_0x2db5a4(0x352)][_0x2db5a4(0x3e2)]['y']-_0x3c8b3d;this[_0x2db5a4(0x5e7)](_0x3f3e78,_0x1a4be4,_0x236144,_0x3c8b3d),this['createContents'](),this[_0x2db5a4(0xa69)](0x1);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0xb1e)]=function(_0x1a96f3){const _0x5ed86c=_0x5bdce9,_0x5070bb=SceneManager['_scene'][_0x5ed86c(0xb39)]();this[_0x5ed86c(0x5e7)](_0x5070bb['x'],_0x5070bb['y'],_0x5070bb[_0x5ed86c(0x3b2)],_0x5070bb[_0x5ed86c(0x3b0)]),this[_0x5ed86c(0x6dc)](),this[_0x5ed86c(0xa69)](0x0);},Window_ActorCommand[_0x5bdce9(0x768)][_0x5bdce9(0x3f4)]=function(){const _0x578c66=_0x5bdce9;if(this['_dimmerSprite']){if('WVCmn'==='WVCmn'){const _0xf01ae2=this[_0x578c66(0x978)]['bitmap'],_0x238501=this[_0x578c66(0x3b2)]-0x8,_0x8afa73=this[_0x578c66(0x3b0)],_0x1838c0=this[_0x578c66(0xaff)],_0xcbe26e=ColorManager[_0x578c66(0xafc)](),_0x48de3c=ColorManager[_0x578c66(0xb0c)]();this['_dimmerSprite']['x']=0x4,_0xf01ae2[_0x578c66(0xad1)](_0x238501,_0x8afa73),_0xf01ae2[_0x578c66(0x936)](0x0,0x0,_0x238501,_0x1838c0,_0x48de3c,_0xcbe26e,!![]),_0xf01ae2[_0x578c66(0xe8)](0x0,_0x1838c0,_0x238501,_0x8afa73-_0x1838c0*0x2,_0xcbe26e),_0xf01ae2[_0x578c66(0x936)](0x0,_0x8afa73-_0x1838c0,_0x238501,_0x1838c0,_0xcbe26e,_0x48de3c,!![]),this[_0x578c66(0x978)][_0x578c66(0x8da)](0x0,0x0,_0x238501,_0x8afa73);}else{let _0x3c5fbe='battleUIOffsetX';if(this[_0x578c66(0x17f)](_0x3c5fbe))return this[_0x578c66(0x1f3)][_0x3c5fbe];return this[_0x578c66(0x1f3)][_0x3c5fbe]=this[_0x578c66(0x979)](this[_0x578c66(0x1fc)]()),this['_cache'][_0x3c5fbe];}}},Window_ActorCommand['prototype'][_0x5bdce9(0x372)]=function(){const _0x52ff26=_0x5bdce9;if(!this['_actor'])return;const _0x4a44bb=VisuMZ[_0x52ff26(0x61c)][_0x52ff26(0x76e)][_0x52ff26(0x59c)],_0x2a932b=this[_0x52ff26(0x733)]();switch(_0x2a932b){case _0x52ff26(0x33d):this[_0x52ff26(0xb4d)]($dataSkills[this['_actor'][_0x52ff26(0x171)]()]);break;case'guard':this[_0x52ff26(0xb4d)]($dataSkills[this[_0x52ff26(0xa72)]['guardSkillId']()]);break;case'skill':const _0x7b9cf=_0x4a44bb[_0x52ff26(0x617)],_0x4527da=_0x7b9cf[_0x52ff26(0x824)]($dataSystem[_0x52ff26(0xa39)][this[_0x52ff26(0x3fd)]()]);this[_0x52ff26(0xa0f)]['setText'](_0x4527da);break;case'singleSkill':this[_0x52ff26(0xb4d)]($dataSkills[this[_0x52ff26(0x3fd)]()]);break;case _0x52ff26(0xa8a):this[_0x52ff26(0xa0f)]['setText'](_0x4a44bb['HelpItem']);break;case _0x52ff26(0x6ec):this['_helpWindow'][_0x52ff26(0x868)](_0x4a44bb[_0x52ff26(0xb07)]);break;case _0x52ff26(0xa63):this['_helpWindow']['setText'](_0x4a44bb[_0x52ff26(0x613)]);break;default:this[_0x52ff26(0xa0f)]['setText']('');break;}},VisuMZ['BattleCore']['Window_BattleStatus_initialize']=Window_BattleStatus['prototype'][_0x5bdce9(0x490)],Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x490)]=function(_0x7ac895){const _0x259b9f=_0x5bdce9;VisuMZ[_0x259b9f(0x61c)][_0x259b9f(0x11f)]['call'](this,_0x7ac895),this['initBattleCore'](),this['createAttachmentSprites']();},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x19d)]=function(){const _0xd1b86b=_0x5bdce9;if(this[_0xd1b86b(0x4e7)])return this[_0xd1b86b(0x4e7)];return this[_0xd1b86b(0x4e7)]=SceneManager['_scene']['battleLayoutStyle'](),this[_0xd1b86b(0x4e7)];},Window_BattleStatus[_0x5bdce9(0x768)]['initBattleCore']=function(){const _0x3068e7=_0x5bdce9;this[_0x3068e7(0x5f6)]=this[_0x3068e7(0x73a)]();const _0x1009ce=VisuMZ[_0x3068e7(0x61c)][_0x3068e7(0x76e)][_0x3068e7(0x40f)];_0x1009ce[_0x3068e7(0x90d)]&&(_0x3068e7(0xfc)!=='CEZUE'?this[_0x3068e7(0x867)]=0x0:(this[_0x3068e7(0x9d4)]=_0x459015,_0x1d5f7d[_0x3068e7(0x352)][_0x3068e7(0x1ae)]()));},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x73a)]=function(){const _0x2b5741=_0x5bdce9,_0x2b70af=VisuMZ[_0x2b5741(0x61c)][_0x2b5741(0x76e)]['BattleLayout'];if(_0x2b70af[_0x2b5741(0x18b)]){if(_0x2b5741(0x9a6)!=='CNHDP')_0x362278[_0x2b5741(0xb87)]=!![],this[_0x2b5741(0xa4c)](_0x2dda8c);else return!![];}const _0xe974cd=this[_0x2b5741(0x19d)]();switch(_0xe974cd){case'list':case _0x2b5741(0x5f1):return!![];break;case'default':case'xp':case _0x2b5741(0x71f):default:return![];break;}},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0xaa7)]=function(){const _0x5b8402=_0x5bdce9;return this[_0x5b8402(0x73a)]()?0x0:0xa;},Window_BattleStatus['prototype']['maxCols']=function(){const _0x2b3467=_0x5bdce9,_0x568e2c=this[_0x2b3467(0x19d)]();switch(_0x568e2c){case _0x2b3467(0x3cd):return 0x1;break;case'xp':case _0x2b3467(0x71f):return $gameParty['battleMembers']()[_0x2b3467(0x12d)];break;case'default':default:return $gameParty[_0x2b3467(0x535)]();break;}},Window_BattleStatus[_0x5bdce9(0x768)]['itemHeight']=function(){const _0x3340c0=_0x5bdce9,_0x4d7739=this[_0x3340c0(0x19d)]();switch(_0x4d7739){case _0x3340c0(0x3cd):return Window_StatusBase[_0x3340c0(0x768)][_0x3340c0(0x36d)][_0x3340c0(0x4b1)](this);break;case _0x3340c0(0xa34):case'xp':case _0x3340c0(0x71f):default:return this[_0x3340c0(0x98f)];break;}},Window_BattleStatus['prototype'][_0x5bdce9(0x202)]=function(){const _0x56eb54=_0x5bdce9,_0x3bd23c=this['battleLayoutStyle']();switch(_0x3bd23c){case _0x56eb54(0x3cd):return Window_StatusBase[_0x56eb54(0x768)][_0x56eb54(0x202)]['call'](this);break;case _0x56eb54(0xa34):case'xp':case _0x56eb54(0x71f):default:return 0x0;break;}},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x9f4)]=function(){const _0x4b391d=_0x5bdce9;if(this['isFrameVisible']()){if(_0x4b391d(0x9ad)===_0x4b391d(0x9ad))Window_StatusBase[_0x4b391d(0x768)][_0x4b391d(0x9f4)]['call'](this);else{if(this[_0x4b391d(0x56d)]===_0x3bc01b)return;this[_0x4b391d(0x4f4)](),this[_0x4b391d(0x75f)]();}}else this[_0x4b391d(0xaff)]=0x8;},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x942)]=function(){const _0x61ad66=_0x5bdce9,_0x4cd188=VisuMZ['BattleCore']['Settings'][_0x61ad66(0x40f)];_0x4cd188[_0x61ad66(0x18b)]?this[_0x61ad66(0x856)]=ImageManager[_0x61ad66(0x691)](_0x4cd188[_0x61ad66(0x18b)]):Window_StatusBase[_0x61ad66(0x768)][_0x61ad66(0x942)]['call'](this);},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x444)]=function(_0x9b5296){const _0x478b52=_0x5bdce9,_0x1e96e1=VisuMZ[_0x478b52(0x61c)]['Settings'][_0x478b52(0x40f)];if(_0x1e96e1[_0x478b52(0x9fe)])return;Window_StatusBase[_0x478b52(0x768)]['drawItemBackground'][_0x478b52(0x4b1)](this,_0x9b5296);},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0xb13)]=function(){const _0x59f974=_0x5bdce9;this[_0x59f974(0x764)]=!![];},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x367)]=function(){const _0x3ada82=_0x5bdce9;Window_StatusBase[_0x3ada82(0x768)][_0x3ada82(0x367)][_0x3ada82(0x4b1)](this),this[_0x3ada82(0x107)](),this[_0x3ada82(0x153)]();if(this[_0x3ada82(0x19d)]()===_0x3ada82(0x5f1))this[_0x3ada82(0x9cd)]();},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x107)]=function(){const _0x3828bc=_0x5bdce9;if($gameTemp[_0x3828bc(0x128)]())this[_0x3828bc(0x1f7)](),this[_0x3828bc(0x764)]=![],$gameTemp[_0x3828bc(0x72a)]();else{if(this[_0x3828bc(0x764)]){if('lbqDc'!==_0x3828bc(0x33e))this['_requestRefresh']=![],this['refresh'](),this[_0x3828bc(0x1a5)]();else{if(this[_0x3828bc(0x406)]===_0x13ccf3)this[_0x3828bc(0x699)]();if(!_0x2ad2f6)return;if(this[_0x3828bc(0x406)][_0x3828bc(0x8ed)](_0x2ba171))return;this[_0x3828bc(0x406)][_0x3828bc(0x838)](_0x3e8f9e),this['_defeatedEnemies']['sort']((_0x31a5f7,_0x591844)=>_0x31a5f7-_0x591844);}}}},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x243)]=function(){const _0x2219d1=_0x5bdce9;Window_StatusBase[_0x2219d1(0x768)][_0x2219d1(0x243)][_0x2219d1(0x4b1)](this);if(!$gameSystem[_0x2219d1(0x68b)]())this[_0x2219d1(0xf7)]();},Window_BattleStatus[_0x5bdce9(0x768)]['hide']=function(){const _0x48ad4d=_0x5bdce9;if(this[_0x48ad4d(0x56d)]===Window_BattleStatus)return;Window_StatusBase['prototype']['hide'][_0x48ad4d(0x4b1)](this);},Window_BattleStatus[_0x5bdce9(0x768)]['drawBackgroundRect']=function(_0x4c9688){const _0xd4b5a=_0x5bdce9,_0x482247=this[_0xd4b5a(0x19d)]();switch(_0x482247){case'xp':case _0xd4b5a(0x71f):break;case'default':case'list':case _0xd4b5a(0x5f1):default:return Window_StatusBase[_0xd4b5a(0x768)]['drawBackgroundRect'][_0xd4b5a(0x4b1)](this,_0x4c9688);break;}},VisuMZ[_0x5bdce9(0x61c)]['Window_BattleStatus_drawItemImage']=Window_BattleStatus['prototype']['drawItemImage'],Window_BattleStatus[_0x5bdce9(0x768)]['drawItemImage']=function(_0x44df68){const _0x427a56=_0x5bdce9,_0x475b93=this[_0x427a56(0x19d)]();switch(_0x475b93){case _0x427a56(0x3cd):this[_0x427a56(0xb02)](_0x44df68);break;case'xp':this[_0x427a56(0x2b5)](_0x44df68);break;case _0x427a56(0x71f):this[_0x427a56(0x8d3)](_0x44df68);break;case _0x427a56(0xa34):case _0x427a56(0x5f1):default:VisuMZ[_0x427a56(0x61c)]['Window_BattleStatus_drawItemImage'][_0x427a56(0x4b1)](this,_0x44df68);break;}},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x944)]=function(_0x50c920){const _0x465b9b=_0x5bdce9,_0x47e227=this[_0x465b9b(0x19d)]();if(!$gameSystem[_0x465b9b(0x68b)]())this[_0x465b9b(0x9ed)](_0x50c920);switch(_0x47e227){case'list':this['drawItemStatusListStyle'](_0x50c920);break;case'xp':case _0x465b9b(0x71f):case _0x465b9b(0xa34):case _0x465b9b(0x5f1):default:this['drawItemStatusXPStyle'](_0x50c920);break;}},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x850)]=function(){const _0x3bb90e=_0x5bdce9,_0x2d6b37=this[_0x3bb90e(0x19d)]();if(['xp'][_0x3bb90e(0x8ed)](_0x2d6b37)&&!$gameSystem[_0x3bb90e(0x68b)]()){if('gXZVe'===_0x3bb90e(0x226)){if(this['_currentActor'][_0x3bb90e(0x427)]())return;this[_0x3bb90e(0x7bf)](),this[_0x3bb90e(0xb3c)](),!this['_subject']&&!this[_0x3bb90e(0x983)]&&_0x36d7bb['_scene'][_0x3bb90e(0x620)]();}else{this[_0x3bb90e(0xb49)](0x0,0x0,0x0,0x0);return;}}Window_StatusBase['prototype'][_0x3bb90e(0x850)][_0x3bb90e(0x4b1)](this);},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x9ed)]=function(_0x4b4f0){const _0x4fbaa2=_0x5bdce9,_0x3b3787=this['actor'](_0x4b4f0)[_0x4fbaa2(0xb0d)]();if(!_0x3b3787)return;const _0x4bae44=this[_0x4fbaa2(0x19d)](),_0x3e0025=this['itemRect'](_0x4b4f0);let _0x21b701=Math[_0x4fbaa2(0xb3f)](_0x3e0025['x']+_0x3e0025[_0x4fbaa2(0x3b2)]/0x2)+this[_0x4fbaa2(0xaff)];['list'][_0x4fbaa2(0x8ed)](_0x4bae44)&&(_0x21b701=_0x3e0025[_0x4fbaa2(0x3b2)]/$gameParty[_0x4fbaa2(0xb6f)]()[_0x4fbaa2(0x12d)],_0x21b701*=_0x4b4f0,_0x21b701+=_0x3e0025[_0x4fbaa2(0x3b2)]/$gameParty[_0x4fbaa2(0xb6f)]()[_0x4fbaa2(0x12d)]/0x2);let _0x6e309d=Math['round'](this[_0x4fbaa2(0x479)](_0x4b4f0,_0x3b3787,_0x3e0025));_0x3b3787[_0x4fbaa2(0x273)](_0x21b701,_0x6e309d),this[_0x4fbaa2(0x783)](_0x3b3787,0x1),_0x3b3787['show'](),this[_0x4fbaa2(0x84c)](),this[_0x4fbaa2(0x1a5)]();},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x479)]=function(_0x1eff90,_0x3f1361,_0x2886cf){const _0x584440=_0x5bdce9,_0x1b67b2=VisuMZ['BattleCore'][_0x584440(0x76e)][_0x584440(0x40f)],_0x57adb8=this[_0x584440(0x19d)]();if(_0x57adb8==='xp'){const _0x4ad75c=_0x1b67b2[_0x584440(0xb26)];switch(_0x4ad75c[_0x584440(0x63a)]()[_0x584440(0x92d)]()){case _0x584440(0x48e):return _0x2886cf[_0x584440(0x3b0)]-_0x3f1361[_0x584440(0x748)][_0x584440(0x3b0)]/0x4;break;case _0x584440(0x4ed):const _0x5b8de0=_0x1b67b2['XPActorDefaultHeight'];return(_0x2886cf[_0x584440(0x3b0)]+(_0x3f1361[_0x584440(0x3b0)]||_0x5b8de0))/0x2;break;case'top':return 0x0;case _0x584440(0x74e):default:return this[_0x584440(0x6df)](_0x2886cf);break;}}else{if(_0x57adb8===_0x584440(0x71f)){}}return _0x3f1361['height'];},Sprite_Name[_0x5bdce9(0x768)][_0x5bdce9(0x8db)]=function(){return 0x24;},Sprite_Name[_0x5bdce9(0x768)][_0x5bdce9(0x5fd)]=function(){const _0x409d00=_0x5bdce9,_0x35556f=this[_0x409d00(0x74e)](),_0x344048=this[_0x409d00(0x541)](),_0x5d4817=this[_0x409d00(0x8db)]();this[_0x409d00(0x934)](),this[_0x409d00(0x454)]['clear'](),this[_0x409d00(0x454)][_0x409d00(0x9b8)](_0x35556f,0x0,0x0,_0x344048,_0x5d4817,_0x409d00(0x110));},Bitmap[_0x5bdce9(0x768)][_0x5bdce9(0x9b8)]=function(_0x3f652e,_0x34b619,_0x25c301,_0x4ace75,_0x7c357,_0x57f211){const _0x4ba133=_0x5bdce9,_0x1306a9=this[_0x4ba133(0x955)],_0x314248=_0x1306a9['globalAlpha'];_0x4ace75=_0x4ace75||0xffffffff;let _0x2b3254=_0x34b619,_0x25fd19=Math[_0x4ba133(0xb3f)](_0x25c301+0x18/0x2+this['fontSize']*0.35);_0x57f211==='center'&&(_0x2b3254+=_0x4ace75/0x2);if(_0x57f211==='right'){if('wGAYx'!=='wGAYx'){if(this['_floatDuration']<=0x0)return;const _0xb14a0b=this['_floatDuration'],_0x3d5fa6=this[_0x4ba133(0x8ff)],_0x3a7139=this[_0x4ba133(0x7aa)];_0xd7a265[_0x4ba133(0x9f2)]?this['_floatHeight']=this[_0x4ba133(0x99a)](this[_0x4ba133(0x16a)],this[_0x4ba133(0x3ce)],_0xb14a0b,_0x3d5fa6,_0x3a7139):this[_0x4ba133(0x16a)]=(this[_0x4ba133(0x16a)]*(_0xb14a0b-0x1)+this[_0x4ba133(0x3ce)])/_0xb14a0b;this[_0x4ba133(0x91e)]--;if(this['_floatDuration']<=0x0)this['onFloatEnd']();}else _0x2b3254+=_0x4ace75;}_0x1306a9['save'](),_0x1306a9['font']=this[_0x4ba133(0x6c5)](),_0x1306a9[_0x4ba133(0xa9e)]=_0x57f211,_0x1306a9['textBaseline']=_0x4ba133(0xb06),_0x1306a9[_0x4ba133(0x537)]=0x1,this[_0x4ba133(0x7e9)](_0x3f652e,_0x2b3254,_0x25fd19,_0x4ace75),_0x1306a9['globalAlpha']=_0x314248,this['_drawTextBody'](_0x3f652e,_0x2b3254,_0x25fd19,_0x4ace75),_0x1306a9[_0x4ba133(0x45e)](),this[_0x4ba133(0x78b)][_0x4ba133(0x367)]();},Window_BattleStatus['prototype'][_0x5bdce9(0x6df)]=function(_0x10f4cb){const _0x2540a5=_0x5bdce9;return this[_0x2540a5(0x4ef)](_0x10f4cb)-this[_0x2540a5(0xac3)]();},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0xb02)]=function(_0x14ff26){const _0x5dce67=_0x5bdce9;if(!VisuMZ[_0x5dce67(0x61c)]['Settings'][_0x5dce67(0x40f)][_0x5dce67(0x2d0)])return;const _0x1fc57f=this[_0x5dce67(0xad6)](_0x14ff26),_0x5dd3c2=this[_0x5dce67(0x5c3)](_0x14ff26);_0x5dd3c2['width']=ImageManager[_0x5dce67(0x2a8)],_0x5dd3c2[_0x5dce67(0x3b0)]-=0x2,this['drawActorFace'](_0x1fc57f,_0x5dd3c2['x']+0x1,_0x5dd3c2['y']+0x1,_0x5dd3c2[_0x5dce67(0x3b2)],_0x5dd3c2[_0x5dce67(0x3b0)]);},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x97c)]=function(_0x4d5918){const _0x2420ec=_0x5bdce9,_0x8ec7b0=VisuMZ[_0x2420ec(0x61c)][_0x2420ec(0x76e)][_0x2420ec(0x40f)],_0xccd63b=$dataSystem[_0x2420ec(0x5cf)]?0x4:0x3,_0x59bd1e=_0xccd63b*0x80+(_0xccd63b-0x1)*0x8+0x4,_0x3b2efb=this[_0x2420ec(0xad6)](_0x4d5918),_0x19b8fb=this['itemRect'](_0x4d5918);let _0xbab5d4=_0x19b8fb['x']+this[_0x2420ec(0xaff)];if(_0x8ec7b0[_0x2420ec(0x2d0)]){if(_0x2420ec(0x543)==='ScnIJ')_0xbab5d4=_0x19b8fb['x']+ImageManager[_0x2420ec(0x2a8)]+0x8;else{if(this[_0x2420ec(0x1f3)][_0x2420ec(0x1ba)]!==_0x17902a)return this[_0x2420ec(0x1f3)][_0x2420ec(0x1ba)];if(this[_0x2420ec(0xad6)]()[_0x2420ec(0x664)][_0x2420ec(0x16b)](/<SIDEVIEW SHOW SHADOW>/i))this[_0x2420ec(0x1f3)][_0x2420ec(0x1ba)]=!![];else this[_0x2420ec(0xad6)]()[_0x2420ec(0x664)][_0x2420ec(0x16b)](/<SIDEVIEW HIDE SHADOW>/i)?this[_0x2420ec(0x1f3)][_0x2420ec(0x1ba)]=![]:this[_0x2420ec(0x1f3)][_0x2420ec(0x1ba)]=_0x1005dc[_0x2420ec(0x768)][_0x2420ec(0x892)][_0x2420ec(0x4b1)](this);return this[_0x2420ec(0x1f3)]['svShadow'];}}else _0xbab5d4+=ImageManager[_0x2420ec(0x9e1)];const _0x4d5a58=Math[_0x2420ec(0xb3f)](Math['min'](_0x19b8fb['x']+_0x19b8fb['width']-_0x59bd1e,_0xbab5d4)),_0x1b4f5e=Math[_0x2420ec(0xb3f)](_0x19b8fb['y']+(_0x19b8fb[_0x2420ec(0x3b0)]-Sprite_Name[_0x2420ec(0x768)][_0x2420ec(0x8db)]())/0x2),_0x533364=Math[_0x2420ec(0xb3f)](_0x4d5a58-ImageManager[_0x2420ec(0x9e1)]/0x2-0x4),_0x40abc6=Math['round'](_0x19b8fb['y']+(_0x19b8fb[_0x2420ec(0x3b0)]-ImageManager[_0x2420ec(0x8a0)])/0x2+ImageManager['iconHeight']/0x2);let _0x4d78cb=_0x4d5a58+0x88;const _0x32150a=_0x1b4f5e;this[_0x2420ec(0x61d)](_0x3b2efb,_0x4d5a58-0x4+(_0x8ec7b0['TpbGaugeOffsetX']||0x0),_0x1b4f5e+(_0x8ec7b0[_0x2420ec(0x96d)]||0x0)),this[_0x2420ec(0x11d)](_0x3b2efb,_0x4d5a58+(_0x8ec7b0[_0x2420ec(0x623)]||0x0),_0x1b4f5e+(_0x8ec7b0[_0x2420ec(0xa8b)]||0x0)),this[_0x2420ec(0x27a)](_0x3b2efb,_0x533364+(_0x8ec7b0[_0x2420ec(0x2b9)]||0x0),_0x40abc6+(_0x8ec7b0[_0x2420ec(0x539)]||0x0)),this[_0x2420ec(0x198)](_0x3b2efb,'hp',_0x4d78cb+0x88*0x0+(_0x8ec7b0['HpGaugeOffsetX']||0x0),_0x32150a+(_0x8ec7b0[_0x2420ec(0x3b3)]||0x0)),this[_0x2420ec(0x198)](_0x3b2efb,'mp',_0x4d78cb+0x88*0x1+(_0x8ec7b0['MpGaugeOffsetX']||0x0),_0x32150a+(_0x8ec7b0[_0x2420ec(0x138)]||0x0)),$dataSystem[_0x2420ec(0x5cf)]&&(_0x2420ec(0x6f3)!=='CCHzZ'?(_0x4332f2[_0x2420ec(0x70c)](_0x3a86dd),this['callNextMethod']()):this[_0x2420ec(0x198)](_0x3b2efb,'tp',_0x4d78cb+0x88*0x2+(_0x8ec7b0['TpGaugeOffsetX']||0x0),_0x32150a+(_0x8ec7b0[_0x2420ec(0x10c)]||0x0)));},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x2b5)]=function(_0x11bf8e){const _0x5d7139=_0x5bdce9;if(!$gameSystem['isSideView']())return;VisuMZ[_0x5d7139(0x61c)][_0x5d7139(0x408)][_0x5d7139(0x4b1)](this,_0x11bf8e);},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x8e5)]=function(_0x34cabc){const _0x3dcb9a=_0x5bdce9,_0x236d16=VisuMZ[_0x3dcb9a(0x61c)][_0x3dcb9a(0x76e)][_0x3dcb9a(0x40f)],_0x4138bb=this[_0x3dcb9a(0xad6)](_0x34cabc),_0x2e5824=this[_0x3dcb9a(0x5c3)](_0x34cabc),_0x1482a2=Math[_0x3dcb9a(0xb3f)](_0x2e5824['x']+(_0x2e5824[_0x3dcb9a(0x3b2)]-0x80)/0x2),_0x2dea7d=this[_0x3dcb9a(0x6df)](_0x2e5824);let _0x37e902=_0x1482a2-ImageManager[_0x3dcb9a(0x9e1)]/0x2-0x4,_0x462409=_0x2dea7d+ImageManager[_0x3dcb9a(0x8a0)]/0x2;_0x37e902-ImageManager[_0x3dcb9a(0x9e1)]/0x2<_0x2e5824['x']&&(_0x37e902=_0x1482a2+ImageManager[_0x3dcb9a(0x9e1)]/0x2-0x4,_0x462409=_0x2dea7d-ImageManager[_0x3dcb9a(0x8a0)]/0x2);const _0x2ab9a4=_0x1482a2,_0x338df5=this[_0x3dcb9a(0x4ef)](_0x2e5824);this[_0x3dcb9a(0x61d)](_0x4138bb,_0x1482a2+(_0x236d16[_0x3dcb9a(0x7d0)]||0x0),_0x2dea7d+(_0x236d16[_0x3dcb9a(0x96d)]||0x0)),this['placeActorName'](_0x4138bb,_0x1482a2+(_0x236d16['NameOffsetX']||0x0),_0x2dea7d+(_0x236d16[_0x3dcb9a(0xa8b)]||0x0)),this[_0x3dcb9a(0x27a)](_0x4138bb,_0x37e902+(_0x236d16['StateIconOffsetX']||0x0),_0x462409+(_0x236d16[_0x3dcb9a(0x539)]||0x0)),this[_0x3dcb9a(0x198)](_0x4138bb,'hp',_0x2ab9a4+(_0x236d16['HpGaugeOffsetX']||0x0),_0x338df5+(_0x236d16['HpGaugeOffsetY']||0x0)),this[_0x3dcb9a(0x198)](_0x4138bb,'mp',_0x2ab9a4+(_0x236d16[_0x3dcb9a(0x80e)]||0x0),_0x338df5+this[_0x3dcb9a(0xac3)]()+(_0x236d16['MpGaugeOffsetY']||0x0)),$dataSystem[_0x3dcb9a(0x5cf)]&&this[_0x3dcb9a(0x198)](_0x4138bb,'tp',_0x2ab9a4+(_0x236d16[_0x3dcb9a(0x7d2)]||0x0),_0x338df5+this['gaugeLineHeight']()*0x2+(_0x236d16['TpGaugeOffsetY']||0x0));},Window_BattleStatus[_0x5bdce9(0x768)]['showPortraits']=function(_0x193a2a){const _0x55ae75=_0x5bdce9;if(!VisuMZ[_0x55ae75(0x61c)][_0x55ae75(0x76e)]['BattleLayout']['ShowPortraits'])return![];if(_0x193a2a[_0x55ae75(0x67d)]())return!![];return Imported[_0x55ae75(0x44c)]&&_0x193a2a[_0x55ae75(0x3e6)]();},Game_Actor[_0x5bdce9(0x768)][_0x5bdce9(0x44e)]=function(){const _0x5396d4=_0x5bdce9;if(this['actor']()[_0x5396d4(0x664)][_0x5396d4(0x16b)](/<BATTLE (?:IMAGE|PORTRAIT) OFFSET X:[ ]([\+\-]\d+)>/i))return Number(RegExp['$1']);else{if(this[_0x5396d4(0xad6)]()[_0x5396d4(0x664)][_0x5396d4(0x16b)](/<BATTLE (?:IMAGE|PORTRAIT) OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i)){if('gqVFW'!=='sXTxj')return Number(RegExp['$1']);else _0x4cae9b[_0x5396d4(0x61c)][_0x5396d4(0x3aa)]['call'](this,_0x42205b),this[_0x5396d4(0x670)]();}}return 0x0;},Game_Actor[_0x5bdce9(0x768)]['getBattlePortraitOffsetY']=function(){const _0x1abc85=_0x5bdce9;if(this['actor']()[_0x1abc85(0x664)][_0x1abc85(0x16b)](/<BATTLE (?:IMAGE|PORTRAIT) OFFSET Y:[ ]([\+\-]\d+)>/i))return Number(RegExp['$1']);else{if(this[_0x1abc85(0xad6)]()[_0x1abc85(0x664)][_0x1abc85(0x16b)](/<BATTLE (?:IMAGE|PORTRAIT) OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i))return Number(RegExp['$2']);}return 0x0;},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x8d3)]=function(_0x5122ef){const _0x340257=_0x5bdce9,_0x4dc2d6=this[_0x340257(0xad6)](_0x5122ef);if(this['showPortraits'](_0x4dc2d6)){const _0x2b48a7=_0x340257(0x55a)[_0x340257(0x824)](_0x4dc2d6[_0x340257(0x19e)]()),_0xc12381=this[_0x340257(0x803)](_0x2b48a7,Sprite),_0x2a1e12=_0x4dc2d6[_0x340257(0x4cc)]();if(_0x2a1e12!==''){if(_0x340257(0x9e9)!==_0x340257(0x482))_0xc12381[_0x340257(0x454)]=ImageManager['loadPicture'](_0x2a1e12);else{if(!_0x3b6159[_0x340257(0x5ea)]())return;if(!_0x391243[_0x340257(0x27b)])return;const _0x188a8f=_0x106276[_0x340257(0xb48)]();if(!_0x188a8f)return;_0x188a8f['setWaitMode']('battleSkew');}}else _0xc12381[_0x340257(0x454)]=ImageManager[_0x340257(0x9a5)];const _0x143cc7=this['itemRect'](_0x5122ef);_0xc12381['anchor']['x']=0.5,_0xc12381[_0x340257(0x887)]['y']=0x1;let _0x3015e7=Math[_0x340257(0xb3f)](_0x143cc7['x']+_0x143cc7['width']/0x2)+this[_0x340257(0xaff)];_0x3015e7+=_0x4dc2d6[_0x340257(0x44e)]();let _0x54495a=Math[_0x340257(0xb3f)](this[_0x340257(0x3b0)]);_0x54495a+=_0x4dc2d6[_0x340257(0x3ca)](),_0xc12381['move'](_0x3015e7,_0x54495a);const _0x10fbd6=VisuMZ[_0x340257(0x61c)][_0x340257(0x76e)][_0x340257(0x40f)][_0x340257(0xa89)];_0xc12381[_0x340257(0x91d)]['x']=_0x10fbd6,_0xc12381[_0x340257(0x91d)]['y']=_0x10fbd6,_0xc12381[_0x340257(0x243)]();}else{const _0x484feb=this['faceRect'](_0x5122ef);this['drawActorFace'](_0x4dc2d6,_0x484feb['x'],_0x484feb['y'],_0x484feb[_0x340257(0x3b2)],_0x484feb[_0x340257(0x3b0)]);}},Window_BattleStatus['prototype']['createInnerPortrait']=function(_0x3fc6d7,_0x992ccd){const _0x44c251=_0x5bdce9,_0x444567=this[_0x44c251(0x83d)];if(_0x444567[_0x3fc6d7])return _0x444567[_0x3fc6d7];else{if(_0x44c251(0x402)!=='bdlXn'){const _0x551715=new _0x992ccd();return _0x444567[_0x3fc6d7]=_0x551715,this[_0x44c251(0x475)](_0x551715),this[_0x44c251(0x475)](this['_cursorArea']),_0x551715;}else _0x439019[_0x44c251(0x61c)][_0x44c251(0xde)][_0x44c251(0x4b1)](this,_0x195a9b,_0xc7864e);}},Window_BattleStatus['prototype']['_createClientArea']=function(){const _0x477b1a=_0x5bdce9;this[_0x477b1a(0x951)](),this['_createEffectsContainer'](),Window_StatusBase[_0x477b1a(0x768)][_0x477b1a(0x719)]['call'](this),this['_createDamageContainer']();},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x951)]=function(){const _0x5435a0=_0x5bdce9;this[_0x5435a0(0x159)]=new Sprite(),this[_0x5435a0(0x159)][_0x5435a0(0x25b)]=[new PIXI[(_0x5435a0(0x25b))]['AlphaFilter']()],this[_0x5435a0(0x159)][_0x5435a0(0x457)]=new Rectangle(),this[_0x5435a0(0x159)]['move'](this[_0x5435a0(0x602)],this[_0x5435a0(0x602)]),this['addChild'](this[_0x5435a0(0x159)]);},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x12f)]=function(){const _0x594029=_0x5bdce9;this[_0x594029(0x122)]=new Sprite(),this['addChild'](this[_0x594029(0x122)]);},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x84c)]=function(){const _0x223eec=_0x5bdce9;this[_0x223eec(0x122)]&&(_0x223eec(0xada)!==_0x223eec(0xada)?_0x451981[_0x223eec(0x61c)]['Settings'][_0x223eec(0xe6)]['HomePosJS'][_0x223eec(0x4b1)](this,_0x14846d):this[_0x223eec(0xa8d)](this[_0x223eec(0x122)]));},Window_BattleStatus['prototype'][_0x5bdce9(0x4b6)]=function(){const _0x1ff1b8=_0x5bdce9;this[_0x1ff1b8(0x3ad)]=new Sprite(),this['addChild'](this['_damageContainer']);},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x28a)]=function(){const _0x5181ef=_0x5bdce9;this[_0x5181ef(0x62c)]=new Sprite();for(let _0x46bb9c=0x0;_0x46bb9c<0x9;_0x46bb9c++){this[_0x5181ef(0x62c)]['addChild'](new Sprite());}this[_0x5181ef(0x159)][_0x5181ef(0xa8d)](this[_0x5181ef(0x62c)]);},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0xb5f)]=function(){const _0x449d5e=_0x5bdce9;Window_StatusBase[_0x449d5e(0x768)]['_updateClientArea'][_0x449d5e(0x4b1)](this),this['_updateCursorArea']();},Window_BattleStatus['prototype'][_0x5bdce9(0x22f)]=function(){const _0x3c1d02=_0x5bdce9,_0x3649aa=this[_0x3c1d02(0x602)];this[_0x3c1d02(0x159)]['move'](_0x3649aa,_0x3649aa),this['_cursorArea']['x']=_0x3649aa-this[_0x3c1d02(0xa6b)]['x'],this[_0x3c1d02(0x159)]['y']=_0x3649aa-this[_0x3c1d02(0xa6b)]['y'],this[_0x3c1d02(0x1fb)]>0x0&&this[_0x3c1d02(0x98f)]>0x0?this[_0x3c1d02(0x159)][_0x3c1d02(0x8e1)]=this[_0x3c1d02(0x931)]():this[_0x3c1d02(0x159)][_0x3c1d02(0x8e1)]=![];},Window_BattleStatus['prototype']['_updateFilterArea']=function(){const _0x1ffecb=_0x5bdce9;Window_StatusBase[_0x1ffecb(0x768)][_0x1ffecb(0x7cb)]['call'](this),this[_0x1ffecb(0x488)]();},Window_BattleStatus['prototype'][_0x5bdce9(0x488)]=function(){const _0x3b2455=_0x5bdce9,_0x33d138=this[_0x3b2455(0x159)][_0x3b2455(0x938)]['apply'](new Point(0x0,0x0)),_0x29f85e=this[_0x3b2455(0x159)][_0x3b2455(0x457)];_0x29f85e['x']=_0x33d138['x']+this[_0x3b2455(0xa6b)]['x'],_0x29f85e['y']=_0x33d138['y']+this[_0x3b2455(0xa6b)]['y'],_0x29f85e['width']=this[_0x3b2455(0x1fb)],_0x29f85e['height']=this[_0x3b2455(0x98f)];},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x4b8)]=function(_0x5aba2e){const _0x5f062c=_0x5bdce9;if(this[_0x5f062c(0x19d)]()!==_0x5f062c(0x71f))return;this[_0x5f062c(0x8d3)](_0x5aba2e['index']());},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x50b)]=function(_0xba96d9,_0x285463){const _0x41ab43=_0x5bdce9;if(!this[_0x41ab43(0x3ad)])return;if(!_0xba96d9)return;if(!_0x285463)return;const _0x2e37fe=this[_0x41ab43(0x5c3)](_0x285463[_0x41ab43(0x1fd)]());_0x2e37fe['x']+=_0x2e37fe[_0x41ab43(0x3b2)]/0x2+this[_0x41ab43(0xaff)],_0xba96d9['x']=_0x2e37fe['x'],_0xba96d9['y']=_0x2e37fe['y'],this[_0x41ab43(0x3ad)][_0x41ab43(0xa8d)](_0xba96d9);},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x368)]=function(_0x48f8e6){const _0x9ef6a1=_0x5bdce9;if(!this['_damageContainer'])return;if(!_0x48f8e6)return;this[_0x9ef6a1(0x3ad)][_0x9ef6a1(0x18f)](_0x48f8e6);},Window_BattleStatus['prototype']['updateBorderStyle']=function(){const _0x20b200=_0x5bdce9;if(!this[_0x20b200(0xfd)]())return;if(!this[_0x20b200(0x65c)])this['createBorderStylePortraitSprite']();this[_0x20b200(0x819)](),this[_0x20b200(0x2e5)]();},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0xfd)]=function(){const _0x5348dc=_0x5bdce9;if(this[_0x5348dc(0x56d)]!==Window_BattleStatus)return![];if(!SceneManager[_0x5348dc(0x5ea)]())return![];return VisuMZ[_0x5348dc(0x61c)][_0x5348dc(0x76e)][_0x5348dc(0x40f)]['ShowPortraitsBorderStyle'];},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0xabc)]=function(){const _0x4c074b=_0x5bdce9;this[_0x4c074b(0x65c)]=new Sprite();const _0x4b5a97=SceneManager[_0x4c074b(0x352)],_0x37f68b=_0x4b5a97[_0x4c074b(0x317)][_0x4c074b(0x977)](_0x4b5a97[_0x4c074b(0xb84)]);_0x4b5a97['addChildAt'](this[_0x4c074b(0x65c)],_0x37f68b),this['_borderPortraitSprite']['anchor']['x']=0.5,this[_0x4c074b(0x65c)]['anchor']['y']=0x1;const _0xed99be=VisuMZ[_0x4c074b(0x61c)][_0x4c074b(0x76e)][_0x4c074b(0x40f)]['PortraitScaleBorderStyle'];this[_0x4c074b(0x65c)][_0x4c074b(0x91d)]['x']=_0xed99be,this[_0x4c074b(0x65c)][_0x4c074b(0x91d)]['y']=_0xed99be,this[_0x4c074b(0x65c)]['y']=this['y']+this[_0x4c074b(0x3b0)],this[_0x4c074b(0x2c2)]=0x0;},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x819)]=function(){const _0x1a2ed8=_0x5bdce9;this[_0x1a2ed8(0x65c)][_0x1a2ed8(0x8e1)]=BattleManager[_0x1a2ed8(0x923)]();const _0x3ee298=BattleManager[_0x1a2ed8(0xad6)]();if(_0x3ee298===this[_0x1a2ed8(0x65c)][_0x1a2ed8(0xad6)])return;this[_0x1a2ed8(0x65c)]['actor']=_0x3ee298||this['_borderPortraitSprite'][_0x1a2ed8(0xad6)];if(!_0x3ee298)return;else{if(_0x3ee298[_0x1a2ed8(0x4cc)]()===''){this[_0x1a2ed8(0x65c)]['bitmap']=ImageManager[_0x1a2ed8(0x9a5)];return;}else{const _0x1c5320=ImageManager[_0x1a2ed8(0x255)](_0x3ee298[_0x1a2ed8(0x4cc)]());_0x1c5320[_0x1a2ed8(0x4e9)](this[_0x1a2ed8(0x721)][_0x1a2ed8(0x124)](this,_0x1c5320));}}},Window_BattleStatus['prototype'][_0x5bdce9(0x721)]=function(_0x1ce56e){const _0x146d80=_0x5bdce9;this[_0x146d80(0x2c2)]=0x14,this[_0x146d80(0x65c)][_0x146d80(0x454)]=_0x1ce56e;if(SceneManager[_0x146d80(0x352)][_0x146d80(0x396)]())this[_0x146d80(0x65c)]['x']=0x0,this[_0x146d80(0x5fb)]=Math[_0x146d80(0xa44)](_0x1ce56e[_0x146d80(0x3b2)]/0x2);else{if(_0x146d80(0x298)===_0x146d80(0x298))this[_0x146d80(0x65c)]['x']=this['width'],this[_0x146d80(0x5fb)]=this[_0x146d80(0x3b2)]*0x3/0x4;else for(const _0x5debb6 of _0x20f94f){_0x5debb6[_0x146d80(0x16b)](/<REGION (\d+) BATTLEBACK(\d+): (.*)>/i);const _0x2ef515=_0x9aa17a(_0x357c94['$1']),_0xb5f275=_0x46cc51(_0x1a7bd2['$2']),_0x45301f=_0xb5f275===0x1?this['_regionBattleback1']:this['_regionBattleback2'],_0x3e89e0=_0x4589c9(_0x294aa7['$3']);_0x45301f[_0x2ef515]=_0x3e89e0;}}this[_0x146d80(0x65c)][_0x146d80(0x867)]=0x0,this[_0x146d80(0x65c)]['y']=this['y']+this[_0x146d80(0x3b0)];const _0x5e4558=BattleManager[_0x146d80(0xad6)]();if(_0x5e4558){if(_0x146d80(0x627)==='dGyUD')this['_borderPortraitTargetX']+=_0x5e4558[_0x146d80(0x44e)](),this[_0x146d80(0x65c)]['y']+=_0x5e4558[_0x146d80(0x3ca)]();else{const _0x4660ff=this[_0x146d80(0x301)];_0x4660ff['drawText'](_0x59d213,0x0,_0x15a78a['y'],_0x4660ff[_0x146d80(0x1fb)],_0x146d80(0x4ed));}}},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x2e5)]=function(){const _0x57e36b=_0x5bdce9;if(this[_0x57e36b(0x2c2)]>0x0){const _0x17c7a2=this[_0x57e36b(0x2c2)],_0x2bc875=this[_0x57e36b(0x65c)];_0x2bc875['x']=(_0x2bc875['x']*(_0x17c7a2-0x1)+this[_0x57e36b(0x5fb)])/_0x17c7a2,_0x2bc875[_0x57e36b(0x867)]=(_0x2bc875[_0x57e36b(0x867)]*(_0x17c7a2-0x1)+0xff)/_0x17c7a2,this[_0x57e36b(0x2c2)]--;}},Window_BattleStatus['prototype'][_0x5bdce9(0x153)]=function(){const _0x57a778=_0x5bdce9;return;this[_0x57a778(0x122)]&&(this['_effectsContainer']['x']=this['x'],this[_0x57a778(0x122)]['y']=this['y']);if(this[_0x57a778(0x3ad)]){if('SbvDz'!==_0x57a778(0x15b))this['_damageContainer']['x']=this['x'],this[_0x57a778(0x3ad)]['y']=this['y'];else{const _0x2649aa=0xa,_0x689285=0x12c*_0x2649aa,_0x330aaa=0x1e*_0x2649aa;this[_0x57a778(0x120)](_0x689285,0x0,_0x330aaa);}}},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x5f8)]=function(){const _0x2319a8=_0x5bdce9,_0x2a0b38=VisuMZ[_0x2319a8(0x61c)][_0x2319a8(0x76e)]['BattleLayout'];if(_0x2a0b38[_0x2319a8(0x332)]){const _0x731cb2=new Sprite();_0x731cb2[_0x2319a8(0x454)]=ImageManager['loadSystem'](_0x2a0b38['StatusWindowAttachmentBack']),_0x731cb2['x']=_0x2a0b38[_0x2319a8(0x139)]||0x0,_0x731cb2['y']=_0x2a0b38['StatusWindowAttachmentBackOffsetY']||0x0,this[_0x2319a8(0x475)](_0x731cb2),this['_backAttachmentSprite']=_0x731cb2;}if(_0x2a0b38[_0x2319a8(0x830)]){if(_0x2319a8(0x5a3)===_0x2319a8(0x5a3)){const _0x166351=new Sprite();_0x166351[_0x2319a8(0x454)]=ImageManager[_0x2319a8(0x691)](_0x2a0b38['StatusWindowAttachmentFront']),_0x166351['x']=_0x2a0b38[_0x2319a8(0x584)]||0x0,_0x166351['y']=_0x2a0b38[_0x2319a8(0x500)]||0x0,this[_0x2319a8(0xa8d)](_0x166351),this[_0x2319a8(0xad9)]=_0x166351;}else _0x240821[_0x2319a8(0x61c)]['Scene_Battle_createPartyCommandWindow']['call'](this),this[_0x2319a8(0x9ce)]();}},Window_BattleStatus[_0x5bdce9(0x768)][_0x5bdce9(0x1a5)]=function(){const _0x1cd739=_0x5bdce9;this['_frontAttachmentSprite']&&this[_0x1cd739(0xa8d)](this[_0x1cd739(0xad9)]),this[_0x1cd739(0x66b)]&&this[_0x1cd739(0x475)](this[_0x1cd739(0x66b)]);},Window_BattleActor[_0x5bdce9(0x768)]['isOkEnabled']=function(){const _0x4fde5d=_0x5bdce9;return Window_BattleStatus[_0x4fde5d(0x768)][_0x4fde5d(0x653)][_0x4fde5d(0x4b1)](this)&&this['isActionSelectionValid']();},Window_BattleActor[_0x5bdce9(0x768)][_0x5bdce9(0x10a)]=function(){const _0x530664=_0x5bdce9,_0x404094=BattleManager['inputtingAction'](),_0x30a696=this[_0x530664(0xad6)](this['index']());if(!_0x404094)return!![];if(!_0x404094['item']())return!![];const _0x5d231f=_0x404094[_0x530664(0xa8a)]()[_0x530664(0x664)];if(_0x5d231f['match'](/<CANNOT TARGET (?:USER|SELF)>/i)){if('wrSbl'!=='bOOLy'){if(_0x30a696===BattleManager['actor']())return![];}else{const _0x442b54=this[_0x530664(0x101)](_0x1073e2),_0x372f7e=this['textSizeEx'](_0x3f4e5e)[_0x530664(0x3b2)];return _0x372f7e<=_0x442b54[_0x530664(0x3b2)]?_0x530664(0x5b1):_0x530664(0x98e);}}return!![];},VisuMZ['BattleCore']['Window_BattleEnemy_initialize']=Window_BattleEnemy['prototype'][_0x5bdce9(0x490)],Window_BattleEnemy['prototype']['initialize']=function(_0x3963dd){const _0x171538=_0x5bdce9;this['_lastEnemy']=null,VisuMZ['BattleCore'][_0x171538(0x2d3)][_0x171538(0x4b1)](this,_0x3963dd);},Window_BattleEnemy[_0x5bdce9(0x768)]['maxCols']=function(){const _0x443b70=_0x5bdce9;return this[_0x443b70(0x95a)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x6b9)]=Window_BattleEnemy[_0x5bdce9(0x768)]['show'],Window_BattleEnemy['prototype'][_0x5bdce9(0x243)]=function(){const _0x1270c9=_0x5bdce9;VisuMZ[_0x1270c9(0x61c)][_0x1270c9(0x6b9)][_0x1270c9(0x4b1)](this),this['y']=Graphics['height']*0xa;},Window_BattleEnemy[_0x5bdce9(0x768)][_0x5bdce9(0x28e)]=function(){const _0x44171f=_0x5bdce9;return $gameTroop[_0x44171f(0xed)]()['slice'](0x0);},Window_BattleEnemy['prototype']['refresh']=function(){const _0xf1987a=_0x5bdce9;this['_enemies']=this[_0xf1987a(0x28e)](),this[_0xf1987a(0x9a1)](),Window_Selectable[_0xf1987a(0x768)][_0xf1987a(0xf7)][_0xf1987a(0x4b1)](this);},Window_BattleEnemy[_0x5bdce9(0x768)]['sortEnemies']=function(){const _0x5dedc4=_0x5bdce9;this['_enemies'][_0x5dedc4(0xadb)]((_0x941882,_0x584579)=>{const _0x2248b7=_0x5dedc4;if('jVfWJ'===_0x2248b7(0xa75)){if(_0x941882[_0x2248b7(0xb0d)]()['_baseX']===_0x584579['battler']()['_baseX'])return _0x941882[_0x2248b7(0xb0d)]()['_baseY']-_0x584579['battler']()[_0x2248b7(0x4c9)];else{if(_0x2248b7(0xa66)==='GLVsm')return _0x941882[_0x2248b7(0xb0d)]()[_0x2248b7(0x8f0)]-_0x584579[_0x2248b7(0xb0d)]()['_baseX'];else this[_0x2248b7(0x6b2)]();}}else return this[_0x2248b7(0x29f)]();});if(SceneManager[_0x5dedc4(0x345)]()){if(_0x5dedc4(0x7de)===_0x5dedc4(0x1bc))return this[_0x5dedc4(0x87b)];else this[_0x5dedc4(0xa38)][_0x5dedc4(0x7f6)]();}},Window_BattleEnemy[_0x5bdce9(0x768)][_0x5bdce9(0x741)]=function(){const _0x509cb1=_0x5bdce9,_0x2e293c=VisuMZ['BattleCore']['Settings'][_0x509cb1(0x14a)];_0x2e293c['LastSelected']?this[_0x509cb1(0xd3)]():_0x509cb1(0x8b6)==='YkSMI'?this['autoSelectPriority']():this[_0x509cb1(0x120)](0x0,0x0,0xc);},Window_BattleEnemy[_0x5bdce9(0x768)][_0x5bdce9(0xd3)]=function(){const _0x55b253=_0x5bdce9;if(this[_0x55b253(0x9dc)]&&this[_0x55b253(0xa38)][_0x55b253(0x8ed)](this[_0x55b253(0x9dc)])){if(_0x55b253(0x9b1)==='qDOqr')this[_0x55b253(0x178)](_0x35b18e);else{const _0x2d0566=this[_0x55b253(0xa38)]['indexOf'](this[_0x55b253(0x9dc)]);this[_0x55b253(0x228)](_0x2d0566);}}else this['autoSelectPriority']();},Window_BattleEnemy[_0x5bdce9(0x768)][_0x5bdce9(0xb03)]=function(){const _0x2b6e47=_0x5bdce9,_0x4f8702=VisuMZ[_0x2b6e47(0x61c)][_0x2b6e47(0x76e)]['Enemy'];let _0x3dcb05=![];$gameSystem['isSideView']()?_0x3dcb05=_0x4f8702[_0x2b6e47(0x22a)]:_0x2b6e47(0x348)!==_0x2b6e47(0x348)?this['callNextMethod']():_0x3dcb05=_0x4f8702[_0x2b6e47(0x2fd)],this['forceSelect'](_0x3dcb05?this[_0x2b6e47(0x95a)]()-0x1:0x0);},Window_BattleEnemy[_0x5bdce9(0x768)][_0x5bdce9(0x5a4)]=function(){const _0x21b91b=_0x5bdce9;Window_Selectable[_0x21b91b(0x768)][_0x21b91b(0x5a4)][_0x21b91b(0x4b1)](this),this[_0x21b91b(0x9dc)]=this[_0x21b91b(0x1fc)]();},Window_BattleItem[_0x5bdce9(0x768)]['includes']=function(_0x10bfa9){const _0x2628b6=_0x5bdce9;if(!_0x10bfa9)return![];return _0x10bfa9[_0x2628b6(0x517)]===0x0||_0x10bfa9[_0x2628b6(0x517)]===0x1;};function Window_AutoBattleCancel(){const _0x5babb5=_0x5bdce9;this[_0x5babb5(0x490)](...arguments);}Window_AutoBattleCancel[_0x5bdce9(0x768)]=Object['create'](Window_Base[_0x5bdce9(0x768)]),Window_AutoBattleCancel[_0x5bdce9(0x768)][_0x5bdce9(0x56d)]=Window_AutoBattleCancel,Window_AutoBattleCancel['prototype'][_0x5bdce9(0x490)]=function(_0x3e3215){const _0x2a50bd=_0x5bdce9;Window_Base[_0x2a50bd(0x768)][_0x2a50bd(0x490)][_0x2a50bd(0x4b1)](this,_0x3e3215),this[_0x2a50bd(0xa69)](this[_0x2a50bd(0xa92)]()),this[_0x2a50bd(0xf7)]();},Window_AutoBattleCancel['prototype'][_0x5bdce9(0xa92)]=function(){const _0xa077ea=_0x5bdce9;return VisuMZ[_0xa077ea(0x61c)][_0xa077ea(0x76e)]['AutoBattle'][_0xa077ea(0x4f9)];},Window_AutoBattleCancel['prototype'][_0x5bdce9(0xf7)]=function(){const _0x36f6b4=_0x5bdce9;this['contents']['clear']();const _0x4d1449=VisuMZ[_0x36f6b4(0x61c)][_0x36f6b4(0x76e)][_0x36f6b4(0xa97)]['AutoBattleMsg'],_0x19478d=_0x4d1449['format'](this[_0x36f6b4(0xac1)](),this[_0x36f6b4(0x448)]()),_0x40b20c=this[_0x36f6b4(0xa5d)](_0x19478d)[_0x36f6b4(0x3b2)],_0x4ffcbf=Math[_0x36f6b4(0x618)]((this['innerWidth']-_0x40b20c)/0x2);this[_0x36f6b4(0x723)](_0x19478d,_0x4ffcbf,0x0,_0x40b20c);},Window_AutoBattleCancel[_0x5bdce9(0x768)]['okButtonText']=function(){const _0x4b7f3f=_0x5bdce9;if(Imported[_0x4b7f3f(0x9f2)])return TextManager[_0x4b7f3f(0x67c)]('ok');else{if(_0x4b7f3f(0x959)===_0x4b7f3f(0x81e))this['_customDamageFormula']=_0x1cee3b;else return VisuMZ[_0x4b7f3f(0x61c)]['Settings']['AutoBattle'][_0x4b7f3f(0x990)];}},Window_AutoBattleCancel[_0x5bdce9(0x768)][_0x5bdce9(0x448)]=function(){const _0x2ffa41=_0x5bdce9;if(Imported[_0x2ffa41(0x9f2)]){if(_0x2ffa41(0x9a4)!==_0x2ffa41(0x22d))return TextManager['getInputButtonString'](_0x2ffa41(0x5c1));else{if(!this['_onceParallelInterpreters'])return;for(const _0x257186 of this[_0x2ffa41(0xb6a)]){_0x257186&&_0x257186[_0x2ffa41(0x367)]();}}}else return VisuMZ[_0x2ffa41(0x61c)][_0x2ffa41(0x76e)][_0x2ffa41(0xa97)][_0x2ffa41(0x5b9)];},Window_AutoBattleCancel[_0x5bdce9(0x768)][_0x5bdce9(0x367)]=function(){const _0xa8dc18=_0x5bdce9;Window_Base[_0xa8dc18(0x768)][_0xa8dc18(0x367)][_0xa8dc18(0x4b1)](this),this[_0xa8dc18(0x9d0)](),this['updateCancel']();},Window_AutoBattleCancel['prototype'][_0x5bdce9(0x9d0)]=function(){const _0x259bd0=_0x5bdce9;this[_0x259bd0(0x8e1)]=BattleManager[_0x259bd0(0xb63)];},Window_AutoBattleCancel[_0x5bdce9(0x768)]['updateCancel']=function(){const _0x443085=_0x5bdce9;if(!BattleManager[_0x443085(0xb63)])return;(Input['isTriggered']('ok')||Input[_0x443085(0x5de)]('cancel')||TouchInput[_0x443085(0x1e8)]()||TouchInput[_0x443085(0x7c0)]())&&(SoundManager[_0x443085(0x279)](),BattleManager['_autoBattle']=![],Input[_0x443085(0x89d)](),TouchInput[_0x443085(0x89d)]());};function Window_EnemyName(){this['initialize'](...arguments);}Window_EnemyName[_0x5bdce9(0x768)]=Object[_0x5bdce9(0xdf)](Window_StatusBase[_0x5bdce9(0x768)]),Window_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x56d)]=Window_EnemyName,Window_EnemyName['prototype'][_0x5bdce9(0x490)]=function(_0x181b2f){const _0x504363=_0x5bdce9;this[_0x504363(0x47b)]=_0x181b2f,this[_0x504363(0x6f5)]='';const _0x45dd1c=new Rectangle(0x0,0x0,Graphics[_0x504363(0x7fb)],this[_0x504363(0x429)]()*0x4);Window_StatusBase[_0x504363(0x768)][_0x504363(0x490)][_0x504363(0x4b1)](this,_0x45dd1c),this[_0x504363(0xa69)](0x2),this[_0x504363(0xb29)]=0x0;},Window_EnemyName[_0x5bdce9(0x768)]['updatePadding']=function(){const _0x22b5b2=_0x5bdce9;this[_0x22b5b2(0xaff)]=0x0;},Window_EnemyName[_0x5bdce9(0x768)]['enemy']=function(){const _0xc1f336=_0x5bdce9;return $gameTroop[_0xc1f336(0x2b7)]()[this[_0xc1f336(0x47b)]];},Window_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x367)]=function(){const _0x454990=_0x5bdce9;Window_StatusBase[_0x454990(0x768)][_0x454990(0x367)]['call'](this),this['enemy']()&&this['enemy']()['name']()!==this[_0x454990(0x6f5)]&&(this[_0x454990(0x6f5)]=this[_0x454990(0x1fc)]()[_0x454990(0x74e)](),this[_0x454990(0xf7)]()),this[_0x454990(0x4f8)](),this[_0x454990(0x37f)]();},Window_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x4f8)]=function(){const _0x15736c=_0x5bdce9;if(!this[_0x15736c(0x1fc)]()){if(_0x15736c(0x2fc)==='AdhXf'){if(this['contentsOpacity']>0x0)this[_0x15736c(0xb29)]-=0x10;}else this['_weather'][_0x15736c(0x900)]=_0x412f4a[_0x15736c(0x6f9)](),this[_0x15736c(0xa7b)][_0x15736c(0x64d)]=_0x86e55f[_0x15736c(0xb5a)]();}else{if(this['enemy']()[_0x15736c(0x9a3)]()){if(_0x15736c(0x5b3)!==_0x15736c(0x5b3)){if(this[_0x15736c(0x9ba)]<=0x0)return;if(!this[_0x15736c(0xa9b)])return;const _0x45bcbf=this[_0x15736c(0x9ba)],_0x2b3b91=this[_0x15736c(0xaf4)],_0x59f2ac=this[_0x15736c(0x729)];_0x37cc50[_0x15736c(0x9f2)]?(this[_0x15736c(0x326)]=this[_0x15736c(0x99a)](this[_0x15736c(0x326)],this[_0x15736c(0x4a9)],_0x45bcbf,_0x2b3b91,_0x59f2ac),this[_0x15736c(0x461)]=this[_0x15736c(0x99a)](this['_growY'],this[_0x15736c(0x739)],_0x45bcbf,_0x2b3b91,_0x59f2ac)):(this['_growX']=(this[_0x15736c(0x326)]*(_0x45bcbf-0x1)+this['_targetGrowX'])/_0x45bcbf,this['_growY']=(this[_0x15736c(0x461)]*(_0x45bcbf-0x1)+this[_0x15736c(0x739)])/_0x45bcbf);this['_growDuration']--;if(this['_growDuration']<=0x0)this['onGrowEnd']();}else{if(this['contentsOpacity']>0x0)this['contentsOpacity']-=0x10;}}else{if(SceneManager[_0x15736c(0x352)]['_enemyWindow']&&SceneManager['_scene'][_0x15736c(0x22b)][_0x15736c(0x672)]&&SceneManager[_0x15736c(0x352)][_0x15736c(0x22b)][_0x15736c(0xa38)][_0x15736c(0x8ed)](this['enemy']())){if(this[_0x15736c(0xb29)]<0xff)this[_0x15736c(0xb29)]+=0x10;}else this[_0x15736c(0xb29)]>0x0&&(this['contentsOpacity']-=0x10);}}},Window_EnemyName['prototype'][_0x5bdce9(0x37f)]=function(){const _0x2a8fc6=_0x5bdce9;if(!this[_0x2a8fc6(0x1fc)]())return;SceneManager[_0x2a8fc6(0x345)]()?_0x2a8fc6(0x6d9)===_0x2a8fc6(0x2ff)?this['autoBattleUseSkills']=![]:this['x']=Graphics[_0x2a8fc6(0x7fb)]-this[_0x2a8fc6(0x1fc)]()[_0x2a8fc6(0xb0d)]()[_0x2a8fc6(0x8f0)]:_0x2a8fc6(0x560)!==_0x2a8fc6(0x7dc)?this['x']=this[_0x2a8fc6(0x1fc)]()[_0x2a8fc6(0xb0d)]()[_0x2a8fc6(0x8f0)]:_0xdabf76+=_0x496718;this['x']-=Math['round'](this['width']/0x2),this['y']=this[_0x2a8fc6(0x1fc)]()['battler']()[_0x2a8fc6(0x4c9)]-Math[_0x2a8fc6(0xb3f)](this['lineHeight']()*1.5);const _0x2a1c76=VisuMZ[_0x2a8fc6(0x61c)][_0x2a8fc6(0x76e)][_0x2a8fc6(0x14a)];this['x']+=_0x2a1c76['NameOffsetX']||0x0,this['y']+=_0x2a1c76[_0x2a8fc6(0xa8b)]||0x0;},Window_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x689)]=function(){const _0x2ec0af=_0x5bdce9;Window_Base[_0x2ec0af(0x768)]['resetFontSettings'][_0x2ec0af(0x4b1)](this),this[_0x2ec0af(0xb32)]['fontSize']=VisuMZ[_0x2ec0af(0x61c)][_0x2ec0af(0x76e)][_0x2ec0af(0x14a)][_0x2ec0af(0x760)];},Window_EnemyName['prototype']['refresh']=function(){const _0x1de456=_0x5bdce9;Window_StatusBase['prototype']['refresh']['call'](this),this['contents']['clear']();if(!this['enemy']())return;this[_0x1de456(0x1ad)]();},Window_EnemyName[_0x5bdce9(0x768)][_0x5bdce9(0x1ad)]=function(){const _0xbb44c1=_0x5bdce9;this[_0xbb44c1(0x6f5)]=this[_0xbb44c1(0x1fc)]()[_0xbb44c1(0x74e)]();const _0x4d23aa=this[_0xbb44c1(0xa5d)](this[_0xbb44c1(0x6f5)])[_0xbb44c1(0x3b2)],_0x32df94=Math[_0xbb44c1(0xb3f)]((this[_0xbb44c1(0x1fb)]-_0x4d23aa)/0x2);this['drawTextEx'](this['_text'],_0x32df94,0x0,_0x4d23aa+0x8);},Window_BattleLog['prototype'][_0x5bdce9(0x574)]=function(){const _0x524dba=_0x5bdce9;return VisuMZ[_0x524dba(0x61c)][_0x524dba(0x76e)][_0x524dba(0x2c4)][_0x524dba(0x93c)];},Window_BattleLog['prototype'][_0x5bdce9(0x94b)]=function(){const _0x2f3579=_0x5bdce9;return VisuMZ['BattleCore'][_0x2f3579(0x76e)][_0x2f3579(0x2c4)]['MessageWait'];},Window_BattleLog[_0x5bdce9(0x768)]['backColor']=function(){const _0x518a79=_0x5bdce9;return VisuMZ[_0x518a79(0x61c)][_0x518a79(0x76e)][_0x518a79(0x2c4)][_0x518a79(0xb44)];},Window_BattleLog['prototype'][_0x5bdce9(0xb61)]=function(){return![];},Window_BattleLog[_0x5bdce9(0x768)]['actionEffect']=function(_0x296959,_0x1c66b5){const _0x60bc60=_0x5bdce9;this[_0x60bc60(0x1d2)]('actionSplicePoint'),BattleManager[_0x60bc60(0x8cd)](_0x296959,_0x1c66b5),this[_0x60bc60(0x670)]();},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x753)]=function(){const _0x3ba24c=_0x5bdce9;this[_0x3ba24c(0x670)]();},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x838)]=function(_0x7530c2){const _0x430321=_0x5bdce9,_0x58851a=Array['prototype']['slice'][_0x430321(0x4b1)](arguments,0x1),_0x834f3b={'name':_0x7530c2,'params':_0x58851a},_0x56e6bc=this[_0x430321(0xa2b)]['map'](_0x28ba98=>_0x28ba98[_0x430321(0x74e)])[_0x430321(0x977)]('actionSplicePoint');if(_0x56e6bc>=0x0){if(_0x430321(0x4a3)===_0x430321(0x7c5)){const _0x4122fa=_0x400313[_0x49f5bd];if(!_0x4122fa)return'';let _0x5913e6='';_0x5913e6+=_0x4122fa['name'];for(const _0x50e30f of _0x4122fa[_0x430321(0x4b9)]){for(const _0xea89c5 of _0x50e30f[_0x430321(0x3cd)]){[0x6c,0x198]['includes'](_0xea89c5[_0x430321(0xabe)])&&(_0x5913e6+='\x0a',_0x5913e6+=_0xea89c5['parameters'][0x0]);}}return _0x5913e6;}else this[_0x430321(0xa2b)][_0x430321(0x532)](_0x56e6bc,0x0,_0x834f3b);}else{if('GZUrh'!==_0x430321(0x246))return!this[_0x430321(0x581)]()&&!this[_0x430321(0x63b)]();else this[_0x430321(0xa2b)]['push'](_0x834f3b);}},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x1d2)]=function(_0x469469){const _0x3c53a1=_0x5bdce9,_0x3d26a4=Array[_0x3c53a1(0x768)][_0x3c53a1(0x2ca)][_0x3c53a1(0x4b1)](arguments,0x1);this[_0x3c53a1(0xa2b)]['unshift']({'name':_0x469469,'params':_0x3d26a4});},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x105)]=function(){const _0x358f7c=_0x5bdce9;if(!$gameTemp[_0x358f7c(0x466)]())return;console['log'](this[_0x358f7c(0xa2b)][_0x358f7c(0x782)](_0x114425=>_0x114425[_0x358f7c(0x74e)])[_0x358f7c(0x9be)]('\x0a'));},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x681)]=Window_BattleLog['prototype'][_0x5bdce9(0xf7)],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xf7)]=function(){const _0x5eda46=_0x5bdce9;this[_0x5eda46(0x764)]=!![];},VisuMZ[_0x5bdce9(0x61c)]['Window_BattleLog_update']=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x367)],Window_BattleLog[_0x5bdce9(0x768)]['update']=function(){const _0x227262=_0x5bdce9;VisuMZ[_0x227262(0x61c)][_0x227262(0x616)][_0x227262(0x4b1)](this);if(this[_0x227262(0x764)])this[_0x227262(0xb1b)]();},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xb1b)]=function(){const _0x3f4ad4=_0x5bdce9;this[_0x3f4ad4(0x764)]=![],VisuMZ[_0x3f4ad4(0x61c)][_0x3f4ad4(0x681)]['call'](this);},Window_BattleLog['prototype'][_0x5bdce9(0x834)]=function(_0x2d62b5){const _0x1162c5=_0x5bdce9;let _0x38e396=VisuMZ[_0x1162c5(0x61c)][_0x1162c5(0x76e)][_0x1162c5(0x2c4)]['TextAlign'][_0x1162c5(0x63a)]()[_0x1162c5(0x92d)](),_0x1ca21b=this[_0x1162c5(0x4df)][_0x2d62b5];if(_0x1ca21b[_0x1162c5(0x16b)](/<LEFT>/i)){if(_0x1162c5(0x92f)===_0x1162c5(0x92f))_0x38e396=_0x1162c5(0x110);else{if(!_0x466e93[_0x1162c5(0x5ea)]())return;_0x75d2fb[_0x1162c5(0x866)](_0x2e63f6,_0x34c583);const _0x453c68=_0xf33cca[_0x1162c5(0xb48)](),_0xf21030=_0x35e022[_0x1162c5(0x5ae)],_0x39557e=_0x427f68[_0x1162c5(0xb40)],_0x5db700=_0x1c1e91[_0x1162c5(0x8be)]?_0x4d3ff6['_allTargets']['slice'](0x0):[],_0x110cef=_0x1ab17a[_0x1162c5(0x5c4)];if(!_0x453c68||!_0xf21030||!_0x39557e)return;if(!_0xf21030['item']())return;if(_0xeadcbe['ApplyImmortal'])_0x110cef[_0x1162c5(0x838)](_0x1162c5(0x351),_0x39557e,_0x5db700,![]);if(_0x3ffc75[_0x1162c5(0x738)])_0x110cef['push'](_0x1162c5(0x718));if(_0x5059f7[_0x1162c5(0x95f)])_0x110cef[_0x1162c5(0x838)](_0x1162c5(0x4b3));if(_0x18a433[_0x1162c5(0x917)])_0x110cef[_0x1162c5(0x838)](_0x1162c5(0x89d));if(_0x30ce80[_0x1162c5(0x22c)])_0x110cef[_0x1162c5(0x838)](_0x1162c5(0x154),_0x39557e);if(_0x62c893[_0x1162c5(0x201)])_0x110cef['push'](_0x1162c5(0x3ba));_0x453c68[_0x1162c5(0x73c)](_0x1162c5(0x3cb));}}else{if(_0x1ca21b[_0x1162c5(0x16b)](/<CENTER>/i))'OBamC'!=='OBamC'?this[_0x1162c5(0xa8d)](this[_0x1162c5(0x922)]):_0x38e396=_0x1162c5(0x4ed);else{if(_0x1ca21b[_0x1162c5(0x16b)](/<RIGHT>/i)){if(_0x1162c5(0xa6c)===_0x1162c5(0xa6c))_0x38e396=_0x1162c5(0x994);else{const _0x5b585a=_0xbcc6e9[_0x1162c5(0x294)](this[_0x1162c5(0x1f6)]),_0x491c11=_0x451b3f['DamageStyles'][_0x5b585a];if(!_0x491c11)return this['getItemDamageAmountTextOriginal']();return _0x491c11[_0x1162c5(0x26f)][_0x1162c5(0x4b1)](this);}}}}_0x1ca21b=_0x1ca21b[_0x1162c5(0x3a7)](/<(?:LEFT|CENTER|RIGHT)>/gi,''),_0x1ca21b=_0x1ca21b[_0x1162c5(0x3a7)](/\\I\[0\]/gi,'');const _0x5010b3=this[_0x1162c5(0x24e)](_0x2d62b5);this[_0x1162c5(0xb32)][_0x1162c5(0x792)](_0x5010b3['x'],_0x5010b3['y'],_0x5010b3[_0x1162c5(0x3b2)],_0x5010b3[_0x1162c5(0x3b0)]);const _0x33c072=this['textSizeEx'](_0x1ca21b)[_0x1162c5(0x3b2)];let _0x5ee2c9=_0x5010b3['x'];if(_0x38e396===_0x1162c5(0x4ed)){if(_0x1162c5(0x54a)!==_0x1162c5(0x13f))_0x5ee2c9+=(_0x5010b3[_0x1162c5(0x3b2)]-_0x33c072)/0x2;else{const _0x43b861=_0xafd546[_0x1162c5(0x31e)](_0x3915ce['$1']);this[_0x1162c5(0x4ad)](_0x43b861);}}else{if(_0x38e396===_0x1162c5(0x994)){if(_0x1162c5(0x5ac)!==_0x1162c5(0x5ac)){const _0x43add0=_0x16a694[_0x2c9b6c];_0x43add0?this[_0x1162c5(0x5aa)](_0x43add0['list'],0x0):this['terminate']();}else _0x5ee2c9+=_0x5010b3['width']-_0x33c072;}}this[_0x1162c5(0x723)](_0x1ca21b,_0x5ee2c9,_0x5010b3['y'],_0x33c072+0x8);},Window_BattleLog[_0x5bdce9(0x768)]['addText']=function(_0x41bb69){const _0x537f88=_0x5bdce9;this[_0x537f88(0x4df)][_0x537f88(0x838)](_0x41bb69),this[_0x537f88(0xf7)](),this[_0x537f88(0x670)]();},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x5e9)]=function(){const _0x805ff2=_0x5bdce9;let _0xc820b3=![];switch(this[_0x805ff2(0x29a)]){case _0x805ff2(0x579):_0xc820b3=this['_spriteset'][_0x805ff2(0xa93)]();break;case _0x805ff2(0xb4e):_0xc820b3=this[_0x805ff2(0x25a)][_0x805ff2(0x12a)]();break;case'animation':_0xc820b3=this['_spriteset'][_0x805ff2(0x660)]();break;case _0x805ff2(0xb1d):_0xc820b3=this[_0x805ff2(0x25a)][_0x805ff2(0x15d)]();break;case _0x805ff2(0x79f):_0xc820b3=this[_0x805ff2(0x25a)][_0x805ff2(0x935)]();break;case _0x805ff2(0x867):_0xc820b3=this[_0x805ff2(0x25a)]['isAnyoneChangingOpacity']();break;}return!_0xc820b3&&(this[_0x805ff2(0x29a)]=''),_0xc820b3;},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x7a9)]=function(){const _0x5d242c=_0x5bdce9;this[_0x5d242c(0x73c)]('animation');},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x4dd)]=function(){const _0x5a4029=_0x5bdce9;this[_0x5a4029(0x73c)](_0x5a4029(0xb1d));},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xa86)]=function(){const _0x5abd02=_0x5bdce9;this[_0x5abd02(0x73c)]('jump');},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x595)]=function(){const _0x36ad80=_0x5bdce9;this[_0x36ad80(0x73c)](_0x36ad80(0x867));},Window_BattleLog['prototype'][_0x5bdce9(0x61b)]=function(){const _0x2eeb9f=_0x5bdce9,_0x5185b3=VisuMZ[_0x2eeb9f(0x61c)][_0x2eeb9f(0x76e)][_0x2eeb9f(0x2c4)];if(!_0x5185b3['StartTurnShow'])return;this[_0x2eeb9f(0x838)](_0x2eeb9f(0xa19),_0x5185b3[_0x2eeb9f(0x804)][_0x2eeb9f(0x824)]($gameTroop[_0x2eeb9f(0x7a0)]())),this['push'](_0x2eeb9f(0x458),_0x5185b3[_0x2eeb9f(0xac5)]),this[_0x2eeb9f(0x838)](_0x2eeb9f(0x89d));},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x63f)]=function(_0xc1338c,_0x4c0fc8,_0x2988d9){const _0x401905=_0x5bdce9;if(this[_0x401905(0x498)](_0x4c0fc8)){if(_0x401905(0x954)!=='ugjXn')BattleManager[_0x401905(0x2a0)]();else return![];}else{if('LkHuK'===_0x401905(0x93f))this[_0x401905(0xd2)](_0xc1338c,_0x4c0fc8,_0x2988d9);else return _0x1419f7[_0x401905(0x168)];}},Window_BattleLog[_0x5bdce9(0x768)]['isCustomActionSequence']=function(_0x33a5ff){const _0x3b6f5d=_0x5bdce9;if(!SceneManager['isSceneBattle']())return![];if(!_0x33a5ff)return![];if(!_0x33a5ff[_0x3b6f5d(0xa8a)]())return![];if(_0x33a5ff[_0x3b6f5d(0xa8a)]()[_0x3b6f5d(0x664)][_0x3b6f5d(0x16b)](/<CUSTOM ACTION SEQUENCE>/i))return!![];if(DataManager[_0x3b6f5d(0x91f)](_0x33a5ff['item']()))return!![];return![];},Window_BattleLog['prototype'][_0x5bdce9(0xd2)]=function(_0x2ed615,_0xc81fa3,_0x427565){const _0x26f900=_0x5bdce9,_0x20a423=_0xc81fa3[_0x26f900(0xa8a)]();this[_0x26f900(0x563)](_0x2ed615,_0xc81fa3,_0x427565),this[_0x26f900(0x2ba)](_0x2ed615,_0xc81fa3,_0x427565),this[_0x26f900(0x8c7)](_0x2ed615,_0xc81fa3,_0x427565);},Window_BattleLog['prototype'][_0x5bdce9(0x278)]=function(_0x4ad362,_0x4fbe02){const _0x9086a8=_0x5bdce9,_0x4632a5=VisuMZ[_0x9086a8(0x61c)][_0x9086a8(0x76e)]['BattleLog'];_0x4632a5[_0x9086a8(0xa20)]&&this[_0x9086a8(0x838)]('addText',_0x9086a8(0xa1d)[_0x9086a8(0x824)](DataManager[_0x9086a8(0x416)](_0x4fbe02)));if(DataManager[_0x9086a8(0x7c3)](_0x4fbe02)){if('kHBrz'==='mcYdj')_0x249eee[_0x9086a8(0x514)]()&&_0x1202bb[_0x9086a8(0x491)]()&&this[_0x9086a8(0x838)](_0x9086a8(0x96e),_0x5c241e,_0x5cf0c3),this[_0x9086a8(0x329)](_0x82b7a2,_0x160386,_0x41f611);else{if(_0x4632a5['ActionSkillMsg1'])this[_0x9086a8(0x25d)](_0x4fbe02[_0x9086a8(0x8b4)],_0x4ad362,_0x4fbe02);if(_0x4632a5['ActionSkillMsg2'])this[_0x9086a8(0x25d)](_0x4fbe02['message2'],_0x4ad362,_0x4fbe02);}}else{if(_0x4632a5[_0x9086a8(0x161)])this[_0x9086a8(0x25d)](TextManager[_0x9086a8(0x4d5)],_0x4ad362,_0x4fbe02);}},Window_BattleLog[_0x5bdce9(0x768)]['setupActionSet']=function(_0x3d49be,_0x5a96a8,_0x49e2e4){const _0x910e3d=_0x5bdce9,_0x1e1192=_0x5a96a8[_0x910e3d(0xa8a)]();this['displayAction'](_0x3d49be,_0x1e1192),this[_0x910e3d(0x838)](_0x910e3d(0x351),_0x3d49be,_0x49e2e4,!![]),this[_0x910e3d(0x838)]('performActionStart',_0x3d49be,_0x5a96a8),this['push']('waitForMovement'),this[_0x910e3d(0x838)](_0x910e3d(0x70c),_0x3d49be,_0x5a96a8),this[_0x910e3d(0x838)](_0x910e3d(0x7a9));},Window_BattleLog[_0x5bdce9(0x768)]['createEffectActionSet']=function(_0x344b8e,_0x8b0c23,_0x1bdf9b){const _0x159be1=_0x5bdce9;if(this['isMeleeSingleTargetAction'](_0x8b0c23)){if(_0x159be1(0x709)!=='wnvbl')this[_0x159be1(0xa53)](_0x344b8e,_0x8b0c23,_0x1bdf9b);else{this['bitmap'][_0x159be1(0x89d)]();const _0x20a683=this['currentValue']();!_0x1ed2ee(_0x20a683)&&this[_0x159be1(0x165)]();}}else{if(this[_0x159be1(0x688)](_0x8b0c23)){if('KmzPb'!==_0x159be1(0x66c))this['autoMeleeMultiTargetActionSet'](_0x344b8e,_0x8b0c23,_0x1bdf9b);else{const _0x4bbb29=this[_0x159be1(0x865)](),_0x22f4d1=_0x15c972['BattleCore'][_0x159be1(0x76e)][_0x159be1(0x71c)][_0x159be1(0x558)],_0x312b8f=_0x4bbb29==='text'?_0x2939b0[_0x159be1(0xa63)]:_0x159be1(0x5a6)[_0x159be1(0x824)](_0x22f4d1,_0x29428f['autoBattle']),_0x4b3ea9=this[_0x159be1(0xa06)]();this[_0x159be1(0x97b)](_0x312b8f,'autoBattle',_0x4b3ea9);}}else _0x8b0c23[_0x159be1(0x642)]()?this['targetActionSet'](_0x344b8e,_0x8b0c23,_0x1bdf9b):_0x159be1(0x95d)!==_0x159be1(0x95d)?(_0x412a23[_0x159be1(0x61c)][_0x159be1(0x5dc)][_0x159be1(0x4b1)](this,_0x1a863f,_0x1cb646),this[_0x159be1(0x670)]()):this[_0x159be1(0x329)](_0x344b8e,_0x8b0c23,_0x1bdf9b);}},Window_BattleLog['prototype'][_0x5bdce9(0x426)]=function(_0x5b41a8){const _0x346313=_0x5bdce9;if(!_0x5b41a8[_0x346313(0x5c8)]())return![];if(!_0x5b41a8[_0x346313(0xa61)]())return![];if(!_0x5b41a8[_0x346313(0xb74)]())return![];return VisuMZ[_0x346313(0x61c)]['Settings']['ActionSequence'][_0x346313(0x705)];},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xa53)]=function(_0x4be7f6,_0x158c9a,_0x59f804){const _0x3afb99=_0x5bdce9,_0x263186=_0x4be7f6['getAttackMotion']()[_0x3afb99(0x900)]<0x2,_0x76582d=0x14,_0x2276ba=0x30;if(_0x263186){if('ErzPu'!==_0x3afb99(0x207))return _0x499219[_0x3afb99(0x61c)]['Game_Action_isForOpponent']['call'](this);else this[_0x3afb99(0x838)](_0x3afb99(0x4de),[_0x4be7f6],_0x2276ba,_0x76582d),this[_0x3afb99(0x838)](_0x3afb99(0x633),_0x4be7f6,_0x59f804,_0x3afb99(0x30d),_0x76582d,!![],_0x3afb99(0x32d),!![]),this['push'](_0x3afb99(0x319),[_0x4be7f6],_0x3afb99(0x6c4)),this[_0x3afb99(0x838)](_0x3afb99(0x3ba));}let _0x153e13=_0x158c9a[_0x3afb99(0x514)]()?this[_0x3afb99(0xb4c)](_0x4be7f6):0x1;for(let _0x59f8b5=0x0;_0x59f8b5<_0x153e13;_0x59f8b5++){if(_0x3afb99(0xa24)!==_0x3afb99(0xa24))this['_effectsContainer']&&this[_0x3afb99(0xa8d)](this[_0x3afb99(0x122)]);else{if(_0x158c9a[_0x3afb99(0x514)]()&&_0x4be7f6[_0x3afb99(0x491)]()){if(_0x3afb99(0x164)==='pJaXE')this[_0x3afb99(0x838)]('setActiveWeaponSet',_0x4be7f6,_0x59f8b5);else{if(!_0x1595dd)return;if(!this[_0x3afb99(0xb46)](_0x149141))return;const _0x13f383=this[_0x3afb99(0x865)](),_0x386962=_0x532e78[_0x3afb99(0x70f)](_0x8c19e3),_0x4ea468=_0xef35ad[_0x3afb99(0x8a1)](_0x4bac1f),_0x40941c=_0x13f383===_0x3afb99(0x160)?_0x386962:'\x5cI[%1]%2'['format'](_0x4ea468,_0x386962),_0x598150=this[_0x3afb99(0xa72)][_0x3afb99(0x571)](_0x54ea6c);this[_0x3afb99(0x97b)](_0x40941c,'singleSkill',_0x598150,_0x1970f2['id']);}}if(_0x158c9a[_0x3afb99(0xa8a)]()[_0x3afb99(0x6e3)]<0x0)this[_0x3afb99(0x51e)](_0x4be7f6,_0x158c9a,_0x59f804);else{if(_0x3afb99(0x2dd)===_0x3afb99(0xac8)){const _0x15e438=_0x4bb7af[_0x3afb99(0x294)](this[_0x3afb99(0x1f6)]),_0x49e3be=_0x2798fe[_0x3afb99(0xb78)][_0x15e438];if(!_0x49e3be)return this[_0x3afb99(0xb0f)]();const _0x4a22a3='DamageType%1'['format'](this['_item']['damage']['type']),_0x13849a=[null,_0x354a67['hp'],_0x28ad8c['mp'],_0x443223['hp'],_0x101891['mp'],_0x242280['hp'],_0x5a500b['mp']][this['_item']['damage']['type']];return _0x49e3be[_0x4a22a3][_0x3afb99(0x824)](_0x13849a);}else this['wholeActionSet'](_0x4be7f6,_0x158c9a,_0x59f804);}}}if(_0x158c9a[_0x3afb99(0x514)]()&&_0x4be7f6[_0x3afb99(0x491)]()){if(_0x3afb99(0x93d)==='fjErr'){if(!_0x41b3d3[_0x3afb99(0x5ea)]())return;const _0x2852a0=_0x5adc02[_0x3afb99(0xb48)]();if(!_0x2852a0)return;_0x2852a0['setWaitMode'](_0x3afb99(0x286));}else this['push'](_0x3afb99(0x496),_0x4be7f6);}this[_0x3afb99(0x838)](_0x3afb99(0x351),_0x4be7f6,_0x59f804,![]);if(_0x263186){const _0x119936=_0x4be7f6[_0x3afb99(0xb0d)]();this[_0x3afb99(0x838)](_0x3afb99(0x4de),[_0x4be7f6],_0x2276ba,_0x76582d),this[_0x3afb99(0x838)](_0x3afb99(0x6d2),_0x4be7f6,_0x119936[_0x3afb99(0x666)],_0x119936[_0x3afb99(0x51a)],_0x76582d,![],_0x3afb99(0x32d)),this[_0x3afb99(0x838)](_0x3afb99(0x319),[_0x4be7f6],'evade'),this['push']('waitForMovement'),this[_0x3afb99(0x838)]('requestMotion',[_0x4be7f6],_0x3afb99(0x6c4));}},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x688)]=function(_0x5a1ff1){const _0x19adde=_0x5bdce9;if(!_0x5a1ff1[_0x19adde(0x5c8)]())return![];if(!_0x5a1ff1[_0x19adde(0x588)]())return![];if(!_0x5a1ff1['isForOpponent']())return![];return VisuMZ['BattleCore'][_0x19adde(0x76e)]['ActionSequence'][_0x19adde(0xb76)];},Window_BattleLog[_0x5bdce9(0x768)]['autoMeleeMultiTargetActionSet']=function(_0x13a2a3,_0x55906d,_0x166dea){const _0x418eab=_0x5bdce9,_0x2ccdd2=_0x13a2a3[_0x418eab(0xacd)]()[_0x418eab(0x900)]<0x2,_0x4a27bc=0x14,_0x5100d3=0x30;if(_0x2ccdd2){if(_0x418eab(0x8ea)!==_0x418eab(0x8ea)){_0x2f5471[_0x418eab(0x61c)][_0x418eab(0x4b2)][_0x418eab(0x4b1)](this,_0x56f366),this[_0x418eab(0x7b6)](),this['setupBattleCoreData']();const _0xd37785=this[_0x418eab(0xb0d)]();if(_0xd37785)_0xd37785[_0x418eab(0x23d)](this);}else this[_0x418eab(0x838)]('performJump',[_0x13a2a3],_0x5100d3,_0x4a27bc),this[_0x418eab(0x838)](_0x418eab(0x633),_0x13a2a3,_0x166dea,_0x418eab(0x70a),_0x4a27bc,!![],'Linear',!![]),this[_0x418eab(0x838)](_0x418eab(0x319),[_0x13a2a3],_0x418eab(0x6c4)),this[_0x418eab(0x838)](_0x418eab(0x3ba));}let _0x51a673=_0x55906d['isAttack']()?this[_0x418eab(0xb4c)](_0x13a2a3):0x1;for(let _0x4808db=0x0;_0x4808db<_0x51a673;_0x4808db++){if(_0x418eab(0xaca)!==_0x418eab(0x330))_0x55906d[_0x418eab(0x514)]()&&_0x13a2a3[_0x418eab(0x491)]()&&this[_0x418eab(0x838)]('setActiveWeaponSet',_0x13a2a3,_0x4808db),this[_0x418eab(0x329)](_0x13a2a3,_0x55906d,_0x166dea);else return _0x5e820d[_0x418eab(0x61c)][_0x418eab(0x76e)]['BattleLog'][_0x418eab(0xb44)];}_0x55906d['isAttack']()&&_0x13a2a3[_0x418eab(0x491)]()&&this[_0x418eab(0x838)]('clearActiveWeaponSet',_0x13a2a3);this[_0x418eab(0x838)]('applyImmortal',_0x13a2a3,_0x166dea,![]);if(_0x2ccdd2){if(_0x418eab(0x823)===_0x418eab(0x512))this['addSkillTypeCommand'](_0x866c03);else{const _0x16294c=_0x13a2a3['battler']();this['push'](_0x418eab(0x4de),[_0x13a2a3],_0x5100d3,_0x4a27bc),this['push'](_0x418eab(0x6d2),_0x13a2a3,_0x16294c[_0x418eab(0x666)],_0x16294c[_0x418eab(0x51a)],_0x4a27bc,![],_0x418eab(0x32d)),this[_0x418eab(0x838)]('requestMotion',[_0x13a2a3],_0x418eab(0x545)),this[_0x418eab(0x838)]('waitForMovement'),this[_0x418eab(0x838)]('requestMotion',[_0x13a2a3],_0x418eab(0x6c4));}}},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x51e)]=function(_0x376f5d,_0x1c7ab8,_0x2ac8d1){const _0x337ce7=_0x5bdce9,_0x1623a2=_0x1c7ab8[_0x337ce7(0xa8a)]();for(const _0xd26cc0 of _0x2ac8d1){if(_0x337ce7(0x2cb)===_0x337ce7(0x2cb)){if(!_0xd26cc0)continue;this[_0x337ce7(0x838)](_0x337ce7(0x23a),_0x376f5d,_0x1c7ab8),this[_0x337ce7(0x838)](_0x337ce7(0x458),Sprite_Battler['_motionSpeed']),this[_0x337ce7(0x838)]('showAnimation',_0x376f5d,[_0xd26cc0],_0x1623a2[_0x337ce7(0x6e3)]),this['push'](_0x337ce7(0x458),0x18),this[_0x337ce7(0x838)](_0x337ce7(0x1b9),_0x376f5d,_0xd26cc0);}else _0xeaf809=this[_0x337ce7(0x41a)]['battleback1Name'](),_0x2fbc96=this[_0x337ce7(0x2b4)]['battleback2Name']();}},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x329)]=function(_0x3db1fe,_0x1e5e86,_0x42408f){const _0x32b052=_0x5bdce9,_0x47620f=_0x1e5e86['item']();this['push'](_0x32b052(0x23a),_0x3db1fe,_0x1e5e86),this[_0x32b052(0x838)](_0x32b052(0x458),Sprite_Battler[_0x32b052(0x2cf)]),this[_0x32b052(0x838)]('showAnimation',_0x3db1fe,_0x42408f[_0x32b052(0x991)](),_0x47620f['animationId']),this['push'](_0x32b052(0x7a9));for(const _0x498135 of _0x42408f){if(_0x32b052(0x7fd)!==_0x32b052(0x2f8)){if(!_0x498135)continue;this[_0x32b052(0x838)](_0x32b052(0x1b9),_0x3db1fe,_0x498135);}else{if(!_0x27b9f8[_0x32b052(0x5ea)]())return;if(!this[_0x32b052(0x43f)])this[_0x32b052(0x403)]();this[_0x32b052(0x51d)]();const _0x3c8c4=this['battler']();if(_0x3c8c4)_0x3c8c4['setupDamagePopup']();}}},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x8c7)]=function(_0x11de5a,_0x257a47,_0x49b8d5){const _0x57f063=_0x5bdce9,_0x34badb=_0x257a47[_0x57f063(0xa8a)]();this[_0x57f063(0x838)](_0x57f063(0x351),_0x11de5a,_0x49b8d5,![]),this[_0x57f063(0x838)]('waitForNewLine'),this['push'](_0x57f063(0x4b3)),this[_0x57f063(0x838)](_0x57f063(0x89d)),this[_0x57f063(0x838)](_0x57f063(0x154),_0x11de5a),this['push'](_0x57f063(0x3ba));},Window_BattleLog['prototype'][_0x5bdce9(0x3b1)]=function(_0x4ab922){},VisuMZ['BattleCore']['Window_BattleLog_displayCurrentState']=Window_BattleLog[_0x5bdce9(0x768)]['displayCurrentState'],Window_BattleLog[_0x5bdce9(0x768)]['displayCurrentState']=function(_0x1b3050){const _0x562813=_0x5bdce9;if(!VisuMZ['BattleCore']['Settings'][_0x562813(0x2c4)][_0x562813(0x600)])return;VisuMZ[_0x562813(0x61c)][_0x562813(0x9ca)][_0x562813(0x4b1)](this,_0x1b3050);},Window_BattleLog['prototype'][_0x5bdce9(0x7af)]=function(_0x30e638){const _0x4ef44a=_0x5bdce9;this[_0x4ef44a(0x838)]('performCounter',_0x30e638);if(VisuMZ['BattleCore'][_0x4ef44a(0x76e)][_0x4ef44a(0x964)]['CounterPlayback']){if(_0x4ef44a(0x6a2)!==_0x4ef44a(0x6a2)){const _0x221bd1=this[_0x4ef44a(0x870)]();this[_0x4ef44a(0x2d6)](_0x221bd1);}else this[_0x4ef44a(0x838)](_0x4ef44a(0x849),_0x30e638,[BattleManager[_0x4ef44a(0xb40)]],-0x1);}if(!VisuMZ[_0x4ef44a(0x61c)][_0x4ef44a(0x76e)][_0x4ef44a(0x2c4)][_0x4ef44a(0x6b6)])return;this[_0x4ef44a(0x838)](_0x4ef44a(0xa19),TextManager['counterAttack'][_0x4ef44a(0x824)](_0x30e638[_0x4ef44a(0x74e)]()));},Window_BattleLog[_0x5bdce9(0x768)]['displayReflection']=function(_0x318e35){const _0x53024c=_0x5bdce9;this[_0x53024c(0x838)](_0x53024c(0x8a3),_0x318e35);if(!VisuMZ[_0x53024c(0x61c)][_0x53024c(0x76e)][_0x53024c(0x2c4)]['ShowReflect'])return;this[_0x53024c(0x838)](_0x53024c(0xa19),TextManager[_0x53024c(0x249)]['format'](_0x318e35[_0x53024c(0x74e)]()));},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x147)]=function(_0x4af41c,_0x366cec){const _0x4562f7=_0x5bdce9;if(VisuMZ[_0x4562f7(0x61c)][_0x4562f7(0x76e)][_0x4562f7(0x964)]['ReflectPlayback']){const _0x52e0ef=_0x366cec[_0x4562f7(0xa8a)]();this['push']('showAnimation',_0x4af41c,[_0x4af41c],_0x52e0ef['animationId']);}},Window_BattleLog['prototype'][_0x5bdce9(0x903)]=function(_0x379eca,_0x20a42e){const _0x1d73d6=_0x5bdce9;this['push'](_0x1d73d6(0xaeb),_0x379eca,_0x20a42e);if(!VisuMZ['BattleCore'][_0x1d73d6(0x76e)][_0x1d73d6(0x2c4)][_0x1d73d6(0x9c3)])return;const _0x44a783=_0x379eca[_0x1d73d6(0x74e)](),_0x270031=TextManager['substitute'][_0x1d73d6(0x824)](_0x44a783,_0x20a42e[_0x1d73d6(0x74e)]());this[_0x1d73d6(0x838)](_0x1d73d6(0xa19),_0x270031);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xde)]=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x594)],Window_BattleLog[_0x5bdce9(0x768)]['displayActionResults']=function(_0x37eb99,_0x5eccc3){const _0x26fee1=_0x5bdce9;VisuMZ[_0x26fee1(0x61c)][_0x26fee1(0xde)]['call'](this,_0x37eb99,_0x5eccc3);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xacb)]=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x636)],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x636)]=function(_0x55c411){const _0x5efd8c=_0x5bdce9;if(!VisuMZ[_0x5efd8c(0x61c)]['Settings'][_0x5efd8c(0x2c4)][_0x5efd8c(0xa7c)])return;VisuMZ[_0x5efd8c(0x61c)][_0x5efd8c(0xacb)]['call'](this,_0x55c411);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x889)]=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x639)],Window_BattleLog['prototype'][_0x5bdce9(0x639)]=function(_0x35cf82){const _0x4d3a85=_0x5bdce9;if(!VisuMZ[_0x4d3a85(0x61c)][_0x4d3a85(0x76e)]['BattleLog'][_0x4d3a85(0xafb)])return;VisuMZ['BattleCore'][_0x4d3a85(0x889)][_0x4d3a85(0x4b1)](this,_0x35cf82);},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x32c)]=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xb22)],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xb22)]=function(_0x4c74aa){const _0x35f57e=_0x5bdce9;!VisuMZ[_0x35f57e(0x61c)][_0x35f57e(0x76e)][_0x35f57e(0x2c4)][_0x35f57e(0x4a4)]?_0x35f57e(0x166)!==_0x35f57e(0x59a)?this[_0x35f57e(0x838)]('performMiss',_0x4c74aa):_0x23ace[_0x35f57e(0x29b)]([_0x5a5ff4]):VisuMZ['BattleCore'][_0x35f57e(0x32c)][_0x35f57e(0x4b1)](this,_0x4c74aa);},VisuMZ['BattleCore'][_0x5bdce9(0x4bf)]=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xb33)],Window_BattleLog['prototype'][_0x5bdce9(0xb33)]=function(_0x5457d5){const _0x51533f=_0x5bdce9;!VisuMZ['BattleCore'][_0x51533f(0x76e)][_0x51533f(0x2c4)][_0x51533f(0x4a4)]?_0x5457d5[_0x51533f(0x2c3)]()[_0x51533f(0x74b)]?_0x51533f(0x796)===_0x51533f(0x796)?this['push'](_0x51533f(0x2d8),_0x5457d5):(_0xb4d5d5['BattleCore']['Scene_Battle_createActorCommandWindow'][_0x51533f(0x4b1)](this),this[_0x51533f(0x906)]()):this['push']('performMagicEvasion',_0x5457d5):VisuMZ[_0x51533f(0x61c)]['Window_BattleLog_displayEvasion']['call'](this,_0x5457d5);},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x94a)]=function(_0x5bf1e3){const _0x593d25=_0x5bdce9;if(_0x5bf1e3[_0x593d25(0x2c3)]()[_0x593d25(0x825)]){if(_0x5bf1e3[_0x593d25(0x2c3)]()['hpDamage']>0x0&&!_0x5bf1e3['result']()[_0x593d25(0xae6)]){if(_0x593d25(0x916)!==_0x593d25(0x916)){if(this['_lastEnemy']&&this[_0x593d25(0xa38)][_0x593d25(0x8ed)](this[_0x593d25(0x9dc)])){const _0x3021b3=this['_enemies'][_0x593d25(0x977)](this[_0x593d25(0x9dc)]);this['forceSelect'](_0x3021b3);}else this[_0x593d25(0xb03)]();}else this[_0x593d25(0x838)](_0x593d25(0x15f),_0x5bf1e3);}_0x5bf1e3[_0x593d25(0x2c3)]()[_0x593d25(0x78f)]<0x0&&this[_0x593d25(0x838)](_0x593d25(0x6f0),_0x5bf1e3);if(VisuMZ[_0x593d25(0x61c)][_0x593d25(0x76e)][_0x593d25(0x2c4)][_0x593d25(0x1c4)]){if(_0x593d25(0x1cb)!=='AMgUj')this['push'](_0x593d25(0xa19),this[_0x593d25(0x407)](_0x5bf1e3));else{if(this[_0x593d25(0x9a3)]())return;this[_0x593d25(0x87b)]=!![],this[_0x593d25(0xb87)]=![];}}}},VisuMZ['BattleCore'][_0x5bdce9(0x487)]=Window_BattleLog['prototype'][_0x5bdce9(0x27f)],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x27f)]=function(_0x42f9f0){const _0x34e6ca=_0x5bdce9;if(!VisuMZ[_0x34e6ca(0x61c)][_0x34e6ca(0x76e)][_0x34e6ca(0x2c4)][_0x34e6ca(0xad3)])return;VisuMZ[_0x34e6ca(0x61c)]['Window_BattleLog_displayMpDamage']['call'](this,_0x42f9f0);},VisuMZ['BattleCore'][_0x5bdce9(0x945)]=Window_BattleLog['prototype'][_0x5bdce9(0x840)],Window_BattleLog['prototype'][_0x5bdce9(0x840)]=function(_0x342cbf){const _0x3a4e15=_0x5bdce9;if(!VisuMZ[_0x3a4e15(0x61c)][_0x3a4e15(0x76e)][_0x3a4e15(0x2c4)]['ShowTpDmg'])return;VisuMZ[_0x3a4e15(0x61c)][_0x3a4e15(0x945)][_0x3a4e15(0x4b1)](this,_0x342cbf);},Window_BattleLog['prototype'][_0x5bdce9(0x9f0)]=function(_0x5d0367){const _0x5278e5=_0x5bdce9;_0x5d0367['result']()['isStatusAffected']()&&(_0x5278e5(0x8f9)===_0x5278e5(0x8f9)?(this[_0x5278e5(0x838)](_0x5278e5(0x6ea)),this['displayChangedStates'](_0x5d0367),this[_0x5278e5(0x5e1)](_0x5d0367),this['push']('waitForNewLine')):_0x123a85+=_0x11a880['abs'](_0x229ff0['hpDamage']));},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xb23)]=function(_0x2bd4bb){const _0x26c04c=_0x5bdce9,_0xdb566b=_0x2bd4bb[_0x26c04c(0x2c3)](),_0x35bc94=_0xdb566b[_0x26c04c(0xb10)]();for(const _0x4e70a9 of _0x35bc94){const _0x19c152=_0x2bd4bb[_0x26c04c(0x491)]()?_0x4e70a9[_0x26c04c(0x8b4)]:_0x4e70a9[_0x26c04c(0x772)];_0x19c152&&VisuMZ[_0x26c04c(0x61c)][_0x26c04c(0x76e)][_0x26c04c(0x2c4)][_0x26c04c(0x523)]&&(this['push']('fnordAddedStates'),this[_0x26c04c(0x838)](_0x26c04c(0x73f)),this['push'](_0x26c04c(0x6ea)),this[_0x26c04c(0x838)]('addText',_0x19c152[_0x26c04c(0x824)](_0x2bd4bb[_0x26c04c(0x74e)]())),this[_0x26c04c(0x838)](_0x26c04c(0x156))),_0x4e70a9['id']===_0x2bd4bb['deathStateId']()&&this['push']('performCollapse',_0x2bd4bb);}},Window_BattleLog[_0x5bdce9(0x768)]['fnordAddedStates']=function(){},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x77b)]=function(_0x58d2b5){const _0x521c63=_0x5bdce9;if(!VisuMZ['BattleCore'][_0x521c63(0x76e)][_0x521c63(0x2c4)][_0x521c63(0x704)])return;const _0x25aff9=_0x58d2b5[_0x521c63(0x2c3)](),_0x1baa7b=_0x25aff9[_0x521c63(0x625)]();for(const _0x5b0fe5 of _0x1baa7b){_0x5b0fe5[_0x521c63(0x2d1)]&&(this[_0x521c63(0x838)](_0x521c63(0x26a)),this['push'](_0x521c63(0x73f)),this[_0x521c63(0x838)]('pushBaseLine'),this[_0x521c63(0x838)](_0x521c63(0xa19),_0x5b0fe5[_0x521c63(0x2d1)][_0x521c63(0x824)](_0x58d2b5[_0x521c63(0x74e)]())),this[_0x521c63(0x838)](_0x521c63(0x156)));}},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x26a)]=function(){},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x5e1)]=function(_0x53e7bc){const _0x115c04=_0x5bdce9,_0x442186=VisuMZ[_0x115c04(0x61c)][_0x115c04(0x76e)][_0x115c04(0x2c4)],_0x15c455=_0x53e7bc[_0x115c04(0x2c3)]();if(_0x442186[_0x115c04(0x74d)])this[_0x115c04(0x7c8)](_0x53e7bc,_0x15c455[_0x115c04(0x374)],TextManager['buffAdd']);if(_0x442186[_0x115c04(0x304)])this[_0x115c04(0x7c8)](_0x53e7bc,_0x15c455[_0x115c04(0x7b0)],TextManager['debuffAdd']);if(_0x442186[_0x115c04(0xa8f)])this[_0x115c04(0x7c8)](_0x53e7bc,_0x15c455[_0x115c04(0x2c9)],TextManager[_0x115c04(0x3a9)]);},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x7c8)]=function(_0x309d66,_0x11e0ce,_0x37cc7f){const _0x18afb3=_0x5bdce9;for(const _0x207826 of _0x11e0ce){const _0x4caea9=_0x37cc7f[_0x18afb3(0x824)](_0x309d66[_0x18afb3(0x74e)](),TextManager[_0x18afb3(0x58a)](_0x207826));this[_0x18afb3(0x838)](_0x18afb3(0x73f)),this[_0x18afb3(0x838)](_0x18afb3(0x6ea)),this[_0x18afb3(0x838)](_0x18afb3(0xa19),_0x4caea9),this[_0x18afb3(0x838)](_0x18afb3(0x156));}},VisuMZ['BattleCore'][_0x5bdce9(0x893)]=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x89d)],Window_BattleLog['prototype'][_0x5bdce9(0x89d)]=function(){const _0x3d0373=_0x5bdce9;VisuMZ[_0x3d0373(0x61c)][_0x3d0373(0x893)][_0x3d0373(0x4b1)](this),this[_0x3d0373(0x670)]();},VisuMZ['BattleCore'][_0x5bdce9(0x258)]=Window_BattleLog['prototype'][_0x5bdce9(0x6ea)],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x6ea)]=function(){const _0x2c945d=_0x5bdce9;VisuMZ[_0x2c945d(0x61c)][_0x2c945d(0x258)][_0x2c945d(0x4b1)](this),this['callNextMethod']();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x450)]=Window_BattleLog['prototype']['popBaseLine'],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x73f)]=function(){const _0xecffc7=_0x5bdce9;VisuMZ['BattleCore']['Window_BattleLog_popBaseLine'][_0xecffc7(0x4b1)](this),this[_0xecffc7(0xb1b)](),this[_0xecffc7(0x670)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x6e6)]=Window_BattleLog[_0x5bdce9(0x768)]['popupDamage'],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x572)]=function(_0xa1a5e2){const _0x2a767d=_0x5bdce9;VisuMZ['BattleCore'][_0x2a767d(0x6e6)][_0x2a767d(0x4b1)](this,_0xa1a5e2),this[_0x2a767d(0x670)]();},Window_BattleLog['prototype'][_0x5bdce9(0x718)]=function(){const _0x581597=_0x5bdce9;let _0x7e013d=0x0;if(this[_0x581597(0x7e2)][_0x581597(0x12d)]>0x0){if(_0x581597(0x4ee)===_0x581597(0x212)){if(!_0x289a7f[_0x581597(0x5ea)]())return;if(!_0x3ff2ff[_0x581597(0x434)])return;if(!_0x422834[_0x581597(0x9e6)]())return;_0xf69d9[_0x581597(0x866)](_0x1ae86d,_0x98d311);const _0xc79cae=_0x51d910['ActionCount'];_0x3edb3a['_subject']&&_0x4aec50[_0x581597(0xb40)][_0x581597(0x712)]()[_0x581597(0x5c6)](_0xc79cae);}else _0x7e013d=this['_baseLineStack'][this[_0x581597(0x7e2)]['length']-0x1];}this[_0x581597(0x4df)][_0x581597(0x12d)]>_0x7e013d?this[_0x581597(0x156)]():this[_0x581597(0x670)]();},VisuMZ['BattleCore'][_0x5bdce9(0x5dc)]=Window_BattleLog[_0x5bdce9(0x768)]['performActionStart'],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x187)]=function(_0x1e24c6,_0xb7228d){const _0x1a2d74=_0x5bdce9;VisuMZ[_0x1a2d74(0x61c)][_0x1a2d74(0x5dc)][_0x1a2d74(0x4b1)](this,_0x1e24c6,_0xb7228d),this['callNextMethod']();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0xa1e)]=Window_BattleLog[_0x5bdce9(0x768)]['performAction'],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x23a)]=function(_0x370355,_0x3e4671){const _0x3e75bb=_0x5bdce9;VisuMZ[_0x3e75bb(0x61c)][_0x3e75bb(0xa1e)][_0x3e75bb(0x4b1)](this,_0x370355,_0x3e4671),this['callNextMethod']();},VisuMZ[_0x5bdce9(0x61c)]['Window_BattleLog_performActionEnd']=Window_BattleLog[_0x5bdce9(0x768)]['performActionEnd'],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x154)]=function(_0x236933){const _0x9dc509=_0x5bdce9;VisuMZ[_0x9dc509(0x61c)][_0x9dc509(0xb4a)][_0x9dc509(0x4b1)](this,_0x236933);for(const _0x1c21aa of BattleManager[_0x9dc509(0x8b1)]()){if(!_0x1c21aa)continue;if(_0x1c21aa[_0x9dc509(0x9a3)]())continue;_0x1c21aa[_0x9dc509(0x27c)]();}this[_0x9dc509(0x670)]();},VisuMZ['BattleCore'][_0x5bdce9(0x3aa)]=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x15f)],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x15f)]=function(_0x555eda){const _0x1e47f1=_0x5bdce9;VisuMZ[_0x1e47f1(0x61c)][_0x1e47f1(0x3aa)]['call'](this,_0x555eda),this[_0x1e47f1(0x670)]();},VisuMZ[_0x5bdce9(0x61c)]['Window_BattleLog_performMiss']=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x960)],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x960)]=function(_0x15911d){const _0x3a3ef5=_0x5bdce9;VisuMZ[_0x3a3ef5(0x61c)][_0x3a3ef5(0x921)][_0x3a3ef5(0x4b1)](this,_0x15911d),this[_0x3a3ef5(0x670)]();},VisuMZ['BattleCore'][_0x5bdce9(0x573)]=Window_BattleLog[_0x5bdce9(0x768)]['performRecovery'],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x6f0)]=function(_0x56c71a){const _0x282947=_0x5bdce9;VisuMZ['BattleCore']['Window_BattleLog_performRecovery']['call'](this,_0x56c71a),this[_0x282947(0x670)]();},VisuMZ['BattleCore'][_0x5bdce9(0x55e)]=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x2d8)],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x2d8)]=function(_0x1f1b73){const _0x58e6fb=_0x5bdce9;VisuMZ[_0x58e6fb(0x61c)][_0x58e6fb(0x55e)][_0x58e6fb(0x4b1)](this,_0x1f1b73),this[_0x58e6fb(0x670)]();},VisuMZ['BattleCore']['Window_BattleLog_performMagicEvasion']=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xb24)],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xb24)]=function(_0x1b96c8){const _0x4c41a5=_0x5bdce9;VisuMZ[_0x4c41a5(0x61c)][_0x4c41a5(0x20f)][_0x4c41a5(0x4b1)](this,_0x1b96c8),this[_0x4c41a5(0x670)]();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x6ac)]=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x3bb)],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x3bb)]=function(_0x28f3e1){const _0x1fff7e=_0x5bdce9;VisuMZ[_0x1fff7e(0x61c)][_0x1fff7e(0x6ac)][_0x1fff7e(0x4b1)](this,_0x28f3e1),this[_0x1fff7e(0x670)]();},VisuMZ['BattleCore'][_0x5bdce9(0x2aa)]=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x8a3)],Window_BattleLog[_0x5bdce9(0x768)]['performReflection']=function(_0x5e3cb7){const _0x278ece=_0x5bdce9;VisuMZ[_0x278ece(0x61c)]['Window_BattleLog_performReflection'][_0x278ece(0x4b1)](this,_0x5e3cb7),this[_0x278ece(0x670)]();},VisuMZ[_0x5bdce9(0x61c)]['Window_BattleLog_performSubstitute']=Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0xaeb)],Window_BattleLog['prototype']['performSubstitute']=function(_0x464adf,_0x5ea235){const _0x3d6c19=_0x5bdce9;VisuMZ[_0x3d6c19(0x61c)][_0x3d6c19(0x3bf)][_0x3d6c19(0x4b1)](this,_0x464adf,_0x5ea235),this['callNextMethod']();},VisuMZ[_0x5bdce9(0x61c)][_0x5bdce9(0x1d4)]=Window_BattleLog['prototype']['performCollapse'],Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x418)]=function(_0x50af74){const _0x3b0103=_0x5bdce9;VisuMZ[_0x3b0103(0x61c)][_0x3b0103(0x1d4)][_0x3b0103(0x4b1)](this,_0x50af74),this[_0x3b0103(0x670)]();},Window_BattleLog['prototype'][_0x5bdce9(0x70c)]=function(_0x2f377a,_0x9c3bd2){const _0x1d4ceb=_0x5bdce9;_0x2f377a[_0x1d4ceb(0x70c)](_0x9c3bd2),this[_0x1d4ceb(0x670)]();},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x99d)]=function(_0x2e7724,_0x306e15){const _0x34e8ec=_0x5bdce9,_0x13ef6e=_0x2e7724[_0x34e8ec(0x17b)]();if(_0x13ef6e<=0x0){if(_0x34e8ec(0x4fd)===_0x34e8ec(0x4fd))SoundManager[_0x34e8ec(0x8e4)]();else{if(!_0x3eae42[_0x34e8ec(0x5ea)]())return;if(!_0x794d99[_0x34e8ec(0x238)])return;_0x15d8f9[_0x34e8ec(0x866)](_0x59bdbe,_0x363e7e);const _0x2eea72=_0x3946a0['_action'],_0x3756c0=_0x172351[_0x34e8ec(0x86a)];if(!_0x2eea72)return;_0x2eea72[_0x34e8ec(0x597)]=_0x3756c0;}}else _0x34e8ec(0x46e)===_0x34e8ec(0x46e)?this[_0x34e8ec(0x452)](_0x306e15,_0x13ef6e):this[_0x34e8ec(0x5aa)](this[_0x34e8ec(0x254)][_0x34e8ec(0x976)]);},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x351)]=function(_0x438020,_0x2ca323,_0x1b39af){const _0x8a4e70=_0x5bdce9,_0x56221a=[_0x438020]['concat'](_0x2ca323);for(const _0x514c9a of _0x56221a){if(!_0x514c9a)continue;_0x514c9a[_0x8a4e70(0x78c)](_0x1b39af);}this[_0x8a4e70(0x670)]();},Window_BattleLog[_0x5bdce9(0x768)]['waitCount']=function(_0xa2d1a5){const _0x3b81ed=_0x5bdce9;this[_0x3b81ed(0x299)]=_0xa2d1a5;},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x319)]=function(_0x4660c1,_0x4b036a){const _0x359865=_0x5bdce9;for(const _0x2cf8e4 of _0x4660c1){if(_0x359865(0x9ec)!==_0x359865(0xb53)){if(!_0x2cf8e4)continue;_0x2cf8e4['requestMotion'](_0x4b036a);}else{if(!_0x55092e[_0x359865(0x5ea)]())return;const _0x1b0591=_0x2a3fb4[_0x359865(0xb48)](),_0x49375c=_0x14e819['_action'],_0x4c3dd2=_0x1e697b[_0x359865(0xb40)],_0x5cc3f8=_0x3cbc48[_0x359865(0x5c4)];if(!_0x1b0591||!_0x49375c||!_0x4c3dd2)return;if(!_0x49375c[_0x359865(0xa8a)]())return;_0x5cc3f8['displayAction'](_0x4c3dd2,_0x49375c[_0x359865(0xa8a)]()),_0x1b0591[_0x359865(0x73c)](_0x359865(0x3cb));}}this['callNextMethod']();},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x6d2)]=function(_0x290e56,_0x1a6ca2,_0xedd9f6,_0x4eaaf7,_0x12a0e8,_0x54c4e5){const _0x5f59e2=_0x5bdce9;_0x290e56[_0x5f59e2(0xa3e)](_0x1a6ca2,_0xedd9f6,_0x4eaaf7,_0x12a0e8,_0x54c4e5,-0x1),this['callNextMethod']();},Window_BattleLog[_0x5bdce9(0x768)][_0x5bdce9(0x633)]=function(_0x10cde3,_0x1e4822,_0x2468a9,_0x441bf2,_0xe467a0,_0x4b0c45,_0x233fb6){const _0x479605=_0x5bdce9,_0x74afc3=Math[_0x479605(0x339)](..._0x1e4822[_0x479605(0x782)](_0x286993=>_0x286993[_0x479605(0xb0d)]()[_0x479605(0x8f0)]-_0x286993['battler']()['mainSpriteWidth']()/0x2)),_0x3244b4=Math[_0x479605(0xa5e)](..._0x1e4822[_0x479605(0x782)](_0x44bbfd=>_0x44bbfd[_0x479605(0xb0d)]()[_0x479605(0x8f0)]+_0x44bbfd[_0x479605(0xb0d)]()[_0x479605(0x1af)]()/0x2)),_0x354c8e=Math[_0x479605(0x339)](..._0x1e4822[_0x479605(0x782)](_0x288a36=>_0x288a36[_0x479605(0xb0d)]()[_0x479605(0x4c9)]-_0x288a36[_0x479605(0xb0d)]()[_0x479605(0x1a1)]())),_0x1b8462=Math[_0x479605(0xa5e)](..._0x1e4822[_0x479605(0x782)](_0x336073=>_0x336073[_0x479605(0xb0d)]()[_0x479605(0x4c9)])),_0x449c7f=_0x1e4822[_0x479605(0xb85)](_0xc77179=>_0xc77179['isActor']())[_0x479605(0x12d)],_0x27ee5f=_0x1e4822['filter'](_0x1ed4a8=>_0x1ed4a8[_0x479605(0x203)]())[_0x479605(0x12d)];let _0x5840a7=0x0,_0x590844=0x0;if(_0x2468a9[_0x479605(0x16b)](/front/i))'TppaV'===_0x479605(0x266)?(_0x2d10f7[_0x479605(0x61c)][_0x479605(0x880)][_0x479605(0x4b1)](this),this[_0x479605(0x3f3)]()):_0x5840a7=_0x449c7f>=_0x27ee5f?_0x74afc3:_0x3244b4;else{if(_0x2468a9[_0x479605(0x16b)](/middle/i))_0x479605(0x39d)!==_0x479605(0x39d)?this[_0x479605(0x788)]=_0x479605(0x641):(_0x5840a7=(_0x74afc3+_0x3244b4)/0x2,_0x233fb6=-0x1);else _0x2468a9['match'](/back/i)&&(_0x5840a7=_0x449c7f>=_0x27ee5f?_0x3244b4:_0x74afc3);}if(_0x2468a9[_0x479605(0x16b)](/head/i))_0x590844=_0x354c8e;else{if(_0x2468a9['match'](/center/i)){if('dneln'===_0x479605(0xaa4))_0x590844=(_0x354c8e+_0x1b8462)/0x2;else return _0x479605(0x68c)[_0x479605(0x824)](_0x4ecda1(_0x192624['$1']));}else _0x2468a9['match'](/base/i)&&(_0x590844=_0x1b8462);}_0x10cde3[_0x479605(0xa3e)](_0x5840a7,_0x590844,_0x441bf2,_0xe467a0,_0x4b0c45,_0x233fb6),this['callNextMethod']();},Window_BattleLog[_0x5bdce9(0x768)]['performJump']=function(_0x282ee5,_0x3e0ebb,_0x4dd0bb){const _0x255c24=_0x5bdce9;for(const _0x1d65be of _0x282ee5){if(_0x255c24(0x4c2)!==_0x255c24(0x4c2)){if(_0x1caf67[_0x255c24(0x168)]!==_0x3c3899)return _0xd245ee[_0x255c24(0x168)];if(this[_0x255c24(0x4e7)])return this[_0x255c24(0x4e7)];return this[_0x255c24(0x4e7)]=_0x1b88f9[_0x255c24(0x61c)][_0x255c24(0x76e)]['BattleLayout'][_0x255c24(0x158)][_0x255c24(0x63a)]()[_0x255c24(0x92d)](),this[_0x255c24(0x4e7)]==='sideview_ui'&&!_0x53a414[_0x255c24(0x8fd)]&&(this[_0x255c24(0x4e7)]=_0x255c24(0xa34)),this['_battleLayoutStyle'];}else{if(!_0x1d65be)continue;_0x1d65be[_0x255c24(0x4ba)](_0x3e0ebb,_0x4dd0bb);}}this[_0x255c24(0x670)]();}; \ No newline at end of file diff --git a/js/plugins/VisuMZ_2_BattleSystemSTB.js b/js/plugins/VisuMZ_2_BattleSystemSTB.js new file mode 100644 index 0000000..95aaee6 --- /dev/null +++ b/js/plugins/VisuMZ_2_BattleSystemSTB.js @@ -0,0 +1,1746 @@ +//============================================================================= +// VisuStella MZ - Battle System - STB - Standard Turn Battle +// VisuMZ_2_BattleSystemSTB.js +//============================================================================= + +var Imported = Imported || {}; +Imported.VisuMZ_2_BattleSystemSTB = true; + +var VisuMZ = VisuMZ || {}; +VisuMZ.BattleSystemSTB = VisuMZ.BattleSystemSTB || {}; +VisuMZ.BattleSystemSTB.version = 1.14; + +//============================================================================= + /*: + * @target MZ + * @plugindesc [RPG Maker MZ] [Tier 2] [Version 1.14] [BattleSystemSTB] + * @author VisuStella + * @url http://www.yanfly.moe/wiki/Battle_System_-_STB_VisuStella_MZ + * @base VisuMZ_0_CoreEngine + * @base VisuMZ_1_BattleCore + * @orderAfter VisuMZ_1_BattleCore + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * The Standard Turn Battle (STB) system uses RPG Maker MZ's default non-TPB + * battle system as a base. Action orders are determined by the battler's AGI + * values and they go from highest to lowest. However, actions are not selected + * at the start of the turn. Instead, as the turn progresses, actions are then + * picked as each battler's turn comes up and is executed immediately. + * + * Optional to the battle system but fine tuned to it is the Exploit System. + * When landing an elemental weakness or critical hit against a foe, the + * battler can gain bonuses as well as an extra turn while the foe will become + * stunned or gain any desired state(s). When all enemies are exploited in a + * single turn, a common event can also be played, too. + * + * A Turn Order Display will also appear on the screen to show the order the + * battlers will take their turns in. This lets the player plan in advance on + * how to go about the rest of the turn. + * + * *NOTE* To use this battle system, you will need the updated version of + * VisuStella's Core Engine. Go into its Plugin Parameters and change the + * "Battle System" plugin parameter to "stb". + * + * Features include all (but not limited to) the following: + * + * * Utilizes the balanced AGI nature of the Default Turn Battle system. + * * Allows for actions to execute immediately upon selection. + * * A Turn Order Display to show the player when each battler will have its + * turn to perform an action. + * * Skills and Items can have an "Instant Use" effect, which allows them to + * perform an action immediately without using up a turn. + * * An optional Exploit System that can be disabled if desired, but otherwise, + * fine tuned to make use of STB's highly compatible nature. + * * Landing an elemental weakness or critical hit can allow the active battler + * to gain bonuses, ranging from states to extra actions to custom effects + * that can be added on through JavaScript plugin parameters. + * * An exploited enemy can suffer from states and/or custom effects added + * through JavaScript plugin parameters. + * * If all enemies are exploited, a common event can run to allow for a custom + * follow up action. + * + * ============================================================================ + * Requirements + * ============================================================================ + * + * This plugin is made for RPG Maker MZ. This will not work in other iterations + * of RPG Maker. + * + * ------ Required Plugin List ------ + * + * * VisuMZ_0_CoreEngine + * * VisuMZ_1_BattleCore + * + * This plugin requires the above listed plugins to be installed inside your + * game's Plugin Manager list in order to work. You cannot start your game with + * this plugin enabled without the listed plugins. + * + * ------ Tier 2 ------ + * + * This plugin is a Tier 2 plugin. Place it under other plugins of lower tier + * value on your Plugin Manager list (ie: 0, 1, 2, 3, 4, 5). This is to ensure + * that your plugins will have the best compatibility with the rest of the + * VisuStella MZ library. + * + * ============================================================================ + * Major Changes + * ============================================================================ + * + * This plugin adds some new hard-coded features to RPG Maker MZ's functions. + * The following is a list of them. + * + * --- + * + * Turn Order Display + * + * The Turn Order Display will capture the battle's currently active battler + * and any battlers found in the active battlers array for the BattleManager. + * This does not overwrite any functions, but the Turn Order Display may or may + * not conflict with any existing HUD elements that are already positioned on + * the screen. If so, you can choose to offset the Turn Order Display or move + * it to a different part of the screen through the plugin parameters. + * + * --- + * + * Action Speed + * + * For skills and items, action speeds now behave differently now. Because + * actions are now decided after a turn starts, positioning will no longer be + * decided from the selected skill/item's action speed for the current turn. + * + * Instead, the action speed used by a skill or item will determine the bonus + * speed (or speed penalty if negative) for the following turn. Using a Guard + * action with a +2000 Action Speed will raise the following turn's speed by + * +2000, whereas what is originally a long charge time skill with -1000 speed + * will decrease the following action's speed by -1000. + * + * You can also customize how speed is calculated through JS Plugin Parameters + * found in the Mechanics Settings. + * + * --- + * + * Instant Use + * + * Skills and Items can have an "Instant Use" property which allows them to be + * used immediately without consuming a turn. This can be used for actions that + * otherwise do not warrant a whole turn. These can be used for minor buffs, + * debuffs, toggles, etc. + * + * --- + * + * Exploit System + * + * This is an optional system. If you wish to turn it off, you can do so in the + * plugin parameters. + * + * There are two main ways that battlers can be exploited. One is by receiving + * damage that strikes an elemental weakness. The other is by receiving damage + * from a Critical Hit. Exploited battlers can receive penalty states. These + * states can be adjusted in the plugin parameters. The default penalty state + * is the Stunned state. + * + * The battler doing the exploiting can receive bonuses instead. This is to + * reward a power play. These bonuses can range from added states to receiving + * an extra action and allowing the active battler to immediately attack again. + * + * Each battler can only be exploited once per turn. This means if an enemy + * would receive multiple attacks to its elemental weakness(es), the exploited + * effect will only occur once per turn, meaning the penalty states won't stack + * multiple times over. This limitation is for the sake of game balance, but if + * you so wish, you can turn off this limitation in the plugin parameters. + * + * Each action can also exploit only once per use and against an unexploited + * target. This means battlers cannot use the same elemental attacks against + * the same foes over and over to stack up an infinite amount of turns. If the + * player wants to gain more bonuses, the player would have to strike against + * unexploited foes. This limitation is for the sake of game balance, but if + * you so wish, you can turn off this limitation in the plugin parameters. + * + * When all members of a party/troop are exploited, a common event can be + * triggered to run, allowing for potential follow up actions. How you wish to + * make these common events is up to you. + * + * --- + * + * ============================================================================ + * VisuStella MZ Compatibility + * ============================================================================ + * + * While this plugin is compatible with the majority of the VisuStella MZ + * plugin library, it is not compatible with specific plugins. Here is a list + * of the ones this plugin is not compatible with. + * + * --- + * + * VisuMZ_4_BreakShields + * + * The Break Shields plugin can be used together with Battle System - STB. + * However, it cannot be used together with the STB Exploit system. This is + * because both Break Shields and the Exploit system function under similar + * mechanics and will conflict. However, if STB's Exploit system is turned off, + * then you can use all of the Break Shield plugin's features fully. + * + * --- + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * The following are notetags that have been added through this plugin. These + * notetags will not work with your game if this plugin is OFF or not present. + * + * --- + * + * === General STB-Related Notetags === + * + * These notetags are general purpose notetags that have became available + * through this plugin. + * + * --- + * + * <STB Help> + * description + * description + * </STB Help> + * + * - Used for: Skill, Item Notetags + * - If your game happens to support the ability to change battle systems, this + * notetag lets you change how the skill/item's help description text will + * look under STB. + * - This is primarily used if the skill behaves differently in STB versus any + * other battle system. + * - Replace 'description' with help text that's only displayed if the game's + * battle system is set to STB. + * + * --- + * + * === STB Turn Order Display-Related Notetags === + * + * These notetags affect the STB Turn Order Display + * + * --- + * + * <STB Turn Order Icon: x> + * + * - Used for: Actor, Enemy Notetags + * - Changes the slot graphic used for the battler to a specific icon. + * - Replace 'x' with the icon index to be used. + * + * --- + * + * <STB Turn Order Face: filename, index> + * + * - Used for: Actor, Enemy Notetags + * - Changes the slot graphic used for the enemy to a specific face. + * - Replace 'filename' with the filename of the image. + * - Do not include the file extension. + * - Replace 'index' with the index of the face. Index values start at 0. + * - Example: <STB Turn Order Face: Monster, 1> + * + * --- + * + * === Instant Use-Related Notetags === + * + * --- + * + * <STB Instant> + * <STB Instant Use> + * <STB Instant Cast> + * + * - Used for: Skill, Item Notetags + * - Allows the skill/item to be used immediately without consuming a turn. + * + * --- + * + * === Exploit-Related Notetags === + * + * --- + * + * <STB Exploited Gain State: id> + * <STB Exploited Gain State: id, id, id> + * + * <STB Exploited Gain State: name> + * <STB Exploited Gain State: name, name, name> + * + * - Used for: Class, Enemy Notetags + * - If an actor (with the specified class) or enemy is exploited via elemental + * weaknesses or critical hits, apply the listed penalty state(s). + * - Replace 'id' with a number representing the penalty state ID's you wish + * to apply to the exploited battler. + * - Insert multiple 'id' values to apply multiple penalty states at once. + * - Replace 'name' with the name of the penalty state you wish to apply to the + * exploited battler. + * - Insert multiple 'name' entries to apply multiple penalty states at once. + * + * --- + * + * <STB Cannot Be Exploited> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - This prevents the affected battler from being exploited via elemental + * weaknesses or critical hits. + * + * --- + * + * <STB Exploiter Gain State: id> + * <STB Exploiter Gain State: id, id, id> + * + * <STB Exploiter Gain State: name> + * <STB Exploiter Gain State: name, name, name> + * + * - Used for: Class, Enemy Notetags + * - If an actor (with the specified class) or enemy exploits an opponent with + * an elemental weakness or critical hit, apply the listed bonus state(s). + * - Replace 'id' with a number representing the bonus state ID's you wish + * to apply to the exploited battler. + * - Insert multiple 'id' values to apply multiple bonus states at once. + * - Replace 'name' with the name of the bonus state you wish to apply to the + * exploited battler. + * - Insert multiple 'name' entries to apply multiple bonus states at once. + * + * --- + * + * <STB Cannot Be Exploiter> + * + * - Used for: Actor, Class, Weapon, Armor, Enemy, State Notetags + * - This prevents the affected battler from exploiting any opponents via + * elemental weaknesses or critical hits. + * + * --- + * + * ============================================================================ + * Plugin Commands + * ============================================================================ + * + * The following are Plugin Commands that come with this plugin. They can be + * accessed through the Plugin Command event command. + * + * --- + * + * === Actor Plugin Commands === + * + * --- + * + * Actor: Change STB Turn Order Icon + * - Changes the icons used for the specific actor(s) on the STB Turn Order. + * + * Actor ID(s): + * - Select which Actor ID(s) to affect. + * + * Icon: + * - Changes the graphic to this icon. + * + * --- + * + * Actor: Change STB Turn Order Face + * - Changes the faces used for the specific actor(s) on the STB Turn Order. + * + * Actor ID(s): + * - Select which Actor ID(s) to affect. + * + * Face Name: + * - This is the filename for the target face graphic. + * + * Face Index: + * - This is the index for the target face graphic. + * + * --- + * + * Actor: Clear STB Turn Order Graphic + * - Clears the STB Turn Order graphics for the actor(s). + * - The settings will revert to the Plugin Parameter settings. + * + * Actor ID(s): + * - Select which Actor ID(s) to affect. + * + * --- + * + * === Enemy Plugin Commands === + * + * --- + * + * Enemy: Change STB Turn Order Icon + * - Changes the icons used for the specific enemy(ies) on the STB Turn Order. + * + * Enemy Index(es): + * - Select which enemy index(es) to affect. + * + * Icon: + * - Changes the graphic to this icon. + * + * --- + * + * Enemy: Change STB Turn Order Face + * - Changes the faces used for the specific enemy(ies) on the STB Turn Order. + * + * Enemy Index(es): + * - Select which enemy index(es) to affect. + * + * Face Name: + * - This is the filename for the target face graphic. + * + * Face Index: + * - This is the index for the target face graphic. + * + * --- + * + * Enemy: Clear STB Turn Order Graphic + * - Clears the STB Turn Order graphics for the enemy(ies). + * - The settings will revert to the Plugin Parameter settings. + * + * Enemy Index(es): + * - Select which enemy index(es) to affect. + * + * --- + * + * === System Plugin Commands === + * + * --- + * + * System: STB Turn Order Visibility + * - Determine the visibility of the STB Turn Order Display. + * + * Visibility: + * - Changes the visibility of the STB Turn Order Display. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Mechanics Settings + * ============================================================================ + * + * Determines the mechanics of the STB Battle System. + * + * --- + * + * Speed + * + * JS: Finalized Speed: + * - Code used to calculate the finalized speed at the start of each turn. + * + * JS: Next Turn Speed: + * - Code used to calculate speed for a following turn. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Exploit System Settings + * ============================================================================ + * + * Here, you can adjust the main settings for the Exploit System, including + * where you can turn it on/off. The Exploited and Exploiter settings are + * extensions of the Exploit System and are better off with their own sections. + * + * --- + * + * Settings + * + * Enable System?: + * - Enable the exploit system? + * - If disabled, ignore all the mechanics regarding the Exploit System. + * + * Critical Hits: + * - Do critical hits exploit the opponent? + * + * Elemental Weakness: + * - Do elemental weaknesses exploit the opponent? + * + * Minimum Rate: + * - What's the minimum rate needed to count as an elemental weakness? + * + * Reset Each Turn: + * - Reset exploits at the end of each turn? + * + * --- + * + * ============================================================================ + * Plugin Parameters: Exploited Effects Settings + * ============================================================================ + * + * These are effects for the exploited battlers (the receiving end). Change how + * you want exploited battlers to behave here. + * + * --- + * + * Mechanics + * + * Added States: + * - A list of the states that are added when a target is exploited. + * + * Full Exploit Events: + * vs Actors Event: + * vs Enemies Event: + * - If all actors/enemies have been fully exploited, run this common event. + * - Does not work with unlimited exploits. + * + * Unlimited Exploits: + * - Can battlers be exploited endlessly? + * + * JS: On Exploited: + * - Code used when the target has been exploited. + * + * --- + * + * Animation + * + * Animation ID: + * - Play this animation when the effect activates. + * + * Mirror Animation: + * - Mirror the effect animation? + * + * Mute Animation: + * - Mute the effect animation? + * + * --- + * + * Popups + * + * Text: + * - Text displayed upon the effect activating. + * + * Text Color: + * - Use #rrggbb for custom colors or regular numbers for text colors from + * the Window Skin. + * + * Flash Color: + * - Adjust the popup's flash color. + * - Format: [red, green, blue, alpha] + * + * Flash Duration: + * - What is the frame duration of the flash effect? + * + * --- + * + * ============================================================================ + * Plugin Parameters: Exploiter Effects Settings + * ============================================================================ + * + * These are effects for the battlers doing the exploiting. Change how you want + * exploiter battlers to behave here. + * + * --- + * + * Mechanics + * + * Added States: + * - A list of the states that are added when a user exploits a foe. + * + * Extra Actions: + * - Successfully exploiting an enemy will grant the user this many + * extra actions. + * + * Multiple Exploits: + * - Can battlers exploit opponents multiple times with one action? + * + * JS: On Exploiting: + * - Code used when the user is exploiting a foe's weakness. + * + * --- + * + * Animation + * + * Animation ID: + * - Play this animation when the effect activates. + * + * Mirror Animation: + * - Mirror the effect animation? + * + * Mute Animation: + * - Mute the effect animation? + * + * --- + * + * Popups + * + * Text: + * - Text displayed upon the effect activating. + * + * Text Color: + * - Use #rrggbb for custom colors or regular numbers for text colors from + * the Window Skin. + * + * Flash Color: + * - Adjust the popup's flash color. + * - Format: [red, green, blue, alpha] + * + * Flash Duration: + * - What is the frame duration of the flash effect? + * + * --- + * + * ============================================================================ + * Plugin Parameters: Turn Order Settings + * ============================================================================ + * + * Turn Order Display settings used for Battle System STB. These adjust how the + * visible turn order appears in-game. + * + * --- + * + * General + * + * Display Position: + * - Select where the Turn Order will appear on the screen. + * + * Offset X: + * - How much to offset the X coordinate by. + * - Negative: left. Positive: right. + * + * Offset Y: + * - How much to offset the Y coordinate by. + * - Negative: up. Positive: down. + * + * Center Horizontal?: + * - Reposition the Turn Order Display to always be centered if it is a + * 'top' or 'bottom' position? + * + * Reposition for Help?: + * - If the display position is at the top, reposition the display when the + * help window is open? + * + * Reposition Log?: + * - If the display position is at the top, reposition the Battle Log Window + * to be lower? + * + * Forward Direction: + * - Decide on the direction of the Turn Order. + * - Settings may vary depending on position. + * - Left to Right / Down to Up + * - Right to Left / Up to Down + * + * Subject Distance: + * - How far do you want the currently active battler to distance itself from + * the rest of the Turn Order? + * + * Screen Buffer: + * - What distance do you want the display to be away from the edge of the + * screen by? + * + * --- + * + * Reposition For Help + * + * Repostion X By: + * Repostion Y By: + * - Reposition the display's coordinates by this much when the Help Window + * is visible. + * + * --- + * + * Slots + * + * Max Horizontal: + * - Maximum slots you want to display for top and bottom Turn Order Display + * positions? + * + * Max Vertical: + * - Maximum slots you want to display for left and right Turn Order Display + * positions? + * + * Length: + * - How many pixels long should the slots be on the Turn Order display? + * + * Thin: + * - How many pixels thin should the slots be on the Turn Order display? + * + * Update Frames: + * - How many frames should it take for the slots to update their + * positions by? + * + * --- + * + * Slot Border + * + * Show Border?: + * - Show borders for the slot sprites? + * + * Border Thickness: + * - How many pixels thick should the colored portion of the border be? + * + * Actors + * Enemies + * + * Border Color: + * - Use #rrggbb for custom colors or regular numbers for text colors + * from the Window Skin. + * + * Border Skin: + * - Optional. Place a skin on the actor/enemy borders instead of + * rendering them? + * + * --- + * + * Slot Sprites + * + * Actors + * + * Sprite Type: + * - Select the type of sprite used for the actor graphic. + * - Face Graphic - Show the actor's face. + * - Icon - Show a specified icon. + * - Sideview Actor - Show the actor's sideview battler. + * + * Default Icon: + * - Which icon do you want to use for actors by default? + * + * Enemies + * + * Sprite Type: + * - Select the type of sprite used for the enemy graphic. + * - Face Graphic - Show a specified face graphic. + * - Icon - Show a specified icon. + * - Enemy - Show the enemy's graphic or sideview battler. + * + * Default Face Name: + * - Use this default face graphic if there is no specified face. + * + * Default Face Index: + * - Use this default face index if there is no specified index. + * + * Default Icon: + * - Which icon do you want to use for enemies by default? + * + * Match Hue?: + * - Match the hue for enemy battlers? + * - Does not apply if there's a sideview battler. + * + * --- + * + * Slot Letter + * + * Show Enemy Letter?: + * - Show the enemy's letter on the slot sprite? + * + * Font Name: + * - The font name used for the text of the Letter. + * - Leave empty to use the default game's font. + * + * Font Size: + * - The font size used for the text of the Letter. + * + * --- + * + * Slot Background + * + * Show Background?: + * - Show the background on the slot sprite? + * + * Actors + * Enemies + * + * Background Color 1: + * Background Color 2: + * - Use #rrggbb for custom colors or regular numbers for text colors + * from the Window Skin. + * + * Background Skin: + * - Optional. Use a skin for the actor background instead of + * rendering them? + * + * --- + * + * ============================================================================ + * Terms of Use + * ============================================================================ + * + * 1. These plugins may be used in free or commercial games provided that they + * have been acquired through legitimate means at VisuStella.com and/or any + * other official approved VisuStella sources. Exceptions and special + * circumstances that may prohibit usage will be listed on VisuStella.com. + * + * 2. All of the listed coders found in the Credits section of this plugin must + * be given credit in your games or credited as a collective under the name: + * "VisuStella". + * + * 3. You may edit the source code to suit your needs, so long as you do not + * claim the source code belongs to you. VisuStella also does not take + * responsibility for the plugin if any changes have been made to the plugin's + * code, nor does VisuStella take responsibility for user-provided custom code + * used for custom control effects including advanced JavaScript notetags + * and/or plugin parameters that allow custom JavaScript code. + * + * 4. You may NOT redistribute these plugins nor take code from this plugin to + * use as your own. These plugins and their code are only to be downloaded from + * VisuStella.com and other official/approved VisuStella sources. A list of + * official/approved sources can also be found on VisuStella.com. + * + * 5. VisuStella is not responsible for problems found in your game due to + * unintended usage, incompatibility problems with plugins outside of the + * VisuStella MZ library, plugin versions that aren't up to date, nor + * responsible for the proper working of compatibility patches made by any + * third parties. VisuStella is not responsible for errors caused by any + * user-provided custom code used for custom control effects including advanced + * JavaScript notetags and/or plugin parameters that allow JavaScript code. + * + * 6. If a compatibility patch needs to be made through a third party that is + * unaffiliated with VisuStella that involves using code from the VisuStella MZ + * library, contact must be made with a member from VisuStella and have it + * approved. The patch would be placed on VisuStella.com as a free download + * to the public. Such patches cannot be sold for monetary gain, including + * commissions, crowdfunding, and/or donations. + * + * 7. If this VisuStella MZ plugin is a paid product, all project team members + * must purchase their own individual copies of the paid product if they are to + * use it. Usage includes working on related game mechanics, managing related + * code, and/or using related Plugin Commands and features. Redistribution of + * the plugin and/or its code to other members of the team is NOT allowed + * unless they own the plugin itself as that conflicts with Article 4. + * + * 8. Any extensions and/or addendums made to this plugin's Terms of Use can be + * found on VisuStella.com and must be followed. + * + * ============================================================================ + * Credits + * ============================================================================ + * + * If you are using this plugin, credit the following people in your game: + * + * Team VisuStella + * * Yanfly + * * Arisu + * * Olivia + * * Irina + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.14: March 3, 2022 + * * Optimization Update! + * ** Plugin should run more optimized. + * + * Version 1.13: November 11, 2021 + * * Bug Fixes! + * ** Critical hits for enemies with only one action per turn should now + * properly allow for the exploited effect to occur. Fix made by Olivia. + * + * Version 1.12: October 28, 2021 + * * Bug Fixes! + * ** Turn Order display will no longer appear at differing X and Y positions + * when using specific battle layouts. Update made by Olivia. + * + * Version 1.11: July 23, 2021 + * * Bug Fixes! + * ** Fixed a bug that altered the current action choice when enemies are using + * a skill that utilizes instants when there is only enough MP left for one + * of those actions. Fix made by Olivia. + * + * Version 1.10: July 2, 2021 + * * Bug Fixes! + * ** Dead battlers will no longer reappear in the turn order on subsequent + * turns. Fix made by Olivia. + * * Documentation Update! + * ** Help file updated for updated features. + * * Feature Update! + * ** "Mechanics Settings" Plugin Parameters has been updated into + * "Speed Mechanics" with updated formulas that will now correlate any + * adjusted AGI changes made to battlers to alter the following turn + * properly. Update made by Olivia. + * + * Version 1.09: March 26, 2021 + * * Bug Fixes! + * ** Enemy exploit actions should now associate A.I. properly. Fix by Yanfly. + * * Documentation Update! + * ** Added "VisuStella MZ Compatibility" section for detailed compatibility + * explanations with the VisuMZ_4_BreakShields plugin. + * + * Version 1.08: March 19, 2021 + * * Feature Update! + * ** Turn Order Window calculations slightly tweaked for times when the window + * layer is bigger than it should be. Update made by Olivia. + * * Optimization Update! + * ** Plugin should run more optimized. + * + * Version 1.07: January 22, 2021 + * * Feature Update! + * ** A different kind of end battle check is now made to determine hiding the + * turn order display. Update made by Olivia. + * + * Version 1.06: January 1, 2021 + * * Compatibility Update + * ** Added compatibility functionality for future plugins. + * + * Version 1.05: December 25, 2020 + * * Bug Fixes! + * ** Starting battle from a surprise attack will no longer skip turn 1. And + * starting battle without any inputtable actors will no longer skip turn 1. + * Fix made by Yanfly. + * + * Version 1.04: December 18, 2020 + * * Feature Update! + * ** Enemies can now benefit from <STB Instant> skills. Update made by Olivia. + * ** Action End States updating are now handled by Skills and States Core + * v1.07+ for proper intended usage. Change from Battle System - STB v1.02 + * is reverted here to prevent triggering the update twice. + * + * Version 1.03: December 4, 2020 + * * Bug Fixes! + * ** Select Next Command no longer returns undefined. Fix made by Olivia. + * + * Version 1.02: November 22, 2020 + * * Bug Fixes! + * ** Action End States now update at the end of each individual action. + * Fix made by Yanfly. + * + * Version 1.01: November 15, 2020 + * * Bug Fixes! + * ** Now compatible with Party Command Window Disable from the Battle Core. + * Fix made by Yanfly. + * + * Version 1.00 Official Release Date: November 23, 2020 + * * Finished Plugin! + * + * ============================================================================ + * End of Helpfile + * ============================================================================ + * + * @ -------------------------------------------------------------------------- + * + * @command StbTurnOrderActorIcon + * @text Actor: Change STB Turn Order Icon + * @desc Changes the icons used for the specific actor(s) on the STB Turn Order. + * + * @arg Actors:arraynum + * @text Actor ID(s) + * @type actor[] + * @desc Select which Actor ID(s) to affect. + * @default ["1"] + * + * @arg IconIndex:num + * @text Icon + * @desc Changes the graphic to this icon. + * @default 84 + * + * @ -------------------------------------------------------------------------- + * + * @command StbTurnOrderActorFace + * @text Actor: Change STB Turn Order Face + * @desc Changes the faces used for the specific actor(s) on the STB Turn Order. + * + * @arg Actors:arraynum + * @text Actor ID(s) + * @type actor[] + * @desc Select which Actor ID(s) to affect. + * @default ["1"] + * + * @arg FaceName:str + * @text Face Name + * @type file + * @dir img/faces/ + * @desc This is the filename for the target face graphic. + * @default Actor1 + * + * @arg FaceIndex:num + * @text Face Index + * @type number + * @desc This is the index for the target face graphic. + * @default 0 + * + * @ -------------------------------------------------------------------------- + * + * @command StbTurnOrderClearActorGraphic + * @text Actor: Clear STB Turn Order Graphic + * @desc Clears the STB Turn Order graphics for the actor(s). + * The settings will revert to the Plugin Parameter settings. + * + * @arg Actors:arraynum + * @text Actor ID(s) + * @type actor[] + * @desc Select which Actor ID(s) to affect. + * @default ["1"] + * + * @ -------------------------------------------------------------------------- + * + * @command StbTurnOrderEnemyIcon + * @text Enemy: Change STB Turn Order Icon + * @desc Changes the icons used for the specific enemy(ies) on the STB Turn Order. + * + * @arg Enemies:arraynum + * @text Enemy Index(es) + * @type number[] + * @desc Select which enemy index(es) to affect. + * @default ["1"] + * + * @arg IconIndex:num + * @text Icon + * @desc Changes the graphic to this icon. + * @default 298 + * + * @ -------------------------------------------------------------------------- + * + * @command StbTurnOrderEnemyFace + * @text Enemy: Change STB Turn Order Face + * @desc Changes the faces used for the specific enemy(ies) on the STB Turn Order. + * + * @arg Enemies:arraynum + * @text Enemy Index(es) + * @type number[] + * @desc Select which enemy index(es) to affect. + * @default ["1"] + * + * @arg FaceName:str + * @text Face Name + * @parent EnemySprite + * @type file + * @dir img/faces/ + * @desc This is the filename for the target face graphic. + * @default Monster + * + * @arg FaceIndex:num + * @text Face Index + * @parent EnemySprite + * @type number + * @desc This is the index for the target face graphic. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command StbTurnOrderClearEnemyGraphic + * @text Enemy: Clear STB Turn Order Graphic + * @desc Clears the STB Turn Order graphics for the enemy(ies). + * The settings will revert to the Plugin Parameter settings. + * + * @arg Enemies:arraynum + * @text Enemy Index(es) + * @type number[] + * @desc Select which enemy index(es) to affect. + * @default ["1"] + * + * @ -------------------------------------------------------------------------- + * + * @command SystemTurnOrderVisibility + * @text System: STB Turn Order Visibility + * @desc Determine the visibility of the STB Turn Order Display. + * + * @arg Visible:eval + * @text Visibility + * @type boolean + * @on Visible + * @off Hidden + * @desc Changes the visibility of the STB Turn Order Display. + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @ ========================================================================== + * @ Plugin Parameters + * @ ========================================================================== + * + * @param BreakHead + * @text -------------------------- + * @default ---------------------------------- + * + * @param BattleSystemSTB + * @default Plugin Parameters + * + * @param ATTENTION + * @default READ THE HELP FILE + * + * @param BreakSettings + * @text -------------------------- + * @default ---------------------------------- + * + * @param Speed:struct + * @text Speed Mechanics + * @type struct<Speed> + * @desc Determines the mechanics of the STB Battle System. + * @default {"Speed":"","InitialSpeedJS:func":"\"// Declare Constants\\nconst user = this;\\nconst agi = user.agi;\\n\\n// Create Base Speed\\nlet speed = agi;\\n\\n// Random Speed Check\\nif (user.allowRandomSpeed()) {\\n speed += Math.randomInt(Math.floor(5 + agi / 4));\\n}\\n\\n// Add Saved Speed Modifiers from Previous Round\\nspeed += user.getSTBNextTurnSpeed();\\n\\n// Return Speed\\nreturn speed;\"","NextTurnSavedSpeedJS:func":"\"// Create Speed\\nconst action = this;\\nlet speed = 0;\\n\\n// Check Object\\nif (action.item()) {\\n speed += action.item().speed;\\n}\\n\\n// Check Attack\\nif (action.isAttack()) {\\n speed += action.subject().attackSpeed();\\n}\\n\\n// Return Speed\\nreturn speed;\""} + * + * @param Exploit:struct + * @text Exploit System + * @type struct<Exploit> + * @desc Settings for the STB's Exploit System. + * @default {"EnableExploit:eval":"true","ExploitCritical:eval":"true","ExploitEleWeakness:eval":"true","ExploitEleRate:num":"1.05","TurnResetExploits:eval":"true"} + * + * @param Exploited:struct + * @text Exploited Effects + * @parent Exploit:struct + * @type struct<Exploited> + * @desc Settings for targets being Exploited. + * @default {"Mechanics":"","AddedStates:arraynum":"[\"13\"]","FullExploitEvents":"","vsActorsFullExploit:num":"0","vsEnemiesFullExploit:num":"0","UnlimitedExploits:eval":"false","CustomJS:func":"\"// Declare Constants\\nconst target = this;\\nconst user = arguments[0];\\nconst action = arguments[1];\\n\\n// Perform Actions\\n\"","Animation":"","AnimationID:num":"0","Mirror:eval":"false","Mute:eval":"false","Popups":"","PopupText:str":"","TextColor:str":"0","FlashColor:eval":"[255, 255, 255, 160]","FlashDuration:num":"60"} + * + * @param Exploiter:struct + * @text Exploiter Effects + * @parent Exploit:struct + * @type struct<Exploiter> + * @desc Settings for users doing the Exploiting. + * @default {"Mechanics":"","AddedStates:arraynum":"[]","ExtraActions:num":"1","MultipleExploits:eval":"false","CustomJS:func":"\"// Declare Constants\\nconst user = this;\\nconst target = arguments[0];\\nconst action = arguments[1];\\n\\n// Perform Actions\\n\"","Animation":"","AnimationID:num":"12","Mirror:eval":"false","Mute:eval":"false","Popups":"","PopupText:str":"ONE MORE!","TextColor:str":"0","FlashColor:eval":"[255, 255, 128, 160]","FlashDuration:num":"60"} + * + * @param TurnOrder:struct + * @text Turn Order Display + * @type struct<TurnOrder> + * @desc Turn Order Display settings used for Battle System STB. + * @default {"General":"","DisplayPosition:str":"top","DisplayOffsetX:num":"0","DisplayOffsetY:num":"0","CenterHorz:eval":"true","RepositionTopForHelp:eval":"true","RepositionLogWindow:eval":"true","OrderDirection:eval":"true","SubjectDistance:num":"8","ScreenBuffer:num":"20","Reposition":"","RepositionTopHelpX:num":"0","RepositionTopHelpY:num":"96","Slots":"","MaxHorzSprites:num":"16","MaxVertSprites:num":"10","SpriteLength:num":"72","SpriteThin:num":"36","UpdateFrames:num":"24","Border":"","ShowMarkerBorder:eval":"true","BorderActor":"","ActorBorderColor:str":"4","ActorSystemBorder:str":"","BorderEnemy":"","EnemyBorderColor:str":"2","EnemySystemBorder:str":"","BorderThickness:num":"2","Sprite":"","ActorSprite":"","ActorBattlerType:str":"face","ActorBattlerIcon:num":"84","EnemySprite":"","EnemyBattlerType:str":"enemy","EnemyBattlerFaceName:str":"Monster","EnemyBattlerFaceIndex:num":"1","EnemyBattlerIcon:num":"298","EnemyBattlerMatchHue:eval":"true","Letter":"","EnemyBattlerDrawLetter:eval":"true","EnemyBattlerFontFace:str":"","EnemyBattlerFontSize:num":"16","Background":"","ShowMarkerBg:eval":"true","BackgroundActor":"","ActorBgColor1:str":"19","ActorBgColor2:str":"9","ActorSystemBg:str":"","BackgroundEnemy":"","EnemyBgColor1:str":"19","EnemyBgColor2:str":"18","EnemySystemBg:str":""} + * + * @param BreakEnd1 + * @text -------------------------- + * @default ---------------------------------- + * + * @param End Of + * @default Plugin Parameters + * + * @param BreakEnd2 + * @text -------------------------- + * @default ---------------------------------- + * + */ +/* ---------------------------------------------------------------------------- + * Speed Mechanics Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Speed: + * + * @param Speed + * + * @param InitialSpeedJS:func + * @text JS: Finalized Speed + * @parent Speed + * @type note + * @desc Code used to calculate initial speed at the start of battle. + * @default "// Declare Constants\nconst user = this;\nconst agi = user.agi;\n\n// Create Base Speed\nlet speed = agi;\n\n// Random Speed Check\nif (user.allowRandomSpeed()) {\n speed += Math.randomInt(Math.floor(5 + agi / 4));\n}\n\n// Add Saved Speed Modifiers from Previous Round\nspeed += user.getSTBNextTurnSpeed();\n\n// Return Speed\nreturn speed;" + * + * @param NextTurnSavedSpeedJS:func + * @text JS: Next Turn Speed + * @parent Speed + * @type note + * @desc Code used to calculate speed for a following turn. + * @default "// Create Speed\nconst action = this;\nlet speed = 0;\n\n// Check Object\nif (action.item()) {\n speed += action.item().speed;\n}\n\n// Check Attack\nif (action.isAttack()) {\n speed += action.subject().attackSpeed();\n}\n\n// Return Speed\nreturn speed;" + * + */ +/* ---------------------------------------------------------------------------- + * Exploit System Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Exploit: + * + * @param EnableExploit:eval + * @text Enable System? + * @parent Exploit + * @type boolean + * @on Enable + * @off Disable + * @desc Enable the exploit system? If disabled, ignore all the + * mechanics regarding the Exploit System. + * @default true + * + * @param ExploitCritical:eval + * @text Critical Hits + * @parent Exploit + * @type boolean + * @on Exploit + * @off Don't Exploit + * @desc Do critical hits exploit the opponent? + * @default true + * + * @param ExploitEleWeakness:eval + * @text Elemental Weakness + * @parent Exploit + * @type boolean + * @on Exploit + * @off Don't Exploit + * @desc Do elemental weaknesses exploit the opponent? + * @default true + * + * @param ExploitEleRate:num + * @text Minimum Rate + * @parent ExploitEleWeakness:eval + * @desc What's the minimum rate needed to count as an elemental weakness? + * @default 1.05 + * + * @param TurnResetExploits:eval + * @text Reset Each Turn + * @parent Exploit + * @type boolean + * @on Reset Exploits + * @off Don't Reset + * @desc Reset exploits at the end of each turn? + * @default true + * + */ +/* ---------------------------------------------------------------------------- + * Exploited Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Exploited: + * + * @param Mechanics + * + * @param AddedStates:arraynum + * @text Added States + * @parent Mechanics + * @type state[] + * @desc A list of the states that are added when a target is exploited. + * @default ["13"] + * + * @param FullExploitEvents + * @text Full Exploit Events + * @parent Mechanics + * + * @param vsActorsFullExploit:num + * @text vs Actors Event + * @parent FullExploitEvents + * @type common_event + * @desc If all actors have been fully exploited, run this common + * event. Does not work with unlimited exploits. + * @default 0 + * + * @param vsEnemiesFullExploit:num + * @text vs Enemies Event + * @parent FullExploitEvents + * @type common_event + * @desc If all enemies have been fully exploited, run this common + * event. Does not work with unlimited exploits. + * @default 0 + * + * @param UnlimitedExploits:eval + * @text Unlimited Exploits + * @parent Mechanics + * @type boolean + * @on Unlimited + * @off Once Per Turn + * @desc Can battlers be exploited endlessly? + * @default false + * + * @param CustomJS:func + * @text JS: On Exploited + * @parent Mechanics + * @type note + * @desc Code used when the target has been exploited. + * @default "// Declare Constants\nconst target = this;\nconst user = arguments[0];\nconst action = arguments[1];\n\n// Perform Actions\n" + * + * @param Animation + * + * @param AnimationID:num + * @text Animation ID + * @parent Animation + * @type animation + * @desc Play this animation when the effect activates. + * @default 0 + * + * @param Mirror:eval + * @text Mirror Animation + * @parent Animation + * @type boolean + * @on Mirror + * @off Normal + * @desc Mirror the effect animation? + * @default false + * + * @param Mute:eval + * @text Mute Animation + * @parent Animation + * @type boolean + * @on Mute + * @off Normal + * @desc Mute the effect animation? + * @default false + * + * @param Popups + * + * @param PopupText:str + * @text Text + * @parent Popups + * @desc Text displayed upon the effect activating. + * @default + * + * @param TextColor:str + * @text Text Color + * @parent Popups + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 0 + * + * @param FlashColor:eval + * @text Flash Color + * @parent Popups + * @desc Adjust the popup's flash color. + * Format: [red, green, blue, alpha] + * @default [255, 255, 255, 160] + * + * @param FlashDuration:num + * @text Flash Duration + * @parent Popups + * @type number + * @desc What is the frame duration of the flash effect? + * @default 60 + * + */ +/* ---------------------------------------------------------------------------- + * Exploiter Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Exploiter: + * + * @param Mechanics + * + * @param AddedStates:arraynum + * @text Added States + * @parent Mechanics + * @type state[] + * @desc A list of the states that are added when a user exploits a foe. + * @default [] + * + * @param ExtraActions:num + * @text Extra Actions + * @parent Mechanics + * @type number + * @desc Successfully exploiting an enemy will grant the user this many extra actions. + * @default 1 + * + * @param MultipleExploits:eval + * @text Multiple Exploits + * @parent Mechanics + * @type boolean + * @on Multiple + * @off Once Per Action + * @desc Can battlers exploit opponents multiple times with one action? + * @default false + * + * @param CustomJS:func + * @text JS: On Exploiting + * @parent Mechanics + * @type note + * @desc Code used when the user is exploiting a foe's weakness. + * @default "" + * + * @param Animation + * + * @param AnimationID:num + * @text Animation ID + * @parent Animation + * @type animation + * @desc Play this animation when the effect activates. + * @default 12 + * + * @param Mirror:eval + * @text Mirror Animation + * @parent Animation + * @type boolean + * @on Mirror + * @off Normal + * @desc Mirror the effect animation? + * @default false + * + * @param Mute:eval + * @text Mute Animation + * @parent Animation + * @type boolean + * @on Mute + * @off Normal + * @desc Mute the effect animation? + * @default false + * + * @param Popups + * + * @param PopupText:str + * @text Text + * @parent Popups + * @desc Text displayed upon the effect activating. + * @default ONE MORE! + * + * @param TextColor:str + * @text Text Color + * @parent Popups + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 0 + * + * @param FlashColor:eval + * @text Flash Color + * @parent Popups + * @desc Adjust the popup's flash color. + * Format: [red, green, blue, alpha] + * @default [255, 255, 128, 160] + * + * @param FlashDuration:num + * @text Flash Duration + * @parent Popups + * @type number + * @desc What is the frame duration of the flash effect? + * @default 60 + * + */ +/* ---------------------------------------------------------------------------- + * Turn Order Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~TurnOrder: + * + * @param General + * + * @param DisplayPosition:str + * @text Display Position + * @parent General + * @type select + * @option top + * @option bottom + * @option left + * @option right + * @desc Select where the Turn Order will appear on the screen. + * @default top + * + * @param DisplayOffsetX:num + * @text Offset X + * @parent DisplayPosition:str + * @desc How much to offset the X coordinate by. + * Negative: left. Positive: right. + * @default 0 + * + * @param DisplayOffsetY:num + * @text Offset Y + * @parent DisplayPosition:str + * @desc How much to offset the Y coordinate by. + * Negative: up. Positive: down. + * @default 0 + * + * @param CenterHorz:eval + * @text Center Horizontal? + * @parent DisplayPosition:str + * @type boolean + * @on Center + * @off Stay + * @desc Reposition the Turn Order Display to always be centered + * if it is a 'top' or 'bottom' position? + * @default true + * + * @param RepositionTopForHelp:eval + * @text Reposition for Help? + * @parent DisplayPosition:str + * @type boolean + * @on Reposition + * @off Stay + * @desc If the display position is at the top, reposition the + * display when the help window is open? + * @default true + * + * @param RepositionLogWindow:eval + * @text Reposition Log? + * @parent DisplayPosition:str + * @type boolean + * @on Reposition + * @off Stay + * @desc If the display position is at the top, reposition the + * Battle Log Window to be lower? + * @default true + * + * @param OrderDirection:eval + * @text Forward Direction + * @parent General + * @type boolean + * @on Left to Right / Down to Up + * @off Right to Left / Up to Down + * @desc Decide on the direction of the Turn Order. + * Settings may vary depending on position. + * @default true + * + * @param SubjectDistance:num + * @text Subject Distance + * @parent General + * @type number + * @desc How far do you want the currently active battler to + * distance itself from the rest of the Turn Order? + * @default 8 + * + * @param ScreenBuffer:num + * @text Screen Buffer + * @parent General + * @type number + * @desc What distance do you want the display to be away + * from the edge of the screen by? + * @default 20 + * + * @param Reposition + * @text Reposition For Help + * + * @param RepositionTopHelpX:num + * @text Repostion X By + * @parent Reposition + * @desc Reposition the display's X coordinates by this much when + * the Help Window is visible. + * @default 0 + * + * @param RepositionTopHelpY:num + * @text Repostion Y By + * @parent Reposition + * @desc Reposition the display's Y coordinates by this much when + * the Help Window is visible. + * @default 96 + * + * @param Slots + * + * @param MaxHorzSprites:num + * @text Max Horizontal + * @parent Slots + * @type number + * @min 1 + * @desc Maximum slots you want to display for top and + * bottom Turn Order Display positions? + * @default 16 + * + * @param MaxVertSprites:num + * @text Max Vertical + * @parent Slots + * @type number + * @min 1 + * @desc Maximum slots you want to display for left and + * right Turn Order Display positions? + * @default 10 + * + * @param SpriteLength:num + * @text Length + * @parent Slots + * @type number + * @min 1 + * @desc How many pixels long should the slots be on the + * Turn Order display? + * @default 72 + * + * @param SpriteThin:num + * @text Thin + * @parent Slots + * @type number + * @min 1 + * @desc How many pixels thin should the slots be on the + * Turn Order display? + * @default 36 + * + * @param UpdateFrames:num + * @text Update Frames + * @parent Slots + * @type number + * @min 1 + * @desc How many frames should it take for the slots to + * update their positions by? + * @default 24 + * + * @param Border + * @text Slot Border + * + * @param ShowMarkerBorder:eval + * @text Show Border? + * @parent Border + * @type boolean + * @on Show + * @off Hide + * @desc Show borders for the slot sprites? + * @default true + * + * @param BorderThickness:num + * @text Border Thickness + * @parent Markers + * @type number + * @min 1 + * @desc How many pixels thick should the colored portion of the border be? + * @default 2 + * + * @param BorderActor + * @text Actors + * @parent Border + * + * @param ActorBorderColor:str + * @text Border Color + * @parent BorderActor + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 4 + * + * @param ActorSystemBorder:str + * @text Border Skin + * @parent BorderActor + * @type file + * @dir img/system/ + * @desc Optional. Place a skin on the actor borders instead of rendering them? + * @default + * + * @param BorderEnemy + * @text Enemies + * @parent Border + * + * @param EnemyBorderColor:str + * @text Border Color + * @parent BorderEnemy + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 2 + * + * @param EnemySystemBorder:str + * @text Border Skin + * @parent BorderEnemy + * @type file + * @dir img/system/ + * @desc Optional. Place a skin on the enemy borders instead of rendering them? + * @default + * + * @param Sprite + * @text Slot Sprites + * + * @param ActorSprite + * @text Actors + * @parent Sprite + * + * @param ActorBattlerType:str + * @text Sprite Type + * @parent ActorSprite + * @type select + * @option Face Graphic - Show the actor's face. + * @value face + * @option Icon - Show a specified icon. + * @value icon + * @option Sideview Actor - Show the actor's sideview battler. + * @value svactor + * @desc Select the type of sprite used for the actor graphic. + * @default face + * + * @param ActorBattlerIcon:num + * @text Default Icon + * @parent ActorSprite + * @desc Which icon do you want to use for actors by default? + * @default 84 + * + * @param EnemySprite + * @text Enemies + * @parent Sprite + * + * @param EnemyBattlerType:str + * @text Sprite Type + * @parent EnemySprite + * @type select + * @option Face Graphic - Show a specified face graphic. + * @value face + * @option Icon - Show a specified icon. + * @value icon + * @option Enemy - Show the enemy's graphic or sideview battler. + * @value enemy + * @desc Select the type of sprite used for the enemy graphic. + * @default enemy + * + * @param EnemyBattlerFaceName:str + * @text Default Face Name + * @parent EnemySprite + * @type file + * @dir img/faces/ + * @desc Use this default face graphic if there is no specified face. + * @default Monster + * + * @param EnemyBattlerFaceIndex:num + * @text Default Face Index + * @parent EnemySprite + * @type number + * @desc Use this default face index if there is no specified index. + * @default 1 + * + * @param EnemyBattlerIcon:num + * @text Default Icon + * @parent EnemySprite + * @desc Which icon do you want to use for enemies by default? + * @default 298 + * + * @param EnemyBattlerMatchHue:eval + * @text Match Hue? + * @parent EnemySprite + * @type boolean + * @on Match + * @off Don't Match + * @desc Match the hue for enemy battlers? + * Does not apply if there's a sideview battler. + * @default true + * + * @param Letter + * @text Slot Letter + * + * @param EnemyBattlerDrawLetter:eval + * @text Show Enemy Letter? + * @parent Letter + * @type boolean + * @on Show + * @off Hide + * @desc Show the enemy's letter on the slot sprite? + * @default true + * + * @param EnemyBattlerFontFace:str + * @text Font Name + * @parent Letter + * @desc The font name used for the text of the Letter. + * Leave empty to use the default game's font. + * @default + * + * @param EnemyBattlerFontSize:num + * @text Font Size + * @parent Letter + * @min 1 + * @desc The font size used for the text of the Letter. + * @default 16 + * + * @param Background + * @text Slot Background + * + * @param ShowMarkerBg:eval + * @text Show Background? + * @parent Background + * @type boolean + * @on Show + * @off Hide + * @desc Show the background on the slot sprite? + * @default true + * + * @param BackgroundActor + * @text Actors + * @parent Background + * + * @param ActorBgColor1:str + * @text Background Color 1 + * @parent BackgroundActor + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 19 + * + * @param ActorBgColor2:str + * @text Background Color 2 + * @parent BackgroundActor + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 9 + * + * @param ActorSystemBg:str + * @text Background Skin + * @parent BackgroundActor + * @type file + * @dir img/system/ + * @desc Optional. Use a skin for the actor background instead of rendering them? + * @default + * + * @param BackgroundEnemy + * @text Enemies + * @parent Background + * + * @param EnemyBgColor1:str + * @text Background Color 1 + * @parent BackgroundEnemy + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 19 + * + * @param EnemyBgColor2:str + * @text Background Color 2 + * @parent BackgroundEnemy + * @desc Use #rrggbb for custom colors or regular numbers + * for text colors from the Window Skin. + * @default 18 + * + * @param EnemySystemBg:str + * @text Background Skin + * @parent BackgroundEnemy + * @type file + * @dir img/system/ + * @desc Optional. Use a skin for the enemy background instead of rendering them? + * @default + * + */ +//============================================================================= + +const _0xefec4f=_0x8f9b;function _0x8f9b(_0x458aff,_0xa09450){const _0x584f9a=_0x584f();return _0x8f9b=function(_0x8f9b84,_0x5497dc){_0x8f9b84=_0x8f9b84-0x197;let _0x354e6e=_0x584f9a[_0x8f9b84];return _0x354e6e;},_0x8f9b(_0x458aff,_0xa09450);}function _0x584f(){const _0x3d26bf=['battlerName','changeIconGraphicBitmap','_containerHeight','%1BgColor1','SystemTurnOrderVisibility','spEbt','clearNextTurnSpeedSTB','xwOpX','_handlers','isSceneBattle','updateOpacity','FaceName','_stbExploited','match','_homeY','1508814SVxKRa','fillRect','_fadeTarget','performCollapse','Mute','clearSTBExploit','EnemyBattlerIcon','defaultPosition','_stbTurnOrderGraphicType','onTurnEnd','actor','faceIndex','27AeDWbD','25013329ORDWmU','battlerHue','ARRAYSTRUCT','filter','StbTurnOrderEnemyIcon','_plural','21FUKOWQ','%1SystemBg','name','setupTextPopup','cancel','padding','isEnemy','processTurn','%1\x27s\x20version\x20does\x20not\x20match\x20plugin\x27s.\x20Please\x20update\x20it\x20in\x20the\x20Plugin\x20Manager.','_surprise','AiVvQ','constructor','createBattlerRect','iconHeight','_partyCommandWindow','updateGraphicHue','makeSpeed','ShowMarkerBg','setText','AllowRandomSpeed','loadSystem','BattleManager_selectNextActor','SubjectDistance','stepForward','occvs','createInitialPositions','hide','createBattlerSprites','Game_Action_applyGlobal','BattleManager_finishActorInput','repositionLogWindowSTB','Enemies','update','addInnerChild','isActor','ARRAYSTR','MnIPB','_letterSprite','becomeSTBExploited','TurnOrderSTBGraphicFaceName','aliveMembers','FaceIndex','EnemyBattlerDrawLetter','HKfLk','gradientFillRect','Game_Action_clear','lvNsY','BorderThickness','_stbTurnOrderVisible','some','members','addLoadListener','selectNextActor','TurnOrderSTBGraphicIconIndex','updateSelectionEffect','nciDj','HGibf','createTurnOrderSTBGraphicIconIndex','WCnMd','UGrUN','commandCancelSTB','Exploit','TurnOrderSTBGraphicType','EnemyBattlerType','mHpcX','initMembersBattleSystemSTB','TPayE','RepositionTopForHelp','face','%1\x20is\x20incorrectly\x20placed\x20on\x20the\x20plugin\x20list.\x0aIt\x20is\x20a\x20Tier\x20%2\x20plugin\x20placed\x20over\x20other\x20Tier\x20%3\x20plugins.\x0aPlease\x20reorder\x20the\x20plugin\x20list\x20from\x20smallest\x20to\x20largest\x20tier\x20numbers.','isHorz','Game_Battler_performCollapse','faceWidth','_positionDuration','Game_BattlerBase_hide','_actorCommandWindow','isAlive','endActionSTB','sduEQ','updateGraphic','BattleManager_endAction','WqojY','performActionEnd','allowRandomSpeed','executeDamageSTB','sort','getBattleSystem','exit','critical','UnlimitedExploits','_stbTurnOrderIconIndex','Scene_Battle_createAllWindows','checkTargetPositions','hasSvBattler','clearRect','isSTB','startFade','round','traitObjects','%1SystemBorder','_targetHomeX','_graphicHue','startActorInput','_forcedBattlers','setup','LlpBr','speed','6304552qStNHi','map','top','displayExploitedEffects','fIYPs','isSTBExploited','FlashDuration','changeFaceGraphicBitmap','createBorderSprite','%1BgColor2','getColor','OOxzj','NUM','getStateTooltipBattler','isImmortal','createSTBTurnOrderWindow','StbTurnOrderEnemyFace','iXmXJ','cZeWH','MultipleExploits','%1\x20%2\x20%3','faceName','selectNextActorSTB','initMembers','close','canInput','endAction','trim','clearSTBNextTurnSpeed','_stbTurnOrderFaceIndex','ARRAYFUNC','changeSvActorGraphicBitmap','svActorVertCells','IconSet','LYjAY','Exploited','NextTurnSavedSpeedJS','updateSidePosition','_turnOrderContainer','createChildren','UrExd','UYnqe','updatePadding','startInputSTB','Settings','Scene_Battle_commandCancel','finishActorInput','updateHomePosition','Exploiter','coyhe','vQsbl','containerPosition','rFgvD','faceHeight','startActorCommandSelection','prototype','utRBY','windowRect','makeActionOrders','kdWHj','battler','getSTBNextTurnSpeed','updatePosition','isActiveTpb','_isBattleOver','ExploitEleWeakness','tgdCm','_actionBattlers','getNextSubject','createActorCommandWindow','Instant','addSTBNextTurnSpeed','Speed','stbCannotBeExploiter','_fullHeight','dfruN','DisplayPosition','_helpWindow','SqBUV','nVlgg','_phase','center','commandFight','Game_Battler_onBattleStart','_ogWindowLayerX','stbExploitedStates','isTurnBased','recalculateHome','applyGlobalBattleSystemSTB','return\x200','indexOf','length','checkOpacity','boxHeight','children','UpdateFrames','loadEnemy','Mirror','_stbTurnOrderFaceName','RegExp','_index','EnemyBattlerFaceName','CustomJS','updateLetter','TurnOrder','uPWAQ','VbWSo','GTvSE','battleSys','TurnResetExploits','isSideView','ExploitedStates','blt','processUpdateGraphic','createTurnOrderSTBGraphicFaceIndex','OrderDirection','ParseStateData','BattleManager_isActiveTpb','maxBattleMembers','format','visible','_stbTurnOrderWindow','fontSize','getStateIdWithName','Game_Actor_selectNextCommand','tnwjL','_targetHomeY','498aaMxSz','left','PopupText','lQPEg','bitmap','call','description','VsoEt','UDejG','push','commandCancel','anchor','_turnOrderInnerSprite','_isAppeared','Window_Help_setItem','bind','clearSTB','isAppeared','parameters','OhuWd','_homeX','Enemy','TcCXf','_subject','%1BorderColor','MaxVertSprites','subject','svactor','FlashColor','enemy','battleEnd','stbExploiterStates','_stateIDs','icon','Game_Action_executeDamage','_currentActor','stbCannotBeExploited','makeSTBSpeed','myQyO','createLetterSprite','_containerWidth','RepositionTopHelpY','suBVA','EnableExploit','FEqCy','floor','xjdty','4jnnnBr','_graphicEnemy','_scene','onBattleStart','jflLj','min','zjnfZ','valxj','initialize','right','calculateTargetPositions','BattleCore','note','containerWindow','initBattleSystemSTB','MKtfp','SpriteLength','svBattlerName','test','BattleManager_battleSys','MiIpX','_graphicSprite','ceil','remove','ScreenBuffer','_positionTargetY','_homeDuration','ShowMarkerBorder','_graphicFaceIndex','createTurnOrderSTBGraphicFaceName','requestFauxAnimation','compareBattlerSprites','ClXUp','RepositionTopHelpX','_isAlive','version','CenterHorz','updateBattleContainerOrder','eLTWj','setBattleSystemSTBTurnOrderVisible','_backgroundSprite','Scene_Battle_createActorCommandWindow','allBattleMembers','width','updateVisibility','bottom','JZbKl','isSTBExploitSystemEnabled','_inputting','clear','appear','2444WPIMsW','_windowLayer','WQZOZ','Game_System_initialize','_ogWindowLayerY','max','_fadeDuration','loadSvActor','TextColor','iconWidth','yeZcb','isTpb','loadSvEnemy','setSTBExploited','_statusWindow','_stbNextTurnSpeed','removeActor','_graphicIconIndex','pNVMS','_unit','ExtraActions','1184655IoVNBN','ExploitEleRate','Actor','status','selectNextCommand','performActionEndSTB','setSTBExploitedFlag','_positionTargetX','ARRAYNUM','EnemyBattlerFontFace','createTestBitmap','initHomePositions','XKQHU','areAllActorsExploited','_actions','parse','create','BattleManager_isTpb','Game_BattlerBase_initMembers','Game_Action_speed','BattleManager_makeActionOrders','performSTBExploiter','BattleSystemSTB','svActorHorzCells','setItem','HOuyc','updateTurnOrder','ActorBattlerIcon','canMove','height','_graphicSv','friendsUnit','drawText','removeActionBattlersSTB','EnemyBattlerFontSize','CannotBeExploiter','reserveCommonEvent','loadFace','split','addState','#000000','_logWindow','onBattleStartSTB','setHue','hasSTBExploited','BattleManager_processTurn','BtZlk','toUpperCase','yBKbH','_letter','_graphicFaceName','BattleManager_startInput','_fullWidth','setSTBNextTurnSpeed','Game_Battler_performActionEnd','checkPosition','createGraphicSprite','4012085HLJlIH','EVAL','StbTurnOrderClearActorGraphic','Game_Battler_onTurnEnd','AVkAN','changeEnemyGraphicBitmap','ldNRz','currentClass','StbTurnOrderActorIcon','updateTurnOrderSTB','opacity','bitmapWidth','createActorCommandWindowSTB','STB','createAllWindows','ZKYWZ','EnemyBattlerFaceIndex','bitmapHeight','VWMCW','StbTurnOrderClearEnemyGraphic','DisplayOffsetX','getChildIndex','RepositionLogWindow','_graphicType','Game_BattlerBase_appear','includes','aqVBW','BattleManager_isTurnBased','lqhsj','stbGainInstant','Visible','fontFace','vMwBR','_stbExploitAdvantageFlag','AddedStates','addChild','createTurnOrderSTBGraphicType','registerCommand','areAllEnemiesExploited','createBackgroundSprite','executeDamage','unshift','TurnOrderSTBGraphicFaceIndex','fWlEq','AnimationID','ConvertParams','Actors','mainFontFace','ActorBattlerType','HAdoi','qBSRI','FUNC','JSON','IconIndex','MaxHorzSprites','item','SpriteThin','kdHct','clearTurnOrderSTBGraphics','1577260bjkMdC','ExploiterStates'];_0x584f=function(){return _0x3d26bf;};return _0x584f();}(function(_0x3b7637,_0x1c11cd){const _0x2d2634=_0x8f9b,_0x14badd=_0x3b7637();while(!![]){try{const _0x5c9630=parseInt(_0x2d2634(0x2dc))/0x1*(parseInt(_0x2d2634(0x33e))/0x2)+parseInt(_0x2d2634(0x353))/0x3+parseInt(_0x2d2634(0x30b))/0x4*(-parseInt(_0x2d2634(0x38c))/0x5)+parseInt(_0x2d2634(0x1df))/0x6*(-parseInt(_0x2d2634(0x1f2))/0x7)+-parseInt(_0x2d2634(0x25d))/0x8+-parseInt(_0x2d2634(0x1eb))/0x9*(parseInt(_0x2d2634(0x1ce))/0xa)+parseInt(_0x2d2634(0x1ec))/0xb;if(_0x5c9630===_0x1c11cd)break;else _0x14badd['push'](_0x14badd['shift']());}catch(_0x24ed05){_0x14badd['push'](_0x14badd['shift']());}}}(_0x584f,0x7022d));var label='BattleSystemSTB',tier=tier||0x0,dependencies=[],pluginData=$plugins[_0xefec4f(0x1ef)](function(_0x4e59db){const _0x226bfc=_0xefec4f;return _0x4e59db[_0x226bfc(0x356)]&&_0x4e59db[_0x226bfc(0x2e2)][_0x226bfc(0x1ac)]('['+label+']');})[0x0];VisuMZ[label]['Settings']=VisuMZ[label]['Settings']||{},VisuMZ[_0xefec4f(0x1c0)]=function(_0x3b736c,_0x116a9a){const _0x1bd05e=_0xefec4f;for(const _0x40e9ea in _0x116a9a){if('rqSWT'!==_0x1bd05e(0x2c6)){if(_0x40e9ea[_0x1bd05e(0x1dd)](/(.*):(.*)/i)){if('JZbKl'===_0x1bd05e(0x339)){const _0x544e0b=String(RegExp['$1']),_0xa76fa2=String(RegExp['$2'])[_0x1bd05e(0x382)]()[_0x1bd05e(0x278)]();let _0x331856,_0x35c78d,_0x17d97d;switch(_0xa76fa2){case _0x1bd05e(0x269):_0x331856=_0x116a9a[_0x40e9ea]!==''?Number(_0x116a9a[_0x40e9ea]):0x0;break;case _0x1bd05e(0x35b):_0x35c78d=_0x116a9a[_0x40e9ea]!==''?JSON['parse'](_0x116a9a[_0x40e9ea]):[],_0x331856=_0x35c78d[_0x1bd05e(0x25e)](_0x3605be=>Number(_0x3605be));break;case _0x1bd05e(0x38d):_0x331856=_0x116a9a[_0x40e9ea]!==''?eval(_0x116a9a[_0x40e9ea]):null;break;case'ARRAYEVAL':_0x35c78d=_0x116a9a[_0x40e9ea]!==''?JSON[_0x1bd05e(0x362)](_0x116a9a[_0x40e9ea]):[],_0x331856=_0x35c78d['map'](_0x2d01fa=>eval(_0x2d01fa));break;case _0x1bd05e(0x1c7):_0x331856=_0x116a9a[_0x40e9ea]!==''?JSON['parse'](_0x116a9a[_0x40e9ea]):'';break;case'ARRAYJSON':_0x35c78d=_0x116a9a[_0x40e9ea]!==''?JSON['parse'](_0x116a9a[_0x40e9ea]):[],_0x331856=_0x35c78d[_0x1bd05e(0x25e)](_0xe88d23=>JSON['parse'](_0xe88d23));break;case _0x1bd05e(0x1c6):_0x331856=_0x116a9a[_0x40e9ea]!==''?new Function(JSON[_0x1bd05e(0x362)](_0x116a9a[_0x40e9ea])):new Function(_0x1bd05e(0x2b6));break;case _0x1bd05e(0x27b):_0x35c78d=_0x116a9a[_0x40e9ea]!==''?JSON[_0x1bd05e(0x362)](_0x116a9a[_0x40e9ea]):[],_0x331856=_0x35c78d['map'](_0x2ceb17=>new Function(JSON['parse'](_0x2ceb17)));break;case'STR':_0x331856=_0x116a9a[_0x40e9ea]!==''?String(_0x116a9a[_0x40e9ea]):'';break;case _0x1bd05e(0x215):_0x35c78d=_0x116a9a[_0x40e9ea]!==''?JSON[_0x1bd05e(0x362)](_0x116a9a[_0x40e9ea]):[],_0x331856=_0x35c78d['map'](_0x356d9a=>String(_0x356d9a));break;case'STRUCT':_0x17d97d=_0x116a9a[_0x40e9ea]!==''?JSON[_0x1bd05e(0x362)](_0x116a9a[_0x40e9ea]):{},_0x331856=VisuMZ[_0x1bd05e(0x1c0)]({},_0x17d97d);break;case _0x1bd05e(0x1ee):_0x35c78d=_0x116a9a[_0x40e9ea]!==''?JSON[_0x1bd05e(0x362)](_0x116a9a[_0x40e9ea]):[],_0x331856=_0x35c78d['map'](_0x51e565=>VisuMZ[_0x1bd05e(0x1c0)]({},JSON[_0x1bd05e(0x362)](_0x51e565)));break;default:continue;}_0x3b736c[_0x544e0b]=_0x331856;}else{this[_0x1bd05e(0x2e0)]=new _0x355a09(0x48,0x24);const _0x5c40a3=this[_0x1bd05e(0x299)]()?this[_0x1bd05e(0x299)]()[_0x1bd05e(0x1f4)]():_0x1bd05e(0x271)[_0x1bd05e(0x2d4)](this[_0x1bd05e(0x351)],this[_0x1bd05e(0x2c1)]);this[_0x1bd05e(0x2e0)][_0x1bd05e(0x373)](_0x5c40a3,0x0,0x0,0x48,0x24,_0x1bd05e(0x2ae));}}}else{const _0x208a3e=_0x1cb2c6[_0x1bd05e(0x289)],_0x223952=[_0x1bd05e(0x25f),_0x1bd05e(0x338)][_0x1bd05e(0x1ac)](_0x208a3e[_0x1bd05e(0x2a9)]);return _0x223952;}}return _0x3b736c;},(_0x290285=>{const _0x542828=_0xefec4f,_0x43acc4=_0x290285[_0x542828(0x1f4)];for(const _0x551649 of dependencies){if(_0x542828(0x298)===_0x542828(0x298)){if(!Imported[_0x551649]){alert('%1\x20is\x20missing\x20a\x20required\x20plugin.\x0aPlease\x20install\x20%2\x20into\x20the\x20Plugin\x20Manager.'[_0x542828(0x2d4)](_0x43acc4,_0x551649)),SceneManager[_0x542828(0x249)]();break;}}else this[_0x542828(0x1e7)]=this[_0x542828(0x1b7)]();}const _0x3ffaa4=_0x290285[_0x542828(0x2e2)];if(_0x3ffaa4[_0x542828(0x1dd)](/\[Version[ ](.*?)\]/i)){const _0x3079d3=Number(RegExp['$1']);_0x3079d3!==VisuMZ[label][_0x542828(0x32e)]&&(alert(_0x542828(0x1fa)[_0x542828(0x2d4)](_0x43acc4,_0x3079d3)),SceneManager[_0x542828(0x249)]());}if(_0x3ffaa4[_0x542828(0x1dd)](/\[Tier[ ](\d+)\]/i)){const _0x3a85f8=Number(RegExp['$1']);_0x3a85f8<tier?(alert(_0x542828(0x237)[_0x542828(0x2d4)](_0x43acc4,_0x3a85f8,tier)),SceneManager[_0x542828(0x249)]()):tier=Math['max'](_0x3a85f8,tier);}VisuMZ[_0x542828(0x1c0)](VisuMZ[label][_0x542828(0x289)],_0x290285[_0x542828(0x2ee)]);})(pluginData),PluginManager['registerCommand'](pluginData[_0xefec4f(0x1f4)],_0xefec4f(0x19b),_0x4e4e4b=>{const _0x2140b7=_0xefec4f;VisuMZ[_0x2140b7(0x1c0)](_0x4e4e4b,_0x4e4e4b);const _0x46f2ce=_0x4e4e4b[_0x2140b7(0x1c1)],_0x558f27=_0x4e4e4b[_0x2140b7(0x1c8)];for(const _0x106560 of _0x46f2ce){if(_0x2140b7(0x2f2)===_0x2140b7(0x234))this[_0x2140b7(0x1aa)]=_0x2140b7(0x236);else{const _0x28f4ab=$gameActors['actor'](_0x106560);if(!_0x28f4ab)continue;_0x28f4ab['_stbTurnOrderGraphicType']='icon',_0x28f4ab[_0x2140b7(0x24c)]=_0x558f27;}}}),PluginManager[_0xefec4f(0x1b8)](pluginData[_0xefec4f(0x1f4)],'StbTurnOrderActorFace',_0x2e8577=>{const _0x4e9710=_0xefec4f;VisuMZ['ConvertParams'](_0x2e8577,_0x2e8577);const _0x39c907=_0x2e8577[_0x4e9710(0x1c1)],_0x1cff02=_0x2e8577[_0x4e9710(0x1db)],_0x4c3f6f=_0x2e8577['FaceIndex'];for(const _0x140bd0 of _0x39c907){if('KeizH'===_0x4e9710(0x350)){const _0x163b48=_0x441441['Settings'],_0x99f9c2=this[_0x4e9710(0x238)](),_0x493425=_0x163b48[_0x4e9710(0x2d0)],_0x41e887=_0x163b48[_0x4e9710(0x208)],_0x1eeedc=_0x3ddeae[_0x4e9710(0x30d)]['_stbTurnOrderWindow'];if(!_0x1eeedc)return;const _0x1f588d=this[_0x4e9710(0x290)]();this[_0x4e9710(0x23b)]=_0x163b48[_0x4e9710(0x2bc)],this[_0x4e9710(0x35a)]=_0x99f9c2?_0x163b48[_0x4e9710(0x1cb)]*_0x1f588d:0x0,this[_0x4e9710(0x324)]=_0x99f9c2?0x0:_0x163b48[_0x4e9710(0x1cb)]*_0x1f588d,_0x1f588d>0x0&&(this[_0x4e9710(0x35a)]+=_0x99f9c2?_0x41e887:0x0,this[_0x4e9710(0x324)]+=_0x99f9c2?0x0:_0x41e887),_0x493425?this['_positionTargetX']=_0x99f9c2?_0x1eeedc['width']-this[_0x4e9710(0x35a)]-_0x163b48[_0x4e9710(0x1cb)]:0x0:this[_0x4e9710(0x324)]=_0x99f9c2?0x0:_0x1eeedc[_0x4e9710(0x370)]-this[_0x4e9710(0x324)]-_0x163b48[_0x4e9710(0x1cb)];}else{const _0x7c67c6=$gameActors['actor'](_0x140bd0);if(!_0x7c67c6)continue;_0x7c67c6[_0x4e9710(0x1e7)]='face',_0x7c67c6[_0x4e9710(0x2bf)]=_0x1cff02,_0x7c67c6[_0x4e9710(0x27a)]=_0x4c3f6f;}}}),PluginManager[_0xefec4f(0x1b8)](pluginData[_0xefec4f(0x1f4)],_0xefec4f(0x38e),_0x532d6e=>{const _0x268c79=_0xefec4f;VisuMZ[_0x268c79(0x1c0)](_0x532d6e,_0x532d6e);const _0x474bd6=_0x532d6e[_0x268c79(0x1c1)];for(const _0x3f966a of _0x474bd6){const _0x50f2da=$gameActors[_0x268c79(0x1e9)](_0x3f966a);if(!_0x50f2da)continue;_0x50f2da['clearTurnOrderSTBGraphics']();}}),PluginManager[_0xefec4f(0x1b8)](pluginData[_0xefec4f(0x1f4)],_0xefec4f(0x1f0),_0x419b72=>{const _0xfad8fb=_0xefec4f;VisuMZ[_0xfad8fb(0x1c0)](_0x419b72,_0x419b72);const _0x53e48e=_0x419b72[_0xfad8fb(0x211)],_0x4cbbc2=_0x419b72[_0xfad8fb(0x1c8)];for(const _0x19bedc of _0x53e48e){if('UYnqe'!==_0xfad8fb(0x286))_0x2ccdfe[_0xfad8fb(0x369)]['Game_Battler_makeSpeed']['call'](this);else{const _0x131686=$gameTroop[_0xfad8fb(0x224)]()[_0x19bedc];if(!_0x131686)continue;_0x131686['_stbTurnOrderGraphicType']=_0xfad8fb(0x2fd),_0x131686[_0xfad8fb(0x24c)]=_0x4cbbc2;}}}),PluginManager[_0xefec4f(0x1b8)](pluginData['name'],_0xefec4f(0x26d),_0x47b53c=>{const _0x1cd308=_0xefec4f;VisuMZ[_0x1cd308(0x1c0)](_0x47b53c,_0x47b53c);const _0x257e74=_0x47b53c[_0x1cd308(0x211)],_0x1464ce=_0x47b53c[_0x1cd308(0x1db)],_0x85fba5=_0x47b53c[_0x1cd308(0x21b)];for(const _0x33ab13 of _0x257e74){if(_0x1cd308(0x36c)!==_0x1cd308(0x36c))this['initialize'](...arguments);else{const _0x5c7107=$gameTroop[_0x1cd308(0x224)]()[_0x33ab13];if(!_0x5c7107)continue;_0x5c7107[_0x1cd308(0x1e7)]=_0x1cd308(0x236),_0x5c7107['_stbTurnOrderFaceName']=_0x1464ce,_0x5c7107[_0x1cd308(0x27a)]=_0x85fba5;}}}),PluginManager[_0xefec4f(0x1b8)](pluginData['name'],_0xefec4f(0x1a6),_0xe00b44=>{const _0x4121f6=_0xefec4f;VisuMZ['ConvertParams'](_0xe00b44,_0xe00b44);const _0x1967a8=_0xe00b44['Enemies'];for(const _0x5c7ec1 of _0x1967a8){const _0x272537=$gameTroop[_0x4121f6(0x224)]()[_0x5c7ec1];if(!_0x272537)continue;_0x272537['clearTurnOrderSTBGraphics']();}}),PluginManager[_0xefec4f(0x1b8)](pluginData[_0xefec4f(0x1f4)],_0xefec4f(0x1d4),_0x162b2c=>{const _0x53b9f9=_0xefec4f;VisuMZ[_0x53b9f9(0x1c0)](_0x162b2c,_0x162b2c);const _0xe0ec86=_0x162b2c[_0x53b9f9(0x1b1)];$gameSystem[_0x53b9f9(0x332)](_0xe0ec86);}),VisuMZ[_0xefec4f(0x369)]['RegExp']={'Instant':/<STB (?:INSTANT|INSTANT CAST|Instant Use)>/i,'CannotBeExploited':/<STB CANNOT BE EXPLOITED>/i,'CannotBeExploiter':/<STB CANNOT BE EXPLOITER>/i,'ExploitedStates':/<STB EXPLOITED GAIN (?:STATE|STATES):[ ](.*)>/i,'ExploiterStates':/<STB EXPLOITER GAIN (?:STATE|STATES):[ ](.*)>/i},DataManager['getStateIdWithName']=function(_0x12f8c6){const _0x18d9c0=_0xefec4f;_0x12f8c6=_0x12f8c6[_0x18d9c0(0x382)]()[_0x18d9c0(0x278)](),this[_0x18d9c0(0x2fc)]=this[_0x18d9c0(0x2fc)]||{};if(this['_stateIDs'][_0x12f8c6])return this['_stateIDs'][_0x12f8c6];for(const _0x65ec32 of $dataStates){if(_0x18d9c0(0x308)===_0x18d9c0(0x1ad))_0x50ce6b['BattleSystemSTB'][_0x18d9c0(0x389)][_0x18d9c0(0x2e1)](this),_0x4a8bb1[_0x18d9c0(0x251)]()&&this[_0x18d9c0(0x358)]();else{if(!_0x65ec32)continue;this[_0x18d9c0(0x2fc)][_0x65ec32[_0x18d9c0(0x1f4)][_0x18d9c0(0x382)]()[_0x18d9c0(0x278)]()]=_0x65ec32['id'];}}return this[_0x18d9c0(0x2fc)][_0x12f8c6]||0x0;},ImageManager['svActorHorzCells']=ImageManager[_0xefec4f(0x36a)]||0x9,ImageManager[_0xefec4f(0x27d)]=ImageManager[_0xefec4f(0x27d)]||0x6,SceneManager[_0xefec4f(0x1d9)]=function(){const _0x187486=_0xefec4f;return this[_0x187486(0x30d)]&&this[_0x187486(0x30d)][_0x187486(0x1fd)]===Scene_Battle;},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x31e)]=BattleManager[_0xefec4f(0x2c9)],BattleManager['battleSys']=function(){const _0xf923c2=_0xefec4f;if(this['isSTB']())return'STB';return VisuMZ[_0xf923c2(0x369)][_0xf923c2(0x31e)][_0xf923c2(0x2e1)](this);},BattleManager['isSTB']=function(){const _0x11671a=_0xefec4f;return $gameSystem[_0x11671a(0x248)]()===_0x11671a(0x1a0);},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x364)]=BattleManager['isTpb'],BattleManager[_0xefec4f(0x349)]=function(){const _0x41583b=_0xefec4f;if(this['isSTB']())return![];return VisuMZ[_0x41583b(0x369)]['BattleManager_isTpb'][_0x41583b(0x2e1)](this);},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x2d2)]=BattleManager[_0xefec4f(0x29c)],BattleManager['isActiveTpb']=function(){const _0x4e6c3d=_0xefec4f;if(this['isSTB']())return![];return VisuMZ['BattleSystemSTB'][_0x4e6c3d(0x2d2)][_0x4e6c3d(0x2e1)](this);},VisuMZ['BattleSystemSTB'][_0xefec4f(0x1ae)]=BattleManager['isTurnBased'],BattleManager[_0xefec4f(0x2b3)]=function(){const _0x252ed2=_0xefec4f;if(this[_0x252ed2(0x251)]())return!![];return VisuMZ['BattleSystemSTB']['BattleManager_isTurnBased']['call'](this);},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x386)]=BattleManager['startInput'],BattleManager['startInput']=function(){const _0xcb3440=_0xefec4f;VisuMZ['BattleSystemSTB'][_0xcb3440(0x386)][_0xcb3440(0x2e1)](this);if(this[_0xcb3440(0x251)]()&&$gameParty[_0xcb3440(0x276)]()&&!this[_0xcb3440(0x1fb)])this[_0xcb3440(0x288)]();},BattleManager[_0xefec4f(0x288)]=function(){this['startTurn']();},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x380)]=BattleManager[_0xefec4f(0x1f9)],BattleManager[_0xefec4f(0x1f9)]=function(){const _0x4dd4c0=_0xefec4f;this[_0x4dd4c0(0x251)]()?'coyhe'!==_0x4dd4c0(0x28e)?(this[_0x4dd4c0(0x1dc)]===_0x23de41&&this[_0x4dd4c0(0x233)](),this[_0x4dd4c0(0x1dc)]=_0x5913d6):this['processTurnSTB']():VisuMZ[_0x4dd4c0(0x369)][_0x4dd4c0(0x380)]['call'](this);},BattleManager['processTurnSTB']=function(){const _0x1ad526=_0xefec4f,_0x35a0f7=this[_0x1ad526(0x2f3)];if(_0x35a0f7[_0x1ad526(0x214)]()&&_0x35a0f7[_0x1ad526(0x276)]()){const _0x2e5970=_0x35a0f7['currentAction']();if(!_0x2e5970)VisuMZ[_0x1ad526(0x369)][_0x1ad526(0x380)][_0x1ad526(0x2e1)](this);else _0x2e5970['_forceAction']?VisuMZ[_0x1ad526(0x369)][_0x1ad526(0x380)]['call'](this):_0x1ad526(0x383)!==_0x1ad526(0x383)?this[_0x1ad526(0x2a0)][_0x1ad526(0x1bc)](this[_0x1ad526(0x2f3)]):(this[_0x1ad526(0x2ff)]=_0x35a0f7,this[_0x1ad526(0x258)]());}else VisuMZ[_0x1ad526(0x369)]['BattleManager_processTurn'][_0x1ad526(0x2e1)](this);},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x20f)]=BattleManager[_0xefec4f(0x28b)],BattleManager[_0xefec4f(0x28b)]=function(){const _0x304748=_0xefec4f;if(this['isSTB']()){if(_0x304748(0x2ab)!=='syMFL')VisuMZ['BattleSystemSTB'][_0x304748(0x380)]['call'](this);else{const _0x228ea5=_0x54a4d8['AnimationID'],_0x5efb40=_0x4114fe[_0x304748(0x2be)],_0x2beb49=_0x28c24e[_0x304748(0x1e3)];_0x391a09[_0x304748(0x329)]([this],_0x228ea5,_0x5efb40,_0x2beb49);}}else VisuMZ[_0x304748(0x369)][_0x304748(0x20f)][_0x304748(0x2e1)](this);},VisuMZ[_0xefec4f(0x369)]['BattleManager_selectNextActor']=BattleManager[_0xefec4f(0x226)],BattleManager[_0xefec4f(0x226)]=function(){const _0x1858af=_0xefec4f;this['isSTB']()?this['selectNextActorSTB']():VisuMZ[_0x1858af(0x369)][_0x1858af(0x207)]['call'](this);},BattleManager[_0xefec4f(0x273)]=function(){const _0x1265c4=_0xefec4f;this[_0x1265c4(0x2ff)]=null,this[_0x1265c4(0x33b)]=![];},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x242)]=BattleManager[_0xefec4f(0x277)],BattleManager[_0xefec4f(0x277)]=function(){const _0x40d91b=_0xefec4f;VisuMZ[_0x40d91b(0x369)][_0x40d91b(0x242)]['call'](this),this[_0x40d91b(0x23f)]();},BattleManager[_0xefec4f(0x23f)]=function(){const _0x132b0a=_0xefec4f;if(!this[_0x132b0a(0x251)]())return;this[_0x132b0a(0x374)]();this[_0x132b0a(0x259)][_0x132b0a(0x2b8)]>0x0&&(this[_0x132b0a(0x2f3)]&&(!this[_0x132b0a(0x2a0)][_0x132b0a(0x1ac)](this[_0x132b0a(0x2f3)])&&this[_0x132b0a(0x2a0)]['unshift'](this[_0x132b0a(0x2f3)])),this[_0x132b0a(0x2f3)]=this[_0x132b0a(0x2a1)]());;},BattleManager[_0xefec4f(0x33a)]=function(){const _0x2204a3=_0xefec4f;return VisuMZ[_0x2204a3(0x369)][_0x2204a3(0x289)][_0x2204a3(0x22f)][_0x2204a3(0x307)];},BattleManager[_0xefec4f(0x360)]=function(){const _0x2fc48f=_0xefec4f,_0x4bce3a=$gameParty['aliveMembers']()['filter'](_0x2ecf6f=>_0x2ecf6f[_0x2fc48f(0x2ed)]()),_0x4785f9=_0x4bce3a[_0x2fc48f(0x1ef)](_0x14ee15=>_0x14ee15[_0x2fc48f(0x262)]());return _0x4bce3a[_0x2fc48f(0x2b8)]===_0x4785f9['length'];},BattleManager['areAllEnemiesExploited']=function(){const _0x3605ca=_0xefec4f,_0x4bbfa3=$gameTroop[_0x3605ca(0x21a)]()[_0x3605ca(0x1ef)](_0x208364=>_0x208364[_0x3605ca(0x2ed)]()),_0x541dd4=_0x4bbfa3['filter'](_0x274c8c=>_0x274c8c[_0x3605ca(0x262)]());return _0x4bbfa3[_0x3605ca(0x2b8)]===_0x541dd4['length'];},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x367)]=BattleManager['makeActionOrders'],BattleManager[_0xefec4f(0x297)]=function(){const _0x58320c=_0xefec4f;VisuMZ[_0x58320c(0x369)][_0x58320c(0x367)][_0x58320c(0x2e1)](this),this[_0x58320c(0x251)]()&&(this[_0x58320c(0x374)](),this[_0x58320c(0x19c)](),this[_0x58320c(0x1d6)]());},BattleManager['removeActionBattlersSTB']=function(){const _0x38bc59=_0xefec4f;if(!this[_0x38bc59(0x251)]())return;this['_actionBattlers']=this[_0x38bc59(0x2a0)]||[],this[_0x38bc59(0x2a0)]=this[_0x38bc59(0x2a0)]['filter'](_0x4cd346=>_0x4cd346&&_0x4cd346[_0x38bc59(0x2ed)]()&&_0x4cd346[_0x38bc59(0x23e)]()),this[_0x38bc59(0x19c)]();},BattleManager['updateTurnOrderSTB']=function(_0x3e02be){const _0x5175e1=_0xefec4f;if(!this[_0x5175e1(0x251)]())return;const _0x2e2050=SceneManager[_0x5175e1(0x30d)][_0x5175e1(0x2d6)];if(!_0x2e2050)return;_0x2e2050[_0x5175e1(0x36d)](_0x3e02be);},BattleManager[_0xefec4f(0x1d6)]=function(){const _0x5671b8=_0xefec4f;for(const _0x46851d of this[_0x5671b8(0x335)]()){if(!_0x46851d)continue;_0x46851d[_0x5671b8(0x388)](0x0);}},VisuMZ['BattleSystemSTB'][_0xefec4f(0x341)]=Game_System['prototype'][_0xefec4f(0x313)],Game_System[_0xefec4f(0x294)][_0xefec4f(0x313)]=function(){const _0x59fb00=_0xefec4f;VisuMZ[_0x59fb00(0x369)][_0x59fb00(0x341)]['call'](this),this['initBattleSystemSTB']();},Game_System[_0xefec4f(0x294)][_0xefec4f(0x319)]=function(){this['_stbTurnOrderVisible']=!![];},Game_System[_0xefec4f(0x294)]['isBattleSystemSTBTurnOrderVisible']=function(){const _0x2da307=_0xefec4f;if(this[_0x2da307(0x222)]===undefined){if(_0x2da307(0x2ef)===_0x2da307(0x2ef))this['initBattleSystemSTB']();else return this[_0x2da307(0x351)]?this[_0x2da307(0x351)][_0x2da307(0x224)]()[this[_0x2da307(0x2c1)]]:null;}return this[_0x2da307(0x222)];},Game_System[_0xefec4f(0x294)]['setBattleSystemSTBTurnOrderVisible']=function(_0x17f0a8){const _0x1fd22c=_0xefec4f;this['_stbTurnOrderVisible']===undefined&&this[_0x1fd22c(0x319)](),this[_0x1fd22c(0x222)]=_0x17f0a8;},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x366)]=Game_Action[_0xefec4f(0x294)][_0xefec4f(0x25c)],Game_Action[_0xefec4f(0x294)][_0xefec4f(0x25c)]=function(){const _0x145d2e=_0xefec4f;if(BattleManager[_0x145d2e(0x251)]()){if(_0x145d2e(0x31f)!==_0x145d2e(0x1a5))return 0x0;else this[_0x145d2e(0x22e)]();}else return VisuMZ[_0x145d2e(0x369)][_0x145d2e(0x366)][_0x145d2e(0x2e1)](this);},VisuMZ[_0xefec4f(0x369)]['Game_Action_applyGlobal']=Game_Action[_0xefec4f(0x294)]['applyGlobal'],Game_Action[_0xefec4f(0x294)]['applyGlobal']=function(){const _0x16176b=_0xefec4f;VisuMZ['BattleSystemSTB'][_0x16176b(0x20e)][_0x16176b(0x2e1)](this),this[_0x16176b(0x2b5)]();},Game_Action['prototype']['applyGlobalBattleSystemSTB']=function(){const _0x16c3f9=_0xefec4f;if(!SceneManager[_0x16c3f9(0x1d9)]())return;if(!BattleManager[_0x16c3f9(0x251)]())return;const _0x5132cb=this[_0x16c3f9(0x1ca)](),_0x5a6e60=VisuMZ['BattleSystemSTB'][_0x16c3f9(0x2c0)],_0x157efc=VisuMZ['BattleSystemSTB'][_0x16c3f9(0x289)][_0x16c3f9(0x2a5)];_0x5132cb&&_0x5132cb[_0x16c3f9(0x317)][_0x16c3f9(0x1dd)](_0x5a6e60[_0x16c3f9(0x2a3)])&&(_0x16c3f9(0x27f)!==_0x16c3f9(0x27f)?this['startFade'](0xff):this[_0x16c3f9(0x2f6)]()[_0x16c3f9(0x1b0)](0x1));const _0x45c64b=_0x157efc[_0x16c3f9(0x281)][_0x16c3f9(0x2e1)](this);this[_0x16c3f9(0x2f6)]()[_0x16c3f9(0x2a4)](_0x45c64b);},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x21f)]=Game_Action[_0xefec4f(0x294)][_0xefec4f(0x33c)],Game_Action[_0xefec4f(0x294)][_0xefec4f(0x33c)]=function(){const _0x2439bf=_0xefec4f;VisuMZ['BattleSystemSTB']['Game_Action_clear'][_0x2439bf(0x2e1)](this),this[_0x2439bf(0x2ec)]();},Game_Action[_0xefec4f(0x294)][_0xefec4f(0x2ec)]=function(){const _0xfd8e05=_0xefec4f;this[_0xfd8e05(0x1b4)]=![];},Game_Action[_0xefec4f(0x294)][_0xefec4f(0x37f)]=function(){const _0x308a3a=_0xefec4f;return this['_stbExploitAdvantageFlag']===undefined&&this[_0x308a3a(0x2ec)](),this['_stbExploitAdvantageFlag'];},Game_Action[_0xefec4f(0x294)][_0xefec4f(0x359)]=function(_0x372b72){const _0x309832=_0xefec4f;this[_0x309832(0x1b4)]===undefined&&this[_0x309832(0x2ec)](),this[_0x309832(0x1b4)]=_0x372b72;},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x2fe)]=Game_Action[_0xefec4f(0x294)][_0xefec4f(0x1bb)],Game_Action[_0xefec4f(0x294)]['executeDamage']=function(_0x8b6a76,_0x4bba86){const _0xbda742=_0xefec4f;VisuMZ[_0xbda742(0x369)]['Game_Action_executeDamage'][_0xbda742(0x2e1)](this,_0x8b6a76,_0x4bba86),this[_0xbda742(0x246)](_0x8b6a76);},Game_Action[_0xefec4f(0x294)]['executeDamageSTB']=function(_0x5c7cb1){const _0x77631=_0xefec4f;if(!SceneManager[_0x77631(0x1d9)]())return;if(!BattleManager[_0x77631(0x251)]())return;if(!BattleManager[_0x77631(0x33a)]())return;if(_0x5c7cb1[_0x77631(0x372)]()===this[_0x77631(0x2f6)]()[_0x77631(0x372)]())return;const _0x2b413c=VisuMZ[_0x77631(0x369)][_0x77631(0x289)][_0x77631(0x22f)],_0x5bbb68=_0x5c7cb1['result']();_0x2b413c['ExploitCritical']&&_0x5bbb68[_0x77631(0x24a)]&&(this[_0x77631(0x2f6)]()['performSTBExploiter'](_0x5c7cb1,this),_0x5c7cb1['becomeSTBExploited'](this[_0x77631(0x2f6)](),this));if(_0x2b413c[_0x77631(0x29e)]){if(_0x77631(0x22a)!==_0x77631(0x1c4)){const _0x48dabf=this['calcElementRate'](_0x5c7cb1);_0x48dabf>=_0x2b413c[_0x77631(0x354)]&&(this[_0x77631(0x2f6)]()[_0x77631(0x368)](_0x5c7cb1,this),_0x5c7cb1[_0x77631(0x218)](this['subject'](),this));}else this[_0x77631(0x256)]=this['_homeX']=_0x4f4b53['x'],this[_0x77631(0x2db)]=this[_0x77631(0x1de)]=_0x2dbbfd['y'],this[_0x77631(0x387)]=_0x1c706f[_0x77631(0x336)],this[_0x77631(0x2a7)]=_0x4f5879['height'],this[_0x77631(0x325)]=0x0;}},VisuMZ['BattleSystemSTB'][_0xefec4f(0x365)]=Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x274)],Game_BattlerBase[_0xefec4f(0x294)]['initMembers']=function(){const _0x301f38=_0xefec4f;VisuMZ[_0x301f38(0x369)][_0x301f38(0x365)][_0x301f38(0x2e1)](this),this['initMembersBattleSystemSTB']();},Game_BattlerBase[_0xefec4f(0x294)]['initMembersBattleSystemSTB']=function(){const _0x2df13b=_0xefec4f;this[_0x2df13b(0x279)](),this[_0x2df13b(0x1e4)]();},Game_BattlerBase[_0xefec4f(0x294)]['clearSTBNextTurnSpeed']=function(){const _0x24a47e=_0xefec4f;this[_0x24a47e(0x34d)]=0x0;},Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x29a)]=function(){const _0x14efea=_0xefec4f;if(this['_stbNextTurnSpeed']===undefined){if(_0x14efea(0x26e)!==_0x14efea(0x26e)){const _0x596b0d=_0x21bd8c[_0x14efea(0x259)];if(_0x596b0d['length']>0x0&&_0x596b0d[0x0]!==this)return;const _0x19cee7=this[_0x14efea(0x299)]();if(_0x19cee7)_0x19cee7[_0x14efea(0x209)]();}else this[_0x14efea(0x233)]();}return this[_0x14efea(0x34d)];},Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x388)]=function(_0x47d0fc){const _0x819e09=_0xefec4f;this['_stbNextTurnSpeed']===undefined&&this[_0x819e09(0x233)](),this[_0x819e09(0x34d)]=_0x47d0fc;},Game_BattlerBase['prototype']['addSTBNextTurnSpeed']=function(_0x24fd1b){const _0x2d88c2=_0xefec4f;this['_stbNextTurnSpeed']===undefined&&this[_0x2d88c2(0x233)](),_0x24fd1b+=this['getSTBNextTurnSpeed'](),this['setSTBNextTurnSpeed'](_0x24fd1b);},Game_BattlerBase[_0xefec4f(0x294)]['clearSTBExploit']=function(){const _0x4bffef=_0xefec4f;this[_0x4bffef(0x1dc)]=![];},Game_BattlerBase[_0xefec4f(0x294)]['isSTBExploited']=function(){const _0x45b132=_0xefec4f;return this[_0x45b132(0x1dc)]===undefined&&this['initMembersBattleSystemSTB'](),this[_0x45b132(0x1dc)];},Game_BattlerBase['prototype'][_0xefec4f(0x34b)]=function(_0x56ab97){const _0x5375ce=_0xefec4f;this[_0x5375ce(0x1dc)]===undefined&&this[_0x5375ce(0x233)](),this[_0x5375ce(0x1dc)]=_0x56ab97;},Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x300)]=function(){const _0x449075=_0xefec4f,_0x1ed19f=VisuMZ[_0x449075(0x369)][_0x449075(0x2c0)]['CannotBeExploited'];return this[_0x449075(0x254)]()[_0x449075(0x223)](_0x1a9ac2=>_0x1a9ac2[_0x449075(0x317)][_0x449075(0x1dd)](_0x1ed19f));},Game_BattlerBase['prototype'][_0xefec4f(0x2a6)]=function(){const _0x5def24=_0xefec4f,_0x1fdee1=VisuMZ[_0x5def24(0x369)]['RegExp'][_0x5def24(0x376)];return this['traitObjects']()[_0x5def24(0x223)](_0x28db83=>_0x28db83[_0x5def24(0x317)][_0x5def24(0x1dd)](_0x1fdee1));},Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x1cd)]=function(){const _0xff31fe=_0xefec4f;delete this[_0xff31fe(0x1e7)],delete this[_0xff31fe(0x2bf)],delete this[_0xff31fe(0x27a)],delete this[_0xff31fe(0x24c)];},Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x230)]=function(){const _0x5bafc1=_0xefec4f;if(this[_0x5bafc1(0x1e7)]===undefined){if('ZHZSc'==='fpzXR'){if(!this[_0x5bafc1(0x217)])return;const _0x132a6d=this[_0x5bafc1(0x299)]();if(!_0x132a6d)return;if(this[_0x5bafc1(0x384)]===_0x132a6d[_0x5bafc1(0x384)]&&this[_0x5bafc1(0x1f1)]===_0x132a6d[_0x5bafc1(0x1f1)])return;this[_0x5bafc1(0x384)]=_0x132a6d[_0x5bafc1(0x384)],this[_0x5bafc1(0x1f1)]=_0x132a6d['_plural'];const _0xa4e948=_0x1edbfb['Settings'],_0x1c2495=this['isHorz'](),_0x53defa=this[_0x5bafc1(0x19e)](),_0x543977=this[_0x5bafc1(0x1a4)](),_0x2b8d16=this[_0x5bafc1(0x217)][_0x5bafc1(0x2e0)];_0x2b8d16[_0x5bafc1(0x33c)]();if(!this[_0x5bafc1(0x1f1)])return;_0x2b8d16['fontFace']=_0xa4e948['EnemyBattlerFontFace']||_0x573186[_0x5bafc1(0x1c2)](),_0x2b8d16[_0x5bafc1(0x2d7)]=_0xa4e948[_0x5bafc1(0x375)]||0x10,_0x1c2495?_0x2b8d16[_0x5bafc1(0x373)](this['_letter'][_0x5bafc1(0x278)](),0x0,_0x543977/0x2,_0x53defa,_0x543977/0x2,_0x5bafc1(0x2ae)):_0x2b8d16[_0x5bafc1(0x373)](this[_0x5bafc1(0x384)]['trim'](),0x0,0x2,_0x53defa-0x8,_0x543977-0x4,'right');}else this[_0x5bafc1(0x1e7)]=this['createTurnOrderSTBGraphicType']();}return this[_0x5bafc1(0x1e7)];},Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x1b7)]=function(){const _0x4073b2=_0xefec4f;return Window_STB_TurnOrder[_0x4073b2(0x289)][_0x4073b2(0x231)];},Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x219)]=function(){const _0x2aaf23=_0xefec4f;return this[_0x2aaf23(0x2bf)]===undefined&&(this[_0x2aaf23(0x2bf)]=this[_0x2aaf23(0x328)]()),this[_0x2aaf23(0x2bf)];},Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x328)]=function(){const _0x4f37cd=_0xefec4f;return Window_STB_TurnOrder[_0x4f37cd(0x289)][_0x4f37cd(0x2c2)];},Game_BattlerBase['prototype']['TurnOrderSTBGraphicFaceIndex']=function(){const _0x3cdfd2=_0xefec4f;return this[_0x3cdfd2(0x27a)]===undefined&&(_0x3cdfd2(0x21d)!==_0x3cdfd2(0x35f)?this[_0x3cdfd2(0x27a)]=this[_0x3cdfd2(0x2cf)]():this['isSTB']()?this[_0x3cdfd2(0x273)]():_0x1af1cd[_0x3cdfd2(0x369)]['BattleManager_selectNextActor'][_0x3cdfd2(0x2e1)](this)),this[_0x3cdfd2(0x27a)];},Game_BattlerBase[_0xefec4f(0x294)]['createTurnOrderSTBGraphicFaceIndex']=function(){const _0x28ca87=_0xefec4f;return Window_STB_TurnOrder[_0x28ca87(0x289)][_0x28ca87(0x1a3)];},Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x227)]=function(){const _0x2eee6f=_0xefec4f;if(this[_0x2eee6f(0x24c)]===undefined){if(_0x2eee6f(0x25b)==='LlpBr')this[_0x2eee6f(0x24c)]=this[_0x2eee6f(0x22b)]();else return this[_0x2eee6f(0x299)]();}return this['_stbTurnOrderIconIndex'];},Game_BattlerBase[_0xefec4f(0x294)][_0xefec4f(0x22b)]=function(){const _0x3c4c42=_0xefec4f;return Window_STB_TurnOrder[_0x3c4c42(0x289)][_0x3c4c42(0x1e5)];},Game_BattlerBase[_0xefec4f(0x294)]['setSTBGraphicIconIndex']=function(_0x22eec6){this['_stbTurnOrderIconIndex']=_0x22eec6;},VisuMZ['BattleSystemSTB'][_0xefec4f(0x23c)]=Game_BattlerBase['prototype'][_0xefec4f(0x20c)],Game_BattlerBase['prototype']['hide']=function(){const _0x5bf58c=_0xefec4f;VisuMZ[_0x5bf58c(0x369)][_0x5bf58c(0x23c)][_0x5bf58c(0x2e1)](this),BattleManager[_0x5bf58c(0x374)]();},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x1ab)]=Game_BattlerBase['prototype']['appear'],Game_BattlerBase['prototype'][_0xefec4f(0x33d)]=function(){const _0x17d3d8=_0xefec4f;VisuMZ[_0x17d3d8(0x369)][_0x17d3d8(0x1ab)][_0x17d3d8(0x2e1)](this),BattleManager['removeActionBattlersSTB']();},VisuMZ['BattleSystemSTB']['Game_Battler_performCollapse']=Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x1e2)],Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x1e2)]=function(){const _0x29f54a=_0xefec4f;VisuMZ[_0x29f54a(0x369)][_0x29f54a(0x239)][_0x29f54a(0x2e1)](this),BattleManager[_0x29f54a(0x374)]();},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x2b0)]=Game_Battler['prototype'][_0xefec4f(0x30e)],Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x30e)]=function(_0x9b9e5){const _0x5760c7=_0xefec4f;VisuMZ[_0x5760c7(0x369)]['Game_Battler_onBattleStart'][_0x5760c7(0x2e1)](this,_0x9b9e5),this[_0x5760c7(0x37d)](_0x9b9e5);},Game_Battler[_0xefec4f(0x294)]['onBattleStartSTB']=function(_0x3e16dc){const _0x51b1b4=_0xefec4f;if(!BattleManager[_0x51b1b4(0x251)]())return;this['clearSTBExploit']();const _0x43aafd=new Game_Action(this);this['setSTBNextTurnSpeed'](0x0);},VisuMZ[_0xefec4f(0x369)]['Game_Battler_onTurnEnd']=Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x1e8)],Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x1e8)]=function(){const _0x5acd94=_0xefec4f;VisuMZ[_0x5acd94(0x369)][_0x5acd94(0x38f)][_0x5acd94(0x2e1)](this),BattleManager[_0x5acd94(0x251)]()&&VisuMZ[_0x5acd94(0x369)][_0x5acd94(0x289)][_0x5acd94(0x22f)][_0x5acd94(0x2ca)]&&('uaKbK'==='MFnfe'?(_0x178adf[_0x5acd94(0x369)][_0x5acd94(0x1ab)][_0x5acd94(0x2e1)](this),_0x2b9af7[_0x5acd94(0x374)]()):this[_0x5acd94(0x1e4)]());},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x389)]=Game_Battler[_0xefec4f(0x294)]['performActionEnd'],Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x244)]=function(){const _0x177439=_0xefec4f;VisuMZ[_0x177439(0x369)][_0x177439(0x389)][_0x177439(0x2e1)](this),BattleManager[_0x177439(0x251)]()&&this[_0x177439(0x358)]();},Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x358)]=function(){const _0x430f97=_0xefec4f;if(this['numActions']()>0x0&&this===BattleManager[_0x430f97(0x2f3)]){const _0x4505da=BattleManager[_0x430f97(0x259)];if(_0x4505da[_0x430f97(0x2b8)]>0x0&&_0x4505da[0x0]!==this)return;const _0x39e282=this['battler']();if(_0x39e282)_0x39e282[_0x430f97(0x209)]();}},Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x245)]=function(){const _0xec9ef2=_0xefec4f;return VisuMZ[_0xec9ef2(0x316)]['Settings']['Mechanics'][_0xec9ef2(0x205)];},VisuMZ['BattleSystemSTB']['Game_Battler_makeSpeed']=Game_Battler['prototype'][_0xefec4f(0x202)],Game_Battler[_0xefec4f(0x294)]['makeSpeed']=function(){const _0x4e1313=_0xefec4f;BattleManager[_0x4e1313(0x251)]()?this[_0x4e1313(0x301)]():VisuMZ[_0x4e1313(0x369)]['Game_Battler_makeSpeed'][_0x4e1313(0x2e1)](this);},Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x301)]=function(){const _0xa6d1dc=_0xefec4f;this['_speed']=VisuMZ['BattleSystemSTB'][_0xa6d1dc(0x289)][_0xa6d1dc(0x2a5)]['InitialSpeedJS']['call'](this);},Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x2b2)]=function(){const _0x57cae1=_0xefec4f,_0x4ed54f=this[_0x57cae1(0x214)]()?this['currentClass']()[_0x57cae1(0x317)]:this[_0x57cae1(0x2f9)]()[_0x57cae1(0x317)];if(_0x4ed54f[_0x57cae1(0x1dd)](VisuMZ[_0x57cae1(0x369)][_0x57cae1(0x2c0)][_0x57cae1(0x2cc)]))return VisuMZ[_0x57cae1(0x369)][_0x57cae1(0x2d1)](RegExp['$1']);return VisuMZ['BattleSystemSTB'][_0x57cae1(0x289)][_0x57cae1(0x280)][_0x57cae1(0x1b5)]||[];},Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x2fb)]=function(){const _0x3249eb=_0xefec4f,_0x39e6f2=this[_0x3249eb(0x214)]()?this[_0x3249eb(0x19a)]()[_0x3249eb(0x317)]:this['enemy']()[_0x3249eb(0x317)];if(_0x39e6f2[_0x3249eb(0x1dd)](VisuMZ['BattleSystemSTB'][_0x3249eb(0x2c0)][_0x3249eb(0x1cf)]))return _0x3249eb(0x2df)!==_0x3249eb(0x2df)?_0x2ff482['Settings'][_0x3249eb(0x2c2)]:VisuMZ[_0x3249eb(0x369)][_0x3249eb(0x2d1)](RegExp['$1']);return VisuMZ['BattleSystemSTB'][_0x3249eb(0x289)][_0x3249eb(0x28d)][_0x3249eb(0x1b5)]||[];},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x2d1)]=function(_0x448c5c){const _0x563712=_0xefec4f,_0x40e4d9=_0x448c5c[_0x563712(0x379)](','),_0xbe27a5=[];for(let _0x7bfd65 of _0x40e4d9){_0x7bfd65=(String(_0x7bfd65)||'')[_0x563712(0x278)]();const _0x5b55ff=/^\d+$/[_0x563712(0x31d)](_0x7bfd65);_0x5b55ff?_0x563712(0x302)===_0x563712(0x240)?(_0x447c59[_0x563712(0x369)][_0x563712(0x23c)]['call'](this),_0x1b9080['removeActionBattlersSTB']()):_0xbe27a5[_0x563712(0x2e5)](Number(_0x7bfd65)):_0xbe27a5['push'](DataManager[_0x563712(0x2d8)](_0x7bfd65));}return _0xbe27a5;},Game_Battler[_0xefec4f(0x294)]['becomeSTBExploited']=function(_0x418fad,_0x43cd34){const _0x125ff1=_0xefec4f;if(!BattleManager[_0x125ff1(0x251)]())return;if(!BattleManager[_0x125ff1(0x33a)]())return;if(this[_0x125ff1(0x262)]())return;const _0x4acbb8=VisuMZ[_0x125ff1(0x369)]['Settings']['Exploited'];!_0x4acbb8[_0x125ff1(0x24b)]&&(_0x125ff1(0x2ac)!==_0x125ff1(0x2a8)?this['setSTBExploited'](!![]):this[_0x125ff1(0x293)]());if(this[_0x125ff1(0x300)]())return;if(this['hp']<=0x0)return;this[_0x125ff1(0x260)](_0x4acbb8);if(this['hp']>0x0||!this[_0x125ff1(0x26b)]())for(const _0x171565 of this[_0x125ff1(0x2b2)]()){if(!$dataStates[_0x171565])continue;this['addState'](_0x171565);}_0x4acbb8[_0x125ff1(0x2c3)]&&_0x4acbb8['CustomJS'][_0x125ff1(0x2e1)](this,_0x418fad,_0x43cd34);if(this[_0x125ff1(0x214)]()&&BattleManager['areAllActorsExploited']()){const _0x45f23d=_0x4acbb8['vsActorsFullExploit'];_0x45f23d>0x0&&$dataCommonEvents[_0x45f23d]&&$gameTemp['reserveCommonEvent'](_0x45f23d);}else{if(this['isEnemy']()&&BattleManager[_0x125ff1(0x1b9)]()){if('YjKvK'==='YjKvK'){const _0x57975a=_0x4acbb8['vsEnemiesFullExploit'];_0x57975a>0x0&&$dataCommonEvents[_0x57975a]&&$gameTemp[_0x125ff1(0x377)](_0x57975a);}else return _0x13e4f4[_0x125ff1(0x316)]['Settings']['Mechanics']['AllowRandomSpeed'];}}},Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x368)]=function(_0x15cf09,_0x7590b9){const _0x5ed52f=_0xefec4f;if(!BattleManager[_0x5ed52f(0x251)]())return;if(!BattleManager['isSTBExploitSystemEnabled']())return;if(_0x7590b9[_0x5ed52f(0x37f)]())return;if(_0x15cf09[_0x5ed52f(0x262)]())return;const _0x43a2ee=VisuMZ[_0x5ed52f(0x369)][_0x5ed52f(0x289)][_0x5ed52f(0x28d)];!_0x43a2ee[_0x5ed52f(0x270)]&&_0x7590b9['setSTBExploitedFlag'](!![]);if(this[_0x5ed52f(0x2a6)]())return;this[_0x5ed52f(0x260)](_0x43a2ee);_0x43a2ee['ExtraActions']>0x0&&(_0x5ed52f(0x2c8)===_0x5ed52f(0x2c8)?this[_0x5ed52f(0x1b0)](_0x43a2ee[_0x5ed52f(0x352)]):this[_0x5ed52f(0x2ec)]());for(const _0x48d1aa of this[_0x5ed52f(0x2fb)]()){if(!$dataStates[_0x48d1aa])continue;this[_0x5ed52f(0x37a)](_0x48d1aa);}_0x43a2ee['CustomJS']&&_0x43a2ee[_0x5ed52f(0x2c3)][_0x5ed52f(0x2e1)](this,_0x15cf09,_0x7590b9);},Game_Battler[_0xefec4f(0x294)][_0xefec4f(0x260)]=function(_0x43e8d4){const _0x1e77cf=_0xefec4f;if(!_0x43e8d4)return;if(_0x43e8d4[_0x1e77cf(0x1bf)]){const _0x4c40b0=_0x43e8d4[_0x1e77cf(0x1bf)],_0x2b85a6=_0x43e8d4[_0x1e77cf(0x2be)],_0x21343b=_0x43e8d4['Mute'];$gameTemp[_0x1e77cf(0x329)]([this],_0x4c40b0,_0x2b85a6,_0x21343b);}if(this[_0x1e77cf(0x299)]()&&_0x43e8d4['PopupText'][_0x1e77cf(0x2b8)]>0x0){if(_0x1e77cf(0x22c)!==_0x1e77cf(0x22c)){if(!this[_0x1e77cf(0x238)]())return;const _0x5044f7=_0x36414b[_0x1e77cf(0x369)][_0x1e77cf(0x289)][_0x1e77cf(0x2c5)];if(!_0x5044f7[_0x1e77cf(0x32f)])return;const _0x49acf6=_0x3e78a3[_0x1e77cf(0x224)]()[_0x1e77cf(0x1ef)](_0x354e11=>_0x354e11&&_0x354e11[_0x1e77cf(0x23e)]()&&_0x354e11[_0x1e77cf(0x2ed)]())[_0x1e77cf(0x2b8)],_0x2c8a30=_0x12ccc8[_0x1e77cf(0x224)]()[_0x1e77cf(0x1ef)](_0x5e77cd=>_0x5e77cd&&_0x5e77cd[_0x1e77cf(0x23e)]()&&_0x5e77cd['isAppeared']())[_0x1e77cf(0x2b8)],_0x14cced=this[_0x1e77cf(0x1fe)](_0x49acf6,_0x2c8a30);this[_0x1e77cf(0x256)]=_0x14cced['x'],this[_0x1e77cf(0x2db)]=_0x14cced['y'],(this[_0x1e77cf(0x256)]!==this[_0x1e77cf(0x2f0)]||this['_targetHomeY']!==this[_0x1e77cf(0x1de)])&&(this['_homeDuration']=_0x5044f7[_0x1e77cf(0x2bc)]);}else{const _0x54d142=_0x43e8d4[_0x1e77cf(0x2de)],_0x432a3c={'textColor':ColorManager[_0x1e77cf(0x267)](_0x43e8d4[_0x1e77cf(0x346)]),'flashColor':_0x43e8d4[_0x1e77cf(0x2f8)],'flashDuration':_0x43e8d4[_0x1e77cf(0x263)]};this[_0x1e77cf(0x1f5)](_0x54d142,_0x432a3c);}}},Game_Battler['prototype']['stbGainInstant']=function(_0xcab4ef){const _0x47bf0=_0xefec4f;this[_0x47bf0(0x361)]=this[_0x47bf0(0x361)]||[];const _0x2e535b=this[_0x47bf0(0x361)]['length']<=0x0;if(this[_0x47bf0(0x36f)]()){if(_0x47bf0(0x1c5)===_0x47bf0(0x331))_0x1334aa(_0x47bf0(0x1fa)[_0x47bf0(0x2d4)](_0x23fc69,_0x11561f)),_0xc6cbdf[_0x47bf0(0x249)]();else{for(let _0x364da9=0x0;_0x364da9<_0xcab4ef;_0x364da9++){this['_actions']['push'](new Game_Action(this));}if(this[_0x47bf0(0x1f8)]()){const _0x1befb4=this[_0x47bf0(0x2f9)]()['actions'][_0x47bf0(0x1ef)](_0x9c60fd=>this['isActionValid'](_0x9c60fd));if(_0x1befb4[_0x47bf0(0x2b8)]>0x0){if(_0x47bf0(0x29f)==='MoVus'){const _0x1e952a=this[_0x47bf0(0x34f)],_0x45b27c=this[_0x47bf0(0x19e)](),_0x570392=this[_0x47bf0(0x1a4)]();this[_0x47bf0(0x320)]['bitmap']=new _0x2f8f15(_0x45b27c,_0x570392);const _0x4e467e=this[_0x47bf0(0x320)]['bitmap'],_0x4dd1a5=_0x3900f3[_0x47bf0(0x347)],_0x271bed=_0x48e90e[_0x47bf0(0x1ff)],_0x1f376e=_0x2f2f18[_0x47bf0(0x310)](_0x4dd1a5,_0x271bed,_0x45b27c,_0x570392),_0x22efdc=_0x1e952a%0x10*_0x4dd1a5,_0x4c6046=_0x195d9b[_0x47bf0(0x309)](_0x1e952a/0x10)*_0x271bed,_0x2db2f3=_0x2dec0c['floor'](_0x5f29e0[_0x47bf0(0x343)](_0x45b27c-_0x1f376e,0x0)/0x2),_0x1751e8=_0x196481[_0x47bf0(0x309)](_0x35cd58[_0x47bf0(0x343)](_0x570392-_0x1f376e,0x0)/0x2);_0x4e467e['blt'](_0x52f939,_0x22efdc,_0x4c6046,_0x4dd1a5,_0x271bed,_0x2db2f3,_0x1751e8,_0x1f376e,_0x1f376e);}else{let _0x22d3b1;!_0x2e535b&&('lqhsj'===_0x47bf0(0x1af)?_0x22d3b1=this[_0x47bf0(0x361)]['shift']():this[_0x47bf0(0x1b4)]=![]),this['selectAllActions'](_0x1befb4),!_0x2e535b&&(_0x47bf0(0x1fc)===_0x47bf0(0x2e4)?this[_0x47bf0(0x251)]()?_0x207386[_0x47bf0(0x369)][_0x47bf0(0x380)]['call'](this):_0x5a3a81[_0x47bf0(0x369)][_0x47bf0(0x20f)][_0x47bf0(0x2e1)](this):this[_0x47bf0(0x361)][_0x47bf0(0x1bc)](_0x22d3b1));}}}}}},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x2d9)]=Game_Actor[_0xefec4f(0x294)]['selectNextCommand'],Game_Actor[_0xefec4f(0x294)][_0xefec4f(0x357)]=function(){const _0x28cc66=_0xefec4f;if(BattleManager['isSTB']()){if(this[_0x28cc66(0x299)]())this[_0x28cc66(0x299)]()['stepForward']();return![];}return VisuMZ[_0x28cc66(0x369)]['Game_Actor_selectNextCommand'][_0x28cc66(0x2e1)](this);},Game_Actor[_0xefec4f(0x294)][_0xefec4f(0x1b7)]=function(){const _0x3b23ab=_0xefec4f,_0x54313d=this[_0x3b23ab(0x1e9)]()[_0x3b23ab(0x317)];if(_0x54313d['match'](/<STB TURN ORDER FACE:[ ](.*),[ ](\d+)>/i))return'face';else{if(_0x54313d[_0x3b23ab(0x1dd)](/<STB TURN ORDER ICON:[ ](\d+)>/i))return _0x3b23ab(0x2fd);}return Window_STB_TurnOrder[_0x3b23ab(0x289)][_0x3b23ab(0x1c3)];},Game_Actor[_0xefec4f(0x294)][_0xefec4f(0x219)]=function(){const _0x25c64a=_0xefec4f,_0x11d03b=this[_0x25c64a(0x1e9)]()[_0x25c64a(0x317)];if(_0x11d03b[_0x25c64a(0x1dd)](/<STB TURN ORDER FACE:[ ](.*),[ ](\d+)>/i)){if(_0x25c64a(0x199)===_0x25c64a(0x199))return String(RegExp['$1']);else{if(this['isSTB']())return![];return _0x28b707[_0x25c64a(0x369)][_0x25c64a(0x2d2)][_0x25c64a(0x2e1)](this);}}return this[_0x25c64a(0x272)]();},Game_Actor[_0xefec4f(0x294)][_0xefec4f(0x1bd)]=function(){const _0x27ab5f=_0xefec4f,_0x4aac0b=this[_0x27ab5f(0x1e9)]()[_0x27ab5f(0x317)];if(_0x4aac0b[_0x27ab5f(0x1dd)](/<STB TURN ORDER FACE:[ ](.*),[ ](\d+)>/i))return Number(RegExp['$2']);return this[_0x27ab5f(0x1ea)]();},Game_Actor[_0xefec4f(0x294)][_0xefec4f(0x22b)]=function(){const _0x17486b=_0xefec4f,_0x44dd32=this[_0x17486b(0x1e9)]()[_0x17486b(0x317)];if(_0x44dd32[_0x17486b(0x1dd)](/<STB TURN ORDER ICON:[ ](\d+)>/i))return Number(RegExp['$1']);return Window_STB_TurnOrder[_0x17486b(0x289)][_0x17486b(0x36e)];},Game_Enemy[_0xefec4f(0x294)]['createTurnOrderSTBGraphicType']=function(){const _0x1d8b56=_0xefec4f,_0x5b924f=this[_0x1d8b56(0x2f9)]()[_0x1d8b56(0x317)];if(_0x5b924f[_0x1d8b56(0x1dd)](/<STB TURN ORDER FACE:[ ](.*),[ ](\d+)>/i)){if(_0x1d8b56(0x1d7)!==_0x1d8b56(0x1cc))return _0x1d8b56(0x236);else _0x41145e[_0x1d8b56(0x369)][_0x1d8b56(0x2ea)]['call'](this,_0x29a8c1);}else{if(_0x5b924f[_0x1d8b56(0x1dd)](/<STB TURN ORDER ICON:[ ](\d+)>/i))return _0x1d8b56(0x2fd);}return Window_STB_TurnOrder[_0x1d8b56(0x289)][_0x1d8b56(0x231)];},Game_Enemy[_0xefec4f(0x294)]['createTurnOrderSTBGraphicFaceName']=function(){const _0x329324=_0xefec4f,_0x20f8a6=this[_0x329324(0x2f9)]()[_0x329324(0x317)];if(_0x20f8a6['match'](/<STB TURN ORDER FACE:[ ](.*),[ ](\d+)>/i)){if(_0x329324(0x197)!==_0x329324(0x229))return String(RegExp['$1']);else this[_0x329324(0x252)](0x0);}return Window_STB_TurnOrder[_0x329324(0x289)]['EnemyBattlerFaceName'];},Game_Enemy['prototype'][_0xefec4f(0x2cf)]=function(){const _0x193a81=_0xefec4f,_0x8b39a9=this[_0x193a81(0x2f9)]()['note'];if(_0x8b39a9['match'](/<STB TURN ORDER FACE:[ ](.*),[ ](\d+)>/i))return Number(RegExp['$2']);return Window_STB_TurnOrder['Settings'][_0x193a81(0x1a3)];},Game_Enemy[_0xefec4f(0x294)][_0xefec4f(0x22b)]=function(){const _0x507ad4=_0xefec4f,_0x14935c=this[_0x507ad4(0x2f9)]()[_0x507ad4(0x317)];if(_0x14935c[_0x507ad4(0x1dd)](/<STB TURN ORDER ICON:[ ](\d+)>/i))return Number(RegExp['$1']);return Window_STB_TurnOrder['Settings'][_0x507ad4(0x1e5)];},VisuMZ['BattleSystemSTB']['Game_Party_removeActor']=Game_Party['prototype'][_0xefec4f(0x34e)],Game_Party[_0xefec4f(0x294)][_0xefec4f(0x34e)]=function(_0x4b2169){const _0x38a68a=_0xefec4f;VisuMZ[_0x38a68a(0x369)]['Game_Party_removeActor'][_0x38a68a(0x2e1)](this,_0x4b2169),SceneManager[_0x38a68a(0x1d9)]()&&BattleManager[_0x38a68a(0x251)]()&&BattleManager[_0x38a68a(0x2a0)][_0x38a68a(0x322)]($gameActors[_0x38a68a(0x1e9)](_0x4b2169));},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x334)]=Scene_Battle[_0xefec4f(0x294)]['createActorCommandWindow'],Scene_Battle['prototype'][_0xefec4f(0x2a2)]=function(){const _0x34081f=_0xefec4f;VisuMZ[_0x34081f(0x369)][_0x34081f(0x334)][_0x34081f(0x2e1)](this),BattleManager[_0x34081f(0x251)]()&&this[_0x34081f(0x19f)]();},Scene_Battle[_0xefec4f(0x294)][_0xefec4f(0x19f)]=function(){const _0x3efe2a=_0xefec4f,_0x132612=this[_0x3efe2a(0x23d)];this['isPartyCommandWindowDisabled']()&&delete _0x132612[_0x3efe2a(0x1d8)]['cancel'];},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x28a)]=Scene_Battle['prototype'][_0xefec4f(0x2e6)],Scene_Battle[_0xefec4f(0x294)]['commandCancel']=function(){const _0x47a8b0=_0xefec4f;if(BattleManager[_0x47a8b0(0x251)]())this['commandCancelSTB']();else{if('VsoEt'===_0x47a8b0(0x2e3))VisuMZ[_0x47a8b0(0x369)][_0x47a8b0(0x28a)][_0x47a8b0(0x2e1)](this);else return _0x4b7bf3['BattleSystemSTB'][_0x47a8b0(0x289)][_0x47a8b0(0x22f)][_0x47a8b0(0x307)];}},Scene_Battle[_0xefec4f(0x294)]['commandCancelSTB']=function(){const _0x1a67de=_0xefec4f;this[_0x1a67de(0x200)][_0x1a67de(0x25a)](),this[_0x1a67de(0x23d)][_0x1a67de(0x275)]();},VisuMZ[_0xefec4f(0x369)]['Scene_Battle_commandFight']=Scene_Battle[_0xefec4f(0x294)][_0xefec4f(0x2af)],Scene_Battle[_0xefec4f(0x294)][_0xefec4f(0x2af)]=function(){const _0x311cc9=_0xefec4f;BattleManager[_0x311cc9(0x251)]()?this[_0x311cc9(0x293)]():VisuMZ[_0x311cc9(0x369)]['Scene_Battle_commandFight'][_0x311cc9(0x2e1)](this);},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x24d)]=Scene_Battle['prototype'][_0xefec4f(0x1a1)],Scene_Battle['prototype']['createAllWindows']=function(){const _0x4cc419=_0xefec4f;VisuMZ[_0x4cc419(0x369)]['Scene_Battle_createAllWindows']['call'](this),this[_0x4cc419(0x26c)]();},Scene_Battle[_0xefec4f(0x294)][_0xefec4f(0x26c)]=function(){const _0x2957c3=_0xefec4f;if(!BattleManager[_0x2957c3(0x251)]())return;this[_0x2957c3(0x2d6)]=new Window_STB_TurnOrder();const _0x4736c5=this[_0x2957c3(0x1a8)](this[_0x2957c3(0x33f)]);this['addChildAt'](this[_0x2957c3(0x2d6)],_0x4736c5),this[_0x2957c3(0x210)](),BattleManager[_0x2957c3(0x19c)](!![]);},Scene_Battle[_0xefec4f(0x294)][_0xefec4f(0x210)]=function(){const _0x3201fd=_0xefec4f,_0x5cc3e1=Window_STB_TurnOrder['Settings'];if(_0x5cc3e1['DisplayPosition']!==_0x3201fd(0x25f))return;if(!_0x5cc3e1[_0x3201fd(0x1a9)])return;if(!this[_0x3201fd(0x37c)])return;const _0xdd7267=this['_stbTurnOrderWindow']['y']-Math[_0x3201fd(0x253)]((Graphics[_0x3201fd(0x370)]-Graphics[_0x3201fd(0x2ba)])/0x2),_0x45a202=_0xdd7267+this[_0x3201fd(0x2d6)]['height'];this[_0x3201fd(0x37c)]['y']=_0x45a202+_0x5cc3e1['ScreenBuffer'];};function Sprite_STB_TurnOrder_Battler(){const _0x11dbe5=_0xefec4f;this[_0x11dbe5(0x313)](...arguments);}Sprite_STB_TurnOrder_Battler['prototype']=Object['create'](Sprite_Clickable[_0xefec4f(0x294)]),Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)]['constructor']=Sprite_STB_TurnOrder_Battler,Sprite_STB_TurnOrder_Battler['prototype']['initialize']=function(_0x165571,_0x1b2bd2){const _0x4889a1=_0xefec4f;this[_0x4889a1(0x274)](_0x165571,_0x1b2bd2),Sprite_Clickable['prototype'][_0x4889a1(0x313)][_0x4889a1(0x2e1)](this),this[_0x4889a1(0x19d)]=0x0,this[_0x4889a1(0x284)](),this[_0x4889a1(0x2b9)]();},Sprite_STB_TurnOrder_Battler['prototype'][_0xefec4f(0x274)]=function(_0x2afbad,_0x1d7132){const _0x19bfd9=_0xefec4f;this['_unit']=_0x2afbad,this[_0x19bfd9(0x2c1)]=_0x1d7132;const _0x408824=Window_STB_TurnOrder[_0x19bfd9(0x289)],_0x1937f1=this[_0x19bfd9(0x238)](),_0x5c7870=this[_0x19bfd9(0x1e6)]();this[_0x19bfd9(0x23b)]=0x0,this['_positionTargetX']=_0x1937f1?_0x408824[_0x19bfd9(0x1cb)]*_0x5c7870:0x0,this[_0x19bfd9(0x324)]=_0x1937f1?0x0:_0x408824[_0x19bfd9(0x1cb)]*_0x5c7870,this[_0x19bfd9(0x344)]=0x0,this[_0x19bfd9(0x1e1)]=0xff,this[_0x19bfd9(0x32d)]=![],this[_0x19bfd9(0x2e9)]=![],this[_0x19bfd9(0x304)]=0x0,this[_0x19bfd9(0x1d2)]=0x0;},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x284)]=function(){const _0x3772ee=_0xefec4f;this[_0x3772ee(0x20b)](),this[_0x3772ee(0x1ba)](),this['createGraphicSprite'](),this[_0x3772ee(0x265)](),this[_0x3772ee(0x303)]();},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)]['createInitialPositions']=function(){const _0x44213e=_0xefec4f;this['x']=this[_0x44213e(0x35a)],this['y']=this[_0x44213e(0x324)];},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x238)]=function(){const _0x48147e=_0xefec4f,_0x7bb647=Window_STB_TurnOrder[_0x48147e(0x289)],_0x1e57e9=['top',_0x48147e(0x338)][_0x48147e(0x1ac)](_0x7bb647[_0x48147e(0x2a9)]);return _0x1e57e9;},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x19e)]=function(){const _0x339abc=_0xefec4f,_0x2fc477=Window_STB_TurnOrder[_0x339abc(0x289)];return this[_0x339abc(0x238)]()?_0x2fc477[_0x339abc(0x1cb)]:_0x2fc477[_0x339abc(0x31b)];},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x1a4)]=function(){const _0x8d6d0a=_0xefec4f,_0x35f8b6=Window_STB_TurnOrder[_0x8d6d0a(0x289)];return this[_0x8d6d0a(0x238)]()?_0x35f8b6[_0x8d6d0a(0x31b)]:_0x35f8b6[_0x8d6d0a(0x1cb)];},Sprite_STB_TurnOrder_Battler['prototype'][_0xefec4f(0x35d)]=function(){const _0x29c2a4=_0xefec4f;this[_0x29c2a4(0x2e0)]=new Bitmap(0x48,0x24);const _0x5f1af3=this[_0x29c2a4(0x299)]()?this[_0x29c2a4(0x299)]()[_0x29c2a4(0x1f4)]():_0x29c2a4(0x271)['format'](this[_0x29c2a4(0x351)],this[_0x29c2a4(0x2c1)]);this['bitmap'][_0x29c2a4(0x373)](_0x5f1af3,0x0,0x0,0x48,0x24,_0x29c2a4(0x2ae));},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x1ba)]=function(){const _0x580fe5=_0xefec4f;if(!Window_STB_TurnOrder[_0x580fe5(0x289)][_0x580fe5(0x203)])return;const _0xabdb9=Window_STB_TurnOrder[_0x580fe5(0x289)],_0x3efa58=this[_0x580fe5(0x351)]===$gameParty?_0x580fe5(0x355):_0x580fe5(0x2f1),_0x1fd06d=_0x580fe5(0x1f3)[_0x580fe5(0x2d4)](_0x3efa58),_0x2f3a78=new Sprite();_0x2f3a78[_0x580fe5(0x2e7)]['x']=this[_0x580fe5(0x2e7)]['x'],_0x2f3a78[_0x580fe5(0x2e7)]['y']=this[_0x580fe5(0x2e7)]['y'];if(_0xabdb9[_0x1fd06d]){if(_0x580fe5(0x381)!==_0x580fe5(0x381))return this[_0x580fe5(0x2bf)]===_0x2fb159&&(this[_0x580fe5(0x2bf)]=this['createTurnOrderSTBGraphicFaceName']()),this[_0x580fe5(0x2bf)];else _0x2f3a78[_0x580fe5(0x2e0)]=ImageManager[_0x580fe5(0x206)](_0xabdb9[_0x1fd06d]);}else{if(_0x580fe5(0x340)===_0x580fe5(0x30a)){const _0x49563a=_0x2b1d02(_0x5cb871['$1']);_0x49563a!==_0x2bf214[_0x55cc25][_0x580fe5(0x32e)]&&(_0x57999a(_0x580fe5(0x1fa)[_0x580fe5(0x2d4)](_0x58cbca,_0x49563a)),_0x396bdd['exit']());}else{const _0x4c357f=this['bitmapWidth'](),_0x328374=this[_0x580fe5(0x1a4)]();_0x2f3a78[_0x580fe5(0x2e0)]=new Bitmap(_0x4c357f,_0x328374);const _0xc1b04c=ColorManager[_0x580fe5(0x267)](_0xabdb9['%1BgColor1'[_0x580fe5(0x2d4)](_0x3efa58)]),_0x121afb=ColorManager[_0x580fe5(0x267)](_0xabdb9['%1BgColor2'['format'](_0x3efa58)]);_0x2f3a78[_0x580fe5(0x2e0)]['gradientFillRect'](0x0,0x0,_0x4c357f,_0x328374,_0xc1b04c,_0x121afb,!![]);}}this[_0x580fe5(0x333)]=_0x2f3a78,this['addChild'](this['_backgroundSprite']),this[_0x580fe5(0x336)]=this[_0x580fe5(0x333)]['width'],this[_0x580fe5(0x370)]=this[_0x580fe5(0x333)]['height'];},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x38b)]=function(){const _0x24edde=_0xefec4f,_0x1346ae=new Sprite();_0x1346ae['anchor']['x']=this[_0x24edde(0x2e7)]['x'],_0x1346ae['anchor']['y']=this[_0x24edde(0x2e7)]['y'],this[_0x24edde(0x320)]=_0x1346ae,this[_0x24edde(0x1b6)](this['_graphicSprite']),this[_0x24edde(0x2ce)]();},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x265)]=function(){const _0x7a3b6d=_0xefec4f;if(!Window_STB_TurnOrder[_0x7a3b6d(0x289)][_0x7a3b6d(0x326)])return;const _0x534b1a=Window_STB_TurnOrder['Settings'],_0x2487c8=this[_0x7a3b6d(0x351)]===$gameParty?_0x7a3b6d(0x355):_0x7a3b6d(0x2f1),_0x21481f=_0x7a3b6d(0x255)[_0x7a3b6d(0x2d4)](_0x2487c8),_0x227154=new Sprite();_0x227154[_0x7a3b6d(0x2e7)]['x']=this[_0x7a3b6d(0x2e7)]['x'],_0x227154[_0x7a3b6d(0x2e7)]['y']=this[_0x7a3b6d(0x2e7)]['y'];if(_0x534b1a[_0x21481f])_0x227154[_0x7a3b6d(0x2e0)]=ImageManager[_0x7a3b6d(0x206)](_0x534b1a[_0x21481f]);else{let _0x1ff8f9=this[_0x7a3b6d(0x19e)](),_0x616586=this[_0x7a3b6d(0x1a4)](),_0x359c0f=_0x534b1a[_0x7a3b6d(0x221)];_0x227154[_0x7a3b6d(0x2e0)]=new Bitmap(_0x1ff8f9,_0x616586);const _0x2aef1f=_0x7a3b6d(0x37b),_0x1bac93=ColorManager['getColor'](_0x534b1a['%1BorderColor'[_0x7a3b6d(0x2d4)](_0x2487c8)]);_0x227154[_0x7a3b6d(0x2e0)][_0x7a3b6d(0x1e0)](0x0,0x0,_0x1ff8f9,_0x616586,_0x2aef1f),_0x1ff8f9-=0x2,_0x616586-=0x2,_0x227154['bitmap'][_0x7a3b6d(0x1e0)](0x1,0x1,_0x1ff8f9,_0x616586,_0x1bac93),_0x1ff8f9-=_0x359c0f*0x2,_0x616586-=_0x359c0f*0x2,_0x227154['bitmap'][_0x7a3b6d(0x1e0)](0x1+_0x359c0f,0x1+_0x359c0f,_0x1ff8f9,_0x616586,_0x2aef1f),_0x1ff8f9-=0x2,_0x616586-=0x2,_0x359c0f+=0x1,_0x227154[_0x7a3b6d(0x2e0)][_0x7a3b6d(0x250)](0x1+_0x359c0f,0x1+_0x359c0f,_0x1ff8f9,_0x616586);}this[_0x7a3b6d(0x333)]=_0x227154,this[_0x7a3b6d(0x1b6)](this['_backgroundSprite']);},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x303)]=function(){const _0x38be2b=_0xefec4f,_0x48b054=Window_STB_TurnOrder[_0x38be2b(0x289)];if(!_0x48b054[_0x38be2b(0x21c)])return;if(this[_0x38be2b(0x351)]===$gameParty)return;const _0x4e8a92=this[_0x38be2b(0x19e)](),_0x3a2ebf=this[_0x38be2b(0x1a4)](),_0x480b74=new Sprite();_0x480b74[_0x38be2b(0x2e7)]['x']=this['anchor']['x'],_0x480b74[_0x38be2b(0x2e7)]['y']=this[_0x38be2b(0x2e7)]['y'],_0x480b74[_0x38be2b(0x2e0)]=new Bitmap(_0x4e8a92,_0x3a2ebf),this[_0x38be2b(0x217)]=_0x480b74,this['addChild'](this[_0x38be2b(0x217)]);},Sprite_STB_TurnOrder_Battler['prototype'][_0xefec4f(0x299)]=function(){const _0x5409fa=_0xefec4f;return this['_unit']?this['_unit'][_0x5409fa(0x224)]()[this[_0x5409fa(0x2c1)]]:null;},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x212)]=function(){const _0xbe9923=_0xefec4f;Sprite_Clickable[_0xbe9923(0x294)]['update']['call'](this),this[_0xbe9923(0x38a)](),this[_0xbe9923(0x29b)](),this[_0xbe9923(0x2b9)](),this[_0xbe9923(0x1da)](),this[_0xbe9923(0x241)](),this[_0xbe9923(0x201)](),this['updateLetter'](),this[_0xbe9923(0x228)]();},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)]['checkPosition']=function(){const _0x1d607c=_0xefec4f,_0x5e7b66=this[_0x1d607c(0x290)]();if(this['_position']===_0x5e7b66)return;this['_position']=_0x5e7b66;this[_0x1d607c(0x19d)]<0xff&&this[_0x1d607c(0x299)]()&&_0x5e7b66!==this[_0x1d607c(0x1e6)]()&&this[_0x1d607c(0x252)](0xff);if(_0x5e7b66===this[_0x1d607c(0x1e6)]()&&this[_0x1d607c(0x344)]<=0x0&&this[_0x1d607c(0x19d)]>0x0)'IhOfd'===_0x1d607c(0x1d5)?this[_0x1d607c(0x313)](...arguments):this[_0x1d607c(0x252)](0x0);else{if(this[_0x1d607c(0x344)]<=0x0&&this[_0x1d607c(0x19d)]<0xff){if(_0x1d607c(0x1be)!==_0x1d607c(0x1be)){const _0x2806dd=_0x53b81f['Settings'];this['_fadeDuration']=_0x2806dd[_0x1d607c(0x2bc)],this['_fadeTarget']=_0x5d6eaf;}else this[_0x1d607c(0x2b9)]();}}this[_0x1d607c(0x315)]();},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x24e)]=function(){const _0x4d3073=_0xefec4f,_0x14b531=this['containerWindow']();if(!_0x14b531)return;let _0x3061eb=![];if(this['_containerWidth']!==_0x14b531[_0x4d3073(0x336)])_0x3061eb=!![];else this['_containerHeight']!==_0x14b531[_0x4d3073(0x370)]&&('QKBLa'!=='QKBLa'?(this[_0x4d3073(0x1b4)]===_0x3881dd&&this[_0x4d3073(0x2ec)](),this[_0x4d3073(0x1b4)]=_0x1bc148):_0x3061eb=!![]);_0x3061eb&&this[_0x4d3073(0x315)]();},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x315)]=function(){const _0x1dc72e=_0xefec4f,_0x4be214=Window_STB_TurnOrder[_0x1dc72e(0x289)],_0x24fc7f=this[_0x1dc72e(0x238)](),_0x3960f5=_0x4be214[_0x1dc72e(0x2d0)],_0x2badc5=_0x4be214['SubjectDistance'],_0x40645b=SceneManager[_0x1dc72e(0x30d)]['_stbTurnOrderWindow'];if(!_0x40645b)return;const _0x5b737f=this[_0x1dc72e(0x290)]();this[_0x1dc72e(0x23b)]=_0x4be214[_0x1dc72e(0x2bc)],this[_0x1dc72e(0x35a)]=_0x24fc7f?_0x4be214[_0x1dc72e(0x1cb)]*_0x5b737f:0x0,this['_positionTargetY']=_0x24fc7f?0x0:_0x4be214[_0x1dc72e(0x1cb)]*_0x5b737f;if(_0x5b737f>0x0){if('MyAPQ'!==_0x1dc72e(0x2da))this[_0x1dc72e(0x35a)]+=_0x24fc7f?_0x2badc5:0x0,this['_positionTargetY']+=_0x24fc7f?0x0:_0x2badc5;else{const _0x569950=this[_0x1dc72e(0x1e9)]()['note'];if(_0x569950[_0x1dc72e(0x1dd)](/<STB TURN ORDER FACE:[ ](.*),[ ](\d+)>/i))return _0x1dc72e(0x236);else{if(_0x569950[_0x1dc72e(0x1dd)](/<STB TURN ORDER ICON:[ ](\d+)>/i))return _0x1dc72e(0x2fd);}return _0x4a76f[_0x1dc72e(0x289)]['ActorBattlerType'];}}_0x3960f5?this[_0x1dc72e(0x35a)]=_0x24fc7f?_0x40645b[_0x1dc72e(0x336)]-this[_0x1dc72e(0x35a)]-_0x4be214['SpriteThin']:0x0:this[_0x1dc72e(0x324)]=_0x24fc7f?0x0:_0x40645b[_0x1dc72e(0x370)]-this['_positionTargetY']-_0x4be214['SpriteThin'];},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x29b)]=function(){const _0x411b53=_0xefec4f;if(this[_0x411b53(0x344)]>0x0)return;if(this[_0x411b53(0x23b)]>0x0){const _0x1ee4a0=this['_positionDuration'];this['x']=(this['x']*(_0x1ee4a0-0x1)+this[_0x411b53(0x35a)])/_0x1ee4a0,this['y']=(this['y']*(_0x1ee4a0-0x1)+this[_0x411b53(0x324)])/_0x1ee4a0,this['_positionDuration']--;}if(this[_0x411b53(0x23b)]<=0x0){if(_0x411b53(0x268)!==_0x411b53(0x268))return this[_0x411b53(0x1fe)](_0x193cf8[_0x411b53(0x2d3)](),0x9,!![]);else{this['x']=this[_0x411b53(0x35a)],this['y']=this[_0x411b53(0x324)];if(this[_0x411b53(0x19d)]<0xff&&!this[_0x411b53(0x29d)]&&this[_0x411b53(0x344)]<=0x0){const _0x28ced9=this[_0x411b53(0x299)]();_0x28ced9&&(this[_0x411b53(0x1e1)]=_0x28ced9[_0x411b53(0x23e)]()&&_0x28ced9[_0x411b53(0x2ed)]()?0xff:0x0);}}}},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x1e6)]=function(){const _0x58a734=_0xefec4f,_0x491f99=Window_STB_TurnOrder[_0x58a734(0x289)],_0xade83e=this[_0x58a734(0x238)]()?_0x491f99[_0x58a734(0x1c9)]:_0x491f99['MaxVertSprites'];return _0xade83e+0x1;},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x318)]=function(){const _0x45176a=_0xefec4f;return SceneManager[_0x45176a(0x30d)][_0x45176a(0x2d6)];},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x290)]=function(){const _0xbcc61b=_0xefec4f,_0x55c962=this[_0xbcc61b(0x299)]();if(!_0x55c962)return this[_0xbcc61b(0x1e6)]();if(_0x55c962===BattleManager['_subject']){if(_0xbcc61b(0x216)!==_0xbcc61b(0x216)){if(!this[_0xbcc61b(0x251)]())return;this[_0xbcc61b(0x374)]();this[_0xbcc61b(0x259)]['length']>0x0&&(this[_0xbcc61b(0x2f3)]&&(!this[_0xbcc61b(0x2a0)][_0xbcc61b(0x1ac)](this[_0xbcc61b(0x2f3)])&&this[_0xbcc61b(0x2a0)][_0xbcc61b(0x1bc)](this[_0xbcc61b(0x2f3)])),this[_0xbcc61b(0x2f3)]=this[_0xbcc61b(0x2a1)]());;}else return 0x0;}if(BattleManager[_0xbcc61b(0x2a0)][_0xbcc61b(0x1ac)](_0x55c962)){const _0x3143e8=BattleManager[_0xbcc61b(0x2a0)][_0xbcc61b(0x2b7)](_0x55c962)+0x1;return _0x3143e8;}return this[_0xbcc61b(0x1e6)]();},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x252)]=function(_0xba6147){const _0x82184b=_0xefec4f,_0x2983b3=Window_STB_TurnOrder[_0x82184b(0x289)];this[_0x82184b(0x344)]=_0x2983b3[_0x82184b(0x2bc)],this[_0x82184b(0x1e1)]=_0xba6147;},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)]['checkOpacity']=function(){const _0x2caa84=_0xefec4f,_0x4ff5b3=this[_0x2caa84(0x299)]();if(!_0x4ff5b3)return;if(this[_0x2caa84(0x32d)]===_0x4ff5b3[_0x2caa84(0x23e)]()&&this['_isAppeared']===_0x4ff5b3[_0x2caa84(0x2ed)]())return;this[_0x2caa84(0x32d)]=_0x4ff5b3[_0x2caa84(0x23e)](),this['_isAppeared']=_0x4ff5b3[_0x2caa84(0x2ed)]();let _0x43687b=this[_0x2caa84(0x32d)]&&this[_0x2caa84(0x2e9)]?0xff:0x0;this[_0x2caa84(0x252)](_0x43687b);},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x1da)]=function(){const _0x281a82=_0xefec4f;if(this['_fadeDuration']>0x0){const _0x574715=this[_0x281a82(0x344)];this['opacity']=(this[_0x281a82(0x19d)]*(_0x574715-0x1)+this[_0x281a82(0x1e1)])/_0x574715,this['_fadeDuration']--;if(this['_fadeDuration']<=0x0){if(_0x281a82(0x291)==='rFgvD')this[_0x281a82(0x38a)](),this[_0x281a82(0x23b)]=0x0,this['updatePosition'](),this[_0x281a82(0x19d)]=this[_0x281a82(0x1e1)];else{let _0x59ba10=this[_0x281a82(0x19e)](),_0x29b470=this[_0x281a82(0x1a4)](),_0x58741f=_0xc1037e[_0x281a82(0x221)];_0x4e51bd[_0x281a82(0x2e0)]=new _0xffac49(_0x59ba10,_0x29b470);const _0x15f7f1=_0x281a82(0x37b),_0xd686a4=_0x348e31[_0x281a82(0x267)](_0x434d8e[_0x281a82(0x2f4)[_0x281a82(0x2d4)](_0x1828d5)]);_0x4d82e0[_0x281a82(0x2e0)][_0x281a82(0x1e0)](0x0,0x0,_0x59ba10,_0x29b470,_0x15f7f1),_0x59ba10-=0x2,_0x29b470-=0x2,_0xec88f7['bitmap'][_0x281a82(0x1e0)](0x1,0x1,_0x59ba10,_0x29b470,_0xd686a4),_0x59ba10-=_0x58741f*0x2,_0x29b470-=_0x58741f*0x2,_0x1632e8[_0x281a82(0x2e0)]['fillRect'](0x1+_0x58741f,0x1+_0x58741f,_0x59ba10,_0x29b470,_0x15f7f1),_0x59ba10-=0x2,_0x29b470-=0x2,_0x58741f+=0x1,_0x381f74[_0x281a82(0x2e0)][_0x281a82(0x250)](0x1+_0x58741f,0x1+_0x58741f,_0x59ba10,_0x29b470);}}}if(this[_0x281a82(0x29d)])return;if(BattleManager['_phase']===_0x281a82(0x2fa)){if(_0x281a82(0x261)==='YHDDQ')return _0x104b5e(_0x577be9['$1']);else this[_0x281a82(0x29d)]=!![],this[_0x281a82(0x252)](0x0);}},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x241)]=function(){const _0x52673d=_0xefec4f,_0x27b3fa=this[_0x52673d(0x299)]();if(!_0x27b3fa)return;const _0x3e4467=Window_STB_TurnOrder[_0x52673d(0x289)],_0x4e15db=this[_0x52673d(0x351)]===$gameParty?_0x52673d(0x355):_0x52673d(0x2f1);let _0xa65a0f=_0x27b3fa[_0x52673d(0x230)]();if(_0x27b3fa[_0x52673d(0x214)]()&&_0xa65a0f==='enemy')_0xa65a0f=_0x52673d(0x236);else{if(_0x27b3fa[_0x52673d(0x1f8)]()&&_0xa65a0f===_0x52673d(0x2f7)){if(_0x52673d(0x1a2)!==_0x52673d(0x243))_0xa65a0f=_0x52673d(0x2f9);else return _0x2482b6[_0x52673d(0x356)]&&_0x5c00b4[_0x52673d(0x2e2)]['includes']('['+_0x57c068+']');}}if(this[_0x52673d(0x1aa)]!==_0xa65a0f)return this[_0x52673d(0x2ce)]();switch(this[_0x52673d(0x1aa)]){case _0x52673d(0x236):if(this['_graphicFaceName']!==_0x27b3fa[_0x52673d(0x219)]()){if('qaLqR'!=='qaLqR')_0x4c4512[_0x52673d(0x369)]['BattleManager_endAction'][_0x52673d(0x2e1)](this),this[_0x52673d(0x23f)]();else return this[_0x52673d(0x2ce)]();}if(this[_0x52673d(0x327)]!==_0x27b3fa[_0x52673d(0x1bd)]()){if(_0x52673d(0x30f)!==_0x52673d(0x32b))return this[_0x52673d(0x2ce)]();else this[_0x52673d(0x2f6)]()['stbGainInstant'](0x1);}break;case'icon':if(this[_0x52673d(0x34f)]!==_0x27b3fa[_0x52673d(0x227)]())return this[_0x52673d(0x2ce)]();break;case _0x52673d(0x2f9):if(_0x27b3fa[_0x52673d(0x24f)]()){if(_0x52673d(0x285)!==_0x52673d(0x1b3)){if(this['_graphicSv']!==_0x27b3fa[_0x52673d(0x31c)]())return this[_0x52673d(0x2ce)]();}else{if(!this[_0x52673d(0x251)]())return;this[_0x52673d(0x2a0)]=this[_0x52673d(0x2a0)]||[],this[_0x52673d(0x2a0)]=this[_0x52673d(0x2a0)][_0x52673d(0x1ef)](_0x46f15f=>_0x46f15f&&_0x46f15f[_0x52673d(0x2ed)]()&&_0x46f15f[_0x52673d(0x23e)]()),this[_0x52673d(0x19c)]();}}else{if(this[_0x52673d(0x30c)]!==_0x27b3fa['battlerName']())return this[_0x52673d(0x2ce)]();}break;case _0x52673d(0x2f7):if(_0x27b3fa[_0x52673d(0x214)]()){if(this[_0x52673d(0x371)]!==_0x27b3fa[_0x52673d(0x1d0)]()){if(_0x52673d(0x20a)!==_0x52673d(0x31a))return this[_0x52673d(0x2ce)]();else{this[_0x52673d(0x351)]=_0x74a635,this[_0x52673d(0x2c1)]=_0x11f495;const _0x50c4b4=_0x21f293[_0x52673d(0x289)],_0x49aea8=this[_0x52673d(0x238)](),_0x2ae068=this[_0x52673d(0x1e6)]();this[_0x52673d(0x23b)]=0x0,this['_positionTargetX']=_0x49aea8?_0x50c4b4['SpriteThin']*_0x2ae068:0x0,this['_positionTargetY']=_0x49aea8?0x0:_0x50c4b4[_0x52673d(0x1cb)]*_0x2ae068,this[_0x52673d(0x344)]=0x0,this[_0x52673d(0x1e1)]=0xff,this['_isAlive']=![],this[_0x52673d(0x2e9)]=![],this[_0x52673d(0x304)]=0x0,this[_0x52673d(0x1d2)]=0x0;}}}else{if(this[_0x52673d(0x30c)]!==_0x27b3fa[_0x52673d(0x1d0)]())return this[_0x52673d(0x2ce)]();}break;}},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)]['processUpdateGraphic']=function(){const _0x39fce2=_0xefec4f,_0xa1abf4=this[_0x39fce2(0x299)]();if(!_0xa1abf4)return;this[_0x39fce2(0x1aa)]=_0xa1abf4[_0x39fce2(0x230)]();if(_0xa1abf4[_0x39fce2(0x214)]()&&this[_0x39fce2(0x1aa)]===_0x39fce2(0x2f9))this[_0x39fce2(0x1aa)]=_0x39fce2(0x236);else _0xa1abf4['isEnemy']()&&this[_0x39fce2(0x1aa)]==='svactor'&&(this[_0x39fce2(0x1aa)]=_0x39fce2(0x2f9));let _0x341691;switch(this[_0x39fce2(0x1aa)]){case _0x39fce2(0x236):this['_graphicFaceName']=_0xa1abf4[_0x39fce2(0x219)](),this[_0x39fce2(0x327)]=_0xa1abf4[_0x39fce2(0x1bd)](),_0x341691=ImageManager[_0x39fce2(0x378)](this[_0x39fce2(0x385)]),_0x341691['addLoadListener'](this[_0x39fce2(0x264)][_0x39fce2(0x2eb)](this,_0x341691));break;case'icon':this[_0x39fce2(0x34f)]=_0xa1abf4['createTurnOrderSTBGraphicIconIndex'](),_0x341691=ImageManager[_0x39fce2(0x206)](_0x39fce2(0x27e)),_0x341691[_0x39fce2(0x225)](this[_0x39fce2(0x1d1)]['bind'](this,_0x341691));break;case _0x39fce2(0x2f9):if(_0xa1abf4[_0x39fce2(0x24f)]())this[_0x39fce2(0x371)]=_0xa1abf4[_0x39fce2(0x31c)](),_0x341691=ImageManager['loadSvActor'](this['_graphicSv']),_0x341691[_0x39fce2(0x225)](this['changeSvActorGraphicBitmap'][_0x39fce2(0x2eb)](this,_0x341691));else{if($gameSystem[_0x39fce2(0x2cb)]())this['_graphicEnemy']=_0xa1abf4['battlerName'](),_0x341691=ImageManager[_0x39fce2(0x34a)](this[_0x39fce2(0x30c)]),_0x341691[_0x39fce2(0x225)](this[_0x39fce2(0x198)]['bind'](this,_0x341691));else{if(_0x39fce2(0x295)!==_0x39fce2(0x295)){if(this['_graphicSv']!==_0x566ef7[_0x39fce2(0x1d0)]())return this[_0x39fce2(0x2ce)]();}else this[_0x39fce2(0x30c)]=_0xa1abf4[_0x39fce2(0x1d0)](),_0x341691=ImageManager[_0x39fce2(0x2bd)](this[_0x39fce2(0x30c)]),_0x341691['addLoadListener'](this[_0x39fce2(0x198)]['bind'](this,_0x341691));}}break;case _0x39fce2(0x2f7):this['_graphicSv']=_0xa1abf4[_0x39fce2(0x1d0)](),_0x341691=ImageManager[_0x39fce2(0x345)](this[_0x39fce2(0x371)]),_0x341691[_0x39fce2(0x225)](this[_0x39fce2(0x27c)]['bind'](this,_0x341691));break;}},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x264)]=function(_0x44a5b9){const _0x294be4=_0xefec4f,_0x1fb6dd=this[_0x294be4(0x327)],_0x561bf0=this[_0x294be4(0x19e)](),_0x376154=this[_0x294be4(0x1a4)](),_0x11db21=Math['max'](_0x561bf0,_0x376154);this[_0x294be4(0x320)]['bitmap']=new Bitmap(_0x561bf0,_0x376154);const _0xf4e128=this[_0x294be4(0x320)][_0x294be4(0x2e0)],_0x42b049=ImageManager[_0x294be4(0x23a)],_0x4845f5=ImageManager[_0x294be4(0x292)],_0x44720a=_0x11db21/Math[_0x294be4(0x343)](_0x42b049,_0x4845f5),_0x2f3816=ImageManager[_0x294be4(0x23a)],_0x1f0cbb=ImageManager[_0x294be4(0x292)],_0x3d4f2f=_0x1fb6dd%0x4*_0x42b049+(_0x42b049-_0x2f3816)/0x2,_0x22dd5e=Math[_0x294be4(0x309)](_0x1fb6dd/0x4)*_0x4845f5+(_0x4845f5-_0x1f0cbb)/0x2,_0x52d8dd=(_0x561bf0-_0x42b049*_0x44720a)/0x2,_0x356a28=(_0x376154-_0x4845f5*_0x44720a)/0x2;_0xf4e128[_0x294be4(0x2cd)](_0x44a5b9,_0x3d4f2f,_0x22dd5e,_0x2f3816,_0x1f0cbb,_0x52d8dd,_0x356a28,_0x11db21,_0x11db21);},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)]['changeIconGraphicBitmap']=function(_0x463f15){const _0x2cb377=_0xefec4f,_0x1ea894=this[_0x2cb377(0x34f)],_0x36b121=this['bitmapWidth'](),_0x374ec4=this[_0x2cb377(0x1a4)]();this[_0x2cb377(0x320)]['bitmap']=new Bitmap(_0x36b121,_0x374ec4);const _0x47da26=this['_graphicSprite']['bitmap'],_0x292317=ImageManager[_0x2cb377(0x347)],_0x211bf2=ImageManager['iconHeight'],_0x59c1df=Math[_0x2cb377(0x310)](_0x292317,_0x211bf2,_0x36b121,_0x374ec4),_0x63dfde=_0x1ea894%0x10*_0x292317,_0x4e148a=Math[_0x2cb377(0x309)](_0x1ea894/0x10)*_0x211bf2,_0x5abaf1=Math['floor'](Math['max'](_0x36b121-_0x59c1df,0x0)/0x2),_0x42666e=Math['floor'](Math[_0x2cb377(0x343)](_0x374ec4-_0x59c1df,0x0)/0x2);_0x47da26[_0x2cb377(0x2cd)](_0x463f15,_0x63dfde,_0x4e148a,_0x292317,_0x211bf2,_0x5abaf1,_0x42666e,_0x59c1df,_0x59c1df);},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)]['changeSvActorGraphicBitmap']=function(_0x571fc1){const _0x369c6f=_0xefec4f,_0x4e8328=this[_0x369c6f(0x19e)](),_0x45f171=this[_0x369c6f(0x1a4)](),_0x35ff95=Math['min'](_0x4e8328,_0x45f171);this['_graphicSprite'][_0x369c6f(0x2e0)]=new Bitmap(_0x4e8328,_0x45f171);const _0x4f48f3=this[_0x369c6f(0x320)][_0x369c6f(0x2e0)],_0x317398=this['_graphicSv'][_0x369c6f(0x1dd)](/\$/i),_0x1c6da0=_0x317398?0x1:ImageManager['svActorHorzCells'],_0xe6e59=_0x317398?0x1:ImageManager[_0x369c6f(0x27d)],_0x501f8f=_0x571fc1['width']/_0x1c6da0,_0x550752=_0x571fc1[_0x369c6f(0x370)]/_0xe6e59,_0x5ce961=Math['min'](0x1,_0x35ff95/_0x501f8f,_0x35ff95/_0x550752),_0x32d469=_0x501f8f*_0x5ce961,_0x4105d9=_0x550752*_0x5ce961,_0x613c2a=Math[_0x369c6f(0x253)]((_0x4e8328-_0x32d469)/0x2),_0x5d88db=Math[_0x369c6f(0x253)]((_0x45f171-_0x4105d9)/0x2);_0x4f48f3['blt'](_0x571fc1,0x0,0x0,_0x501f8f,_0x550752,_0x613c2a,_0x5d88db,_0x32d469,_0x4105d9);},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x198)]=function(_0x30af14){const _0x599f82=_0xefec4f,_0x1102a4=Window_STB_TurnOrder[_0x599f82(0x289)],_0x4ac4f6=this['bitmapWidth'](),_0x469f3e=this[_0x599f82(0x1a4)](),_0x38f642=Math[_0x599f82(0x310)](_0x4ac4f6,_0x469f3e);this[_0x599f82(0x320)]['bitmap']=new Bitmap(_0x4ac4f6,_0x469f3e);const _0x7caf43=this[_0x599f82(0x320)][_0x599f82(0x2e0)],_0xb0cede=Math[_0x599f82(0x310)](0x1,_0x38f642/_0x30af14[_0x599f82(0x336)],_0x38f642/_0x30af14[_0x599f82(0x370)]),_0x17373f=_0x30af14[_0x599f82(0x336)]*_0xb0cede,_0xd00ce9=_0x30af14['height']*_0xb0cede,_0x3891e9=Math[_0x599f82(0x253)]((_0x4ac4f6-_0x17373f)/0x2),_0x3ea4eb=Math[_0x599f82(0x253)]((_0x469f3e-_0xd00ce9)/0x2);_0x7caf43[_0x599f82(0x2cd)](_0x30af14,0x0,0x0,_0x30af14['width'],_0x30af14[_0x599f82(0x370)],_0x3891e9,_0x3ea4eb,_0x17373f,_0xd00ce9);},Sprite_STB_TurnOrder_Battler['prototype'][_0xefec4f(0x201)]=function(){const _0x53f9c6=_0xefec4f,_0x2c7892=this[_0x53f9c6(0x299)]();if(!_0x2c7892)return;if(!_0x2c7892['isEnemy']())return;if(this[_0x53f9c6(0x257)]===_0x2c7892['battlerHue']())return;this[_0x53f9c6(0x257)]=_0x2c7892[_0x53f9c6(0x1ed)]();if(_0x2c7892[_0x53f9c6(0x24f)]())this['_graphicHue']=0x0;this[_0x53f9c6(0x320)][_0x53f9c6(0x37e)](this[_0x53f9c6(0x257)]);},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x2c4)]=function(){const _0x3c6354=_0xefec4f;if(!this[_0x3c6354(0x217)])return;const _0x2cf07b=this['battler']();if(!_0x2cf07b)return;if(this[_0x3c6354(0x384)]===_0x2cf07b[_0x3c6354(0x384)]&&this['_plural']===_0x2cf07b[_0x3c6354(0x1f1)])return;this[_0x3c6354(0x384)]=_0x2cf07b[_0x3c6354(0x384)],this[_0x3c6354(0x1f1)]=_0x2cf07b[_0x3c6354(0x1f1)];const _0x5e7756=Window_STB_TurnOrder['Settings'],_0x2c8c5d=this['isHorz'](),_0x4ebd58=this[_0x3c6354(0x19e)](),_0x1296a9=this[_0x3c6354(0x1a4)](),_0x26efc7=this[_0x3c6354(0x217)]['bitmap'];_0x26efc7[_0x3c6354(0x33c)]();if(!this[_0x3c6354(0x1f1)])return;_0x26efc7[_0x3c6354(0x1b2)]=_0x5e7756[_0x3c6354(0x35c)]||$gameSystem[_0x3c6354(0x1c2)](),_0x26efc7['fontSize']=_0x5e7756[_0x3c6354(0x375)]||0x10;if(_0x2c8c5d)_0x3c6354(0x348)===_0x3c6354(0x348)?_0x26efc7[_0x3c6354(0x373)](this[_0x3c6354(0x384)][_0x3c6354(0x278)](),0x0,_0x1296a9/0x2,_0x4ebd58,_0x1296a9/0x2,_0x3c6354(0x2ae)):(this[_0x3c6354(0x38a)](),this[_0x3c6354(0x23b)]=0x0,this['updatePosition'](),this['opacity']=this['_fadeTarget']);else{if(_0x3c6354(0x232)===_0x3c6354(0x26f)){const _0x527aa5=this[_0x3c6354(0x327)],_0x14dd5b=this['bitmapWidth'](),_0x32e319=this[_0x3c6354(0x1a4)](),_0x5eccec=_0x2775e7[_0x3c6354(0x343)](_0x14dd5b,_0x32e319);this[_0x3c6354(0x320)][_0x3c6354(0x2e0)]=new _0x5d2a41(_0x14dd5b,_0x32e319);const _0x5ec612=this[_0x3c6354(0x320)][_0x3c6354(0x2e0)],_0x47e172=_0x171df[_0x3c6354(0x23a)],_0x58894e=_0x13fbd6[_0x3c6354(0x292)],_0x38022a=_0x5eccec/_0xa7f8dc[_0x3c6354(0x343)](_0x47e172,_0x58894e),_0x5e25e4=_0x462c4b[_0x3c6354(0x23a)],_0x41df38=_0x4a50a7[_0x3c6354(0x292)],_0x2936b1=_0x527aa5%0x4*_0x47e172+(_0x47e172-_0x5e25e4)/0x2,_0x172162=_0x1590c7[_0x3c6354(0x309)](_0x527aa5/0x4)*_0x58894e+(_0x58894e-_0x41df38)/0x2,_0x247e0f=(_0x14dd5b-_0x47e172*_0x38022a)/0x2,_0x5bbded=(_0x32e319-_0x58894e*_0x38022a)/0x2;_0x5ec612[_0x3c6354(0x2cd)](_0x42e58b,_0x2936b1,_0x172162,_0x5e25e4,_0x41df38,_0x247e0f,_0x5bbded,_0x5eccec,_0x5eccec);}else _0x26efc7[_0x3c6354(0x373)](this[_0x3c6354(0x384)][_0x3c6354(0x278)](),0x0,0x2,_0x4ebd58-0x8,_0x1296a9-0x4,_0x3c6354(0x314));}},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x228)]=function(){const _0x5bdb12=_0xefec4f,_0x15010e=this[_0x5bdb12(0x299)]();if(!_0x15010e)return;const _0x262685=_0x15010e[_0x5bdb12(0x299)]();if(!_0x262685)return;const _0x50fba6=_0x262685['mainSprite']();if(!_0x50fba6)return;this['setBlendColor'](_0x50fba6['_blendColor']);},Sprite_STB_TurnOrder_Battler[_0xefec4f(0x294)][_0xefec4f(0x26a)]=function(){const _0x363008=_0xefec4f;return this[_0x363008(0x299)]();},VisuMZ[_0xefec4f(0x369)][_0xefec4f(0x2ea)]=Window_Help[_0xefec4f(0x294)][_0xefec4f(0x36b)],Window_Help[_0xefec4f(0x294)]['setItem']=function(_0x1e331d){const _0x23ef6e=_0xefec4f;if(BattleManager[_0x23ef6e(0x251)]()&&_0x1e331d&&_0x1e331d['note']&&_0x1e331d[_0x23ef6e(0x317)][_0x23ef6e(0x1dd)](/<(?:STB) HELP>\s*([\s\S]*)\s*<\/(?:STB) HELP>/i)){if(_0x23ef6e(0x22d)===_0x23ef6e(0x28f)){const _0xb0da7f=new _0x37530b(_0x920474,_0x2a0486);this['_turnOrderInnerSprite'][_0x23ef6e(0x1b6)](_0xb0da7f),this['_turnOrderContainer']['push'](_0xb0da7f);}else this[_0x23ef6e(0x204)](String(RegExp['$1']));}else VisuMZ[_0x23ef6e(0x369)]['Window_Help_setItem']['call'](this,_0x1e331d);};function Window_STB_TurnOrder(){const _0x5cca0a=_0xefec4f;this[_0x5cca0a(0x313)](...arguments);}Window_STB_TurnOrder['prototype']=Object[_0xefec4f(0x363)](Window_Base[_0xefec4f(0x294)]),Window_STB_TurnOrder[_0xefec4f(0x294)][_0xefec4f(0x1fd)]=Window_STB_TurnOrder,Window_STB_TurnOrder[_0xefec4f(0x289)]=VisuMZ['BattleSystemSTB']['Settings'][_0xefec4f(0x2c5)],Window_STB_TurnOrder['prototype'][_0xefec4f(0x313)]=function(){const _0x3ceb08=_0xefec4f,_0x472837=this[_0x3ceb08(0x296)]();this[_0x3ceb08(0x35e)](_0x472837),Window_Base[_0x3ceb08(0x294)][_0x3ceb08(0x313)][_0x3ceb08(0x2e1)](this,_0x472837),this[_0x3ceb08(0x20d)](),this[_0x3ceb08(0x337)](),this[_0x3ceb08(0x19d)]=0x0;},Window_STB_TurnOrder[_0xefec4f(0x294)][_0xefec4f(0x296)]=function(){const _0x312158=_0xefec4f;return this[_0x312158(0x1fe)]($gameParty['maxBattleMembers'](),0x9,!![]);},Window_STB_TurnOrder[_0xefec4f(0x294)]['initHomePositions']=function(_0x3deae8){const _0x681e8e=_0xefec4f;this[_0x681e8e(0x256)]=this[_0x681e8e(0x2f0)]=_0x3deae8['x'],this['_targetHomeY']=this['_homeY']=_0x3deae8['y'],this['_fullWidth']=_0x3deae8[_0x681e8e(0x336)],this['_fullHeight']=_0x3deae8[_0x681e8e(0x370)],this['_homeDuration']=0x0;},Window_STB_TurnOrder[_0xefec4f(0x294)]['createBattlerRect']=function(_0x3e88f9,_0x248865,_0x32dcb0){const _0x2c9aa0=_0xefec4f,_0x39b04d=Window_STB_TurnOrder[_0x2c9aa0(0x289)],_0x11052c=this[_0x2c9aa0(0x238)]()?_0x39b04d[_0x2c9aa0(0x1c9)]:_0x39b04d[_0x2c9aa0(0x2f5)],_0x51cb1a=Math[_0x2c9aa0(0x310)](_0x11052c,_0x3e88f9+_0x248865),_0x3d07ea=SceneManager[_0x2c9aa0(0x30d)][_0x2c9aa0(0x34c)][_0x2c9aa0(0x370)],_0x4117ec=SceneManager[_0x2c9aa0(0x30d)][_0x2c9aa0(0x2aa)][_0x2c9aa0(0x370)],_0x148747=_0x39b04d[_0x2c9aa0(0x208)],_0xf75b9c=Graphics[_0x2c9aa0(0x370)]-_0x3d07ea-_0x4117ec;let _0x571917=0x0,_0x5e4d2f=0x0,_0x54d429=0x0,_0x210998=0x0;switch(_0x39b04d[_0x2c9aa0(0x2a9)]){case'top':_0x571917=_0x39b04d[_0x2c9aa0(0x1cb)]*_0x51cb1a+_0x148747,_0x5e4d2f=_0x39b04d[_0x2c9aa0(0x31b)],_0x54d429=Math['ceil']((Graphics[_0x2c9aa0(0x336)]-_0x571917)/0x2),_0x210998=_0x39b04d[_0x2c9aa0(0x323)];break;case _0x2c9aa0(0x338):_0x571917=_0x39b04d[_0x2c9aa0(0x1cb)]*_0x51cb1a+_0x148747,_0x5e4d2f=_0x39b04d['SpriteLength'],_0x54d429=Math[_0x2c9aa0(0x321)]((Graphics[_0x2c9aa0(0x336)]-_0x571917)/0x2),_0x210998=Graphics[_0x2c9aa0(0x370)]-_0x3d07ea-_0x5e4d2f-_0x39b04d[_0x2c9aa0(0x323)];break;case _0x2c9aa0(0x2dd):_0x571917=_0x39b04d[_0x2c9aa0(0x31b)],_0x5e4d2f=_0x39b04d[_0x2c9aa0(0x1cb)]*_0x51cb1a+_0x148747,_0x54d429=_0x39b04d[_0x2c9aa0(0x323)],_0x210998=Math['ceil']((_0xf75b9c-_0x5e4d2f)/0x2),_0x210998+=_0x4117ec;break;case _0x2c9aa0(0x314):_0x571917=_0x39b04d['SpriteLength'],_0x5e4d2f=_0x39b04d['SpriteThin']*_0x51cb1a+_0x148747,_0x54d429=Graphics[_0x2c9aa0(0x336)]-_0x571917-_0x39b04d[_0x2c9aa0(0x323)],_0x210998=Math[_0x2c9aa0(0x321)]((_0xf75b9c-_0x5e4d2f)/0x2),_0x210998+=_0x4117ec;break;}if(!_0x32dcb0){const _0x28fcb9=Window_STB_TurnOrder[_0x2c9aa0(0x289)][_0x2c9aa0(0x2d0)];let _0x486fa5=Math[_0x2c9aa0(0x310)](_0x11052c,Math[_0x2c9aa0(0x310)]($gameParty[_0x2c9aa0(0x2d3)]()+0x8)-_0x51cb1a);switch(_0x39b04d[_0x2c9aa0(0x2a9)]){case _0x2c9aa0(0x25f):case _0x2c9aa0(0x338):_0x28fcb9&&(_0x54d429-=_0x486fa5*_0x39b04d['SpriteThin']);break;}}return _0x54d429+=_0x39b04d[_0x2c9aa0(0x1a7)],_0x210998+=_0x39b04d['DisplayOffsetY'],new Rectangle(_0x54d429,_0x210998,_0x571917,_0x5e4d2f);},Window_STB_TurnOrder[_0xefec4f(0x294)][_0xefec4f(0x287)]=function(){const _0x1d202d=_0xefec4f;this[_0x1d202d(0x1f7)]=0x0;},Window_STB_TurnOrder[_0xefec4f(0x294)][_0xefec4f(0x238)]=function(){const _0x4542b6=_0xefec4f,_0x1dfe7c=Window_STB_TurnOrder[_0x4542b6(0x289)],_0x520634=[_0x4542b6(0x25f),_0x4542b6(0x338)][_0x4542b6(0x1ac)](_0x1dfe7c['DisplayPosition']);return _0x520634;},Window_STB_TurnOrder[_0xefec4f(0x294)][_0xefec4f(0x20d)]=function(){const _0x490568=_0xefec4f;this[_0x490568(0x2e8)]=new Sprite(),this[_0x490568(0x213)](this[_0x490568(0x2e8)]),this[_0x490568(0x283)]=[];for(let _0x1181c1=0x0;_0x1181c1<$gameParty[_0x490568(0x2d3)]();_0x1181c1++){if(_0x490568(0x312)!==_0x490568(0x312)){if(!_0x1971a7[_0x490568(0x289)][_0x490568(0x203)])return;const _0x3dbb14=_0x4737ca[_0x490568(0x289)],_0x437a24=this['_unit']===_0x51beba?'Actor':_0x490568(0x2f1),_0x9b78d7='%1SystemBg'['format'](_0x437a24),_0x559f83=new _0x45d6be();_0x559f83[_0x490568(0x2e7)]['x']=this['anchor']['x'],_0x559f83['anchor']['y']=this[_0x490568(0x2e7)]['y'];if(_0x3dbb14[_0x9b78d7])_0x559f83[_0x490568(0x2e0)]=_0x5cb763[_0x490568(0x206)](_0x3dbb14[_0x9b78d7]);else{const _0x17592e=this[_0x490568(0x19e)](),_0x314642=this[_0x490568(0x1a4)]();_0x559f83[_0x490568(0x2e0)]=new _0x51dfc5(_0x17592e,_0x314642);const _0x5369d8=_0x329e05[_0x490568(0x267)](_0x3dbb14[_0x490568(0x1d3)[_0x490568(0x2d4)](_0x437a24)]),_0x411329=_0x68a21b[_0x490568(0x267)](_0x3dbb14[_0x490568(0x266)[_0x490568(0x2d4)](_0x437a24)]);_0x559f83[_0x490568(0x2e0)][_0x490568(0x21e)](0x0,0x0,_0x17592e,_0x314642,_0x5369d8,_0x411329,!![]);}this[_0x490568(0x333)]=_0x559f83,this[_0x490568(0x1b6)](this[_0x490568(0x333)]),this[_0x490568(0x336)]=this['_backgroundSprite']['width'],this[_0x490568(0x370)]=this[_0x490568(0x333)][_0x490568(0x370)];}else{const _0x449a89=new Sprite_STB_TurnOrder_Battler($gameParty,_0x1181c1);this[_0x490568(0x2e8)][_0x490568(0x1b6)](_0x449a89),this[_0x490568(0x283)]['push'](_0x449a89);}}for(let _0x34f3ad=0x0;_0x34f3ad<0x8;_0x34f3ad++){const _0x5191a6=new Sprite_STB_TurnOrder_Battler($gameTroop,_0x34f3ad);this['_turnOrderInnerSprite']['addChild'](_0x5191a6),this[_0x490568(0x283)]['push'](_0x5191a6);}},Window_STB_TurnOrder[_0xefec4f(0x294)]['update']=function(){const _0x1c197d=_0xefec4f;Window_Base[_0x1c197d(0x294)][_0x1c197d(0x212)]['call'](this),this[_0x1c197d(0x28c)](),this[_0x1c197d(0x29b)](),this[_0x1c197d(0x282)](),this[_0x1c197d(0x330)](),this[_0x1c197d(0x337)]();},Window_STB_TurnOrder[_0xefec4f(0x294)][_0xefec4f(0x28c)]=function(){const _0x5d8594=_0xefec4f;if(this[_0x5d8594(0x325)]>0x0){const _0x339773=this['_homeDuration'];this[_0x5d8594(0x2f0)]=(this[_0x5d8594(0x2f0)]*(_0x339773-0x1)+this[_0x5d8594(0x256)])/_0x339773,this[_0x5d8594(0x1de)]=(this[_0x5d8594(0x1de)]*(_0x339773-0x1)+this[_0x5d8594(0x2db)])/_0x339773,this[_0x5d8594(0x325)]--,this[_0x5d8594(0x325)]<=0x0&&(this[_0x5d8594(0x2f0)]=this[_0x5d8594(0x256)],this[_0x5d8594(0x1de)]=this['_targetHomeY']);}},Window_STB_TurnOrder['prototype'][_0xefec4f(0x29b)]=function(){const _0x763abe=_0xefec4f,_0x20e197=Window_STB_TurnOrder[_0x763abe(0x289)];if(_0x20e197['DisplayPosition']!=='top')return;if(!_0x20e197[_0x763abe(0x235)])return;const _0x530f4f=SceneManager[_0x763abe(0x30d)][_0x763abe(0x2aa)];if(!_0x530f4f)return;if(_0x530f4f['visible'])this['x']=this['_homeX']+(_0x20e197[_0x763abe(0x32c)]||0x0),this['y']=this[_0x763abe(0x1de)]+(_0x20e197[_0x763abe(0x305)]||0x0);else{if(_0x763abe(0x306)!=='suBVA')return this[_0x763abe(0x2ce)]();else this['x']=this[_0x763abe(0x2f0)],this['y']=this['_homeY'];}const _0x3ed077=SceneManager['_scene']['_windowLayer'];if(Window_STB_TurnOrder[_0x763abe(0x2b1)]===undefined){if('YUCmV'==='YUCmV')Window_STB_TurnOrder[_0x763abe(0x2b1)]=Math[_0x763abe(0x253)]((Graphics[_0x763abe(0x336)]-Math[_0x763abe(0x310)](Graphics['boxWidth'],_0x3ed077['width']))/0x2),Window_STB_TurnOrder[_0x763abe(0x342)]=Math[_0x763abe(0x253)]((Graphics[_0x763abe(0x370)]-Math['min'](Graphics[_0x763abe(0x2ba)],_0x3ed077[_0x763abe(0x370)]))/0x2);else{if(this[_0x763abe(0x344)]>0x0){const _0x450534=this[_0x763abe(0x344)];this[_0x763abe(0x19d)]=(this[_0x763abe(0x19d)]*(_0x450534-0x1)+this[_0x763abe(0x1e1)])/_0x450534,this[_0x763abe(0x344)]--,this[_0x763abe(0x344)]<=0x0&&(this[_0x763abe(0x38a)](),this['_positionDuration']=0x0,this['updatePosition'](),this['opacity']=this['_fadeTarget']);}if(this[_0x763abe(0x29d)])return;_0x23e1f4[_0x763abe(0x2ad)]===_0x763abe(0x2fa)&&(this['_isBattleOver']=!![],this[_0x763abe(0x252)](0x0));}}this['x']+=_0x3ed077['x']-Window_STB_TurnOrder['_ogWindowLayerX'],this['y']+=_0x3ed077['y']-Window_STB_TurnOrder['_ogWindowLayerY'];},Window_STB_TurnOrder[_0xefec4f(0x294)]['updateSidePosition']=function(){const _0x28e351=_0xefec4f,_0x48e58e=Window_STB_TurnOrder['Settings'];if(['top']['includes'](_0x48e58e[_0x28e351(0x2a9)]))return;this['x']=this['_homeX'],this['y']=this['_homeY'];const _0x16681b=SceneManager[_0x28e351(0x30d)]['_windowLayer'];this['x']+=_0x16681b['x'],this['y']+=_0x16681b['y'];},Window_STB_TurnOrder[_0xefec4f(0x294)][_0xefec4f(0x330)]=function(){const _0x80c5a4=_0xefec4f;if(!this['_turnOrderInnerSprite'])return;const _0x4547c8=this[_0x80c5a4(0x2e8)][_0x80c5a4(0x2bb)];if(!_0x4547c8)return;_0x4547c8['sort'](this[_0x80c5a4(0x32a)][_0x80c5a4(0x2eb)](this));},Window_STB_TurnOrder[_0xefec4f(0x294)][_0xefec4f(0x32a)]=function(_0x4283a5,_0x2284ed){const _0x250742=_0xefec4f,_0x3bd2a9=this[_0x250742(0x238)](),_0x570dbf=Window_STB_TurnOrder[_0x250742(0x289)][_0x250742(0x2d0)];if(_0x3bd2a9&&!_0x570dbf){if('KgTNp'===_0x250742(0x2c7))this[_0x250742(0x273)]();else return _0x4283a5['x']-_0x2284ed['x'];}else{if(_0x3bd2a9&&_0x570dbf)return _0x2284ed['x']-_0x4283a5['x'];else{if(!_0x3bd2a9&&_0x570dbf){if(_0x250742(0x220)!=='lvNsY')this[_0x250742(0x1dc)]=![];else return _0x4283a5['y']-_0x2284ed['y'];}else{if(!_0x3bd2a9&&!_0x570dbf)return _0x2284ed['y']-_0x4283a5['y'];}}}},Window_STB_TurnOrder[_0xefec4f(0x294)]['updateVisibility']=function(){const _0xe1f353=_0xefec4f;this[_0xe1f353(0x2d5)]=$gameSystem['isBattleSystemSTBTurnOrderVisible']();},Window_STB_TurnOrder[_0xefec4f(0x294)][_0xefec4f(0x36d)]=function(_0x37221e){const _0x3698fe=_0xefec4f;this['_turnOrderContainer'][_0x3698fe(0x247)]((_0x597817,_0x1a5ddc)=>{const _0x312223=_0x3698fe;return _0x597817[_0x312223(0x290)]()-_0x1a5ddc[_0x312223(0x290)]();}),this['recalculateHome']();if(!_0x37221e)return;for(const _0xdae1d2 of this['_turnOrderContainer']){if(_0x3698fe(0x311)===_0x3698fe(0x311)){if(!_0xdae1d2)continue;_0xdae1d2['update'](),_0xdae1d2[_0x3698fe(0x23b)]=0x0;}else delete _0x25282c[_0x3698fe(0x1d8)][_0x3698fe(0x1f6)];}},Window_STB_TurnOrder[_0xefec4f(0x294)][_0xefec4f(0x2b4)]=function(){const _0x19604b=_0xefec4f;if(!this['isHorz']())return;const _0x266e62=VisuMZ['BattleSystemSTB'][_0x19604b(0x289)]['TurnOrder'];if(!_0x266e62[_0x19604b(0x32f)])return;const _0x4aab27=$gameParty[_0x19604b(0x224)]()[_0x19604b(0x1ef)](_0xb0c50d=>_0xb0c50d&&_0xb0c50d['isAlive']()&&_0xb0c50d[_0x19604b(0x2ed)]())[_0x19604b(0x2b8)],_0x1ba7ac=$gameTroop[_0x19604b(0x224)]()[_0x19604b(0x1ef)](_0x2b4494=>_0x2b4494&&_0x2b4494[_0x19604b(0x23e)]()&&_0x2b4494[_0x19604b(0x2ed)]())[_0x19604b(0x2b8)],_0x533e85=this[_0x19604b(0x1fe)](_0x4aab27,_0x1ba7ac);this[_0x19604b(0x256)]=_0x533e85['x'],this[_0x19604b(0x2db)]=_0x533e85['y'],(this[_0x19604b(0x256)]!==this[_0x19604b(0x2f0)]||this['_targetHomeY']!==this[_0x19604b(0x1de)])&&(this[_0x19604b(0x325)]=_0x266e62[_0x19604b(0x2bc)]);}; \ No newline at end of file diff --git a/js/plugins/VisuMZ_2_QuestSystem.js b/js/plugins/VisuMZ_2_QuestSystem.js new file mode 100644 index 0000000..156a216 --- /dev/null +++ b/js/plugins/VisuMZ_2_QuestSystem.js @@ -0,0 +1,2418 @@ +//============================================================================= +// VisuStella MZ - Quest Journal System +// VisuMZ_2_QuestSystem.js +//============================================================================= + +var Imported = Imported || {}; +Imported.VisuMZ_2_QuestSystem = true; + +var VisuMZ = VisuMZ || {}; +VisuMZ.QuestSystem = VisuMZ.QuestSystem || {}; +VisuMZ.QuestSystem.version = 1.13; + +//============================================================================= + /*: + * @target MZ + * @plugindesc [RPG Maker MZ] [Tier 2] [Version 1.13] [QuestSystem] + * @author VisuStella + * @url http://www.yanfly.moe/wiki/Quest_Journal_System_VisuStella_MZ + * @orderAfter VisuMZ_0_CoreEngine + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * A quest journal is a very important tool provided by game developers for the + * players. It lists various quests, missions, and objectives that the player + * can pursue in order to progress further into the game. This can be helpful + * in reminding the player what needs to be done in the event the player can + * forget what things there are to do in a vast and large RPG world. + * + * This plugin places a quest journal system into your RPG Maker MZ game. You + * can set up how the quest journal appears, move its windows around and/or + * reshape them to fit your game. + * + * You can adjust the quest's title, display a difficulty level, remind the + * player who the quest is from, where that quest is from, various dynamic + * descriptions explaining the quest, a list of objectives to make, a list of + * rewards that will be given to the player once the quest is complete, and any + * subtext footnotes and quotes you may wish to insert into each quest. + * + * *NOTE* + * + * Keep in mind that while this plugin does enable a quest journal system into + * your game, this plugin will NOT automate it. If you have a quest enabled, it + * is still up to you to add the quest properly into the journal, set its many + * objectives, when the other objectives appear, what the rewards are, and then + * giving out the rewards yourself manually. The purpose of this plugin is to + * simply serve as a visual record for your player to see what quests have been + * handed down to him or her. + * + * Features include all (but not limited to) the following: + * + * * Unlimited quest categories. + * * Unlimited quest slots. + * * Full control over what appears in the quest journal system and how it + * appears in-game. + * * Update quest descriptions, objectives, rewards, subtexts, etc. mid-game + * through the use of Plugin Commands. + * * A dedicated quest menu that's accessible from the Main Menu or by + * Plugin Command call. + * * A quest tracker that appears in the map scene to keep the player updated + * on how far they are progressing in their current quest. + * * Options for the player to show/hide the quest tracker and reposition its + * location on the screen. + * + * ============================================================================ + * Requirements + * ============================================================================ + * + * This plugin is made for RPG Maker MZ. This will not work in other iterations + * of RPG Maker. + * + * ------ Tier 2 ------ + * + * This plugin is a Tier 2 plugin. Place it under other plugins of lower tier + * value on your Plugin Manager list (ie: 0, 1, 2, 3, 4, 5). This is to ensure + * that your plugins will have the best compatibility with the rest of the + * VisuStella MZ library. + * + * ============================================================================ + * Explanation - Categories and Quests + * ============================================================================ + * + * The following is an explanation on the differences between Categories and + * Quests for the usage of this plugin. + * + * --- + * + * Categories + * + * Quest Categories separate the quest types in your game. These can be used to + * help players differentiate which are story-driven quests, which are optional + * quests, recurring quests, etc. These have limited settings, but serve as + * containers for quests that fall under its category. + * + * --- + * + * Plugin Parameters > Categories > Category Name: + * + * This is the category's name. It appears however you type it using text + * codes, allowing you to color-code it if needed. + * + * --- + * + * Plugin Parameters > Categories > Quests: + * + * These contain the quests that are listed under this category. Enter in as + * many as needed/desired. + * + * --- + * + * Quests + * + * Each Quest Category will contain a list of quests that can appear in-game. + * These individual quests make up the meat and bones of the Quest System and + * will serve to relay information to the player on what he/she needs to do in + * order to make progress in your game. + * + * --- + * + * Plugin Parameters > General > Log Window > Quest Log + * + * This determines how the template used by the quest logs to parse information + * regarding the quests themselves. By default, they are formatted like such: + * + * --- + * + * \{[[Title]]\} + * \c[4]Level:\c[0] [[Difficulty]] + * \c[4]From:\c[0] [[From]] + * \c[4]Location:\c[0] [[Location]] + * + * \c[4]Description:\c[0] + * [[Description]] + * + * \c[4]Objectives:\c[0] + * [[Objectives]] + * + * \c[4]Rewards:\c[0] + * [[Rewards]] + * + * [[Subtext]] + * + * [[Quote]] + * + * --- + * + * Each [[Marker]] is to be replaced by the quest date related to them. + * + * - [[Title]] - Inserts the title of the quest. + * + * - [[RawTitle]] - Inserts the title of the quest without any text codes + * removed. Keep in mind that icons do NOT resize based on the text size. + * + * - [[Difficulty]] - Inserts the quest difficulty text. + * + * - [[From]] - Inserts the quest origin text. + * + * - [[Location]] - Inserts the quest location text. + * + * - [[Description]] - Inserts the currently active quest description. + * - The quest description can change depending on which Description ID + * is currently active for that quest. + * + * - [[Objectives]] - Inserts a list of the visible quest objectives. + * - The quest objectives visible to the player will be determined by + * the quest's Visible Objectives settings and any Plugin Commands + * used to alter which objectives are visible and what state they are + * currently in (known, completed, failed). + * + * - [[Rewards]] - Inserts a list of visible quest rewards. + * - The quest rewards visible to the player will be determined by the + * quest's Visible Rewards settings and any Plugin Commands used to + * alter which rewards are visible and what state they are currently + * in (known, claimed, denied). + * + * - [[Subtext]] - Inserts the currently active quest subtext. + * - The quest subtext can change depending on which Subtext ID is + * currently active for that quest. + * + * - [[Quote]] - Inserts the currently active quest quote. + * - The quest quote can change depending on which Quote ID is + * currently active for that quest. + * + * --- + * + * Each of the following aspects of the quests can be changed through the usage + * of Plugin Commands: + * + * - Description + * - Objectives + * - Rewards + * - Subtext + * - Quote + * + * The following are the Plugin Commands that can change them: + * + * - Quest: Description Change + * - Quest: Objectives Change + * - Quest: Rewards Change + * - Quest: Subtext Change + * - Quest: Quote Change + * + * --- + * + * More information will be explained in their respective Plugin Parameter + * sections further down in the help file. + * + * ============================================================================ + * Control Variable and Conditional Branch Usage + * ============================================================================ + * + * For those wanting to use Control Variable event commands and/or Conditional + * Branch event commands with the Quest Journal System plugin, you can insert + * the following functions into the "Script" input fields of the respective + * event commands. + * + * These are new JavaScript functions added through this plugin and will not + * work without it. + * + * --- + * + * === Control Variable Script Functions === + * + * These are newly added JavaScript functions that return a numeric value. + * The functions are best used with the Control Variable script input field. + * + * --- + * + * totalQuestsAvailable() + * + * - Returns the total number of quests available for the player. + * + * --- + * + * totalQuestsCompleted() + * + * - Returns the total number of quests completed by the player. + * + * --- + * + * totalQuestsFailed() + * + * - Returns the total number of quests failed by the player. + * + * --- + * + * totalQuestsRevealed() + * + * - Returns the total number of quests visible to the player. + * + * --- + * + * totalQuestsInGame() + * + * - Returns the total number of quests available in-game. + * + * --- + * + * getQuestDescriptionIndex(questKey) + * + * - Returns the select quest's current description index ID. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Example: getQuestDescriptionIndex('Welcome') + * + * --- + * + * totalVisibleQuestObjectives(questKey) + * + * - Returns the total number of visible quest objectives for selected quest. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Example: totalVisibleQuestObjectives('Welcome') + * + * --- + * + * totalQuestObjectives(questKey) + * + * - Returns the total number of quest objectives for selected quest. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Example: totalQuestObjectives('Welcome') + * + * --- + * + * totalVisibleQuestRewards(questKey) + * + * - Returns the total number of visible quest rewards for selected quest. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Example: totalVisibleQuestRewards('Welcome') + * + * --- + * + * totalQuestRewards(questKey) + * + * - Returns the total number of quest rewards for selected quest. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Example: totalQuestRewards('Welcome') + * + * --- + * + * getQuestSubtextIndex(questKey) + * + * - Returns the select quest's current subtext index ID. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Example: getQuestSubtextIndex('Welcome') + * + * --- + * + * getQuestQuoteIndex(questKey) + * + * - Returns the select quest's current subtext index ID. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Example: getQuestQuoteIndex('Welcome') + * + * --- + * + * === Conditional Branch Script Functions === + * + * These are newly added JavaScript functions that return a true/false value. + * The functions are best used with the Conditional Branch script input field. + * + * --- + * + * isQuestObjectiveCompleted(questKey, objectiveID) + * + * - Returns a true/false value depending on the selected quest's objective + * and if it is completed. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Replace 'objectiveID' with the numeric ID of the quest objective you want + * to check. + * - Example: isQuestObjectiveCompleted('Welcome', 1) + * + * --- + * + * isQuestObjectiveFailed(questKey, objectiveID) + * + * - Returns a true/false value depending on the selected quest's objective + * and if it is failed. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Replace 'objectiveID' with the numeric ID of the quest objective you want + * to check. + * - Example: isQuestObjectiveFailed('Welcome', 1) + * + * --- + * + * isQuestObjectiveUncleared(questKey, objectiveID) + * + * - Returns a true/false value depending on the selected quest's objective + * and if it is uncleared. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Replace 'objectiveID' with the numeric ID of the quest objective you want + * to check. + * - Example: isQuestObjectiveUncleared('Welcome', 1) + * + * --- + * + * isQuestRewardClaimed(questKey, rewardID) + * + * - Returns a true/false value depending on the selected quest's reward + * and if it is claimed. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Replace 'objectiveID' with the numeric ID of the quest reward you want + * to check. + * - Example: isQuestRewardClaimed('Welcome', 1) + * + * --- + * + * isQuestRewardDenied(questKey, rewardID) + * + * - Returns a true/false value depending on the selected quest's reward + * and if it is denied. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Replace 'objectiveID' with the numeric ID of the quest reward you want + * to check. + * - Example: isQuestRewardDenied('Welcome', 1) + * + * --- + * + * isQuestRewardUnclaimed(questKey, rewardID) + * + * - Returns a true/false value depending on the selected quest's reward + * and if it is unclaimed. + * - Replace 'questKey' with the 'Quest ID Key' of the desired quest to gather + * data from. You can find out what the 'Quest ID Key' is in the plugin's + * parameters > Quest Categories > target category > Quests > selected quest + * > Quest ID Key. + * - Insert quotes around the 'questKey' to ensure it works. + * - Replace 'objectiveID' with the numeric ID of the quest reward you want + * to check. + * - Example: isQuestRewardUnclaimed('Welcome', 1) + * + * --- + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * The following are notetags that have been added through this plugin. These + * notetags will not work with your game if this plugin is OFF or not present. + * + * --- + * + * === Action Tracking-Related Notetags === + * + * --- + * + * <Variable id On Use: +x> + * <Variable id On Use: -x> + * + * - Used for: Skill, Item Notetags + * - Whenever any actor uses this specific skill or item, increase or decrease + * the target variable by a certain amount. + * - Replace 'id' with the Variable ID you wish to alter. + * - Replace 'x' with the increase or decrease in value for the variable. + * + * --- + * + * === Enemy Tracking-Related Notetags === + * + * --- + * + * <Variable id On Death: +x> + * <Variable id On Death: -x> + * + * - Used for: Enemy Notetags + * - Whenever this specific enemy dies, increase or decrease the target + * variable by a certain amount. + * - Replace 'id' with the Variable ID you wish to alter. + * - Replace 'x' with the increase or decrease in value for the variable. + * + * --- + * + * === Item Tracking-Related Notetags === + * + * --- + * + * <Variable id On Gain: +x> + * <Variable id On Gain: -x> + * + * - Used Item, Weapon, Armor Notetags + * - Whenever the party gains the specific item, weapon, or armor, increase or + * decrease the target variable by a certai amount. + * - Replace 'id' with the Variable ID you wish to alter. + * - Replace 'x' with the increase or decrease in value for the variable. + * + * --- + * + * <Variable id On Lose: +x> + * <Variable id On Lose: -x> + * + * - Used Item, Weapon, Armor Notetags + * - Whenever the party loses the specific item, weapon, or armor, increase or + * decrease the target variable by a certai amount. + * - Replace 'id' with the Variable ID you wish to alter. + * - Replace 'x' with the increase or decrease in value for the variable. + * + * --- + * + * <Track With Variable id> + * + * - Used Item, Weapon, Armor Notetags + * - Whenever there is a change made to the specific item, weapon, or armor, + * set the value of the target variable to the number of items owned. + * - Replace 'id' with the Variable ID you wish to alter. + * + * --- + * + * ============================================================================ + * Plugin Commands + * ============================================================================ + * + * The following are Plugin Commands that come with this plugin. They can be + * accessed through the Plugin Command event command. + * + * --- + * + * === Quest Plugin Commands === + * + * --- + * + * Quest: Add/Complete/Fail/Remove + * - Adds quest(s) to be known/completed/failed. + * - Or removes them. + * + * Quest Keys: + * - Insert the quest key(s) here. + * - Each quest key must be unique. + * + * Status: + * - Change the status to this. + * - Add to Known + * - Add to Completed + * - Add to Failed + * - Remove from All + * + * --- + * + * Quest: Description Change + * - Changes the description of the quest(s) to a ID. + * + * Quest Keys: + * - Insert the quest key(s) here. + * - Each quest key must be unique. + * + * Description ID: + * - Change the description of the quest(s) to a different ID. + * - You may use JavaScript code. + * + * --- + * + * Quest: Objectives Change + * - Changes the objective(s) status of the quest(s). + * + * Quest Keys: + * - Insert the quest key(s) here. + * - Each quest key must be unique. + * + * Objective ID(s): + * - Select the objective ID(s) to change. + * - You may use JavaScript code. + * + * Status: + * - Change the status of the objective(s) to this. + * - Show Objective(s) + * - Complete Objective(s) + * - Fail Objective(s) + * - Remove Objective(s) + * + * --- + * + * Quest: Quote Change + * - Changes the quote of the quest(s) to a ID. + * + * Quest Keys: + * - Insert the quest key(s) here. + * - Each quest key must be unique. + * + * Subtext ID: + * - Change the quote of the quest(s) to a different ID. + * - You may use JavaScript code. + * + * --- + * + * Quest: Rewards Change + * - Changes the reward(s) status of the quest(s). + * + * Quest Keys: + * - Insert the quest key(s) here. + * - Each quest key must be unique. + * + * Reward ID(s): + * - Select the reward ID(s) to change. + * - You may use JavaScript code. + * + * Status: + * - Change the status of the reward(s) to this. + * - Show Reward(s) + * - Claim Reward(s) + * - Deny Reward(s) + * - Remove Reward(s) + * + * --- + * + * Quest: Subtext Change + * - Changes the subtext of the quest(s) to a ID. + * + * Quest Keys: + * - Insert the quest key(s) here. + * - Each quest key must be unique. + * + * Subtext ID: + * - Change the subtext of the quest(s) to a different ID. + * - You may use JavaScript code. + * + * --- + * + * === Tracker Plugin Commands === + * + * --- + * + * Tracker: Change Quest + * - Changes the tracked quest. + * + * Quest Key: + * - Insert the quest key here. + * + * --- + * + * Tracker: Refresh Window + * - Refreshes the quest tracker window. + * + * --- + * + * Tracker: Show/Hide Window + * - Can forcefully hide window. + * - Showing will depend on the player's Options setting. + * + * Show/Hide?: + * - Shows/hides the tracker window on the map. + * + * --- + * + * === System Plugin Commands === + * + * --- + * + * System: Call Scene_Quest + * - Opens Scene_Quest for the player. + * - Does not work in battle. + * + * --- + * + * System: Enable Quests in Menu? + * - Enables/disables quest menu inside the main menu. + * + * Enable/Disable?: + * - Enables/disables quest menu inside the main menu. + * + * --- + * + * System: Show Quests in Menu? + * - Shows/hides quest menu inside the main menu. + * + * Show/Hide?: + * - Shows/hides quest menu inside the main menu. + * + * --- + * + * ============================================================================ + * Plugin Parameters: General Settings + * ============================================================================ + * + * The general settings determine various aspects of the Quest System plugin + * from the quests that appear at the start of the game to how it's displayed + * inside menus. + * + * --- + * + * Starting Quests + * + * Known Quests: + * - Which quests are known at the start of the game? + * - Insert their keys here. + * + * Completed Quests: + * - Which quests are completed at the start of the game? + * - Insert their keys here. + * + * Failed Quests: + * - Which quests are failed at the start of the game? + * - Insert their keys here. + * + * Tracked Quest: + * - Which quest is tracked at the start of the game? + * + * --- + * + * Scene_Quest + * + * --- + * + * Scene_Quest > Background Settings: + * + * Snapshop Opacity: + * - Snapshot opacity for the scene. + * + * Background 1: + * - Filename used for the bottom background image. + * - Leave empty if you don't wish to use one. + * + * Background 2: + * - Filename used for the upper background image. + * - Leave empty if you don't wish to use one. + * + * --- + * + * Scene_Quest > Vocab + * + * --- + * + * Scene_Quest > Vocab > Command Window + * + * Command: Known: + * - Text used to display known quests. + * + * Command: Completed: + * - Text used to display completed quests. + * + * Command: Failed: + * - Text used to display failed quests. + * + * --- + * + * Scene_Quest > Vocab > Label Window + * + * Empty Title: + * - Text displayed in the Label Window when no quest is selected. + * + * --- + * + * Scene_Quest > Vocab > List Window + * + * Open Categories: + * - Text format for an open category. + * - %1 - Category Name, %2 - Quest Amount + * + * Closed Categories: + * - Text format for a closed category. + * - %1 - Category Name, %2 - Quest Amount + * + * No Quest Listed: + * - Text when no quest is listed. + * + * Tracked Quest: + * - Text format for a tracked quest. + * - %1 - Tracked Quest's Name + * + * --- + * + * Scene_Quest > Vocab > Log Window + * + * Empty Message: + * - Text displayed when no quest is selected. + * + * JS: On Load: + * - Runs code upon making the empty message. + * - Useful for setting up variables. + * + * Quest Log: + * - Text format for Quest Log Window. + * - Instructions: + * - Insert the [[Keyword]] marks in the text where you want certain parts + * of the quest to appear. + * + * - [[Title]] - Inserts the title of the quest. + * + * - [[Difficulty]] - Inserts the quest difficulty text. + * + * - [[From]] - Inserts the quest origin text. + * + * - [[Location]] - Inserts the quest location text. + * + * - [[Description]] - Inserts the currently active quest description. + * - The quest description can change depending on which Description ID + * is currently active for that quest. + * + * - [[Objectives]] - Inserts a list of the visible quest objectives. + * - The quest objectives visible to the player will be determined by + * the quest's Visible Objectives settings and any Plugin Commands + * used to alter which objectives are visible and what state they are + * currently in (known, completed, failed). + * + * - [[Rewards]] - Inserts a list of visible quest rewards. + * - The quest rewards visible to the player will be determined by the + * quest's Visible Rewards settings and any Plugin Commands used to + * alter which rewards are visible and what state they are currently + * in (known, claimed, denied). + * + * - [[Subtext]] - Inserts the currently active quest subtext. + * - The quest subtext can change depending on which Subtext ID is + * currently active for that quest. + * + * - [[Quote]] - Inserts the currently active quest quote. + * - The quest quote can change depending on which Quote ID is + * currently active for that quest. + * + * Objective (Known): + * - Text format for known objectives. + * - %1 - Objective Text + * + * Objective (Done): + * - Text format for complete objectives. + * - %1 - Objective Text + * + * Objective (Failed): + * - Text format for failed objectives. + * - %1 - Objective Text + * + * Reward (Known): + * - Text format for normal rewards. + * - %1 - Reward Text + * + * Reward (Claimed): + * - Text format for claimed rewards. + * - %1 - Reward Text + * + * Reward (Denied): + * - Text format for denied rewards. + * - %1 - Reward Text + * + * --- + * + * Scene_Quest > Vocab > Button Assist Window + * + * Scroll Up/Down: + * - Text for Page Up/Down to scroll log window. + * - Requires VisuMZ_0_CoreEngine! + * + * Tracker: + * - Text for tracking quests. + * - Requires VisuMZ_0_CoreEngine! + * + * Expand: + * - Text for expanding categories. + * - Requires VisuMZ_0_CoreEngine! + * + * Collapse: + * - Text for collapsing categories. + * - Requires VisuMZ_0_CoreEngine! + * + * --- + * + * Scene_Quest > Icons + * + * Icon: Known: + * - Icon used for this command. + * + * Icon: Completed: + * - Icon used for this command. + * + * Icon: Failed: + * - Icon used for this command. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Quest Category Settings + * ============================================================================ + * + * Quest Categories separate the quest types in your game. These can be used to + * help players differentiate which are story-driven quests, which are optional + * quests, recurring quests, etc. These have limited settings, but serve as + * containers for quests that fall under its category. + * + * --- + * + * Category + * + * Category Name: + * - This category's name. + * - You may use text codes. + * + * Quests: + * - A list of quests listed under this category. + * - Quests will be listed in the same order as this parameter. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Quest Settings + * ============================================================================ + * + * Each Quest Category will contain a list of quests that can appear in-game. + * These individual quests make up the meat and bones of the Quest System and + * will serve to relay information to the player on what he/she needs to do in + * order to make progress in your game. + * + * --- + * + * Quest + * + * Quest ID Key: + * - This quest's identification key. Quests require unique keys for the + * plugin to differentiate them. + * - It is VERY important that you keep this key unique from other quests in + * order for the Quest System to operate properly in your game. + * + * --- + * + * Header + * + * Title: + * - The title of the quest. This is what appears in-game. + * - You may use text codes. + * - In Plugin Parameters => General => Vocab => Log Window => Quest Log, + * this will replace the [[Title]] marker. + * + * Difficulty: + * - Difficulty level for this quest. + * - You may use text codes. + * - In Plugin Parameters => General => Vocab => Log Window => Quest Log, + * this will replace the [[Difficulty]] marker. + * + * From: + * - Insert the name of the one who issued this quest. + * - You may use text codes. + * - In Plugin Parameters => General => Vocab => Log Window => Quest Log, + * this will replace the [[From]] marker. + * + * Location: + * - Insert location name where this quest was issued. + * - You may use text codes. + * - In Plugin Parameters => General => Vocab => Log Window => Quest Log, + * this will replace the [[Location]] marker. + * + * Description: + * - Type out the description(s) used for this quest. + * - You may use text codes. + * - In Plugin Parameters => General => Vocab => Log Window => Quest Log, + * this will replace the [[Description]] marker. + * - The displayed description will depend on the Description ID set through + * Plugin Command. + * - If no Description ID is set through Plugin Commands, it will default to + * a default ID value of 1. + * + * --- + * + * Lists + * + * Objectives List: + * - The objectives to be completed for this quest. + * - You may use text codes. + * - In Plugin Parameters => General => Vocab => Log Window => Quest Log, + * this will replace the [[Objectives]] marker. + * - Depending on which ID's are set to visible, a list will created at the + * marker displaying each of the objectives. + * - This can be done thorugh the Visible Objectives parameter or through + * Plugin Commands. + * + * Visible Objectives: + * - The objectives that are visible from the start. + * + * Rewards List: + * - The reward list for this quest. + * - You may use text codes. + * - In Plugin Parameters => General => Vocab => Log Window => Quest Log, + * this will replace the [[Rewards]] marker. + * - Depending on which ID's are set to visible, a list will created at the + * marker displaying each of the rewards. + * - This can be done thorugh the Visible Rewards parameter or through + * Plugin Commands. + * + * Visible Rewards: + * - The rewards that are visible from the start. + * + * --- + * + * Footer + * + * Subtext: + * - Subtext to be displayed with the quest. + * - You may use text codes. + * - In Plugin Parameters => General => Vocab => Log Window => Quest Log, + * this will replace the [[Subtext]] marker. + * - The displayed description will depend on the Subtext ID set through + * Plugin Command. + * - If no Subtext ID is set through Plugin Commands, it will default to + * a default ID value of 1. + * + * Quotes: + * - Quotes to be displayed with the quest. + * - You may use text codes. + * - In Plugin Parameters => General => Vocab => Log Window => Quest Log, + * this will replace the [[Quote]] marker. + * - The displayed description will depend on the Quote ID set through + * Plugin Command. + * - If no Quote ID is set through Plugin Commands, it will default to + * a default ID value of 1. + * + * --- + * + * JavaScript + * + * JS: On Load: + * - Runs code upon loading the quest in Scene_Quest. + * - Useful for setting up variables. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Quest Tracker Settings + * ============================================================================ + * + * The Quest Tracker Window is a window that appears on the map scene to + * display the objectives (and other desired information) of the currently + * tracked quest decided by the player. + * + * --- + * + * General + * + * Tracker Format: + * - Text format for Quest Tracker Window. + * - Read help file for instructions. + * + * --- + * + * Options + * + * Adjust Window Height: + * - Automatically adjust the options window height? + * + * Add Show Tracker?: + * - Add the 'Show Tracker' option to the Options menu? + * + * Option Name: + * - Command name of the option. + * + * Add Position Tracker?: + * - Add the 'Position Tracker' option to the Options menu? + * + * Option Name: + * - Command name of the option. + * + * Option OFF: + * - Text displayed when the option is OFF. + * + * Option ON: + * - Text displayed when the option is ON. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Main Menu Settings + * ============================================================================ + * + * Set up the main menu defaults. + * + * --- + * + * Main Menu Settings + * + * Command Name: + * - Name of the 'Quest' option in the Main Menu. + * + * Show in Main Menu?: + * - Add the 'Quest' option to the Main Menu by default? + * + * Enable in Main Menu?: + * - Enable the 'Quest' option to the Main Menu by default? + * + * --- + * + * ============================================================================ + * Plugin Parameters: Background Settings + * ============================================================================ + * + * Background settings for Scene_Quest. + * + * --- + * + * Background Settings + * + * Snapshop Opacity: + * - Snapshot opacity for the scene. + * + * Background 1: + * - Filename used for the bottom background image. + * - Leave empty if you don't wish to use one. + * + * Background 2: + * - Filename used for the upper background image. + * - Leave empty if you don't wish to use one. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Window Settings + * ============================================================================ + * + * These settings let you control the various windows that appear in the + * Scene_Quest menu and the Quest Tracker Window that appears in Scene_Map. + * + * --- + * + * Command Window + * + * Show Failed Quests?: + * - Show/hide Failed Quests in the command window. + * + * Style: + * - How do you wish to draw commands in the Command Window? + * - Text Only: Display only the text. + * - Icon Only: Display only the icon. + * - Icon + Text: Display the icon first, then the text. + * - Auto: Determine which is better to use based on the size of the cell. + * + * Text Align: + * - Text alignment for the Command Window. + * + * Background Type: + * - Select background type for this window. + * + * JS: X, Y, W, H: + * - Code used to determine the dimensions for this window. + * + * --- + * + * Quest Label + * + * Background Type: + * - Select background type for this window. + * + * JS: X, Y, W, H: + * - Code used to determine the dimensions for this window. + * + * --- + * + * Log Window + * + * PageUp/Down Speed: + * - Scroll speed for PageUp/Down. + * + * Background Type: + * - Select background type for this window. + * + * JS: X, Y, W, H: + * - Code used to determine the dimensions for this window. + * + * EXPERIMENTAL: + * + * Automatic Word Wrap?: + * - Enables/disables automatic word wrap. + * - Requires VisuMZ_1_MessageCore! + * - This feature is experimental. Word Wrap does not worth perfectly + * with the Log Window, although it performs well enough. This feature + * will be updated and completed at a later point in the future. Use it + * at your own discretion. + * + * --- + * + * List Window + * + * Background Type: + * - Select background type for this window. + * + * JS: X, Y, W, H: + * - Code used to determine the dimensions for this window. + * + * --- + * + * Tracker Window + * + * Window Scale: + * - How much do you want to scale the Tracker Window's size by? + * + * Background Type: + * - Select background type for this window. + * + * JS: X, Y, W, H: + * - Code used to determine the dimensions for this window. + * + * --- + * + * ============================================================================ + * JavaScript Functions + * ============================================================================ + * + * These are some new JavaScript functions that you can use for the + * 'JS: On Load' Plugin Parameter found in the Quest settings. + * + * Using these require you to have an adequate understanding of how JavaScript + * works in order to successfully use it. + * + * --- + * + * $gameSystem.setQuestStatus(key, status) + * - Changes the quest's completion status. + * - Replace 'key' with Quest Key (include quotes). + * - Replace 'status' with one of the following strings (include quotes): + * - 'known' + * - 'completed' + * - 'failed' + * - 'removed' + * + * Example: $gameSystem.setQuestStatus('exampleName', 'completed') + * + * --- + * + * $gameSystem.setQuestDescription(key, id) + * - Changes the quest's description. + * - Replace 'key' with Quest Key (include quotes). + * - Replace 'id' with description ID to use. + * + * Example: $gameSystem.setQuestDescription('exampleName', 2) + * + * --- + * + * $gameSystem.setQuestObjectives(key, ids, status) + * - Changes the quest's objectives. + * - Replace 'key' with Quest Key (include quotes). + * - Replace 'ids' with an array of ID's to use. + * - Replace 'status' with one of the following strings (include quotes): + * - 'known' + * - 'completed' + * - 'failed' + * - 'removed' + * + * Example: $gameSystem.setQuestDescription('exampleName', [1, 2, 3], 'failed') + * + * --- + * + * $gameSystem.setQuestRewards(key, ids, status) + * - Changes the quest's rewards. + * - Replace 'key' with Quest Key (include quotes). + * - Replace 'ids' with an array of ID's to use. + * - Replace 'status' with one of the following strings (include quotes): + * - 'known' + * - 'claimed' + * - 'denied' + * - 'removed' + * + * Example: $gameSystem.setQuestRewards('exampleName', [1, 3, 5], 'claimed') + * + * --- + * + * $gameSystem.setQuestSubtext(key, id) + * - Changes the quest's subtext. + * - Replace 'key' with Quest Key (include quotes). + * - Replace 'id' with subtext ID to use. + * + * Example: $gameSystem.questSubtext('exampleName', 3) + * + * --- + * + * $gameSystem.setQuestQuote(key, id) + * - Changes the quest's quote. + * - Replace 'key' with Quest Key (include quotes). + * - Replace 'id' with quote ID to use. + * + * Example: $gameSystem.setQuestQuote('exampleName', 4) + * + * --- + * + * DISCLAIMER: + * + * Keep in mind that VisuStella is NOT responsible for your proficiency (or + * otherwise) of JavaScript. + * + * If you get any errors with the custom code, it is up to YOU to fix it. + * + * If you do not understand how any of this section works, do not be afraid. + * It's not the end of the world. + * + * You can still change the status of the quests and its objectives through the + * usage of Plugin Commands. + * + * --- + * + * ============================================================================ + * Terms of Use + * ============================================================================ + * + * 1. These plugins may be used in free or commercial games provided that they + * have been acquired through legitimate means at VisuStella.com and/or any + * other official approved VisuStella sources. Exceptions and special + * circumstances that may prohibit usage will be listed on VisuStella.com. + * + * 2. All of the listed coders found in the Credits section of this plugin must + * be given credit in your games or credited as a collective under the name: + * "VisuStella". + * + * 3. You may edit the source code to suit your needs, so long as you do not + * claim the source code belongs to you. VisuStella also does not take + * responsibility for the plugin if any changes have been made to the plugin's + * code, nor does VisuStella take responsibility for user-provided custom code + * used for custom control effects including advanced JavaScript notetags + * and/or plugin parameters that allow custom JavaScript code. + * + * 4. You may NOT redistribute these plugins nor take code from this plugin to + * use as your own. These plugins and their code are only to be downloaded from + * VisuStella.com and other official/approved VisuStella sources. A list of + * official/approved sources can also be found on VisuStella.com. + * + * 5. VisuStella is not responsible for problems found in your game due to + * unintended usage, incompatibility problems with plugins outside of the + * VisuStella MZ library, plugin versions that aren't up to date, nor + * responsible for the proper working of compatibility patches made by any + * third parties. VisuStella is not responsible for errors caused by any + * user-provided custom code used for custom control effects including advanced + * JavaScript notetags and/or plugin parameters that allow JavaScript code. + * + * 6. If a compatibility patch needs to be made through a third party that is + * unaffiliated with VisuStella that involves using code from the VisuStella MZ + * library, contact must be made with a member from VisuStella and have it + * approved. The patch would be placed on VisuStella.com as a free download + * to the public. Such patches cannot be sold for monetary gain, including + * commissions, crowdfunding, and/or donations. + * + * 7. If this VisuStella MZ plugin is a paid product, all project team members + * must purchase their own individual copies of the paid product if they are to + * use it. Usage includes working on related game mechanics, managing related + * code, and/or using related Plugin Commands and features. Redistribution of + * the plugin and/or its code to other members of the team is NOT allowed + * unless they own the plugin itself as that conflicts with Article 4. + * + * 8. Any extensions and/or addendums made to this plugin's Terms of Use can be + * found on VisuStella.com and must be followed. + * + * ============================================================================ + * Credits + * ============================================================================ + * + * If you are using this plugin, credit the following people in your game: + * + * Team VisuStella + * - Yanfly + * - Arisu + * - Olivia + * - Irina + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.13: March 10, 2022 + * * Compatibility Update + * ** Plugins should be more compatible with one another. + * + * Version 1.12: July 9, 2021 + * * Feature Update! + * ** Improved calculations for determining window size. Update made by Irina. + * + * Version 1.11: January 15, 2021 + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * New Feature! + * ** Added new [[Marker]] to Quest Log format and Quest Tracker formats. + * *** [[RawTitle]] - Inserts the title of the quest without any text codes + * removed. Keep in mind that icons do NOT resize based on the text size. + * + * Version 1.10: December 11, 2020 + * * Bugs Fixed! + * ** Quest tracking should now automatically remove itself once a quest is + * dubbed complete, failed, or removed. Fix made by Yanfly. + * + * Version 1.09: November 29, 2020 + * * Bug Fixed! + * ** The Button Assist Window will now properly display the text for expanding + * and collapsing quest categories. Fix made by Arisu. + * + * Version 1.08: November 15, 2020 + * * Optimization Update! + * ** Plugin should run more optimized. + * + * Version 1.07: November 1, 2020 + * * Documentation Update! + * ** Added documentation for new feature(s)! + * * Feature Updates! + * ** When multiple parallel events are occuring, they will no longer cause lag + * by inducing multiple refreshes at a time. Update by Olivia. + * * New Features! + * ** New Plugin Parameter added by Irina! + * *** Plugin Parameters > Quest Tracker Settings > Tracker Format + * **** Text format for Quest Tracker Window. This lets you customize the text + * that appears in the Quest Tracker instead of just having the title and + * the objectives. + * + * Version 1.06: October 25, 2020 + * * Feature Update! + * ** If Message Core is not detected, <ColorLock> and </ColorLock> notetags + * will be automatically removed. Added by Arisu. + * + * Version 1.05: October 11, 2020 + * * Documentation Update! + * ** "Control Variable and Conditional Branch Usage" section added for those + * who wish to gather data for the script input fields of the mentioned + * event commands. + * + * Version 1.04: October 4, 2020 + * * Bug Fixes! + * ** Quest Tracker window refreshes should no longer cause infinite loops when + * used with specific script calls. Fix made by Yanfly. + * + * Version 1.03: September 20, 2020 + * * Documentation Update! + * ** For all the new features! + * * New Features! + * ** New notetags added by Olivia! + * ** <Variable id On Death: +x> and <Variable id On Death: -x> for enemies. + * ** <Variable id On Gain: +x> and <Variable id On Gain: -x> for items, + * weapons, and armors. + * ** <Variable id On Lose: +x> and <Variable id On Lose: -x> for items, + * weapons, and armors. + * ** <Track With Variable id> for items, weapons, and armors. + * ** <Variable id On Use: +x> and <Variable id On Use: -x> for items & skills. + * + * Version 1.02: September 13, 2020 + * * Bugs Fixed!: + * ** Quest Tracker Window should no longer flicker. + * + * Version 1.01: September 6, 2020 + * * Bug Fixed! + * ** Disabled track windows no longer appear on the screen for one frame after + * leaving a menu of any sort. Fix made by Yanfly. + * ** Viewing the failed quests no longer crash the game. Fix made by Yanfly. + * * Feature Update! + * ** The following Plugin Commands will now automatically update the tracker + * if needed. Feature update by Yanfly. + * *** Quest: Add/Complete/Fail/Remove + * *** Quest: Description Change + * *** Quest: Objectives Change + * *** Quest: Quote Change + * *** Quest: Rewards Change + * *** Quest: Subtext Change + * + * Version 1.00: August 31, 2020 + * * Finished Plugin! + * + * ============================================================================ + * End of Helpfile + * ============================================================================ + * + * @ -------------------------------------------------------------------------- + * + * @command QuestSet + * @text Quest: Add/Complete/Fail/Remove + * @desc Adds quest(s) to be known/completed/failed. + * Or removes them. + * + * @arg Keys:arraystr + * @text Quest Keys + * @type string[] + * @desc Insert the quest key(s) here. + * Each quest key must be unique. + * @default [] + * + * @arg Status:str + * @text Status + * @type select + * @option Add to Known + * @value known + * @option Add to Completed + * @value completed + * @option Add to Failed + * @value failed + * @option Remove from All + * @value remove + * @desc Change the status to this. + * @default known + * + * @ -------------------------------------------------------------------------- + * + * @command QuestDescription + * @text Quest: Description Change + * @desc Changes the description of the quest(s) to a ID. + * + * @arg Keys:arraystr + * @text Quest Keys + * @type string[] + * @desc Insert the quest key(s) here. + * Each quest key must be unique. + * @default [] + * + * @arg TargetID:eval + * @text Description ID + * @desc Change the description of the quest(s) to a different ID. + * You may use JavaScript code. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command QuestObjectives + * @text Quest: Objectives Change + * @desc Changes the objective(s) status of the quest(s). + * + * @arg Keys:arraystr + * @text Quest Keys + * @type string[] + * @desc Insert the quest key(s) here. + * Each quest key must be unique. + * @default [] + * + * @arg TargetIDs:arrayeval + * @text Objective ID(s) + * @type string[] + * @desc Select the objective ID(s) to change. + * You may use JavaScript code. + * @default ["1"] + * + * @arg Status:str + * @text Status + * @type select + * @option Show Objective(s) + * @value show + * @option Complete Objective(s) + * @value complete + * @option Fail Objective(s) + * @value fail + * @option Remove Objective(s) + * @value remove + * @desc Change the status of the objective(s) to this. + * @default show + * + * @ -------------------------------------------------------------------------- + * + * @command QuestQuote + * @text Quest: Quote Change + * @desc Changes the quote of the quest(s) to a ID. + * + * @arg Keys:arraystr + * @text Quest Keys + * @type string[] + * @desc Insert the quest key(s) here. + * Each quest key must be unique. + * @default [] + * + * @arg TargetID:eval + * @text Quote ID + * @desc Change the quote of the quest(s) to a different ID. + * You may use JavaScript code. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command QuestRewards + * @text Quest: Rewards Change + * @desc Changes the reward(s) status of the quest(s). + * + * @arg Keys:arraystr + * @text Quest Keys + * @type string[] + * @desc Insert the quest key(s) here. + * Each quest key must be unique. + * @default [] + * + * @arg TargetIDs:arrayeval + * @text Reward ID(s) + * @type string[] + * @desc Select the reward ID(s) to change. + * You may use JavaScript code. + * @default ["1"] + * + * @arg Status:str + * @text Status + * @type select + * @option Show Reward(s) + * @value show + * @option Claim Reward(s) + * @value claim + * @option Deny Reward(s) + * @value deny + * @option Remove Reward(s) + * @value remove + * @desc Change the status of the reward(s) to this. + * @default show + * + * @ -------------------------------------------------------------------------- + * + * @command QuestSubtext + * @text Quest: Subtext Change + * @desc Changes the subtext of the quest(s) to a ID. + * + * @arg Keys:arraystr + * @text Quest Keys + * @type string[] + * @desc Insert the quest key(s) here. + * Each quest key must be unique. + * @default [] + * + * @arg TargetID:eval + * @text Subtext ID + * @desc Change the subtext of the quest(s) to a different ID. + * You may use JavaScript code. + * @default 1 + * + * @ -------------------------------------------------------------------------- + * + * @command TrackerChangeQuest + * @text Tracker: Change Quest + * @desc Changes the tracked quest. + * + * @arg Key:str + * @text Quest Key + * @desc Insert the quest key here. + * @default Example + * + * @ -------------------------------------------------------------------------- + * + * @command TrackerRefreshWindow + * @text Tracker: Refresh Window + * @desc Refreshes the quest tracker window. + * + * @ -------------------------------------------------------------------------- + * + * @command TrackerShowHide + * @text Tracker: Show/Hide Window + * @desc Can forcefully hide window. + * Showing will depend on the player's Options setting. + * + * @arg Show:eval + * @text Show/Hide? + * @type boolean + * @on Enable + * @off Disable + * @desc Shows/hides the tracker window on the map. + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command SystemCallSceneQuest + * @text System: Call Scene_Quest + * @desc Opens Scene_Quest for the player. + * Does not work in battle. + * + * @ -------------------------------------------------------------------------- + * + * @command SystemEnableQuestMenu + * @text System: Enable Quests in Menu? + * @desc Enables/disables quest menu inside the main menu. + * + * @arg Enable:eval + * @text Enable/Disable? + * @type boolean + * @on Enable + * @off Disable + * @desc Enables/disables quest menu inside the main menu. + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @command SystemShowQuestMenu + * @text System: Show Quests in Menu? + * @desc Shows/hides quest menu inside the main menu. + * + * @arg Show:eval + * @text Show/Hide? + * @type boolean + * @on Show + * @off Hide + * @desc Shows/hides quest menu inside the main menu. + * @default true + * + * @ -------------------------------------------------------------------------- + * + * @ ========================================================================== + * @ Plugin Parameters + * @ ========================================================================== + * + * @param BreakHead + * @text -------------------------- + * @default ---------------------------------- + * + * @param QuestSystem + * @default Plugin Parameters + * + * @param ATTENTION + * @default READ THE HELP FILE + * + * @param BreakSettings + * @text -------------------------- + * @default ---------------------------------- + * + * @param General:struct + * @text General Settings + * @type struct<General> + * @desc General settings for the Quest System. + * @default {"StartingQuests":"","KnownQuests:arraystr":"[\"Welcome\",\"Example\",\"Plugin_Tutorial_Title\",\"Plugin_Tutorial_Difficulty\",\"Plugin_Tutorial_From\",\"Plugin_Tutorial_Description\",\"Plugin_Tutorial_Objectives\",\"Plugin_Tutorial_Rewards\",\"Plugin_Tutorial_Subtext\",\"Plugin_Tutorial_Quote\",\"Challenge_Plugin_Variables\",\"Challenge_Plugin_Switches\"]","CompletedQuests:arraystr":"[]","FailedQuests:arraystr":"[]","TrackedQuest:str":"Welcome","SceneQuest":"","Vocab":"","VocabCommandWindow":"","CommandWindow_Known_Text:str":"Available","CommandWindow_Completed_Text:str":"Completed","CommandWindow_Failed_Text:str":"Failed","VocabLabelWindow":"","EmptyTitleLabel:str":"\\i[186]Quest Journal","VocabListWindow":"","ListWindowCategoryOpenFmt:str":"- %1(%2)","ListWindowCategoryCloseFmt:str":"+ %1(%2)","NoQuestListed:str":"(No Quests Listed)","ListWindowTrackedQuest:str":"\\c[17]%1\\c[0]","VocabLogWindow":"","LogEmpty:json":"\"\\\\c[5]Main Quests\\\\c[0] are quests that must be\\ncompleted in order to progress further\\ninto the game's story.\\n\\n\\\\c[6]Side Quests\\\\c[0] are optional quests that can\\nbe completed at your discretion. Upon\\ncompleting a side quest, you can receive\\nuseful rewards that may assist you on\\nyour journey.\"","OnLoadQuestJS:func":"\"// Insert JavaScript code here.\"","LogFmt:json":"\"\\\\{[[Title]]\\\\}\\n\\\\c[4]Level:\\\\c[0] [[Difficulty]]\\n\\\\c[4]From:\\\\c[0] [[From]]\\n\\\\c[4]Location:\\\\c[0] [[Location]]\\n\\n\\\\c[4]Description:\\\\c[0]\\n[[Description]]\\n\\n\\\\c[4]Objectives:\\\\c[0]\\n[[Objectives]]\\n\\n\\\\c[4]Rewards:\\\\c[0]\\n[[Rewards]]\\n\\n[[Subtext]]\\n\\n[[Quote]]\"","Objective_Normal_Fmt:str":"◎%1","Objective_Completed_Fmt:str":"\\c[24]<ColorLock>✔%1</ColorLock>\\c[0]","Objective_Failed_Fmt:str":"\\c[25]<ColorLock>✘%1</ColorLock>\\c[0]","Reward_Normal_Fmt:str":"◎%1","Reward_Completed_Fmt:str":"\\c[24]<ColorLock>✔%1</ColorLock>\\c[0]","Reward_Failed_Fmt:str":"\\c[25]<ColorLock>✘%1</ColorLock>\\c[0]","ButtonAssistWindow":"","ButtonAssistPageUpDown:str":"Scroll Up/Down","questButtonAssistActive:str":"Track","ButtonAssistExpand:str":"Expand","ButtonAssistCollapse:str":"Collapse","CommandWindowIcons":"","CommandWindow_Known_Icon:num":"193","CommandWindow_Completed_Icon:num":"192","CommandWindow_Failed_Icon:num":"194"} + * + * @param Categories:arraystruct + * @text Quest Categories + * @type struct<Category>[] + * @desc A list of categories and their quests. + * @default ["{\"CategoryName:str\":\"\\\\C[5]Main Quests\",\"Quests:arraystruct\":\"[\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Welcome\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[87]Welcome Quest\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Easy\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Thank you for using the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Quest System\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nplugin made by \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]VisuStella MZ\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nThis is an example quest to demonstrate\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nhow the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Quest System\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] works. It functions\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nprimarily as a log book for the various\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nadventures inside your game.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Lists\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Objectives:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Take a look at the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Quest\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] menu.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Change \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]tracked quest\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] to something else.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleObjectives:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Rewards:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[186]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Quest System\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] for your game!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[84]Helping support \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]VisuStella\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleRewards:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Footer\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Subtext:arrayjson\\\\\\\":\\\\\\\"[]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Example\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[87]Example Quest\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Easy\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"This is where the quest \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ngoes. Type in whatever text you need\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nhere in order to explain to the player\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nabout the quest.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Lists\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Objectives:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Describe each of the quest \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]objectives\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nhere for the player.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can have multiple quest \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]objectives\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nout at once.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"If you do, make sure you have the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Visible Objectives\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] list the ID's of\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthe objectives you want visible from\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthe very beginning.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleObjectives:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"3\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Rewards:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Here, you can list all the rewards the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ngame will give the player upon the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncompletion of the quest.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can list the rewards however you\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nlike, but do keep it concise.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can list multiple rewards, too.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"If you do, make sure you have the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Visible Rewards\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] list the ID's of the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nrewards you want visible from the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvery beginning.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleRewards:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"3\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"4\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Footer\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Subtext:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"This is a \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]subtext\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]. It is used as extra\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ntext that you may want to place on your\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nquest journal that differs from the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"We learn by example and by direct\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nexperience because there are real limits\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nto the adequacy of verbal instruction.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n~Malcolm Gladwell\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\"\\\\\\\"}\\\"]\"}","{\"CategoryName:str\":\"\\\\c[6]Side Quests\",\"Quests:arraystruct\":\"[\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Plugin_Tutorial_Title\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[193]Titles\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Easy\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"The quest's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]title\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] is listed in three\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ndifferent places in the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Quest Scene\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n1. The top of the screen.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n2. The top of the quest log entry.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n3. The quest list on the side.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nBe sure to put some thought in deciding\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nyour titles as they are there to convey\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nwhat the quest is all about.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Lists\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Objectives:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Change the title through the quest's\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\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er\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Subtext:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can use icons in the quest title by\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nusing the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[x]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] text code. Keep in mind\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthat the icon will be removed from the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nquest log entry.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"A good title is the title of a\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nsuccessful book.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n~Raymond Chandler\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Plugin_Tutorial_Difficulty\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[193]Difficulty\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Easy\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"A quest's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]difficulty\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] can be used to\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nconvey what kinds of expectations they\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nshould have regarding challenge.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nThese can range from star ratings like:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[87]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[87]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[88]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Rewards:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[79]Mastery of \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Parameter\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Difficulty\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleRewards:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Footer\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Subtext:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"A quest's difficulty is often used to\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nrelay the expected level of conflict a\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nplayer may face.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"A pessimist sees the difficulty in\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nevery opportunity; an optimist sees the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nopportunity in every difficulty.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n~Winston Churchill\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Plugin_Tutorial_From\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[193]From\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Easy\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Explaining which \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]NPC\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] the quest is from\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncan help remind the player its origin\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nand also help save the player some time\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nin trying to find that \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]NPC\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] again when\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ngoing to claim the quest \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]rewards\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Lists\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Objectives:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Change the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"from\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" text through the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nquest's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]From\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Parameter\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\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nstreamline your player's experience.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"More important than the quest for\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncertainty is the quest for clarity.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n~Francois Gautier\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Plugin_Tutorial_Description\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[193]Descriptions\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Medium\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Insert the quest's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] here.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nThe displayed \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]quest description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] will\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ndepend on the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Description ID\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] that is\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncurrently active for the quest.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"This is the updated quest description. This\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncan only be seen when it is Description ID #2.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Lists\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Objectives:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can change the Description ID by\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nusing the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Quest: Description Change\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\c[0]:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[79]Mastery of \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Command\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Quest: Description Change\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleRewards:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Footer\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Subtext:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Descriptions are valuable tools that can\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nbe used to help remind the player the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\npurpose of the quest.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Description begins in the writer's\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nimagination but should finish in the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nreader's.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n~Stephen King\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Plugin_Tutorial_Objectives\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[193]Objectives\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Medium-Hard\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Quest \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]objectives\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] are used to streamline\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthe goals the player needs to achieve in\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\norder to make progress.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Lists\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Objectives:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can change the status of each\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Quest Objective\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] to \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Known\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0], \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[24]Completed\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0],\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nor \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[25]Failed\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can also \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]remove\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] objectives from\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nbeing viewed.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can determine the default \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]quest\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nobjectives\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] through the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Visible\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nObjectives \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Parameter\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can reveal new \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]quest objectives\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthrough the use of \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Command\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Quest: Objectives Change\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]The following are examples:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Known Objective\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Completed Objective\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Failed Objective\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleObjectives:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\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\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Quest: Objectives Change\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleRewards:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Footer\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Subtext:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Treat \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]quest objectives\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] like a set of\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ninstructions or outline for the player\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nto follow in order to get the desired\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nresult both of you want.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"People with objectives succeed because\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthey know where they're going.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n~Earl Nightingale\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\\nconst key = 'Plugin_Tutorial_Objectives';\\\\\\\\\\\\\\\\n$gameSystem.setQuestObjectives(key, [5], 'show');\\\\\\\\\\\\\\\\n$gameSystem.setQuestObjectives(key, [6], 'complete');\\\\\\\\\\\\\\\\n$gameSystem.setQuestObjectives(key, [7], 'fail');\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Plugin_Tutorial_Rewards\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[193]Rewards\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Medium-Hard\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Quest rewards\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] are the goodies that are\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\npromised to be given to the player upon\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] rewardsfrom\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nbeing viewed.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can determine the default \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]quest\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nrewards\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] through the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Visible\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nRewards \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Parameter\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleObjectives:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"3\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Rewards:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[79]Mastery of \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\"3\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"4\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"5\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"6\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Footer\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Subtext:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Rewards are incentives for the player to\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncomplete them, especially quests of\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nhigher difficulty levels.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Reward the behavior you want repeated.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n~Larry Winget\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\\nconst key = 'Plugin_Tutorial_Rewards';\\\\\\\\\\\\\\\\n$gameSystem.setQuestRewards(key, [4], 'show');\\\\\\\\\\\\\\\\n$gameSystem.setQuestRewards(key, [5], 'claim');\\\\\\\\\\\\\\\\n$gameSystem.setQuestRewards(key, [6], 'deny');\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Plugin_Tutorial_Subtext\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[193]Subtexts\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Medium\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"The \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]subtext\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] section can be used in a\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nnumber of ways, from hints to summaries,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nto warnings.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nAnd like the quest \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0], you can\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nchange the text displayed in the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]subtext\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthrough changing the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Subtext ID\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Lists\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Objectives:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can change the Subtext ID by\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nusing the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Quest: Subtext Change\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Parameter\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Try changing it to \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] through the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Quest: Subtext Change\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleRewards:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Footer\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Subtext:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Subtexts\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] can serve as hints, summaries,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nwarnings, reminders, you name it.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"After all, reminding a player to do\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nsomething only means you want them to\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nsucceed at it.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"A discerning eye needs only a hint, and\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nunderstatement leaves the imagination\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nfree to build its own elaborations.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n~Russell Page\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Plugin_Tutorial_Quote\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[193]Quotes\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Medium\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Quotes\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] can be used to reference specific\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nlines of dialogue that could help the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nplayer understand what's needed to be\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ndone.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nOr they could just be \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]quotes\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] made by\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\njust about anyone.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nAnd like quest \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]descriptions and quest\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]subtexts\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0], the quest quotes can also be\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nchanged to display something else based\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\non the quest's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Quote ID\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Lists\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Objectives:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You can change the Quote ID by\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nusing the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]Quest: Quote Change\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Parameter\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Try changing it to \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] through the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Command\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] see what it becomes.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleObjectives:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\"]\\\\\\\",\\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\\\"VisibleRewards:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Footer\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Subtext:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"How you want to use them is up to you.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"You miss 100% of the shots you\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ndon't take.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n~Micahel Scott\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"If at first you don't succeed, then\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nskydiving definitely isn't for you.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n~Steven Wright\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\"\\\\\\\"}\\\"]\"}","{\"CategoryName:str\":\"\\\\c[2]Challenge Quests\",\"Quests:arraystruct\":\"[\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Challenge_Plugin_Variables\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[5]Variables\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Hard\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Using the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]JS: On Load \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Parameter\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0],\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nyou can run \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]JavaScript\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] code prior to the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncreation of the text written here.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nIn this example, game variables are set\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nup to automatically equal the number of\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nof the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]first item\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] in the inventory.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nThe \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]objective\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] will automatically set\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nitself to completed if the variable's\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue is determined to be over 10.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Lists\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Objectives:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Obtain \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\v[1]/10x First Database Item!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleObjectives:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Rewards:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\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\\\\\\\\\nresponsible for your proficiency (or\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\notherwise) of \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]JavaScript\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nIf you get any errors with the custom\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncode, it is up to \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]you\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] to fix it.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nIf you do not understand how any of this\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nsection works, do not be afraid. It's\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nnot the end of the world.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nYou can still change the status of the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]quests\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] and its \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]objectives\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] through the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nusage of \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Commands\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\\nconst value = $gameParty.numItems($dataItems[1])\\\\\\\\\\\\\\\\nconst status = value >= 10 ? 'completed' : 'known';\\\\\\\\\\\\\\\\nconst key = 'Challenge_Plugin_Variables';\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n$gameVariables.setValue(1, value);\\\\\\\\\\\\\\\\n$gameSystem.setQuestObjectives(key, [1], status)\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Key:str\\\\\\\":\\\\\\\"Challenge_Plugin_Switches\\\\\\\",\\\\\\\"Header\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Title:str\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[5]Switches\\\\\\\",\\\\\\\"Difficulty:str\\\\\\\":\\\\\\\"Hard\\\\\\\",\\\\\\\"From:str\\\\\\\":\\\\\\\"VisuStella\\\\\\\",\\\\\\\"Location:str\\\\\\\":\\\\\\\"RPG Maker MZ\\\\\\\",\\\\\\\"Description:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Using the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]JS: On Load \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Parameter\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0],\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nyou can run \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]JavaScript\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] code prior to the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncreation of the text written here.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nIn this example, game switch 1's ON/OFF\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nstatus will determine which description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis quest will use.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nGame Switch 1 is now \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[25]OFF\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nDescription ID \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] is being used.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Using the \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]JS: On Load \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Parameter\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0],\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nyou can run \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]JavaScript\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] code prior to the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncreation of the text written here.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nIn this example, game switch 1's ON/OFF\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nstatus will determine which description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis quest will use.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nGame Switch 1 is now \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[24]ON\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nDescription ID \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] is being used.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Lists\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Objectives:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Change Switch 1's ON/OFF status.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"View this quest's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleObjectives:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"2\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Rewards:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[79]Knowledge for \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[6]JS: On Load\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Parameter\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"VisibleRewards:arraynum\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Footer\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"Subtext:arrayjson\\\\\\\":\\\\\\\"[\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[2]DISCLAIMER:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nKeep in mind that \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]VisuStella\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] is NOT\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nresponsible for your proficiency (or\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\notherwise) of \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]JavaScript\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nIf you get any errors with the custom\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ncode, it is up to \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]you\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] to fix it.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nIf you do not understand how any of this\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nsection works, do not be afraid. It's\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nnot the end of the world.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nYou can still change the status of the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]quests\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] and its \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]objectives\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] through the\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nusage of \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[4]Plugin Commands\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"Quotes:arrayjson\\\\\\\":\\\\\\\"[]\\\\\\\",\\\\\\\"JavaScript\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"OnLoadQuestJS:func\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"// Insert JavaScript code here.\\\\\\\\\\\\\\\\nconst key = 'Challenge_Plugin_Switches';\\\\\\\\\\\\\\\\nconst id = $gameSwitches.value(1) ? 2 : 1;\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n$gameSystem.setQuestDescription(key, id)\\\\\\\\\\\\\\\"\\\\\\\"}\\\"]\"}"] + * + * @param Tracker:struct + * @text Quest Tracker Settings + * @type struct<Tracker> + * @desc Setup how all the quest tracker works. + * @default {"General":"","TrackerFmt:json":"\"\\\\{[[Title]]\\\\}\\n[[Objectives]]\"","Options":"","AdjustRect:eval":"true","AddShowOption:eval":"true","ShowName:str":"Show Quest Tracker","AddPositionOption:eval":"true","PositionName:str":"Quest Tracker Position","PositionOff:str":"←","PositionOn:str":"→"} + * + * @param MainMenu:struct + * @text Main Menu Settings + * @type struct<MainMenu> + * @desc Set up the main menu defaults. + * @default {"Name:str":"Quest","ShowMainMenu:eval":"true","EnableMainMenu:eval":"true"} + * + * @param BgSettings:struct + * @text Background Settings + * @type struct<BgSettings> + * @desc Background settings for Scene_Quest. + * @default {"SnapshotOpacity:num":"192","BgFilename1:str":"","BgFilename2:str":""} + * + * @param Window:struct + * @text Window Settings + * @type struct<Window> + * @desc Setup how all the windows appear in-game. + * @default {"CommandWindow":"","ShowFailed:eval":"true","CmdStyle:str":"auto","CmdTextAlign:str":"center","CommandWindow_BgType:num":"0","CommandWindow_Rect:func":"\"const ww = this.mainCommandWidth();\\nconst wh = this.calcWindowHeight(Window_QuestCommand.prototype.totalCommands(), true);\\nconst wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0;\\nconst wy = this.mainAreaTop();\\nreturn new Rectangle(wx, wy, ww, wh);\"","QuestLabel":"","QuestLabel_BgType:num":"0","QuestLabel_Rect:func":"\"const ww = Graphics.boxWidth - this.mainCommandWidth();\\nconst wh = this.calcWindowHeight(1, false);\\nconst wx = this.isRightInputMode() ? 0 : Graphics.boxWidth - ww;\\nconst wy = this.mainAreaTop();\\nreturn new Rectangle(wx, wy, ww, wh);\"","LogWindow":"","LogWindow_Auto_WordWrap:eval":"false","LogWindow_ScrollSpeed:num":"0.20","LogWindow_BgType:num":"0","LogWindow_Rect:func":"\"const ww = Graphics.boxWidth - this.mainCommandWidth();\\nconst wh = this.mainAreaHeight() - this.questLabelWindowRect().height;\\nconst wx = this.isRightInputMode() ? 0 : Graphics.boxWidth - ww;\\nconst wy = this.mainAreaTop() + this.questLabelWindowRect().height;\\nreturn new Rectangle(wx, wy, ww, wh);\"","ListWindow":"","ListWindow_BgType:num":"0","ListWindow_Rect:func":"\"const ww = this.mainCommandWidth();\\nconst wh = this.mainAreaHeight() - this.commandWindowRect().height;\\nconst wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0;\\nconst wy = this.mainAreaTop() + this.commandWindowRect().height;\\nreturn new Rectangle(wx, wy, ww, wh);\"","TrackerWindow":"","TrackerWindow_Scale:num":"0.50","TrackerWindow_BgType:num":"0","TrackerWindow_Rect:func":"\"const ww = 560;\\nconst wh = Graphics.height / Window_QuestTracker.scale;\\nconst wx = this.questTrackerOnRight() ? Graphics.width - Math.ceil(ww * Window_QuestTracker.scale) : 0;\\nconst wy = this.buttonAreaHeight() + 8;\\nreturn new Rectangle(wx, wy, ww, wh);\""} + * + * @param BreakEnd1 + * @text -------------------------- + * @default ---------------------------------- + * + * @param End Of + * @default Plugin Parameters + * + * @param BreakEnd2 + * @text -------------------------- + * @default ---------------------------------- + * + */ +/* ---------------------------------------------------------------------------- + * General Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~General: + * + * @param StartingQuests + * @text Starting Quests + * + * @param KnownQuests:arraystr + * @text Known Quests + * @parent StartingQuests + * @type string[] + * @desc Which quests are known at the start of the game? + * Insert their keys here. + * @default ["Welcome","Example","Plugin_Tutorial_Title","Plugin_Tutorial_Difficulty","Plugin_Tutorial_From","Plugin_Tutorial_Description","Plugin_Tutorial_Objectives","Plugin_Tutorial_Rewards","Plugin_Tutorial_Subtext","Plugin_Tutorial_Quote","Challenge_Plugin_Variables","Challenge_Plugin_Switches"] + * + * @param CompletedQuests:arraystr + * @text Completed Quests + * @parent StartingQuests + * @type string[] + * @desc Which quests are completed at the start of the game? + * Insert their keys here. + * @default [] + * + * @param FailedQuests:arraystr + * @text Failed Quests + * @parent StartingQuests + * @type string[] + * @desc Which quests are failed at the start of the game? + * Insert their keys here. + * @default [] + * + * @param TrackedQuest:str + * @text Tracked Quest + * @parent StartingQuests + * @desc Which quest is tracked at the start of the game? + * @default Welcome + * + * @param SceneQuest + * @text Scene_Quest + * + * @param Vocab + * @parent SceneQuest + * + * @param VocabCommandWindow + * @text Command Window + * @parent Vocab + * + * @param CommandWindow_Known_Text:str + * @text Command: Known + * @parent VocabCommandWindow + * @desc Text used to display known quests. + * @default Available + * + * @param CommandWindow_Completed_Text:str + * @text Command: Completed + * @parent VocabCommandWindow + * @desc Text used to display completed quests. + * @default Completed + * + * @param CommandWindow_Failed_Text:str + * @text Command: Failed + * @parent VocabCommandWindow + * @desc Text used to display failed quests. + * @default Failed + * + * @param VocabLabelWindow + * @text Label Window + * @parent Vocab + * + * @param EmptyTitleLabel:str + * @text Empty Title + * @parent VocabLabelWindow + * @desc Text displayed in the Label Window when no quest is selected. + * @default \i[186]Quest Journal + * + * @param VocabListWindow + * @text List Window + * @parent Vocab + * + * @param ListWindowCategoryOpenFmt:str + * @text Open Categories + * @parent VocabListWindow + * @desc Text format for an open category. + * %1 - Category Name, %2 - Quest Amount + * @default - %1(%2) + * + * @param ListWindowCategoryCloseFmt:str + * @text Closed Categories + * @parent VocabListWindow + * @desc Text format for a closed category. + * %1 - Category Name, %2 - Quest Amount + * @default + %1(%2) + * + * @param NoQuestListed:str + * @text No Quest Listed + * @parent VocabListWindow + * @desc Text when no quest is listed. + * @default (No Quests Listed) + * + * @param ListWindowTrackedQuest:str + * @text Tracked Quest + * @parent VocabListWindow + * @desc Text format for a tracked quest. + * %1 - Tracked Quest's Name + * @default \c[17]%1\c[0] + * + * @param VocabLogWindow + * @text Log Window + * @parent Vocab + * + * @param LogEmpty:json + * @text Empty Message + * @parent VocabLogWindow + * @type note + * @desc Text displayed when no quest is selected. + * @default "\\c[5]Main Quests\\c[0] are quests that must be\ncompleted in order to progress further\ninto the game's story.\n\n\\c[6]Side Quests\\c[0] are optional quests that can\nbe completed at your discretion. Upon\ncompleting a side quest, you can receive\nuseful rewards that may assist you on\nyour journey." + * + * @param OnLoadQuestJS:func + * @text JS: On Load + * @parent LogEmpty:json + * @type note + * @desc Runs code upon making the empty message. + * Useful for setting up variables. + * @default "// Insert JavaScript code here." + * + * @param LogFmt:json + * @text Quest Log + * @parent VocabLogWindow + * @type note + * @desc Text format for Quest Log Window. + * Read help file for instructions. + * @default "\\{[[Title]]\\}\n\\c[4]Level:\\c[0] [[Difficulty]]\n\\c[4]From:\\c[0] [[From]]\n\\c[4]Location:\\c[0] [[Location]]\n\n\\c[4]Description:\\c[0]\n[[Description]]\n\n\\c[4]Objectives:\\c[0]\n[[Objectives]]\n\n\\c[4]Rewards:\\c[0]\n[[Rewards]]\n\n[[Subtext]]\n\n[[Quote]]" + * + * @param Objective_Normal_Fmt:str + * @text Objective (Known) + * @parent LogFmt:json + * @desc Text format for known objectives. + * %1 - Objective Text + * @default ◎%1 + * + * @param Objective_Completed_Fmt:str + * @text Objective (Done) + * @parent LogFmt:json + * @desc Text format for complete objectives. + * %1 - Objective Text + * @default \c[24]<ColorLock>✔%1</ColorLock>\c[0] + * + * @param Objective_Failed_Fmt:str + * @text Objective (Failed) + * @parent LogFmt:json + * @desc Text format for failed objectives. + * %1 - Objective Text + * @default \c[25]<ColorLock>✘%1</ColorLock>\c[0] + * + * @param Reward_Normal_Fmt:str + * @text Reward (Known) + * @parent LogFmt:json + * @desc Text format for normal rewards. + * %1 - Reward Text + * @default ◎%1 + * + * @param Reward_Completed_Fmt:str + * @text Reward (Claimed) + * @parent LogFmt:json + * @desc Text format for claimed rewards. + * %1 - Reward Text + * @default \c[24]<ColorLock>✔%1</ColorLock>\c[0] + * + * @param Reward_Failed_Fmt:str + * @text Reward (Denied) + * @parent LogFmt:json + * @desc Text format for denied rewards. + * %1 - Reward Text + * @default \c[25]<ColorLock>✘%1</ColorLock>\c[0] + * + * @param ButtonAssistWindow + * @text Button Assist Window + * @parent Vocab + * + * @param ButtonAssistPageUpDown:str + * @text Scroll Up/Down + * @parent ButtonAssistWindow + * @desc Text for Page Up/Down to scroll log window. + * Requires VisuMZ_0_CoreEngine! + * @default Scroll Up/Down + * + * @param questButtonAssistActive:str + * @text Tracker + * @parent ButtonAssistWindow + * @desc Text for tracking quests. + * Requires VisuMZ_0_CoreEngine! + * @default Track + * + * @param ButtonAssistExpand:str + * @text Expand + * @parent ButtonAssistWindow + * @desc Text for expanding categories. + * Requires VisuMZ_0_CoreEngine! + * @default Expand + * + * @param ButtonAssistCollapse:str + * @text Collapse + * @parent ButtonAssistWindow + * @desc Text for collapsing categories. + * Requires VisuMZ_0_CoreEngine! + * @default Collapse + * + * @param CommandWindowIcons + * @text Icons + * @parent SceneQuest + * + * @param CommandWindow_Known_Icon:num + * @text Icon: Known + * @parent CommandWindowIcons + * @desc Icon used for this command. + * @default 193 + * + * @param CommandWindow_Completed_Icon:num + * @text Icon: Completed + * @parent CommandWindowIcons + * @desc Icon used for this command. + * @default 192 + * + * @param CommandWindow_Failed_Icon:num + * @text Icon: Failed + * @parent CommandWindowIcons + * @desc Icon used for this command. + * @default 194 + * + */ +/* ---------------------------------------------------------------------------- + * Quest Category Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Category: + * + * @param CategoryName:str + * @text Category Name + * @desc This category's name. + * You may use text codes. + * @default Untitled + * + * @param Quests:arraystruct + * @text Quests + * @type struct<Quest>[] + * @desc A list of quests listed under this category. + * @default [] + * + */ +/* ---------------------------------------------------------------------------- + * Individual Quest Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Quest: + * + * @param Key:str + * @text Quest ID Key + * @desc This quest's identification key. Quests require + * unique keys for the plugin to differentiate them. + * @default (Needs Key) + * + * @param Header + * + * @param Title:str + * @text Title + * @parent Header + * @desc The title of the quest. This is what appears in-game. + * You may use text codes. + * @default \i[87]Untitled Quest + * + * @param Difficulty:str + * @text Difficulty + * @parent Header + * @desc Difficulty level for this quest. + * You may use text codes. + * @default Easy Peasy + * + * @param From:str + * @text From + * @parent Header + * @desc Insert the name of the one who issued this quest. + * You may use text codes. + * @default NPC Name + * + * @param Location:str + * @text Location + * @parent Header + * @desc Insert location name where this quest was issued. + * You may use text codes. + * @default Location Name + * + * @param Description:arrayjson + * @text Description + * @parent Header + * @type note[] + * @desc Type out the description(s) used for this quest. + * You may use text codes. + * @default ["\"This is the \\\\c[4]default\\\\c[0] quest description.\"","\"This is the \\\\c[4]default\\\\c[0] quest description.\\n\\nYou can insert multiple description entries in case you\\never want to update the quest description midway while the\\nquest is in progress.\""] + * + * @param Lists + * + * @param Objectives:arrayjson + * @text Objectives List + * @parent Lists + * @type note[] + * @desc The objectives to be completed for this quest. + * You may use text codes. + * @default ["\"\\\\c[4]First\\\\c[0] objective to be cleared.\"","\"\\\\c[4]Second\\\\c[0] objective, but it's hidden.\"","\"To make other objectives appear,\\nenable them through the \\\\c[4]'Visible\\nObjectives'\\\\c[0] plugin parameter or by\\nusing a plugin command to make\\nthem appear\""] + * + * @param VisibleObjectives:arraynum + * @text Visible Objectives + * @parent Objectives:arrayjson + * @type number[] + * @min 1 + * @desc The objectives that are visible from the start. + * @default ["1"] + * + * @param Rewards:arrayjson + * @text Rewards List + * @parent Lists + * @type note[] + * @desc The reward list for this quest. + * You may use text codes. + * @default ["\"\\\\i[176]Potion x5\"","\"\\\\i[178]Ether x3\"","\"To make other rewards appear,\\nenable them through the \\\\c[4]'Visible\\nRewards'\\\\c[0] plugin parameter or by\\nusing a plugin command to make\\nthem appear\""] + * + * @param VisibleRewards:arraynum + * @text Visible Rewards + * @parent Rewards:arrayjson + * @type number[] + * @min 1 + * @desc The rewards that are visible from the start. + * @default ["1"] + * + * @param Footer + * + * @param Subtext:arrayjson + * @text Subtext + * @parent Footer + * @type note[] + * @desc Subtext to be displayed with the quest. + * You may use text codes. + * @default ["\"\"","\"This is a \\\\c[4]subtext\\\\c[0]. It is used as extra\\ntext that you may want to place on your\\nquest journal that differs from the\\n\\\\c[4]description\\\\c[0].\""] + * + * @param Quotes:arrayjson + * @text Quotes + * @parent Footer + * @type note[] + * @desc Quotes to be displayed with the quest. + * You may use text codes. + * @default ["\"\"","\"Insert the quotes of NPC's here.\""] + * + * @param JavaScript + * + * @param OnLoadQuestJS:func + * @text JS: On Load + * @parent JavaScript + * @type note + * @desc Runs code upon loading the quest in Scene_Quest. + * Useful for setting up variables. + * @default "// Insert JavaScript code here." + * + */ +/* ---------------------------------------------------------------------------- + * Quest Tracker Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Tracker: + * + * @param General + * + * @param TrackerFmt:json + * @text Tracker Format + * @parent General + * @type note + * @desc Text format for Quest Tracker Window. + * Read help file for instructions. + * @default "\\{[[Title]]\\}\n[[Objectives]]" + * + * @param Options + * + * @param AdjustRect:eval + * @text Adjust Window Height + * @parent Options + * @type boolean + * @on Adjust + * @off Don't + * @desc Automatically adjust the options window height? + * @default true + * + * @param AddShowOption:eval + * @text Add Show Tracker? + * @parent Options + * @type boolean + * @on Add + * @off Don't Add + * @desc Add the 'Show Tracker' option to the Options menu? + * @default true + * + * @param ShowName:str + * @text Option Name + * @parent AddShowOption:eval + * @desc Command name of the option. + * @default Show Quest Tracker + * + * @param AddPositionOption:eval + * @text Add Position Tracker? + * @parent Options + * @type boolean + * @on Add + * @off Don't Add + * @desc Add the 'Position Tracker' option to the Options menu? + * @default true + * + * @param PositionName:str + * @text Option Name + * @parent AddPositionOption:eval + * @desc Command name of the option. + * @default Quest Tracker Position + * + * @param PositionOff:str + * @text Option OFF + * @parent AddPositionOption:eval + * @desc Text displayed when the option is OFF. + * @default ← + * + * @param PositionOn:str + * @text Option ON + * @parent AddPositionOption:eval + * @desc Text displayed when the option is ON. + * @default → + * + */ +/* ---------------------------------------------------------------------------- + * MainMenu Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~MainMenu: + * + * @param Name:str + * @text Command Name + * @parent Options + * @desc Name of the 'Quest' option in the Main Menu. + * @default Quest + * + * @param ShowMainMenu:eval + * @text Show in Main Menu? + * @type boolean + * @on Show + * @off Hide + * @desc Add the 'Quest' option to the Main Menu by default? + * @default true + * + * @param EnableMainMenu:eval + * @text Enable in Main Menu? + * @type boolean + * @on Enable + * @off Disable + * @desc Enable the 'Quest' option to the Main Menu by default? + * @default true + * + */ +/* ---------------------------------------------------------------------------- + * Background Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~BgSettings: + * + * @param SnapshotOpacity:num + * @text Snapshop Opacity + * @type number + * @min 0 + * @max 255 + * @desc Snapshot opacity for the scene. + * @default 192 + * + * @param BgFilename1:str + * @text Background 1 + * @type file + * @dir img/titles1/ + * @desc Filename used for the bottom background image. + * Leave empty if you don't wish to use one. + * @default + * + * @param BgFilename2:str + * @text Background 2 + * @type file + * @dir img/titles2/ + * @desc Filename used for the upper background image. + * Leave empty if you don't wish to use one. + * @default + * + */ +/* ---------------------------------------------------------------------------- + * Window Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Window: + * + * @param CommandWindow + * @text Command Window + * + * @param ShowFailed:eval + * @text Show Failed Quests? + * @parent CommandWindow + * @type boolean + * @on Show + * @off Hide + * @desc Show/hide Failed Quests in the command window. + * @default true + * + * @param CmdStyle:str + * @text Style + * @parent CommandWindow + * @type select + * @option Text Only + * @value text + * @option Icon Only + * @value icon + * @option Icon + Text + * @value iconText + * @option Automatic + * @value auto + * @desc How do you wish to draw commands in the Command Window? + * @default auto + * + * @param CmdTextAlign:str + * @text Text Align + * @parent CommandWindow + * @type combo + * @option left + * @option center + * @option right + * @desc Text alignment for the Command Window. + * @default center + * + * @param CommandWindow_BgType:num + * @text Background Type + * @parent CommandWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param CommandWindow_Rect:func + * @text JS: X, Y, W, H + * @parent CommandWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const ww = this.mainCommandWidth();\nconst wh = this.calcWindowHeight(Window_QuestCommand.prototype.totalCommands(), true);\nconst wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0;\nconst wy = this.mainAreaTop();\nreturn new Rectangle(wx, wy, ww, wh);" + * + * @param QuestLabel + * @text Quest Label + * + * @param QuestLabel_BgType:num + * @text Background Type + * @parent QuestLabel + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param QuestLabel_Rect:func + * @text JS: X, Y, W, H + * @parent QuestLabel + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const ww = Graphics.boxWidth - this.mainCommandWidth();\nconst wh = this.calcWindowHeight(1, false);\nconst wx = this.isRightInputMode() ? 0 : Graphics.boxWidth - ww;\nconst wy = this.mainAreaTop();\nreturn new Rectangle(wx, wy, ww, wh);" + * + * @param LogWindow + * @text Log Window + * + * @param LogWindow_ScrollSpeed:num + * @text PageUp/Down Speed + * @parent LogWindow + * @desc Scroll speed for PageUp/Down. + * @default 0.20 + * + * @param LogWindow_BgType:num + * @text Background Type + * @parent LogWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param LogWindow_Rect:func + * @text JS: X, Y, W, H + * @parent LogWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const ww = Graphics.boxWidth - this.mainCommandWidth();\nconst wh = this.mainAreaHeight() - this.questLabelWindowRect().height;\nconst wx = this.isRightInputMode() ? 0 : Graphics.boxWidth - ww;\nconst wy = this.mainAreaTop() + this.questLabelWindowRect().height;\nreturn new Rectangle(wx, wy, ww, wh);" + * + * @param LogWindowExperimental + * @text EXPERIMENTAL + * @parent LogWindow + * + * @param LogWindow_Auto_WordWrap:eval + * @text Automatic Word Wrap? + * @parent LogWindowExperimental + * @type boolean + * @on Enable + * @off Disable + * @desc Enables/disables automatic word wrap. + * Requires VisuMZ_1_MessageCore! + * @default false + * + * @param ListWindow + * @text List Window + * + * @param ListWindow_BgType:num + * @text Background Type + * @parent ListWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param ListWindow_Rect:func + * @text JS: X, Y, W, H + * @parent ListWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const ww = this.mainCommandWidth();\nconst wh = this.mainAreaHeight() - this.commandWindowRect().height;\nconst wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0;\nconst wy = this.mainAreaTop() + this.commandWindowRect().height;\nreturn new Rectangle(wx, wy, ww, wh);" + * + * @param TrackerWindow + * @text Tracker Window + * + * @param TrackerWindow_Scale:num + * @text Window Scale + * @parent TrackerWindow + * @desc How much do you want to scale the Tracker Window's size by? + * @default 0.50 + * + * @param TrackerWindow_BgType:num + * @text Background Type + * @parent TrackerWindow + * @type select + * @option 0 - Window + * @value 0 + * @option 1 - Dim + * @value 1 + * @option 2 - Transparent + * @value 2 + * @desc Select background type for this window. + * @default 0 + * + * @param TrackerWindow_Rect:func + * @text JS: X, Y, W, H + * @parent TrackerWindow + * @type note + * @desc Code used to determine the dimensions for this window. + * @default "const ww = 560;\nconst wh = Graphics.height / Window_QuestTracker.scale;\nconst wx = this.questTrackerOnRight() ? Graphics.width - Math.ceil(ww * Window_QuestTracker.scale) : 0;\nconst wy = this.buttonAreaHeight() + 8;\nreturn new Rectangle(wx, wy, ww, wh);" + * + */ +//============================================================================= + +const _0x435e5d=_0x220d;(function(_0x100450,_0x2e15f7){const _0x336fce=_0x220d,_0xf68ba2=_0x100450();while(!![]){try{const _0x169c18=parseInt(_0x336fce(0x309))/0x1*(-parseInt(_0x336fce(0x2e5))/0x2)+parseInt(_0x336fce(0x19a))/0x3*(-parseInt(_0x336fce(0x2c8))/0x4)+parseInt(_0x336fce(0x199))/0x5*(parseInt(_0x336fce(0x278))/0x6)+parseInt(_0x336fce(0x14a))/0x7+-parseInt(_0x336fce(0x344))/0x8+parseInt(_0x336fce(0x241))/0x9*(-parseInt(_0x336fce(0x19d))/0xa)+parseInt(_0x336fce(0x20c))/0xb*(parseInt(_0x336fce(0x206))/0xc);if(_0x169c18===_0x2e15f7)break;else _0xf68ba2['push'](_0xf68ba2['shift']());}catch(_0x15bd40){_0xf68ba2['push'](_0xf68ba2['shift']());}}}(_0x4403,0x8a9af));var label='QuestSystem',tier=tier||0x0,dependencies=[],pluginData=$plugins[_0x435e5d(0x302)](function(_0x5e37bc){const _0x45387a=_0x435e5d;return _0x5e37bc[_0x45387a(0x271)]&&_0x5e37bc[_0x45387a(0x1cb)][_0x45387a(0x270)]('['+label+']');})[0x0];VisuMZ[label]['Settings']=VisuMZ[label]['Settings']||{},VisuMZ[_0x435e5d(0x207)]=function(_0x156ebc,_0x1d68db){const _0x2aae7f=_0x435e5d;for(const _0x2cf46e in _0x1d68db){if(_0x2cf46e[_0x2aae7f(0x1bf)](/(.*):(.*)/i)){const _0x4a3623=String(RegExp['$1']),_0x2d2418=String(RegExp['$2'])[_0x2aae7f(0x1ef)]()[_0x2aae7f(0x16b)]();let _0x5a47cd,_0x1aac6d,_0x1eaca9;switch(_0x2d2418){case _0x2aae7f(0x146):_0x5a47cd=_0x1d68db[_0x2cf46e]!==''?Number(_0x1d68db[_0x2cf46e]):0x0;break;case'ARRAYNUM':_0x1aac6d=_0x1d68db[_0x2cf46e]!==''?JSON[_0x2aae7f(0x2a4)](_0x1d68db[_0x2cf46e]):[],_0x5a47cd=_0x1aac6d['map'](_0x57400a=>Number(_0x57400a));break;case'EVAL':_0x5a47cd=_0x1d68db[_0x2cf46e]!==''?eval(_0x1d68db[_0x2cf46e]):null;break;case'ARRAYEVAL':_0x1aac6d=_0x1d68db[_0x2cf46e]!==''?JSON['parse'](_0x1d68db[_0x2cf46e]):[],_0x5a47cd=_0x1aac6d['map'](_0x3f06ad=>eval(_0x3f06ad));break;case'JSON':_0x5a47cd=_0x1d68db[_0x2cf46e]!==''?JSON[_0x2aae7f(0x2a4)](_0x1d68db[_0x2cf46e]):'';break;case'ARRAYJSON':_0x1aac6d=_0x1d68db[_0x2cf46e]!==''?JSON[_0x2aae7f(0x2a4)](_0x1d68db[_0x2cf46e]):[],_0x5a47cd=_0x1aac6d[_0x2aae7f(0x185)](_0xf24275=>JSON[_0x2aae7f(0x2a4)](_0xf24275));break;case _0x2aae7f(0x346):_0x5a47cd=_0x1d68db[_0x2cf46e]!==''?new Function(JSON['parse'](_0x1d68db[_0x2cf46e])):new Function('return\x200');break;case _0x2aae7f(0x307):_0x1aac6d=_0x1d68db[_0x2cf46e]!==''?JSON[_0x2aae7f(0x2a4)](_0x1d68db[_0x2cf46e]):[],_0x5a47cd=_0x1aac6d[_0x2aae7f(0x185)](_0xa1eba=>new Function(JSON[_0x2aae7f(0x2a4)](_0xa1eba)));break;case'STR':_0x5a47cd=_0x1d68db[_0x2cf46e]!==''?String(_0x1d68db[_0x2cf46e]):'';break;case _0x2aae7f(0x352):_0x1aac6d=_0x1d68db[_0x2cf46e]!==''?JSON[_0x2aae7f(0x2a4)](_0x1d68db[_0x2cf46e]):[],_0x5a47cd=_0x1aac6d['map'](_0x3dda39=>String(_0x3dda39));break;case _0x2aae7f(0x1a8):_0x1eaca9=_0x1d68db[_0x2cf46e]!==''?JSON[_0x2aae7f(0x2a4)](_0x1d68db[_0x2cf46e]):{},_0x5a47cd=VisuMZ['ConvertParams']({},_0x1eaca9);break;case _0x2aae7f(0x2a1):_0x1aac6d=_0x1d68db[_0x2cf46e]!==''?JSON[_0x2aae7f(0x2a4)](_0x1d68db[_0x2cf46e]):[],_0x5a47cd=_0x1aac6d[_0x2aae7f(0x185)](_0x4ecfaa=>VisuMZ[_0x2aae7f(0x207)]({},JSON[_0x2aae7f(0x2a4)](_0x4ecfaa)));break;default:continue;}_0x156ebc[_0x4a3623]=_0x5a47cd;}}return _0x156ebc;},(_0x1428ce=>{const _0x9c252b=_0x435e5d,_0x567338=_0x1428ce[_0x9c252b(0x1ce)];for(const _0x2a5f4d of dependencies){if(_0x9c252b(0x178)!==_0x9c252b(0x17b)){if(!Imported[_0x2a5f4d]){alert(_0x9c252b(0x2b3)[_0x9c252b(0x179)](_0x567338,_0x2a5f4d)),SceneManager[_0x9c252b(0x2ff)]();break;}}else{if(this[_0x9c252b(0x161)][_0x9c252b(0x195)]())return this[_0x9c252b(0x161)][_0x9c252b(0x17e)]()?_0x3fc56d['questButtonAssistActive']:'';else return this[_0x9c252b(0x161)][_0x9c252b(0x310)]()?_0x48f2c5[_0x9c252b(0x33e)]:_0xef9d01['questButtonAssistExpand'];}}const _0x53208d=_0x1428ce[_0x9c252b(0x1cb)];if(_0x53208d[_0x9c252b(0x1bf)](/\[Version[ ](.*?)\]/i)){const _0x27b50b=Number(RegExp['$1']);_0x27b50b!==VisuMZ[label][_0x9c252b(0x324)]&&(_0x9c252b(0x253)!==_0x9c252b(0x294)?(alert(_0x9c252b(0x29b)[_0x9c252b(0x179)](_0x567338,_0x27b50b)),SceneManager['exit']()):this[_0x9c252b(0x26d)](...arguments));}if(_0x53208d[_0x9c252b(0x1bf)](/\[Tier[ ](\d+)\]/i)){if('YvHQi'!==_0x9c252b(0x1c8)){const _0x24bfb9=Number(RegExp['$1']);_0x24bfb9<tier?(alert(_0x9c252b(0x183)[_0x9c252b(0x179)](_0x567338,_0x24bfb9,tier)),SceneManager[_0x9c252b(0x2ff)]()):tier=Math[_0x9c252b(0x27a)](_0x24bfb9,tier);}else{const _0x1e1056=this[_0x9c252b(0x26a)](_0x5b0829),_0x4de8ad=this[_0x9c252b(0x1cc)](_0x2a8638),_0x1801a4=this['textSizeEx'](_0x4de8ad)[_0x9c252b(0x313)];this[_0x9c252b(0x160)](this[_0x9c252b(0x154)](_0x1215fd));const _0x30dcd4=this[_0x9c252b(0x1a3)]();if(_0x30dcd4===_0x9c252b(0x2a8))this[_0x9c252b(0x34d)](_0x4de8ad,_0x1e1056['x']+_0x1e1056[_0x9c252b(0x313)]-_0x1801a4,_0x1e1056['y'],_0x1801a4);else{if(_0x30dcd4===_0x9c252b(0x263)){const _0x17fc1a=_0x1e1056['x']+_0x9e3669[_0x9c252b(0x18a)]((_0x1e1056[_0x9c252b(0x313)]-_0x1801a4)/0x2);this[_0x9c252b(0x34d)](_0x4de8ad,_0x17fc1a,_0x1e1056['y'],_0x1801a4);}else this[_0x9c252b(0x34d)](_0x4de8ad,_0x1e1056['x'],_0x1e1056['y'],_0x1801a4);}}}VisuMZ[_0x9c252b(0x207)](VisuMZ[label][_0x9c252b(0x172)],_0x1428ce[_0x9c252b(0x285)]);})(pluginData),PluginManager['registerCommand'](pluginData['name'],'QuestSet',_0x43d7f2=>{const _0x2fba78=_0x435e5d;VisuMZ['ConvertParams'](_0x43d7f2,_0x43d7f2);const _0x3607b6=_0x43d7f2[_0x2fba78(0x277)],_0x4ec6cd=_0x43d7f2[_0x2fba78(0x288)];for(const _0x5bc023 of _0x3607b6){$gameSystem['setQuestStatus'](_0x5bc023,_0x4ec6cd);}SceneManager[_0x2fba78(0x149)]()&&SceneManager[_0x2fba78(0x304)][_0x2fba78(0x2e7)]();}),PluginManager[_0x435e5d(0x242)](pluginData[_0x435e5d(0x1ce)],_0x435e5d(0x282),_0x531e44=>{const _0x2e908e=_0x435e5d;VisuMZ[_0x2e908e(0x207)](_0x531e44,_0x531e44);const _0x2e8c2b=_0x531e44[_0x2e908e(0x277)],_0x572ccb=_0x531e44[_0x2e908e(0x157)];for(const _0x556b1e of _0x2e8c2b){if(_0x2e908e(0x31e)===_0x2e908e(0x31e))$gameSystem[_0x2e908e(0x250)](_0x556b1e,_0x572ccb);else{const _0x189af=_0x2e07f4[_0x2e908e(0x333)]['ConfigManager_makeData'][_0x2e908e(0x21a)](this);return _0x189af['questTrackerShow']=this[_0x2e908e(0x26f)],_0x189af[_0x2e908e(0x269)]=this[_0x2e908e(0x269)],_0x189af;}}SceneManager[_0x2e908e(0x149)]()&&SceneManager[_0x2e908e(0x304)]['refreshQuestTrackerWindow']();}),PluginManager['registerCommand'](pluginData[_0x435e5d(0x1ce)],_0x435e5d(0x1cd),_0x2cba1b=>{const _0x156ee6=_0x435e5d;VisuMZ['ConvertParams'](_0x2cba1b,_0x2cba1b);const _0x4b26eb=_0x2cba1b[_0x156ee6(0x277)],_0x2c11fb=_0x2cba1b[_0x156ee6(0x24d)],_0x17371e=_0x2cba1b[_0x156ee6(0x288)];for(const _0xb903df of _0x4b26eb){$gameSystem[_0x156ee6(0x21d)](_0xb903df,_0x2c11fb,_0x17371e);}SceneManager[_0x156ee6(0x149)]()&&SceneManager[_0x156ee6(0x304)][_0x156ee6(0x2e7)]();}),PluginManager[_0x435e5d(0x242)](pluginData[_0x435e5d(0x1ce)],_0x435e5d(0x1f8),_0x50728f=>{const _0x3998d0=_0x435e5d;VisuMZ[_0x3998d0(0x207)](_0x50728f,_0x50728f);const _0xfcc8bc=_0x50728f['Keys'],_0x1c5f1a=_0x50728f[_0x3998d0(0x157)];for(const _0xb65468 of _0xfcc8bc){$gameSystem[_0x3998d0(0x164)](_0xb65468,_0x1c5f1a);}SceneManager[_0x3998d0(0x149)]()&&(_0x3998d0(0x1ab)===_0x3998d0(0x29f)?this[_0x3998d0(0x34d)](_0x16c9d1,_0x11022d['x']+_0x4bf873[_0x3998d0(0x313)]-_0x5dcad2,_0x4fe6ac['y'],_0x49e1f6):SceneManager[_0x3998d0(0x304)][_0x3998d0(0x2e7)]());}),PluginManager[_0x435e5d(0x242)](pluginData['name'],'QuestRewards',_0x15dc51=>{const _0x3941ed=_0x435e5d;VisuMZ[_0x3941ed(0x207)](_0x15dc51,_0x15dc51);const _0x3ba08e=_0x15dc51[_0x3941ed(0x277)],_0x73d3a1=_0x15dc51['TargetIDs'],_0x520843=_0x15dc51[_0x3941ed(0x288)];for(const _0x3f2450 of _0x3ba08e){$gameSystem[_0x3941ed(0x267)](_0x3f2450,_0x73d3a1,_0x520843);}SceneManager['isSceneMap']()&&('egtkh'!==_0x3941ed(0x32b)?this[_0x3941ed(0x166)]+=this[_0x3941ed(0x335)]()*0x4:SceneManager[_0x3941ed(0x304)][_0x3941ed(0x2e7)]());}),PluginManager['registerCommand'](pluginData[_0x435e5d(0x1ce)],_0x435e5d(0x221),_0x54b067=>{const _0x5f0926=_0x435e5d;VisuMZ[_0x5f0926(0x207)](_0x54b067,_0x54b067);const _0x3e8b81=_0x54b067[_0x5f0926(0x277)],_0xe20c0a=_0x54b067[_0x5f0926(0x157)];for(const _0x7d5ac2 of _0x3e8b81){$gameSystem[_0x5f0926(0x251)](_0x7d5ac2,_0xe20c0a);}SceneManager[_0x5f0926(0x149)]()&&SceneManager['_scene']['refreshQuestTrackerWindow']();}),PluginManager[_0x435e5d(0x242)](pluginData[_0x435e5d(0x1ce)],_0x435e5d(0x1bc),_0x43813b=>{const _0x1cf9f3=_0x435e5d;VisuMZ[_0x1cf9f3(0x207)](_0x43813b,_0x43813b);const _0x20c8b8=_0x43813b[_0x1cf9f3(0x2dd)];$gameSystem[_0x1cf9f3(0x22d)](_0x20c8b8);if(SceneManager[_0x1cf9f3(0x149)]()){if(_0x1cf9f3(0x2c9)===_0x1cf9f3(0x254)){const _0x29b4e1=_0x5bcf52[_0x1cf9f3(0x26f)],_0x308876=_0x1cf9f3(0x26f);this[_0x1cf9f3(0x170)](_0x29b4e1,_0x308876);}else SceneManager['_scene'][_0x1cf9f3(0x2e7)]();}}),PluginManager['registerCommand'](pluginData[_0x435e5d(0x1ce)],_0x435e5d(0x274),_0x3a5422=>{const _0x1316ba=_0x435e5d;if(!SceneManager[_0x1316ba(0x149)]())return;SceneManager[_0x1316ba(0x304)][_0x1316ba(0x2e7)]();}),PluginManager[_0x435e5d(0x242)](pluginData[_0x435e5d(0x1ce)],_0x435e5d(0x349),_0x98d6f8=>{const _0x4dde50=_0x435e5d;VisuMZ[_0x4dde50(0x207)](_0x98d6f8,_0x98d6f8),$gameSystem[_0x4dde50(0x1e7)](_0x98d6f8['Show']),SceneManager[_0x4dde50(0x149)]()&&(_0x4dde50(0x33b)!==_0x4dde50(0x330)?SceneManager[_0x4dde50(0x304)][_0x4dde50(0x2e7)]():_0x79c8ea=_0x3276c8[_0x4dde50(0x232)](/[\n\r]+/g,'\x1bWrapBreak[0]'));}),PluginManager[_0x435e5d(0x242)](pluginData['name'],_0x435e5d(0x216),_0x209acb=>{const _0x217bb0=_0x435e5d;if($gameParty['inBattle']())return;SceneManager[_0x217bb0(0x32d)](Scene_Quest);}),PluginManager[_0x435e5d(0x242)](pluginData[_0x435e5d(0x1ce)],_0x435e5d(0x200),_0x3832e7=>{const _0x4da011=_0x435e5d;VisuMZ[_0x4da011(0x207)](_0x3832e7,_0x3832e7),$gameSystem[_0x4da011(0x17c)]()[_0x4da011(0x260)]=_0x3832e7['Enable'];}),PluginManager[_0x435e5d(0x242)](pluginData[_0x435e5d(0x1ce)],_0x435e5d(0x1b7),_0xb44c20=>{const _0x31215d=_0x435e5d;VisuMZ['ConvertParams'](_0xb44c20,_0xb44c20),$gameSystem[_0x31215d(0x17c)]()[_0x31215d(0x1b0)]=_0xb44c20[_0x31215d(0x233)];}),VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x2be)]=Scene_Boot[_0x435e5d(0x2ee)][_0x435e5d(0x203)],Scene_Boot[_0x435e5d(0x2ee)][_0x435e5d(0x203)]=function(){const _0xc1a2e6=_0x435e5d;VisuMZ['QuestSystem'][_0xc1a2e6(0x2be)][_0xc1a2e6(0x21a)](this),this[_0xc1a2e6(0x2d5)]();},VisuMZ['QuestSystem'][_0x435e5d(0x187)]=[],VisuMZ[_0x435e5d(0x333)]['QuestData']={},Scene_Boot['prototype'][_0x435e5d(0x2d5)]=function(){const _0x173063=_0x435e5d;for(const _0x3742ba of VisuMZ[_0x173063(0x333)]['Settings']['Categories']){if(_0x173063(0x2ec)!==_0x173063(0x189)){if(!_0x3742ba)continue;for(const _0x42e9b7 of _0x3742ba[_0x173063(0x316)]){if(!_0x42e9b7)continue;_0x42e9b7[_0x173063(0x1cf)]=_0x3742ba,_0x42e9b7[_0x173063(0x20d)][_0x173063(0x21f)](''),_0x42e9b7[_0x173063(0x34a)]['unshift'](''),_0x42e9b7[_0x173063(0x279)][_0x173063(0x21f)](''),_0x42e9b7[_0x173063(0x2d2)][_0x173063(0x21f)](''),_0x42e9b7[_0x173063(0x169)]['unshift']('');const _0x36b9a2=_0x42e9b7[_0x173063(0x2dd)][_0x173063(0x1ef)]()[_0x173063(0x16b)]();VisuMZ['QuestSystem'][_0x173063(0x187)][_0x173063(0x32d)](_0x36b9a2),VisuMZ[_0x173063(0x333)][_0x173063(0x22c)][_0x36b9a2]=_0x42e9b7;}}else _0x31f353[_0x173063(0x304)][_0x173063(0x2e7)]();}},ConfigManager[_0x435e5d(0x26f)]=!![],ConfigManager[_0x435e5d(0x269)]=!![],VisuMZ['QuestSystem'][_0x435e5d(0x1e4)]=ConfigManager[_0x435e5d(0x211)],ConfigManager[_0x435e5d(0x211)]=function(){const _0x49aea8=_0x435e5d,_0x17df69=VisuMZ[_0x49aea8(0x333)]['ConfigManager_makeData']['call'](this);return _0x17df69[_0x49aea8(0x26f)]=this[_0x49aea8(0x26f)],_0x17df69[_0x49aea8(0x269)]=this['questTrackerPosition'],_0x17df69;},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x2b2)]=ConfigManager[_0x435e5d(0x26b)],ConfigManager[_0x435e5d(0x26b)]=function(_0x3dcfa9){const _0x1220fd=_0x435e5d;VisuMZ[_0x1220fd(0x333)][_0x1220fd(0x2b2)][_0x1220fd(0x21a)](this,_0x3dcfa9),'questTrackerShow'in _0x3dcfa9?this['questTrackerShow']=_0x3dcfa9[_0x1220fd(0x26f)]:this[_0x1220fd(0x26f)]=!![],_0x1220fd(0x269)in _0x3dcfa9?this[_0x1220fd(0x269)]=_0x3dcfa9[_0x1220fd(0x269)]:this[_0x1220fd(0x269)]=!![];},ImageManager[_0x435e5d(0x319)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x1e5)],ImageManager[_0x435e5d(0x1e6)]=VisuMZ['QuestSystem']['Settings'][_0x435e5d(0x20b)][_0x435e5d(0x2fb)],ImageManager['questFailedIcon']=VisuMZ['QuestSystem'][_0x435e5d(0x172)]['General']['CommandWindow_Failed_Icon'],TextManager['questCommandName']=VisuMZ['QuestSystem'][_0x435e5d(0x172)][_0x435e5d(0x301)][_0x435e5d(0x1fe)],TextManager[_0x435e5d(0x1fc)]=VisuMZ['QuestSystem'][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x2ac)],TextManager[_0x435e5d(0x22a)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x1db)],TextManager[_0x435e5d(0x182)]=VisuMZ[_0x435e5d(0x333)]['Settings']['General'][_0x435e5d(0x348)],TextManager[_0x435e5d(0x1e9)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x2f5)],TextManager['questCategoryClosedFmt']=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x19b)],TextManager[_0x435e5d(0x33d)]=VisuMZ[_0x435e5d(0x333)]['Settings']['General'][_0x435e5d(0x1f4)],TextManager[_0x435e5d(0x29a)]=VisuMZ[_0x435e5d(0x333)]['Settings'][_0x435e5d(0x20b)][_0x435e5d(0x28e)],TextManager[_0x435e5d(0x1b6)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x215)],TextManager[_0x435e5d(0x158)]=VisuMZ['QuestSystem'][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x295)],TextManager[_0x435e5d(0x34b)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)]['General'][_0x435e5d(0x1e0)],TextManager[_0x435e5d(0x229)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)]['General']['Objective_Completed_Fmt'],TextManager[_0x435e5d(0x2ef)]=VisuMZ['QuestSystem']['Settings'][_0x435e5d(0x20b)][_0x435e5d(0x2b5)],TextManager[_0x435e5d(0x308)]=VisuMZ['QuestSystem'][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x186)],TextManager[_0x435e5d(0x25a)]=VisuMZ['QuestSystem'][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x325)],TextManager[_0x435e5d(0x2f3)]=VisuMZ[_0x435e5d(0x333)]['Settings'][_0x435e5d(0x20b)][_0x435e5d(0x1de)],TextManager[_0x435e5d(0x341)]=VisuMZ['QuestSystem'][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x21c)],TextManager[_0x435e5d(0x30a)]=VisuMZ['QuestSystem'][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x30a)],TextManager[_0x435e5d(0x181)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x20b)][_0x435e5d(0x15d)],TextManager[_0x435e5d(0x33e)]=VisuMZ['QuestSystem']['Settings'][_0x435e5d(0x20b)][_0x435e5d(0x25b)],TextManager[_0x435e5d(0x2a9)]=_0x435e5d(0x299),TextManager[_0x435e5d(0x331)]=VisuMZ[_0x435e5d(0x333)]['Settings'][_0x435e5d(0x192)]['TrackerFmt']||TextManager[_0x435e5d(0x2a9)],TextManager[_0x435e5d(0x1f0)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x20b)]['ListWindowTrackedQuest'],TextManager[_0x435e5d(0x26f)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x192)][_0x435e5d(0x1e1)],TextManager[_0x435e5d(0x269)]=VisuMZ[_0x435e5d(0x333)]['Settings'][_0x435e5d(0x192)]['PositionName'],TextManager['questTrackerPosOff']=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x192)][_0x435e5d(0x198)],TextManager[_0x435e5d(0x350)]=VisuMZ['QuestSystem'][_0x435e5d(0x172)]['Tracker'][_0x435e5d(0x2d0)],SceneManager[_0x435e5d(0x149)]=function(){const _0x11720a=_0x435e5d;return this[_0x11720a(0x304)]&&this[_0x11720a(0x304)][_0x11720a(0x1c0)]===Scene_Map;},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x2d3)]=Game_System[_0x435e5d(0x2ee)]['initialize'],Game_System[_0x435e5d(0x2ee)]['initialize']=function(){const _0x481cb0=_0x435e5d;VisuMZ[_0x481cb0(0x333)][_0x481cb0(0x2d3)][_0x481cb0(0x21a)](this),this[_0x481cb0(0x2a7)]();},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x2a7)]=function(){const _0x56271a=_0x435e5d,_0x367b6f=VisuMZ[_0x56271a(0x333)][_0x56271a(0x172)][_0x56271a(0x20b)],_0x30275c=VisuMZ[_0x56271a(0x333)][_0x56271a(0x172)][_0x56271a(0x301)];this['_quests']={'shown':_0x30275c['ShowMainMenu'],'enabled':_0x30275c[_0x56271a(0x214)],'known':[],'completed':[],'failed':[],'description':{},'objectives':{},'objectivesCompleted':{},'objectivesFailed':{},'rewards':{},'rewardsClaimed':{},'rewardsDenied':{},'subtext':{},'quotes':{},'tracked':_0x367b6f[_0x56271a(0x193)][_0x56271a(0x1ef)]()[_0x56271a(0x16b)](),'showTracker':!![]};for(const _0x4eddbf of _0x367b6f[_0x56271a(0x230)]){if(_0x56271a(0x2e2)!==_0x56271a(0x2e2)){if(![]){const _0x681da0=this[_0x56271a(0x1c6)](),_0x5ada57=this['_quest']?this[_0x56271a(0x2f1)]():this[_0x56271a(0x202)](),_0x3d9f7b=this[_0x56271a(0x1b3)](_0x5ada57['trim']());this[_0x56271a(0x166)]=_0x3d9f7b[_0x56271a(0x1c1)],this['constructor']===_0x20e30a&&(this[_0x56271a(0x166)]+=this[_0x56271a(0x335)](),_0x415ecd[_0x56271a(0x327)]&&(this[_0x56271a(0x166)]+=this[_0x56271a(0x335)]()*0x4));}const _0x28dfc8=this[_0x56271a(0x2e0)]?this[_0x56271a(0x2f1)]():this['createEmptyText']();this[_0x56271a(0x166)]=this[_0x56271a(0x1b3)](_0x28dfc8[_0x56271a(0x16b)]())[_0x56271a(0x1c1)];}else this[_0x56271a(0x342)](_0x4eddbf,_0x56271a(0x252));}for(const _0x1a2a42 of _0x367b6f[_0x56271a(0x284)]){if(_0x56271a(0x1b4)===_0x56271a(0x1b4))this['setQuestStatus'](_0x1a2a42,_0x56271a(0x1d2));else return _0x247426[_0x56271a(0x181)];}for(const _0x196a0b of _0x367b6f[_0x56271a(0x1f2)]){_0x56271a(0x281)===_0x56271a(0x281)?this[_0x56271a(0x342)](_0x196a0b,_0x56271a(0x247)):this[_0x56271a(0x1ad)]();}},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x2f4)]=function(_0x1ccc2a){const _0x549259=_0x435e5d;return _0x1ccc2a=_0x1ccc2a[_0x549259(0x1ef)]()[_0x549259(0x16b)](),VisuMZ[_0x549259(0x333)][_0x549259(0x22c)][_0x1ccc2a];},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x17c)]=function(){const _0x283683=_0x435e5d;if(this[_0x283683(0x2f7)]===undefined)this[_0x283683(0x2a7)]();return this['_quests'];},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x2c7)]=function(){const _0xc1f5fa=_0x435e5d;return this[_0xc1f5fa(0x17c)]()[_0xc1f5fa(0x1b0)];},Game_System[_0x435e5d(0x2ee)]['isquestMenuEnabled']=function(){const _0x420390=_0x435e5d;return this[_0x420390(0x17c)]()[_0x420390(0x260)];},Game_System[_0x435e5d(0x2ee)]['setQuestStatus']=function(_0x2c90ac,_0x55101d){const _0x496d44=_0x435e5d;_0x2c90ac=_0x2c90ac[_0x496d44(0x1ef)]()[_0x496d44(0x16b)]();if(!VisuMZ[_0x496d44(0x333)]['QuestData'][_0x2c90ac])return;const _0x38627f=this['questData']();_0x38627f[_0x496d44(0x252)]=_0x38627f[_0x496d44(0x252)]||[],_0x38627f[_0x496d44(0x1d2)]=_0x38627f[_0x496d44(0x1d2)]||[],_0x38627f[_0x496d44(0x247)]=_0x38627f[_0x496d44(0x247)]||[],_0x38627f[_0x496d44(0x252)][_0x496d44(0x320)](_0x2c90ac),_0x38627f['completed'][_0x496d44(0x320)](_0x2c90ac),_0x38627f['failed'][_0x496d44(0x320)](_0x2c90ac);if(_0x55101d!==_0x496d44(0x320))_0x38627f[_0x55101d][_0x496d44(0x32d)](_0x2c90ac);if(_0x2c90ac===_0x38627f[_0x496d44(0x32a)][_0x496d44(0x1ef)]()['trim']()){if(_0x496d44(0x171)==='LwZhR'){_0x564156['ConvertParams'](_0x27d314,_0x54caf9);const _0x199da9=_0x11c67b['Keys'],_0x43726f=_0x59356f[_0x496d44(0x24d)],_0x54a863=_0x26a8b1[_0x496d44(0x288)];for(const _0x13aac1 of _0x199da9){_0x434396[_0x496d44(0x267)](_0x13aac1,_0x43726f,_0x54a863);}_0x4d9310['isSceneMap']()&&_0x4b24c2[_0x496d44(0x304)][_0x496d44(0x2e7)]();}else _0x55101d!=='known'&&this[_0x496d44(0x22d)]('');}},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x2b4)]=function(){const _0x3bf0b5=_0x435e5d,_0x2236cc=this[_0x3bf0b5(0x17c)]();return _0x2236cc['known']=_0x2236cc[_0x3bf0b5(0x252)]||[],_0x2236cc[_0x3bf0b5(0x252)][_0x3bf0b5(0x185)](_0x29ef63=>this[_0x3bf0b5(0x2f4)](_0x29ef63))['remove'](null);},Game_System[_0x435e5d(0x2ee)]['isQuestKnown']=function(_0x31fd10){const _0x179433=_0x435e5d,_0x2e4741=this[_0x179433(0x17c)]();return _0x2e4741[_0x179433(0x252)]=_0x2e4741[_0x179433(0x252)]||[],_0x31fd10=_0x31fd10[_0x179433(0x1ef)]()['trim'](),_0x2e4741[_0x179433(0x252)][_0x179433(0x270)](_0x31fd10);},Game_System[_0x435e5d(0x2ee)]['questsCompleted']=function(){const _0x1be87b=_0x435e5d,_0x4f94cb=this[_0x1be87b(0x17c)]();return _0x4f94cb[_0x1be87b(0x1d2)]=_0x4f94cb[_0x1be87b(0x1d2)]||[],_0x4f94cb[_0x1be87b(0x1d2)][_0x1be87b(0x185)](_0x4bab51=>this[_0x1be87b(0x2f4)](_0x4bab51))['remove'](null);},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x1b5)]=function(_0x40e56b){const _0x453e75=_0x435e5d,_0x2f2909=this[_0x453e75(0x17c)]();return _0x2f2909[_0x453e75(0x1d2)]=_0x2f2909[_0x453e75(0x1d2)]||[],_0x40e56b=_0x40e56b[_0x453e75(0x1ef)]()[_0x453e75(0x16b)](),_0x2f2909[_0x453e75(0x1d2)]['includes'](_0x40e56b);},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x303)]=function(){const _0x3ef113=_0x435e5d,_0x3a25e7=this[_0x3ef113(0x17c)]();return _0x3a25e7[_0x3ef113(0x247)]=_0x3a25e7[_0x3ef113(0x247)]||[],_0x3a25e7[_0x3ef113(0x247)][_0x3ef113(0x185)](_0x34db09=>this[_0x3ef113(0x2f4)](_0x34db09))[_0x3ef113(0x320)](null);},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x235)]=function(_0x129bd2){const _0x1e1229=_0x435e5d,_0x50fef1=this[_0x1e1229(0x17c)]();return _0x50fef1['failed']=_0x50fef1[_0x1e1229(0x247)]||[],_0x129bd2=_0x129bd2[_0x1e1229(0x1ef)]()['trim'](),_0x50fef1[_0x1e1229(0x247)]['includes'](_0x129bd2);},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x1f9)]=function(_0x5aa945){const _0x387bd5=_0x435e5d;_0x5aa945=_0x5aa945['toUpperCase']()[_0x387bd5(0x16b)]();const _0x21607f=this[_0x387bd5(0x2f4)](_0x5aa945);if(!_0x21607f)return'';const _0x3674bd=this[_0x387bd5(0x17c)]()[_0x387bd5(0x1cb)];_0x3674bd[_0x5aa945]=_0x3674bd[_0x5aa945]||0x1;const _0x5109e9=_0x3674bd[_0x5aa945];return _0x21607f[_0x387bd5(0x20d)][_0x5109e9]||'';},Game_System[_0x435e5d(0x2ee)]['setQuestDescription']=function(_0x358be8,_0x14eac4){const _0x2900cd=_0x435e5d;_0x358be8=_0x358be8['toUpperCase']()[_0x2900cd(0x16b)]();const _0x5428f3=this[_0x2900cd(0x2f4)](_0x358be8);if(!_0x5428f3)return'';const _0x2e9ae5=this['questData']()[_0x2900cd(0x1cb)];_0x2e9ae5[_0x358be8]=_0x14eac4;},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x236)]=function(_0x1b74da){const _0x4141c1=_0x435e5d;_0x1b74da=_0x1b74da[_0x4141c1(0x1ef)]()['trim']();const _0x119f31=this['quest'](_0x1b74da);if(!_0x119f31)return'';const _0x4fffa1=this[_0x4141c1(0x17c)]();return _0x4fffa1[_0x4141c1(0x196)]=_0x4fffa1['objectives']||{},!_0x4fffa1[_0x4141c1(0x196)][_0x1b74da]&&(_0x4fffa1['objectives'][_0x1b74da]=JsonEx[_0x4141c1(0x19c)](_0x119f31[_0x4141c1(0x1d7)])),_0x4fffa1[_0x4141c1(0x196)][_0x1b74da][_0x4141c1(0x321)]((_0x300147,_0x27e066)=>_0x300147-_0x27e066);},Game_System[_0x435e5d(0x2ee)]['setQuestObjectives']=function(_0x25a3c0,_0x17bd17,_0x305896){const _0x2c28cd=_0x435e5d;_0x25a3c0=_0x25a3c0[_0x2c28cd(0x1ef)]()['trim']();const _0x2a555a=this[_0x2c28cd(0x2f4)](_0x25a3c0);if(!_0x2a555a)return'';const _0x15aa81=this[_0x2c28cd(0x17c)]();_0x15aa81[_0x2c28cd(0x196)]=_0x15aa81[_0x2c28cd(0x196)]||{};if(!_0x15aa81['objectives'][_0x25a3c0]){if('fmZNL'!==_0x2c28cd(0x283)){const _0x13c9ea=this['questData']();return _0x13c9ea['completed']=_0x13c9ea['completed']||[],_0x13e832=_0x44ada6[_0x2c28cd(0x1ef)]()['trim'](),_0x13c9ea[_0x2c28cd(0x1d2)]['includes'](_0x2de1ec);}else _0x15aa81[_0x2c28cd(0x196)][_0x25a3c0]=JsonEx[_0x2c28cd(0x19c)](_0x2a555a['VisibleObjectives']);}_0x15aa81[_0x2c28cd(0x196)][_0x25a3c0]=_0x15aa81[_0x2c28cd(0x196)][_0x25a3c0]||[],_0x15aa81[_0x2c28cd(0x174)][_0x25a3c0]=_0x15aa81['objectivesCompleted'][_0x25a3c0]||[],_0x15aa81[_0x2c28cd(0x1ed)][_0x25a3c0]=_0x15aa81['objectivesFailed'][_0x25a3c0]||[];for(const _0x32d57b of _0x17bd17){_0x15aa81[_0x2c28cd(0x196)][_0x25a3c0][_0x2c28cd(0x320)](_0x32d57b),_0x15aa81[_0x2c28cd(0x174)][_0x25a3c0][_0x2c28cd(0x320)](_0x32d57b),_0x15aa81['objectivesFailed'][_0x25a3c0]['remove'](_0x32d57b);switch(_0x305896){case _0x2c28cd(0x177):case _0x2c28cd(0x252):_0x15aa81[_0x2c28cd(0x196)][_0x25a3c0]['push'](_0x32d57b);break;case'complete':case _0x2c28cd(0x1d2):_0x15aa81[_0x2c28cd(0x174)][_0x25a3c0][_0x2c28cd(0x32d)](_0x32d57b);break;case'fail':case _0x2c28cd(0x247):_0x15aa81['objectivesFailed'][_0x25a3c0][_0x2c28cd(0x32d)](_0x32d57b);break;case _0x2c28cd(0x320):case _0x2c28cd(0x16e):break;}}},Game_System[_0x435e5d(0x2ee)]['questObjectivesCompleted']=function(_0x17e9dc){const _0x34288b=_0x435e5d;_0x17e9dc=_0x17e9dc[_0x34288b(0x1ef)]()[_0x34288b(0x16b)]();const _0x12f427=this['quest'](_0x17e9dc);if(!_0x12f427)return'';const _0x292603=this['questData']();return _0x292603[_0x34288b(0x174)]=_0x292603['objectivesCompleted']||{},_0x292603[_0x34288b(0x174)][_0x17e9dc]=_0x292603[_0x34288b(0x174)][_0x17e9dc]||[],_0x292603[_0x34288b(0x174)][_0x17e9dc][_0x34288b(0x321)]((_0x2ea20e,_0x4047f5)=>_0x2ea20e-_0x4047f5);},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x27d)]=function(_0x3567df){const _0xc86852=_0x435e5d;_0x3567df=_0x3567df['toUpperCase']()[_0xc86852(0x16b)]();const _0xc13b28=this[_0xc86852(0x2f4)](_0x3567df);if(!_0xc13b28)return'';const _0x47145b=this[_0xc86852(0x17c)]();return _0x47145b[_0xc86852(0x1ed)]=_0x47145b['objectivesFailed']||{},_0x47145b[_0xc86852(0x1ed)][_0x3567df]=_0x47145b[_0xc86852(0x1ed)][_0x3567df]||[],_0x47145b[_0xc86852(0x1ed)][_0x3567df]['sort']((_0x165fc7,_0x5d1fdd)=>_0x165fc7-_0x5d1fdd);},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x176)]=function(_0x2f713a){const _0x19dfc6=_0x435e5d;_0x2f713a=_0x2f713a[_0x19dfc6(0x1ef)]()[_0x19dfc6(0x16b)]();const _0x403841=this['quest'](_0x2f713a);if(!_0x403841)return'';const _0x2c4cde=this[_0x19dfc6(0x17c)]();_0x2c4cde['rewards']=_0x2c4cde[_0x19dfc6(0x1fb)]||{};if(!_0x2c4cde['rewards'][_0x2f713a]){if(_0x19dfc6(0x228)!==_0x19dfc6(0x175))_0x2c4cde[_0x19dfc6(0x1fb)][_0x2f713a]=JsonEx['makeDeepCopy'](_0x403841['VisibleRewards']);else{if(_0xfe1fd2!==this['deathStateId']())return;if(!this[_0x19dfc6(0x14c)]())return;if(!_0x366292)return;if(!this[_0x19dfc6(0x27b)]())return;if(this[_0x19dfc6(0x225)])return;this[_0x19dfc6(0x225)]=!![];const _0x304e80=this['enemy']()[_0x19dfc6(0x2ca)],_0x4aaebe=_0x304e80[_0x19dfc6(0x1bf)](/<VARIABLE (\d+) ON DEATH: ([\+\-]\d+)>/gi);if(_0x4aaebe)for(const _0x37edae of _0x4aaebe){_0x37edae[_0x19dfc6(0x1bf)](/<VARIABLE (\d+) ON DEATH: ([\+\-]\d+)>/i);const _0x3edcb9=_0x4e1346(_0x3597f7['$1']),_0x12c2b9=_0x28a1e8(_0x1a7e63['$2']),_0x48c786=_0x82ac13[_0x19dfc6(0x268)](_0x3edcb9);_0x3ab745['setValue'](_0x3edcb9,_0x48c786+_0x12c2b9);}}}return _0x2c4cde[_0x19dfc6(0x1fb)][_0x2f713a]['sort']((_0x489671,_0x1d800b)=>_0x489671-_0x1d800b);},Game_System['prototype']['setQuestRewards']=function(_0x1e1ae3,_0x326b12,_0x2af800){const _0x4ea7cc=_0x435e5d;_0x1e1ae3=_0x1e1ae3['toUpperCase']()[_0x4ea7cc(0x16b)]();const _0x3373cd=this[_0x4ea7cc(0x2f4)](_0x1e1ae3);if(!_0x3373cd)return'';const _0x4983b5=this['questData']();_0x4983b5[_0x4ea7cc(0x1fb)]=_0x4983b5[_0x4ea7cc(0x1fb)]||{};!_0x4983b5[_0x4ea7cc(0x1fb)][_0x1e1ae3]&&(_0x4983b5['rewards'][_0x1e1ae3]=JsonEx[_0x4ea7cc(0x19c)](_0x3373cd[_0x4ea7cc(0x245)]));_0x4983b5['rewards'][_0x1e1ae3]=_0x4983b5[_0x4ea7cc(0x1fb)][_0x1e1ae3]||[],_0x4983b5[_0x4ea7cc(0x1f1)][_0x1e1ae3]=_0x4983b5[_0x4ea7cc(0x1f1)][_0x1e1ae3]||[],_0x4983b5[_0x4ea7cc(0x275)][_0x1e1ae3]=_0x4983b5[_0x4ea7cc(0x275)][_0x1e1ae3]||[];for(const _0x2453c3 of _0x326b12){if('XCgEm'!==_0x4ea7cc(0x2f8)){_0x4983b5['rewards'][_0x1e1ae3][_0x4ea7cc(0x320)](_0x2453c3),_0x4983b5[_0x4ea7cc(0x1f1)][_0x1e1ae3][_0x4ea7cc(0x320)](_0x2453c3),_0x4983b5[_0x4ea7cc(0x275)][_0x1e1ae3][_0x4ea7cc(0x320)](_0x2453c3);switch(_0x2af800){case _0x4ea7cc(0x177):case _0x4ea7cc(0x252):_0x4983b5[_0x4ea7cc(0x1fb)][_0x1e1ae3][_0x4ea7cc(0x32d)](_0x2453c3);break;case _0x4ea7cc(0x1b2):case _0x4ea7cc(0x32e):_0x4983b5[_0x4ea7cc(0x1f1)][_0x1e1ae3][_0x4ea7cc(0x32d)](_0x2453c3);break;case _0x4ea7cc(0x2eb):case _0x4ea7cc(0x234):_0x4983b5['rewardsDenied'][_0x1e1ae3][_0x4ea7cc(0x32d)](_0x2453c3);break;case _0x4ea7cc(0x320):case _0x4ea7cc(0x16e):break;}}else _0x204c48['prototype'][_0x4ea7cc(0x1e3)]['call'](this,_0x392bb6);}},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x1ae)]=function(_0x16b4b6){const _0x199018=_0x435e5d;_0x16b4b6=_0x16b4b6['toUpperCase']()[_0x199018(0x16b)]();const _0x23552c=this['quest'](_0x16b4b6);if(!_0x23552c)return'';const _0x1955dd=this[_0x199018(0x17c)]();return _0x1955dd[_0x199018(0x1f1)]=_0x1955dd['rewardsClaimed']||{},_0x1955dd[_0x199018(0x1f1)][_0x16b4b6]=_0x1955dd[_0x199018(0x1f1)][_0x16b4b6]||[],_0x1955dd['rewardsClaimed'][_0x16b4b6][_0x199018(0x321)]((_0x380da4,_0x2d9f5d)=>_0x380da4-_0x2d9f5d);},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x1b1)]=function(_0xbc0fa5){const _0x2e1ff2=_0x435e5d;_0xbc0fa5=_0xbc0fa5['toUpperCase']()[_0x2e1ff2(0x16b)]();const _0x2d5b55=this[_0x2e1ff2(0x2f4)](_0xbc0fa5);if(!_0x2d5b55)return'';const _0x1dfe30=this['questData']();return _0x1dfe30['rewardsDenied']=_0x1dfe30[_0x2e1ff2(0x275)]||{},_0x1dfe30['rewardsDenied'][_0xbc0fa5]=_0x1dfe30[_0x2e1ff2(0x275)][_0xbc0fa5]||[],_0x1dfe30['rewardsDenied'][_0xbc0fa5]['sort']((_0x17ed45,_0x426eb4)=>_0x17ed45-_0x426eb4);},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x1f6)]=function(_0x48a319){const _0x5ab903=_0x435e5d;_0x48a319=_0x48a319['toUpperCase']()['trim']();const _0x388088=this['quest'](_0x48a319);if(!_0x388088)return'';const _0x3a3c00=this[_0x5ab903(0x17c)]()[_0x5ab903(0x1f3)];_0x3a3c00[_0x48a319]=_0x3a3c00[_0x48a319]||0x1;const _0x27c267=_0x3a3c00[_0x48a319];return _0x388088[_0x5ab903(0x2d2)][_0x27c267]||'';},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x251)]=function(_0x402353,_0x50952f){const _0xaada51=_0x435e5d;_0x402353=_0x402353['toUpperCase']()['trim']();const _0x47a8cb=this[_0xaada51(0x2f4)](_0x402353);if(!_0x47a8cb)return'';const _0x257ed9=this['questData']()[_0xaada51(0x1f3)];_0x257ed9[_0x402353]=_0x50952f;},Game_System[_0x435e5d(0x2ee)]['questQuote']=function(_0x3ec502){const _0x4849b3=_0x435e5d;_0x3ec502=_0x3ec502['toUpperCase']()[_0x4849b3(0x16b)]();const _0x2be2c=this[_0x4849b3(0x2f4)](_0x3ec502);if(!_0x2be2c)return'';const _0x30370f=this[_0x4849b3(0x17c)]()[_0x4849b3(0x2e4)];_0x30370f[_0x3ec502]=_0x30370f[_0x3ec502]||0x1;const _0x2235cb=_0x30370f[_0x3ec502];return _0x2be2c['Quotes'][_0x2235cb]||'';},Game_System[_0x435e5d(0x2ee)][_0x435e5d(0x164)]=function(_0x339066,_0x1e929c){const _0x26285e=_0x435e5d;_0x339066=_0x339066[_0x26285e(0x1ef)]()[_0x26285e(0x16b)]();const _0x238868=this[_0x26285e(0x2f4)](_0x339066);if(!_0x238868)return'';const _0x2c01d9=this[_0x26285e(0x17c)]()[_0x26285e(0x2e4)];_0x2c01d9[_0x339066]=_0x1e929c;},Game_System['prototype'][_0x435e5d(0x30c)]=function(){const _0x317b65=_0x435e5d,_0xb685e7=this['questData']();return this[_0x317b65(0x2f4)](_0xb685e7[_0x317b65(0x32a)]);},Game_System[_0x435e5d(0x2ee)]['setTrackedQuest']=function(_0x4ec320,_0x1b186c){const _0x360bc6=_0x435e5d,_0x223df6=this['questData']();if(_0x1b186c&&_0x223df6['tracked']===_0x4ec320)_0x4ec320='';_0x223df6['tracked']=_0x4ec320,SceneManager[_0x360bc6(0x149)]()&&SceneManager['_scene'][_0x360bc6(0x23a)](_0x4ec320);},Game_System[_0x435e5d(0x2ee)]['isQuestTrackerVisible']=function(){const _0x4e220b=_0x435e5d,_0x317c40=this['questData']();return _0x317c40[_0x4e220b(0x2b0)];},Game_System[_0x435e5d(0x2ee)]['setQuestTrackerVisible']=function(_0x3f3d7c){const _0x1b8dcc=_0x435e5d,_0x493e4f=this[_0x1b8dcc(0x17c)]();_0x493e4f[_0x1b8dcc(0x2b0)]=_0x3f3d7c;},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x1a0)]=Game_BattlerBase[_0x435e5d(0x2ee)][_0x435e5d(0x23e)],Game_BattlerBase[_0x435e5d(0x2ee)][_0x435e5d(0x23e)]=function(_0x17aac9){const _0xadcac7=_0x435e5d,_0x3148d4=this[_0xadcac7(0x286)]();VisuMZ[_0xadcac7(0x333)][_0xadcac7(0x1a0)][_0xadcac7(0x21a)](this,_0x17aac9),this[_0xadcac7(0x33a)](_0x17aac9,_0x3148d4);},Game_BattlerBase[_0x435e5d(0x2ee)][_0x435e5d(0x33a)]=function(_0x57c91f,_0x4ac627){const _0x28fb34=_0x435e5d;if(_0x57c91f!==this[_0x28fb34(0x1dd)]())return;if(!this[_0x28fb34(0x14c)]())return;if(!_0x4ac627)return;if(!this['isDead']())return;if(this['_hasDiedBefore'])return;this[_0x28fb34(0x225)]=!![];const _0x2f54e1=this[_0x28fb34(0x152)]()['note'],_0x25d5a7=_0x2f54e1[_0x28fb34(0x1bf)](/<VARIABLE (\d+) ON DEATH: ([\+\-]\d+)>/gi);if(_0x25d5a7)for(const _0x29b3cc of _0x25d5a7){_0x29b3cc[_0x28fb34(0x1bf)](/<VARIABLE (\d+) ON DEATH: ([\+\-]\d+)>/i);const _0xf14c9=Number(RegExp['$1']),_0x338ed0=Number(RegExp['$2']),_0x481a6a=$gameVariables[_0x28fb34(0x268)](_0xf14c9);$gameVariables[_0x28fb34(0x17a)](_0xf14c9,_0x481a6a+_0x338ed0);}},VisuMZ['QuestSystem'][_0x435e5d(0x14f)]=Game_Battler[_0x435e5d(0x2ee)][_0x435e5d(0x2ea)],Game_Battler[_0x435e5d(0x2ee)][_0x435e5d(0x2ea)]=function(_0x208cda){const _0x190a6a=_0x435e5d;VisuMZ[_0x190a6a(0x333)][_0x190a6a(0x14f)][_0x190a6a(0x21a)](this,_0x208cda),this['questJournalSystemUseItem'](_0x208cda);},Game_Battler[_0x435e5d(0x2ee)][_0x435e5d(0x2d6)]=function(_0x104ff6){const _0x435e31=_0x435e5d;if(!_0x104ff6)return;if(!this['isActor']())return;const _0x117511=_0x104ff6[_0x435e31(0x2ca)],_0x25dbac=_0x117511[_0x435e31(0x1bf)](/<VARIABLE (\d+) ON USE: ([\+\-]\d+)>/gi);if(_0x25dbac){if(_0x435e31(0x2bd)==='oSsKj'){if(!this[_0x435e31(0x2f0)])return;_0x5a78e9=_0x310b98[_0x435e31(0x1ef)]()['trim']();const _0x40fdaf=_0x2e39b5[_0x435e31(0x2f4)](_0x456600);this[_0x435e31(0x2f0)]['setQuest'](_0x40fdaf);}else for(const _0x1a44a7 of _0x25dbac){if(_0x435e31(0x2d1)===_0x435e31(0x2e3)){_0x55ab19[_0x435e31(0x333)][_0x435e31(0x172)][_0x435e31(0x20b)][_0x435e31(0x1da)]();let _0x11910f=this['getEmptyLogFmt']();return _0x11910f=_0x11c2b0[_0x435e31(0x333)]['applyWordWrap'](_0x11910f),_0x11910f=_0x4ced07['QuestSystem'][_0x435e31(0x18b)](_0x11910f),_0x11910f;}else{_0x1a44a7[_0x435e31(0x1bf)](/<VARIABLE (\d+) ON USE: ([\+\-]\d+)>/i);const _0x572dff=Number(RegExp['$1']),_0x2f0bae=Number(RegExp['$2']),_0x54182f=$gameVariables[_0x435e31(0x268)](_0x572dff);$gameVariables[_0x435e31(0x17a)](_0x572dff,_0x54182f+_0x2f0bae);}}}},VisuMZ[_0x435e5d(0x333)]['Game_Actor_tradeItemWithParty']=Game_Actor['prototype'][_0x435e5d(0x34c)],Game_Actor[_0x435e5d(0x2ee)][_0x435e5d(0x34c)]=function(_0x37768c,_0x2e665d){const _0x3c50f6=_0x435e5d;$gameTemp[_0x3c50f6(0x2da)]=!![];const _0x180554=VisuMZ['QuestSystem'][_0x3c50f6(0x227)][_0x3c50f6(0x21a)](this,_0x37768c,_0x2e665d);return $gameTemp[_0x3c50f6(0x2da)]=undefined,_0x180554;},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x1fd)]=Game_Party['prototype']['gainItem'],Game_Party['prototype'][_0x435e5d(0x2f9)]=function(_0x4d25d7,_0x718e6b,_0x50fe8a){const _0x1922b0=_0x435e5d;VisuMZ[_0x1922b0(0x333)]['Game_Party_gainItem']['call'](this,_0x4d25d7,_0x718e6b,_0x50fe8a),this[_0x1922b0(0x194)](_0x4d25d7,_0x718e6b);},Game_Party['prototype'][_0x435e5d(0x194)]=function(_0x4cb111,_0x143664){const _0x10f1ac=_0x435e5d;if(!_0x4cb111)return;if($gameTemp['_tradeItemWithParty'])return;const _0x18bd5a=_0x4cb111[_0x10f1ac(0x2ca)];if(_0x143664>0x0){if(_0x10f1ac(0x26c)!==_0x10f1ac(0x26c)){if(_0x23d466[_0x10f1ac(0x150)])return _0x1e24ce;return _0x12790c=_0x243981[_0x10f1ac(0x232)](/<COLORLOCK>/gi,''),_0x400128=_0x594fa6['replace'](/<\/COLORLOCK>/gi,''),_0x5a1f50;}else{const _0x31d45e=_0x18bd5a[_0x10f1ac(0x1bf)](/<VARIABLE (\d+) ON GAIN: ([\+\-]\d+)>/gi);if(_0x31d45e){if(_0x10f1ac(0x1ee)!==_0x10f1ac(0x1ee)){const _0x23d133=this[_0x10f1ac(0x17c)]();return this[_0x10f1ac(0x2f4)](_0x23d133[_0x10f1ac(0x32a)]);}else for(const _0x1260a3 of _0x31d45e){_0x1260a3[_0x10f1ac(0x1bf)](/<VARIABLE (\d+) ON GAIN: ([\+\-]\d+)>/i);const _0xa06d53=Number(RegExp['$1']),_0x3dc458=Number(RegExp['$2'])*_0x143664,_0xb6bc30=$gameVariables['value'](_0xa06d53);$gameVariables[_0x10f1ac(0x17a)](_0xa06d53,_0xb6bc30+_0x3dc458);}}}}else{if(_0x143664<0x0){const _0x127025=_0x18bd5a[_0x10f1ac(0x1bf)](/<VARIABLE (\d+) ON LOSE: ([\+\-]\d+)>/gi);if(_0x127025)for(const _0x35884a of _0x127025){_0x35884a[_0x10f1ac(0x1bf)](/<VARIABLE (\d+) ON LOSE: ([\+\-]\d+)>/i);const _0x2cceae=Number(RegExp['$1']),_0x23947a=Number(RegExp['$2'])*_0x143664,_0x372478=$gameVariables['value'](_0x2cceae);$gameVariables[_0x10f1ac(0x17a)](_0x2cceae,_0x372478+_0x23947a);}}}const _0x102d04=_0x18bd5a['match'](/<TRACK WITH VARIABLE (\d+)>/gi);if(_0x102d04){if(_0x10f1ac(0x262)!==_0x10f1ac(0x262))this[_0x10f1ac(0x34d)](_0x41590c,_0x31dd4a['x'],_0x2f6f54['y'],_0x5460f2);else for(const _0x3ce88d of _0x102d04){_0x3ce88d['match'](/<TRACK WITH VARIABLE (\d+)>/i);const _0x22ec5f=Number(RegExp['$1']),_0x188a51=$gameParty[_0x10f1ac(0x2ae)](_0x4cb111);$gameVariables['setValue'](_0x22ec5f,_0x188a51);}}},VisuMZ[_0x435e5d(0x333)]['Game_Map_requestRefresh']=Game_Map[_0x435e5d(0x2ee)]['requestRefresh'],Game_Map['prototype']['requestRefresh']=function(){const _0x3ddc55=_0x435e5d;VisuMZ['QuestSystem'][_0x3ddc55(0x1ba)][_0x3ddc55(0x21a)](this),SceneManager[_0x3ddc55(0x149)]()&&!this[_0x3ddc55(0x1bb)]&&(this[_0x3ddc55(0x1bb)]=!![]);},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x2a3)]=Game_Map[_0x435e5d(0x2ee)][_0x435e5d(0x2c3)],Game_Map[_0x435e5d(0x2ee)]['refresh']=function(){const _0x3b1720=_0x435e5d;VisuMZ[_0x3b1720(0x333)]['Game_Map_refresh'][_0x3b1720(0x21a)](this);if(SceneManager['isSceneMap']()&&this[_0x3b1720(0x1bb)]){if('cWbfK'!==_0x3b1720(0x18d))SceneManager['_scene'][_0x3b1720(0x2e7)](),this['_isRefreshingQuestTrackerWindow']=![];else{if(!this[_0x3b1720(0x340)]())return;const _0x12ab60=_0x3b1720(0x247),_0x582a4f=_0x5390bd[_0x3b1720(0x21e)];let _0x2ae44b=_0x57b236[_0x3b1720(0x182)];_0x582a4f>0x0&&this[_0x3b1720(0x1a4)]()!==_0x3b1720(0x162)&&(_0x2ae44b=_0x3b1720(0x2b9)['format'](_0x582a4f,_0x2ae44b));const _0x487ab5=this['isFailedQuestsEnabled']();this['addCommand'](_0x2ae44b,_0x12ab60,_0x487ab5);}}},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x240)]=Scene_Map['prototype'][_0x435e5d(0x15c)],Scene_Map[_0x435e5d(0x2ee)][_0x435e5d(0x15c)]=function(){const _0x157a0e=_0x435e5d;VisuMZ[_0x157a0e(0x333)][_0x157a0e(0x240)]['call'](this),this[_0x157a0e(0x2cc)]();},Scene_Map[_0x435e5d(0x2ee)]['createQuestTrackerWindow']=function(){const _0x3b139e=_0x435e5d;if(!SceneManager[_0x3b139e(0x149)]())return;const _0x563aff=this[_0x3b139e(0x1f5)](),_0x95f4c2=new Window_QuestTracker(_0x563aff);this[_0x3b139e(0x2d4)](_0x95f4c2),this[_0x3b139e(0x2f0)]=_0x95f4c2;},Scene_Map[_0x435e5d(0x2ee)][_0x435e5d(0x1ac)]=function(){return ConfigManager['questTrackerPosition'];},Scene_Map['prototype'][_0x435e5d(0x1f5)]=function(){const _0x50cda1=_0x435e5d;return VisuMZ[_0x50cda1(0x333)]['Settings'][_0x50cda1(0x26e)][_0x50cda1(0x2ce)][_0x50cda1(0x21a)](this);},Scene_Map[_0x435e5d(0x2ee)][_0x435e5d(0x2e7)]=function(){const _0x16bf6c=_0x435e5d;if(!this['_questTrackerWindow'])return;this['_questTrackerWindow'][_0x16bf6c(0x2c3)]();},Scene_Map[_0x435e5d(0x2ee)]['setQuestForQuestTrackerWindow']=function(_0x56550c){const _0x546282=_0x435e5d;if(!this[_0x546282(0x2f0)])return;_0x56550c=_0x56550c['toUpperCase']()[_0x546282(0x16b)]();const _0x39779c=$gameSystem['quest'](_0x56550c);this[_0x546282(0x2f0)][_0x546282(0x1fa)](_0x39779c);},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x28d)]=Scene_Menu[_0x435e5d(0x2ee)][_0x435e5d(0x14d)],Scene_Menu[_0x435e5d(0x2ee)]['createCommandWindow']=function(){const _0x2c4e49=_0x435e5d;VisuMZ[_0x2c4e49(0x333)][_0x2c4e49(0x28d)][_0x2c4e49(0x21a)](this),this[_0x2c4e49(0x213)][_0x2c4e49(0x1d1)](_0x2c4e49(0x2f4),this[_0x2c4e49(0x2fd)][_0x2c4e49(0x258)](this));},Scene_Menu['prototype'][_0x435e5d(0x2fd)]=function(){const _0x41c694=_0x435e5d;SceneManager[_0x41c694(0x32d)](Scene_Quest);},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x29d)]=Scene_Options[_0x435e5d(0x2ee)]['maxCommands'],Scene_Options[_0x435e5d(0x2ee)][_0x435e5d(0x32f)]=function(){const _0x3d8527=_0x435e5d;let _0x3c39f=VisuMZ[_0x3d8527(0x333)]['Scene_Options_maxCommands'][_0x3d8527(0x21a)](this);if(VisuMZ['QuestSystem'][_0x3d8527(0x172)][_0x3d8527(0x192)][_0x3d8527(0x257)]){if(VisuMZ[_0x3d8527(0x333)][_0x3d8527(0x172)][_0x3d8527(0x192)]['AddShowOption'])_0x3c39f++;if(VisuMZ['QuestSystem']['Settings'][_0x3d8527(0x192)][_0x3d8527(0x1d4)])_0x3c39f++;}return _0x3c39f;};function Scene_Quest(){this['initialize'](...arguments);}Scene_Quest[_0x435e5d(0x2ee)]=Object[_0x435e5d(0x291)](Scene_MenuBase[_0x435e5d(0x2ee)]),Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x1c0)]=Scene_Quest,Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x26d)]=function(){const _0x481c29=_0x435e5d;Scene_MenuBase[_0x481c29(0x2ee)]['initialize'][_0x481c29(0x21a)](this);},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x34e)]=function(){return 0x0;},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x31f)]=function(){const _0x14f588=_0x435e5d;if(ConfigManager[_0x14f588(0x30b)]&&ConfigManager[_0x14f588(0x27e)]!==undefined){if(_0x14f588(0x2f6)==='wRtny')_0x470c5a[_0x14f588(0x2ab)](_0x14f588(0x249))&&this[_0x14f588(0x272)](_0x4ee4d1['scrollSpeed']),_0x210f33[_0x14f588(0x2ab)](_0x14f588(0x34f))&&this['smoothScrollUp'](_0x3c9b66[_0x14f588(0x2de)]);else return ConfigManager[_0x14f588(0x27e)];}else{if(ConfigManager[_0x14f588(0x30b)]===![]){if(_0x14f588(0x16d)==='pQVBS'){if(this[_0x14f588(0x2e0)]===_0x3f8e10)return;this[_0x14f588(0x2e0)]=_0x5a40bb,this[_0x14f588(0x2c3)]();}else return![];}else{if(_0x14f588(0x147)===_0x14f588(0x147))return Scene_MenuBase[_0x14f588(0x2ee)]['isRightInputMode']['call'](this);else{const _0x2d85cd=this[_0x14f588(0x2df)]()||0x1,_0x5c6e0b=this[_0x14f588(0x25e)]()||0x1,_0x5a5863=this[_0x14f588(0x2e6)]-this[_0x14f588(0x2e6)]%_0x2d85cd,_0x4bc224=this[_0x14f588(0x2a5)]-this[_0x14f588(0x2a5)]%_0x5c6e0b;(_0x5a5863!==this['_scrollBaseX']||_0x4bc224!==this[_0x14f588(0x2c4)])&&(this[_0x14f588(0x22b)](_0x5a5863,_0x4bc224),this[_0x14f588(0x1d3)]()),this[_0x14f588(0x339)]['x']=this[_0x14f588(0x2e6)],this[_0x14f588(0x339)]['y']=this[_0x14f588(0x2a5)];}}}},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x2c5)]=function(){const _0x47ff6c=_0x435e5d;return(Graphics[_0x47ff6c(0x261)]-0x230)[_0x47ff6c(0x287)](0xf0,Math[_0x47ff6c(0x18a)](Graphics[_0x47ff6c(0x261)]/0x2));},Scene_Quest[_0x435e5d(0x2ee)]['create']=function(){const _0x4b6bf4=_0x435e5d;Scene_MenuBase[_0x4b6bf4(0x2ee)][_0x4b6bf4(0x291)][_0x4b6bf4(0x21a)](this),this[_0x4b6bf4(0x14d)](),this[_0x4b6bf4(0x1aa)](),this[_0x4b6bf4(0x2c6)](),this[_0x4b6bf4(0x1d9)]();},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x14d)]=function(){const _0x16acf6=_0x435e5d,_0x4df177=this['commandWindowRect'](),_0x52e166=new Window_QuestCommand(_0x4df177);_0x52e166['setHandler'](_0x16acf6(0x252),this[_0x16acf6(0x1ea)][_0x16acf6(0x258)](this)),_0x52e166['setHandler'](_0x16acf6(0x1d2),this[_0x16acf6(0x1ea)][_0x16acf6(0x258)](this)),_0x52e166['setHandler'](_0x16acf6(0x247),this[_0x16acf6(0x1ea)]['bind'](this)),_0x52e166['setHandler'](_0x16acf6(0x180),this[_0x16acf6(0x20f)]['bind'](this)),this[_0x16acf6(0x315)](_0x52e166),this[_0x16acf6(0x213)]=_0x52e166,_0x52e166[_0x16acf6(0x289)](VisuMZ[_0x16acf6(0x333)][_0x16acf6(0x172)][_0x16acf6(0x26e)][_0x16acf6(0x30e)]);},Scene_Quest['prototype'][_0x435e5d(0x173)]=function(){const _0x433ff3=_0x435e5d;return VisuMZ['QuestSystem'][_0x433ff3(0x172)][_0x433ff3(0x26e)]['CommandWindow_Rect']['call'](this);},Scene_Quest['prototype']['createQuestLabelWindow']=function(){const _0x1b5c59=_0x435e5d,_0x1d134b=this[_0x1b5c59(0x27f)](),_0x258174=new Window_Base(_0x1d134b);this[_0x1b5c59(0x315)](_0x258174),this[_0x1b5c59(0x343)]=_0x258174,_0x258174['setBackgroundType'](VisuMZ[_0x1b5c59(0x333)]['Settings'][_0x1b5c59(0x26e)][_0x1b5c59(0x256)]);},Scene_Quest['prototype'][_0x435e5d(0x27f)]=function(){const _0x5c0ff0=_0x435e5d;return VisuMZ['QuestSystem'][_0x5c0ff0(0x172)][_0x5c0ff0(0x26e)]['QuestLabel_Rect'][_0x5c0ff0(0x21a)](this);},Scene_Quest['prototype'][_0x435e5d(0x2c6)]=function(){const _0x375745=_0x435e5d,_0x383452=this[_0x375745(0x246)](),_0x14e71a=new Window_QuestLog(_0x383452);this[_0x375745(0x315)](_0x14e71a),this['_logWindow']=_0x14e71a,_0x14e71a[_0x375745(0x289)](VisuMZ[_0x375745(0x333)]['Settings'][_0x375745(0x26e)][_0x375745(0x190)]);},Scene_Quest[_0x435e5d(0x2ee)]['questLogWindowRect']=function(){const _0xa2ae49=_0x435e5d;return VisuMZ[_0xa2ae49(0x333)][_0xa2ae49(0x172)][_0xa2ae49(0x26e)][_0xa2ae49(0x2f2)][_0xa2ae49(0x21a)](this);},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x1d9)]=function(){const _0x218b2b=_0x435e5d,_0x24d404=this['questListWindowRect'](),_0x3c20f8=new Window_QuestList(_0x24d404);_0x3c20f8[_0x218b2b(0x1d1)]('category',this[_0x218b2b(0x1d5)][_0x218b2b(0x258)](this)),_0x3c20f8['setHandler'](_0x218b2b(0x2f4),this['onListQuest']['bind'](this)),_0x3c20f8[_0x218b2b(0x1d1)]('cancel',this['onListCancel']['bind'](this)),this[_0x218b2b(0x315)](_0x3c20f8),this['_listWindow']=_0x3c20f8,_0x3c20f8['setBackgroundType'](VisuMZ['QuestSystem']['Settings'][_0x218b2b(0x26e)][_0x218b2b(0x1eb)]),this[_0x218b2b(0x213)][_0x218b2b(0x168)](this[_0x218b2b(0x161)]),this['_listWindow']['setLabelWindow'](this[_0x218b2b(0x343)]),this['_listWindow'][_0x218b2b(0x23f)](this['_logWindow']);},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x148)]=function(){const _0xfd0299=_0x435e5d;return VisuMZ[_0xfd0299(0x333)]['Settings'][_0xfd0299(0x26e)][_0xfd0299(0x2d9)][_0xfd0299(0x21a)](this);},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x1ea)]=function(){const _0xc9c57=_0x435e5d;this[_0xc9c57(0x161)][_0xc9c57(0x1ff)](),this[_0xc9c57(0x161)][_0xc9c57(0x2ed)](0x0);},Scene_Quest[_0x435e5d(0x2ee)]['onListCategory']=function(){const _0x479b37=_0x435e5d;this[_0x479b37(0x161)][_0x479b37(0x244)](),this[_0x479b37(0x161)][_0x479b37(0x1ff)]();},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x16f)]=function(){const _0x466925=_0x435e5d,_0x4e4e38=this[_0x466925(0x161)][_0x466925(0x195)](),_0x2ef425=_0x4e4e38[_0x466925(0x2dd)][_0x466925(0x1ef)]()[_0x466925(0x16b)]();$gameSystem[_0x466925(0x22d)](_0x2ef425,!![]),this[_0x466925(0x161)]['refresh'](),this[_0x466925(0x161)][_0x466925(0x1ff)]();},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x1c9)]=function(){const _0x17e568=_0x435e5d;this[_0x17e568(0x161)][_0x17e568(0x2e9)](),this[_0x17e568(0x213)]['activate']();},Scene_Quest['prototype'][_0x435e5d(0x1df)]=function(){const _0x135407=_0x435e5d;return TextManager[_0x135407(0x341)];},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x33f)]=function(){const _0x43ff0c=_0x435e5d;if(this[_0x43ff0c(0x161)]&&this[_0x43ff0c(0x161)][_0x43ff0c(0x2b8)]){if(this[_0x43ff0c(0x161)][_0x43ff0c(0x195)]())return _0x43ff0c(0x1c7)!=='IYOnv'?this[_0x43ff0c(0x161)]['isOkEnabled']()?TextManager[_0x43ff0c(0x30a)]:'':_0x23ef22[_0x43ff0c(0x333)][_0x43ff0c(0x172)][_0x43ff0c(0x26e)][_0x43ff0c(0x191)][_0x43ff0c(0x21a)](this);else return this[_0x43ff0c(0x161)][_0x43ff0c(0x310)]()?TextManager[_0x43ff0c(0x33e)]:_0x43ff0c(0x231)===_0x43ff0c(0x231)?TextManager[_0x43ff0c(0x181)]:this[_0x43ff0c(0x205)]();}return Scene_MenuBase[_0x43ff0c(0x2ee)]['buttonAssistText4']['call'](this);},Scene_Quest['prototype']['createBackground']=function(){const _0x16288c=_0x435e5d;Scene_MenuBase['prototype'][_0x16288c(0x2dc)][_0x16288c(0x21a)](this),this[_0x16288c(0x23d)](this[_0x16288c(0x209)]()),this[_0x16288c(0x326)]();},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x209)]=function(){const _0x239dd2=_0x435e5d;return VisuMZ[_0x239dd2(0x333)][_0x239dd2(0x172)][_0x239dd2(0x259)]['SnapshotOpacity'];},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x326)]=function(){const _0x3ce1ff=_0x435e5d,_0x54cd7b={'BgFilename1':VisuMZ[_0x3ce1ff(0x333)][_0x3ce1ff(0x172)][_0x3ce1ff(0x259)][_0x3ce1ff(0x306)],'BgFilename2':VisuMZ[_0x3ce1ff(0x333)][_0x3ce1ff(0x172)][_0x3ce1ff(0x259)][_0x3ce1ff(0x223)]};_0x54cd7b&&(_0x54cd7b['BgFilename1']!==''||_0x54cd7b[_0x3ce1ff(0x223)]!=='')&&(this[_0x3ce1ff(0x292)]=new Sprite(ImageManager[_0x3ce1ff(0x1a5)](_0x54cd7b[_0x3ce1ff(0x306)])),this['_backSprite2']=new Sprite(ImageManager['loadTitle2'](_0x54cd7b['BgFilename2'])),this[_0x3ce1ff(0x2d4)](this[_0x3ce1ff(0x292)]),this[_0x3ce1ff(0x2d4)](this[_0x3ce1ff(0x208)]),this[_0x3ce1ff(0x292)][_0x3ce1ff(0x312)][_0x3ce1ff(0x218)](this['adjustSprite']['bind'](this,this[_0x3ce1ff(0x292)])),this[_0x3ce1ff(0x208)][_0x3ce1ff(0x312)][_0x3ce1ff(0x218)](this[_0x3ce1ff(0x201)][_0x3ce1ff(0x258)](this,this[_0x3ce1ff(0x208)])));},Scene_Quest[_0x435e5d(0x2ee)][_0x435e5d(0x201)]=function(_0x5b7ce1){const _0x1bfe47=_0x435e5d;this[_0x1bfe47(0x334)](_0x5b7ce1),this[_0x1bfe47(0x20a)](_0x5b7ce1);},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x16c)]=Window_MenuCommand[_0x435e5d(0x2ee)][_0x435e5d(0x2a2)],Window_MenuCommand[_0x435e5d(0x2ee)][_0x435e5d(0x2a2)]=function(){const _0x14a370=_0x435e5d;VisuMZ['QuestSystem'][_0x14a370(0x16c)][_0x14a370(0x21a)](this),this[_0x14a370(0x1a9)]();},Window_MenuCommand[_0x435e5d(0x2ee)][_0x435e5d(0x1a9)]=function(){const _0x380399=_0x435e5d;if(!this['addQuestCommandAutomatically']())return;if(!this[_0x380399(0x27c)]())return;const _0x53ef32=TextManager['questCommandName'],_0x288c27=this[_0x380399(0x1c4)]();this[_0x380399(0x170)](_0x53ef32,'quest',_0x288c27);},Window_MenuCommand[_0x435e5d(0x2ee)][_0x435e5d(0x347)]=function(){const _0x2b16f8=_0x435e5d;return Imported[_0x2b16f8(0x2ba)]?![]:!![];},Window_MenuCommand[_0x435e5d(0x2ee)]['isQuestCommandVisible']=function(){return $gameSystem['isquestMenuShown']();},Window_MenuCommand[_0x435e5d(0x2ee)][_0x435e5d(0x1c4)]=function(){const _0x44ea0c=_0x435e5d;return $gameSystem[_0x44ea0c(0x15b)]();},VisuMZ['QuestSystem'][_0x435e5d(0x2e1)]=Window_Options[_0x435e5d(0x2ee)][_0x435e5d(0x226)],Window_Options[_0x435e5d(0x2ee)][_0x435e5d(0x226)]=function(){const _0x25a122=_0x435e5d;VisuMZ['QuestSystem'][_0x25a122(0x2e1)][_0x25a122(0x21a)](this),this['addQuestSystemCommands']();},Window_Options[_0x435e5d(0x2ee)][_0x435e5d(0x1d6)]=function(){const _0x41fdc4=_0x435e5d;VisuMZ[_0x41fdc4(0x333)]['Settings']['Tracker'][_0x41fdc4(0x265)]&&this[_0x41fdc4(0x1ad)](),VisuMZ[_0x41fdc4(0x333)][_0x41fdc4(0x172)][_0x41fdc4(0x192)][_0x41fdc4(0x1d4)]&&this['addQuestSystemquestTrackerPositionCommand']();},Window_Options[_0x435e5d(0x2ee)]['addQuestSystemquestTrackerShowCommand']=function(){const _0x5e64ef=_0x435e5d,_0x51667e=TextManager[_0x5e64ef(0x26f)],_0x2c4a1d=_0x5e64ef(0x26f);this['addCommand'](_0x51667e,_0x2c4a1d);},Window_Options[_0x435e5d(0x2ee)]['addQuestSystemquestTrackerPositionCommand']=function(){const _0x5c0680=_0x435e5d,_0x3acfb3=TextManager['questTrackerPosition'],_0x39dd25=_0x5c0680(0x269);this['addCommand'](_0x3acfb3,_0x39dd25);},VisuMZ['QuestSystem'][_0x435e5d(0x311)]=Window_Options[_0x435e5d(0x2ee)][_0x435e5d(0x1c3)],Window_Options[_0x435e5d(0x2ee)][_0x435e5d(0x1c3)]=function(_0x2b4141){const _0x560c0d=_0x435e5d,_0xc7a3c3=this['commandSymbol'](_0x2b4141);if(_0xc7a3c3===_0x560c0d(0x269)){if(_0x560c0d(0x14e)===_0x560c0d(0x24a)){const _0x25fc3e=this[_0x560c0d(0x17c)]();return _0x25fc3e[_0x560c0d(0x252)]=_0x25fc3e[_0x560c0d(0x252)]||[],_0x25fc3e[_0x560c0d(0x252)][_0x560c0d(0x185)](_0x591ba4=>this[_0x560c0d(0x2f4)](_0x591ba4))['remove'](null);}else{const _0x4d311d=this['getConfigValue'](_0xc7a3c3);return _0x4d311d?TextManager[_0x560c0d(0x350)]:TextManager[_0x560c0d(0x1e2)];}}return VisuMZ[_0x560c0d(0x333)]['Window_Options_statusText'][_0x560c0d(0x21a)](this,_0x2b4141);};function Window_QuestCommand(){const _0x448744=_0x435e5d;this[_0x448744(0x26d)](...arguments);}function _0x4403(){const _0x22f569=['addQuestCommand','createQuestLabelWindow','PZyLZ','questTrackerOnRight','addQuestSystemquestTrackerShowCommand','questRewardsClaimed','TrackerWindow_Scale','shown','questRewardsDenied','claim','textSizeEx','GjYLs','isQuestCompleted','questLogFmt','SystemShowQuestMenu','YybNd','From','Game_Map_requestRefresh','_isRefreshingQuestTrackerWindow','TrackerChangeQuest','update','totalCommands','match','constructor','height','auto','statusText','isQuestCommandEnabled','questsCompleted','baseTextRect','dchLN','nCjPb','onListCancel','categoryList','description','commandName','QuestObjectives','name','category','setLabelWindow','setHandler','completed','paint','AddPositionOption','onListCategory','addQuestSystemCommands','VisibleObjectives','commandStyleCheck','createQuestListWindow','OnLoadQuestJS','CommandWindow_Completed_Text','LogWindow_Auto_WordWrap','deathStateId','Reward_Failed_Fmt','buttonAssistText1','Objective_Normal_Fmt','ShowName','questTrackerPosOff','drawItem','ConfigManager_makeData','CommandWindow_Known_Icon','questCompletedIcon','setQuestTrackerVisible','updateLabelWindow','questCategoryOpenedFmt','onCommandOk','ListWindow_BgType','wIXXy','objectivesFailed','XkJDj','toUpperCase','questTrackedQuestFmt','rewardsClaimed','FailedQuests','subtext','EmptyTitleLabel','questTrackerWindow','questSubtext','applyWordWrap','QuestQuote','questDescription','setQuest','rewards','questKnownCmd','Game_Party_gainItem','Name','activate','SystemEnableQuestMenu','adjustSprite','createEmptyText','onDatabaseLoaded','CategoryName','contentsHeight','5556vwDjBD','ConvertParams','_backSprite2','getBackgroundOpacity','centerSprite','General','21967sFKHUK','Description','_messageWindow','popScene','CmdStyle','makeData','iconWidth','_commandWindow','EnableMainMenu','LogFmt','SystemCallSceneQuest','getQuestLogFmt','addLoadListener','resetFontSettings','call','hNJwZ','ButtonAssistPageUpDown','setQuestObjectives','questFailedIcon','unshift','ypzWc','QuestSubtext','drawAllText','BgFilename2','_questTrackerRefresh','_hasDiedBefore','addGeneralOptions','Game_Actor_tradeItemWithParty','IyUsM','questObjectiveClearedFmt','questCompletedCmd','updateScrollBase','QuestData','setTrackedQuest','concat','addNoQuestsListedCommand','KnownQuests','PvOax','replace','Show','denied','isQuestFailed','questObjectives','length','_categoryStatus','LineBreakSpace','setQuestForQuestTrackerWindow','visibilityLevel','processWheelScroll','setBackgroundOpacity','addNewState','setLogWindow','Scene_Map_createSpriteset','68337PEMImB','registerCommand','hVdXJ','openCloseCurrentCategory','VisibleRewards','questLogWindowRect','failed','_scrollBaseX','pagedown','wxUKh','MessageCore','qBaSE','TargetIDs','updateOrigin','activeBgType','setQuestDescription','setQuestSubtext','known','YZubb','PzsOK','_categoryFilter','QuestLabel_BgType','AdjustRect','bind','BgSettings','questRewardsClaimedFmt','ButtonAssistCollapse','_commandNameWindow','callUpdateHelp','scrollBlockHeight','ewgfy','enabled','boxWidth','ScPrQ','center','isCategoryOpen','AddShowOption','currentSymbol','setQuestRewards','value','questTrackerPosition','itemLineRect','applyData','wJGhv','initialize','Window','questTrackerShow','includes','status','smoothScrollDown','contents','TrackerRefreshWindow','rewardsDenied','join','Keys','834216CYbJGE','Rewards','max','isDead','isQuestCommandVisible','questObjectivesFailed','uiInputPosition','questLabelWindowRect','FLgce','jEjxA','QuestDescription','fmZNL','CompletedQuests','parameters','isAlive','clamp','Status','setBackgroundType','createQuestRewards','WQbUC','isCompletedQuestsEnabled','Scene_Menu_createCommandWindow','NoQuestListed','drawItemStyleIcon','PYZmY','create','_backSprite1','addKnownQuestsCommand','MtYFM','LogEmpty','getTotalCategoryQuests','rArcA','iconHeight','\x0a\x5c{[[Title]]\x5c}\x0a[[Objectives]]\x0a','noQuestsListed','%1\x27s\x20version\x20does\x20not\x20match\x20plugin\x27s.\x20Please\x20update\x20it\x20in\x20the\x20Plugin\x20Manager.','<BR>','Scene_Options_maxCommands','RUTBy','iVVYo','createQuestDescription','ARRAYSTRUCT','addOriginalCommands','Game_Map_refresh','parse','_scrollY','questCategoryClosedFmt','initQuestSystem','right','defaultQuestTrackerFmt','Difficulty','isPressed','CommandWindow_Known_Text','joinQuestEntries','numItems','updateCommandNameWindow','showTracker','makeCommandList','ConfigManager_applyData','%1\x20is\x20missing\x20a\x20required\x20plugin.\x0aPlease\x20install\x20%2\x20into\x20the\x20Plugin\x20Manager.','questsKnown','Objective_Failed_Fmt','TrackerWindow_BgType','Location','active','\x5cI[%1]%2','VisuMZ_1_MainMenuCore','noMessageCoreRemoveEscapeCodes','clear','hHXKQ','Scene_Boot_onDatabaseLoaded','updateVisibility','iconText','setCategoryFilter','createCommandNameWindow','refresh','_scrollBaseY','mainCommandWidth','createQuestLogWindow','isquestMenuShown','130028kOFTTV','eyern','note','isKnownQuestsEnabled','createQuestTrackerWindow','index','TrackerWindow_Rect','convertLineBreaksForWordWrap','PositionOn','slsEh','Subtext','Game_System_initialize','addChild','process_VisuMZ_QuestSystem_Data','questJournalSystemUseItem','itemPadding','createQuestSubtext','ListWindow_Rect','_tradeItemWithParty','isQuestTrackerVisible','createBackground','Key','scrollSpeed','scrollBlockWidth','_quest','Window_Options_addGeneralOptions','AcbZp','njcgC','quotes','1948062ClCGgg','_scrollX','refreshQuestTrackerWindow','commandNameWindowDrawBackground','deselect','useItem','deny','xReWc','smoothSelect','prototype','questObjectiveFailedFmt','_questTrackerWindow','createQuestText','LogWindow_Rect','questRewardsDeniedFmt','quest','ListWindowCategoryOpenFmt','JNVwk','_quests','EGDQr','gainItem','eAGtC','CommandWindow_Completed_Icon','_logWindow','commandQuest','WnxHt','exit','Categories','MainMenu','filter','questsFailed','_scene','drawItemStyleIconText','BgFilename1','ARRAYFUNC','questRewardsNormalFmt','1RggGrA','questButtonAssistActive','uiMenuStyle','trackedQuest','getEmptyLogFmt','CommandWindow_BgType','windowPadding','isCurrentCategoryOpen','Window_Options_statusText','bitmap','width','yGDjZ','addWindow','Quests','RIjvn','doesCategoryHaveQuestsAvailable','questKnownIcon','isQuestKnown','RPuQV','moOHY','_delayDraw','NKUSx','isRightInputMode','remove','sort','CmdTextAlign','questObjectivesCompleted','version','Reward_Completed_Fmt','createCustomBackgroundImages','wordWrapSupport','commandNameWindowDrawText','icon','tracked','egtkh','overallHeight','push','claimed','maxCommands','OKcVh','questTrackerFmt','commandNameWindowCenter','QuestSystem','scaleSprite','lineHeight','smoothScrollUp','drawIcon','calculateTextHeight','origin','questJournalSystemAddDeath','mhLzH','innerWidth','noQuestsLabel','questButtonAssistCollapse','buttonAssistText4','isFailedQuestsVisible','questButtonAssistPageUpDn','setQuestStatus','_labelWindow','376752IcJtvU','currentExt','FUNC','addQuestCommandAutomatically','CommandWindow_Failed_Text','TrackerShowHide','Objectives','questObjectiveNormalFmt','tradeItemWithParty','drawTextEx','helpAreaHeight','pageup','questTrackerPosOn','mkQqQ','ARRAYSTR','NUM','oNrqh','questListWindowRect','isSceneMap','5598362xSSvRh','NGLQH','isEnemy','createCommandWindow','nXrwI','Game_Battler_useItem','VisuMZ_1_MessageCore','addFailedQuestsCommand','enemy','opacity','isCommandEnabled','<WORDWRAP>%1','questQuote','TargetID','questEmptyText','round','addCompletedQuestsCommand','isquestMenuEnabled','createSpriteset','ButtonAssistExpand','Title','createContents','changePaintOpacity','_listWindow','text','updatePageUpDownScroll','setQuestQuote','ShowFailed','_textHeight','YXjSa','setListWindow','Quotes','scale','trim','Window_MenuCommand_addOriginalCommands','ulhMo','removed','onListQuest','addCommand','zpqiS','Settings','commandWindowRect','objectivesCompleted','naTbc','questRewards','show','OCVWc','format','setValue','EtOgN','questData','left','isOkEnabled','maxItems','cancel','questButtonAssistExpand','questFailedCmd','%1\x20is\x20incorrectly\x20placed\x20on\x20the\x20plugin\x20list.\x0aIt\x20is\x20a\x20Tier\x20%2\x20plugin\x20placed\x20over\x20other\x20Tier\x20%3\x20plugins.\x0aPlease\x20reorder\x20the\x20plugin\x20list\x20from\x20smallest\x20to\x20largest\x20tier\x20numbers.','updateDelayRefresh','map','Reward_Normal_Fmt','QuestOrder','Fpdrn','uXedy','floor','finalizeWordWrapSupport','Rcddc','kZhXJ','applyWordWrapEntry','_doodadEditorMode','LogWindow_BgType','QuestLabel_Rect','Tracker','TrackedQuest','questJournalSystemGainItem','currentQuest','objectives','initCategories','PositionOff','20zgWvrp','33JCFeJK','ListWindowCategoryCloseFmt','makeDeepCopy','440FgIAgw','createQuestQuote','QeIFR','Game_BattlerBase_addNewState','drawText','deactivate','itemTextAlign','commandStyle','loadTitle1','addCategoryCommand','openness','STRUCT'];_0x4403=function(){return _0x22f569;};return _0x4403();}Window_QuestCommand[_0x435e5d(0x2ee)]=Object[_0x435e5d(0x291)](Window_Command[_0x435e5d(0x2ee)]),Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x1c0)]=Window_QuestCommand,Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x26d)]=function(_0xdf7aa3){const _0x1e8852=_0x435e5d;Window_Command[_0x1e8852(0x2ee)][_0x1e8852(0x26d)]['call'](this,_0xdf7aa3),this[_0x1e8852(0x2c2)](_0xdf7aa3);},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x2c2)]=function(_0x3954ee){const _0x378904=_0x435e5d,_0x7a2629=new Rectangle(0x0,0x0,_0x3954ee[_0x378904(0x313)],_0x3954ee[_0x378904(0x1c1)]);this[_0x378904(0x25c)]=new Window_Base(_0x7a2629),this['_commandNameWindow'][_0x378904(0x153)]=0x0,this[_0x378904(0x2d4)](this[_0x378904(0x25c)]),this[_0x378904(0x2af)]();},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x25d)]=function(){const _0x203e5c=_0x435e5d;Window_Command[_0x203e5c(0x2ee)]['callUpdateHelp'][_0x203e5c(0x21a)](this);if(this[_0x203e5c(0x25c)])this[_0x203e5c(0x2af)]();if(this['_listWindow'])this[_0x203e5c(0x161)]['setCategoryFilter'](this[_0x203e5c(0x266)]());},Window_QuestCommand['prototype'][_0x435e5d(0x2af)]=function(){const _0x350891=_0x435e5d,_0x291995=this['_commandNameWindow'];_0x291995[_0x350891(0x273)][_0x350891(0x2bc)]();const _0x57b5f3=this['commandStyleCheck'](this[_0x350891(0x2cd)]());if(_0x57b5f3===_0x350891(0x329)){if(_0x350891(0x31c)===_0x350891(0x31c)){const _0x282285=this[_0x350891(0x26a)](this['index']());let _0x298272=this[_0x350891(0x1cc)](this['index']());_0x298272=_0x298272[_0x350891(0x232)](/\\I\[(\d+)\]/gi,''),_0x291995[_0x350891(0x219)](),this[_0x350891(0x2e8)](_0x298272,_0x282285),this[_0x350891(0x328)](_0x298272,_0x282285),this[_0x350891(0x332)](_0x298272,_0x282285);}else{if(_0xb179d1['_questTrackerRefresh'])return;_0x4d019b[_0x350891(0x224)]=!![],_0x54f838[_0x350891(0x2ee)][_0x350891(0x2c3)][_0x350891(0x21a)](this),this['setBackgroundType'](this[_0x350891(0x2e0)]?_0x56c5ab['activeBgType']:0x2),_0x25fd21[_0x350891(0x224)]=![];}}},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x2e8)]=function(_0x9d7aa5,_0x539003){},Window_QuestCommand[_0x435e5d(0x2ee)]['commandNameWindowDrawText']=function(_0x328b29,_0x49c9f8){const _0x36c282=_0x435e5d,_0x52c6f5=this[_0x36c282(0x25c)];_0x52c6f5[_0x36c282(0x1a1)](_0x328b29,0x0,_0x49c9f8['y'],_0x52c6f5[_0x36c282(0x33c)],_0x36c282(0x263));},Window_QuestCommand['prototype'][_0x435e5d(0x332)]=function(_0x20c348,_0x3fee54){const _0x459bb9=_0x435e5d,_0x4745f6=this[_0x459bb9(0x25c)],_0x4182c2=$gameSystem[_0x459bb9(0x30f)](),_0x1e956a=_0x3fee54['x']+Math[_0x459bb9(0x18a)](_0x3fee54[_0x459bb9(0x313)]/0x2)+_0x4182c2;_0x4745f6['x']=_0x4745f6[_0x459bb9(0x313)]/-0x2+_0x1e956a,_0x4745f6['y']=Math[_0x459bb9(0x18a)](_0x3fee54[_0x459bb9(0x1c1)]/0x2);},Window_QuestCommand['prototype']['makeCommandList']=function(){const _0x4a17f2=_0x435e5d;this['addKnownQuestsCommand'](),this[_0x4a17f2(0x15a)](),this[_0x4a17f2(0x151)]();},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x293)]=function(){const _0x434242=_0x435e5d,_0x46c6b3=_0x434242(0x252),_0x18bfe3=ImageManager[_0x434242(0x319)];let _0x144025=TextManager[_0x434242(0x1fc)];_0x18bfe3>0x0&&this[_0x434242(0x1a4)]()!==_0x434242(0x162)&&(_0x144025=_0x434242(0x2b9)[_0x434242(0x179)](_0x18bfe3,_0x144025));const _0x22cf93=this[_0x434242(0x2cb)]();this[_0x434242(0x170)](_0x144025,_0x46c6b3,_0x22cf93);},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x2cb)]=function(){const _0x24059b=_0x435e5d;return $gameSystem[_0x24059b(0x2b4)]()[_0x24059b(0x237)]>0x0;},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x15a)]=function(){const _0x5b1733=_0x435e5d,_0x35a2cc=_0x5b1733(0x1d2),_0x19b965=ImageManager[_0x5b1733(0x1e6)];let _0x2dac79=TextManager[_0x5b1733(0x22a)];if(_0x19b965>0x0&&this[_0x5b1733(0x1a4)]()!==_0x5b1733(0x162)){if(_0x5b1733(0x29e)===_0x5b1733(0x317))return _0x5b1733(0x2c0);else _0x2dac79=_0x5b1733(0x2b9)[_0x5b1733(0x179)](_0x19b965,_0x2dac79);}const _0x930afc=this['isCompletedQuestsEnabled']();this['addCommand'](_0x2dac79,_0x35a2cc,_0x930afc);},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x28c)]=function(){const _0x24e147=_0x435e5d;return $gameSystem[_0x24e147(0x1c5)]()['length']>0x0;},Window_QuestCommand['prototype'][_0x435e5d(0x151)]=function(){const _0x11f09d=_0x435e5d;if(!this[_0x11f09d(0x340)]())return;const _0x1e33b9='failed',_0xe6dcb5=ImageManager['questFailedIcon'];let _0x4d3692=TextManager[_0x11f09d(0x182)];if(_0xe6dcb5>0x0&&this[_0x11f09d(0x1a4)]()!==_0x11f09d(0x162)){if('VduTU'===_0x11f09d(0x24c)){const _0x43d001=new _0x2c5b3c(0x0,0x0,_0x3c1065[_0x11f09d(0x313)],_0x4caa15[_0x11f09d(0x1c1)]);this[_0x11f09d(0x25c)]=new _0x267314(_0x43d001),this[_0x11f09d(0x25c)]['opacity']=0x0,this[_0x11f09d(0x2d4)](this['_commandNameWindow']),this[_0x11f09d(0x2af)]();}else _0x4d3692=_0x11f09d(0x2b9)[_0x11f09d(0x179)](_0xe6dcb5,_0x4d3692);}const _0x43e3d2=this['isFailedQuestsEnabled']();this[_0x11f09d(0x170)](_0x4d3692,_0x1e33b9,_0x43e3d2);},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x340)]=function(){const _0x33a507=_0x435e5d;return VisuMZ[_0x33a507(0x333)][_0x33a507(0x172)][_0x33a507(0x26e)][_0x33a507(0x165)];},Window_QuestCommand[_0x435e5d(0x2ee)]['isFailedQuestsEnabled']=function(){const _0x52c833=_0x435e5d;return $gameSystem[_0x52c833(0x303)]()[_0x52c833(0x237)]>0x0;},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x1be)]=function(){const _0x14b5df=_0x435e5d;return this[_0x14b5df(0x340)]()?0x3:0x2;},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x1a3)]=function(){const _0x4091c6=_0x435e5d;return VisuMZ['QuestSystem'][_0x4091c6(0x172)][_0x4091c6(0x26e)][_0x4091c6(0x322)];},Window_QuestCommand['prototype'][_0x435e5d(0x1e3)]=function(_0x1b5629){const _0x12ff65=_0x435e5d,_0x1cabae=this[_0x12ff65(0x1d8)](_0x1b5629);if(_0x1cabae===_0x12ff65(0x2c0))'tMTsC'==='VqMfl'?(this[_0x12ff65(0x166)]+=this[_0x12ff65(0x335)](),_0x27fbb2[_0x12ff65(0x327)]&&(this[_0x12ff65(0x166)]+=this[_0x12ff65(0x335)]()*0x4)):this[_0x12ff65(0x305)](_0x1b5629);else{if(_0x1cabae===_0x12ff65(0x329)){if(_0x12ff65(0x2fe)===_0x12ff65(0x2fe))this[_0x12ff65(0x28f)](_0x1b5629);else return _0x287aea['QuestSystem']['Settings'][_0x12ff65(0x26e)][_0x12ff65(0x210)];}else Window_HorzCommand['prototype']['drawItem']['call'](this,_0x1b5629);}},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x1a4)]=function(){const _0xf6cd86=_0x435e5d;return VisuMZ[_0xf6cd86(0x333)][_0xf6cd86(0x172)][_0xf6cd86(0x26e)][_0xf6cd86(0x210)];},Window_QuestCommand[_0x435e5d(0x2ee)]['commandStyleCheck']=function(_0x1ec8b5){const _0x45bff4=_0x435e5d;if(_0x1ec8b5<0x0)return _0x45bff4(0x162);const _0x43d09d=this[_0x45bff4(0x1a4)]();if(_0x43d09d!==_0x45bff4(0x1c2))return _0x43d09d;else{if(this['maxItems']()>0x0){const _0x3e24bf=this[_0x45bff4(0x1cc)](_0x1ec8b5);if(_0x3e24bf[_0x45bff4(0x1bf)](/\\I\[(\d+)\]/i)){const _0x79eb90=this[_0x45bff4(0x26a)](_0x1ec8b5),_0x1cb25f=this[_0x45bff4(0x1b3)](_0x3e24bf)[_0x45bff4(0x313)];return _0x1cb25f<=_0x79eb90[_0x45bff4(0x313)]?'iconText':'kfiAW'!==_0x45bff4(0x28b)?'icon':_0x45bff4(0x2c0);}}}return'text';},Window_QuestCommand['prototype'][_0x435e5d(0x305)]=function(_0x12bb7e){const _0x4ca1e0=_0x435e5d,_0xe95c75=this[_0x4ca1e0(0x26a)](_0x12bb7e),_0x5c8a26=this['commandName'](_0x12bb7e),_0x2d7d15=this[_0x4ca1e0(0x1b3)](_0x5c8a26)['width'];this[_0x4ca1e0(0x160)](this[_0x4ca1e0(0x154)](_0x12bb7e));const _0x77cad0=this[_0x4ca1e0(0x1a3)]();if(_0x77cad0===_0x4ca1e0(0x2a8))this[_0x4ca1e0(0x34d)](_0x5c8a26,_0xe95c75['x']+_0xe95c75[_0x4ca1e0(0x313)]-_0x2d7d15,_0xe95c75['y'],_0x2d7d15);else{if(_0x77cad0===_0x4ca1e0(0x263)){if(_0x4ca1e0(0x1ec)===_0x4ca1e0(0x297))_0x238f02['ConvertParams'](_0x24f1d3,_0x1cad47),_0x3d2895['questData']()['shown']=_0x5b5c61[_0x4ca1e0(0x233)];else{const _0x16c7a7=_0xe95c75['x']+Math[_0x4ca1e0(0x18a)]((_0xe95c75[_0x4ca1e0(0x313)]-_0x2d7d15)/0x2);this[_0x4ca1e0(0x34d)](_0x5c8a26,_0x16c7a7,_0xe95c75['y'],_0x2d7d15);}}else _0x4ca1e0(0x290)===_0x4ca1e0(0x290)?this[_0x4ca1e0(0x34d)](_0x5c8a26,_0xe95c75['x'],_0xe95c75['y'],_0x2d7d15):(_0x1520ea(_0x4ca1e0(0x183)['format'](_0x24c3d0,_0x5ebc41,_0x3d8524)),_0x143261[_0x4ca1e0(0x2ff)]());}},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x28f)]=function(_0x599193){const _0x1f31d8=_0x435e5d;this['commandName'](_0x599193)[_0x1f31d8(0x1bf)](/\\I\[(\d+)\]/i);const _0x1e8341=Number(RegExp['$1'])||0x0,_0xfa020c=this['itemLineRect'](_0x599193),_0x3b2b9a=_0xfa020c['x']+Math[_0x1f31d8(0x18a)]((_0xfa020c[_0x1f31d8(0x313)]-ImageManager[_0x1f31d8(0x212)])/0x2),_0x548553=_0xfa020c['y']+(_0xfa020c[_0x1f31d8(0x1c1)]-ImageManager[_0x1f31d8(0x298)])/0x2;this['drawIcon'](_0x1e8341,_0x3b2b9a,_0x548553);},Window_QuestCommand[_0x435e5d(0x2ee)][_0x435e5d(0x168)]=function(_0x220768){const _0x1acaf8=_0x435e5d;this[_0x1acaf8(0x161)]=_0x220768,this[_0x1acaf8(0x25d)]();};function Window_QuestList(){const _0x418025=_0x435e5d;this[_0x418025(0x26d)](...arguments);}Window_QuestList[_0x435e5d(0x1ca)]=VisuMZ[_0x435e5d(0x333)]['Settings']['Categories'],Window_QuestList['prototype']=Object[_0x435e5d(0x291)](Window_Command[_0x435e5d(0x2ee)]),Window_QuestList[_0x435e5d(0x2ee)]['constructor']=Window_QuestList,Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x26d)]=function(_0x1d655c){const _0x21d39b=_0x435e5d;this[_0x21d39b(0x197)](),Window_Command['prototype'][_0x21d39b(0x26d)][_0x21d39b(0x21a)](this,_0x1d655c),this[_0x21d39b(0x2c2)](_0x1d655c),this[_0x21d39b(0x1a2)](),this[_0x21d39b(0x2e9)]();},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x197)]=function(){const _0x16b0fd=_0x435e5d;this[_0x16b0fd(0x238)]={};for(const _0xfc052 of VisuMZ[_0x16b0fd(0x333)][_0x16b0fd(0x172)][_0x16b0fd(0x300)]){this[_0x16b0fd(0x238)][_0xfc052['CategoryName']]=!![];}this['_categoryFilter']=_0x16b0fd(0x252);},Window_QuestList['prototype'][_0x435e5d(0x2c1)]=function(_0x47dda3){const _0xe11b82=_0x435e5d;if(this[_0xe11b82(0x255)]===_0x47dda3)return;this[_0xe11b82(0x255)]=_0x47dda3,this[_0xe11b82(0x2c3)]();},Window_QuestList['prototype']['openCloseCurrentCategory']=function(){const _0x343586=_0x435e5d,_0x3066c3=this['currentCategory']();this[_0x343586(0x238)][_0x3066c3['CategoryName']]=!this['_categoryStatus'][_0x3066c3[_0x343586(0x204)]],this[_0x343586(0x2c3)](),this[_0x343586(0x25d)]();},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x310)]=function(){const _0x35e357=_0x435e5d,_0x2f1875=this['currentCategory']();return _0x2f1875&&this[_0x35e357(0x238)][_0x2f1875['CategoryName']];},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x2c2)]=function(_0x3d8537){const _0x5b495c=_0x435e5d,_0x42d8fa=new Rectangle(0x0,0x0,_0x3d8537[_0x5b495c(0x313)],_0x3d8537[_0x5b495c(0x1c1)]);this[_0x5b495c(0x25c)]=new Window_Base(_0x42d8fa),this['_commandNameWindow'][_0x5b495c(0x153)]=0x0,this[_0x5b495c(0x2d4)](this[_0x5b495c(0x25c)]),this['updateCommandNameWindow']();},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x25d)]=function(){const _0x3a4618=_0x435e5d;Window_Command[_0x3a4618(0x2ee)][_0x3a4618(0x25d)][_0x3a4618(0x21a)](this);if(this[_0x3a4618(0x25c)])this['updateCommandNameWindow']();if(this[_0x3a4618(0x343)])this[_0x3a4618(0x1e8)]();if(this['_logWindow'])this['updateLogWindow']();},Window_QuestList[_0x435e5d(0x2ee)]['updateCommandNameWindow']=function(){const _0x3747b7=_0x435e5d,_0x4f759f=this[_0x3747b7(0x25c)];_0x4f759f[_0x3747b7(0x273)][_0x3747b7(0x2bc)]();const _0x3fd183=this[_0x3747b7(0x1d8)](this[_0x3747b7(0x2cd)]());if(_0x3fd183==='icon'){const _0x2cda1b=this['itemLineRect'](this[_0x3747b7(0x2cd)]());let _0x4d5bf9=this[_0x3747b7(0x1cc)](this[_0x3747b7(0x2cd)]());_0x4d5bf9=_0x4d5bf9[_0x3747b7(0x232)](/\\I\[(\d+)\]/gi,''),_0x4f759f[_0x3747b7(0x219)](),this['commandNameWindowDrawBackground'](_0x4d5bf9,_0x2cda1b),this['commandNameWindowDrawText'](_0x4d5bf9,_0x2cda1b),this[_0x3747b7(0x332)](_0x4d5bf9,_0x2cda1b);}},Window_QuestList[_0x435e5d(0x2ee)]['commandNameWindowDrawBackground']=function(_0x48657a,_0x511ab1){},Window_QuestList['prototype'][_0x435e5d(0x328)]=function(_0x1bd0a8,_0x13b2dd){const _0x1d01c3=_0x435e5d,_0x29414a=this[_0x1d01c3(0x25c)];_0x29414a[_0x1d01c3(0x1a1)](_0x1bd0a8,0x0,_0x13b2dd['y'],_0x29414a[_0x1d01c3(0x33c)],'center');},Window_QuestList['prototype'][_0x435e5d(0x332)]=function(_0x5b414b,_0x230118){const _0x625191=_0x435e5d,_0x301778=this[_0x625191(0x25c)],_0x43072=$gameSystem[_0x625191(0x30f)](),_0xcea8b4=_0x230118['x']+Math[_0x625191(0x18a)](_0x230118['width']/0x2)+_0x43072;_0x301778['x']=_0x301778[_0x625191(0x313)]/-0x2+_0xcea8b4,_0x301778['y']=Math['floor'](_0x230118[_0x625191(0x1c1)]/0x2);},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x2b1)]=function(){const _0x8aa35a=_0x435e5d;for(const _0x341959 of Window_QuestList[_0x8aa35a(0x1ca)]){if(!_0x341959)continue;if(!this[_0x8aa35a(0x318)](_0x341959))continue;this[_0x8aa35a(0x1a6)](_0x341959),this['makeQuestList'](_0x341959);}this['_list']['length']<=0x0&&this[_0x8aa35a(0x22f)]();},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x22f)]=function(){const _0xdb0aaf=_0x435e5d;this[_0xdb0aaf(0x170)](TextManager[_0xdb0aaf(0x29a)],_0xdb0aaf(0x180),![]);},Window_QuestList['prototype'][_0x435e5d(0x318)]=function(_0x5a8d5d){const _0x37c341=_0x435e5d;for(const _0x4a8629 of _0x5a8d5d[_0x37c341(0x316)]){if(!_0x4a8629)continue;switch(this[_0x37c341(0x255)]){case _0x37c341(0x252):if($gameSystem[_0x37c341(0x31a)](_0x4a8629[_0x37c341(0x2dd)]))return!![];break;case _0x37c341(0x1d2):if($gameSystem['isQuestCompleted'](_0x4a8629['Key']))return!![];break;case _0x37c341(0x247):if($gameSystem[_0x37c341(0x235)](_0x4a8629[_0x37c341(0x2dd)]))return!![];break;}}return![];},Window_QuestList['prototype'][_0x435e5d(0x1a6)]=function(_0x52414e){const _0x64aae7=_0x435e5d,_0x234c8f=this[_0x64aae7(0x264)](_0x52414e)?TextManager[_0x64aae7(0x1e9)]:TextManager[_0x64aae7(0x2a6)],_0x615387=this[_0x64aae7(0x296)](_0x52414e)[_0x64aae7(0x237)],_0x7ded36=_0x234c8f[_0x64aae7(0x179)](_0x52414e[_0x64aae7(0x204)],_0x615387);this[_0x64aae7(0x170)](_0x7ded36,_0x64aae7(0x1cf),!![],_0x52414e);},Window_QuestList['prototype']['getTotalCategoryQuests']=function(_0x11b001){const _0x4cbe3c=_0x435e5d;switch(this[_0x4cbe3c(0x255)]){case _0x4cbe3c(0x252):return $gameSystem['questsKnown']()[_0x4cbe3c(0x302)](_0x4eabd2=>_0x4eabd2[_0x4cbe3c(0x1cf)]===_0x11b001);break;case _0x4cbe3c(0x1d2):return $gameSystem[_0x4cbe3c(0x1c5)]()['filter'](_0x25b110=>_0x25b110['category']===_0x11b001);break;case _0x4cbe3c(0x247):return $gameSystem[_0x4cbe3c(0x303)]()[_0x4cbe3c(0x302)](_0x56aba6=>_0x56aba6[_0x4cbe3c(0x1cf)]===_0x11b001);break;}return[];},Window_QuestList['prototype']['makeQuestList']=function(_0x339f0c){const _0x4d3bbc=_0x435e5d;if(!this[_0x4d3bbc(0x264)](_0x339f0c))return;for(const _0x33cd69 of _0x339f0c[_0x4d3bbc(0x316)]){if(_0x4d3bbc(0x25f)!==_0x4d3bbc(0x167)){if(!_0x33cd69)continue;switch(this[_0x4d3bbc(0x255)]){case'known':if($gameSystem['isQuestKnown'](_0x33cd69[_0x4d3bbc(0x2dd)]))this[_0x4d3bbc(0x1a9)](_0x33cd69);break;case _0x4d3bbc(0x1d2):if($gameSystem[_0x4d3bbc(0x1b5)](_0x33cd69[_0x4d3bbc(0x2dd)]))this[_0x4d3bbc(0x1a9)](_0x33cd69);break;case _0x4d3bbc(0x247):if($gameSystem[_0x4d3bbc(0x235)](_0x33cd69['Key']))this[_0x4d3bbc(0x1a9)](_0x33cd69);break;}}else this['addCommand'](_0x46f829[_0x4d3bbc(0x29a)],_0x4d3bbc(0x180),![]);}},Window_QuestList[_0x435e5d(0x2ee)]['isCategoryOpen']=function(_0x333d38){const _0x2513c2=_0x435e5d;return this[_0x2513c2(0x238)][_0x333d38[_0x2513c2(0x204)]];},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x1a9)]=function(_0x5d8e3a){const _0xe83f94=_0x435e5d;let _0xe28c73=_0x5d8e3a[_0xe83f94(0x15e)];_0x5d8e3a===$gameSystem[_0xe83f94(0x30c)]()&&(_0xe28c73=TextManager[_0xe83f94(0x1f0)][_0xe83f94(0x179)](_0xe28c73)),this[_0xe83f94(0x170)](_0xe28c73,_0xe83f94(0x2f4),!![],_0x5d8e3a);},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x1a3)]=function(){const _0x319385=_0x435e5d;return _0x319385(0x17d);},Window_QuestList['prototype'][_0x435e5d(0x1e3)]=function(_0x356ec4){const _0x5a91df=_0x435e5d,_0x5c94e3=this[_0x5a91df(0x1d8)](_0x356ec4);if(_0x5c94e3===_0x5a91df(0x2c0))'fSqVP'===_0x5a91df(0x21b)?(_0x28fb68[_0x5a91df(0x2ee)]['update'][_0x5a91df(0x21a)](this),this[_0x5a91df(0x184)]()):this['drawItemStyleIconText'](_0x356ec4);else{if(_0x5c94e3===_0x5a91df(0x329))this[_0x5a91df(0x28f)](_0x356ec4);else{if(_0x5a91df(0x351)!==_0x5a91df(0x14b))Window_HorzCommand[_0x5a91df(0x2ee)]['drawItem']['call'](this,_0x356ec4);else{_0x2d160e=_0x15b255[_0x5a91df(0x1ef)]()[_0x5a91df(0x16b)]();const _0x53519e=this[_0x5a91df(0x2f4)](_0x57090);if(!_0x53519e)return'';const _0x480efb=this[_0x5a91df(0x17c)]()[_0x5a91df(0x1f3)];_0x480efb[_0x55c530]=_0x18d9da;}}}},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x1a4)]=function(){const _0x1ee8a5=_0x435e5d;return _0x1ee8a5(0x2c0);},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x1d8)]=function(_0x2d740b){const _0xbfc71b=_0x435e5d;if(_0x2d740b<0x0)return _0xbfc71b(0x162);const _0x108fde=this[_0xbfc71b(0x1a4)]();if(_0x108fde!==_0xbfc71b(0x1c2))return _0x108fde;else{if(this[_0xbfc71b(0x17f)]()>0x0){if(_0xbfc71b(0x31b)===_0xbfc71b(0x314)){if(_0x237202[_0xbfc71b(0x333)][_0xbfc71b(0x172)][_0xbfc71b(0x192)][_0xbfc71b(0x265)])_0x5c43b4++;if(_0x502395['QuestSystem'][_0xbfc71b(0x172)][_0xbfc71b(0x192)][_0xbfc71b(0x1d4)])_0x25ae4f++;}else{const _0x3f817f=this[_0xbfc71b(0x1cc)](_0x2d740b);if(_0x3f817f[_0xbfc71b(0x1bf)](/\\I\[(\d+)\]/i)){if(_0xbfc71b(0x19f)==='QeIFR'){const _0x1f1893=this[_0xbfc71b(0x26a)](_0x2d740b),_0x26decf=this[_0xbfc71b(0x1b3)](_0x3f817f)[_0xbfc71b(0x313)];return _0x26decf<=_0x1f1893['width']?'iconText':'icon';}else return _0xbfc71b(0x329);}}}}return _0xbfc71b(0x162);},Window_QuestList[_0x435e5d(0x2ee)]['drawItemStyleIconText']=function(_0x96537){const _0x55c9da=_0x435e5d,_0x45fa61=this[_0x55c9da(0x26a)](_0x96537),_0x4b6d93=this[_0x55c9da(0x1cc)](_0x96537),_0x54bb8b=this[_0x55c9da(0x1b3)](_0x4b6d93)[_0x55c9da(0x313)];this[_0x55c9da(0x160)](this['isCommandEnabled'](_0x96537));const _0x301110=this[_0x55c9da(0x1a3)]();if(_0x301110===_0x55c9da(0x2a8))this[_0x55c9da(0x34d)](_0x4b6d93,_0x45fa61['x']+_0x45fa61[_0x55c9da(0x313)]-_0x54bb8b,_0x45fa61['y'],_0x54bb8b);else{if(_0x301110===_0x55c9da(0x263)){const _0x5557c5=_0x45fa61['x']+Math[_0x55c9da(0x18a)]((_0x45fa61[_0x55c9da(0x313)]-_0x54bb8b)/0x2);this[_0x55c9da(0x34d)](_0x4b6d93,_0x5557c5,_0x45fa61['y'],_0x54bb8b);}else this[_0x55c9da(0x34d)](_0x4b6d93,_0x45fa61['x'],_0x45fa61['y'],_0x54bb8b);}},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x28f)]=function(_0x3ab6db){const _0x3b0fae=_0x435e5d;this[_0x3b0fae(0x1cc)](_0x3ab6db)[_0x3b0fae(0x1bf)](/\\I\[(\d+)\]/i);const _0x3a6491=Number(RegExp['$1'])||0x0,_0x202be9=this[_0x3b0fae(0x26a)](_0x3ab6db),_0x19a0e1=_0x202be9['x']+Math[_0x3b0fae(0x18a)]((_0x202be9[_0x3b0fae(0x313)]-ImageManager[_0x3b0fae(0x212)])/0x2),_0x3664d0=_0x202be9['y']+(_0x202be9['height']-ImageManager[_0x3b0fae(0x298)])/0x2;this[_0x3b0fae(0x337)](_0x3a6491,_0x19a0e1,_0x3664d0);},Window_QuestList[_0x435e5d(0x2ee)]['currentCategory']=function(){const _0x4bee92=_0x435e5d;return this['currentSymbol']()===_0x4bee92(0x1cf)?this['currentExt']():null;},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x195)]=function(){const _0x57ee2f=_0x435e5d;return this[_0x57ee2f(0x266)]()===_0x57ee2f(0x2f4)?this[_0x57ee2f(0x345)]():null;},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x1d0)]=function(_0x19820d){const _0x5980f0=_0x435e5d;this[_0x5980f0(0x343)]=_0x19820d,this['callUpdateHelp']();},Window_QuestList[_0x435e5d(0x2ee)]['updateLabelWindow']=function(){const _0x144b61=_0x435e5d,_0x36bf4e=this[_0x144b61(0x195)](),_0x1d8b5e=this['_labelWindow'];_0x1d8b5e[_0x144b61(0x273)][_0x144b61(0x2bc)]();const _0x4a35dd=_0x36bf4e?_0x36bf4e[_0x144b61(0x15e)]:TextManager[_0x144b61(0x33d)],_0x24b962=_0x1d8b5e[_0x144b61(0x1b3)](_0x4a35dd)[_0x144b61(0x313)],_0x573242=_0x1d8b5e[_0x144b61(0x2d7)]()+Math[_0x144b61(0x159)]((_0x1d8b5e[_0x144b61(0x33c)]-_0x24b962)/0x2);_0x1d8b5e['drawTextEx'](_0x4a35dd,_0x573242,0x0,_0x1d8b5e['innerWidth']);},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x23f)]=function(_0x589ce5){const _0x18e4ff=_0x435e5d;this['_logWindow']=_0x589ce5,this[_0x18e4ff(0x25d)]();},Window_QuestList[_0x435e5d(0x2ee)]['updateLogWindow']=function(){const _0x4b13ff=_0x435e5d,_0x25ef55=this[_0x4b13ff(0x195)](),_0x43b336=this[_0x4b13ff(0x2fc)];_0x43b336[_0x4b13ff(0x1fa)](_0x25ef55);},Window_QuestList[_0x435e5d(0x2ee)]['cursorPagedown']=function(){},Window_QuestList[_0x435e5d(0x2ee)]['cursorPageup']=function(){},Window_QuestList[_0x435e5d(0x2ee)][_0x435e5d(0x17e)]=function(){const _0xb65673=_0x435e5d;if(this[_0xb65673(0x195)]()){if(_0xb65673(0x243)===_0xb65673(0x243))return this[_0xb65673(0x255)]===_0xb65673(0x252);else _0x11640d[_0xb65673(0x342)](_0x58f730,_0x61e9a8);}else return Window_Command[_0xb65673(0x2ee)][_0xb65673(0x17e)][_0xb65673(0x21a)](this);};function Window_QuestLog(){const _0x125339=_0x435e5d;this[_0x125339(0x26d)](...arguments);}function _0x220d(_0x2d98ac,_0x2e0662){const _0x4403f9=_0x4403();return _0x220d=function(_0x220dcb,_0x921229){_0x220dcb=_0x220dcb-0x146;let _0x135ef1=_0x4403f9[_0x220dcb];return _0x135ef1;},_0x220d(_0x2d98ac,_0x2e0662);}Window_QuestLog['wordWrapSupport']=VisuMZ['QuestSystem']['Settings'][_0x435e5d(0x26e)][_0x435e5d(0x1dc)],Window_QuestLog[_0x435e5d(0x2de)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)]['Window']['LogWindow_ScrollSpeed'],Window_QuestLog[_0x435e5d(0x2ee)]=Object[_0x435e5d(0x291)](Window_Scrollable[_0x435e5d(0x2ee)]),Window_QuestLog[_0x435e5d(0x2ee)]['constructor']=Window_QuestLog,Window_QuestLog[_0x435e5d(0x31d)]=0x19,Window_QuestLog[_0x435e5d(0x2ee)][_0x435e5d(0x26d)]=function(_0x1ea5d5){const _0x23f5dd=_0x435e5d;this['_textHeight']=0x0,this[_0x23f5dd(0x31d)]=0x0,Window_Scrollable[_0x23f5dd(0x2ee)][_0x23f5dd(0x26d)][_0x23f5dd(0x21a)](this,_0x1ea5d5),this[_0x23f5dd(0x2e0)]=null,this[_0x23f5dd(0x2c3)]();},Window_QuestLog[_0x435e5d(0x2ee)]['contentsHeight']=function(){const _0x43562f=_0x435e5d;return Math['max'](this[_0x43562f(0x166)],0x1);},Window_QuestLog[_0x435e5d(0x2ee)][_0x435e5d(0x32c)]=function(){const _0x26354c=_0x435e5d;return this[_0x26354c(0x205)]();},Window_QuestLog['prototype'][_0x435e5d(0x1bd)]=function(){const _0x5a2d24=_0x435e5d;Window_Scrollable[_0x5a2d24(0x2ee)][_0x5a2d24(0x1bd)][_0x5a2d24(0x21a)](this),this['updateDelayRefresh']();},Window_QuestLog['prototype']['updateDelayRefresh']=function(){const _0x3894b1=_0x435e5d;if(this[_0x3894b1(0x31d)]--===0x0)this[_0x3894b1(0x2c3)]();},Window_QuestLog['prototype'][_0x435e5d(0x24e)]=function(){const _0x1ba86a=_0x435e5d,_0x369980=this[_0x1ba86a(0x2df)]()||0x1,_0x7723e2=this[_0x1ba86a(0x25e)]()||0x1,_0x1bcc2d=this['_scrollX']-this['_scrollX']%_0x369980,_0x2ff00f=this[_0x1ba86a(0x2a5)]-this[_0x1ba86a(0x2a5)]%_0x7723e2;(_0x1bcc2d!==this[_0x1ba86a(0x248)]||_0x2ff00f!==this[_0x1ba86a(0x2c4)])&&(this[_0x1ba86a(0x22b)](_0x1bcc2d,_0x2ff00f),this[_0x1ba86a(0x1d3)]()),this[_0x1ba86a(0x339)]['x']=this['_scrollX'],this[_0x1ba86a(0x339)]['y']=this['_scrollY'];},Window_QuestLog[_0x435e5d(0x2ee)][_0x435e5d(0x23c)]=function(){const _0x5bdf9b=_0x435e5d;Window_Scrollable['prototype']['processWheelScroll']['call'](this),this[_0x5bdf9b(0x163)]();},Window_QuestLog['prototype'][_0x435e5d(0x163)]=function(){const _0x498c4a=_0x435e5d;Input[_0x498c4a(0x2ab)]('pagedown')&&this['smoothScrollDown'](Window_QuestLog[_0x498c4a(0x2de)]),Input[_0x498c4a(0x2ab)]('pageup')&&(_0x498c4a(0x1b8)===_0x498c4a(0x18c)?_0x447eb0=_0x498c4a(0x2b9)['format'](_0x41ec04,_0x5481ac):this[_0x498c4a(0x336)](Window_QuestLog['scrollSpeed']));},Window_QuestLog['prototype'][_0x435e5d(0x1fa)]=function(_0x380e00){const _0x34dc7c=_0x435e5d;if(this[_0x34dc7c(0x2e0)]===_0x380e00)return;this[_0x34dc7c(0x2e0)]=_0x380e00,this[_0x34dc7c(0x31d)]=Window_QuestLog[_0x34dc7c(0x31d)];},Window_QuestLog[_0x435e5d(0x2ee)][_0x435e5d(0x2c3)]=function(){const _0x4b062c=_0x435e5d;this[_0x4b062c(0x273)][_0x4b062c(0x2bc)](),this[_0x4b062c(0x338)](),this[_0x4b062c(0x15f)](),this[_0x4b062c(0x222)]();},Window_QuestLog[_0x435e5d(0x2ee)]['calculateTextHeight']=function(){const _0x5f568d=_0x435e5d;if(![]){const _0x4406b1=this['baseTextRect'](),_0x21136c=this[_0x5f568d(0x2e0)]?this[_0x5f568d(0x2f1)]():this[_0x5f568d(0x202)](),_0x3971de=this['textSizeEx'](_0x21136c[_0x5f568d(0x16b)]());this[_0x5f568d(0x166)]=_0x3971de['height'],this[_0x5f568d(0x1c0)]===Window_QuestLog&&(this[_0x5f568d(0x166)]+=this['lineHeight'](),Window_QuestLog[_0x5f568d(0x327)]&&(this['_textHeight']+=this['lineHeight']()*0x4));}const _0x3c3f04=this['_quest']?this['createQuestText']():this[_0x5f568d(0x202)]();this[_0x5f568d(0x166)]=this[_0x5f568d(0x1b3)](_0x3c3f04['trim']())[_0x5f568d(0x1c1)];},Window_QuestLog[_0x435e5d(0x2ee)][_0x435e5d(0x222)]=function(){const _0x324f73=_0x435e5d,_0x4c4ecd=this['_quest']?this[_0x324f73(0x2f1)]():this[_0x324f73(0x202)]();this['drawTextEx'](_0x4c4ecd,0x0,0x0,this['innerWidth']),this[_0x324f73(0x2a5)]=0x0,this[_0x324f73(0x339)]['y']=0x0;},Window_QuestLog['prototype'][_0x435e5d(0x202)]=function(){const _0x9e6a91=_0x435e5d;VisuMZ[_0x9e6a91(0x333)]['Settings'][_0x9e6a91(0x20b)][_0x9e6a91(0x1da)]();let _0x17fec5=this[_0x9e6a91(0x30d)]();return _0x17fec5=VisuMZ['QuestSystem']['applyWordWrap'](_0x17fec5),_0x17fec5=VisuMZ['QuestSystem'][_0x9e6a91(0x18b)](_0x17fec5),_0x17fec5;},Window_QuestLog[_0x435e5d(0x2ee)]['getEmptyLogFmt']=function(){const _0x57f909=_0x435e5d;return TextManager[_0x57f909(0x158)];},Window_QuestLog['prototype']['createQuestText']=function(){const _0x3db867=_0x435e5d,_0x5292f5=this[_0x3db867(0x2e0)],_0x56a5d5=_0x5292f5[_0x3db867(0x2dd)]['toUpperCase']()[_0x3db867(0x16b)]();if(_0x5292f5[_0x3db867(0x1da)])_0x5292f5[_0x3db867(0x1da)]['call'](this);let _0x4f57ed=this[_0x3db867(0x217)]();return _0x4f57ed=VisuMZ['QuestSystem'][_0x3db867(0x2cf)](_0x4f57ed),_0x4f57ed=_0x4f57ed[_0x3db867(0x232)](/\[\[RAWTITLE\]\]/gi,_0x5292f5[_0x3db867(0x15e)]),_0x4f57ed=_0x4f57ed['replace'](/\[\[TITLE\]\]/gi,_0x5292f5[_0x3db867(0x15e)][_0x3db867(0x232)](/\\I\[(\d+)\]/gi,'')['trim']()),_0x4f57ed=_0x4f57ed[_0x3db867(0x232)](/\[\[DIFFICULTY\]\]/gi,_0x5292f5[_0x3db867(0x2aa)][_0x3db867(0x16b)]()),_0x4f57ed=_0x4f57ed[_0x3db867(0x232)](/\[\[FROM\]\]/gi,_0x5292f5[_0x3db867(0x1b9)]['trim']()),_0x4f57ed=_0x4f57ed['replace'](/\[\[LOCATION\]\]/gi,_0x5292f5[_0x3db867(0x2b7)][_0x3db867(0x16b)]()),_0x4f57ed=_0x4f57ed[_0x3db867(0x232)](/\[\[DESCRIPTION\]\]/gi,this['createQuestDescription'](_0x56a5d5)),_0x4f57ed=_0x4f57ed['replace'](/\[\[OBJECTIVES\]\]/gi,this['createQuestObjectives'](_0x5292f5,_0x56a5d5)),_0x4f57ed=_0x4f57ed[_0x3db867(0x232)](/\[\[REWARDS\]\]/gi,this[_0x3db867(0x28a)](_0x5292f5,_0x56a5d5)),_0x4f57ed=_0x4f57ed['replace'](/\[\[SUBTEXT\]\]/gi,this[_0x3db867(0x2d8)](_0x56a5d5)),_0x4f57ed=_0x4f57ed[_0x3db867(0x232)](/\[\[QUOTE\]\]/gi,this[_0x3db867(0x19e)](_0x56a5d5)),_0x4f57ed=VisuMZ[_0x3db867(0x333)]['finalizeWordWrapSupport'](_0x4f57ed),_0x4f57ed=VisuMZ[_0x3db867(0x333)][_0x3db867(0x2bb)](_0x4f57ed),_0x4f57ed[_0x3db867(0x16b)]();},Window_QuestLog[_0x435e5d(0x2ee)][_0x435e5d(0x217)]=function(){const _0x30b6b8=_0x435e5d;return TextManager[_0x30b6b8(0x1b6)];},Window_QuestLog['prototype'][_0x435e5d(0x2a0)]=function(_0x428fb1){const _0x221117=_0x435e5d;let _0xc2e028=$gameSystem['questDescription'](_0x428fb1);return _0xc2e028=VisuMZ['QuestSystem']['finalizeWordWrapSupport'](_0xc2e028),_0xc2e028[_0x221117(0x16b)]();},Window_QuestLog[_0x435e5d(0x2ee)]['createQuestObjectives']=function(_0x24c910,_0x42e110){const _0x412241=_0x435e5d,_0x51ece8=[],_0x1e6b41=$gameSystem[_0x412241(0x236)](_0x42e110),_0x1f29b5=$gameSystem[_0x412241(0x323)](_0x42e110),_0x2b8701=$gameSystem[_0x412241(0x27d)](_0x42e110),_0x4ff21b=_0x1e6b41[_0x412241(0x22e)](_0x1f29b5)[_0x412241(0x22e)](_0x2b8701)[_0x412241(0x321)]((_0x1f94d0,_0x43eb99)=>_0x1f94d0-_0x43eb99);for(const _0x57911c of _0x4ff21b){if(!_0x24c910[_0x412241(0x34a)][_0x57911c])continue;const _0x3ad550=_0x24c910[_0x412241(0x34a)][_0x57911c];let _0x337e14=TextManager[_0x412241(0x34b)];if(_0x1f29b5['includes'](_0x57911c))_0x337e14=TextManager[_0x412241(0x229)];if(_0x2b8701[_0x412241(0x270)](_0x57911c))_0x337e14=TextManager[_0x412241(0x2ef)];_0x51ece8[_0x412241(0x32d)](VisuMZ[_0x412241(0x333)][_0x412241(0x18e)](_0x337e14[_0x412241(0x179)](_0x3ad550)[_0x412241(0x16b)]()));}let _0x47fb57=VisuMZ[_0x412241(0x333)]['joinQuestEntries'](_0x51ece8);return _0x47fb57;},Window_QuestLog[_0x435e5d(0x2ee)]['createQuestRewards']=function(_0x3a704a,_0x358e49){const _0x134a3d=_0x435e5d,_0x37d2a2=[],_0x4ce095=$gameSystem['questRewards'](_0x358e49),_0x5a8f3c=$gameSystem[_0x134a3d(0x1ae)](_0x358e49),_0x206a5e=$gameSystem['questRewardsDenied'](_0x358e49),_0x16ddd1=_0x4ce095['concat'](_0x5a8f3c)[_0x134a3d(0x22e)](_0x206a5e)[_0x134a3d(0x321)]((_0x405e25,_0x442bb5)=>_0x405e25-_0x442bb5);for(const _0x4c93a3 of _0x16ddd1){if(!_0x3a704a[_0x134a3d(0x279)][_0x4c93a3])continue;const _0x56e4da=_0x3a704a[_0x134a3d(0x279)][_0x4c93a3];let _0x632654=TextManager[_0x134a3d(0x308)];if(_0x5a8f3c[_0x134a3d(0x270)](_0x4c93a3))_0x632654=TextManager['questRewardsClaimedFmt'];if(_0x206a5e[_0x134a3d(0x270)](_0x4c93a3))_0x632654=TextManager['questRewardsDeniedFmt'];_0x37d2a2[_0x134a3d(0x32d)](VisuMZ[_0x134a3d(0x333)][_0x134a3d(0x18e)](_0x632654[_0x134a3d(0x179)](_0x56e4da)['trim']()));}let _0x31133b=VisuMZ[_0x134a3d(0x333)][_0x134a3d(0x2ad)](_0x37d2a2);return _0x31133b;},Window_QuestLog['prototype'][_0x435e5d(0x2d8)]=function(_0x47f6d3){const _0x4c0eba=_0x435e5d;let _0x34d20d=$gameSystem['questSubtext'](_0x47f6d3);return _0x34d20d=VisuMZ['QuestSystem'][_0x4c0eba(0x18b)](_0x34d20d),_0x34d20d[_0x4c0eba(0x16b)]();},Window_QuestLog[_0x435e5d(0x2ee)][_0x435e5d(0x19e)]=function(_0x25ba17){const _0x2b2eba=_0x435e5d;let _0x57de2a=$gameSystem[_0x2b2eba(0x156)](_0x25ba17);return _0x57de2a=VisuMZ[_0x2b2eba(0x333)][_0x2b2eba(0x18b)](_0x57de2a),_0x57de2a[_0x2b2eba(0x16b)]();};function Window_QuestTracker(){const _0x18db2=_0x435e5d;this[_0x18db2(0x26d)](...arguments);}Window_QuestTracker[_0x435e5d(0x2ee)]=Object['create'](Window_QuestLog[_0x435e5d(0x2ee)]),Window_QuestTracker['prototype'][_0x435e5d(0x1c0)]=Window_QuestTracker,Window_QuestTracker[_0x435e5d(0x16a)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x26e)][_0x435e5d(0x1af)],Window_QuestTracker[_0x435e5d(0x24f)]=VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x172)][_0x435e5d(0x26e)][_0x435e5d(0x2b6)],Window_QuestTracker['prototype']['initialize']=function(_0xcf2eec){const _0x192289=_0x435e5d;Window_QuestLog[_0x192289(0x2ee)][_0x192289(0x26d)]['call'](this,_0xcf2eec),this[_0x192289(0x1fa)]($gameSystem['trackedQuest']()),this[_0x192289(0x16a)]['x']=this[_0x192289(0x16a)]['y']=Window_QuestTracker[_0x192289(0x16a)],this[_0x192289(0x2bf)]();},Window_QuestTracker['prototype'][_0x435e5d(0x205)]=function(){const _0x27fc31=_0x435e5d;return Math[_0x27fc31(0x27a)](this[_0x27fc31(0x166)],0x1);},Window_QuestTracker[_0x435e5d(0x2ee)][_0x435e5d(0x30d)]=function(){return'';},Window_QuestTracker['prototype'][_0x435e5d(0x217)]=function(){const _0x14734f=_0x435e5d;return TextManager[_0x14734f(0x331)];},Window_QuestTracker['prototype'][_0x435e5d(0x15f)]=function(){const _0x296428=_0x435e5d;this[_0x296428(0x1c1)]=this[_0x296428(0x205)]()+$gameSystem[_0x296428(0x30f)]()*0x2,Window_QuestLog[_0x296428(0x2ee)][_0x296428(0x15f)]['call'](this);},Window_QuestTracker['prototype']['setQuest']=function(_0xc5c82c){const _0x24c35f=_0x435e5d;if(this[_0x24c35f(0x2e0)]===_0xc5c82c)return;this[_0x24c35f(0x2e0)]=_0xc5c82c,this[_0x24c35f(0x2c3)]();},Window_QuestTracker['prototype'][_0x435e5d(0x2c3)]=function(){const _0x204c2f=_0x435e5d;if($gameTemp[_0x204c2f(0x224)])return;$gameTemp[_0x204c2f(0x224)]=!![],Window_QuestLog['prototype']['refresh']['call'](this),this[_0x204c2f(0x289)](this['_quest']?Window_QuestTracker[_0x204c2f(0x24f)]:0x2),$gameTemp[_0x204c2f(0x224)]=![];},Window_QuestTracker[_0x435e5d(0x2ee)][_0x435e5d(0x1bd)]=function(){const _0xeebd6c=_0x435e5d;Window_QuestLog['prototype']['update'][_0xeebd6c(0x21a)](this),this[_0xeebd6c(0x2bf)]();},Window_QuestTracker[_0x435e5d(0x2ee)][_0x435e5d(0x2bf)]=function(){const _0x4544de=_0x435e5d,_0x31084e=this['visibilityLevel']();this[_0x4544de(0x1a7)]=_0x31084e;},Window_QuestTracker['prototype'][_0x435e5d(0x23b)]=function(){const _0x1e1817=_0x435e5d;if(!ConfigManager[_0x1e1817(0x26f)])return 0x0;if($gameTemp[_0x1e1817(0x18f)])return 0x0;const _0x2a176e=SceneManager[_0x1e1817(0x304)];if(_0x2a176e&&_0x2a176e[_0x1e1817(0x20e)]){if(_0x2a176e['_messageWindow']['openness']>0x0)return 0x0;}if(!this['_quest'])return 0x0;return $gameSystem[_0x1e1817(0x2db)]()?0xff:0x0;},VisuMZ[_0x435e5d(0x333)]['finalizeWordWrapSupport']=function(_0x5b63f7){const _0x5e2590=_0x435e5d;if(!Window_QuestLog[_0x5e2590(0x327)])return _0x5b63f7;if(!Imported['VisuMZ_1_MessageCore'])return _0x5b63f7;return _0x5b63f7=_0x5e2590(0x155)[_0x5e2590(0x179)](_0x5b63f7),_0x5b63f7;},VisuMZ[_0x435e5d(0x333)]['noMessageCoreRemoveEscapeCodes']=function(_0x1fe0e0){const _0xe98d52=_0x435e5d;if(Imported[_0xe98d52(0x150)])return _0x1fe0e0;return _0x1fe0e0=_0x1fe0e0[_0xe98d52(0x232)](/<COLORLOCK>/gi,''),_0x1fe0e0=_0x1fe0e0[_0xe98d52(0x232)](/<\/COLORLOCK>/gi,''),_0x1fe0e0;},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x1f7)]=function(_0x384d72){const _0xc21a91=_0x435e5d;if(!Window_QuestLog[_0xc21a91(0x327)]){if(_0xc21a91(0x280)===_0xc21a91(0x280))return _0x384d72[_0xc21a91(0x232)](/<(?:BR|LINEBREAK)>/gi,'');else{_0x5bf68f=_0x48a21b[_0xc21a91(0x1ef)]()[_0xc21a91(0x16b)]();const _0x7ef888=this[_0xc21a91(0x2f4)](_0x526696);if(!_0x7ef888)return'';const _0xe3a367=this[_0xc21a91(0x17c)]()[_0xc21a91(0x1cb)];_0xe3a367[_0x26e7b6]=_0x5c7958;}}if(!Imported[_0xc21a91(0x150)]){if('Fpdrn'!==_0xc21a91(0x188))this[_0xc21a91(0x26f)]=_0x3c88be[_0xc21a91(0x26f)];else return _0x384d72['replace'](/<(?:BR|LINEBREAK)>/gi,'');}return VisuMZ[_0xc21a91(0x24b)][_0xc21a91(0x172)]['WordWrap'][_0xc21a91(0x239)]?_0x384d72=_0x384d72[_0xc21a91(0x232)](/[\n\r]+/g,'\x1bWrapBreak[0]'):_0xc21a91(0x220)!==_0xc21a91(0x2fa)?_0x384d72=_0x384d72[_0xc21a91(0x232)](/[\n\r]+/g,''):(this['_textHeight']=0x0,this[_0xc21a91(0x31d)]=0x0,_0x177c44[_0xc21a91(0x2ee)]['initialize'][_0xc21a91(0x21a)](this,_0x4b9fac),this['_quest']=null,this['refresh']()),_0x384d72;},VisuMZ[_0x435e5d(0x333)]['convertLineBreaksForWordWrap']=function(_0x3d0e9e){const _0x4ec941=_0x435e5d;if(!Window_QuestLog['wordWrapSupport'])return _0x3d0e9e;if(!Imported[_0x4ec941(0x150)])return _0x3d0e9e;return _0x3d0e9e[_0x4ec941(0x16b)]()[_0x4ec941(0x232)](/[\n\r]/g,_0x4ec941(0x29c));},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x18e)]=function(_0x19c47a){const _0x145d6a=_0x435e5d;if(!Window_QuestLog[_0x145d6a(0x327)])return _0x19c47a;if(!Imported[_0x145d6a(0x150)])return _0x19c47a;return VisuMZ['QuestSystem']['applyWordWrap'](_0x19c47a['trim']());},VisuMZ[_0x435e5d(0x333)][_0x435e5d(0x2ad)]=function(_0x44b333){const _0x43c597=_0x435e5d;if(!Window_QuestLog[_0x43c597(0x327)])return _0x44b333[_0x43c597(0x276)]('\x0a')['trim']();if(!Imported[_0x43c597(0x150)])return _0x44b333[_0x43c597(0x276)]('\x0a')[_0x43c597(0x16b)]();return _0x44b333[_0x43c597(0x276)](_0x43c597(0x29c))[_0x43c597(0x16b)]();},totalQuestsAvailable=function(){const _0x3ba5fe=_0x435e5d;return $gameSystem[_0x3ba5fe(0x17c)]()[_0x3ba5fe(0x252)][_0x3ba5fe(0x237)];},totalQuestsCompleted=function(){const _0x5566cc=_0x435e5d;return $gameSystem[_0x5566cc(0x17c)]()[_0x5566cc(0x1d2)][_0x5566cc(0x237)];},totalQuestsFailed=function(){const _0x339da4=_0x435e5d;return $gameSystem[_0x339da4(0x17c)]()['failed'][_0x339da4(0x237)];},totalQuestsRevealed=function(){return totalQuestsAvailable()+totalQuestsCompleted()+totalQuestsFailed();},totalQuestsInGame=function(){const _0xa9c126=_0x435e5d;return VisuMZ[_0xa9c126(0x333)]['QuestOrder'][_0xa9c126(0x237)];},getQuestDescriptionIndex=function(_0x33f3f5){const _0x3cc6ae=_0x435e5d;_0x33f3f5=_0x33f3f5[_0x3cc6ae(0x1ef)]()[_0x3cc6ae(0x16b)]();const _0x4b9fdf=$gameSystem['quest'](_0x33f3f5);if(!_0x4b9fdf)return-0x1;$gameSystem['questDescription'](_0x33f3f5);const _0x3801ba=$gameSystem[_0x3cc6ae(0x17c)]()[_0x3cc6ae(0x1cb)];return _0x3801ba[_0x33f3f5]||0x0;},totalVisibleQuestObjectives=function(_0x1db7f7){const _0x165905=_0x435e5d;_0x1db7f7=_0x1db7f7[_0x165905(0x1ef)]()[_0x165905(0x16b)]();const _0x26fdeb=$gameSystem[_0x165905(0x2f4)](_0x1db7f7);if(!_0x26fdeb)return-0x1;$gameSystem[_0x165905(0x236)](_0x1db7f7);const _0xcf370a=$gameSystem[_0x165905(0x17c)]()[_0x165905(0x196)]||{};if(!_0xcf370a[_0x1db7f7])return 0x0;return _0xcf370a[_0x1db7f7][_0x165905(0x237)];},totalQuestObjectives=function(_0x3365ef){const _0xe1cdf7=_0x435e5d;_0x3365ef=_0x3365ef['toUpperCase']()['trim']();const _0x1eedc0=$gameSystem[_0xe1cdf7(0x2f4)](_0x3365ef);return _0x1eedc0?_0x1eedc0[_0xe1cdf7(0x34a)][_0xe1cdf7(0x237)]-0x1:0x0;},totalVisibleQuestRewards=function(_0x38a493){const _0xdfc68b=_0x435e5d;_0x38a493=_0x38a493[_0xdfc68b(0x1ef)]()['trim']();const _0x18dcc6=$gameSystem[_0xdfc68b(0x2f4)](_0x38a493);if(!_0x18dcc6)return-0x1;$gameSystem[_0xdfc68b(0x176)](_0x38a493);const _0x5bbaa7=$gameSystem['questData']()['rewards']||{};if(!_0x5bbaa7[_0x38a493])return 0x0;return _0x5bbaa7[_0x38a493][_0xdfc68b(0x237)];},totalQuestRewards=function(_0x5235c4){const _0x1dcfe2=_0x435e5d;_0x5235c4=_0x5235c4[_0x1dcfe2(0x1ef)]()[_0x1dcfe2(0x16b)]();const _0x4a2663=$gameSystem[_0x1dcfe2(0x2f4)](_0x5235c4);return _0x4a2663?_0x4a2663[_0x1dcfe2(0x279)][_0x1dcfe2(0x237)]-0x1:0x0;},getQuestSubtextIndex=function(_0x2003e9){const _0x313850=_0x435e5d;_0x2003e9=_0x2003e9['toUpperCase']()[_0x313850(0x16b)]();const _0x890e17=$gameSystem['quest'](_0x2003e9);if(!_0x890e17)return-0x1;$gameSystem[_0x313850(0x1f6)](_0x2003e9);const _0x107c8b=$gameSystem[_0x313850(0x17c)]()['subtext'];return _0x107c8b[_0x2003e9]||0x0;},getQuestQuoteIndex=function(_0x56cd45){const _0x1a5fce=_0x435e5d;_0x56cd45=_0x56cd45[_0x1a5fce(0x1ef)]()['trim']();const _0x46fcd2=$gameSystem[_0x1a5fce(0x2f4)](_0x56cd45);if(!_0x46fcd2)return-0x1;$gameSystem[_0x1a5fce(0x156)](_0x56cd45);const _0x253bf8=$gameSystem[_0x1a5fce(0x17c)]()[_0x1a5fce(0x2e4)];return _0x253bf8[_0x56cd45]||0x0;},isQuestObjectiveCompleted=function(_0x15da16,_0x591fed){const _0x5a49dc=_0x435e5d;_0x15da16=_0x15da16[_0x5a49dc(0x1ef)]()[_0x5a49dc(0x16b)]();const _0x369b14=$gameSystem[_0x5a49dc(0x2f4)](_0x15da16);if(!_0x369b14)return![];$gameSystem[_0x5a49dc(0x236)](_0x15da16);const _0x1fd74c=$gameSystem[_0x5a49dc(0x17c)]()[_0x5a49dc(0x174)];if(!_0x1fd74c[_0x15da16])return![];return _0x1fd74c[_0x15da16][_0x5a49dc(0x270)](_0x591fed);},isQuestObjectiveFailed=function(_0x1b7f10,_0x565d49){const _0x25d55b=_0x435e5d;_0x1b7f10=_0x1b7f10[_0x25d55b(0x1ef)]()[_0x25d55b(0x16b)]();const _0x507424=$gameSystem[_0x25d55b(0x2f4)](_0x1b7f10);if(!_0x507424)return![];$gameSystem['questObjectives'](_0x1b7f10);const _0x3c56c9=$gameSystem['questData']()[_0x25d55b(0x1ed)];if(!_0x3c56c9[_0x1b7f10])return![];return _0x3c56c9[_0x1b7f10][_0x25d55b(0x270)](_0x565d49);},isQuestObjectiveUncleared=function(_0x544184,_0x1eac12){const _0x28bafe=_0x435e5d;_0x544184=_0x544184[_0x28bafe(0x1ef)]()[_0x28bafe(0x16b)]();const _0x5d3471=$gameSystem[_0x28bafe(0x2f4)](_0x544184);if(!_0x5d3471)return![];$gameSystem[_0x28bafe(0x236)](_0x544184);const _0x37e93b=$gameSystem[_0x28bafe(0x17c)]()[_0x28bafe(0x196)];if(!_0x37e93b[_0x544184])return![];return _0x37e93b[_0x544184][_0x28bafe(0x270)](_0x1eac12);},isQuestRewardClaimed=function(_0x49cfd7,_0x39d121){const _0x1d4f94=_0x435e5d;_0x49cfd7=_0x49cfd7[_0x1d4f94(0x1ef)]()[_0x1d4f94(0x16b)]();const _0x6ca6d1=$gameSystem['quest'](_0x49cfd7);if(!_0x6ca6d1)return![];$gameSystem[_0x1d4f94(0x176)](_0x49cfd7);const _0x56d661=$gameSystem[_0x1d4f94(0x17c)]()[_0x1d4f94(0x1f1)];if(!_0x56d661[_0x49cfd7])return![];return _0x56d661[_0x49cfd7][_0x1d4f94(0x270)](_0x39d121);},isQuestRewardDenied=function(_0x4c880a,_0x2ddbc8){const _0x1eaa53=_0x435e5d;_0x4c880a=_0x4c880a[_0x1eaa53(0x1ef)]()[_0x1eaa53(0x16b)]();const _0x501836=$gameSystem[_0x1eaa53(0x2f4)](_0x4c880a);if(!_0x501836)return![];$gameSystem[_0x1eaa53(0x176)](_0x4c880a);const _0x313de6=$gameSystem['questData']()[_0x1eaa53(0x275)];if(!_0x313de6[_0x4c880a])return![];return _0x313de6[_0x4c880a][_0x1eaa53(0x270)](_0x2ddbc8);},isQuestRewardUnclaimed=function(_0x2f646c,_0x1d15b4){const _0x143bc9=_0x435e5d;_0x2f646c=_0x2f646c['toUpperCase']()[_0x143bc9(0x16b)]();const _0x580457=$gameSystem[_0x143bc9(0x2f4)](_0x2f646c);if(!_0x580457)return![];$gameSystem[_0x143bc9(0x176)](_0x2f646c);const _0x28642b=$gameSystem['questData']()[_0x143bc9(0x1fb)];if(!_0x28642b[_0x2f646c])return![];return _0x28642b[_0x2f646c][_0x143bc9(0x270)](_0x1d15b4);}; \ No newline at end of file diff --git a/js/plugins/VisuMZ_3_SideviewBattleUI.js b/js/plugins/VisuMZ_3_SideviewBattleUI.js new file mode 100644 index 0000000..0f1746a --- /dev/null +++ b/js/plugins/VisuMZ_3_SideviewBattleUI.js @@ -0,0 +1,1117 @@ +//============================================================================= +// VisuStella MZ - Sideview Battle UI +// VisuMZ_3_SideviewBattleUI.js +//============================================================================= + +var Imported = Imported || {}; +Imported.VisuMZ_3_SideviewBattleUI = true; + +var VisuMZ = VisuMZ || {}; +VisuMZ.SideviewBattleUI = VisuMZ.SideviewBattleUI || {}; +VisuMZ.SideviewBattleUI.version = 1.04; + +//============================================================================= + /*: + * @target MZ + * @plugindesc [RPG Maker MZ] [Tier 3] [Version 1.04] [SideviewBattleUI] + * @author VisuStella + * @url http://www.yanfly.moe/wiki/Sideview_Battle_UI_VisuStella_MZ + * @base VisuMZ_0_CoreEngine + * @base VisuMZ_1_BattleCore + * @orderAfter VisuMZ_1_BattleCore + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * This plugin changes the RPG Maker MZ Battle UI for Sideview Battle Systems + * into something more minimalistic. The menus are placed towards the player's + * party to let the player focus their attention to the center of the screen + * instead of to the lower ledges of the screen. The input command windows show + * up near the inputting actor to give the player a clear understanding of who + * is performing what action. + * + * *NOTE* To use this battle layout, you will need the updated version of + * VisuStella's Battle Core. Go into its Plugin Parameters and change the + * Battle Layout Settings > Battle Layout Style > plugin parameter to this + * value: "Sideview Battle UI" or "sideview_ui". + * + * Features include all (but not limited to) the following: + * + * * This plugin changes the UI for the RPG Maker MZ Sideview Battle System. + * * Status windows appear on the side of the screen for each actor in battle. + * * The appearance is more compact for both the status windows and input + * command windows. + * * More of the battlefield can be seen with this kind of layout. + * * Lots of customization options to adjust the status windows. + * + * ============================================================================ + * Requirements + * ============================================================================ + * + * This plugin is made for RPG Maker MZ. This will not work in other iterations + * of RPG Maker. + * + * ------ Required Plugin List ------ + * + * * VisuMZ_0_CoreEngine + * * VisuMZ_1_BattleCore + * + * This plugin requires the above listed plugins to be installed inside your + * game's Plugin Manager list in order to work. You cannot start your game with + * this plugin enabled without the listed plugins. + * + * ------ Tier 3 ------ + * + * This plugin is a Tier 3 plugin. Place it under other plugins of lower tier + * value on your Plugin Manager list (ie: 0, 1, 2, 3, 4, 5). This is to ensure + * that your plugins will have the best compatibility with the rest of the + * VisuStella MZ library. + * + * ============================================================================ + * Major Changes + * ============================================================================ + * + * This plugin adds some new hard-coded features to RPG Maker MZ's functions. + * The following is a list of them. + * + * --- + * + * Sideview Only + * + * This plugin only works for the sideview battle system. If this layout is + * selected in the Battle Core, the battle system will automatically shift to + * sideview regardless of the settings. + * + * *NOTE* To use this battle layout, you will need the updated version of + * VisuStella's Battle Core. Go into its Plugin Parameters and change the + * Battle Layout Settings > Battle Layout Style > plugin parameter to this + * value: "Sideview Battle UI" or "sideview_ui". + * + * --- + * + * Window Properties + * + * With how the battle layout works, many of the command windows used in the + * battle system will have preset and hardcoded properties to them in order to + * maintain a specific aesthetic. These include columns, padding, and scaling + * types to name a few. + * + * Therefore, any plugins that may alter these effects may not have any effect + * at all provided that this plugin is in a higher tier than those modifying + * it. This is an intended change to maintain the aesthetic and is not a bug. + * + * --- + * + * ============================================================================ + * Extra Features + * ============================================================================ + * + * There are some extra features found if other VisuStella MZ plugins are found + * present in the Plugin Manager list. + * + * --- + * + * VisuMZ_2_AggroControlSystem + * VisuMZ_2_BattleSystemBTB + * VisuMZ_3_BoostAction + * VisuMZ_3_StateTooltips + * VisuMZ_4_BreakShields + * + * There are features provided in this plugin for the above plugins. Their UI + * elements can be shown with this plugin's status windows. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Battler Offset Settings + * ============================================================================ + * + * Settings for battler sprite offsets when using the Sideview Battle UI. + * Since there's more room on the screen, placing them lower will help adjust + * for the player's visual comfort. + * + * --- + * + * Settings + * + * Perform Offset?: + * - Offsets the battler sprite positions when using Sideview Battle UI. + * + * Offset X: + * - How much to offset the sprite positions by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the sprite positions by? + * - Negative goes up. Positive goes down. + * + * --- + * + * ============================================================================ + * Plugin Parameters: General Window Settings + * ============================================================================ + * + * Settings for general windows when using the Sideview Battle UI. These + * settings are made for the windows that aren't the status windows but are + * affected by this plugin. + * + * --- + * + * Global + * + * UI Scale: + * - What is the scaling rate for battle windows? + * - Use a number between 0 and 1 for the best results. + * + * --- + * + * Help Window + * + * Fade BG Style?: + * - Fade the Help Window background with this UI? + * + * --- + * + * Actor Command Window + * + * Max Rows: + * - What is the maximum number of rows for the actor command window with + * this UI? + * + * --- + * + * Party Command Window + * + * Max Rows: + * - What is the maximum number of rows for the party command window with + * this UI? + * + * --- + * + * Item Window + * + * Max Rows: + * - What is the maximum number of rows for the item window with this UI? + * + * Width: + * - What is the width item window with this UI? + * - This is the width BEFORE scaling. + * + * Offset X: + * - How much to offset the window X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the window Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Skill Window + * + * Max Rows: + * - What is the maximum number of rows for the skill window with this UI? + * + * Width: + * - What is the width skill window with this UI? + * - This is the width BEFORE scaling. + * + * Offset X: + * - How much to offset the window X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the window Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * ============================================================================ + * Plugin Parameters: Status Window Settings + * ============================================================================ + * + * Settings for the status window when using the Sideview Battle UI. Each of + * these plugin parameters allow you to adjust many of the various elements + * found inside of this window. + * + * --- + * + * Dimensions + * + * Width Base: + * - How width is each actor's status window? + * - This is the width AFTER scaling. + * + * Height Base: + * - How tall do you want the status window to be? + * - 'auto' for automatic calculations. + * - This is the height BEFORE scaling. + * + * Height Buffer: + * - How much space do you want there to be vertically from window + * to window? + * - This is the height BEFORE scaling. + * + * Move Distance: + * - How far will the status window move when the actor is selected + * or active? + * + * Move Speed: + * - How many pixels with the status window move per frame? + * + * --- + * + * Standard UI > BG + * + * Background Dim?: + * - Show the dimmed background? + * + * --- + * + * Standard UI > Name + * + * Show?: + * - Show this UI element? + * + * Offset X: + * - How much to offset the UI X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the UI Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Standard UI > States + * + * Show?: + * - Show this UI element? + * + * Ignore Scale?: + * - Ignore scaling to show icons at their real size? + * + * Offset X: + * - How much to offset the UI X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the UI Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Standard UI > TPB/ATB Gauge + * + * Show?: + * - Show this UI element? + * + * Offset X: + * - How much to offset the UI X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the UI Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Standard UI > HP Gauge + * + * Show?: + * - Show this UI element? + * + * Offset X: + * - How much to offset the UI X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the UI Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Standard UI > MP Gauge + * + * Show?: + * - Show this UI element? + * + * Offset X: + * - How much to offset the UI X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the UI Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Standard UI > TP Gauge + * + * Show?: + * - Show this UI element? + * + * Offset X: + * - How much to offset the UI X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the UI Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Compatibility UI > Aggro Gauge + * + * Show?: + * - Show this UI element? + * - Requires VisuMZ_2_AggroControlSystem! + * + * Offset X: + * - How much to offset the UI X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the UI Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Compatibility UI > Boost Points + * + * Show?: + * - Show this UI element? + * - Requires VisuMZ_3_BoostAction! + * + * Offset X: + * - How much to offset the UI X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the UI Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Compatibility UI > Brave Points + * + * Show?: + * - Show this UI element? + * - Requires VisuMZ_2_BattleSystemBTB! + * + * Offset X: + * - How much to offset the UI X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the UI Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Compatibility UI > Break Shield + * + * Show?: + * - Show this UI element? + * - Requires VisuMZ_4_BreakShields! + * + * Ignore Scale?: + * - Ignore scaling to show icons at their real size? + * + * Offset X: + * - How much to offset the UI X position by? + * - Negative goes left. Positive goes right. + * + * Offset Y: + * - How much to offset the UI Y position by? + * - Negative goes up. Positive goes down. + * + * --- + * + * Compatibility UI > State Tooltips + * + * Show?: + * - Show this UI element? + * - Requires VisuMZ_3_StateTooltips! + * + * --- + * + * JS + * + * JS: Custom UI: + * - JavaScript used to add custom elements to each status window. + * + * --- + * + * ============================================================================ + * Terms of Use + * ============================================================================ + * + * 1. These plugins may be used in free or commercial games provided that they + * have been acquired through legitimate means at VisuStella.com and/or any + * other official approved VisuStella sources. Exceptions and special + * circumstances that may prohibit usage will be listed on VisuStella.com. + * + * 2. All of the listed coders found in the Credits section of this plugin must + * be given credit in your games or credited as a collective under the name: + * "VisuStella". + * + * 3. You may edit the source code to suit your needs, so long as you do not + * claim the source code belongs to you. VisuStella also does not take + * responsibility for the plugin if any changes have been made to the plugin's + * code, nor does VisuStella take responsibility for user-provided custom code + * used for custom control effects including advanced JavaScript notetags + * and/or plugin parameters that allow custom JavaScript code. + * + * 4. You may NOT redistribute these plugins nor take code from this plugin to + * use as your own. These plugins and their code are only to be downloaded from + * VisuStella.com and other official/approved VisuStella sources. A list of + * official/approved sources can also be found on VisuStella.com. + * + * 5. VisuStella is not responsible for problems found in your game due to + * unintended usage, incompatibility problems with plugins outside of the + * VisuStella MZ library, plugin versions that aren't up to date, nor + * responsible for the proper working of compatibility patches made by any + * third parties. VisuStella is not responsible for errors caused by any + * user-provided custom code used for custom control effects including advanced + * JavaScript notetags and/or plugin parameters that allow JavaScript code. + * + * 6. If a compatibility patch needs to be made through a third party that is + * unaffiliated with VisuStella that involves using code from the VisuStella MZ + * library, contact must be made with a member from VisuStella and have it + * approved. The patch would be placed on VisuStella.com as a free download + * to the public. Such patches cannot be sold for monetary gain, including + * commissions, crowdfunding, and/or donations. + * + * 7. If this VisuStella MZ plugin is a paid product, all project team members + * must purchase their own individual copies of the paid product if they are to + * use it. Usage includes working on related game mechanics, managing related + * code, and/or using related Plugin Commands and features. Redistribution of + * the plugin and/or its code to other members of the team is NOT allowed + * unless they own the plugin itself as that conflicts with Article 4. + * + * 8. Any extensions and/or addendums made to this plugin's Terms of Use can be + * found on VisuStella.com and must be followed. + * + * ============================================================================ + * Credits + * ============================================================================ + * + * If you are using this plugin, credit the following people in your game: + * + * Team VisuStella + * * Yanfly + * * Arisu + * * Olivia + * * Irina + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.04: February 10, 2022 + * * Documentation Update! + * ** Help file updated for new features. + * * New Features! + * ** New Plugin Parameter added by Olivia: + * *** Plugin Parameters > Status Window Settings > Background Dim? + * **** Show the dimmed background? + * + * Version 1.03: July 30, 2021 + * * Bug Fixes! + * ** Plugin Parameters for adjusting row quantity should now work properly. + * Fix made by Olivia. + * + * Version 1.02: June 18, 2021 + * * Optimization Update! + * ** Plugin should run more optimized. + * + * Version 1.01: April 23, 2021 + * * Bug Fixes! + * ** Item window during battle should now align properly. Fix made by Olivia. + * + * Version 1.00 Official Release Date: May 12, 2021 + * * Finished Plugin! + * + * ============================================================================ + * End of Helpfile + * ============================================================================ + * + * @ ========================================================================== + * @ Plugin Parameters + * @ ========================================================================== + * + * @param BreakHead + * @text -------------------------- + * @default ---------------------------------- + * + * @param SideviewBattleUI + * @default Plugin Parameters + * + * @param ATTENTION + * @default READ THE HELP FILE + * + * @param BreakSettings + * @text -------------------------- + * @default ---------------------------------- + * + * @param Battler:struct + * @text Battler Offset Settings + * @type struct<Battler> + * @desc Settings for battler sprite offsets when using the Sideview Battle UI. + * @default {"Enable:eval":"true","OffsetX:num":"+0","OffsetY:num":"+128"} + * + * @param GeneralWindow:struct + * @text General Window Settings + * @type struct<GeneralWindow> + * @desc Settings for general windows when using the Sideview Battle UI. + * @default {"Global":"","UiScale:num":"0.80","HelpWindow":"","HelpFadeStyle:eval":"true","ActorCommandWindow":"","ActorCommandWindowMaxRows:num":"8","PartyCommandWindow":"","PartyCommandWindowMaxRows:num":"8","ItemWindow":"","ItemWindowMaxRows:num":"8","ItemWindowWidth:num":"400","ItemWindowOffsetX:num":"+16","ItemWindowOffsetY:num":"+16","SkillWindow":"","SkillWindowMaxRows:num":"8","SkillWindowWidth:num":"400","SkillWindowOffsetX:num":"+16","SkillWindowOffsetY:num":"+16"} + * + * @param StatusWindow:struct + * @text Status Window Settings + * @type struct<StatusWindow> + * @desc Settings for the status window when using the Sideview Battle UI. + * @default {"Dimensions":"","WidthBase:num":"200","HeightBase:str":"auto","HeightBuffer:num":"4","MoveDistance:num":"48","MoveSpeed:num":"4","Standard":"","Name":"","NameShow:eval":"true","NameOffsetX:num":"+48","NameOffsetY:num":"+0","States":"","StatesShow:eval":"true","StatesIgnoreScale:eval":"true","StatesOffsetX:num":"+20","StatesOffsetY:num":"+20","Tpb":"","TpbShow:eval":"true","TpbOffsetX:num":"+44","TpbOffsetY:num":"+0","Hp":"","HpShow:eval":"true","HpOffsetX:num":"+60","HpOffsetY:num":"+0","Mp":"","MpShow:eval":"true","MpOffsetX:num":"+68","MpOffsetY:num":"+0","Tp":"","TpShow:eval":"true","TpOffsetX:num":"+74","TpOffsetY:num":"+0","Compatibility":"","Aggro":"","AggroShow:eval":"true","AggroOffsetX:num":"+44","AggroOffsetY:num":"+0","Boost":"","BoostShow:eval":"true","BoostOffsetX:num":"+52","BoostOffsetY:num":"+2","Brave":"","BraveShow:eval":"true","BraveOffsetX:num":"+52","BraveOffsetY:num":"-6","BreakShield":"","BreakShieldShow:eval":"true","BreakShieldIgnoreScale:eval":"true","BreakShieldOffsetX:num":"+20","BreakShieldOffsetY:num":"+20","StateTooltips":"","StateTooltipsShow:eval":"true","JS":"","CustomUi:func":"\"// Declare Variables\\nconst actor = arguments[0];\\nlet x = 0;\\nlet y = 0;\\nlet width = this.innerWidth;\\nlet height = this.innerHeight;\\n\\n// Draw Custom Elements\\n// Put in code you want here used for windows classes\""} + * + * @param BreakEnd1 + * @text -------------------------- + * @default ---------------------------------- + * + * @param End Of + * @default Plugin Parameters + * + * @param BreakEnd2 + * @text -------------------------- + * @default ---------------------------------- + * + */ +/* ---------------------------------------------------------------------------- + * Battler Offset Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~Battler: + * + * @param Enable:eval + * @text Perform Offset? + * @type boolean + * @on Do Offset + * @off Don't Offset + * @desc Offsets the battler sprite positions when using Sideview Battle UI. + * @default true + * + * @param OffsetX:num + * @text Offset X + * @desc How much to offset the sprite positions by? + * Negative goes left. Positive goes right. + * @default +0 + * + * @param OffsetY:num + * @text Offset Y + * @desc How much to offset the sprite positions by? + * Negative goes up. Positive goes down. + * @default +128 + * + */ +/* ---------------------------------------------------------------------------- + * GeneralWindow Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~GeneralWindow: + * + * @param Global + * + * @param UiScale:num + * @text UI Scale + * @parent Global + * @desc What is the scaling rate for battle windows? + * Use a number between 0 and 1 for the best results. + * @default 0.80 + * + * @param HelpWindow + * @text Help Window + * + * @param HelpFadeStyle:eval + * @text Fade BG Style? + * @parent HelpWindow + * @type boolean + * @on Fade Background + * @off Default Background + * @desc Fade the Help Window background with this UI? + * @default true + * + * @param ActorCommandWindow + * @text Actor Command Window + * + * @param ActorCommandWindowMaxRows:num + * @text Max Rows + * @parent ActorCommandWindow + * @type number + * @min 1 + * @desc What is the maximum number of rows for the actor command window with this UI? + * @default 8 + * + * @param PartyCommandWindow + * @text Party Command Window + * + * @param PartyCommandWindowMaxRows:num + * @text Max Rows + * @parent PartyCommandWindow + * @type number + * @min 1 + * @desc What is the maximum number of rows for the party command window with this UI? + * @default 8 + * + * @param ItemWindow + * @text Item Window + * + * @param ItemWindowMaxRows:num + * @text Max Rows + * @parent ItemWindow + * @type number + * @min 1 + * @desc What is the maximum number of rows for the item window with this UI? + * @default 8 + * + * @param ItemWindowWidth:num + * @text Width + * @parent ItemWindow + * @type number + * @min 1 + * @desc What is the width item window with this UI? + * This is the width BEFORE scaling. + * @default 400 + * + * @param ItemWindowOffsetX:num + * @text Offset X + * @parent ItemWindow + * @desc How much to offset the window X position by? + * Negative goes left. Positive goes right. + * @default +16 + * + * @param ItemWindowOffsetY:num + * @text Offset Y + * @parent ItemWindow + * @desc How much to offset the window Y position by? + * Negative goes up. Positive goes down. + * @default +16 + * + * @param SkillWindow + * @text Skill Window + * + * @param SkillWindowMaxRows:num + * @text Max Rows + * @parent SkillWindow + * @type number + * @min 1 + * @desc What is the maximum number of rows for the skill window with this UI? + * @default 8 + * + * @param SkillWindowWidth:num + * @text Width + * @parent SkillWindow + * @type number + * @min 1 + * @desc What is the width skill window with this UI? + * This is the width BEFORE scaling. + * @default 400 + * + * @param SkillWindowOffsetX:num + * @text Offset X + * @parent SkillWindow + * @desc How much to offset the window X position by? + * Negative goes left. Positive goes right. + * @default +16 + * + * @param SkillWindowOffsetY:num + * @text Offset Y + * @parent SkillWindow + * @desc How much to offset the window Y position by? + * Negative goes up. Positive goes down. + * @default +16 + * + */ +/* ---------------------------------------------------------------------------- + * Status Window Settings + * ---------------------------------------------------------------------------- + */ +/*~struct~StatusWindow: + * + * @param Dimensions + * + * @param WidthBase:num + * @text Width Base + * @parent Dimensions + * @type number + * @desc How width is each actor's status window? + * This is the width AFTER scaling. + * @default 200 + * + * @param HeightBase:str + * @text Height Base + * @parent Dimensions + * @type number + * @desc How tall do you want the status window to be? + * 'auto' for automatic calculations. Value is BEFORE scaling. + * @default auto + * + * @param HeightBuffer:num + * @text Height Buffer + * @parent HeightBase:str + * @type number + * @desc How much space do you want there to be vertically from window to window? + * @default 4 + * + * @param MoveDistance:num + * @text Move Distance + * @parent Dimensions + * @type number + * @desc How far will the status window move when + * the actor is selected or active? + * @default 48 + * + * @param MoveSpeed:num + * @text Move Speed + * @parent MoveDistance:num + * @type number + * @desc How many pixels with the status window move per frame? + * @default 4 + * + * @param Standard + * @text Standard UI + * + * @param BgShow:eval + * @text Background Dim? + * @parent Standard + * @type boolean + * @on Show + * @off Hide + * @desc Show the dimmed background? + * @default true + * + * @param Name + * @parent Standard + * + * @param NameShow:eval + * @text Show? + * @parent Name + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * @default true + * + * @param NameOffsetX:num + * @text Offset X + * @parent Name + * @desc How much to offset the UI X position by? + * Negative goes left. Positive goes right. + * @default +48 + * + * @param NameOffsetY:num + * @text Offset Y + * @parent Name + * @desc How much to offset the UI Y position by? + * Negative goes up. Positive goes down. + * @default +0 + * + * @param States + * @parent Standard + * + * @param StatesShow:eval + * @text Show? + * @parent States + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * @default true + * + * @param StatesIgnoreScale:eval + * @text Ignore Scale? + * @parent States + * @type boolean + * @on Ignore Scaling + * @off Use Scaling + * @desc Ignore scaling to show icons at their real size? + * @default true + * + * @param StatesOffsetX:num + * @text Offset X + * @parent States + * @desc How much to offset the UI X position by? + * Negative goes left. Positive goes right. + * @default +20 + * + * @param StatesOffsetY:num + * @text Offset Y + * @parent States + * @desc How much to offset the UI Y position by? + * Negative goes up. Positive goes down. + * @default +20 + * + * @param Tpb + * @text TPB/ATB Gauge + * @parent Standard + * + * @param TpbShow:eval + * @text Show? + * @parent Tpb + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * @default true + * + * @param TpbOffsetX:num + * @text Offset X + * @parent Tpb + * @desc How much to offset the UI X position by? + * Negative goes left. Positive goes right. + * @default +44 + * + * @param TpbOffsetY:num + * @text Offset Y + * @parent Tpb + * @desc How much to offset the UI Y position by? + * Negative goes up. Positive goes down. + * @default +0 + * + * @param Hp + * @text HP Gauge + * @parent Standard + * + * @param HpShow:eval + * @text Show? + * @parent Hp + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * @default true + * + * @param HpOffsetX:num + * @text Offset X + * @parent Hp + * @desc How much to offset the UI X position by? + * Negative goes left. Positive goes right. + * @default +60 + * + * @param HpOffsetY:num + * @text Offset Y + * @parent Hp + * @desc How much to offset the UI Y position by? + * Negative goes up. Positive goes down. + * @default +0 + * + * @param Mp + * @text MP Gauge + * @parent Standard + * + * @param MpShow:eval + * @text Show? + * @parent Mp + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * @default true + * + * @param MpOffsetX:num + * @text Offset X + * @parent Mp + * @desc How much to offset the UI X position by? + * Negative goes left. Positive goes right. + * @default +68 + * + * @param MpOffsetY:num + * @text Offset Y + * @parent Mp + * @desc How much to offset the UI Y position by? + * Negative goes up. Positive goes down. + * @default +0 + * + * @param Tp + * @text TP Gauge + * @parent Standard + * + * @param TpShow:eval + * @text Show? + * @parent Tp + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * @default true + * + * @param TpOffsetX:num + * @text Offset X + * @parent Tp + * @desc How much to offset the UI X position by? + * Negative goes left. Positive goes right. + * @default +74 + * + * @param TpOffsetY:num + * @text Offset Y + * @parent Tp + * @desc How much to offset the UI Y position by? + * Negative goes up. Positive goes down. + * @default +0 + * + * @param Compatibility + * @text Compatibility UI + * + * @param Aggro + * @text Aggro Gauge + * @parent Compatibility + * @default VisuMZ_2_AggroControlSystem + * + * @param AggroShow:eval + * @text Show? + * @parent Aggro + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * Requires VisuMZ_2_AggroControlSystem! + * @default true + * + * @param AggroOffsetX:num + * @text Offset X + * @parent Aggro + * @desc How much to offset the UI X position by? + * Negative goes left. Positive goes right. + * @default +44 + * + * @param AggroOffsetY:num + * @text Offset Y + * @parent Aggro + * @desc How much to offset the UI Y position by? + * Negative goes up. Positive goes down. + * @default +0 + * + * @param Boost + * @text Boost Points + * @parent Compatibility + * @default VisuMZ_3_BoostAction + * + * @param BoostShow:eval + * @text Show? + * @parent Boost + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * Requires VisuMZ_3_BoostAction! + * @default true + * + * @param BoostOffsetX:num + * @text Offset X + * @parent Boost + * @desc How much to offset the UI X position by? + * Negative goes left. Positive goes right. + * @default +52 + * + * @param BoostOffsetY:num + * @text Offset Y + * @parent Boost + * @desc How much to offset the UI Y position by? + * Negative goes up. Positive goes down. + * @default +2 + * + * @param Brave + * @text Brave Points + * @parent Compatibility + * @default VisuMZ_2_BattleSystemBTB + * + * @param BraveShow:eval + * @text Show? + * @parent Brave + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * Requires VisuMZ_2_BattleSystemBTB! + * @default true + * + * @param BraveOffsetX:num + * @text Offset X + * @parent Brave + * @desc How much to offset the UI X position by? + * Negative goes left. Positive goes right. + * @default +52 + * + * @param BraveOffsetY:num + * @text Offset Y + * @parent Brave + * @desc How much to offset the UI Y position by? + * Negative goes up. Positive goes down. + * @default -6 + * + * @param BreakShield + * @text Break Shield + * @parent Compatibility + * @default VisuMZ_4_BreakShields + * + * @param BreakShieldShow:eval + * @text Show? + * @parent BreakShield + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * Requires VisuMZ_4_BreakShields! + * @default true + * + * @param BreakShieldIgnoreScale:eval + * @text Ignore Scale? + * @parent BreakShield + * @type boolean + * @on Ignore Scaling + * @off Use Scaling + * @desc Ignore scaling to show icons at their real size? + * @default true + * + * @param BreakShieldOffsetX:num + * @text Offset X + * @parent BreakShield + * @desc How much to offset the UI X position by? + * Negative goes left. Positive goes right. + * @default +20 + * + * @param BreakShieldOffsetY:num + * @text Offset Y + * @parent BreakShield + * @desc How much to offset the UI Y position by? + * Negative goes up. Positive goes down. + * @default +20 + * + * @param StateTooltips + * @text State Tooltips + * @parent Compatibility + * @default VisuMZ_3_StateTooltips + * + * @param StateTooltipsShow:eval + * @text Show? + * @parent StateTooltips + * @type boolean + * @on Show + * @off Hide + * @desc Show this UI element? + * Requires VisuMZ_3_StateTooltips! + * @default true + * + * @param JS + * + * @param CustomUi:func + * @text JS: Custom UI + * @parent JS + * @type note + * @desc JavaScript used to add custom elements to each status window. + * @default "// Declare Variables\nconst actor = arguments[0];\nlet x = 0;\nlet y = 0;\nlet width = this.innerWidth;\nlet height = this.innerHeight;\n\n// Draw Custom Elements\n// Put in code you want here used for windows classes" + * + */ +//============================================================================= + +function _0x3d88(_0x2704cc,_0x5b98b7){const _0x353657=_0x3536();return _0x3d88=function(_0x3d882f,_0x324447){_0x3d882f=_0x3d882f-0xc5;let _0x6e90a4=_0x353657[_0x3d882f];return _0x6e90a4;},_0x3d88(_0x2704cc,_0x5b98b7);}const _0x2801ab=_0x3d88;(function(_0x45c721,_0x2ee996){const _0x266c80=_0x3d88,_0x15f22e=_0x45c721();while(!![]){try{const _0x3f65f0=parseInt(_0x266c80(0x164))/0x1+parseInt(_0x266c80(0xef))/0x2+parseInt(_0x266c80(0x119))/0x3+parseInt(_0x266c80(0x1cd))/0x4+parseInt(_0x266c80(0x121))/0x5+-parseInt(_0x266c80(0x131))/0x6+-parseInt(_0x266c80(0x15e))/0x7*(parseInt(_0x266c80(0xd7))/0x8);if(_0x3f65f0===_0x2ee996)break;else _0x15f22e['push'](_0x15f22e['shift']());}catch(_0x2e543c){_0x15f22e['push'](_0x15f22e['shift']());}}}(_0x3536,0x7d936));var label=_0x2801ab(0x1d7),tier=tier||0x0,dependencies=['VisuMZ_1_BattleCore'],pluginData=$plugins[_0x2801ab(0x1dd)](function(_0x16a3fd){const _0x4ac36a=_0x2801ab;return _0x16a3fd[_0x4ac36a(0x153)]&&_0x16a3fd[_0x4ac36a(0x1f6)][_0x4ac36a(0xe4)]('['+label+']');})[0x0];VisuMZ[label][_0x2801ab(0xe2)]=VisuMZ[label][_0x2801ab(0xe2)]||{},VisuMZ['ConvertParams']=function(_0x40d854,_0x47f7b1){const _0x1cc5df=_0x2801ab;for(const _0x53c144 in _0x47f7b1){if(_0x53c144[_0x1cc5df(0x15d)](/(.*):(.*)/i)){const _0x22cf60=String(RegExp['$1']),_0x45e3c1=String(RegExp['$2'])[_0x1cc5df(0x127)]()[_0x1cc5df(0xe0)]();let _0x22d890,_0x9d0d81,_0x15aabe;switch(_0x45e3c1){case _0x1cc5df(0x178):_0x22d890=_0x47f7b1[_0x53c144]!==''?Number(_0x47f7b1[_0x53c144]):0x0;break;case _0x1cc5df(0x1e3):_0x9d0d81=_0x47f7b1[_0x53c144]!==''?JSON[_0x1cc5df(0x159)](_0x47f7b1[_0x53c144]):[],_0x22d890=_0x9d0d81['map'](_0x498bb0=>Number(_0x498bb0));break;case _0x1cc5df(0x12d):_0x22d890=_0x47f7b1[_0x53c144]!==''?eval(_0x47f7b1[_0x53c144]):null;break;case _0x1cc5df(0x124):_0x9d0d81=_0x47f7b1[_0x53c144]!==''?JSON['parse'](_0x47f7b1[_0x53c144]):[],_0x22d890=_0x9d0d81['map'](_0xd1ba64=>eval(_0xd1ba64));break;case _0x1cc5df(0x176):_0x22d890=_0x47f7b1[_0x53c144]!==''?JSON[_0x1cc5df(0x159)](_0x47f7b1[_0x53c144]):'';break;case'ARRAYJSON':_0x9d0d81=_0x47f7b1[_0x53c144]!==''?JSON[_0x1cc5df(0x159)](_0x47f7b1[_0x53c144]):[],_0x22d890=_0x9d0d81[_0x1cc5df(0x120)](_0x3ecb24=>JSON[_0x1cc5df(0x159)](_0x3ecb24));break;case _0x1cc5df(0xfb):_0x22d890=_0x47f7b1[_0x53c144]!==''?new Function(JSON[_0x1cc5df(0x159)](_0x47f7b1[_0x53c144])):new Function('return\x200');break;case _0x1cc5df(0x10a):_0x9d0d81=_0x47f7b1[_0x53c144]!==''?JSON[_0x1cc5df(0x159)](_0x47f7b1[_0x53c144]):[],_0x22d890=_0x9d0d81[_0x1cc5df(0x120)](_0x46cd76=>new Function(JSON['parse'](_0x46cd76)));break;case _0x1cc5df(0x139):_0x22d890=_0x47f7b1[_0x53c144]!==''?String(_0x47f7b1[_0x53c144]):'';break;case _0x1cc5df(0x18b):_0x9d0d81=_0x47f7b1[_0x53c144]!==''?JSON[_0x1cc5df(0x159)](_0x47f7b1[_0x53c144]):[],_0x22d890=_0x9d0d81[_0x1cc5df(0x120)](_0x228960=>String(_0x228960));break;case _0x1cc5df(0x1c0):_0x15aabe=_0x47f7b1[_0x53c144]!==''?JSON['parse'](_0x47f7b1[_0x53c144]):{},_0x22d890=VisuMZ[_0x1cc5df(0x157)]({},_0x15aabe);break;case'ARRAYSTRUCT':_0x9d0d81=_0x47f7b1[_0x53c144]!==''?JSON[_0x1cc5df(0x159)](_0x47f7b1[_0x53c144]):[],_0x22d890=_0x9d0d81[_0x1cc5df(0x120)](_0x49e3c3=>VisuMZ[_0x1cc5df(0x157)]({},JSON[_0x1cc5df(0x159)](_0x49e3c3)));break;default:continue;}_0x40d854[_0x22cf60]=_0x22d890;}}return _0x40d854;},(_0x5ebb35=>{const _0x5d3663=_0x2801ab,_0x37238b=_0x5ebb35[_0x5d3663(0x1be)];for(const _0x5ccb1f of dependencies){if(!Imported[_0x5ccb1f]){alert('%1\x20is\x20missing\x20a\x20required\x20plugin.\x0aPlease\x20install\x20%2\x20into\x20the\x20Plugin\x20Manager.'[_0x5d3663(0x1a8)](_0x37238b,_0x5ccb1f)),SceneManager[_0x5d3663(0x1d5)]();break;}}const _0xdb4a9e=_0x5ebb35['description'];if(_0xdb4a9e['match'](/\[Version[ ](.*?)\]/i)){const _0x4f0f5c=Number(RegExp['$1']);if(_0x4f0f5c!==VisuMZ[label][_0x5d3663(0xe8)]){if(_0x5d3663(0x1c2)===_0x5d3663(0x1c2))alert(_0x5d3663(0x11b)['format'](_0x37238b,_0x4f0f5c)),SceneManager[_0x5d3663(0x1d5)]();else{const _0x158072=_0x367176[_0x5d3663(0x1d7)][_0x5d3663(0x169)][_0x5d3663(0x195)](this);return _0x196f44['isUsingSideviewUiLayout']()&&(_0x158072['y']=_0x3ce3fc[_0x5d3663(0x1f0)]*0xa,_0x158072[_0x5d3663(0x1f0)]=0x0),_0x158072;}}}if(_0xdb4a9e['match'](/\[Tier[ ](\d+)\]/i)){if(_0x5d3663(0x152)!==_0x5d3663(0x152))return _0x45d114[_0x5d3663(0x1fe)]&&_0x42174a[_0x5d3663(0x1d9)]&&_0x1c9f78['VisuMZ_2_AggroControlSystem']&&_0x966384[_0x5d3663(0x162)]&&_0x3d777a[_0x5d3663(0x16b)][_0x5d3663(0xe2)]['Aggro'][_0x5d3663(0xe7)];else{const _0x5a8df7=Number(RegExp['$1']);if(_0x5a8df7<tier){if(_0x5d3663(0xd6)==='KeAWN')alert(_0x5d3663(0x1ab)[_0x5d3663(0x1a8)](_0x37238b,_0x5a8df7,tier)),SceneManager[_0x5d3663(0x1d5)]();else return _0x2eb407[_0x5d3663(0x1d7)][_0x5d3663(0x106)][_0x5d3663(0x195)](this);}else _0x5d3663(0x173)!==_0x5d3663(0x173)?(this[_0x5d3663(0x145)][_0x5d3663(0x1b4)](),this[_0x5d3663(0xf1)]['updateSideviewUiPosition']()):tier=Math[_0x5d3663(0xe6)](_0x5a8df7,tier);}}VisuMZ[_0x5d3663(0x157)](VisuMZ[label][_0x5d3663(0xe2)],_0x5ebb35['parameters']);})(pluginData),BattleManager[_0x2801ab(0x1d3)]=function(){const _0x3c9f5d=_0x2801ab;return SceneManager['isSceneBattle']()&&SceneManager[_0x3c9f5d(0xd1)][_0x3c9f5d(0x1f5)]()==='sideview_ui';},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x174)]=Game_System[_0x2801ab(0x17a)][_0x2801ab(0x1b2)],Game_System['prototype'][_0x2801ab(0x1b2)]=function(){const _0x17161a=_0x2801ab;if(BattleManager[_0x17161a(0x1d3)]()){if(_0x17161a(0x13c)!==_0x17161a(0x13c))this[_0x17161a(0x135)]();else return!![];}return VisuMZ[_0x17161a(0x1d7)][_0x17161a(0x174)][_0x17161a(0x195)](this);},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x1db)]=Scene_Base['prototype']['isWindowMaskingEnabled'],Scene_Base[_0x2801ab(0x17a)][_0x2801ab(0x1c1)]=function(){const _0x501c24=_0x2801ab;return BattleManager[_0x501c24(0x1d3)]()?![]:VisuMZ[_0x501c24(0x1d7)][_0x501c24(0x1db)][_0x501c24(0x195)](this);},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x1c5)]=Scene_Battle[_0x2801ab(0x17a)]['statusWindowRect'],Scene_Battle[_0x2801ab(0x17a)][_0x2801ab(0x17d)]=function(){const _0x395a1b=_0x2801ab,_0x5481c4=VisuMZ['SideviewBattleUI'][_0x395a1b(0x1c5)][_0x395a1b(0x195)](this);if(BattleManager[_0x395a1b(0x1d3)]()){if('TzxZa'!==_0x395a1b(0x151))_0x5481c4['y']=Graphics[_0x395a1b(0x1f0)]*0xa,_0x5481c4[_0x395a1b(0x1f0)]=0x0;else{if(_0x1bcd6e[_0x395a1b(0x1d3)]())return!![];return _0x4d5c44[_0x395a1b(0x1d7)][_0x395a1b(0x174)][_0x395a1b(0x195)](this);}}return _0x5481c4;},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x169)]=Scene_Battle[_0x2801ab(0x17a)]['actorWindowRect'],Scene_Battle[_0x2801ab(0x17a)][_0x2801ab(0x15b)]=function(){const _0x46d18b=_0x2801ab,_0xa54ded=VisuMZ['SideviewBattleUI'][_0x46d18b(0x169)]['call'](this);return BattleManager['isUsingSideviewUiLayout']()&&(_0x46d18b(0x190)!=='iuqoQ'?(_0xa54ded['y']=Graphics['height']*0xa,_0xa54ded[_0x46d18b(0x1f0)]=0x0):(_0x2111a8['SideviewBattleUI'][_0x46d18b(0x10f)][_0x46d18b(0x195)](this),this['adjustSideviewUiWidth'](),this[_0x46d18b(0x1ec)]())),_0xa54ded;},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x11a)]=Scene_Battle[_0x2801ab(0x17a)][_0x2801ab(0xcd)],Scene_Battle[_0x2801ab(0x17a)][_0x2801ab(0xcd)]=function(){const _0x416092=_0x2801ab;VisuMZ['SideviewBattleUI'][_0x416092(0x11a)][_0x416092(0x195)](this),this[_0x416092(0x179)]();},Scene_Battle[_0x2801ab(0x17a)][_0x2801ab(0x179)]=function(){const _0x2be205=_0x2801ab;if(!BattleManager[_0x2be205(0x11c)]())return;if(!BattleManager[_0x2be205(0x1d3)]())return;this[_0x2be205(0xc5)][_0x2be205(0x1a3)]&&this['_partyCommandWindow'][_0x2be205(0x1b4)]();this[_0x2be205(0x145)][_0x2be205(0x1a3)]&&this[_0x2be205(0x145)][_0x2be205(0x1b4)]();this[_0x2be205(0xf1)]['active']&&(_0x2be205(0x16e)==='taKex'?(_0x6b460[_0x2be205(0x1d3)]()&&_0x17dbc3[_0x2be205(0x1ef)]&&(_0x146834+=_0x3b4d89[_0x2be205(0x16a)],_0x27ffc5+=_0x55e4e2[_0x2be205(0x181)]),_0x98b49a[_0x2be205(0x1d7)][_0x2be205(0x101)][_0x2be205(0x195)](this,_0x355743,_0x1d1de6)):(this[_0x2be205(0x145)][_0x2be205(0x1b4)](),this[_0x2be205(0xf1)][_0x2be205(0x1b4)]()));this[_0x2be205(0x1cc)][_0x2be205(0x1a3)]&&(this[_0x2be205(0x145)][_0x2be205(0x1b4)](),this[_0x2be205(0x1cc)][_0x2be205(0x1b4)]());if(this[_0x2be205(0xe5)][_0x2be205(0x1a3)]){if(_0x2be205(0x1d0)!==_0x2be205(0x1d0))return _0x8233d3['SideviewBattleUI'][_0x2be205(0x1db)]['call'](this);else this[_0x2be205(0x145)][_0x2be205(0x15f)](),this['_skillWindow'][_0x2be205(0x15f)](),this[_0x2be205(0x1cc)][_0x2be205(0x15f)]();}this[_0x2be205(0x117)][_0x2be205(0x1a3)]&&(this[_0x2be205(0x145)]['updateSideviewUiFadeOut'](),this['_skillWindow'][_0x2be205(0x15f)](),this[_0x2be205(0x1cc)][_0x2be205(0x15f)]());},VisuMZ['SideviewBattleUI'][_0x2801ab(0x1ed)]=Scene_Battle[_0x2801ab(0x17a)][_0x2801ab(0x13f)],Scene_Battle['prototype'][_0x2801ab(0x13f)]=function(){const _0x36fa20=_0x2801ab;VisuMZ[_0x36fa20(0x1d7)][_0x36fa20(0x1ed)][_0x36fa20(0x195)](this),this['createSideviewUiBattleStatusWindows']();},Scene_Battle[_0x2801ab(0x17a)]['createSideviewUiBattleStatusWindows']=function(){const _0x566097=_0x2801ab;if(!BattleManager[_0x566097(0x1d3)]())return;this[_0x566097(0x1fb)]=[];const _0x390b88=$gameParty[_0x566097(0xcf)]();for(let _0x57cbae=0x0;_0x57cbae<_0x390b88;_0x57cbae++){if(_0x566097(0x116)===_0x566097(0x116)){const _0x8804ed=new Window_SideviewUiBattleStatus(_0x57cbae);this[_0x566097(0x1d8)](_0x8804ed),this[_0x566097(0x1fb)][_0x566097(0xeb)](_0x8804ed);}else _0x5a1a6c[_0x566097(0x1d7)][_0x566097(0x1f4)][_0x566097(0x195)](this);}},Scene_Battle[_0x2801ab(0x17a)]['refreshSideviewUiBattleStatusWindows']=function(){const _0x32b08f=_0x2801ab;if(!this[_0x32b08f(0x1fb)])return;for(const _0x1519ec of this[_0x32b08f(0x1fb)]){if(!_0x1519ec)continue;_0x1519ec[_0x32b08f(0x14e)]();}},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xd8)]=Scene_Battle['prototype']['createCancelButton'],Scene_Battle[_0x2801ab(0x17a)][_0x2801ab(0x19e)]=function(){const _0x4e6479=_0x2801ab;if(BattleManager[_0x4e6479(0x1d3)]())return;VisuMZ['SideviewBattleUI'][_0x4e6479(0xd8)][_0x4e6479(0x195)](this);},Sprite_Battler[_0x2801ab(0x1ef)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x132)]['Enable']??!![],Sprite_Battler[_0x2801ab(0x16a)]=VisuMZ[_0x2801ab(0x1d7)]['Settings']['Battler'][_0x2801ab(0xdd)]??0x0,Sprite_Battler[_0x2801ab(0x181)]=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x132)][_0x2801ab(0x150)]??0x80,VisuMZ['SideviewBattleUI'][_0x2801ab(0x101)]=Sprite_Battler[_0x2801ab(0x17a)]['setHome'],Sprite_Battler['prototype'][_0x2801ab(0x1e4)]=function(_0x52df64,_0x4f88ea){const _0x545978=_0x2801ab;BattleManager[_0x545978(0x1d3)]()&&Sprite_Battler[_0x545978(0x1ef)]&&(_0x52df64+=Sprite_Battler[_0x545978(0x16a)],_0x4f88ea+=Sprite_Battler[_0x545978(0x181)]),VisuMZ[_0x545978(0x1d7)]['Sprite_Battler_setHome'][_0x545978(0x195)](this,_0x52df64,_0x4f88ea);},Window_Base[_0x2801ab(0x123)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)]['GeneralWindow']['UiScale']??0.8,Window_Base[_0x2801ab(0xca)]=0x0,Window_Base[_0x2801ab(0x108)]=0x0,Window_Base[_0x2801ab(0x17a)]['initMembersSideviewUi']=function(){const _0x340a5d=_0x2801ab;if(!this[_0x340a5d(0x1d3)]())return;const _0x181b7d=Window_Base[_0x340a5d(0x123)];this[_0x340a5d(0x1d6)]['x']=this['scale']['y']=_0x181b7d;},Window_Base[_0x2801ab(0x17a)][_0x2801ab(0x1d3)]=function(){return BattleManager['isUsingSideviewUiLayout']();},Window_Base['prototype'][_0x2801ab(0x137)]=function(){const _0x4b2880=_0x2801ab;if(!this[_0x4b2880(0x1d3)]())return;const _0x680af0=this['scale']['x'],_0x938109=-(Math[_0x4b2880(0x1b1)](Graphics['width']-Graphics['boxWidth'])/0x2),_0x25fe97=_0x938109+Graphics[_0x4b2880(0x129)]-Math['ceil'](this[_0x4b2880(0x129)]*_0x680af0),_0x41c50b=-(Math[_0x4b2880(0x1b1)](Graphics[_0x4b2880(0x1f0)]-Graphics[_0x4b2880(0xe1)])/0x2),_0x1e1e0d=_0x41c50b+Graphics[_0x4b2880(0x1f0)]-Math[_0x4b2880(0x166)](this[_0x4b2880(0x1f0)]*_0x680af0);this['x']=this['x']['clamp'](_0x938109,_0x25fe97),this['y']=this['y']['clamp'](_0x41c50b,_0x1e1e0d);},Window_Base[_0x2801ab(0x17a)]['sideviewUiTargetActor']=function(){const _0x3fc67b=_0x2801ab;return BattleManager[_0x3fc67b(0xc6)]||$gameParty[_0x3fc67b(0xee)]()[0x0];},Window_Base['prototype']['updateSideviewUiPosition']=function(){const _0x2a70d9=_0x2801ab;if(!this[_0x2a70d9(0x1d3)]())return;const _0x498775=this[_0x2a70d9(0x15c)]();if(!_0x498775)return;const _0x232ec8=_0x498775[_0x2a70d9(0x182)]();this['x']=_0x232ec8['x']+Math[_0x2a70d9(0x142)](_0x232ec8['width']/0x2),this['x']-=Math[_0x2a70d9(0x142)]((Graphics[_0x2a70d9(0x129)]-Graphics[_0x2a70d9(0x1de)])/0x2),this['x']+=SceneManager[_0x2a70d9(0xd1)][_0x2a70d9(0x14d)][_0x2a70d9(0x1e9)]['x'],this['x']+=this[_0x2a70d9(0x170)](),this['y']=_0x232ec8['y']-_0x232ec8[_0x2a70d9(0x1f0)],this['y']-=Math[_0x2a70d9(0x142)]((Graphics[_0x2a70d9(0x1f0)]-Graphics['boxHeight'])/0x2),this['y']+=SceneManager[_0x2a70d9(0xd1)][_0x2a70d9(0x14d)][_0x2a70d9(0x1e9)]['y'],this['y']+=this[_0x2a70d9(0x1aa)](),this[_0x2a70d9(0x137)](),this[_0x2a70d9(0x1da)]();},Window_Base[_0x2801ab(0x17a)]['sideviewUiPositionOffsetX']=function(){const _0x209853=_0x2801ab;return Window_Base[_0x209853(0xca)];},Window_Base[_0x2801ab(0x17a)][_0x2801ab(0x1aa)]=function(){const _0x9ec13a=_0x2801ab;return Window_Base[_0x9ec13a(0x108)];},Window_Base['prototype'][_0x2801ab(0x1a9)]=function(){const _0x569ab1=_0x2801ab;if(!this[_0x569ab1(0x1d3)]())return;const _0x484d26=this[_0x569ab1(0x129)];this[_0x569ab1(0x129)]=this[_0x569ab1(0x122)](),_0x484d26!==this['width']&&this[_0x569ab1(0x1bf)]();},Window_Base[_0x2801ab(0x17a)][_0x2801ab(0x122)]=function(){const _0x4b4247=_0x2801ab;return VisuMZ[_0x4b4247(0x1e1)][_0x4b4247(0xe2)][_0x4b4247(0xc7)][_0x4b4247(0x202)]||0xc0;},Window_Base['prototype']['adjustSideviewUiHeight']=function(){const _0xdc00f2=_0x2801ab;if(!this[_0xdc00f2(0x1d3)]())return;const _0x447f6c=this['height'],_0x51ece5=this['dataSideviewUiLength'](),_0x35dae3=this[_0xdc00f2(0x171)](_0x51ece5),_0x382085=this[_0xdc00f2(0x171)](this[_0xdc00f2(0xf4)]());this['height']=Math[_0xdc00f2(0x1ff)](_0x35dae3,_0x382085),_0x447f6c!==this[_0xdc00f2(0x1f0)]&&this[_0xdc00f2(0x1bf)]();},Window_Base['prototype']['dataSideviewUiLength']=function(){const _0x11ddcf=_0x2801ab;if(this[_0x11ddcf(0x17b)])return this['_data']['length'];if(this[_0x11ddcf(0x1fd)])return this[_0x11ddcf(0x1fd)]['length'];return 0x4;},Window_Base['prototype'][_0x2801ab(0xf4)]=function(){return 0x8;},Window_Base[_0x2801ab(0x17a)]['updateSideviewUiFadeIn']=function(){const _0x214508=_0x2801ab;if(this[_0x214508(0xfe)]&&!this[_0x214508(0x1a3)])return;this[_0x214508(0x1c3)]=!![];},Window_Base['prototype'][_0x2801ab(0x15f)]=function(){const _0x25e541=_0x2801ab;this[_0x25e541(0x1c3)]=![];},Window_Help[_0x2801ab(0x10c)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x16c)][_0x2801ab(0x1ca)]??!![],VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x1ce)]=Window_Help[_0x2801ab(0x17a)][_0x2801ab(0x110)],Window_Help[_0x2801ab(0x17a)][_0x2801ab(0x110)]=function(_0x4bf25e){const _0x159a57=_0x2801ab;VisuMZ[_0x159a57(0x1d7)][_0x159a57(0x1ce)][_0x159a57(0x195)](this,_0x4bf25e),this['createSideviewUiDimmerSprite']();},Window_Help[_0x2801ab(0x17a)][_0x2801ab(0x19c)]=function(){const _0x1de307=_0x2801ab;if(!this[_0x1de307(0x1d3)]())return;if(!Window_Help[_0x1de307(0x10c)])return;this[_0x1de307(0x172)]=0x0;!this[_0x1de307(0x163)]&&(this[_0x1de307(0x163)]=new Sprite(),this[_0x1de307(0x1fa)](this[_0x1de307(0x163)]));const _0x2cd499=this[_0x1de307(0x129)]-Window_SideviewUiBattleStatus[_0x1de307(0x10b)],_0x547f67=this['lineHeight']()*0x2;this[_0x1de307(0x163)][_0x1de307(0x1e7)]=new Bitmap(_0x2cd499,_0x547f67),this[_0x1de307(0x163)]['x']=-0x4,this[_0x1de307(0x163)]['y']=this[_0x1de307(0x149)];const _0x224bb5=this[_0x1de307(0x163)][_0x1de307(0x1e7)],_0x560291=ColorManager[_0x1de307(0x1eb)](),_0x2e4e73=ColorManager['dimColor2']();_0x224bb5[_0x1de307(0xfc)](0x0,0x0,Math[_0x1de307(0x142)](_0x2cd499/0x2),_0x547f67,_0x560291),_0x224bb5[_0x1de307(0x183)](Math['round'](_0x2cd499/0x2),0x0,Math['round'](_0x2cd499/0x2),_0x547f67,_0x560291,_0x2e4e73);},Window_ItemList[_0x2801ab(0x1bb)]=VisuMZ['SideviewBattleUI']['Settings'][_0x2801ab(0x16c)][_0x2801ab(0x1ae)]??0x8,Window_ItemList[_0x2801ab(0x104)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x16c)][_0x2801ab(0x136)]??0x190,Window_ItemList[_0x2801ab(0xca)]=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x16c)][_0x2801ab(0x18c)]??0x10,Window_ItemList[_0x2801ab(0x108)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x16c)][_0x2801ab(0x147)]??0x10,VisuMZ[_0x2801ab(0x1d7)]['Window_ItemList_initialize']=Window_ItemList['prototype']['initialize'],Window_ItemList[_0x2801ab(0x17a)]['initialize']=function(_0x985abe){const _0x2571ec=_0x2801ab;VisuMZ[_0x2571ec(0x1d7)][_0x2571ec(0x113)][_0x2571ec(0x195)](this,_0x985abe),this[_0x2571ec(0x1fc)]();},VisuMZ['SideviewBattleUI'][_0x2801ab(0x198)]=Window_ItemList[_0x2801ab(0x17a)][_0x2801ab(0x1c9)],Window_ItemList['prototype'][_0x2801ab(0x1c9)]=function(){const _0x50b01d=_0x2801ab;return this['isUsingSideviewUiLayout']()?'XrZsx'!=='XrZsx'?_0x10e230['SideviewBattleUI'][_0x50b01d(0x198)]['call'](this):0x1:VisuMZ['SideviewBattleUI'][_0x50b01d(0x198)][_0x50b01d(0x195)](this);},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x1b5)]=Window_ItemList[_0x2801ab(0x17a)][_0x2801ab(0x155)],Window_ItemList[_0x2801ab(0x17a)][_0x2801ab(0x155)]=function(){const _0x9ce7bc=_0x2801ab;if(this[_0x9ce7bc(0x1d3)]()){if(_0x9ce7bc(0xfd)!==_0x9ce7bc(0x1e8))return 0x0;else{let _0x5145c9=_0x57990e[_0x9ce7bc(0x17a)][_0x9ce7bc(0x170)][_0x9ce7bc(0x195)](this);return _0x5145c9+_0x128e8d[_0x9ce7bc(0xca)];}}else return VisuMZ[_0x9ce7bc(0x1d7)]['Window_ItemList_colSpacing'][_0x9ce7bc(0x195)](this);},VisuMZ['SideviewBattleUI'][_0x2801ab(0xdc)]=Window_ItemList[_0x2801ab(0x17a)][_0x2801ab(0x17c)],Window_ItemList[_0x2801ab(0x17a)][_0x2801ab(0x17c)]=function(){const _0x13888a=_0x2801ab;VisuMZ['SideviewBattleUI'][_0x13888a(0xdc)][_0x13888a(0x195)](this),this[_0x13888a(0x1a9)](),this[_0x13888a(0x1ec)](),this[_0x13888a(0x1b4)]();},Window_ItemList[_0x2801ab(0x17a)][_0x2801ab(0x15c)]=function(){const _0x3f89d0=_0x2801ab;return this[_0x3f89d0(0x12a)]||Window_Base['prototype'][_0x3f89d0(0x15c)]['call'](this);},Window_ItemList['prototype'][_0x2801ab(0x122)]=function(){return Window_ItemList['SIDEVIEW_BATTLE_UI_WINDOW_WIDTH']||0xc0;},Window_ItemList[_0x2801ab(0x17a)]['sideviewUiPositionOffsetX']=function(){const _0x41b988=_0x2801ab;let _0x47f171=Window_Selectable['prototype']['sideviewUiPositionOffsetX']['call'](this);return _0x47f171+Window_ItemList[_0x41b988(0xca)];},Window_ItemList['prototype'][_0x2801ab(0x1aa)]=function(){const _0x54b5ec=_0x2801ab;let _0x3c6ac6=Window_Selectable[_0x54b5ec(0x17a)][_0x54b5ec(0x1aa)]['call'](this);return _0x3c6ac6+Window_ItemList[_0x54b5ec(0x108)];},Window_SkillList[_0x2801ab(0x1bb)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)]['GeneralWindow'][_0x2801ab(0xdf)]??0x8,Window_SkillList[_0x2801ab(0x104)]=VisuMZ['SideviewBattleUI']['Settings'][_0x2801ab(0x16c)][_0x2801ab(0x1c4)]??0x190,Window_SkillList[_0x2801ab(0xca)]=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x16c)][_0x2801ab(0x1d1)]??0x10,Window_SkillList[_0x2801ab(0x108)]=VisuMZ[_0x2801ab(0x1d7)]['Settings']['GeneralWindow'][_0x2801ab(0x12b)]??0x10,VisuMZ['SideviewBattleUI'][_0x2801ab(0x187)]=Window_SkillList['prototype']['initialize'],Window_SkillList[_0x2801ab(0x17a)][_0x2801ab(0x110)]=function(_0x25846d){const _0x241d29=_0x2801ab;VisuMZ[_0x241d29(0x1d7)][_0x241d29(0x187)]['call'](this,_0x25846d),this[_0x241d29(0x1fc)]();},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x106)]=Window_SkillList['prototype']['maxCols'],Window_SkillList[_0x2801ab(0x17a)][_0x2801ab(0x1c9)]=function(){const _0xb8fe6b=_0x2801ab;return this[_0xb8fe6b(0x1d3)]()?0x1:VisuMZ[_0xb8fe6b(0x1d7)][_0xb8fe6b(0x106)][_0xb8fe6b(0x195)](this);},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x1af)]=Window_SkillList[_0x2801ab(0x17a)][_0x2801ab(0x155)],Window_SkillList[_0x2801ab(0x17a)][_0x2801ab(0x155)]=function(){const _0x16473d=_0x2801ab;return this['isUsingSideviewUiLayout']()?0x0:'taoBZ'==='taoBZ'?VisuMZ[_0x16473d(0x1d7)][_0x16473d(0x1af)]['call'](this):0x8;},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x1e6)]=Window_SkillList[_0x2801ab(0x17a)]['makeItemList'],Window_SkillList['prototype'][_0x2801ab(0x17c)]=function(){const _0x389451=_0x2801ab;VisuMZ['SideviewBattleUI'][_0x389451(0x1e6)][_0x389451(0x195)](this),this['adjustSideviewUiWidth'](),this[_0x389451(0x1ec)](),this[_0x389451(0x1b4)]();},Window_SkillList[_0x2801ab(0x17a)][_0x2801ab(0x15c)]=function(){const _0x728daf=_0x2801ab;return this[_0x728daf(0x12a)]||Window_Base[_0x728daf(0x17a)][_0x728daf(0x15c)][_0x728daf(0x195)](this);},Window_SkillList[_0x2801ab(0x17a)]['sideviewUiWidth']=function(){return Window_SkillList['SIDEVIEW_BATTLE_UI_WINDOW_WIDTH']||0xc0;},Window_SkillList[_0x2801ab(0x17a)][_0x2801ab(0x170)]=function(){const _0x1c6d23=_0x2801ab;let _0x120d57=Window_Selectable['prototype'][_0x1c6d23(0x170)][_0x1c6d23(0x195)](this);return _0x120d57+Window_SkillList[_0x1c6d23(0xca)];},Window_SkillList['prototype'][_0x2801ab(0x1aa)]=function(){const _0x12a4a7=_0x2801ab;let _0x25ed83=Window_Selectable['prototype'][_0x12a4a7(0x1aa)][_0x12a4a7(0x195)](this);return _0x25ed83+Window_SkillList['SIDEVIEW_BATTLE_UI_BATTLER_WINDOW_OFFSET_Y'];},Window_BattleSkill[_0x2801ab(0x17a)][_0x2801ab(0xf4)]=function(){const _0x136797=_0x2801ab;return Window_SkillList[_0x136797(0x1bb)];},Window_BattleItem['prototype'][_0x2801ab(0xf4)]=function(){return Window_ItemList['SIDEVIEW_BATTLE_UI_WINDOW_MAX_ROWS'];},Window_PartyCommand['SIDEVIEW_BATTLE_UI_WINDOW_MAX_ROWS']=VisuMZ[_0x2801ab(0x1d7)]['Settings']['GeneralWindow'][_0x2801ab(0x1f3)]??0x8,VisuMZ[_0x2801ab(0x1d7)]['Window_PartyCommand_initialize']=Window_PartyCommand[_0x2801ab(0x17a)][_0x2801ab(0x110)],Window_PartyCommand[_0x2801ab(0x17a)][_0x2801ab(0x110)]=function(_0x2be71b){const _0x4102b4=_0x2801ab;VisuMZ[_0x4102b4(0x1d7)]['Window_PartyCommand_initialize'][_0x4102b4(0x195)](this,_0x2be71b),this[_0x4102b4(0x1fc)]();},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x10f)]=Window_PartyCommand['prototype'][_0x2801ab(0x12c)],Window_PartyCommand['prototype'][_0x2801ab(0x12c)]=function(){const _0x2bd735=_0x2801ab;VisuMZ[_0x2bd735(0x1d7)][_0x2bd735(0x10f)][_0x2bd735(0x195)](this),this[_0x2bd735(0x1a9)](),this[_0x2bd735(0x1ec)]();},Window_PartyCommand[_0x2801ab(0x17a)][_0x2801ab(0x15c)]=function(){const _0x4fbb7a=_0x2801ab;return $gameParty[_0x4fbb7a(0xee)]()[0x0];},Window_PartyCommand['prototype'][_0x2801ab(0xf4)]=function(){const _0xd07511=_0x2801ab;return Window_PartyCommand[_0xd07511(0x1bb)];},Window_ActorCommand[_0x2801ab(0x1bb)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)]['GeneralWindow'][_0x2801ab(0x18e)]??0x8,VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x196)]=Window_ActorCommand[_0x2801ab(0x17a)]['initialize'],Window_ActorCommand[_0x2801ab(0x17a)][_0x2801ab(0x110)]=function(_0x4bf021){const _0x500871=_0x2801ab;VisuMZ['SideviewBattleUI'][_0x500871(0x196)][_0x500871(0x195)](this,_0x4bf021),this['initMembersSideviewUi']();},VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0x154)]=Window_ActorCommand[_0x2801ab(0x17a)]['makeCommandList'],Window_ActorCommand[_0x2801ab(0x17a)][_0x2801ab(0x12c)]=function(){const _0x208f3f=_0x2801ab;VisuMZ[_0x208f3f(0x1d7)]['Window_ActorCommand_makeCommandList']['call'](this),this[_0x208f3f(0x1a9)](),this[_0x208f3f(0x1ec)](),this[_0x208f3f(0x1b4)]();},Window_ActorCommand[_0x2801ab(0x17a)]['sideviewUiTargetActor']=function(){const _0x222a73=_0x2801ab;return this[_0x222a73(0x12a)]||Window_Base[_0x222a73(0x17a)][_0x222a73(0x15c)][_0x222a73(0x195)](this);},Window_ActorCommand[_0x2801ab(0x17a)]['maxSideviewUiRows']=function(){const _0x4b522e=_0x2801ab;return Window_ActorCommand[_0x4b522e(0x1bb)];},VisuMZ['SideviewBattleUI'][_0x2801ab(0x1f4)]=Window_BattleStatus['prototype'][_0x2801ab(0x19d)],Window_BattleStatus['prototype'][_0x2801ab(0x19d)]=function(){const _0x4fdacf=_0x2801ab;this[_0x4fdacf(0x1d3)]()?this[_0x4fdacf(0x135)]():VisuMZ['SideviewBattleUI'][_0x4fdacf(0x1f4)]['call'](this);},Window_BattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x135)]=function(){const _0x1e2baf=_0x2801ab;if($gameTemp[_0x1e2baf(0x201)]())this[_0x1e2baf(0x13d)]=![],$gameTemp[_0x1e2baf(0x1cf)](),SceneManager[_0x1e2baf(0xd1)]['refreshSideviewUiBattleStatusWindows']();else this[_0x1e2baf(0x13d)]&&(this[_0x1e2baf(0x13d)]=![],SceneManager[_0x1e2baf(0xd1)][_0x1e2baf(0x180)]());};function Window_SideviewUiBattleStatus(){const _0x1d8f6f=_0x2801ab;this[_0x1d8f6f(0x110)](...arguments);}Window_SideviewUiBattleStatus[_0x2801ab(0x17a)]=Object[_0x2801ab(0x13b)](Window_StatusBase['prototype']),Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x191)]=Window_SideviewUiBattleStatus,Window_SideviewUiBattleStatus[_0x2801ab(0x10b)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)]['StatusWindow'][_0x2801ab(0x133)]??0xc8,Window_SideviewUiBattleStatus['HEIGHT_BASE']=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x18f)][_0x2801ab(0x1b8)]??_0x2801ab(0xd4),Window_SideviewUiBattleStatus[_0x2801ab(0xf6)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x146)]??0x4,Window_SideviewUiBattleStatus[_0x2801ab(0x14a)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)]['StatusWindow'][_0x2801ab(0xde)]??0x30,Window_SideviewUiBattleStatus[_0x2801ab(0x177)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x10e)]??0x4,Window_SideviewUiBattleStatus[_0x2801ab(0x165)]=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x18f)][_0x2801ab(0x103)]??!![],Window_SideviewUiBattleStatus[_0x2801ab(0x1fe)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)]['StatusWindow'][_0x2801ab(0x105)]??!![],Window_SideviewUiBattleStatus[_0x2801ab(0x197)]=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x18f)][_0x2801ab(0x200)]??0x30,Window_SideviewUiBattleStatus[_0x2801ab(0x18d)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x1bc)]??0x0,Window_SideviewUiBattleStatus[_0x2801ab(0xf3)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0xf7)]??!![],Window_SideviewUiBattleStatus['STATES_REVERSE_SCALE']=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x1df)]??!![],Window_SideviewUiBattleStatus[_0x2801ab(0x1a7)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x168)]??0x14,Window_SideviewUiBattleStatus['STATES_OFFSET_Y']=VisuMZ['SideviewBattleUI']['Settings'][_0x2801ab(0x18f)][_0x2801ab(0x1d2)]??0x14,Window_SideviewUiBattleStatus[_0x2801ab(0x175)]=VisuMZ[_0x2801ab(0x1d7)]['Settings']['StatusWindow'][_0x2801ab(0x128)]??!![],Window_SideviewUiBattleStatus['TPB_OFFSET_X']=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x156)]??0x2c,Window_SideviewUiBattleStatus['TPB_OFFSET_Y']=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)]['StatusWindow'][_0x2801ab(0x193)]??0x0,Window_SideviewUiBattleStatus[_0x2801ab(0x1ba)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)]['HpShow']??!![],Window_SideviewUiBattleStatus[_0x2801ab(0x19f)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x184)]??0x3c,Window_SideviewUiBattleStatus['HP_GAUGE_OFFSET_Y']=VisuMZ['SideviewBattleUI'][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x1f1)]??0x0,Window_SideviewUiBattleStatus['MP_GAUGE_SHOWN']=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x18f)][_0x2801ab(0x186)]??!![],Window_SideviewUiBattleStatus['MP_GAUGE_OFFSET_X']=VisuMZ['SideviewBattleUI'][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x192)]??0x44,Window_SideviewUiBattleStatus[_0x2801ab(0x130)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x125)]??0x0,Window_SideviewUiBattleStatus[_0x2801ab(0x1b9)]=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x18f)][_0x2801ab(0xf5)]??!![],Window_SideviewUiBattleStatus[_0x2801ab(0x1b3)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0xf0)]??0x4a,Window_SideviewUiBattleStatus['TP_GAUGE_OFFSET_Y']=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x18f)][_0x2801ab(0xd3)]??0x0,Window_SideviewUiBattleStatus[_0x2801ab(0x1d9)]=VisuMZ['SideviewBattleUI']['Settings']['StatusWindow'][_0x2801ab(0x1f2)]??!![],Window_SideviewUiBattleStatus[_0x2801ab(0x14b)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0xed)]??0x2c,Window_SideviewUiBattleStatus[_0x2801ab(0x134)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x1ee)]??0x0,Window_SideviewUiBattleStatus[_0x2801ab(0x107)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x1ac)]??!![],Window_SideviewUiBattleStatus[_0x2801ab(0x1b7)]=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x18f)][_0x2801ab(0x194)]??0x34,Window_SideviewUiBattleStatus[_0x2801ab(0xd0)]=VisuMZ['SideviewBattleUI']['Settings'][_0x2801ab(0x18f)][_0x2801ab(0x17e)]??0x2,Window_SideviewUiBattleStatus[_0x2801ab(0x16d)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x1c6)]??!![],Window_SideviewUiBattleStatus['BRAVE_OFFSET_X']=VisuMZ[_0x2801ab(0x1d7)]['Settings'][_0x2801ab(0x18f)][_0x2801ab(0x204)]??0x34,Window_SideviewUiBattleStatus[_0x2801ab(0x203)]=VisuMZ[_0x2801ab(0x1d7)][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x18a)]??-0x6,Window_SideviewUiBattleStatus[_0x2801ab(0xe3)]=VisuMZ['SideviewBattleUI'][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0xcc)]??!![],Window_SideviewUiBattleStatus[_0x2801ab(0x188)]=VisuMZ[_0x2801ab(0x1d7)]['Settings']['StatusWindow']['BreakShieldIgnoreScale']??!![],Window_SideviewUiBattleStatus[_0x2801ab(0x143)]=VisuMZ['SideviewBattleUI']['Settings'][_0x2801ab(0x18f)]['BreakShieldOffsetX']??0x14,Window_SideviewUiBattleStatus[_0x2801ab(0x16f)]=VisuMZ[_0x2801ab(0x1d7)]['Settings']['StatusWindow']['BreakShieldOffsetY']??0x14,Window_SideviewUiBattleStatus[_0x2801ab(0x144)]=VisuMZ['SideviewBattleUI'][_0x2801ab(0xe2)][_0x2801ab(0x18f)][_0x2801ab(0x118)]??!![],Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x110)]=function(_0x144add){const _0x572333=_0x2801ab;this[_0x572333(0x138)]=_0x144add;const _0x100901=this[_0x572333(0x161)]();Window_StatusBase[_0x572333(0x17a)][_0x572333(0x110)][_0x572333(0x195)](this,_0x100901),this[_0x572333(0x1fc)](),this[_0x572333(0x1a6)](0x2);},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x161)]=function(){const _0x11b096=_0x2801ab,_0x1e09c2=Window_Base[_0x11b096(0x123)];let _0x52242c=Window_SideviewUiBattleStatus[_0x11b096(0x10b)],_0x141fc1=Graphics['boxWidth']-_0x52242c;_0x141fc1+=Math['ceil']((Graphics[_0x11b096(0x129)]-Graphics[_0x11b096(0x1de)])/0x2),_0x52242c/=_0x1e09c2,_0x52242c=Math[_0x11b096(0x166)](_0x52242c),_0x52242c+=Math[_0x11b096(0x166)](Window_SideviewUiBattleStatus[_0x11b096(0x14a)]*0x4/_0x1e09c2);let _0x2d3561=Window_SideviewUiBattleStatus[_0x11b096(0x1bd)];_0x2d3561===_0x11b096(0xd4)?_0x11b096(0x140)!==_0x11b096(0x140)?_0x29ae23-=_0x814743[_0x11b096(0x17a)][_0x11b096(0x1b6)]()-0x1:(_0x2d3561=Window_SideviewUiBattleStatus['HEIGHT_BUFFER']*0x2,_0x2d3561+=this[_0x11b096(0xda)]()*this['autoRowCount'](),_0x2d3561=Math[_0x11b096(0x166)](_0x2d3561*_0x1e09c2),_0x2d3561/=_0x1e09c2):_0x2d3561=eval(_0x2d3561)||0x0;let _0x8e2f35=Math[_0x11b096(0x166)](_0x2d3561*_0x1e09c2)*this[_0x11b096(0x138)];return _0x8e2f35-=Math[_0x11b096(0x166)]((Graphics['height']-Graphics[_0x11b096(0xe1)])/0x2),this[_0x11b096(0x1dc)]=_0x141fc1,this[_0x11b096(0xc9)]=this[_0x11b096(0x1dc)]-Math['ceil'](Window_SideviewUiBattleStatus[_0x11b096(0x14a)]/_0x1e09c2),this[_0x11b096(0x148)]=this[_0x11b096(0x1dc)],new Rectangle(_0x141fc1,_0x8e2f35,_0x52242c,_0x2d3561);},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x13a)]=function(){const _0x147425=_0x2801ab;let _0x36f9be=0x0;if(Window_SideviewUiBattleStatus[_0x147425(0x1fe)])_0x36f9be+=0x1;if(Window_SideviewUiBattleStatus[_0x147425(0x1ba)])_0x36f9be+=0x1;if(Window_SideviewUiBattleStatus['MP_GAUGE_SHOWN'])_0x36f9be+=0x1;if(Window_SideviewUiBattleStatus['TP_GAUGE_SHOWN'])_0x36f9be+=0x1;if(this[_0x147425(0x206)]())_0x36f9be+=0x1;if(this['isAdjustBravePoints']())_0x36f9be+=0x1;return _0x36f9be||0x1;},Window_SideviewUiBattleStatus['prototype']['updatePadding']=function(){const _0x5d8adb=_0x2801ab;this[_0x5d8adb(0x149)]=0x0;},Window_SideviewUiBattleStatus['prototype'][_0x2801ab(0xfa)]=function(){const _0x4666fa=_0x2801ab;if(!this[_0x4666fa(0x163)])return;if(!Window_SideviewUiBattleStatus['BG_SHOW'])return;const _0x285658=this[_0x4666fa(0x163)]['bitmap'];var _0x9e51cd=ColorManager['dimColor1'](),_0x4c8559=ColorManager[_0x4666fa(0xf9)](),_0x172711=Math['ceil'](this[_0x4666fa(0x129)]/0x4),_0x164805=this[_0x4666fa(0x129)]-_0x172711,_0xf02dd=this[_0x4666fa(0x1f0)];_0x285658[_0x4666fa(0x11e)](this['width'],_0xf02dd),_0x285658[_0x4666fa(0x183)](0x0,0x0,_0x172711,_0xf02dd,_0x4c8559,_0x9e51cd),_0x285658[_0x4666fa(0xfc)](_0x172711,0x0,_0x164805,_0xf02dd,_0x9e51cd),this[_0x4666fa(0x163)]['setFrame'](0x0,0x0,_0x164805,_0xf02dd);},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x1e5)]=function(){const _0x1f36a7=_0x2801ab;Window_StatusBase[_0x1f36a7(0x17a)][_0x1f36a7(0x1e5)][_0x1f36a7(0x195)](this),this[_0x1f36a7(0xd2)](),this[_0x1f36a7(0x114)]();},Window_SideviewUiBattleStatus['prototype'][_0x2801ab(0x182)]=function(){const _0x2e0ea2=_0x2801ab;return $gameParty[_0x2e0ea2(0x1b0)]()[this[_0x2e0ea2(0x138)]];},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0xd2)]=function(){const _0x3fe357=_0x2801ab;if(this[_0x3fe357(0xc8)]===this[_0x3fe357(0x182)]())return;this[_0x3fe357(0xc8)]=this[_0x3fe357(0x182)](),this[_0x3fe357(0x14e)]();if(this['_battler']){if('zvKAU'===_0x3fe357(0x185))return this[_0x3fe357(0xc8)];else this[_0x3fe357(0x1a6)](0x1);}else this[_0x3fe357(0x1a6)](0x2);},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x114)]=function(){const _0x18fd0e=_0x2801ab;if(!this[_0x18fd0e(0xc8)])return;this['_targetX']=this[_0x18fd0e(0x12e)]()?this['_activeX']:this[_0x18fd0e(0x1dc)];const _0xf44ef6=Window_SideviewUiBattleStatus[_0x18fd0e(0x177)];if(this['_targetX']>this['x'])this['x']=Math[_0x18fd0e(0x1ff)](this['x']+_0xf44ef6,this['_targetX']);else this[_0x18fd0e(0x148)]<this['x']&&(this['x']=Math['max'](this['x']-_0xf44ef6,this[_0x18fd0e(0x148)]));},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x12e)]=function(){const _0x404ff8=_0x2801ab;if(this['_battler']===BattleManager[_0x404ff8(0x1a1)]())return!![];if(this['_battler']===BattleManager['_subject'])return!![];if(this[_0x404ff8(0xc8)][_0x404ff8(0x1a5)]())return!![];return![];},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x1a4)]=function(){const _0x2e8d0f=_0x2801ab;return Window_SideviewUiBattleStatus[_0x2e8d0f(0x144)];},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x1e0)]=function(){const _0x5774e7=_0x2801ab;return this[_0x5774e7(0xc8)];},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x1c8)]=function(){const _0xcd0da3=_0x2801ab,_0x397e64=new Point(TouchInput['x'],TouchInput['y']),_0x23fe39=this[_0xcd0da3(0xec)]['applyInverse'](_0x397e64);return this[_0xcd0da3(0x109)][_0xcd0da3(0x167)](_0x23fe39['x'],_0x23fe39['y']);},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x1a2)]=function(){const _0x582d64=_0x2801ab;this[_0x582d64(0x19b)]();if(!this[_0x582d64(0xc8)])return;this[_0x582d64(0x14f)](),this[_0x582d64(0x126)]();},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x14f)]=function(){const _0x204f00=_0x2801ab,_0x4477e4=this[_0x204f00(0xc8)];let _0x4d3164=0x4,_0x46a749=Window_SideviewUiBattleStatus[_0x204f00(0xf6)];if(Imported[_0x204f00(0xea)]&&Window_SideviewUiBattleStatus[_0x204f00(0xe3)]){let _0x49a9ee=_0x4d3164+Window_SideviewUiBattleStatus[_0x204f00(0x143)],_0x26a243=_0x46a749+Window_SideviewUiBattleStatus[_0x204f00(0x16f)];this['placeBreakShieldIcon'](_0x4477e4,_0x49a9ee,_0x26a243);if(Window_SideviewUiBattleStatus[_0x204f00(0x15a)]){if(_0x204f00(0x1f9)===_0x204f00(0x1f9)){const _0x5322df=_0x204f00(0x13e)[_0x204f00(0x1a8)](_0x4477e4[_0x204f00(0xd9)]()),_0x53f383=this[_0x204f00(0x10d)];if(_0x53f383[_0x5322df]){if(_0x204f00(0x14c)===_0x204f00(0x14c)){const _0x35738a=_0x53f383[_0x5322df];_0x35738a[_0x204f00(0x1d6)]['x']=_0x35738a[_0x204f00(0x1d6)]['y']=0x1/this['scale']['y'];}else this['x']=_0x47aff1[_0x204f00(0x1ff)](this['x']+_0x36689b,this[_0x204f00(0x148)]);};}else{if(!this[_0x204f00(0x1d3)]())return;if(!_0x1ee36b[_0x204f00(0x10c)])return;this[_0x204f00(0x172)]=0x0;!this[_0x204f00(0x163)]&&(this[_0x204f00(0x163)]=new _0x50a841(),this[_0x204f00(0x1fa)](this[_0x204f00(0x163)]));const _0x34aefa=this[_0x204f00(0x129)]-_0x1e8bfe[_0x204f00(0x10b)],_0x4f833d=this['lineHeight']()*0x2;this['_dimmerSprite'][_0x204f00(0x1e7)]=new _0x1c0097(_0x34aefa,_0x4f833d),this[_0x204f00(0x163)]['x']=-0x4,this[_0x204f00(0x163)]['y']=this['padding'];const _0x1c1528=this[_0x204f00(0x163)][_0x204f00(0x1e7)],_0x125f37=_0x5985b8[_0x204f00(0x1eb)](),_0x228740=_0x29ebb1['dimColor2']();_0x1c1528[_0x204f00(0xfc)](0x0,0x0,_0x140d1c[_0x204f00(0x142)](_0x34aefa/0x2),_0x4f833d,_0x125f37),_0x1c1528[_0x204f00(0x183)](_0x25dabb[_0x204f00(0x142)](_0x34aefa/0x2),0x0,_0x41f493[_0x204f00(0x142)](_0x34aefa/0x2),_0x4f833d,_0x125f37,_0x228740);}}}if(Window_SideviewUiBattleStatus[_0x204f00(0xf3)]){let _0x320965=_0x4d3164+Window_SideviewUiBattleStatus[_0x204f00(0x1a7)],_0x416122=_0x46a749+Window_SideviewUiBattleStatus['STATES_OFFSET_Y'];if(Imported[_0x204f00(0xea)]&&Window_SideviewUiBattleStatus[_0x204f00(0xe3)]){if(_0x204f00(0xce)===_0x204f00(0xce))Window_SideviewUiBattleStatus['BREAK_SHIELD_REVERSE_SCALE']?_0x416122+=Math[_0x204f00(0x166)](ImageManager[_0x204f00(0x1f7)]/this['scale']['y']):_0x416122+=ImageManager['iconHeight'],_0x416122+=0x4;else return _0x380595[_0x204f00(0xc6)]||_0x8dcf22['aliveMembers']()[0x0];}this[_0x204f00(0xd5)](_0x4477e4,_0x320965,_0x416122);if(Window_SideviewUiBattleStatus[_0x204f00(0x15a)]){const _0x13509c='actor%1-stateIcon'[_0x204f00(0x1a8)](_0x4477e4[_0x204f00(0xd9)]()),_0x349546=this[_0x204f00(0x10d)];if(_0x349546[_0x13509c]){if(_0x204f00(0x205)!==_0x204f00(0x205))return this[_0x204f00(0x12a)]||_0x30ade6['prototype']['sideviewUiTargetActor'][_0x204f00(0x195)](this);else{const _0x10769c=_0x349546[_0x13509c];_0x10769c['scale']['x']=_0x10769c[_0x204f00(0x1d6)]['y']=0x1/this['scale']['y'];}};}}if(this[_0x204f00(0x158)]()){let _0xe96e7=_0x4d3164+Window_SideviewUiBattleStatus[_0x204f00(0x189)],_0x27cdbe=_0x46a749+Window_SideviewUiBattleStatus[_0x204f00(0x1ea)];this[_0x204f00(0x111)](_0x4477e4,_0xe96e7,_0x27cdbe);}if(this['isShowAggro']()){if('RGYSy'===_0x204f00(0x199))this[_0x204f00(0x1a6)](0x2);else{let _0x1b2724=_0x4d3164+Window_SideviewUiBattleStatus[_0x204f00(0x14b)],_0x3a999a=_0x46a749+Window_SideviewUiBattleStatus[_0x204f00(0x134)];this[_0x204f00(0x158)]()&&(_0x204f00(0xcb)==='fCpfv'?this[_0x204f00(0x1bf)]():_0x3a999a-=Sprite_Gauge['prototype'][_0x204f00(0x1b6)]()-0x1),this['placeAggroGauge'](_0x4477e4,_0x1b2724,_0x3a999a);}}if(Window_SideviewUiBattleStatus['NAME_SHOWN']){let _0x38b61a=_0x4d3164+Window_SideviewUiBattleStatus[_0x204f00(0x197)],_0x16a345=_0x46a749+Window_SideviewUiBattleStatus[_0x204f00(0x18d)];this[_0x204f00(0xdb)](_0x4477e4,_0x38b61a,_0x16a345);}(Window_SideviewUiBattleStatus[_0x204f00(0x1fe)]||this[_0x204f00(0x158)]()||this[_0x204f00(0x1d4)]())&&(_0x46a749+=this[_0x204f00(0xda)]());if(this[_0x204f00(0x206)]()){const _0x45f447=Math[_0x204f00(0x166)](ImageManager[_0x204f00(0x1f7)]*Sprite_BoostContainer[_0x204f00(0x12f)]);let _0x45fbfb=_0x4d3164+Window_SideviewUiBattleStatus[_0x204f00(0x1b7)],_0x436188=_0x46a749+Window_SideviewUiBattleStatus[_0x204f00(0xd0)];_0x436188+=Math[_0x204f00(0xe6)](0x0,Math[_0x204f00(0x142)]((this[_0x204f00(0xda)]()-_0x45f447)/0x2)),this[_0x204f00(0x102)](_0x4477e4,_0x45fbfb,_0x436188),_0x46a749+=this['gaugeLineHeight']();}if(this[_0x204f00(0x141)]()){if(_0x204f00(0x1c7)===_0x204f00(0x1c7)){let _0x45bfc3=_0x4d3164+Window_SideviewUiBattleStatus['BRAVE_OFFSET_X'],_0x324038=_0x46a749+Window_SideviewUiBattleStatus[_0x204f00(0x203)],_0x432365=Math[_0x204f00(0x166)](Window_SideviewUiBattleStatus[_0x204f00(0x10b)]/this['scale']['x']);this['drawActorBravePoints'](_0x4477e4,_0x45bfc3,_0x324038,_0x432365,'left'),_0x46a749+=this[_0x204f00(0xda)]();}else _0x991da4=_0x503251[_0x204f00(0xf6)]*0x2,_0x20ce1c+=this[_0x204f00(0xda)]()*this[_0x204f00(0x13a)](),_0xe42080=_0xb6576c[_0x204f00(0x166)](_0x9d1736*_0x3ccd5e),_0x590a46/=_0x1eabec;}if(Window_SideviewUiBattleStatus['HP_GAUGE_SHOWN']){if(_0x204f00(0x19a)!==_0x204f00(0x19a)){if(!this[_0x204f00(0x1d3)]())return;const _0x28a333=_0x2ac651['SIDEVIEW_BATTLE_UI_SCALE'];this[_0x204f00(0x1d6)]['x']=this[_0x204f00(0x1d6)]['y']=_0x28a333;}else{let _0x12ea92=_0x4d3164+Window_SideviewUiBattleStatus['HP_GAUGE_OFFSET_X'],_0x39edf5=_0x46a749+Window_SideviewUiBattleStatus['HP_GAUGE_OFFSET_Y'];this[_0x204f00(0x160)](_0x4477e4,'hp',_0x12ea92,_0x39edf5),_0x46a749+=this['gaugeLineHeight']();}}if(Window_SideviewUiBattleStatus['MP_GAUGE_SHOWN']){if(_0x204f00(0xff)===_0x204f00(0x11d)){let _0x3467c5=_0x25862d+_0xdb204c[_0x204f00(0x143)],_0x323688=_0x5b241e+_0x5883cf[_0x204f00(0x16f)];this[_0x204f00(0x11f)](_0x53b1fa,_0x3467c5,_0x323688);if(_0x2e481f['STATES_REVERSE_SCALE']){const _0x5861eb=_0x204f00(0x13e)['format'](_0x21de89['actorId']()),_0x321e9b=this[_0x204f00(0x10d)];if(_0x321e9b[_0x5861eb]){const _0x285116=_0x321e9b[_0x5861eb];_0x285116['scale']['x']=_0x285116[_0x204f00(0x1d6)]['y']=0x1/this[_0x204f00(0x1d6)]['y'];};}}else{let _0x316891=_0x4d3164+Window_SideviewUiBattleStatus['MP_GAUGE_OFFSET_X'],_0x37a6b9=_0x46a749+Window_SideviewUiBattleStatus[_0x204f00(0x130)];this[_0x204f00(0x160)](_0x4477e4,'mp',_0x316891,_0x37a6b9),_0x46a749+=this['gaugeLineHeight']();}}if(Window_SideviewUiBattleStatus[_0x204f00(0x1b9)]){let _0x131c25=_0x4d3164+Window_SideviewUiBattleStatus[_0x204f00(0x1b3)],_0x4e86eb=_0x46a749+Window_SideviewUiBattleStatus['TP_GAUGE_OFFSET_Y'];this[_0x204f00(0x160)](_0x4477e4,'tp',_0x131c25,_0x4e86eb),_0x46a749+=this[_0x204f00(0xda)]();}},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x158)]=function(){const _0x543745=_0x2801ab;if(Imported['VisuMZ_2_BattleSystemCTB']&&BattleManager[_0x543745(0xe9)]()){if(_0x543745(0x1cb)===_0x543745(0x1cb))return![];else{if(this['_battler']===_0xa71539['actor']())return!![];if(this[_0x543745(0xc8)]===_0x3a15e5['_subject'])return!![];if(this['_battler']['isSelected']())return!![];return![];}}return BattleManager[_0x543745(0x1e2)]()&&Window_SideviewUiBattleStatus['NAME_SHOWN']&&Window_SideviewUiBattleStatus[_0x543745(0x175)];},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)][_0x2801ab(0x1d4)]=function(){const _0x4ccd30=_0x2801ab;return Window_SideviewUiBattleStatus[_0x4ccd30(0x1fe)]&&Window_SideviewUiBattleStatus[_0x4ccd30(0x1d9)]&&Imported[_0x4ccd30(0xf8)]&&ConfigManager[_0x4ccd30(0x162)]&&VisuMZ[_0x4ccd30(0x16b)]['Settings'][_0x4ccd30(0x1f8)]['StatusGauge'];},Window_SideviewUiBattleStatus['prototype'][_0x2801ab(0x206)]=function(){const _0x366322=_0x2801ab;return Imported[_0x366322(0x115)]&&Window_SideviewUiBattleStatus['BOOST_SHOWN']&&BattleManager['allowBoostAction']();},Window_SideviewUiBattleStatus[_0x2801ab(0x17a)]['isAdjustBravePoints']=function(){const _0x532062=_0x2801ab;return Imported[_0x532062(0x17f)]&&Window_SideviewUiBattleStatus[_0x532062(0x16d)]&&BattleManager[_0x532062(0x1a0)]();},Window_SideviewUiBattleStatus['prototype']['drawCustomJS']=function(){const _0x255ed3=_0x2801ab;VisuMZ[_0x255ed3(0x1d7)]['Settings'][_0x255ed3(0x18f)]['CustomUi']&&(_0x255ed3(0x1ad)!==_0x255ed3(0x100)?VisuMZ['SideviewBattleUI'][_0x255ed3(0xe2)][_0x255ed3(0x18f)][_0x255ed3(0x112)][_0x255ed3(0x195)](this,this[_0x255ed3(0xc8)]):(_0x54905a[_0x255ed3(0x1d7)][_0x255ed3(0x1ed)]['call'](this),this[_0x255ed3(0xf2)]()));};function _0x3536(){const _0x30615d=['Window_SkillList_maxCols','BOOST_SHOWN','SIDEVIEW_BATTLE_UI_BATTLER_WINDOW_OFFSET_Y','innerRect','ARRAYFUNC','WIDTH_BASE','SIDEVIEW_BATTLE_UI_FADE_STYLE','_additionalSprites','MoveSpeed','Window_PartyCommand_makeCommandList','initialize','placeTimeGauge','CustomUi','Window_ItemList_initialize','updatePosition','VisuMZ_3_BoostAction','EXJPM','_enemyWindow','StateTooltipsShow','2573778DzQbmo','Scene_Battle_updateStatusWindowPosition','%1\x27s\x20version\x20does\x20not\x20match\x20plugin\x27s.\x20Please\x20update\x20it\x20in\x20the\x20Plugin\x20Manager.','isInputting','uNPGv','resize','placeBreakShieldIcon','map','1604630yNpyZA','sideviewUiWidth','SIDEVIEW_BATTLE_UI_SCALE','ARRAYEVAL','MpOffsetY','drawCustomJS','toUpperCase','TpbShow','width','_actor','SkillWindowOffsetY','makeCommandList','EVAL','isActivePosition','ICON_SIZE_RATE','MP_GAUGE_OFFSET_Y','893586vtSmxn','Battler','WidthBase','AGGRO_OFFSET_Y','updateRefreshSideviewUi','ItemWindowWidth','clampSideviewUiPlacementPosition','_partyIndex','STR','autoRowCount','create','knQcF','_requestRefresh','actor%1-breakShieldIcon','createStatusWindow','uUYWW','isAdjustBravePoints','round','BREAK_SHIELD_OFFSET_X','STATE_TOOLTIPS_SHOWN','_actorCommandWindow','HeightBuffer','ItemWindowOffsetY','_targetX','padding','WIDTH_MOVE','AGGRO_OFFSET_X','HMhJg','_spriteset','refresh','drawBasicStatus','OffsetY','aQDdL','UoNbA','status','Window_ActorCommand_makeCommandList','colSpacing','TpbOffsetX','ConvertParams','isShowTpbGauge','parse','STATES_REVERSE_SCALE','actorWindowRect','sideviewUiTargetActor','match','7gbnqLn','updateSideviewUiFadeOut','placeGauge','createWindowRect','aggroGauge','_dimmerSprite','541978nVNUxJ','BG_SHOW','ceil','contains','StatesOffsetX','Scene_Battle_actorWindowRect','SIDEVIEW_BATTLE_UI_BATTLER_OFFSET_X','AggroControlSystem','GeneralWindow','BRAVE_SHOWN','QcYVJ','BREAK_SHIELD_OFFSET_Y','sideviewUiPositionOffsetX','fittingHeight','opacity','McsLc','Game_System_isSideView','TPB_SHOWN','JSON','MOVE_SPEED','NUM','updateSideviewBattleUIPositions','prototype','_data','makeItemList','statusWindowRect','BoostOffsetY','VisuMZ_2_BattleSystemBTB','refreshSideviewUiBattleStatusWindows','SIDEVIEW_BATTLE_UI_BATTLER_OFFSET_Y','battler','gradientFillRect','HpOffsetX','pbqvl','MpShow','Window_SkillList_initialize','BREAK_SHIELD_REVERSE_SCALE','TPB_OFFSET_X','BraveOffsetY','ARRAYSTR','ItemWindowOffsetX','NAME_OFFSET_Y','ActorCommandWindowMaxRows','StatusWindow','gzjEA','constructor','MpOffsetX','TpbOffsetY','BoostOffsetX','call','Window_ActorCommand_initialize','NAME_OFFSET_X','Window_ItemList_maxCols','mqHco','EmwFO','hideAdditionalSprites','createSideviewUiDimmerSprite','updateRefresh','createCancelButton','HP_GAUGE_OFFSET_X','isBTB','actor','drawAllItems','active','isStateTooltipEnabled','isSelected','setBackgroundType','STATES_OFFSET_X','format','adjustSideviewUiWidth','sideviewUiPositionOffsetY','%1\x20is\x20incorrectly\x20placed\x20on\x20the\x20plugin\x20list.\x0aIt\x20is\x20a\x20Tier\x20%2\x20plugin\x20placed\x20over\x20other\x20Tier\x20%3\x20plugins.\x0aPlease\x20reorder\x20the\x20plugin\x20list\x20from\x20smallest\x20to\x20largest\x20tier\x20numbers.','BoostShow','IZzdM','ItemWindowMaxRows','Window_SkillList_colSpacing','battleMembers','floor','isSideView','TP_GAUGE_OFFSET_X','updateSideviewUiPosition','Window_ItemList_colSpacing','gaugeHeight','BOOST_OFFSET_X','HeightBase','TP_GAUGE_SHOWN','HP_GAUGE_SHOWN','SIDEVIEW_BATTLE_UI_WINDOW_MAX_ROWS','NameOffsetY','HEIGHT_BASE','name','createContents','STRUCT','isWindowMaskingEnabled','MmdtH','visible','SkillWindowWidth','Scene_Battle_statusWindowRect','BraveShow','LtsTx','isStateTooltipTouched','maxCols','HelpFadeStyle','NNgFb','_itemWindow','3644976FLwzMU','Window_Help_initialize','clearBattleRefreshRequest','NxIfv','SkillWindowOffsetX','StatesOffsetY','isUsingSideviewUiLayout','isShowAggro','exit','scale','SideviewBattleUI','addWindow','AGGRO_SHOWN','updateSideviewUiFadeIn','Scene_Base_isWindowMaskingEnabled','_homeX','filter','boxWidth','StatesIgnoreScale','getStateTooltipBattler','BattleCore','isTpb','ARRAYNUM','setHome','update','Window_SkillList_makeItemList','bitmap','cCySe','_battleField','TPB_OFFSET_Y','dimColor1','adjustSideviewUiHeight','Scene_Battle_createStatusWindow','AggroOffsetY','SIDEVIEW_BATTLE_UI_MOVE_BATTLERS','height','HpOffsetY','AggroShow','PartyCommandWindowMaxRows','Window_BattleStatus_updateRefresh','battleLayoutStyle','description','iconHeight','Aggro','PMqbc','addChildToBack','_sideviewUiBattleStatusWindows','initMembersSideviewUi','_list','NAME_SHOWN','min','NameOffsetX','isBattleRefreshRequested','CommandWidth','BRAVE_OFFSET_Y','BraveOffsetX','pyhte','isAdjustBoostPoints','_partyCommandWindow','_currentActor','BattleLayout','_battler','_activeX','SIDEVIEW_BATTLE_UI_BATTLER_WINDOW_OFFSET_X','EqNot','BreakShieldShow','updateStatusWindowPosition','MKSkb','maxBattleMembers','BOOST_OFFSET_Y','_scene','updateBattler','TpOffsetY','auto','placeStateIcon','KeAWN','17192536uNEzIn','Scene_Battle_createCancelButton','actorId','gaugeLineHeight','placeActorName','Window_ItemList_makeItemList','OffsetX','MoveDistance','SkillWindowMaxRows','trim','boxHeight','Settings','BREAK_SHIELD_SHOWN','includes','_actorWindow','max','StatusGauge','version','isCTB','VisuMZ_4_BreakShields','push','worldTransform','AggroOffsetX','aliveMembers','360564fUSBtf','TpOffsetX','_skillWindow','createSideviewUiBattleStatusWindows','STATES_SHOWN','maxSideviewUiRows','TpShow','HEIGHT_BUFFER','StatesShow','VisuMZ_2_AggroControlSystem','dimColor2','refreshDimmerBitmap','FUNC','fillRect','rQHdL','activate','SCuuY','ogLjY','Sprite_Battler_setHome','placeBoostPoints','BgShow','SIDEVIEW_BATTLE_UI_WINDOW_WIDTH','NameShow'];_0x3536=function(){return _0x30615d;};return _0x3536();} \ No newline at end of file diff --git a/js/rmmz_core.js b/js/rmmz_core.js new file mode 100644 index 0000000..d4744b2 --- /dev/null +++ b/js/rmmz_core.js @@ -0,0 +1,6421 @@ +//============================================================================= +// rmmz_core.js v1.4.4 +//============================================================================= + +//----------------------------------------------------------------------------- +/** + * This section contains some methods that will be added to the standard + * Javascript objects. + * + * @namespace JsExtensions + */ + +/** + * Makes a shallow copy of the array. + * + * @memberof JsExtensions + * @returns {array} A shallow copy of the array. + */ +Array.prototype.clone = function() { + return this.slice(0); +}; + +Object.defineProperty(Array.prototype, "clone", { + enumerable: false +}); + +/** + * Checks whether the array contains a given element. + * + * @memberof JsExtensions + * @param {any} element - The element to search for. + * @returns {boolean} True if the array contains a given element. + * @deprecated includes() should be used instead. + */ +Array.prototype.contains = function(element) { + return this.includes(element); +}; + +Object.defineProperty(Array.prototype, "contains", { + enumerable: false +}); + +/** + * Checks whether the two arrays are the same. + * + * @memberof JsExtensions + * @param {array} array - The array to compare to. + * @returns {boolean} True if the two arrays are the same. + */ +Array.prototype.equals = function(array) { + if (!array || this.length !== array.length) { + return false; + } + for (let i = 0; i < this.length; i++) { + if (this[i] instanceof Array && array[i] instanceof Array) { + if (!this[i].equals(array[i])) { + return false; + } + } else if (this[i] !== array[i]) { + return false; + } + } + return true; +}; + +Object.defineProperty(Array.prototype, "equals", { + enumerable: false +}); + +/** + * Removes a given element from the array (in place). + * + * @memberof JsExtensions + * @param {any} element - The element to remove. + * @returns {array} The array after remove. + */ +Array.prototype.remove = function(element) { + for (;;) { + const index = this.indexOf(element); + if (index >= 0) { + this.splice(index, 1); + } else { + return this; + } + } +}; + +Object.defineProperty(Array.prototype, "remove", { + enumerable: false +}); + +/** + * Generates a random integer in the range (0, max-1). + * + * @memberof JsExtensions + * @param {number} max - The upper boundary (excluded). + * @returns {number} A random integer. + */ +Math.randomInt = function(max) { + return Math.floor(max * Math.random()); +}; + +/** + * Returns a number whose value is limited to the given range. + * + * @memberof JsExtensions + * @param {number} min - The lower boundary. + * @param {number} max - The upper boundary. + * @returns {number} A number in the range (min, max). + */ +Number.prototype.clamp = function(min, max) { + return Math.min(Math.max(this, min), max); +}; + +/** + * Returns a modulo value which is always positive. + * + * @memberof JsExtensions + * @param {number} n - The divisor. + * @returns {number} A modulo value. + */ +Number.prototype.mod = function(n) { + return ((this % n) + n) % n; +}; + +/** + * Makes a number string with leading zeros. + * + * @memberof JsExtensions + * @param {number} length - The length of the output string. + * @returns {string} A string with leading zeros. + */ +Number.prototype.padZero = function(length) { + return String(this).padZero(length); +}; + +/** + * Checks whether the string contains a given string. + * + * @memberof JsExtensions + * @param {string} string - The string to search for. + * @returns {boolean} True if the string contains a given string. + * @deprecated includes() should be used instead. + */ +String.prototype.contains = function(string) { + return this.includes(string); +}; + +/** + * Replaces %1, %2 and so on in the string to the arguments. + * + * @memberof JsExtensions + * @param {any} ...args The objects to format. + * @returns {string} A formatted string. + */ +String.prototype.format = function() { + return this.replace(/%([0-9]+)/g, (s, n) => arguments[Number(n) - 1]); +}; + +/** + * Makes a number string with leading zeros. + * + * @memberof JsExtensions + * @param {number} length - The length of the output string. + * @returns {string} A string with leading zeros. + */ +String.prototype.padZero = function(length) { + return this.padStart(length, "0"); +}; + +//----------------------------------------------------------------------------- +/** + * The static class that defines utility methods. + * + * @namespace + */ +function Utils() { + throw new Error("This is a static class"); +} + +/** + * The name of the RPG Maker. "MZ" in the current version. + * + * @type string + * @constant + */ +Utils.RPGMAKER_NAME = "MZ"; + +/** + * The version of the RPG Maker. + * + * @type string + * @constant + */ +Utils.RPGMAKER_VERSION = "1.4.4"; + +/** + * Checks whether the current RPG Maker version is greater than or equal to + * the given version. + * + * @param {string} version - The "x.x.x" format string to compare. + * @returns {boolean} True if the current version is greater than or equal + * to the given version. + */ +Utils.checkRMVersion = function(version) { + const array1 = this.RPGMAKER_VERSION.split("."); + const array2 = String(version).split("."); + for (let i = 0; i < array1.length; i++) { + const v1 = parseInt(array1[i]); + const v2 = parseInt(array2[i]); + if (v1 > v2) { + return true; + } else if (v1 < v2) { + return false; + } + } + return true; +}; + +/** + * Checks whether the option is in the query string. + * + * @param {string} name - The option name. + * @returns {boolean} True if the option is in the query string. + */ +Utils.isOptionValid = function(name) { + const args = location.search.slice(1); + if (args.split("&").includes(name)) { + return true; + } + if (this.isNwjs() && nw.App.argv.length > 0) { + return nw.App.argv[0].split("&").includes(name); + } + return false; +}; + +/** + * Checks whether the platform is NW.js. + * + * @returns {boolean} True if the platform is NW.js. + */ +Utils.isNwjs = function() { + return typeof require === "function" && typeof process === "object"; +}; + +/** + * Checks whether the platform is a mobile device. + * + * @returns {boolean} True if the platform is a mobile device. + */ +Utils.isMobileDevice = function() { + const r = /Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/i; + return !!navigator.userAgent.match(r); +}; + +/** + * Checks whether the browser is Mobile Safari. + * + * @returns {boolean} True if the browser is Mobile Safari. + */ +Utils.isMobileSafari = function() { + const agent = navigator.userAgent; + return !!( + agent.match(/iPhone|iPad|iPod/) && + agent.match(/AppleWebKit/) && + !agent.match("CriOS") + ); +}; + +/** + * Checks whether the browser is Android Chrome. + * + * @returns {boolean} True if the browser is Android Chrome. + */ +Utils.isAndroidChrome = function() { + const agent = navigator.userAgent; + return !!(agent.match(/Android/) && agent.match(/Chrome/)); +}; + +/** + * Checks whether the browser is accessing local files. + * + * @returns {boolean} True if the browser is accessing local files. + */ +Utils.isLocal = function() { + return window.location.href.startsWith("file:"); +}; + +/** + * Checks whether the browser supports WebGL. + * + * @returns {boolean} True if the browser supports WebGL. + */ +Utils.canUseWebGL = function() { + try { + const canvas = document.createElement("canvas"); + return !!canvas.getContext("webgl"); + } catch (e) { + return false; + } +}; + +/** + * Checks whether the browser supports Web Audio API. + * + * @returns {boolean} True if the browser supports Web Audio API. + */ +Utils.canUseWebAudioAPI = function() { + return !!(window.AudioContext || window.webkitAudioContext); +}; + +/** + * Checks whether the browser supports CSS Font Loading. + * + * @returns {boolean} True if the browser supports CSS Font Loading. + */ +Utils.canUseCssFontLoading = function() { + return !!(document.fonts && document.fonts.ready); +}; + +/** + * Checks whether the browser supports IndexedDB. + * + * @returns {boolean} True if the browser supports IndexedDB. + */ +Utils.canUseIndexedDB = function() { + return !!( + window.indexedDB || + window.mozIndexedDB || + window.webkitIndexedDB + ); +}; + +/** + * Checks whether the browser can play ogg files. + * + * @returns {boolean} True if the browser can play ogg files. + */ +Utils.canPlayOgg = function() { + if (!Utils._audioElement) { + Utils._audioElement = document.createElement("audio"); + } + return !!( + Utils._audioElement && + Utils._audioElement.canPlayType('audio/ogg; codecs="vorbis"') + ); +}; + +/** + * Checks whether the browser can play webm files. + * + * @returns {boolean} True if the browser can play webm files. + */ +Utils.canPlayWebm = function() { + if (!Utils._videoElement) { + Utils._videoElement = document.createElement("video"); + } + return !!( + Utils._videoElement && + Utils._videoElement.canPlayType('video/webm; codecs="vp8, vorbis"') + ); +}; + +/** + * Encodes a URI component without escaping slash characters. + * + * @param {string} str - The input string. + * @returns {string} Encoded string. + */ +Utils.encodeURI = function(str) { + return encodeURIComponent(str).replace(/%2F/g, "/"); +}; + +/** + * Gets the filename that does not include subfolders. + * + * @param {string} filename - The filename with subfolders. + * @returns {string} The filename without subfolders. + */ +Utils.extractFileName = function(filename) { + return filename.split("/").pop(); +}; + +/** + * Escapes special characters for HTML. + * + * @param {string} str - The input string. + * @returns {string} Escaped string. + */ +Utils.escapeHtml = function(str) { + const entityMap = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + "/": "/" + }; + return String(str).replace(/[&<>"'/]/g, s => entityMap[s]); +}; + +/** + * Checks whether the string contains any Arabic characters. + * + * @returns {boolean} True if the string contains any Arabic characters. + */ +Utils.containsArabic = function(str) { + const regExp = /[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF]/; + return regExp.test(str); +}; + +/** + * Sets information related to encryption. + * + * @param {boolean} hasImages - Whether the image files are encrypted. + * @param {boolean} hasAudio - Whether the audio files are encrypted. + * @param {string} key - The encryption key. + */ +Utils.setEncryptionInfo = function(hasImages, hasAudio, key) { + // [Note] This function is implemented for module independence. + this._hasEncryptedImages = hasImages; + this._hasEncryptedAudio = hasAudio; + this._encryptionKey = key; +}; + +/** + * Checks whether the image files in the game are encrypted. + * + * @returns {boolean} True if the image files are encrypted. + */ +Utils.hasEncryptedImages = function() { + return this._hasEncryptedImages; +}; + +/** + * Checks whether the audio files in the game are encrypted. + * + * @returns {boolean} True if the audio files are encrypted. + */ +Utils.hasEncryptedAudio = function() { + return this._hasEncryptedAudio; +}; + +/** + * Decrypts encrypted data. + * + * @param {ArrayBuffer} source - The data to be decrypted. + * @returns {ArrayBuffer} The decrypted data. + */ +Utils.decryptArrayBuffer = function(source) { + const header = new Uint8Array(source, 0, 16); + const headerHex = Array.from(header, x => x.toString(16)).join(","); + if (headerHex !== "52,50,47,4d,56,0,0,0,0,3,1,0,0,0,0,0") { + throw new Error("Decryption error"); + } + const body = source.slice(16); + const view = new DataView(body); + const key = this._encryptionKey.match(/.{2}/g); + for (let i = 0; i < 16; i++) { + view.setUint8(i, view.getUint8(i) ^ parseInt(key[i], 16)); + } + return body; +}; + +//----------------------------------------------------------------------------- +/** + * The static class that carries out graphics processing. + * + * @namespace + */ +function Graphics() { + throw new Error("This is a static class"); +} + +/** + * Initializes the graphics system. + * + * @returns {boolean} True if the graphics system is available. + */ +Graphics.initialize = function() { + this._width = 0; + this._height = 0; + this._defaultScale = 1; + this._realScale = 1; + this._errorPrinter = null; + this._tickHandler = null; + this._canvas = null; + this._fpsCounter = null; + this._loadingSpinner = null; + this._stretchEnabled = this._defaultStretchMode(); + this._app = null; + this._effekseer = null; + this._wasLoading = false; + + /** + * The total frame count of the game screen. + * + * @type number + * @name Graphics.frameCount + */ + this.frameCount = 0; + + /** + * The width of the window display area. + * + * @type number + * @name Graphics.boxWidth + */ + this.boxWidth = this._width; + + /** + * The height of the window display area. + * + * @type number + * @name Graphics.boxHeight + */ + this.boxHeight = this._height; + + this._updateRealScale(); + this._createAllElements(); + this._disableContextMenu(); + this._setupEventHandlers(); + this._createPixiApp(); + this._createEffekseerContext(); + + return !!this._app; +}; + +/** + * The PIXI.Application object. + * + * @readonly + * @type PIXI.Application + * @name Graphics.app + */ +Object.defineProperty(Graphics, "app", { + get: function() { + return this._app; + }, + configurable: true +}); + +/** + * The context object of Effekseer. + * + * @readonly + * @type EffekseerContext + * @name Graphics.effekseer + */ +Object.defineProperty(Graphics, "effekseer", { + get: function() { + return this._effekseer; + }, + configurable: true +}); + +/** + * Register a handler for tick events. + * + * @param {function} handler - The listener function to be added for updates. + */ +Graphics.setTickHandler = function(handler) { + this._tickHandler = handler; +}; + +/** + * Starts the game loop. + */ +Graphics.startGameLoop = function() { + if (this._app) { + this._app.start(); + } +}; + +/** + * Stops the game loop. + */ +Graphics.stopGameLoop = function() { + if (this._app) { + this._app.stop(); + } +}; + +/** + * Sets the stage to be rendered. + * + * @param {Stage} stage - The stage object to be rendered. + */ +Graphics.setStage = function(stage) { + if (this._app) { + this._app.stage = stage; + } +}; + +/** + * Shows the loading spinner. + */ +Graphics.startLoading = function() { + if (!document.getElementById("loadingSpinner")) { + document.body.appendChild(this._loadingSpinner); + } +}; + +/** + * Erases the loading spinner. + * + * @returns {boolean} True if the loading spinner was active. + */ +Graphics.endLoading = function() { + if (document.getElementById("loadingSpinner")) { + document.body.removeChild(this._loadingSpinner); + return true; + } else { + return false; + } +}; + +/** + * Displays the error text to the screen. + * + * @param {string} name - The name of the error. + * @param {string} message - The message of the error. + * @param {Error} [error] - The error object. + */ +Graphics.printError = function(name, message, error = null) { + if (!this._errorPrinter) { + this._createErrorPrinter(); + } + this._errorPrinter.innerHTML = this._makeErrorHtml(name, message, error); + this._wasLoading = this.endLoading(); + this._applyCanvasFilter(); +}; + +/** + * Displays a button to try to reload resources. + * + * @param {function} retry - The callback function to be called when the button + * is pressed. + */ +Graphics.showRetryButton = function(retry) { + const button = document.createElement("button"); + button.id = "retryButton"; + button.innerHTML = "Retry"; + // [Note] stopPropagation() is required for iOS Safari. + button.ontouchstart = e => e.stopPropagation(); + button.onclick = () => { + Graphics.eraseError(); + retry(); + }; + this._errorPrinter.appendChild(button); + button.focus(); +}; + +/** + * Erases the loading error text. + */ +Graphics.eraseError = function() { + if (this._errorPrinter) { + this._errorPrinter.innerHTML = this._makeErrorHtml(); + if (this._wasLoading) { + this.startLoading(); + } + } + this._clearCanvasFilter(); +}; + +/** + * Converts an x coordinate on the page to the corresponding + * x coordinate on the canvas area. + * + * @param {number} x - The x coordinate on the page to be converted. + * @returns {number} The x coordinate on the canvas area. + */ +Graphics.pageToCanvasX = function(x) { + if (this._canvas) { + const left = this._canvas.offsetLeft; + return Math.round((x - left) / this._realScale); + } else { + return 0; + } +}; + +/** + * Converts a y coordinate on the page to the corresponding + * y coordinate on the canvas area. + * + * @param {number} y - The y coordinate on the page to be converted. + * @returns {number} The y coordinate on the canvas area. + */ +Graphics.pageToCanvasY = function(y) { + if (this._canvas) { + const top = this._canvas.offsetTop; + return Math.round((y - top) / this._realScale); + } else { + return 0; + } +}; + +/** + * Checks whether the specified point is inside the game canvas area. + * + * @param {number} x - The x coordinate on the canvas area. + * @param {number} y - The y coordinate on the canvas area. + * @returns {boolean} True if the specified point is inside the game canvas area. + */ +Graphics.isInsideCanvas = function(x, y) { + return x >= 0 && x < this._width && y >= 0 && y < this._height; +}; + +/** + * Shows the game screen. + */ +Graphics.showScreen = function() { + this._canvas.style.opacity = 1; +}; + +/** + * Hides the game screen. + */ +Graphics.hideScreen = function() { + this._canvas.style.opacity = 0; +}; + +/** + * Changes the size of the game screen. + * + * @param {number} width - The width of the game screen. + * @param {number} height - The height of the game screen. + */ +Graphics.resize = function(width, height) { + this._width = width; + this._height = height; + this._app.renderer.resize(width, height); + this._updateAllElements(); +}; + +/** + * The width of the game screen. + * + * @type number + * @name Graphics.width + */ +Object.defineProperty(Graphics, "width", { + get: function() { + return this._width; + }, + set: function(value) { + if (this._width !== value) { + this._width = value; + this._updateAllElements(); + } + }, + configurable: true +}); + +/** + * The height of the game screen. + * + * @type number + * @name Graphics.height + */ +Object.defineProperty(Graphics, "height", { + get: function() { + return this._height; + }, + set: function(value) { + if (this._height !== value) { + this._height = value; + this._updateAllElements(); + } + }, + configurable: true +}); + +/** + * The default zoom scale of the game screen. + * + * @type number + * @name Graphics.defaultScale + */ +Object.defineProperty(Graphics, "defaultScale", { + get: function() { + return this._defaultScale; + }, + set: function(value) { + if (this._defaultScale !== value) { + this._defaultScale = value; + this._updateAllElements(); + } + }, + configurable: true +}); + +Graphics._createAllElements = function() { + this._createErrorPrinter(); + this._createCanvas(); + this._createLoadingSpinner(); + this._createFPSCounter(); +}; + +Graphics._updateAllElements = function() { + this._updateRealScale(); + this._updateErrorPrinter(); + this._updateCanvas(); + this._updateVideo(); +}; + +Graphics._onTick = function(deltaTime) { + this._fpsCounter.startTick(); + if (this._tickHandler) { + this._tickHandler(deltaTime); + } + if (this._canRender()) { + this._app.render(); + } + this._fpsCounter.endTick(); +}; + +Graphics._canRender = function() { + return !!this._app.stage; +}; + +Graphics._updateRealScale = function() { + if (this._stretchEnabled && this._width > 0 && this._height > 0) { + const h = this._stretchWidth() / this._width; + const v = this._stretchHeight() / this._height; + this._realScale = Math.min(h, v); + window.scrollTo(0, 0); + } else { + this._realScale = this._defaultScale; + } +}; + +Graphics._stretchWidth = function() { + if (Utils.isMobileDevice()) { + return document.documentElement.clientWidth; + } else { + return window.innerWidth; + } +}; + +Graphics._stretchHeight = function() { + if (Utils.isMobileDevice()) { + // [Note] Mobile browsers often have special operations at the top and + // bottom of the screen. + const rate = Utils.isLocal() ? 1.0 : 0.9; + return document.documentElement.clientHeight * rate; + } else { + return window.innerHeight; + } +}; + +Graphics._makeErrorHtml = function(name, message /*, error*/) { + const nameDiv = document.createElement("div"); + const messageDiv = document.createElement("div"); + nameDiv.id = "errorName"; + messageDiv.id = "errorMessage"; + nameDiv.innerHTML = Utils.escapeHtml(name || ""); + messageDiv.innerHTML = Utils.escapeHtml(message || ""); + return nameDiv.outerHTML + messageDiv.outerHTML; +}; + +Graphics._defaultStretchMode = function() { + return Utils.isNwjs() || Utils.isMobileDevice(); +}; + +Graphics._createErrorPrinter = function() { + this._errorPrinter = document.createElement("div"); + this._errorPrinter.id = "errorPrinter"; + this._errorPrinter.innerHTML = this._makeErrorHtml(); + document.body.appendChild(this._errorPrinter); +}; + +Graphics._updateErrorPrinter = function() { + const width = 640 * this._realScale; + const height = 100 * this._realScale; + this._errorPrinter.style.width = width + "px"; + this._errorPrinter.style.height = height + "px"; +}; + +Graphics._createCanvas = function() { + this._canvas = document.createElement("canvas"); + this._canvas.id = "gameCanvas"; + this._updateCanvas(); + document.body.appendChild(this._canvas); +}; + +Graphics._updateCanvas = function() { + this._canvas.width = this._width; + this._canvas.height = this._height; + this._canvas.style.zIndex = 1; + this._centerElement(this._canvas); +}; + +Graphics._updateVideo = function() { + const width = this._width * this._realScale; + const height = this._height * this._realScale; + Video.resize(width, height); +}; + +Graphics._createLoadingSpinner = function() { + const loadingSpinner = document.createElement("div"); + const loadingSpinnerImage = document.createElement("div"); + loadingSpinner.id = "loadingSpinner"; + loadingSpinnerImage.id = "loadingSpinnerImage"; + loadingSpinner.appendChild(loadingSpinnerImage); + this._loadingSpinner = loadingSpinner; +}; + +Graphics._createFPSCounter = function() { + this._fpsCounter = new Graphics.FPSCounter(); +}; + +Graphics._centerElement = function(element) { + const width = element.width * this._realScale; + const height = element.height * this._realScale; + element.style.position = "absolute"; + element.style.margin = "auto"; + element.style.top = 0; + element.style.left = 0; + element.style.right = 0; + element.style.bottom = 0; + element.style.width = width + "px"; + element.style.height = height + "px"; +}; + +Graphics._disableContextMenu = function() { + const elements = document.body.getElementsByTagName("*"); + const oncontextmenu = () => false; + for (const element of elements) { + element.oncontextmenu = oncontextmenu; + } +}; + +Graphics._applyCanvasFilter = function() { + if (this._canvas) { + this._canvas.style.opacity = 0.5; + this._canvas.style.filter = "blur(8px)"; + this._canvas.style.webkitFilter = "blur(8px)"; + } +}; + +Graphics._clearCanvasFilter = function() { + if (this._canvas) { + this._canvas.style.opacity = 1; + this._canvas.style.filter = ""; + this._canvas.style.webkitFilter = ""; + } +}; + +Graphics._setupEventHandlers = function() { + window.addEventListener("resize", this._onWindowResize.bind(this)); + document.addEventListener("keydown", this._onKeyDown.bind(this)); +}; + +Graphics._onWindowResize = function() { + this._updateAllElements(); +}; + +Graphics._onKeyDown = function(event) { + if (!event.ctrlKey && !event.altKey) { + switch (event.keyCode) { + case 113: // F2 + event.preventDefault(); + this._switchFPSCounter(); + break; + case 114: // F3 + event.preventDefault(); + this._switchStretchMode(); + break; + case 115: // F4 + event.preventDefault(); + this._switchFullScreen(); + break; + } + } +}; + +Graphics._switchFPSCounter = function() { + this._fpsCounter.switchMode(); +}; + +Graphics._switchStretchMode = function() { + this._stretchEnabled = !this._stretchEnabled; + this._updateAllElements(); +}; + +Graphics._switchFullScreen = function() { + if (this._isFullScreen()) { + this._cancelFullScreen(); + } else { + this._requestFullScreen(); + } +}; + +Graphics._isFullScreen = function() { + return ( + document.fullScreenElement || + document.mozFullScreen || + document.webkitFullscreenElement + ); +}; + +Graphics._requestFullScreen = function() { + const element = document.body; + if (element.requestFullScreen) { + element.requestFullScreen(); + } else if (element.mozRequestFullScreen) { + element.mozRequestFullScreen(); + } else if (element.webkitRequestFullScreen) { + element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); + } +}; + +Graphics._cancelFullScreen = function() { + if (document.cancelFullScreen) { + document.cancelFullScreen(); + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if (document.webkitCancelFullScreen) { + document.webkitCancelFullScreen(); + } +}; + +Graphics._createPixiApp = function() { + try { + this._setupPixi(); + this._app = new PIXI.Application({ + view: this._canvas, + autoStart: false + }); + this._app.ticker.remove(this._app.render, this._app); + this._app.ticker.add(this._onTick, this); + } catch (e) { + this._app = null; + } +}; + +Graphics._setupPixi = function() { + PIXI.utils.skipHello(); + PIXI.settings.GC_MAX_IDLE = 600; +}; + +Graphics._createEffekseerContext = function() { + if (this._app && window.effekseer) { + try { + this._effekseer = effekseer.createContext(); + if (this._effekseer) { + this._effekseer.init(this._app.renderer.gl); + this._effekseer.setRestorationOfStatesFlag(false); + } + } catch (e) { + this._app = null; + } + } +}; + +//::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +// FPSCounter +// +// This is based on Darsain's FPSMeter which is under the MIT license. +// The original can be found at https://github.com/Darsain/fpsmeter. + +Graphics.FPSCounter = function() { + this.initialize(...arguments); +}; + +Graphics.FPSCounter.prototype.initialize = function() { + this._tickCount = 0; + this._frameTime = 100; + this._frameStart = 0; + this._lastLoop = performance.now() - 100; + this._showFps = true; + this.fps = 0; + this.duration = 0; + this._createElements(); + this._update(); +}; + +Graphics.FPSCounter.prototype.startTick = function() { + this._frameStart = performance.now(); +}; + +Graphics.FPSCounter.prototype.endTick = function() { + const time = performance.now(); + const thisFrameTime = time - this._lastLoop; + this._frameTime += (thisFrameTime - this._frameTime) / 12; + this.fps = 1000 / this._frameTime; + this.duration = Math.max(0, time - this._frameStart); + this._lastLoop = time; + if (this._tickCount++ % 15 === 0) { + this._update(); + } +}; + +Graphics.FPSCounter.prototype.switchMode = function() { + if (this._boxDiv.style.display === "none") { + this._boxDiv.style.display = "block"; + this._showFps = true; + } else if (this._showFps) { + this._showFps = false; + } else { + this._boxDiv.style.display = "none"; + } + this._update(); +}; + +Graphics.FPSCounter.prototype._createElements = function() { + this._boxDiv = document.createElement("div"); + this._labelDiv = document.createElement("div"); + this._numberDiv = document.createElement("div"); + this._boxDiv.id = "fpsCounterBox"; + this._labelDiv.id = "fpsCounterLabel"; + this._numberDiv.id = "fpsCounterNumber"; + this._boxDiv.style.display = "none"; + this._boxDiv.appendChild(this._labelDiv); + this._boxDiv.appendChild(this._numberDiv); + document.body.appendChild(this._boxDiv); +}; + +Graphics.FPSCounter.prototype._update = function() { + const count = this._showFps ? this.fps : this.duration; + this._labelDiv.textContent = this._showFps ? "FPS" : "ms"; + this._numberDiv.textContent = count.toFixed(0); +}; + +//----------------------------------------------------------------------------- +/** + * The point class. + * + * @class + * @extends PIXI.Point + * @param {number} x - The x coordinate. + * @param {number} y - The y coordinate. + */ +function Point() { + this.initialize(...arguments); +} + +Point.prototype = Object.create(PIXI.Point.prototype); +Point.prototype.constructor = Point; + +Point.prototype.initialize = function(x, y) { + PIXI.Point.call(this, x, y); +}; + +//----------------------------------------------------------------------------- +/** + * The rectangle class. + * + * @class + * @extends PIXI.Rectangle + * @param {number} x - The x coordinate for the upper-left corner. + * @param {number} y - The y coordinate for the upper-left corner. + * @param {number} width - The width of the rectangle. + * @param {number} height - The height of the rectangle. + */ +function Rectangle() { + this.initialize(...arguments); +} + +Rectangle.prototype = Object.create(PIXI.Rectangle.prototype); +Rectangle.prototype.constructor = Rectangle; + +Rectangle.prototype.initialize = function(x, y, width, height) { + PIXI.Rectangle.call(this, x, y, width, height); +}; + +//----------------------------------------------------------------------------- +/** + * The basic object that represents an image. + * + * @class + * @param {number} width - The width of the bitmap. + * @param {number} height - The height of the bitmap. + */ +function Bitmap() { + this.initialize(...arguments); +} + +Bitmap.prototype.initialize = function(width, height) { + this._canvas = null; + this._context = null; + this._baseTexture = null; + this._image = null; + this._url = ""; + this._paintOpacity = 255; + this._smooth = true; + this._loadListeners = []; + + // "none", "loading", "loaded", or "error" + this._loadingState = "none"; + + if (width > 0 && height > 0) { + this._createCanvas(width, height); + } + + /** + * The face name of the font. + * + * @type string + */ + this.fontFace = "sans-serif"; + + /** + * The size of the font in pixels. + * + * @type number + */ + this.fontSize = 16; + + /** + * Whether the font is bold. + * + * @type boolean + */ + this.fontBold = false; + + /** + * Whether the font is italic. + * + * @type boolean + */ + this.fontItalic = false; + + /** + * The color of the text in CSS format. + * + * @type string + */ + this.textColor = "#ffffff"; + + /** + * The color of the outline of the text in CSS format. + * + * @type string + */ + this.outlineColor = "rgba(0, 0, 0, 0.5)"; + + /** + * The width of the outline of the text. + * + * @type number + */ + this.outlineWidth = 3; +}; + +/** + * Loads a image file. + * + * @param {string} url - The image url of the texture. + * @returns {Bitmap} The new bitmap object. + */ +Bitmap.load = function(url) { + const bitmap = Object.create(Bitmap.prototype); + bitmap.initialize(); + bitmap._url = url; + bitmap._startLoading(); + return bitmap; +}; + +/** + * Takes a snapshot of the game screen. + * + * @param {Stage} stage - The stage object. + * @returns {Bitmap} The new bitmap object. + */ +Bitmap.snap = function(stage) { + const width = Graphics.width; + const height = Graphics.height; + const bitmap = new Bitmap(width, height); + const renderTexture = PIXI.RenderTexture.create(width, height); + if (stage) { + const renderer = Graphics.app.renderer; + renderer.render(stage, renderTexture); + stage.worldTransform.identity(); + const canvas = renderer.extract.canvas(renderTexture); + bitmap.context.drawImage(canvas, 0, 0); + canvas.width = 0; + canvas.height = 0; + } + renderTexture.destroy({ destroyBase: true }); + bitmap.baseTexture.update(); + return bitmap; +}; + +/** + * Checks whether the bitmap is ready to render. + * + * @returns {boolean} True if the bitmap is ready to render. + */ +Bitmap.prototype.isReady = function() { + return this._loadingState === "loaded" || this._loadingState === "none"; +}; + +/** + * Checks whether a loading error has occurred. + * + * @returns {boolean} True if a loading error has occurred. + */ +Bitmap.prototype.isError = function() { + return this._loadingState === "error"; +}; + +/** + * The url of the image file. + * + * @readonly + * @type string + * @name Bitmap#url + */ +Object.defineProperty(Bitmap.prototype, "url", { + get: function() { + return this._url; + }, + configurable: true +}); + +/** + * The base texture that holds the image. + * + * @readonly + * @type PIXI.BaseTexture + * @name Bitmap#baseTexture + */ +Object.defineProperty(Bitmap.prototype, "baseTexture", { + get: function() { + return this._baseTexture; + }, + configurable: true +}); + +/** + * The bitmap image. + * + * @readonly + * @type HTMLImageElement + * @name Bitmap#image + */ +Object.defineProperty(Bitmap.prototype, "image", { + get: function() { + return this._image; + }, + configurable: true +}); + +/** + * The bitmap canvas. + * + * @readonly + * @type HTMLCanvasElement + * @name Bitmap#canvas + */ +Object.defineProperty(Bitmap.prototype, "canvas", { + get: function() { + this._ensureCanvas(); + return this._canvas; + }, + configurable: true +}); + +/** + * The 2d context of the bitmap canvas. + * + * @readonly + * @type CanvasRenderingContext2D + * @name Bitmap#context + */ +Object.defineProperty(Bitmap.prototype, "context", { + get: function() { + this._ensureCanvas(); + return this._context; + }, + configurable: true +}); + +/** + * The width of the bitmap. + * + * @readonly + * @type number + * @name Bitmap#width + */ +Object.defineProperty(Bitmap.prototype, "width", { + get: function() { + const image = this._canvas || this._image; + return image ? image.width : 0; + }, + configurable: true +}); + +/** + * The height of the bitmap. + * + * @readonly + * @type number + * @name Bitmap#height + */ +Object.defineProperty(Bitmap.prototype, "height", { + get: function() { + const image = this._canvas || this._image; + return image ? image.height : 0; + }, + configurable: true +}); + +/** + * The rectangle of the bitmap. + * + * @readonly + * @type Rectangle + * @name Bitmap#rect + */ +Object.defineProperty(Bitmap.prototype, "rect", { + get: function() { + return new Rectangle(0, 0, this.width, this.height); + }, + configurable: true +}); + +/** + * Whether the smooth scaling is applied. + * + * @type boolean + * @name Bitmap#smooth + */ +Object.defineProperty(Bitmap.prototype, "smooth", { + get: function() { + return this._smooth; + }, + set: function(value) { + if (this._smooth !== value) { + this._smooth = value; + this._updateScaleMode(); + } + }, + configurable: true +}); + +/** + * The opacity of the drawing object in the range (0, 255). + * + * @type number + * @name Bitmap#paintOpacity + */ +Object.defineProperty(Bitmap.prototype, "paintOpacity", { + get: function() { + return this._paintOpacity; + }, + set: function(value) { + if (this._paintOpacity !== value) { + this._paintOpacity = value; + this.context.globalAlpha = this._paintOpacity / 255; + } + }, + configurable: true +}); + +/** + * Destroys the bitmap. + */ +Bitmap.prototype.destroy = function() { + if (this._baseTexture) { + this._baseTexture.destroy(); + this._baseTexture = null; + } + this._destroyCanvas(); +}; + +/** + * Resizes the bitmap. + * + * @param {number} width - The new width of the bitmap. + * @param {number} height - The new height of the bitmap. + */ +Bitmap.prototype.resize = function(width, height) { + width = Math.max(width || 0, 1); + height = Math.max(height || 0, 1); + this.canvas.width = width; + this.canvas.height = height; + this.baseTexture.width = width; + this.baseTexture.height = height; +}; + +/** + * Performs a block transfer. + * + * @param {Bitmap} source - The bitmap to draw. + * @param {number} sx - The x coordinate in the source. + * @param {number} sy - The y coordinate in the source. + * @param {number} sw - The width of the source image. + * @param {number} sh - The height of the source image. + * @param {number} dx - The x coordinate in the destination. + * @param {number} dy - The y coordinate in the destination. + * @param {number} [dw=sw] The width to draw the image in the destination. + * @param {number} [dh=sh] The height to draw the image in the destination. + */ +Bitmap.prototype.blt = function(source, sx, sy, sw, sh, dx, dy, dw, dh) { + dw = dw || sw; + dh = dh || sh; + try { + const image = source._canvas || source._image; + this.context.globalCompositeOperation = "source-over"; + this.context.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh); + this._baseTexture.update(); + } catch (e) { + // + } +}; + +/** + * Returns pixel color at the specified point. + * + * @param {number} x - The x coordinate of the pixel in the bitmap. + * @param {number} y - The y coordinate of the pixel in the bitmap. + * @returns {string} The pixel color (hex format). + */ +Bitmap.prototype.getPixel = function(x, y) { + const data = this.context.getImageData(x, y, 1, 1).data; + let result = "#"; + for (let i = 0; i < 3; i++) { + result += data[i].toString(16).padZero(2); + } + return result; +}; + +/** + * Returns alpha pixel value at the specified point. + * + * @param {number} x - The x coordinate of the pixel in the bitmap. + * @param {number} y - The y coordinate of the pixel in the bitmap. + * @returns {string} The alpha value. + */ +Bitmap.prototype.getAlphaPixel = function(x, y) { + const data = this.context.getImageData(x, y, 1, 1).data; + return data[3]; +}; + +/** + * Clears the specified rectangle. + * + * @param {number} x - The x coordinate for the upper-left corner. + * @param {number} y - The y coordinate for the upper-left corner. + * @param {number} width - The width of the rectangle to clear. + * @param {number} height - The height of the rectangle to clear. + */ +Bitmap.prototype.clearRect = function(x, y, width, height) { + this.context.clearRect(x, y, width, height); + this._baseTexture.update(); +}; + +/** + * Clears the entire bitmap. + */ +Bitmap.prototype.clear = function() { + this.clearRect(0, 0, this.width, this.height); +}; + +/** + * Fills the specified rectangle. + * + * @param {number} x - The x coordinate for the upper-left corner. + * @param {number} y - The y coordinate for the upper-left corner. + * @param {number} width - The width of the rectangle to fill. + * @param {number} height - The height of the rectangle to fill. + * @param {string} color - The color of the rectangle in CSS format. + */ +Bitmap.prototype.fillRect = function(x, y, width, height, color) { + const context = this.context; + context.save(); + context.fillStyle = color; + context.fillRect(x, y, width, height); + context.restore(); + this._baseTexture.update(); +}; + +/** + * Fills the entire bitmap. + * + * @param {string} color - The color of the rectangle in CSS format. + */ +Bitmap.prototype.fillAll = function(color) { + this.fillRect(0, 0, this.width, this.height, color); +}; + +/** + * Draws the specified rectangular frame. + * + * @param {number} x - The x coordinate for the upper-left corner. + * @param {number} y - The y coordinate for the upper-left corner. + * @param {number} width - The width of the rectangle to fill. + * @param {number} height - The height of the rectangle to fill. + * @param {string} color - The color of the rectangle in CSS format. + */ +Bitmap.prototype.strokeRect = function(x, y, width, height, color) { + const context = this.context; + context.save(); + context.strokeStyle = color; + context.strokeRect(x, y, width, height); + context.restore(); + this._baseTexture.update(); +}; + +// prettier-ignore +/** + * Draws the rectangle with a gradation. + * + * @param {number} x - The x coordinate for the upper-left corner. + * @param {number} y - The y coordinate for the upper-left corner. + * @param {number} width - The width of the rectangle to fill. + * @param {number} height - The height of the rectangle to fill. + * @param {string} color1 - The gradient starting color. + * @param {string} color2 - The gradient ending color. + * @param {boolean} vertical - Whether the gradient should be draw as vertical or not. + */ +Bitmap.prototype.gradientFillRect = function( + x, y, width, height, color1, color2, vertical +) { + const context = this.context; + const x1 = vertical ? x : x + width; + const y1 = vertical ? y + height : y; + const grad = context.createLinearGradient(x, y, x1, y1); + grad.addColorStop(0, color1); + grad.addColorStop(1, color2); + context.save(); + context.fillStyle = grad; + context.fillRect(x, y, width, height); + context.restore(); + this._baseTexture.update(); +}; + +/** + * Draws a bitmap in the shape of a circle. + * + * @param {number} x - The x coordinate based on the circle center. + * @param {number} y - The y coordinate based on the circle center. + * @param {number} radius - The radius of the circle. + * @param {string} color - The color of the circle in CSS format. + */ +Bitmap.prototype.drawCircle = function(x, y, radius, color) { + const context = this.context; + context.save(); + context.fillStyle = color; + context.beginPath(); + context.arc(x, y, radius, 0, Math.PI * 2, false); + context.fill(); + context.restore(); + this._baseTexture.update(); +}; + +/** + * Draws the outline text to the bitmap. + * + * @param {string} text - The text that will be drawn. + * @param {number} x - The x coordinate for the left of the text. + * @param {number} y - The y coordinate for the top of the text. + * @param {number} maxWidth - The maximum allowed width of the text. + * @param {number} lineHeight - The height of the text line. + * @param {string} align - The alignment of the text. + */ +Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) { + // [Note] Different browser makes different rendering with + // textBaseline == 'top'. So we use 'alphabetic' here. + const context = this.context; + const alpha = context.globalAlpha; + maxWidth = maxWidth || 0xffffffff; + let tx = x; + let ty = Math.round(y + lineHeight / 2 + this.fontSize * 0.35); + if (align === "center") { + tx += maxWidth / 2; + } + if (align === "right") { + tx += maxWidth; + } + context.save(); + context.font = this._makeFontNameText(); + context.textAlign = align; + context.textBaseline = "alphabetic"; + context.globalAlpha = 1; + this._drawTextOutline(text, tx, ty, maxWidth); + context.globalAlpha = alpha; + this._drawTextBody(text, tx, ty, maxWidth); + context.restore(); + this._baseTexture.update(); +}; + +/** + * Returns the width of the specified text. + * + * @param {string} text - The text to be measured. + * @returns {number} The width of the text in pixels. + */ +Bitmap.prototype.measureTextWidth = function(text) { + const context = this.context; + context.save(); + context.font = this._makeFontNameText(); + const width = context.measureText(text).width; + context.restore(); + return width; +}; + +/** + * Adds a callback function that will be called when the bitmap is loaded. + * + * @param {function} listner - The callback function. + */ +Bitmap.prototype.addLoadListener = function(listner) { + if (!this.isReady()) { + this._loadListeners.push(listner); + } else { + listner(this); + } +}; + +/** + * Tries to load the image again. + */ +Bitmap.prototype.retry = function() { + this._startLoading(); +}; + +Bitmap.prototype._makeFontNameText = function() { + const italic = this.fontItalic ? "Italic " : ""; + const bold = this.fontBold ? "Bold " : ""; + return italic + bold + this.fontSize + "px " + this.fontFace; +}; + +Bitmap.prototype._drawTextOutline = function(text, tx, ty, maxWidth) { + const context = this.context; + context.strokeStyle = this.outlineColor; + context.lineWidth = this.outlineWidth; + context.lineJoin = "round"; + context.strokeText(text, tx, ty, maxWidth); +}; + +Bitmap.prototype._drawTextBody = function(text, tx, ty, maxWidth) { + const context = this.context; + context.fillStyle = this.textColor; + context.fillText(text, tx, ty, maxWidth); +}; + +Bitmap.prototype._createCanvas = function(width, height) { + this._canvas = document.createElement("canvas"); + this._context = this._canvas.getContext("2d"); + this._canvas.width = width; + this._canvas.height = height; + this._createBaseTexture(this._canvas); +}; + +Bitmap.prototype._ensureCanvas = function() { + if (!this._canvas) { + if (this._image) { + this._createCanvas(this._image.width, this._image.height); + this._context.drawImage(this._image, 0, 0); + } else { + this._createCanvas(0, 0); + } + } +}; + +Bitmap.prototype._destroyCanvas = function() { + if (this._canvas) { + this._canvas.width = 0; + this._canvas.height = 0; + this._canvas = null; + } +}; + +Bitmap.prototype._createBaseTexture = function(source) { + this._baseTexture = new PIXI.BaseTexture(source); + this._baseTexture.mipmap = false; + this._baseTexture.width = source.width; + this._baseTexture.height = source.height; + this._updateScaleMode(); +}; + +Bitmap.prototype._updateScaleMode = function() { + if (this._baseTexture) { + if (this._smooth) { + this._baseTexture.scaleMode = PIXI.SCALE_MODES.LINEAR; + } else { + this._baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST; + } + } +}; + +Bitmap.prototype._startLoading = function() { + this._image = new Image(); + this._image.onload = this._onLoad.bind(this); + this._image.onerror = this._onError.bind(this); + this._destroyCanvas(); + this._loadingState = "loading"; + if (Utils.hasEncryptedImages()) { + this._startDecrypting(); + } else { + this._image.src = this._url; + } +}; + +Bitmap.prototype._startDecrypting = function() { + const xhr = new XMLHttpRequest(); + xhr.open("GET", this._url + "_"); + xhr.responseType = "arraybuffer"; + xhr.onload = () => this._onXhrLoad(xhr); + xhr.onerror = this._onError.bind(this); + xhr.send(); +}; + +Bitmap.prototype._onXhrLoad = function(xhr) { + if (xhr.status < 400) { + const arrayBuffer = Utils.decryptArrayBuffer(xhr.response); + const blob = new Blob([arrayBuffer]); + this._image.src = URL.createObjectURL(blob); + } else { + this._onError(); + } +}; + +Bitmap.prototype._onLoad = function() { + if (Utils.hasEncryptedImages()) { + URL.revokeObjectURL(this._image.src); + } + this._loadingState = "loaded"; + this._createBaseTexture(this._image); + this._callLoadListeners(); +}; + +Bitmap.prototype._callLoadListeners = function() { + while (this._loadListeners.length > 0) { + const listener = this._loadListeners.shift(); + listener(this); + } +}; + +Bitmap.prototype._onError = function() { + this._loadingState = "error"; +}; + +//----------------------------------------------------------------------------- +/** + * The basic object that is rendered to the game screen. + * + * @class + * @extends PIXI.Sprite + * @param {Bitmap} bitmap - The image for the sprite. + */ +function Sprite() { + this.initialize(...arguments); +} + +Sprite.prototype = Object.create(PIXI.Sprite.prototype); +Sprite.prototype.constructor = Sprite; + +Sprite.prototype.initialize = function(bitmap) { + if (!Sprite._emptyBaseTexture) { + Sprite._emptyBaseTexture = new PIXI.BaseTexture(); + Sprite._emptyBaseTexture.setSize(1, 1); + } + const frame = new Rectangle(); + const texture = new PIXI.Texture(Sprite._emptyBaseTexture, frame); + PIXI.Sprite.call(this, texture); + this.spriteId = Sprite._counter++; + this._bitmap = bitmap; + this._frame = frame; + this._hue = 0; + this._blendColor = [0, 0, 0, 0]; + this._colorTone = [0, 0, 0, 0]; + this._colorFilter = null; + this._blendMode = PIXI.BLEND_MODES.NORMAL; + this._hidden = false; + this._onBitmapChange(); +}; + +Sprite._emptyBaseTexture = null; +Sprite._counter = 0; + +/** + * The image for the sprite. + * + * @type Bitmap + * @name Sprite#bitmap + */ +Object.defineProperty(Sprite.prototype, "bitmap", { + get: function() { + return this._bitmap; + }, + set: function(value) { + if (this._bitmap !== value) { + this._bitmap = value; + this._onBitmapChange(); + } + }, + configurable: true +}); + +/** + * The width of the sprite without the scale. + * + * @type number + * @name Sprite#width + */ +Object.defineProperty(Sprite.prototype, "width", { + get: function() { + return this._frame.width; + }, + set: function(value) { + this._frame.width = value; + this._refresh(); + }, + configurable: true +}); + +/** + * The height of the sprite without the scale. + * + * @type number + * @name Sprite#height + */ +Object.defineProperty(Sprite.prototype, "height", { + get: function() { + return this._frame.height; + }, + set: function(value) { + this._frame.height = value; + this._refresh(); + }, + configurable: true +}); + +/** + * The opacity of the sprite (0 to 255). + * + * @type number + * @name Sprite#opacity + */ +Object.defineProperty(Sprite.prototype, "opacity", { + get: function() { + return this.alpha * 255; + }, + set: function(value) { + this.alpha = value.clamp(0, 255) / 255; + }, + configurable: true +}); + +/** + * The blend mode to be applied to the sprite. + * + * @type number + * @name Sprite#blendMode + */ +Object.defineProperty(Sprite.prototype, "blendMode", { + get: function() { + if (this._colorFilter) { + return this._colorFilter.blendMode; + } else { + return this._blendMode; + } + }, + set: function(value) { + this._blendMode = value; + if (this._colorFilter) { + this._colorFilter.blendMode = value; + } + }, + configurable: true +}); + +/** + * Destroys the sprite. + */ +Sprite.prototype.destroy = function() { + const options = { children: true, texture: true }; + PIXI.Sprite.prototype.destroy.call(this, options); +}; + +/** + * Updates the sprite for each frame. + */ +Sprite.prototype.update = function() { + for (const child of this.children) { + if (child.update) { + child.update(); + } + } +}; + +/** + * Makes the sprite "hidden". + */ +Sprite.prototype.hide = function() { + this._hidden = true; + this.updateVisibility(); +}; + +/** + * Releases the "hidden" state of the sprite. + */ +Sprite.prototype.show = function() { + this._hidden = false; + this.updateVisibility(); +}; + +/** + * Reflects the "hidden" state of the sprite to the visible state. + */ +Sprite.prototype.updateVisibility = function() { + this.visible = !this._hidden; +}; + +/** + * Sets the x and y at once. + * + * @param {number} x - The x coordinate of the sprite. + * @param {number} y - The y coordinate of the sprite. + */ +Sprite.prototype.move = function(x, y) { + this.x = x; + this.y = y; +}; + +/** + * Sets the rectagle of the bitmap that the sprite displays. + * + * @param {number} x - The x coordinate of the frame. + * @param {number} y - The y coordinate of the frame. + * @param {number} width - The width of the frame. + * @param {number} height - The height of the frame. + */ +Sprite.prototype.setFrame = function(x, y, width, height) { + this._refreshFrame = false; + const frame = this._frame; + if ( + x !== frame.x || + y !== frame.y || + width !== frame.width || + height !== frame.height + ) { + frame.x = x; + frame.y = y; + frame.width = width; + frame.height = height; + this._refresh(); + } +}; + +/** + * Sets the hue rotation value. + * + * @param {number} hue - The hue value (-360, 360). + */ +Sprite.prototype.setHue = function(hue) { + if (this._hue !== Number(hue)) { + this._hue = Number(hue); + this._updateColorFilter(); + } +}; + +/** + * Gets the blend color for the sprite. + * + * @returns {array} The blend color [r, g, b, a]. + */ +Sprite.prototype.getBlendColor = function() { + return this._blendColor.clone(); +}; + +/** + * Sets the blend color for the sprite. + * + * @param {array} color - The blend color [r, g, b, a]. + */ +Sprite.prototype.setBlendColor = function(color) { + if (!(color instanceof Array)) { + throw new Error("Argument must be an array"); + } + if (!this._blendColor.equals(color)) { + this._blendColor = color.clone(); + this._updateColorFilter(); + } +}; + +/** + * Gets the color tone for the sprite. + * + * @returns {array} The color tone [r, g, b, gray]. + */ +Sprite.prototype.getColorTone = function() { + return this._colorTone.clone(); +}; + +/** + * Sets the color tone for the sprite. + * + * @param {array} tone - The color tone [r, g, b, gray]. + */ +Sprite.prototype.setColorTone = function(tone) { + if (!(tone instanceof Array)) { + throw new Error("Argument must be an array"); + } + if (!this._colorTone.equals(tone)) { + this._colorTone = tone.clone(); + this._updateColorFilter(); + } +}; + +Sprite.prototype._onBitmapChange = function() { + if (this._bitmap) { + this._refreshFrame = true; + this._bitmap.addLoadListener(this._onBitmapLoad.bind(this)); + } else { + this._refreshFrame = false; + this.texture.frame = new Rectangle(); + } +}; + +Sprite.prototype._onBitmapLoad = function(bitmapLoaded) { + if (bitmapLoaded === this._bitmap) { + if (this._refreshFrame && this._bitmap) { + this._refreshFrame = false; + this._frame.width = this._bitmap.width; + this._frame.height = this._bitmap.height; + } + } + this._refresh(); +}; + +Sprite.prototype._refresh = function() { + const texture = this.texture; + const frameX = Math.floor(this._frame.x); + const frameY = Math.floor(this._frame.y); + const frameW = Math.floor(this._frame.width); + const frameH = Math.floor(this._frame.height); + const baseTexture = this._bitmap ? this._bitmap.baseTexture : null; + const baseTextureW = baseTexture ? baseTexture.width : 0; + const baseTextureH = baseTexture ? baseTexture.height : 0; + const realX = frameX.clamp(0, baseTextureW); + const realY = frameY.clamp(0, baseTextureH); + const realW = (frameW - realX + frameX).clamp(0, baseTextureW - realX); + const realH = (frameH - realY + frameY).clamp(0, baseTextureH - realY); + const frame = new Rectangle(realX, realY, realW, realH); + if (texture) { + this.pivot.x = frameX - realX; + this.pivot.y = frameY - realY; + if (baseTexture) { + texture.baseTexture = baseTexture; + try { + texture.frame = frame; + } catch (e) { + texture.frame = new Rectangle(); + } + } + texture._updateID++; + } +}; + +Sprite.prototype._createColorFilter = function() { + this._colorFilter = new ColorFilter(); + if (!this.filters) { + this.filters = []; + } + this.filters.push(this._colorFilter); +}; + +Sprite.prototype._updateColorFilter = function() { + if (!this._colorFilter) { + this._createColorFilter(); + } + this._colorFilter.setHue(this._hue); + this._colorFilter.setBlendColor(this._blendColor); + this._colorFilter.setColorTone(this._colorTone); +}; + +//----------------------------------------------------------------------------- +/** + * The tilemap which displays 2D tile-based game map. + * + * @class + * @extends PIXI.Container + */ +function Tilemap() { + this.initialize(...arguments); +} + +Tilemap.prototype = Object.create(PIXI.Container.prototype); +Tilemap.prototype.constructor = Tilemap; + +Tilemap.prototype.initialize = function() { + PIXI.Container.call(this); + + this._width = Graphics.width; + this._height = Graphics.height; + this._margin = 20; + this._tileWidth = 48; + this._tileHeight = 48; + this._mapWidth = 0; + this._mapHeight = 0; + this._mapData = null; + this._bitmaps = []; + + /** + * The origin point of the tilemap for scrolling. + * + * @type Point + */ + this.origin = new Point(); + + /** + * The tileset flags. + * + * @type array + */ + this.flags = []; + + /** + * The animation count for autotiles. + * + * @type number + */ + this.animationCount = 0; + + /** + * Whether the tilemap loops horizontal. + * + * @type boolean + */ + this.horizontalWrap = false; + + /** + * Whether the tilemap loops vertical. + * + * @type boolean + */ + this.verticalWrap = false; + + this._createLayers(); + this.refresh(); +}; + +/** + * The width of the tilemap. + * + * @type number + * @name Tilemap#width + */ +Object.defineProperty(Tilemap.prototype, "width", { + get: function() { + return this._width; + }, + set: function(value) { + this._width = value; + }, + configurable: true +}); + +/** + * The height of the tilemap. + * + * @type number + * @name Tilemap#height + */ +Object.defineProperty(Tilemap.prototype, "height", { + get: function() { + return this._height; + }, + set: function(value) { + this._height = value; + }, + configurable: true +}); + +/** + * Destroys the tilemap. + */ +Tilemap.prototype.destroy = function() { + const options = { children: true, texture: true }; + PIXI.Container.prototype.destroy.call(this, options); +}; + +/** + * Sets the tilemap data. + * + * @param {number} width - The width of the map in number of tiles. + * @param {number} height - The height of the map in number of tiles. + * @param {array} data - The one dimensional array for the map data. + */ +Tilemap.prototype.setData = function(width, height, data) { + this._mapWidth = width; + this._mapHeight = height; + this._mapData = data; +}; + +/** + * Checks whether the tileset is ready to render. + * + * @type boolean + * @returns {boolean} True if the tilemap is ready. + */ +Tilemap.prototype.isReady = function() { + for (const bitmap of this._bitmaps) { + if (bitmap && !bitmap.isReady()) { + return false; + } + } + return true; +}; + +/** + * Updates the tilemap for each frame. + */ +Tilemap.prototype.update = function() { + this.animationCount++; + this.animationFrame = Math.floor(this.animationCount / 30); + for (const child of this.children) { + if (child.update) { + child.update(); + } + } +}; + +/** + * Sets the bitmaps used as a tileset. + * + * @param {array} bitmaps - The array of the tileset bitmaps. + */ +Tilemap.prototype.setBitmaps = function(bitmaps) { + // [Note] We wait for the images to finish loading. Creating textures + // from bitmaps that are not yet loaded here brings some maintenance + // difficulties. e.g. PIXI overwrites img.onload internally. + this._bitmaps = bitmaps; + const listener = this._updateBitmaps.bind(this); + for (const bitmap of this._bitmaps) { + if (!bitmap.isReady()) { + bitmap.addLoadListener(listener); + } + } + this._needsBitmapsUpdate = true; + this._updateBitmaps(); +}; + +/** + * Forces to repaint the entire tilemap. + */ +Tilemap.prototype.refresh = function() { + this._needsRepaint = true; +}; + +/** + * Updates the transform on all children of this container for rendering. + */ +Tilemap.prototype.updateTransform = function() { + const ox = Math.ceil(this.origin.x); + const oy = Math.ceil(this.origin.y); + const startX = Math.floor((ox - this._margin) / this._tileWidth); + const startY = Math.floor((oy - this._margin) / this._tileHeight); + this._lowerLayer.x = startX * this._tileWidth - ox; + this._lowerLayer.y = startY * this._tileHeight - oy; + this._upperLayer.x = startX * this._tileWidth - ox; + this._upperLayer.y = startY * this._tileHeight - oy; + if ( + this._needsRepaint || + this._lastAnimationFrame !== this.animationFrame || + this._lastStartX !== startX || + this._lastStartY !== startY + ) { + this._lastAnimationFrame = this.animationFrame; + this._lastStartX = startX; + this._lastStartY = startY; + this._addAllSpots(startX, startY); + this._needsRepaint = false; + } + this._sortChildren(); + PIXI.Container.prototype.updateTransform.call(this); +}; + +Tilemap.prototype._createLayers = function() { + /* + * [Z coordinate] + * 0 : Lower tiles + * 1 : Lower characters + * 3 : Normal characters + * 4 : Upper tiles + * 5 : Upper characters + * 6 : Airship shadow + * 7 : Balloon + * 8 : Animation + * 9 : Destination + */ + this._lowerLayer = new Tilemap.Layer(); + this._lowerLayer.z = 0; + this._upperLayer = new Tilemap.Layer(); + this._upperLayer.z = 4; + this.addChild(this._lowerLayer); + this.addChild(this._upperLayer); + this._needsRepaint = true; +}; + +Tilemap.prototype._updateBitmaps = function() { + if (this._needsBitmapsUpdate && this.isReady()) { + this._lowerLayer.setBitmaps(this._bitmaps); + this._needsBitmapsUpdate = false; + this._needsRepaint = true; + } +}; + +Tilemap.prototype._addAllSpots = function(startX, startY) { + this._lowerLayer.clear(); + this._upperLayer.clear(); + const widthWithMatgin = this.width + this._margin * 2; + const heightWithMatgin = this.height + this._margin * 2; + const tileCols = Math.ceil(widthWithMatgin / this._tileWidth) + 1; + const tileRows = Math.ceil(heightWithMatgin / this._tileHeight) + 1; + for (let y = 0; y < tileRows; y++) { + for (let x = 0; x < tileCols; x++) { + this._addSpot(startX, startY, x, y); + } + } +}; + +Tilemap.prototype._addSpot = function(startX, startY, x, y) { + const mx = startX + x; + const my = startY + y; + const dx = x * this._tileWidth; + const dy = y * this._tileHeight; + const tileId0 = this._readMapData(mx, my, 0); + const tileId1 = this._readMapData(mx, my, 1); + const tileId2 = this._readMapData(mx, my, 2); + const tileId3 = this._readMapData(mx, my, 3); + const shadowBits = this._readMapData(mx, my, 4); + const upperTileId1 = this._readMapData(mx, my - 1, 1); + + this._addSpotTile(tileId0, dx, dy); + this._addSpotTile(tileId1, dx, dy); + this._addShadow(this._lowerLayer, shadowBits, dx, dy); + if (this._isTableTile(upperTileId1) && !this._isTableTile(tileId1)) { + if (!Tilemap.isShadowingTile(tileId0)) { + this._addTableEdge(this._lowerLayer, upperTileId1, dx, dy); + } + } + if (this._isOverpassPosition(mx, my)) { + this._addTile(this._upperLayer, tileId2, dx, dy); + this._addTile(this._upperLayer, tileId3, dx, dy); + } else { + this._addSpotTile(tileId2, dx, dy); + this._addSpotTile(tileId3, dx, dy); + } +}; + +Tilemap.prototype._addSpotTile = function(tileId, dx, dy) { + if (this._isHigherTile(tileId)) { + this._addTile(this._upperLayer, tileId, dx, dy); + } else { + this._addTile(this._lowerLayer, tileId, dx, dy); + } +}; + +Tilemap.prototype._addTile = function(layer, tileId, dx, dy) { + if (Tilemap.isVisibleTile(tileId)) { + if (Tilemap.isAutotile(tileId)) { + this._addAutotile(layer, tileId, dx, dy); + } else { + this._addNormalTile(layer, tileId, dx, dy); + } + } +}; + +Tilemap.prototype._addNormalTile = function(layer, tileId, dx, dy) { + let setNumber = 0; + + if (Tilemap.isTileA5(tileId)) { + setNumber = 4; + } else { + setNumber = 5 + Math.floor(tileId / 256); + } + + const w = this._tileWidth; + const h = this._tileHeight; + const sx = ((Math.floor(tileId / 128) % 2) * 8 + (tileId % 8)) * w; + const sy = (Math.floor((tileId % 256) / 8) % 16) * h; + + layer.addRect(setNumber, sx, sy, dx, dy, w, h); +}; + +Tilemap.prototype._addAutotile = function(layer, tileId, dx, dy) { + const kind = Tilemap.getAutotileKind(tileId); + const shape = Tilemap.getAutotileShape(tileId); + const tx = kind % 8; + const ty = Math.floor(kind / 8); + let setNumber = 0; + let bx = 0; + let by = 0; + let autotileTable = Tilemap.FLOOR_AUTOTILE_TABLE; + let isTable = false; + + if (Tilemap.isTileA1(tileId)) { + const waterSurfaceIndex = [0, 1, 2, 1][this.animationFrame % 4]; + setNumber = 0; + if (kind === 0) { + bx = waterSurfaceIndex * 2; + by = 0; + } else if (kind === 1) { + bx = waterSurfaceIndex * 2; + by = 3; + } else if (kind === 2) { + bx = 6; + by = 0; + } else if (kind === 3) { + bx = 6; + by = 3; + } else { + bx = Math.floor(tx / 4) * 8; + by = ty * 6 + (Math.floor(tx / 2) % 2) * 3; + if (kind % 2 === 0) { + bx += waterSurfaceIndex * 2; + } else { + bx += 6; + autotileTable = Tilemap.WATERFALL_AUTOTILE_TABLE; + by += this.animationFrame % 3; + } + } + } else if (Tilemap.isTileA2(tileId)) { + setNumber = 1; + bx = tx * 2; + by = (ty - 2) * 3; + isTable = this._isTableTile(tileId); + } else if (Tilemap.isTileA3(tileId)) { + setNumber = 2; + bx = tx * 2; + by = (ty - 6) * 2; + autotileTable = Tilemap.WALL_AUTOTILE_TABLE; + } else if (Tilemap.isTileA4(tileId)) { + setNumber = 3; + bx = tx * 2; + by = Math.floor((ty - 10) * 2.5 + (ty % 2 === 1 ? 0.5 : 0)); + if (ty % 2 === 1) { + autotileTable = Tilemap.WALL_AUTOTILE_TABLE; + } + } + + const table = autotileTable[shape]; + const w1 = this._tileWidth / 2; + const h1 = this._tileHeight / 2; + for (let i = 0; i < 4; i++) { + const qsx = table[i][0]; + const qsy = table[i][1]; + const sx1 = (bx * 2 + qsx) * w1; + const sy1 = (by * 2 + qsy) * h1; + const dx1 = dx + (i % 2) * w1; + const dy1 = dy + Math.floor(i / 2) * h1; + if (isTable && (qsy === 1 || qsy === 5)) { + const qsx2 = qsy === 1 ? (4 - qsx) % 4 : qsx; + const qsy2 = 3; + const sx2 = (bx * 2 + qsx2) * w1; + const sy2 = (by * 2 + qsy2) * h1; + layer.addRect(setNumber, sx2, sy2, dx1, dy1, w1, h1); + layer.addRect(setNumber, sx1, sy1, dx1, dy1 + h1 / 2, w1, h1 / 2); + } else { + layer.addRect(setNumber, sx1, sy1, dx1, dy1, w1, h1); + } + } +}; + +Tilemap.prototype._addTableEdge = function(layer, tileId, dx, dy) { + if (Tilemap.isTileA2(tileId)) { + const autotileTable = Tilemap.FLOOR_AUTOTILE_TABLE; + const kind = Tilemap.getAutotileKind(tileId); + const shape = Tilemap.getAutotileShape(tileId); + const tx = kind % 8; + const ty = Math.floor(kind / 8); + const setNumber = 1; + const bx = tx * 2; + const by = (ty - 2) * 3; + const table = autotileTable[shape]; + const w1 = this._tileWidth / 2; + const h1 = this._tileHeight / 2; + for (let i = 0; i < 2; i++) { + const qsx = table[2 + i][0]; + const qsy = table[2 + i][1]; + const sx1 = (bx * 2 + qsx) * w1; + const sy1 = (by * 2 + qsy) * h1 + h1 / 2; + const dx1 = dx + (i % 2) * w1; + const dy1 = dy + Math.floor(i / 2) * h1; + layer.addRect(setNumber, sx1, sy1, dx1, dy1, w1, h1 / 2); + } + } +}; + +Tilemap.prototype._addShadow = function(layer, shadowBits, dx, dy) { + if (shadowBits & 0x0f) { + const w1 = this._tileWidth / 2; + const h1 = this._tileHeight / 2; + for (let i = 0; i < 4; i++) { + if (shadowBits & (1 << i)) { + const dx1 = dx + (i % 2) * w1; + const dy1 = dy + Math.floor(i / 2) * h1; + layer.addRect(-1, 0, 0, dx1, dy1, w1, h1); + } + } + } +}; + +Tilemap.prototype._readMapData = function(x, y, z) { + if (this._mapData) { + const width = this._mapWidth; + const height = this._mapHeight; + if (this.horizontalWrap) { + x = x.mod(width); + } + if (this.verticalWrap) { + y = y.mod(height); + } + if (x >= 0 && x < width && y >= 0 && y < height) { + return this._mapData[(z * height + y) * width + x] || 0; + } else { + return 0; + } + } else { + return 0; + } +}; + +Tilemap.prototype._isHigherTile = function(tileId) { + return this.flags[tileId] & 0x10; +}; + +Tilemap.prototype._isTableTile = function(tileId) { + return Tilemap.isTileA2(tileId) && this.flags[tileId] & 0x80; +}; + +Tilemap.prototype._isOverpassPosition = function(/*mx, my*/) { + return false; +}; + +Tilemap.prototype._sortChildren = function() { + this.children.sort(this._compareChildOrder.bind(this)); +}; + +Tilemap.prototype._compareChildOrder = function(a, b) { + if (a.z !== b.z) { + return a.z - b.z; + } else if (a.y !== b.y) { + return a.y - b.y; + } else { + return a.spriteId - b.spriteId; + } +}; + +//::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +// Tile type checkers + +Tilemap.TILE_ID_B = 0; +Tilemap.TILE_ID_C = 256; +Tilemap.TILE_ID_D = 512; +Tilemap.TILE_ID_E = 768; +Tilemap.TILE_ID_A5 = 1536; +Tilemap.TILE_ID_A1 = 2048; +Tilemap.TILE_ID_A2 = 2816; +Tilemap.TILE_ID_A3 = 4352; +Tilemap.TILE_ID_A4 = 5888; +Tilemap.TILE_ID_MAX = 8192; + +Tilemap.isVisibleTile = function(tileId) { + return tileId > 0 && tileId < this.TILE_ID_MAX; +}; + +Tilemap.isAutotile = function(tileId) { + return tileId >= this.TILE_ID_A1; +}; + +Tilemap.getAutotileKind = function(tileId) { + return Math.floor((tileId - this.TILE_ID_A1) / 48); +}; + +Tilemap.getAutotileShape = function(tileId) { + return (tileId - this.TILE_ID_A1) % 48; +}; + +Tilemap.makeAutotileId = function(kind, shape) { + return this.TILE_ID_A1 + kind * 48 + shape; +}; + +Tilemap.isSameKindTile = function(tileID1, tileID2) { + if (this.isAutotile(tileID1) && this.isAutotile(tileID2)) { + return this.getAutotileKind(tileID1) === this.getAutotileKind(tileID2); + } else { + return tileID1 === tileID2; + } +}; + +Tilemap.isTileA1 = function(tileId) { + return tileId >= this.TILE_ID_A1 && tileId < this.TILE_ID_A2; +}; + +Tilemap.isTileA2 = function(tileId) { + return tileId >= this.TILE_ID_A2 && tileId < this.TILE_ID_A3; +}; + +Tilemap.isTileA3 = function(tileId) { + return tileId >= this.TILE_ID_A3 && tileId < this.TILE_ID_A4; +}; + +Tilemap.isTileA4 = function(tileId) { + return tileId >= this.TILE_ID_A4 && tileId < this.TILE_ID_MAX; +}; + +Tilemap.isTileA5 = function(tileId) { + return tileId >= this.TILE_ID_A5 && tileId < this.TILE_ID_A1; +}; + +Tilemap.isWaterTile = function(tileId) { + if (this.isTileA1(tileId)) { + return !( + tileId >= this.TILE_ID_A1 + 96 && tileId < this.TILE_ID_A1 + 192 + ); + } else { + return false; + } +}; + +Tilemap.isWaterfallTile = function(tileId) { + if (tileId >= this.TILE_ID_A1 + 192 && tileId < this.TILE_ID_A2) { + return this.getAutotileKind(tileId) % 2 === 1; + } else { + return false; + } +}; + +Tilemap.isGroundTile = function(tileId) { + return ( + this.isTileA1(tileId) || this.isTileA2(tileId) || this.isTileA5(tileId) + ); +}; + +Tilemap.isShadowingTile = function(tileId) { + return this.isTileA3(tileId) || this.isTileA4(tileId); +}; + +Tilemap.isRoofTile = function(tileId) { + return this.isTileA3(tileId) && this.getAutotileKind(tileId) % 16 < 8; +}; + +Tilemap.isWallTopTile = function(tileId) { + return this.isTileA4(tileId) && this.getAutotileKind(tileId) % 16 < 8; +}; + +Tilemap.isWallSideTile = function(tileId) { + return ( + (this.isTileA3(tileId) || this.isTileA4(tileId)) && + this.getAutotileKind(tileId) % 16 >= 8 + ); +}; + +Tilemap.isWallTile = function(tileId) { + return this.isWallTopTile(tileId) || this.isWallSideTile(tileId); +}; + +Tilemap.isFloorTypeAutotile = function(tileId) { + return ( + (this.isTileA1(tileId) && !this.isWaterfallTile(tileId)) || + this.isTileA2(tileId) || + this.isWallTopTile(tileId) + ); +}; + +Tilemap.isWallTypeAutotile = function(tileId) { + return this.isRoofTile(tileId) || this.isWallSideTile(tileId); +}; + +Tilemap.isWaterfallTypeAutotile = function(tileId) { + return this.isWaterfallTile(tileId); +}; + +//::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +// Autotile shape number to coordinates of tileset images + +// prettier-ignore +Tilemap.FLOOR_AUTOTILE_TABLE = [ + [[2, 4], [1, 4], [2, 3], [1, 3]], + [[2, 0], [1, 4], [2, 3], [1, 3]], + [[2, 4], [3, 0], [2, 3], [1, 3]], + [[2, 0], [3, 0], [2, 3], [1, 3]], + [[2, 4], [1, 4], [2, 3], [3, 1]], + [[2, 0], [1, 4], [2, 3], [3, 1]], + [[2, 4], [3, 0], [2, 3], [3, 1]], + [[2, 0], [3, 0], [2, 3], [3, 1]], + [[2, 4], [1, 4], [2, 1], [1, 3]], + [[2, 0], [1, 4], [2, 1], [1, 3]], + [[2, 4], [3, 0], [2, 1], [1, 3]], + [[2, 0], [3, 0], [2, 1], [1, 3]], + [[2, 4], [1, 4], [2, 1], [3, 1]], + [[2, 0], [1, 4], [2, 1], [3, 1]], + [[2, 4], [3, 0], [2, 1], [3, 1]], + [[2, 0], [3, 0], [2, 1], [3, 1]], + [[0, 4], [1, 4], [0, 3], [1, 3]], + [[0, 4], [3, 0], [0, 3], [1, 3]], + [[0, 4], [1, 4], [0, 3], [3, 1]], + [[0, 4], [3, 0], [0, 3], [3, 1]], + [[2, 2], [1, 2], [2, 3], [1, 3]], + [[2, 2], [1, 2], [2, 3], [3, 1]], + [[2, 2], [1, 2], [2, 1], [1, 3]], + [[2, 2], [1, 2], [2, 1], [3, 1]], + [[2, 4], [3, 4], [2, 3], [3, 3]], + [[2, 4], [3, 4], [2, 1], [3, 3]], + [[2, 0], [3, 4], [2, 3], [3, 3]], + [[2, 0], [3, 4], [2, 1], [3, 3]], + [[2, 4], [1, 4], [2, 5], [1, 5]], + [[2, 0], [1, 4], [2, 5], [1, 5]], + [[2, 4], [3, 0], [2, 5], [1, 5]], + [[2, 0], [3, 0], [2, 5], [1, 5]], + [[0, 4], [3, 4], [0, 3], [3, 3]], + [[2, 2], [1, 2], [2, 5], [1, 5]], + [[0, 2], [1, 2], [0, 3], [1, 3]], + [[0, 2], [1, 2], [0, 3], [3, 1]], + [[2, 2], [3, 2], [2, 3], [3, 3]], + [[2, 2], [3, 2], [2, 1], [3, 3]], + [[2, 4], [3, 4], [2, 5], [3, 5]], + [[2, 0], [3, 4], [2, 5], [3, 5]], + [[0, 4], [1, 4], [0, 5], [1, 5]], + [[0, 4], [3, 0], [0, 5], [1, 5]], + [[0, 2], [3, 2], [0, 3], [3, 3]], + [[0, 2], [1, 2], [0, 5], [1, 5]], + [[0, 4], [3, 4], [0, 5], [3, 5]], + [[2, 2], [3, 2], [2, 5], [3, 5]], + [[0, 2], [3, 2], [0, 5], [3, 5]], + [[0, 0], [1, 0], [0, 1], [1, 1]] +]; + +// prettier-ignore +Tilemap.WALL_AUTOTILE_TABLE = [ + [[2, 2], [1, 2], [2, 1], [1, 1]], + [[0, 2], [1, 2], [0, 1], [1, 1]], + [[2, 0], [1, 0], [2, 1], [1, 1]], + [[0, 0], [1, 0], [0, 1], [1, 1]], + [[2, 2], [3, 2], [2, 1], [3, 1]], + [[0, 2], [3, 2], [0, 1], [3, 1]], + [[2, 0], [3, 0], [2, 1], [3, 1]], + [[0, 0], [3, 0], [0, 1], [3, 1]], + [[2, 2], [1, 2], [2, 3], [1, 3]], + [[0, 2], [1, 2], [0, 3], [1, 3]], + [[2, 0], [1, 0], [2, 3], [1, 3]], + [[0, 0], [1, 0], [0, 3], [1, 3]], + [[2, 2], [3, 2], [2, 3], [3, 3]], + [[0, 2], [3, 2], [0, 3], [3, 3]], + [[2, 0], [3, 0], [2, 3], [3, 3]], + [[0, 0], [3, 0], [0, 3], [3, 3]] +]; + +// prettier-ignore +Tilemap.WATERFALL_AUTOTILE_TABLE = [ + [[2, 0], [1, 0], [2, 1], [1, 1]], + [[0, 0], [1, 0], [0, 1], [1, 1]], + [[2, 0], [3, 0], [2, 1], [3, 1]], + [[0, 0], [3, 0], [0, 1], [3, 1]] +]; + +//::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +// Internal classes + +Tilemap.Layer = function() { + this.initialize(...arguments); +}; + +Tilemap.Layer.prototype = Object.create(PIXI.Container.prototype); +Tilemap.Layer.prototype.constructor = Tilemap.Layer; + +Tilemap.Layer.prototype.initialize = function() { + PIXI.Container.call(this); + this._elements = []; + this._indexBuffer = null; + this._indexArray = new Float32Array(0); + this._vertexBuffer = null; + this._vertexArray = new Float32Array(0); + this._vao = null; + this._needsTexturesUpdate = false; + this._needsVertexUpdate = false; + this._images = []; + this._state = PIXI.State.for2d(); + this._createVao(); +}; + +Tilemap.Layer.MAX_GL_TEXTURES = 3; +Tilemap.Layer.VERTEX_STRIDE = 9 * 4; + +Tilemap.Layer.prototype.destroy = function() { + if (this._vao) { + this._vao.destroy(); + this._indexBuffer.destroy(); + this._vertexBuffer.destroy(); + } + this._indexBuffer = null; + this._vertexBuffer = null; + this._vao = null; +}; + +Tilemap.Layer.prototype.setBitmaps = function(bitmaps) { + this._images = bitmaps.map(bitmap => bitmap.image || bitmap.canvas); + this._needsTexturesUpdate = true; +}; + +Tilemap.Layer.prototype.clear = function() { + this._elements.length = 0; + this._needsVertexUpdate = true; +}; + +Tilemap.Layer.prototype.addRect = function(setNumber, sx, sy, dx, dy, w, h) { + this._elements.push([setNumber, sx, sy, dx, dy, w, h]); +}; + +Tilemap.Layer.prototype.render = function(renderer) { + const gl = renderer.gl; + const tilemapRenderer = renderer.plugins.rpgtilemap; + const shader = tilemapRenderer.getShader(); + const matrix = shader.uniforms.uProjectionMatrix; + + renderer.batch.setObjectRenderer(tilemapRenderer); + renderer.projection.projectionMatrix.copyTo(matrix); + matrix.append(this.worldTransform); + renderer.shader.bind(shader); + + if (this._needsTexturesUpdate) { + tilemapRenderer.updateTextures(renderer, this._images); + this._needsTexturesUpdate = false; + } + tilemapRenderer.bindTextures(renderer); + renderer.geometry.bind(this._vao, shader); + this._updateIndexBuffer(); + if (this._needsVertexUpdate) { + this._updateVertexBuffer(); + this._needsVertexUpdate = false; + } + renderer.geometry.updateBuffers(); + + const numElements = this._elements.length; + if (numElements > 0) { + renderer.state.set(this._state); + renderer.geometry.draw(gl.TRIANGLES, numElements * 6, 0); + } +}; + +Tilemap.Layer.prototype.isReady = function() { + if (this._images.length === 0) { + return false; + } + for (const texture of this._images) { + if (!texture || !texture.valid) { + return false; + } + } + return true; +}; + +Tilemap.Layer.prototype._createVao = function() { + const ib = new PIXI.Buffer(null, true, true); + const vb = new PIXI.Buffer(null, true, false); + const stride = Tilemap.Layer.VERTEX_STRIDE; + const type = PIXI.TYPES.FLOAT; + const geometry = new PIXI.Geometry(); + this._indexBuffer = ib; + this._vertexBuffer = vb; + this._vao = geometry + .addIndex(this._indexBuffer) + .addAttribute("aTextureId", vb, 1, false, type, stride, 0) + .addAttribute("aFrame", vb, 4, false, type, stride, 1 * 4) + .addAttribute("aSource", vb, 2, false, type, stride, 5 * 4) + .addAttribute("aDest", vb, 2, false, type, stride, 7 * 4); +}; + +Tilemap.Layer.prototype._updateIndexBuffer = function() { + const numElements = this._elements.length; + if (this._indexArray.length < numElements * 6 * 2) { + this._indexArray = PIXI.utils.createIndicesForQuads(numElements * 2); + this._indexBuffer.update(this._indexArray); + } +}; + +Tilemap.Layer.prototype._updateVertexBuffer = function() { + const numElements = this._elements.length; + const required = numElements * Tilemap.Layer.VERTEX_STRIDE; + if (this._vertexArray.length < required) { + this._vertexArray = new Float32Array(required * 2); + } + const vertexArray = this._vertexArray; + let index = 0; + for (const item of this._elements) { + const setNumber = item[0]; + const tid = setNumber >> 2; + const sxOffset = 1024 * (setNumber & 1); + const syOffset = 1024 * ((setNumber >> 1) & 1); + const sx = item[1] + sxOffset; + const sy = item[2] + syOffset; + const dx = item[3]; + const dy = item[4]; + const w = item[5]; + const h = item[6]; + const frameLeft = sx + 0.5; + const frameTop = sy + 0.5; + const frameRight = sx + w - 0.5; + const frameBottom = sy + h - 0.5; + vertexArray[index++] = tid; + vertexArray[index++] = frameLeft; + vertexArray[index++] = frameTop; + vertexArray[index++] = frameRight; + vertexArray[index++] = frameBottom; + vertexArray[index++] = sx; + vertexArray[index++] = sy; + vertexArray[index++] = dx; + vertexArray[index++] = dy; + vertexArray[index++] = tid; + vertexArray[index++] = frameLeft; + vertexArray[index++] = frameTop; + vertexArray[index++] = frameRight; + vertexArray[index++] = frameBottom; + vertexArray[index++] = sx + w; + vertexArray[index++] = sy; + vertexArray[index++] = dx + w; + vertexArray[index++] = dy; + vertexArray[index++] = tid; + vertexArray[index++] = frameLeft; + vertexArray[index++] = frameTop; + vertexArray[index++] = frameRight; + vertexArray[index++] = frameBottom; + vertexArray[index++] = sx + w; + vertexArray[index++] = sy + h; + vertexArray[index++] = dx + w; + vertexArray[index++] = dy + h; + vertexArray[index++] = tid; + vertexArray[index++] = frameLeft; + vertexArray[index++] = frameTop; + vertexArray[index++] = frameRight; + vertexArray[index++] = frameBottom; + vertexArray[index++] = sx; + vertexArray[index++] = sy + h; + vertexArray[index++] = dx; + vertexArray[index++] = dy + h; + } + this._vertexBuffer.update(vertexArray); +}; + +Tilemap.Renderer = function() { + this.initialize(...arguments); +}; + +Tilemap.Renderer.prototype = Object.create(PIXI.ObjectRenderer.prototype); +Tilemap.Renderer.prototype.constructor = Tilemap.Renderer; + +Tilemap.Renderer.prototype.initialize = function(renderer) { + PIXI.ObjectRenderer.call(this, renderer); + this._shader = null; + this._images = []; + this._internalTextures = []; + this._clearBuffer = new Uint8Array(1024 * 1024 * 4); + this.contextChange(); +}; + +Tilemap.Renderer.prototype.destroy = function() { + PIXI.ObjectRenderer.prototype.destroy.call(this); + this._destroyInternalTextures(); + this._shader.destroy(); + this._shader = null; +}; + +Tilemap.Renderer.prototype.getShader = function() { + return this._shader; +}; + +Tilemap.Renderer.prototype.contextChange = function() { + this._shader = this._createShader(); + this._images = []; + this._createInternalTextures(); +}; + +Tilemap.Renderer.prototype._createShader = function() { + const vertexSrc = + "attribute float aTextureId;" + + "attribute vec4 aFrame;" + + "attribute vec2 aSource;" + + "attribute vec2 aDest;" + + "uniform mat3 uProjectionMatrix;" + + "varying vec4 vFrame;" + + "varying vec2 vTextureCoord;" + + "varying float vTextureId;" + + "void main(void) {" + + " vec3 position = uProjectionMatrix * vec3(aDest, 1.0);" + + " gl_Position = vec4(position, 1.0);" + + " vFrame = aFrame;" + + " vTextureCoord = aSource;" + + " vTextureId = aTextureId;" + + "}"; + const fragmentSrc = + "varying vec4 vFrame;" + + "varying vec2 vTextureCoord;" + + "varying float vTextureId;" + + "uniform sampler2D uSampler0;" + + "uniform sampler2D uSampler1;" + + "uniform sampler2D uSampler2;" + + "void main(void) {" + + " vec2 textureCoord = clamp(vTextureCoord, vFrame.xy, vFrame.zw);" + + " int textureId = int(vTextureId);" + + " vec4 color;" + + " if (textureId < 0) {" + + " color = vec4(0.0, 0.0, 0.0, 0.5);" + + " } else if (textureId == 0) {" + + " color = texture2D(uSampler0, textureCoord / 2048.0);" + + " } else if (textureId == 1) {" + + " color = texture2D(uSampler1, textureCoord / 2048.0);" + + " } else if (textureId == 2) {" + + " color = texture2D(uSampler2, textureCoord / 2048.0);" + + " }" + + " gl_FragColor = color;" + + "}"; + + return new PIXI.Shader(PIXI.Program.from(vertexSrc, fragmentSrc), { + uSampler0: 0, + uSampler1: 0, + uSampler2: 0, + uProjectionMatrix: new PIXI.Matrix() + }); +}; + +Tilemap.Renderer.prototype._createInternalTextures = function() { + this._destroyInternalTextures(); + for (let i = 0; i < Tilemap.Layer.MAX_GL_TEXTURES; i++) { + const baseTexture = new PIXI.BaseRenderTexture(); + baseTexture.resize(2048, 2048); + baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST; + this._internalTextures.push(baseTexture); + } +}; + +Tilemap.Renderer.prototype._destroyInternalTextures = function() { + for (const internalTexture of this._internalTextures) { + internalTexture.destroy(); + } + this._internalTextures = []; +}; + +Tilemap.Renderer.prototype.updateTextures = function(renderer, images) { + for (let i = 0; i < images.length; i++) { + const internalTexture = this._internalTextures[i >> 2]; + renderer.texture.bind(internalTexture, 0); + const gl = renderer.gl; + const x = 1024 * (i % 2); + const y = 1024 * ((i >> 1) % 2); + const format = gl.RGBA; + const type = gl.UNSIGNED_BYTE; + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0); + // prettier-ignore + gl.texSubImage2D(gl.TEXTURE_2D, 0, x, y, 1024, 1024, format, type, + this._clearBuffer); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1); + gl.texSubImage2D(gl.TEXTURE_2D, 0, x, y, format, type, images[i]); + } +}; + +Tilemap.Renderer.prototype.bindTextures = function(renderer) { + for (let ti = 0; ti < Tilemap.Layer.MAX_GL_TEXTURES; ti++) { + renderer.texture.bind(this._internalTextures[ti], ti); + } +}; + +PIXI.Renderer.registerPlugin("rpgtilemap", Tilemap.Renderer); + +//----------------------------------------------------------------------------- +/** + * The sprite object for a tiling image. + * + * @class + * @extends PIXI.TilingSprite + * @param {Bitmap} bitmap - The image for the tiling sprite. + */ +function TilingSprite() { + this.initialize(...arguments); +} + +TilingSprite.prototype = Object.create(PIXI.TilingSprite.prototype); +TilingSprite.prototype.constructor = TilingSprite; + +TilingSprite.prototype.initialize = function(bitmap) { + if (!TilingSprite._emptyBaseTexture) { + TilingSprite._emptyBaseTexture = new PIXI.BaseTexture(); + TilingSprite._emptyBaseTexture.setSize(1, 1); + } + const frame = new Rectangle(); + const texture = new PIXI.Texture(TilingSprite._emptyBaseTexture, frame); + PIXI.TilingSprite.call(this, texture); + this._bitmap = bitmap; + this._width = 0; + this._height = 0; + this._frame = frame; + + /** + * The origin point of the tiling sprite for scrolling. + * + * @type Point + */ + this.origin = new Point(); + + this._onBitmapChange(); +}; + +TilingSprite._emptyBaseTexture = null; + +/** + * The image for the tiling sprite. + * + * @type Bitmap + * @name TilingSprite#bitmap + */ +Object.defineProperty(TilingSprite.prototype, "bitmap", { + get: function() { + return this._bitmap; + }, + set: function(value) { + if (this._bitmap !== value) { + this._bitmap = value; + this._onBitmapChange(); + } + }, + configurable: true +}); + +/** + * The opacity of the tiling sprite (0 to 255). + * + * @type number + * @name TilingSprite#opacity + */ +Object.defineProperty(TilingSprite.prototype, "opacity", { + get: function() { + return this.alpha * 255; + }, + set: function(value) { + this.alpha = value.clamp(0, 255) / 255; + }, + configurable: true +}); + +/** + * Destroys the tiling sprite. + */ +TilingSprite.prototype.destroy = function() { + const options = { children: true, texture: true }; + PIXI.TilingSprite.prototype.destroy.call(this, options); +}; + +/** + * Updates the tiling sprite for each frame. + */ +TilingSprite.prototype.update = function() { + for (const child of this.children) { + if (child.update) { + child.update(); + } + } +}; + +/** + * Sets the x, y, width, and height all at once. + * + * @param {number} x - The x coordinate of the tiling sprite. + * @param {number} y - The y coordinate of the tiling sprite. + * @param {number} width - The width of the tiling sprite. + * @param {number} height - The height of the tiling sprite. + */ +TilingSprite.prototype.move = function(x, y, width, height) { + this.x = x || 0; + this.y = y || 0; + this._width = width || 0; + this._height = height || 0; +}; + +/** + * Specifies the region of the image that the tiling sprite will use. + * + * @param {number} x - The x coordinate of the frame. + * @param {number} y - The y coordinate of the frame. + * @param {number} width - The width of the frame. + * @param {number} height - The height of the frame. + */ +TilingSprite.prototype.setFrame = function(x, y, width, height) { + this._frame.x = x; + this._frame.y = y; + this._frame.width = width; + this._frame.height = height; + this._refresh(); +}; + +/** + * Updates the transform on all children of this container for rendering. + */ +TilingSprite.prototype.updateTransform = function() { + this.tilePosition.x = Math.round(-this.origin.x); + this.tilePosition.y = Math.round(-this.origin.y); + PIXI.TilingSprite.prototype.updateTransform.call(this); +}; + +TilingSprite.prototype._onBitmapChange = function() { + if (this._bitmap) { + this._bitmap.addLoadListener(this._onBitmapLoad.bind(this)); + } else { + this.texture.frame = new Rectangle(); + } +}; + +TilingSprite.prototype._onBitmapLoad = function() { + this.texture.baseTexture = this._bitmap.baseTexture; + this._refresh(); +}; + +TilingSprite.prototype._refresh = function() { + const texture = this.texture; + const frame = this._frame.clone(); + if (frame.width === 0 && frame.height === 0 && this._bitmap) { + frame.width = this._bitmap.width; + frame.height = this._bitmap.height; + } + if (texture) { + if (texture.baseTexture) { + try { + texture.frame = frame; + } catch (e) { + texture.frame = new Rectangle(); + } + } + texture._updateID++; + } +}; + +//----------------------------------------------------------------------------- +/** + * The sprite which covers the entire game screen. + * + * @class + * @extends PIXI.Container + */ +function ScreenSprite() { + this.initialize(...arguments); +} + +ScreenSprite.prototype = Object.create(PIXI.Container.prototype); +ScreenSprite.prototype.constructor = ScreenSprite; + +ScreenSprite.prototype.initialize = function() { + PIXI.Container.call(this); + this._graphics = new PIXI.Graphics(); + this.addChild(this._graphics); + this.opacity = 0; + this._red = -1; + this._green = -1; + this._blue = -1; + this.setBlack(); +}; + +/** + * The opacity of the sprite (0 to 255). + * + * @type number + * @name ScreenSprite#opacity + */ +Object.defineProperty(ScreenSprite.prototype, "opacity", { + get: function() { + return this.alpha * 255; + }, + set: function(value) { + this.alpha = value.clamp(0, 255) / 255; + }, + configurable: true +}); + +/** + * Destroys the screen sprite. + */ +ScreenSprite.prototype.destroy = function() { + const options = { children: true, texture: true }; + PIXI.Container.prototype.destroy.call(this, options); +}; + +/** + * Sets black to the color of the screen sprite. + */ +ScreenSprite.prototype.setBlack = function() { + this.setColor(0, 0, 0); +}; + +/** + * Sets white to the color of the screen sprite. + */ +ScreenSprite.prototype.setWhite = function() { + this.setColor(255, 255, 255); +}; + +/** + * Sets the color of the screen sprite by values. + * + * @param {number} r - The red value in the range (0, 255). + * @param {number} g - The green value in the range (0, 255). + * @param {number} b - The blue value in the range (0, 255). + */ +ScreenSprite.prototype.setColor = function(r, g, b) { + if (this._red !== r || this._green !== g || this._blue !== b) { + r = Math.round(r || 0).clamp(0, 255); + g = Math.round(g || 0).clamp(0, 255); + b = Math.round(b || 0).clamp(0, 255); + this._red = r; + this._green = g; + this._blue = b; + const graphics = this._graphics; + graphics.clear(); + graphics.beginFill((r << 16) | (g << 8) | b, 1); + graphics.drawRect(-50000, -50000, 100000, 100000); + } +}; + +//----------------------------------------------------------------------------- +/** + * The window in the game. + * + * @class + * @extends PIXI.Container + */ +function Window() { + this.initialize(...arguments); +} + +Window.prototype = Object.create(PIXI.Container.prototype); +Window.prototype.constructor = Window; + +Window.prototype.initialize = function() { + PIXI.Container.call(this); + + this._isWindow = true; + this._windowskin = null; + this._width = 0; + this._height = 0; + this._cursorRect = new Rectangle(); + this._openness = 255; + this._animationCount = 0; + + this._padding = 12; + this._margin = 4; + this._colorTone = [0, 0, 0, 0]; + this._innerChildren = []; + + this._container = null; + this._backSprite = null; + this._frameSprite = null; + this._contentsBackSprite = null; + this._cursorSprite = null; + this._contentsSprite = null; + this._downArrowSprite = null; + this._upArrowSprite = null; + this._pauseSignSprite = null; + + this._createAllParts(); + + /** + * The origin point of the window for scrolling. + * + * @type Point + */ + this.origin = new Point(); + + /** + * The active state for the window. + * + * @type boolean + */ + this.active = true; + + /** + * The visibility of the frame. + * + * @type boolean + */ + this.frameVisible = true; + + /** + * The visibility of the cursor. + * + * @type boolean + */ + this.cursorVisible = true; + + /** + * The visibility of the down scroll arrow. + * + * @type boolean + */ + this.downArrowVisible = false; + + /** + * The visibility of the up scroll arrow. + * + * @type boolean + */ + this.upArrowVisible = false; + + /** + * The visibility of the pause sign. + * + * @type boolean + */ + this.pause = false; +}; + +/** + * The image used as a window skin. + * + * @type Bitmap + * @name Window#windowskin + */ +Object.defineProperty(Window.prototype, "windowskin", { + get: function() { + return this._windowskin; + }, + set: function(value) { + if (this._windowskin !== value) { + this._windowskin = value; + this._windowskin.addLoadListener(this._onWindowskinLoad.bind(this)); + } + }, + configurable: true +}); + +/** + * The bitmap used for the window contents. + * + * @type Bitmap + * @name Window#contents + */ +Object.defineProperty(Window.prototype, "contents", { + get: function() { + return this._contentsSprite.bitmap; + }, + set: function(value) { + this._contentsSprite.bitmap = value; + }, + configurable: true +}); + +/** + * The bitmap used for the window contents background. + * + * @type Bitmap + * @name Window#contentsBack + */ +Object.defineProperty(Window.prototype, "contentsBack", { + get: function() { + return this._contentsBackSprite.bitmap; + }, + set: function(value) { + this._contentsBackSprite.bitmap = value; + }, + configurable: true +}); + +/** + * The width of the window in pixels. + * + * @type number + * @name Window#width + */ +Object.defineProperty(Window.prototype, "width", { + get: function() { + return this._width; + }, + set: function(value) { + this._width = value; + this._refreshAllParts(); + }, + configurable: true +}); + +/** + * The height of the window in pixels. + * + * @type number + * @name Window#height + */ +Object.defineProperty(Window.prototype, "height", { + get: function() { + return this._height; + }, + set: function(value) { + this._height = value; + this._refreshAllParts(); + }, + configurable: true +}); + +/** + * The size of the padding between the frame and contents. + * + * @type number + * @name Window#padding + */ +Object.defineProperty(Window.prototype, "padding", { + get: function() { + return this._padding; + }, + set: function(value) { + this._padding = value; + this._refreshAllParts(); + }, + configurable: true +}); + +/** + * The size of the margin for the window background. + * + * @type number + * @name Window#margin + */ +Object.defineProperty(Window.prototype, "margin", { + get: function() { + return this._margin; + }, + set: function(value) { + this._margin = value; + this._refreshAllParts(); + }, + configurable: true +}); + +/** + * The opacity of the window without contents (0 to 255). + * + * @type number + * @name Window#opacity + */ +Object.defineProperty(Window.prototype, "opacity", { + get: function() { + return this._container.alpha * 255; + }, + set: function(value) { + this._container.alpha = value.clamp(0, 255) / 255; + }, + configurable: true +}); + +/** + * The opacity of the window background (0 to 255). + * + * @type number + * @name Window#backOpacity + */ +Object.defineProperty(Window.prototype, "backOpacity", { + get: function() { + return this._backSprite.alpha * 255; + }, + set: function(value) { + this._backSprite.alpha = value.clamp(0, 255) / 255; + }, + configurable: true +}); + +/** + * The opacity of the window contents (0 to 255). + * + * @type number + * @name Window#contentsOpacity + */ +Object.defineProperty(Window.prototype, "contentsOpacity", { + get: function() { + return this._contentsSprite.alpha * 255; + }, + set: function(value) { + this._contentsSprite.alpha = value.clamp(0, 255) / 255; + }, + configurable: true +}); + +/** + * The openness of the window (0 to 255). + * + * @type number + * @name Window#openness + */ +Object.defineProperty(Window.prototype, "openness", { + get: function() { + return this._openness; + }, + set: function(value) { + if (this._openness !== value) { + this._openness = value.clamp(0, 255); + this._container.scale.y = this._openness / 255; + this._container.y = (this.height / 2) * (1 - this._openness / 255); + } + }, + configurable: true +}); + +/** + * The width of the content area in pixels. + * + * @readonly + * @type number + * @name Window#innerWidth + */ +Object.defineProperty(Window.prototype, "innerWidth", { + get: function() { + return Math.max(0, this._width - this._padding * 2); + }, + configurable: true +}); + +/** + * The height of the content area in pixels. + * + * @readonly + * @type number + * @name Window#innerHeight + */ +Object.defineProperty(Window.prototype, "innerHeight", { + get: function() { + return Math.max(0, this._height - this._padding * 2); + }, + configurable: true +}); + +/** + * The rectangle of the content area. + * + * @readonly + * @type Rectangle + * @name Window#innerRect + */ +Object.defineProperty(Window.prototype, "innerRect", { + get: function() { + return new Rectangle( + this._padding, + this._padding, + this.innerWidth, + this.innerHeight + ); + }, + configurable: true +}); + +/** + * Destroys the window. + */ +Window.prototype.destroy = function() { + const options = { children: true, texture: true }; + PIXI.Container.prototype.destroy.call(this, options); +}; + +/** + * Updates the window for each frame. + */ +Window.prototype.update = function() { + if (this.active) { + this._animationCount++; + } + for (const child of this.children) { + if (child.update) { + child.update(); + } + } +}; + +/** + * Sets the x, y, width, and height all at once. + * + * @param {number} x - The x coordinate of the window. + * @param {number} y - The y coordinate of the window. + * @param {number} width - The width of the window. + * @param {number} height - The height of the window. + */ +Window.prototype.move = function(x, y, width, height) { + this.x = x || 0; + this.y = y || 0; + if (this._width !== width || this._height !== height) { + this._width = width || 0; + this._height = height || 0; + this._refreshAllParts(); + } +}; + +/** + * Checks whether the window is completely open (openness == 255). + * + * @returns {boolean} True if the window is open. + */ +Window.prototype.isOpen = function() { + return this._openness >= 255; +}; + +/** + * Checks whether the window is completely closed (openness == 0). + * + * @returns {boolean} True if the window is closed. + */ +Window.prototype.isClosed = function() { + return this._openness <= 0; +}; + +/** + * Sets the position of the command cursor. + * + * @param {number} x - The x coordinate of the cursor. + * @param {number} y - The y coordinate of the cursor. + * @param {number} width - The width of the cursor. + * @param {number} height - The height of the cursor. + */ +Window.prototype.setCursorRect = function(x, y, width, height) { + const cw = Math.floor(width || 0); + const ch = Math.floor(height || 0); + this._cursorRect.x = Math.floor(x || 0); + this._cursorRect.y = Math.floor(y || 0); + if (this._cursorRect.width !== cw || this._cursorRect.height !== ch) { + this._cursorRect.width = cw; + this._cursorRect.height = ch; + this._refreshCursor(); + } +}; + +/** + * Moves the cursor position by the given amount. + * + * @param {number} x - The amount of horizontal movement. + * @param {number} y - The amount of vertical movement. + */ +Window.prototype.moveCursorBy = function(x, y) { + this._cursorRect.x += x; + this._cursorRect.y += y; +}; + +/** + * Moves the inner children by the given amount. + * + * @param {number} x - The amount of horizontal movement. + * @param {number} y - The amount of vertical movement. + */ +Window.prototype.moveInnerChildrenBy = function(x, y) { + for (const child of this._innerChildren) { + child.x += x; + child.y += y; + } +}; + +/** + * Changes the color of the background. + * + * @param {number} r - The red value in the range (-255, 255). + * @param {number} g - The green value in the range (-255, 255). + * @param {number} b - The blue value in the range (-255, 255). + */ +Window.prototype.setTone = function(r, g, b) { + const tone = this._colorTone; + if (r !== tone[0] || g !== tone[1] || b !== tone[2]) { + this._colorTone = [r, g, b, 0]; + this._refreshBack(); + } +}; + +/** + * Adds a child between the background and contents. + * + * @param {object} child - The child to add. + * @returns {object} The child that was added. + */ +Window.prototype.addChildToBack = function(child) { + const containerIndex = this.children.indexOf(this._container); + return this.addChildAt(child, containerIndex + 1); +}; + +/** + * Adds a child to the client area. + * + * @param {object} child - The child to add. + * @returns {object} The child that was added. + */ +Window.prototype.addInnerChild = function(child) { + this._innerChildren.push(child); + return this._clientArea.addChild(child); +}; + +/** + * Updates the transform on all children of this container for rendering. + */ +Window.prototype.updateTransform = function() { + this._updateClientArea(); + this._updateFrame(); + this._updateContentsBack(); + this._updateCursor(); + this._updateContents(); + this._updateArrows(); + this._updatePauseSign(); + PIXI.Container.prototype.updateTransform.call(this); + this._updateFilterArea(); +}; + +/** + * Draws the window shape into PIXI.Graphics object. Used by WindowLayer. + */ +Window.prototype.drawShape = function(graphics) { + if (graphics) { + const width = this.width; + const height = (this.height * this._openness) / 255; + const x = this.x; + const y = this.y + (this.height - height) / 2; + graphics.beginFill(0xffffff); + graphics.drawRoundedRect(x, y, width, height, 0); + graphics.endFill(); + } +}; + +Window.prototype._createAllParts = function() { + this._createContainer(); + this._createBackSprite(); + this._createFrameSprite(); + this._createClientArea(); + this._createContentsBackSprite(); + this._createCursorSprite(); + this._createContentsSprite(); + this._createArrowSprites(); + this._createPauseSignSprites(); +}; + +Window.prototype._createContainer = function() { + this._container = new PIXI.Container(); + this.addChild(this._container); +}; + +Window.prototype._createBackSprite = function() { + this._backSprite = new Sprite(); + this._backSprite.addChild(new TilingSprite()); + this._container.addChild(this._backSprite); +}; + +Window.prototype._createFrameSprite = function() { + this._frameSprite = new Sprite(); + for (let i = 0; i < 8; i++) { + this._frameSprite.addChild(new Sprite()); + } + this._container.addChild(this._frameSprite); +}; + +Window.prototype._createClientArea = function() { + this._clientArea = new Sprite(); + this._clientArea.filters = [new PIXI.filters.AlphaFilter()]; + this._clientArea.filterArea = new Rectangle(); + this._clientArea.move(this._padding, this._padding); + this.addChild(this._clientArea); +}; + +Window.prototype._createContentsBackSprite = function() { + this._contentsBackSprite = new Sprite(); + this._clientArea.addChild(this._contentsBackSprite); +}; + +Window.prototype._createCursorSprite = function() { + this._cursorSprite = new Sprite(); + for (let i = 0; i < 9; i++) { + this._cursorSprite.addChild(new Sprite()); + } + this._clientArea.addChild(this._cursorSprite); +}; + +Window.prototype._createContentsSprite = function() { + this._contentsSprite = new Sprite(); + this._clientArea.addChild(this._contentsSprite); +}; + +Window.prototype._createArrowSprites = function() { + this._downArrowSprite = new Sprite(); + this.addChild(this._downArrowSprite); + this._upArrowSprite = new Sprite(); + this.addChild(this._upArrowSprite); +}; + +Window.prototype._createPauseSignSprites = function() { + this._pauseSignSprite = new Sprite(); + this.addChild(this._pauseSignSprite); +}; + +Window.prototype._onWindowskinLoad = function() { + this._refreshAllParts(); +}; + +Window.prototype._refreshAllParts = function() { + this._refreshBack(); + this._refreshFrame(); + this._refreshCursor(); + this._refreshArrows(); + this._refreshPauseSign(); +}; + +Window.prototype._refreshBack = function() { + const m = this._margin; + const w = Math.max(0, this._width - m * 2); + const h = Math.max(0, this._height - m * 2); + const sprite = this._backSprite; + const tilingSprite = sprite.children[0]; + // [Note] We use 95 instead of 96 here to avoid blurring edges. + sprite.bitmap = this._windowskin; + sprite.setFrame(0, 0, 95, 95); + sprite.move(m, m); + sprite.scale.x = w / 95; + sprite.scale.y = h / 95; + tilingSprite.bitmap = this._windowskin; + tilingSprite.setFrame(0, 96, 96, 96); + tilingSprite.move(0, 0, w, h); + tilingSprite.scale.x = 1 / sprite.scale.x; + tilingSprite.scale.y = 1 / sprite.scale.y; + sprite.setColorTone(this._colorTone); +}; + +Window.prototype._refreshFrame = function() { + const drect = { x: 0, y: 0, width: this._width, height: this._height }; + const srect = { x: 96, y: 0, width: 96, height: 96 }; + const m = 24; + for (const child of this._frameSprite.children) { + child.bitmap = this._windowskin; + } + this._setRectPartsGeometry(this._frameSprite, srect, drect, m); +}; + +Window.prototype._refreshCursor = function() { + const drect = this._cursorRect.clone(); + const srect = { x: 96, y: 96, width: 48, height: 48 }; + const m = 4; + for (const child of this._cursorSprite.children) { + child.bitmap = this._windowskin; + } + this._setRectPartsGeometry(this._cursorSprite, srect, drect, m); +}; + +Window.prototype._setRectPartsGeometry = function(sprite, srect, drect, m) { + const sx = srect.x; + const sy = srect.y; + const sw = srect.width; + const sh = srect.height; + const dx = drect.x; + const dy = drect.y; + const dw = drect.width; + const dh = drect.height; + const smw = sw - m * 2; + const smh = sh - m * 2; + const dmw = dw - m * 2; + const dmh = dh - m * 2; + const children = sprite.children; + sprite.setFrame(0, 0, dw, dh); + sprite.move(dx, dy); + // corner + children[0].setFrame(sx, sy, m, m); + children[1].setFrame(sx + sw - m, sy, m, m); + children[2].setFrame(sx, sy + sw - m, m, m); + children[3].setFrame(sx + sw - m, sy + sw - m, m, m); + children[0].move(0, 0); + children[1].move(dw - m, 0); + children[2].move(0, dh - m); + children[3].move(dw - m, dh - m); + // edge + children[4].move(m, 0); + children[5].move(m, dh - m); + children[6].move(0, m); + children[7].move(dw - m, m); + children[4].setFrame(sx + m, sy, smw, m); + children[5].setFrame(sx + m, sy + sw - m, smw, m); + children[6].setFrame(sx, sy + m, m, smh); + children[7].setFrame(sx + sw - m, sy + m, m, smh); + children[4].scale.x = dmw / smw; + children[5].scale.x = dmw / smw; + children[6].scale.y = dmh / smh; + children[7].scale.y = dmh / smh; + // center + if (children[8]) { + children[8].setFrame(sx + m, sy + m, smw, smh); + children[8].move(m, m); + children[8].scale.x = dmw / smw; + children[8].scale.y = dmh / smh; + } + for (const child of children) { + child.visible = dw > 0 && dh > 0; + } +}; + +Window.prototype._refreshArrows = function() { + const w = this._width; + const h = this._height; + const p = 24; + const q = p / 2; + const sx = 96 + p; + const sy = 0 + p; + this._downArrowSprite.bitmap = this._windowskin; + this._downArrowSprite.anchor.x = 0.5; + this._downArrowSprite.anchor.y = 0.5; + this._downArrowSprite.setFrame(sx + q, sy + q + p, p, q); + this._downArrowSprite.move(w / 2, h - q); + this._upArrowSprite.bitmap = this._windowskin; + this._upArrowSprite.anchor.x = 0.5; + this._upArrowSprite.anchor.y = 0.5; + this._upArrowSprite.setFrame(sx + q, sy, p, q); + this._upArrowSprite.move(w / 2, q); +}; + +Window.prototype._refreshPauseSign = function() { + const sx = 144; + const sy = 96; + const p = 24; + this._pauseSignSprite.bitmap = this._windowskin; + this._pauseSignSprite.anchor.x = 0.5; + this._pauseSignSprite.anchor.y = 1; + this._pauseSignSprite.move(this._width / 2, this._height); + this._pauseSignSprite.setFrame(sx, sy, p, p); + this._pauseSignSprite.alpha = 0; +}; + +Window.prototype._updateClientArea = function() { + const pad = this._padding; + this._clientArea.move(pad, pad); + this._clientArea.x = pad - this.origin.x; + this._clientArea.y = pad - this.origin.y; + if (this.innerWidth > 0 && this.innerHeight > 0) { + this._clientArea.visible = this.isOpen(); + } else { + this._clientArea.visible = false; + } +}; + +Window.prototype._updateFrame = function() { + this._frameSprite.visible = this.frameVisible; +}; + +Window.prototype._updateContentsBack = function() { + const bitmap = this._contentsBackSprite.bitmap; + if (bitmap) { + this._contentsBackSprite.setFrame(0, 0, bitmap.width, bitmap.height); + } +}; + +Window.prototype._updateCursor = function() { + this._cursorSprite.alpha = this._makeCursorAlpha(); + this._cursorSprite.visible = this.isOpen() && this.cursorVisible; + this._cursorSprite.x = this._cursorRect.x; + this._cursorSprite.y = this._cursorRect.y; +}; + +Window.prototype._makeCursorAlpha = function() { + const blinkCount = this._animationCount % 40; + const baseAlpha = this.contentsOpacity / 255; + if (this.active) { + if (blinkCount < 20) { + return baseAlpha - blinkCount / 32; + } else { + return baseAlpha - (40 - blinkCount) / 32; + } + } + return baseAlpha; +}; + +Window.prototype._updateContents = function() { + const bitmap = this._contentsSprite.bitmap; + if (bitmap) { + this._contentsSprite.setFrame(0, 0, bitmap.width, bitmap.height); + } +}; + +Window.prototype._updateArrows = function() { + this._downArrowSprite.visible = this.isOpen() && this.downArrowVisible; + this._upArrowSprite.visible = this.isOpen() && this.upArrowVisible; +}; + +Window.prototype._updatePauseSign = function() { + const sprite = this._pauseSignSprite; + const x = Math.floor(this._animationCount / 16) % 2; + const y = Math.floor(this._animationCount / 16 / 2) % 2; + const sx = 144; + const sy = 96; + const p = 24; + if (!this.pause) { + sprite.alpha = 0; + } else if (sprite.alpha < 1) { + sprite.alpha = Math.min(sprite.alpha + 0.1, 1); + } + sprite.setFrame(sx + x * p, sy + y * p, p, p); + sprite.visible = this.isOpen(); +}; + +Window.prototype._updateFilterArea = function() { + const pos = this._clientArea.worldTransform.apply(new Point(0, 0)); + const filterArea = this._clientArea.filterArea; + filterArea.x = pos.x + this.origin.x; + filterArea.y = pos.y + this.origin.y; + filterArea.width = this.innerWidth; + filterArea.height = this.innerHeight; +}; + +//----------------------------------------------------------------------------- +/** + * The layer which contains game windows. + * + * @class + * @extends PIXI.Container + */ +function WindowLayer() { + this.initialize(...arguments); +} + +WindowLayer.prototype = Object.create(PIXI.Container.prototype); +WindowLayer.prototype.constructor = WindowLayer; + +WindowLayer.prototype.initialize = function() { + PIXI.Container.call(this); +}; + +/** + * Updates the window layer for each frame. + */ +WindowLayer.prototype.update = function() { + for (const child of this.children) { + if (child.update) { + child.update(); + } + } +}; + +/** + * Renders the object using the WebGL renderer. + * + * @param {PIXI.Renderer} renderer - The renderer. + */ +WindowLayer.prototype.render = function render(renderer) { + if (!this.visible) { + return; + } + + const graphics = new PIXI.Graphics(); + const gl = renderer.gl; + const children = this.children.clone(); + + renderer.framebuffer.forceStencil(); + graphics.transform = this.transform; + renderer.batch.flush(); + gl.enable(gl.STENCIL_TEST); + + while (children.length > 0) { + const win = children.pop(); + if (win._isWindow && win.visible && win.openness > 0) { + gl.stencilFunc(gl.EQUAL, 0, ~0); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); + win.render(renderer); + renderer.batch.flush(); + graphics.clear(); + win.drawShape(graphics); + gl.stencilFunc(gl.ALWAYS, 1, ~0); + gl.stencilOp(gl.REPLACE, gl.REPLACE, gl.REPLACE); + gl.blendFunc(gl.ZERO, gl.ONE); + graphics.render(renderer); + renderer.batch.flush(); + gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); + } + } + + gl.disable(gl.STENCIL_TEST); + gl.clear(gl.STENCIL_BUFFER_BIT); + gl.clearStencil(0); + renderer.batch.flush(); + + for (const child of this.children) { + if (!child._isWindow && child.visible) { + child.render(renderer); + } + } + + renderer.batch.flush(); +}; + +//----------------------------------------------------------------------------- +/** + * The weather effect which displays rain, storm, or snow. + * + * @class + * @extends PIXI.Container + */ +function Weather() { + this.initialize(...arguments); +} + +Weather.prototype = Object.create(PIXI.Container.prototype); +Weather.prototype.constructor = Weather; + +Weather.prototype.initialize = function() { + PIXI.Container.call(this); + + this._width = Graphics.width; + this._height = Graphics.height; + this._sprites = []; + + this._createBitmaps(); + this._createDimmer(); + + /** + * The type of the weather in ["none", "rain", "storm", "snow"]. + * + * @type string + */ + this.type = "none"; + + /** + * The power of the weather in the range (0, 9). + * + * @type number + */ + this.power = 0; + + /** + * The origin point of the weather for scrolling. + * + * @type Point + */ + this.origin = new Point(); +}; + +/** + * Destroys the weather. + */ +Weather.prototype.destroy = function() { + const options = { children: true, texture: true }; + PIXI.Container.prototype.destroy.call(this, options); + this._rainBitmap.destroy(); + this._stormBitmap.destroy(); + this._snowBitmap.destroy(); +}; + +/** + * Updates the weather for each frame. + */ +Weather.prototype.update = function() { + this._updateDimmer(); + this._updateAllSprites(); +}; + +Weather.prototype._createBitmaps = function() { + this._rainBitmap = new Bitmap(1, 60); + this._rainBitmap.fillAll("white"); + this._stormBitmap = new Bitmap(2, 100); + this._stormBitmap.fillAll("white"); + this._snowBitmap = new Bitmap(9, 9); + this._snowBitmap.drawCircle(4, 4, 4, "white"); +}; + +Weather.prototype._createDimmer = function() { + this._dimmerSprite = new ScreenSprite(); + this._dimmerSprite.setColor(80, 80, 80); + this.addChild(this._dimmerSprite); +}; + +Weather.prototype._updateDimmer = function() { + this._dimmerSprite.opacity = Math.floor(this.power * 6); +}; + +Weather.prototype._updateAllSprites = function() { + const maxSprites = Math.floor(this.power * 10); + while (this._sprites.length < maxSprites) { + this._addSprite(); + } + while (this._sprites.length > maxSprites) { + this._removeSprite(); + } + for (const sprite of this._sprites) { + this._updateSprite(sprite); + sprite.x = sprite.ax - this.origin.x; + sprite.y = sprite.ay - this.origin.y; + } +}; + +Weather.prototype._addSprite = function() { + const sprite = new Sprite(this.viewport); + sprite.opacity = 0; + this._sprites.push(sprite); + this.addChild(sprite); +}; + +Weather.prototype._removeSprite = function() { + this.removeChild(this._sprites.pop()); +}; + +Weather.prototype._updateSprite = function(sprite) { + switch (this.type) { + case "rain": + this._updateRainSprite(sprite); + break; + case "storm": + this._updateStormSprite(sprite); + break; + case "snow": + this._updateSnowSprite(sprite); + break; + } + if (sprite.opacity < 40) { + this._rebornSprite(sprite); + } +}; + +Weather.prototype._updateRainSprite = function(sprite) { + sprite.bitmap = this._rainBitmap; + sprite.rotation = Math.PI / 16; + sprite.ax -= 6 * Math.sin(sprite.rotation); + sprite.ay += 6 * Math.cos(sprite.rotation); + sprite.opacity -= 6; +}; + +Weather.prototype._updateStormSprite = function(sprite) { + sprite.bitmap = this._stormBitmap; + sprite.rotation = Math.PI / 8; + sprite.ax -= 8 * Math.sin(sprite.rotation); + sprite.ay += 8 * Math.cos(sprite.rotation); + sprite.opacity -= 8; +}; + +Weather.prototype._updateSnowSprite = function(sprite) { + sprite.bitmap = this._snowBitmap; + sprite.rotation = Math.PI / 16; + sprite.ax -= 3 * Math.sin(sprite.rotation); + sprite.ay += 3 * Math.cos(sprite.rotation); + sprite.opacity -= 3; +}; + +Weather.prototype._rebornSprite = function(sprite) { + sprite.ax = Math.randomInt(Graphics.width + 100) - 100 + this.origin.x; + sprite.ay = Math.randomInt(Graphics.height + 200) - 200 + this.origin.y; + sprite.opacity = 160 + Math.randomInt(60); +}; + +//----------------------------------------------------------------------------- +/** + * The color filter for WebGL. + * + * @class + * @extends PIXI.Filter + */ +function ColorFilter() { + this.initialize(...arguments); +} + +ColorFilter.prototype = Object.create(PIXI.Filter.prototype); +ColorFilter.prototype.constructor = ColorFilter; + +ColorFilter.prototype.initialize = function() { + PIXI.Filter.call(this, null, this._fragmentSrc()); + this.uniforms.hue = 0; + this.uniforms.colorTone = [0, 0, 0, 0]; + this.uniforms.blendColor = [0, 0, 0, 0]; + this.uniforms.brightness = 255; +}; + +/** + * Sets the hue rotation value. + * + * @param {number} hue - The hue value (-360, 360). + */ +ColorFilter.prototype.setHue = function(hue) { + this.uniforms.hue = Number(hue); +}; + +/** + * Sets the color tone. + * + * @param {array} tone - The color tone [r, g, b, gray]. + */ +ColorFilter.prototype.setColorTone = function(tone) { + if (!(tone instanceof Array)) { + throw new Error("Argument must be an array"); + } + this.uniforms.colorTone = tone.clone(); +}; + +/** + * Sets the blend color. + * + * @param {array} color - The blend color [r, g, b, a]. + */ +ColorFilter.prototype.setBlendColor = function(color) { + if (!(color instanceof Array)) { + throw new Error("Argument must be an array"); + } + this.uniforms.blendColor = color.clone(); +}; + +/** + * Sets the brightness. + * + * @param {number} brightness - The brightness (0 to 255). + */ +ColorFilter.prototype.setBrightness = function(brightness) { + this.uniforms.brightness = Number(brightness); +}; + +ColorFilter.prototype._fragmentSrc = function() { + const src = + "varying vec2 vTextureCoord;" + + "uniform sampler2D uSampler;" + + "uniform float hue;" + + "uniform vec4 colorTone;" + + "uniform vec4 blendColor;" + + "uniform float brightness;" + + "vec3 rgbToHsl(vec3 rgb) {" + + " float r = rgb.r;" + + " float g = rgb.g;" + + " float b = rgb.b;" + + " float cmin = min(r, min(g, b));" + + " float cmax = max(r, max(g, b));" + + " float h = 0.0;" + + " float s = 0.0;" + + " float l = (cmin + cmax) / 2.0;" + + " float delta = cmax - cmin;" + + " if (delta > 0.0) {" + + " if (r == cmax) {" + + " h = mod((g - b) / delta + 6.0, 6.0) / 6.0;" + + " } else if (g == cmax) {" + + " h = ((b - r) / delta + 2.0) / 6.0;" + + " } else {" + + " h = ((r - g) / delta + 4.0) / 6.0;" + + " }" + + " if (l < 1.0) {" + + " s = delta / (1.0 - abs(2.0 * l - 1.0));" + + " }" + + " }" + + " return vec3(h, s, l);" + + "}" + + "vec3 hslToRgb(vec3 hsl) {" + + " float h = hsl.x;" + + " float s = hsl.y;" + + " float l = hsl.z;" + + " float c = (1.0 - abs(2.0 * l - 1.0)) * s;" + + " float x = c * (1.0 - abs((mod(h * 6.0, 2.0)) - 1.0));" + + " float m = l - c / 2.0;" + + " float cm = c + m;" + + " float xm = x + m;" + + " if (h < 1.0 / 6.0) {" + + " return vec3(cm, xm, m);" + + " } else if (h < 2.0 / 6.0) {" + + " return vec3(xm, cm, m);" + + " } else if (h < 3.0 / 6.0) {" + + " return vec3(m, cm, xm);" + + " } else if (h < 4.0 / 6.0) {" + + " return vec3(m, xm, cm);" + + " } else if (h < 5.0 / 6.0) {" + + " return vec3(xm, m, cm);" + + " } else {" + + " return vec3(cm, m, xm);" + + " }" + + "}" + + "void main() {" + + " vec4 sample = texture2D(uSampler, vTextureCoord);" + + " float a = sample.a;" + + " vec3 hsl = rgbToHsl(sample.rgb);" + + " hsl.x = mod(hsl.x + hue / 360.0, 1.0);" + + " hsl.y = hsl.y * (1.0 - colorTone.a / 255.0);" + + " vec3 rgb = hslToRgb(hsl);" + + " float r = rgb.r;" + + " float g = rgb.g;" + + " float b = rgb.b;" + + " float r2 = colorTone.r / 255.0;" + + " float g2 = colorTone.g / 255.0;" + + " float b2 = colorTone.b / 255.0;" + + " float r3 = blendColor.r / 255.0;" + + " float g3 = blendColor.g / 255.0;" + + " float b3 = blendColor.b / 255.0;" + + " float i3 = blendColor.a / 255.0;" + + " float i1 = 1.0 - i3;" + + " r = clamp((r / a + r2) * a, 0.0, 1.0);" + + " g = clamp((g / a + g2) * a, 0.0, 1.0);" + + " b = clamp((b / a + b2) * a, 0.0, 1.0);" + + " r = clamp(r * i1 + r3 * i3 * a, 0.0, 1.0);" + + " g = clamp(g * i1 + g3 * i3 * a, 0.0, 1.0);" + + " b = clamp(b * i1 + b3 * i3 * a, 0.0, 1.0);" + + " r = r * brightness / 255.0;" + + " g = g * brightness / 255.0;" + + " b = b * brightness / 255.0;" + + " gl_FragColor = vec4(r, g, b, a);" + + "}"; + return src; +}; + +//----------------------------------------------------------------------------- +/** + * The root object of the display tree. + * + * @class + * @extends PIXI.Container + */ +function Stage() { + this.initialize(...arguments); +} + +Stage.prototype = Object.create(PIXI.Container.prototype); +Stage.prototype.constructor = Stage; + +Stage.prototype.initialize = function() { + PIXI.Container.call(this); +}; + +/** + * Destroys the stage. + */ +Stage.prototype.destroy = function() { + const options = { children: true, texture: true }; + PIXI.Container.prototype.destroy.call(this, options); +}; + +//----------------------------------------------------------------------------- +/** + * The audio object of Web Audio API. + * + * @class + * @param {string} url - The url of the audio file. + */ +function WebAudio() { + this.initialize(...arguments); +} + +WebAudio.prototype.initialize = function(url) { + this.clear(); + this._url = url; + this._startLoading(); +}; + +/** + * Initializes the audio system. + * + * @returns {boolean} True if the audio system is available. + */ +WebAudio.initialize = function() { + this._context = null; + this._masterGainNode = null; + this._masterVolume = 1; + this._createContext(); + this._createMasterGainNode(); + this._setupEventHandlers(); + return !!this._context; +}; + +/** + * Sets the master volume for all audio. + * + * @param {number} value - The master volume (0 to 1). + */ +WebAudio.setMasterVolume = function(value) { + this._masterVolume = value; + this._resetVolume(); +}; + +WebAudio._createContext = function() { + try { + const AudioContext = window.AudioContext || window.webkitAudioContext; + this._context = new AudioContext(); + } catch (e) { + this._context = null; + } +}; + +WebAudio._currentTime = function() { + return this._context ? this._context.currentTime : 0; +}; + +WebAudio._createMasterGainNode = function() { + const context = this._context; + if (context) { + this._masterGainNode = context.createGain(); + this._resetVolume(); + this._masterGainNode.connect(context.destination); + } +}; + +WebAudio._setupEventHandlers = function() { + const onUserGesture = this._onUserGesture.bind(this); + const onVisibilityChange = this._onVisibilityChange.bind(this); + document.addEventListener("keydown", onUserGesture); + document.addEventListener("mousedown", onUserGesture); + document.addEventListener("touchend", onUserGesture); + document.addEventListener("visibilitychange", onVisibilityChange); +}; + +WebAudio._onUserGesture = function() { + const context = this._context; + if (context && context.state === "suspended") { + context.resume(); + } +}; + +WebAudio._onVisibilityChange = function() { + if (document.visibilityState === "hidden") { + this._onHide(); + } else { + this._onShow(); + } +}; + +WebAudio._onHide = function() { + if (this._shouldMuteOnHide()) { + this._fadeOut(1); + } +}; + +WebAudio._onShow = function() { + if (this._shouldMuteOnHide()) { + this._fadeIn(1); + } +}; + +WebAudio._shouldMuteOnHide = function() { + return Utils.isMobileDevice() && !window.navigator.standalone; +}; + +WebAudio._resetVolume = function() { + if (this._masterGainNode) { + const gain = this._masterGainNode.gain; + const volume = this._masterVolume; + const currentTime = this._currentTime(); + gain.setValueAtTime(volume, currentTime); + } +}; + +WebAudio._fadeIn = function(duration) { + if (this._masterGainNode) { + const gain = this._masterGainNode.gain; + const volume = this._masterVolume; + const currentTime = this._currentTime(); + gain.setValueAtTime(0, currentTime); + gain.linearRampToValueAtTime(volume, currentTime + duration); + } +}; + +WebAudio._fadeOut = function(duration) { + if (this._masterGainNode) { + const gain = this._masterGainNode.gain; + const volume = this._masterVolume; + const currentTime = this._currentTime(); + gain.setValueAtTime(volume, currentTime); + gain.linearRampToValueAtTime(0, currentTime + duration); + } +}; + +/** + * Clears the audio data. + */ +WebAudio.prototype.clear = function() { + this.stop(); + this._data = null; + this._fetchedSize = 0; + this._fetchedData = []; + this._buffers = []; + this._sourceNodes = []; + this._gainNode = null; + this._pannerNode = null; + this._totalTime = 0; + this._sampleRate = 0; + this._loop = 0; + this._loopStart = 0; + this._loopLength = 0; + this._loopStartTime = 0; + this._loopLengthTime = 0; + this._startTime = 0; + this._volume = 1; + this._pitch = 1; + this._pan = 0; + this._endTimer = null; + this._loadListeners = []; + this._stopListeners = []; + this._lastUpdateTime = 0; + this._isLoaded = false; + this._isError = false; + this._isPlaying = false; + this._decoder = null; +}; + +/** + * The url of the audio file. + * + * @readonly + * @type string + * @name WebAudio#url + */ +Object.defineProperty(WebAudio.prototype, "url", { + get: function() { + return this._url; + }, + configurable: true +}); + +/** + * The volume of the audio. + * + * @type number + * @name WebAudio#volume + */ +Object.defineProperty(WebAudio.prototype, "volume", { + get: function() { + return this._volume; + }, + set: function(value) { + this._volume = value; + if (this._gainNode) { + this._gainNode.gain.setValueAtTime( + this._volume, + WebAudio._currentTime() + ); + } + }, + configurable: true +}); + +/** + * The pitch of the audio. + * + * @type number + * @name WebAudio#pitch + */ +Object.defineProperty(WebAudio.prototype, "pitch", { + get: function() { + return this._pitch; + }, + set: function(value) { + if (this._pitch !== value) { + this._pitch = value; + if (this.isPlaying()) { + this.play(this._loop, 0); + } + } + }, + configurable: true +}); + +/** + * The pan of the audio. + * + * @type number + * @name WebAudio#pan + */ +Object.defineProperty(WebAudio.prototype, "pan", { + get: function() { + return this._pan; + }, + set: function(value) { + this._pan = value; + this._updatePanner(); + }, + configurable: true +}); + +/** + * Checks whether the audio data is ready to play. + * + * @returns {boolean} True if the audio data is ready to play. + */ +WebAudio.prototype.isReady = function() { + return this._buffers && this._buffers.length > 0; +}; + +/** + * Checks whether a loading error has occurred. + * + * @returns {boolean} True if a loading error has occurred. + */ +WebAudio.prototype.isError = function() { + return this._isError; +}; + +/** + * Checks whether the audio is playing. + * + * @returns {boolean} True if the audio is playing. + */ +WebAudio.prototype.isPlaying = function() { + return this._isPlaying; +}; + +/** + * Plays the audio. + * + * @param {boolean} loop - Whether the audio data play in a loop. + * @param {number} offset - The start position to play in seconds. + */ +WebAudio.prototype.play = function(loop, offset) { + this._loop = loop; + if (this.isReady()) { + offset = offset || 0; + this._startPlaying(offset); + } else if (WebAudio._context) { + this.addLoadListener(() => this.play(loop, offset)); + } + this._isPlaying = true; +}; + +/** + * Stops the audio. + */ +WebAudio.prototype.stop = function() { + this._isPlaying = false; + this._removeEndTimer(); + this._removeNodes(); + this._loadListeners = []; + if (this._stopListeners) { + while (this._stopListeners.length > 0) { + const listner = this._stopListeners.shift(); + listner(); + } + } +}; + +/** + * Destroys the audio. + */ +WebAudio.prototype.destroy = function() { + this._destroyDecoder(); + this.clear(); +}; + +/** + * Performs the audio fade-in. + * + * @param {number} duration - Fade-in time in seconds. + */ +WebAudio.prototype.fadeIn = function(duration) { + if (this.isReady()) { + if (this._gainNode) { + const gain = this._gainNode.gain; + const currentTime = WebAudio._currentTime(); + gain.setValueAtTime(0, currentTime); + gain.linearRampToValueAtTime(this._volume, currentTime + duration); + } + } else { + this.addLoadListener(() => this.fadeIn(duration)); + } +}; + +/** + * Performs the audio fade-out. + * + * @param {number} duration - Fade-out time in seconds. + */ +WebAudio.prototype.fadeOut = function(duration) { + if (this._gainNode) { + const gain = this._gainNode.gain; + const currentTime = WebAudio._currentTime(); + gain.setValueAtTime(this._volume, currentTime); + gain.linearRampToValueAtTime(0, currentTime + duration); + } + this._isPlaying = false; + this._loadListeners = []; +}; + +/** + * Gets the seek position of the audio. + */ +WebAudio.prototype.seek = function() { + if (WebAudio._context) { + let pos = (WebAudio._currentTime() - this._startTime) * this._pitch; + if (this._loopLengthTime > 0) { + while (pos >= this._loopStartTime + this._loopLengthTime) { + pos -= this._loopLengthTime; + } + } + return pos; + } else { + return 0; + } +}; + +/** + * Adds a callback function that will be called when the audio data is loaded. + * + * @param {function} listner - The callback function. + */ +WebAudio.prototype.addLoadListener = function(listner) { + this._loadListeners.push(listner); +}; + +/** + * Adds a callback function that will be called when the playback is stopped. + * + * @param {function} listner - The callback function. + */ +WebAudio.prototype.addStopListener = function(listner) { + this._stopListeners.push(listner); +}; + +/** + * Tries to load the audio again. + */ +WebAudio.prototype.retry = function() { + this._startLoading(); + if (this._isPlaying) { + this.play(this._loop, 0); + } +}; + +WebAudio.prototype._startLoading = function() { + if (WebAudio._context) { + const url = this._realUrl(); + if (Utils.isLocal()) { + this._startXhrLoading(url); + } else { + this._startFetching(url); + } + const currentTime = WebAudio._currentTime(); + this._lastUpdateTime = currentTime - 0.5; + this._isError = false; + this._isLoaded = false; + this._destroyDecoder(); + if (this._shouldUseDecoder()) { + this._createDecoder(); + } + } +}; + +WebAudio.prototype._shouldUseDecoder = function() { + return !Utils.canPlayOgg() && typeof VorbisDecoder === "function"; +}; + +WebAudio.prototype._createDecoder = function() { + this._decoder = new VorbisDecoder( + WebAudio._context, + this._onDecode.bind(this), + this._onError.bind(this) + ); +}; + +WebAudio.prototype._destroyDecoder = function() { + if (this._decoder) { + this._decoder.destroy(); + this._decoder = null; + } +}; + +WebAudio.prototype._realUrl = function() { + return this._url + (Utils.hasEncryptedAudio() ? "_" : ""); +}; + +WebAudio.prototype._startXhrLoading = function(url) { + const xhr = new XMLHttpRequest(); + xhr.open("GET", url); + xhr.responseType = "arraybuffer"; + xhr.onload = () => this._onXhrLoad(xhr); + xhr.onerror = this._onError.bind(this); + xhr.send(); +}; + +WebAudio.prototype._startFetching = function(url) { + const options = { credentials: "same-origin" }; + fetch(url, options) + .then(response => this._onFetch(response)) + .catch(() => this._onError()); +}; + +WebAudio.prototype._onXhrLoad = function(xhr) { + if (xhr.status < 400) { + this._data = new Uint8Array(xhr.response); + this._isLoaded = true; + this._updateBuffer(); + } else { + this._onError(); + } +}; + +WebAudio.prototype._onFetch = function(response) { + if (response.ok) { + const reader = response.body.getReader(); + const readChunk = ({ done, value }) => { + if (done) { + this._isLoaded = true; + if (this._fetchedSize > 0) { + this._concatenateFetchedData(); + this._updateBuffer(); + this._data = null; + } + return 0; + } else { + this._onFetchProcess(value); + return reader.read().then(readChunk); + } + }; + reader + .read() + .then(readChunk) + .catch(() => this._onError()); + } else { + this._onError(); + } +}; + +WebAudio.prototype._onError = function() { + if (this._sourceNodes.length > 0) { + this._stopSourceNode(); + } + this._data = null; + this._isError = true; +}; + +WebAudio.prototype._onFetchProcess = function(value) { + this._fetchedSize += value.length; + this._fetchedData.push(value); + this._updateBufferOnFetch(); +}; + +WebAudio.prototype._updateBufferOnFetch = function() { + const currentTime = WebAudio._currentTime(); + const deltaTime = currentTime - this._lastUpdateTime; + const currentData = this._data; + const currentSize = currentData ? currentData.length : 0; + if (deltaTime >= 1 && currentSize + this._fetchedSize >= 200000) { + this._concatenateFetchedData(); + this._updateBuffer(); + this._lastUpdateTime = currentTime; + } +}; + +WebAudio.prototype._concatenateFetchedData = function() { + const currentData = this._data; + const currentSize = currentData ? currentData.length : 0; + const newData = new Uint8Array(currentSize + this._fetchedSize); + let pos = 0; + if (currentData) { + newData.set(currentData); + pos += currentSize; + } + for (const value of this._fetchedData) { + newData.set(value, pos); + pos += value.length; + } + this._data = newData; + this._fetchedData = []; + this._fetchedSize = 0; +}; + +WebAudio.prototype._updateBuffer = function() { + const arrayBuffer = this._readableBuffer(); + this._readLoopComments(arrayBuffer); + this._decodeAudioData(arrayBuffer); +}; + +WebAudio.prototype._readableBuffer = function() { + if (Utils.hasEncryptedAudio()) { + return Utils.decryptArrayBuffer(this._data.buffer); + } else { + return this._data.buffer; + } +}; + +WebAudio.prototype._decodeAudioData = function(arrayBuffer) { + if (this._shouldUseDecoder()) { + if (this._decoder) { + this._decoder.send(arrayBuffer, this._isLoaded); + } + } else { + // [Note] Make a temporary copy of arrayBuffer because + // decodeAudioData() detaches it. + WebAudio._context + .decodeAudioData(arrayBuffer.slice()) + .then(buffer => this._onDecode(buffer)) + .catch(() => this._onError()); + } +}; + +WebAudio.prototype._onDecode = function(buffer) { + if (!this._shouldUseDecoder()) { + this._buffers = []; + this._totalTime = 0; + } + this._buffers.push(buffer); + this._totalTime += buffer.duration; + if (this._loopLength > 0 && this._sampleRate > 0) { + this._loopStartTime = this._loopStart / this._sampleRate; + this._loopLengthTime = this._loopLength / this._sampleRate; + } else { + this._loopStartTime = 0; + this._loopLengthTime = this._totalTime; + } + if (this._sourceNodes.length > 0) { + this._refreshSourceNode(); + } + this._onLoad(); +}; + +WebAudio.prototype._refreshSourceNode = function() { + if (this._shouldUseDecoder()) { + const index = this._buffers.length - 1; + this._createSourceNode(index); + if (this._isPlaying) { + this._startSourceNode(index); + } + } else { + this._stopSourceNode(); + this._createAllSourceNodes(); + if (this._isPlaying) { + this._startAllSourceNodes(); + } + } + if (this._isPlaying) { + this._removeEndTimer(); + this._createEndTimer(); + } +}; + +WebAudio.prototype._startPlaying = function(offset) { + if (this._loopLengthTime > 0) { + while (offset >= this._loopStartTime + this._loopLengthTime) { + offset -= this._loopLengthTime; + } + } + this._startTime = WebAudio._currentTime() - offset / this._pitch; + this._removeEndTimer(); + this._removeNodes(); + this._createPannerNode(); + this._createGainNode(); + this._createAllSourceNodes(); + this._startAllSourceNodes(); + this._createEndTimer(); +}; + +WebAudio.prototype._startAllSourceNodes = function() { + for (let i = 0; i < this._sourceNodes.length; i++) { + this._startSourceNode(i); + } +}; + +WebAudio.prototype._startSourceNode = function(index) { + const sourceNode = this._sourceNodes[index]; + const seekPos = this.seek(); + const currentTime = WebAudio._currentTime(); + const loop = this._loop; + const loopStart = this._loopStartTime; + const loopLength = this._loopLengthTime; + const loopEnd = loopStart + loopLength; + const pitch = this._pitch; + let chunkStart = 0; + for (let i = 0; i < index; i++) { + chunkStart += this._buffers[i].duration; + } + const chunkEnd = chunkStart + sourceNode.buffer.duration; + let when = 0; + let offset = 0; + let duration = sourceNode.buffer.duration; + if (seekPos >= chunkStart && seekPos < chunkEnd - 0.01) { + when = currentTime; + offset = seekPos - chunkStart; + } else { + when = currentTime + (chunkStart - seekPos) / pitch; + offset = 0; + if (loop) { + if (when < currentTime - 0.01) { + when += loopLength / pitch; + } + if (seekPos >= loopStart && chunkStart < loopStart) { + when += (loopStart - chunkStart) / pitch; + offset = loopStart - chunkStart; + } + } + } + if (loop && loopEnd < chunkEnd) { + duration = loopEnd - chunkStart - offset; + } + if (this._shouldUseDecoder()) { + if (when >= currentTime && offset < duration) { + sourceNode.loop = false; + sourceNode.start(when, offset, duration); + if (loop && chunkEnd > loopStart) { + sourceNode.onended = () => { + this._createSourceNode(index); + this._startSourceNode(index); + }; + } + } + } else { + if (when >= currentTime && offset < sourceNode.buffer.duration) { + sourceNode.start(when, offset); + } + } + chunkStart += sourceNode.buffer.duration; +}; + +WebAudio.prototype._stopSourceNode = function() { + for (const sourceNode of this._sourceNodes) { + try { + sourceNode.onended = null; + sourceNode.stop(); + } catch (e) { + // Ignore InvalidStateError + } + } +}; + +WebAudio.prototype._createPannerNode = function() { + this._pannerNode = WebAudio._context.createPanner(); + this._pannerNode.panningModel = "equalpower"; + this._pannerNode.connect(WebAudio._masterGainNode); + this._updatePanner(); +}; + +WebAudio.prototype._createGainNode = function() { + const currentTime = WebAudio._currentTime(); + this._gainNode = WebAudio._context.createGain(); + this._gainNode.gain.setValueAtTime(this._volume, currentTime); + this._gainNode.connect(this._pannerNode); +}; + +WebAudio.prototype._createAllSourceNodes = function() { + for (let i = 0; i < this._buffers.length; i++) { + this._createSourceNode(i); + } +}; + +WebAudio.prototype._createSourceNode = function(index) { + const sourceNode = WebAudio._context.createBufferSource(); + const currentTime = WebAudio._currentTime(); + sourceNode.buffer = this._buffers[index]; + sourceNode.loop = this._loop && this._isLoaded; + sourceNode.loopStart = this._loopStartTime; + sourceNode.loopEnd = this._loopStartTime + this._loopLengthTime; + sourceNode.playbackRate.setValueAtTime(this._pitch, currentTime); + sourceNode.connect(this._gainNode); + this._sourceNodes[index] = sourceNode; +}; + +WebAudio.prototype._removeNodes = function() { + if (this._sourceNodes && this._sourceNodes.length > 0) { + this._stopSourceNode(); + this._sourceNodes = []; + this._gainNode = null; + this._pannerNode = null; + } +}; + +WebAudio.prototype._createEndTimer = function() { + if (this._sourceNodes.length > 0 && !this._loop) { + const endTime = this._startTime + this._totalTime / this._pitch; + const delay = endTime - WebAudio._currentTime(); + this._endTimer = setTimeout(this.stop.bind(this), delay * 1000); + } +}; + +WebAudio.prototype._removeEndTimer = function() { + if (this._endTimer) { + clearTimeout(this._endTimer); + this._endTimer = null; + } +}; + +WebAudio.prototype._updatePanner = function() { + if (this._pannerNode) { + const x = this._pan; + const z = 1 - Math.abs(x); + this._pannerNode.setPosition(x, 0, z); + } +}; + +WebAudio.prototype._onLoad = function() { + while (this._loadListeners.length > 0) { + const listner = this._loadListeners.shift(); + listner(); + } +}; + +WebAudio.prototype._readLoopComments = function(arrayBuffer) { + const view = new DataView(arrayBuffer); + let index = 0; + while (index < view.byteLength - 30) { + if (this._readFourCharacters(view, index) !== "OggS") { + break; + } + index += 26; + const numSegments = view.getUint8(index++); + const segments = []; + for (let i = 0; i < numSegments; i++) { + segments.push(view.getUint8(index++)); + } + const packets = []; + while (segments.length > 0) { + let packetSize = 0; + while (segments[0] === 255) { + packetSize += segments.shift(); + } + if (segments.length > 0) { + packetSize += segments.shift(); + } + packets.push(packetSize); + } + let vorbisHeaderFound = false; + for (const size of packets) { + if (this._readFourCharacters(view, index + 1) === "vorb") { + const headerType = view.getUint8(index); + if (headerType === 1) { + this._sampleRate = view.getUint32(index + 12, true); + } else if (headerType === 3) { + this._readMetaData(view, index, size); + } + vorbisHeaderFound = true; + } + index += size; + } + if (!vorbisHeaderFound) { + break; + } + } +}; + +WebAudio.prototype._readMetaData = function(view, index, size) { + for (let i = index; i < index + size - 10; i++) { + if (this._readFourCharacters(view, i) === "LOOP") { + let text = ""; + while (view.getUint8(i) > 0) { + text += String.fromCharCode(view.getUint8(i++)); + } + if (text.match(/LOOPSTART=([0-9]+)/)) { + this._loopStart = parseInt(RegExp.$1); + } + if (text.match(/LOOPLENGTH=([0-9]+)/)) { + this._loopLength = parseInt(RegExp.$1); + } + if (text === "LOOPSTART" || text === "LOOPLENGTH") { + let text2 = ""; + i += 16; + while (view.getUint8(i) > 0) { + text2 += String.fromCharCode(view.getUint8(i++)); + } + if (text === "LOOPSTART") { + this._loopStart = parseInt(text2); + } else { + this._loopLength = parseInt(text2); + } + } + } + } +}; + +WebAudio.prototype._readFourCharacters = function(view, index) { + let string = ""; + if (index <= view.byteLength - 4) { + for (let i = 0; i < 4; i++) { + string += String.fromCharCode(view.getUint8(index + i)); + } + } + return string; +}; + +//----------------------------------------------------------------------------- +/** + * The static class that handles video playback. + * + * @namespace + */ +function Video() { + throw new Error("This is a static class"); +} + +/** + * Initializes the video system. + * + * @param {number} width - The width of the video. + * @param {number} height - The height of the video. + */ +Video.initialize = function(width, height) { + this._element = null; + this._loading = false; + this._volume = 1; + this._createElement(); + this._setupEventHandlers(); + this.resize(width, height); +}; + +/** + * Changes the display size of the video. + * + * @param {number} width - The width of the video. + * @param {number} height - The height of the video. + */ +Video.resize = function(width, height) { + if (this._element) { + this._element.style.width = width + "px"; + this._element.style.height = height + "px"; + } +}; + +/** + * Starts playback of a video. + * + * @param {string} src - The url of the video. + */ +Video.play = function(src) { + this._element.src = src; + this._element.onloadeddata = this._onLoad.bind(this); + this._element.onerror = this._onError.bind(this); + this._element.onended = this._onEnd.bind(this); + this._element.load(); + this._loading = true; +}; + +/** + * Checks whether the video is playing. + * + * @returns {boolean} True if the video is playing. + */ +Video.isPlaying = function() { + return this._loading || this._isVisible(); +}; + +/** + * Sets the volume for videos. + * + * @param {number} volume - The volume for videos (0 to 1). + */ +Video.setVolume = function(volume) { + this._volume = volume; + if (this._element) { + this._element.volume = this._volume; + } +}; + +Video._createElement = function() { + this._element = document.createElement("video"); + this._element.id = "gameVideo"; + this._element.style.position = "absolute"; + this._element.style.margin = "auto"; + this._element.style.top = 0; + this._element.style.left = 0; + this._element.style.right = 0; + this._element.style.bottom = 0; + this._element.style.opacity = 0; + this._element.style.zIndex = 2; + this._element.setAttribute("playsinline", ""); + this._element.oncontextmenu = () => false; + document.body.appendChild(this._element); +}; + +Video._onLoad = function() { + this._element.volume = this._volume; + this._element.play(); + this._updateVisibility(true); + this._loading = false; +}; + +Video._onError = function() { + this._updateVisibility(false); + const retry = () => { + this._element.load(); + }; + throw ["LoadError", this._element.src, retry]; +}; + +Video._onEnd = function() { + this._updateVisibility(false); +}; + +Video._updateVisibility = function(videoVisible) { + if (videoVisible) { + Graphics.hideScreen(); + } else { + Graphics.showScreen(); + } + this._element.style.opacity = videoVisible ? 1 : 0; +}; + +Video._isVisible = function() { + return this._element.style.opacity > 0; +}; + +Video._setupEventHandlers = function() { + const onUserGesture = this._onUserGesture.bind(this); + document.addEventListener("keydown", onUserGesture); + document.addEventListener("mousedown", onUserGesture); + document.addEventListener("touchend", onUserGesture); +}; + +Video._onUserGesture = function() { + if (!this._element.src && this._element.paused) { + this._element.play().catch(() => 0); + } +}; + +//----------------------------------------------------------------------------- +/** + * The static class that handles input data from the keyboard and gamepads. + * + * @namespace + */ +function Input() { + throw new Error("This is a static class"); +} + +/** + * Initializes the input system. + */ +Input.initialize = function() { + this.clear(); + this._setupEventHandlers(); +}; + +/** + * The wait time of the key repeat in frames. + * + * @type number + */ +Input.keyRepeatWait = 24; + +/** + * The interval of the key repeat in frames. + * + * @type number + */ +Input.keyRepeatInterval = 6; + +/** + * A hash table to convert from a virtual key code to a mapped key name. + * + * @type Object + */ +Input.keyMapper = { + 9: "tab", // tab + 13: "ok", // enter + 16: "shift", // shift + 17: "control", // control + 18: "control", // alt + 27: "escape", // escape + 32: "ok", // space + 33: "pageup", // pageup + 34: "pagedown", // pagedown + 37: "left", // left arrow + 38: "up", // up arrow + 39: "right", // right arrow + 40: "down", // down arrow + 45: "escape", // insert + 81: "pageup", // Q + 87: "pagedown", // W + 88: "escape", // X + 90: "ok", // Z + 96: "escape", // numpad 0 + 98: "down", // numpad 2 + 100: "left", // numpad 4 + 102: "right", // numpad 6 + 104: "up", // numpad 8 + 120: "debug" // F9 +}; + +/** + * A hash table to convert from a gamepad button to a mapped key name. + * + * @type Object + */ +Input.gamepadMapper = { + 0: "ok", // A + 1: "cancel", // B + 2: "shift", // X + 3: "menu", // Y + 4: "pageup", // LB + 5: "pagedown", // RB + 12: "up", // D-pad up + 13: "down", // D-pad down + 14: "left", // D-pad left + 15: "right" // D-pad right +}; + +/** + * Clears all the input data. + */ +Input.clear = function() { + this._currentState = {}; + this._previousState = {}; + this._gamepadStates = []; + this._latestButton = null; + this._pressedTime = 0; + this._dir4 = 0; + this._dir8 = 0; + this._preferredAxis = ""; + this._date = 0; + this._virtualButton = null; +}; + +/** + * Updates the input data. + */ +Input.update = function() { + this._pollGamepads(); + if (this._currentState[this._latestButton]) { + this._pressedTime++; + } else { + this._latestButton = null; + } + for (const name in this._currentState) { + if (this._currentState[name] && !this._previousState[name]) { + this._latestButton = name; + this._pressedTime = 0; + this._date = Date.now(); + } + this._previousState[name] = this._currentState[name]; + } + if (this._virtualButton) { + this._latestButton = this._virtualButton; + this._pressedTime = 0; + this._virtualButton = null; + } + this._updateDirection(); +}; + +/** + * Checks whether a key is currently pressed down. + * + * @param {string} keyName - The mapped name of the key. + * @returns {boolean} True if the key is pressed. + */ +Input.isPressed = function(keyName) { + if (this._isEscapeCompatible(keyName) && this.isPressed("escape")) { + return true; + } else { + return !!this._currentState[keyName]; + } +}; + +/** + * Checks whether a key is just pressed. + * + * @param {string} keyName - The mapped name of the key. + * @returns {boolean} True if the key is triggered. + */ +Input.isTriggered = function(keyName) { + if (this._isEscapeCompatible(keyName) && this.isTriggered("escape")) { + return true; + } else { + return this._latestButton === keyName && this._pressedTime === 0; + } +}; + +/** + * Checks whether a key is just pressed or a key repeat occurred. + * + * @param {string} keyName - The mapped name of the key. + * @returns {boolean} True if the key is repeated. + */ +Input.isRepeated = function(keyName) { + if (this._isEscapeCompatible(keyName) && this.isRepeated("escape")) { + return true; + } else { + return ( + this._latestButton === keyName && + (this._pressedTime === 0 || + (this._pressedTime >= this.keyRepeatWait && + this._pressedTime % this.keyRepeatInterval === 0)) + ); + } +}; + +/** + * Checks whether a key is kept depressed. + * + * @param {string} keyName - The mapped name of the key. + * @returns {boolean} True if the key is long-pressed. + */ +Input.isLongPressed = function(keyName) { + if (this._isEscapeCompatible(keyName) && this.isLongPressed("escape")) { + return true; + } else { + return ( + this._latestButton === keyName && + this._pressedTime >= this.keyRepeatWait + ); + } +}; + +/** + * The four direction value as a number of the numpad, or 0 for neutral. + * + * @readonly + * @type number + * @name Input.dir4 + */ +Object.defineProperty(Input, "dir4", { + get: function() { + return this._dir4; + }, + configurable: true +}); + +/** + * The eight direction value as a number of the numpad, or 0 for neutral. + * + * @readonly + * @type number + * @name Input.dir8 + */ +Object.defineProperty(Input, "dir8", { + get: function() { + return this._dir8; + }, + configurable: true +}); + +/** + * The time of the last input in milliseconds. + * + * @readonly + * @type number + * @name Input.date + */ +Object.defineProperty(Input, "date", { + get: function() { + return this._date; + }, + configurable: true +}); + +Input.virtualClick = function(buttonName) { + this._virtualButton = buttonName; +}; + +Input._setupEventHandlers = function() { + document.addEventListener("keydown", this._onKeyDown.bind(this)); + document.addEventListener("keyup", this._onKeyUp.bind(this)); + window.addEventListener("blur", this._onLostFocus.bind(this)); +}; + +Input._onKeyDown = function(event) { + if (this._shouldPreventDefault(event.keyCode)) { + event.preventDefault(); + } + if (event.keyCode === 144) { + // Numlock + this.clear(); + } + const buttonName = this.keyMapper[event.keyCode]; + if (buttonName) { + this._currentState[buttonName] = true; + } +}; + +Input._shouldPreventDefault = function(keyCode) { + switch (keyCode) { + case 8: // backspace + case 9: // tab + case 33: // pageup + case 34: // pagedown + case 37: // left arrow + case 38: // up arrow + case 39: // right arrow + case 40: // down arrow + return true; + } + return false; +}; + +Input._onKeyUp = function(event) { + const buttonName = this.keyMapper[event.keyCode]; + if (buttonName) { + this._currentState[buttonName] = false; + } +}; + +Input._onLostFocus = function() { + this.clear(); +}; + +Input._pollGamepads = function() { + if (navigator.getGamepads) { + const gamepads = navigator.getGamepads(); + if (gamepads) { + for (const gamepad of gamepads) { + if (gamepad && gamepad.connected) { + this._updateGamepadState(gamepad); + } + } + } + } +}; + +Input._updateGamepadState = function(gamepad) { + const lastState = this._gamepadStates[gamepad.index] || []; + const newState = []; + const buttons = gamepad.buttons; + const axes = gamepad.axes; + const threshold = 0.5; + newState[12] = false; + newState[13] = false; + newState[14] = false; + newState[15] = false; + for (let i = 0; i < buttons.length; i++) { + newState[i] = buttons[i].pressed; + } + if (axes[1] < -threshold) { + newState[12] = true; // up + } else if (axes[1] > threshold) { + newState[13] = true; // down + } + if (axes[0] < -threshold) { + newState[14] = true; // left + } else if (axes[0] > threshold) { + newState[15] = true; // right + } + for (let j = 0; j < newState.length; j++) { + if (newState[j] !== lastState[j]) { + const buttonName = this.gamepadMapper[j]; + if (buttonName) { + this._currentState[buttonName] = newState[j]; + } + } + } + this._gamepadStates[gamepad.index] = newState; +}; + +Input._updateDirection = function() { + let x = this._signX(); + let y = this._signY(); + this._dir8 = this._makeNumpadDirection(x, y); + if (x !== 0 && y !== 0) { + if (this._preferredAxis === "x") { + y = 0; + } else { + x = 0; + } + } else if (x !== 0) { + this._preferredAxis = "y"; + } else if (y !== 0) { + this._preferredAxis = "x"; + } + this._dir4 = this._makeNumpadDirection(x, y); +}; + +Input._signX = function() { + const left = this.isPressed("left") ? 1 : 0; + const right = this.isPressed("right") ? 1 : 0; + return right - left; +}; + +Input._signY = function() { + const up = this.isPressed("up") ? 1 : 0; + const down = this.isPressed("down") ? 1 : 0; + return down - up; +}; + +Input._makeNumpadDirection = function(x, y) { + if (x === 0 && y === 0) { + return 0; + } else { + return 5 - y * 3 + x; + } +}; + +Input._isEscapeCompatible = function(keyName) { + return keyName === "cancel" || keyName === "menu"; +}; + +//----------------------------------------------------------------------------- +/** + * The static class that handles input data from the mouse and touchscreen. + * + * @namespace + */ +function TouchInput() { + throw new Error("This is a static class"); +} + +/** + * Initializes the touch system. + */ +TouchInput.initialize = function() { + this.clear(); + this._setupEventHandlers(); +}; + +/** + * The wait time of the pseudo key repeat in frames. + * + * @type number + */ +TouchInput.keyRepeatWait = 24; + +/** + * The interval of the pseudo key repeat in frames. + * + * @type number + */ +TouchInput.keyRepeatInterval = 6; + +/** + * The threshold number of pixels to treat as moved. + * + * @type number + */ +TouchInput.moveThreshold = 10; + +/** + * Clears all the touch data. + */ +TouchInput.clear = function() { + this._mousePressed = false; + this._screenPressed = false; + this._pressedTime = 0; + this._clicked = false; + this._newState = this._createNewState(); + this._currentState = this._createNewState(); + this._x = 0; + this._y = 0; + this._triggerX = 0; + this._triggerY = 0; + this._moved = false; + this._date = 0; +}; + +/** + * Updates the touch data. + */ +TouchInput.update = function() { + this._currentState = this._newState; + this._newState = this._createNewState(); + this._clicked = this._currentState.released && !this._moved; + if (this.isPressed()) { + this._pressedTime++; + } +}; + +/** + * Checks whether the mouse button or touchscreen has been pressed and + * released at the same position. + * + * @returns {boolean} True if the mouse button or touchscreen is clicked. + */ +TouchInput.isClicked = function() { + return this._clicked; +}; + +/** + * Checks whether the mouse button or touchscreen is currently pressed down. + * + * @returns {boolean} True if the mouse button or touchscreen is pressed. + */ +TouchInput.isPressed = function() { + return this._mousePressed || this._screenPressed; +}; + +/** + * Checks whether the left mouse button or touchscreen is just pressed. + * + * @returns {boolean} True if the mouse button or touchscreen is triggered. + */ +TouchInput.isTriggered = function() { + return this._currentState.triggered; +}; + +/** + * Checks whether the left mouse button or touchscreen is just pressed + * or a pseudo key repeat occurred. + * + * @returns {boolean} True if the mouse button or touchscreen is repeated. + */ +TouchInput.isRepeated = function() { + return ( + this.isPressed() && + (this._currentState.triggered || + (this._pressedTime >= this.keyRepeatWait && + this._pressedTime % this.keyRepeatInterval === 0)) + ); +}; + +/** + * Checks whether the left mouse button or touchscreen is kept depressed. + * + * @returns {boolean} True if the left mouse button or touchscreen is long-pressed. + */ +TouchInput.isLongPressed = function() { + return this.isPressed() && this._pressedTime >= this.keyRepeatWait; +}; + +/** + * Checks whether the right mouse button is just pressed. + * + * @returns {boolean} True if the right mouse button is just pressed. + */ +TouchInput.isCancelled = function() { + return this._currentState.cancelled; +}; + +/** + * Checks whether the mouse or a finger on the touchscreen is moved. + * + * @returns {boolean} True if the mouse or a finger on the touchscreen is moved. + */ +TouchInput.isMoved = function() { + return this._currentState.moved; +}; + +/** + * Checks whether the mouse is moved without pressing a button. + * + * @returns {boolean} True if the mouse is hovered. + */ +TouchInput.isHovered = function() { + return this._currentState.hovered; +}; + +/** + * Checks whether the left mouse button or touchscreen is released. + * + * @returns {boolean} True if the mouse button or touchscreen is released. + */ +TouchInput.isReleased = function() { + return this._currentState.released; +}; + +/** + * The horizontal scroll amount. + * + * @readonly + * @type number + * @name TouchInput.wheelX + */ +Object.defineProperty(TouchInput, "wheelX", { + get: function() { + return this._currentState.wheelX; + }, + configurable: true +}); + +/** + * The vertical scroll amount. + * + * @readonly + * @type number + * @name TouchInput.wheelY + */ +Object.defineProperty(TouchInput, "wheelY", { + get: function() { + return this._currentState.wheelY; + }, + configurable: true +}); + +/** + * The x coordinate on the canvas area of the latest touch event. + * + * @readonly + * @type number + * @name TouchInput.x + */ +Object.defineProperty(TouchInput, "x", { + get: function() { + return this._x; + }, + configurable: true +}); + +/** + * The y coordinate on the canvas area of the latest touch event. + * + * @readonly + * @type number + * @name TouchInput.y + */ +Object.defineProperty(TouchInput, "y", { + get: function() { + return this._y; + }, + configurable: true +}); + +/** + * The time of the last input in milliseconds. + * + * @readonly + * @type number + * @name TouchInput.date + */ +Object.defineProperty(TouchInput, "date", { + get: function() { + return this._date; + }, + configurable: true +}); + +TouchInput._createNewState = function() { + return { + triggered: false, + cancelled: false, + moved: false, + hovered: false, + released: false, + wheelX: 0, + wheelY: 0 + }; +}; + +TouchInput._setupEventHandlers = function() { + const pf = { passive: false }; + document.addEventListener("mousedown", this._onMouseDown.bind(this)); + document.addEventListener("mousemove", this._onMouseMove.bind(this)); + document.addEventListener("mouseup", this._onMouseUp.bind(this)); + document.addEventListener("wheel", this._onWheel.bind(this), pf); + document.addEventListener("touchstart", this._onTouchStart.bind(this), pf); + document.addEventListener("touchmove", this._onTouchMove.bind(this), pf); + document.addEventListener("touchend", this._onTouchEnd.bind(this)); + document.addEventListener("touchcancel", this._onTouchCancel.bind(this)); + window.addEventListener("blur", this._onLostFocus.bind(this)); +}; + +TouchInput._onMouseDown = function(event) { + if (event.button === 0) { + this._onLeftButtonDown(event); + } else if (event.button === 1) { + this._onMiddleButtonDown(event); + } else if (event.button === 2) { + this._onRightButtonDown(event); + } +}; + +TouchInput._onLeftButtonDown = function(event) { + const x = Graphics.pageToCanvasX(event.pageX); + const y = Graphics.pageToCanvasY(event.pageY); + if (Graphics.isInsideCanvas(x, y)) { + this._mousePressed = true; + this._pressedTime = 0; + this._onTrigger(x, y); + } +}; + +TouchInput._onMiddleButtonDown = function(/*event*/) { + // +}; + +TouchInput._onRightButtonDown = function(event) { + const x = Graphics.pageToCanvasX(event.pageX); + const y = Graphics.pageToCanvasY(event.pageY); + if (Graphics.isInsideCanvas(x, y)) { + this._onCancel(x, y); + } +}; + +TouchInput._onMouseMove = function(event) { + const x = Graphics.pageToCanvasX(event.pageX); + const y = Graphics.pageToCanvasY(event.pageY); + if (this._mousePressed) { + this._onMove(x, y); + } else if (Graphics.isInsideCanvas(x, y)) { + this._onHover(x, y); + } +}; + +TouchInput._onMouseUp = function(event) { + if (event.button === 0) { + const x = Graphics.pageToCanvasX(event.pageX); + const y = Graphics.pageToCanvasY(event.pageY); + this._mousePressed = false; + this._onRelease(x, y); + } +}; + +TouchInput._onWheel = function(event) { + this._newState.wheelX += event.deltaX; + this._newState.wheelY += event.deltaY; + event.preventDefault(); +}; + +TouchInput._onTouchStart = function(event) { + for (const touch of event.changedTouches) { + const x = Graphics.pageToCanvasX(touch.pageX); + const y = Graphics.pageToCanvasY(touch.pageY); + if (Graphics.isInsideCanvas(x, y)) { + this._screenPressed = true; + this._pressedTime = 0; + if (event.touches.length >= 2) { + this._onCancel(x, y); + } else { + this._onTrigger(x, y); + } + event.preventDefault(); + } + } + if (window.cordova || window.navigator.standalone) { + event.preventDefault(); + } +}; + +TouchInput._onTouchMove = function(event) { + for (const touch of event.changedTouches) { + const x = Graphics.pageToCanvasX(touch.pageX); + const y = Graphics.pageToCanvasY(touch.pageY); + this._onMove(x, y); + } +}; + +TouchInput._onTouchEnd = function(event) { + for (const touch of event.changedTouches) { + const x = Graphics.pageToCanvasX(touch.pageX); + const y = Graphics.pageToCanvasY(touch.pageY); + this._screenPressed = false; + this._onRelease(x, y); + } +}; + +TouchInput._onTouchCancel = function(/*event*/) { + this._screenPressed = false; +}; + +TouchInput._onLostFocus = function() { + this.clear(); +}; + +TouchInput._onTrigger = function(x, y) { + this._newState.triggered = true; + this._x = x; + this._y = y; + this._triggerX = x; + this._triggerY = y; + this._moved = false; + this._date = Date.now(); +}; + +TouchInput._onCancel = function(x, y) { + this._newState.cancelled = true; + this._x = x; + this._y = y; +}; + +TouchInput._onMove = function(x, y) { + const dx = Math.abs(x - this._triggerX); + const dy = Math.abs(y - this._triggerY); + if (dx > this.moveThreshold || dy > this.moveThreshold) { + this._moved = true; + } + if (this._moved) { + this._newState.moved = true; + this._x = x; + this._y = y; + } +}; + +TouchInput._onHover = function(x, y) { + this._newState.hovered = true; + this._x = x; + this._y = y; +}; + +TouchInput._onRelease = function(x, y) { + this._newState.released = true; + this._x = x; + this._y = y; +}; + +//----------------------------------------------------------------------------- +/** + * The static class that handles JSON with object information. + * + * @namespace + */ +function JsonEx() { + throw new Error("This is a static class"); +} + +/** + * The maximum depth of objects. + * + * @type number + * @default 100 + */ +JsonEx.maxDepth = 100; + +/** + * Converts an object to a JSON string with object information. + * + * @param {object} object - The object to be converted. + * @returns {string} The JSON string. + */ +JsonEx.stringify = function(object) { + return JSON.stringify(this._encode(object, 0)); +}; + +/** + * Parses a JSON string and reconstructs the corresponding object. + * + * @param {string} json - The JSON string. + * @returns {object} The reconstructed object. + */ +JsonEx.parse = function(json) { + return this._decode(JSON.parse(json)); +}; + +/** + * Makes a deep copy of the specified object. + * + * @param {object} object - The object to be copied. + * @returns {object} The copied object. + */ +JsonEx.makeDeepCopy = function(object) { + return this.parse(this.stringify(object)); +}; + +JsonEx._encode = function(value, depth) { + // [Note] The handling code for circular references in certain versions of + // MV has been removed because it was too complicated and expensive. + if (depth >= this.maxDepth) { + throw new Error("Object too deep"); + } + const type = Object.prototype.toString.call(value); + if (type === "[object Object]" || type === "[object Array]") { + const constructorName = value.constructor.name; + if (constructorName !== "Object" && constructorName !== "Array") { + value["@"] = constructorName; + } + for (const key of Object.keys(value)) { + value[key] = this._encode(value[key], depth + 1); + } + } + return value; +}; + +JsonEx._decode = function(value) { + const type = Object.prototype.toString.call(value); + if (type === "[object Object]" || type === "[object Array]") { + if (value["@"]) { + const constructor = window[value["@"]]; + if (constructor) { + Object.setPrototypeOf(value, constructor.prototype); + } + } + for (const key of Object.keys(value)) { + value[key] = this._decode(value[key]); + } + } + return value; +}; + +//----------------------------------------------------------------------------- diff --git a/js/rmmz_managers.js b/js/rmmz_managers.js new file mode 100644 index 0000000..5385c7b --- /dev/null +++ b/js/rmmz_managers.js @@ -0,0 +1,3116 @@ +//============================================================================= +// rmmz_managers.js v1.4.4 +//============================================================================= + +//----------------------------------------------------------------------------- +// DataManager +// +// The static class that manages the database and game objects. + +function DataManager() { + throw new Error("This is a static class"); +} + +$dataActors = null; +$dataClasses = null; +$dataSkills = null; +$dataItems = null; +$dataWeapons = null; +$dataArmors = null; +$dataEnemies = null; +$dataTroops = null; +$dataStates = null; +$dataAnimations = null; +$dataTilesets = null; +$dataCommonEvents = null; +$dataSystem = null; +$dataMapInfos = null; +$dataMap = null; +$gameTemp = null; +$gameSystem = null; +$gameScreen = null; +$gameTimer = null; +$gameMessage = null; +$gameSwitches = null; +$gameVariables = null; +$gameSelfSwitches = null; +$gameActors = null; +$gameParty = null; +$gameTroop = null; +$gameMap = null; +$gamePlayer = null; +$testEvent = null; + +DataManager._globalInfo = null; +DataManager._errors = []; + +DataManager._databaseFiles = [ + { name: "$dataActors", src: "Actors.json" }, + { name: "$dataClasses", src: "Classes.json" }, + { name: "$dataSkills", src: "Skills.json" }, + { name: "$dataItems", src: "Items.json" }, + { name: "$dataWeapons", src: "Weapons.json" }, + { name: "$dataArmors", src: "Armors.json" }, + { name: "$dataEnemies", src: "Enemies.json" }, + { name: "$dataTroops", src: "Troops.json" }, + { name: "$dataStates", src: "States.json" }, + { name: "$dataAnimations", src: "Animations.json" }, + { name: "$dataTilesets", src: "Tilesets.json" }, + { name: "$dataCommonEvents", src: "CommonEvents.json" }, + { name: "$dataSystem", src: "System.json" }, + { name: "$dataMapInfos", src: "MapInfos.json" } +]; + +DataManager.loadGlobalInfo = function() { + StorageManager.loadObject("global") + .then(globalInfo => { + this._globalInfo = globalInfo; + this.removeInvalidGlobalInfo(); + return 0; + }) + .catch(() => { + this._globalInfo = []; + }); +}; + +DataManager.removeInvalidGlobalInfo = function() { + const globalInfo = this._globalInfo; + for (const info of globalInfo) { + const savefileId = globalInfo.indexOf(info); + if (!this.savefileExists(savefileId)) { + delete globalInfo[savefileId]; + } + } +}; + +DataManager.saveGlobalInfo = function() { + StorageManager.saveObject("global", this._globalInfo); +}; + +DataManager.isGlobalInfoLoaded = function() { + return !!this._globalInfo; +}; + +DataManager.loadDatabase = function() { + const test = this.isBattleTest() || this.isEventTest(); + const prefix = test ? "Test_" : ""; + for (const databaseFile of this._databaseFiles) { + this.loadDataFile(databaseFile.name, prefix + databaseFile.src); + } + if (this.isEventTest()) { + this.loadDataFile("$testEvent", prefix + "Event.json"); + } +}; + +DataManager.loadDataFile = function(name, src) { + const xhr = new XMLHttpRequest(); + const url = "data/" + src; + window[name] = null; + xhr.open("GET", url); + xhr.overrideMimeType("application/json"); + xhr.onload = () => this.onXhrLoad(xhr, name, src, url); + xhr.onerror = () => this.onXhrError(name, src, url); + xhr.send(); +}; + +DataManager.onXhrLoad = function(xhr, name, src, url) { + if (xhr.status < 400) { + window[name] = JSON.parse(xhr.responseText); + this.onLoad(window[name]); + } else { + this.onXhrError(name, src, url); + } +}; + +DataManager.onXhrError = function(name, src, url) { + const error = { name: name, src: src, url: url }; + this._errors.push(error); +}; + +DataManager.isDatabaseLoaded = function() { + this.checkError(); + for (const databaseFile of this._databaseFiles) { + if (!window[databaseFile.name]) { + return false; + } + } + return true; +}; + +DataManager.loadMapData = function(mapId) { + if (mapId > 0) { + const filename = "Map%1.json".format(mapId.padZero(3)); + this.loadDataFile("$dataMap", filename); + } else { + this.makeEmptyMap(); + } +}; + +DataManager.makeEmptyMap = function() { + $dataMap = {}; + $dataMap.data = []; + $dataMap.events = []; + $dataMap.width = 100; + $dataMap.height = 100; + $dataMap.scrollType = 3; +}; + +DataManager.isMapLoaded = function() { + this.checkError(); + return !!$dataMap; +}; + +DataManager.onLoad = function(object) { + if (this.isMapObject(object)) { + this.extractMetadata(object); + this.extractArrayMetadata(object.events); + } else { + this.extractArrayMetadata(object); + } +}; + +DataManager.isMapObject = function(object) { + return !!(object.data && object.events); +}; + +DataManager.extractArrayMetadata = function(array) { + if (Array.isArray(array)) { + for (const data of array) { + if (data && "note" in data) { + this.extractMetadata(data); + } + } + } +}; + +DataManager.extractMetadata = function(data) { + const regExp = /<([^<>:]+)(:?)([^>]*)>/g; + data.meta = {}; + for (;;) { + const match = regExp.exec(data.note); + if (match) { + if (match[2] === ":") { + data.meta[match[1]] = match[3]; + } else { + data.meta[match[1]] = true; + } + } else { + break; + } + } +}; + +DataManager.checkError = function() { + if (this._errors.length > 0) { + const error = this._errors.shift(); + const retry = () => { + this.loadDataFile(error.name, error.src); + }; + throw ["LoadError", error.url, retry]; + } +}; + +DataManager.isBattleTest = function() { + return Utils.isOptionValid("btest"); +}; + +DataManager.isEventTest = function() { + return Utils.isOptionValid("etest"); +}; + +DataManager.isSkill = function(item) { + return item && $dataSkills.includes(item); +}; + +DataManager.isItem = function(item) { + return item && $dataItems.includes(item); +}; + +DataManager.isWeapon = function(item) { + return item && $dataWeapons.includes(item); +}; + +DataManager.isArmor = function(item) { + return item && $dataArmors.includes(item); +}; + +DataManager.createGameObjects = function() { + $gameTemp = new Game_Temp(); + $gameSystem = new Game_System(); + $gameScreen = new Game_Screen(); + $gameTimer = new Game_Timer(); + $gameMessage = new Game_Message(); + $gameSwitches = new Game_Switches(); + $gameVariables = new Game_Variables(); + $gameSelfSwitches = new Game_SelfSwitches(); + $gameActors = new Game_Actors(); + $gameParty = new Game_Party(); + $gameTroop = new Game_Troop(); + $gameMap = new Game_Map(); + $gamePlayer = new Game_Player(); +}; + +DataManager.setupNewGame = function() { + this.createGameObjects(); + this.selectSavefileForNewGame(); + $gameParty.setupStartingMembers(); + $gamePlayer.setupForNewGame(); + Graphics.frameCount = 0; +}; + +DataManager.setupBattleTest = function() { + this.createGameObjects(); + $gameParty.setupBattleTest(); + BattleManager.setup($dataSystem.testTroopId, true, false); + BattleManager.setBattleTest(true); + BattleManager.playBattleBgm(); +}; + +DataManager.setupEventTest = function() { + this.createGameObjects(); + this.selectSavefileForNewGame(); + $gameParty.setupStartingMembers(); + $gamePlayer.reserveTransfer(-1, 8, 6); + $gamePlayer.setTransparent(false); +}; + +DataManager.isAnySavefileExists = function() { + return this._globalInfo.some(x => x); +}; + +DataManager.latestSavefileId = function() { + const globalInfo = this._globalInfo; + const validInfo = globalInfo.slice(1).filter(x => x); + const latest = Math.max(...validInfo.map(x => x.timestamp)); + const index = globalInfo.findIndex(x => x && x.timestamp === latest); + return index > 0 ? index : 0; +}; + +DataManager.earliestSavefileId = function() { + const globalInfo = this._globalInfo; + const validInfo = globalInfo.slice(1).filter(x => x); + const earliest = Math.min(...validInfo.map(x => x.timestamp)); + const index = globalInfo.findIndex(x => x && x.timestamp === earliest); + return index > 0 ? index : 0; +}; + +DataManager.emptySavefileId = function() { + const globalInfo = this._globalInfo; + const maxSavefiles = this.maxSavefiles(); + if (globalInfo.length < maxSavefiles) { + return Math.max(1, globalInfo.length); + } else { + const index = globalInfo.slice(1).findIndex(x => !x); + return index >= 0 ? index + 1 : -1; + } +}; + +DataManager.loadAllSavefileImages = function() { + for (const info of this._globalInfo.filter(x => x)) { + this.loadSavefileImages(info); + } +}; + +DataManager.loadSavefileImages = function(info) { + if (info.characters && Symbol.iterator in info.characters) { + for (const character of info.characters) { + ImageManager.loadCharacter(character[0]); + } + } + if (info.faces && Symbol.iterator in info.faces) { + for (const face of info.faces) { + ImageManager.loadFace(face[0]); + } + } +}; + +DataManager.maxSavefiles = function() { + return 20; +}; + +DataManager.savefileInfo = function(savefileId) { + const globalInfo = this._globalInfo; + return globalInfo[savefileId] ? globalInfo[savefileId] : null; +}; + +DataManager.savefileExists = function(savefileId) { + const saveName = this.makeSavename(savefileId); + return StorageManager.exists(saveName); +}; + +DataManager.saveGame = function(savefileId) { + const contents = this.makeSaveContents(); + const saveName = this.makeSavename(savefileId); + return StorageManager.saveObject(saveName, contents).then(() => { + this._globalInfo[savefileId] = this.makeSavefileInfo(); + this.saveGlobalInfo(); + return 0; + }); +}; + +DataManager.loadGame = function(savefileId) { + const saveName = this.makeSavename(savefileId); + return StorageManager.loadObject(saveName).then(contents => { + this.createGameObjects(); + this.extractSaveContents(contents); + this.correctDataErrors(); + return 0; + }); +}; + +DataManager.makeSavename = function(savefileId) { + return "file%1".format(savefileId); +}; + +DataManager.selectSavefileForNewGame = function() { + const emptySavefileId = this.emptySavefileId(); + const earliestSavefileId = this.earliestSavefileId(); + if (emptySavefileId > 0) { + $gameSystem.setSavefileId(emptySavefileId); + } else { + $gameSystem.setSavefileId(earliestSavefileId); + } +}; + +DataManager.makeSavefileInfo = function() { + const info = {}; + info.title = $dataSystem.gameTitle; + info.characters = $gameParty.charactersForSavefile(); + info.faces = $gameParty.facesForSavefile(); + info.playtime = $gameSystem.playtimeText(); + info.timestamp = Date.now(); + return info; +}; + +DataManager.makeSaveContents = function() { + // A save data does not contain $gameTemp, $gameMessage, and $gameTroop. + const contents = {}; + contents.system = $gameSystem; + contents.screen = $gameScreen; + contents.timer = $gameTimer; + contents.switches = $gameSwitches; + contents.variables = $gameVariables; + contents.selfSwitches = $gameSelfSwitches; + contents.actors = $gameActors; + contents.party = $gameParty; + contents.map = $gameMap; + contents.player = $gamePlayer; + return contents; +}; + +DataManager.extractSaveContents = function(contents) { + $gameSystem = contents.system; + $gameScreen = contents.screen; + $gameTimer = contents.timer; + $gameSwitches = contents.switches; + $gameVariables = contents.variables; + $gameSelfSwitches = contents.selfSwitches; + $gameActors = contents.actors; + $gameParty = contents.party; + $gameMap = contents.map; + $gamePlayer = contents.player; +}; + +DataManager.correctDataErrors = function() { + $gameParty.removeInvalidMembers(); +}; + +//----------------------------------------------------------------------------- +// ConfigManager +// +// The static class that manages the configuration data. + +function ConfigManager() { + throw new Error("This is a static class"); +} + +ConfigManager.alwaysDash = false; +ConfigManager.commandRemember = false; +ConfigManager.touchUI = true; +ConfigManager._isLoaded = false; + +Object.defineProperty(ConfigManager, "bgmVolume", { + get: function() { + return AudioManager._bgmVolume; + }, + set: function(value) { + AudioManager.bgmVolume = value; + }, + configurable: true +}); + +Object.defineProperty(ConfigManager, "bgsVolume", { + get: function() { + return AudioManager.bgsVolume; + }, + set: function(value) { + AudioManager.bgsVolume = value; + }, + configurable: true +}); + +Object.defineProperty(ConfigManager, "meVolume", { + get: function() { + return AudioManager.meVolume; + }, + set: function(value) { + AudioManager.meVolume = value; + }, + configurable: true +}); + +Object.defineProperty(ConfigManager, "seVolume", { + get: function() { + return AudioManager.seVolume; + }, + set: function(value) { + AudioManager.seVolume = value; + }, + configurable: true +}); + +ConfigManager.load = function() { + StorageManager.loadObject("config") + .then(config => this.applyData(config || {})) + .catch(() => 0) + .then(() => { + this._isLoaded = true; + return 0; + }) + .catch(() => 0); +}; + +ConfigManager.save = function() { + StorageManager.saveObject("config", this.makeData()); +}; + +ConfigManager.isLoaded = function() { + return this._isLoaded; +}; + +ConfigManager.makeData = function() { + const config = {}; + config.alwaysDash = this.alwaysDash; + config.commandRemember = this.commandRemember; + config.touchUI = this.touchUI; + config.bgmVolume = this.bgmVolume; + config.bgsVolume = this.bgsVolume; + config.meVolume = this.meVolume; + config.seVolume = this.seVolume; + return config; +}; + +ConfigManager.applyData = function(config) { + this.alwaysDash = this.readFlag(config, "alwaysDash", false); + this.commandRemember = this.readFlag(config, "commandRemember", false); + this.touchUI = this.readFlag(config, "touchUI", true); + this.bgmVolume = this.readVolume(config, "bgmVolume"); + this.bgsVolume = this.readVolume(config, "bgsVolume"); + this.meVolume = this.readVolume(config, "meVolume"); + this.seVolume = this.readVolume(config, "seVolume"); +}; + +ConfigManager.readFlag = function(config, name, defaultValue) { + if (name in config) { + return !!config[name]; + } else { + return defaultValue; + } +}; + +ConfigManager.readVolume = function(config, name) { + if (name in config) { + return Number(config[name]).clamp(0, 100); + } else { + return 100; + } +}; + +//----------------------------------------------------------------------------- +// StorageManager +// +// The static class that manages storage for saving game data. + +function StorageManager() { + throw new Error("This is a static class"); +} + +StorageManager._forageKeys = []; +StorageManager._forageKeysUpdated = false; + +StorageManager.isLocalMode = function() { + return Utils.isNwjs(); +}; + +StorageManager.saveObject = function(saveName, object) { + return this.objectToJson(object) + .then(json => this.jsonToZip(json)) + .then(zip => this.saveZip(saveName, zip)); +}; + +StorageManager.loadObject = function(saveName) { + return this.loadZip(saveName) + .then(zip => this.zipToJson(zip)) + .then(json => this.jsonToObject(json)); +}; + +StorageManager.objectToJson = function(object) { + return new Promise((resolve, reject) => { + try { + const json = JsonEx.stringify(object); + resolve(json); + } catch (e) { + reject(e); + } + }); +}; + +StorageManager.jsonToObject = function(json) { + return new Promise((resolve, reject) => { + try { + const object = JsonEx.parse(json); + resolve(object); + } catch (e) { + reject(e); + } + }); +}; + +StorageManager.jsonToZip = function(json) { + return new Promise((resolve, reject) => { + try { + const zip = pako.deflate(json, { to: "string", level: 1 }); + if (zip.length >= 50000) { + console.warn("Save data is too big."); + } + resolve(zip); + } catch (e) { + reject(e); + } + }); +}; + +StorageManager.zipToJson = function(zip) { + return new Promise((resolve, reject) => { + try { + if (zip) { + const json = pako.inflate(zip, { to: "string" }); + resolve(json); + } else { + resolve("null"); + } + } catch (e) { + reject(e); + } + }); +}; + +StorageManager.saveZip = function(saveName, zip) { + if (this.isLocalMode()) { + return this.saveToLocalFile(saveName, zip); + } else { + return this.saveToForage(saveName, zip); + } +}; + +StorageManager.loadZip = function(saveName) { + if (this.isLocalMode()) { + return this.loadFromLocalFile(saveName); + } else { + return this.loadFromForage(saveName); + } +}; + +StorageManager.exists = function(saveName) { + if (this.isLocalMode()) { + return this.localFileExists(saveName); + } else { + return this.forageExists(saveName); + } +}; + +StorageManager.remove = function(saveName) { + if (this.isLocalMode()) { + return this.removeLocalFile(saveName); + } else { + return this.removeForage(saveName); + } +}; + +StorageManager.saveToLocalFile = function(saveName, zip) { + const dirPath = this.fileDirectoryPath(); + const filePath = this.filePath(saveName); + const backupFilePath = filePath + "_"; + return new Promise((resolve, reject) => { + this.fsMkdir(dirPath); + this.fsUnlink(backupFilePath); + this.fsRename(filePath, backupFilePath); + try { + this.fsWriteFile(filePath, zip); + this.fsUnlink(backupFilePath); + resolve(); + } catch (e) { + try { + this.fsUnlink(filePath); + this.fsRename(backupFilePath, filePath); + } catch (e2) { + // + } + reject(e); + } + }); +}; + +StorageManager.loadFromLocalFile = function(saveName) { + const filePath = this.filePath(saveName); + return new Promise((resolve, reject) => { + const data = this.fsReadFile(filePath); + if (data) { + resolve(data); + } else { + reject(new Error("Savefile not found")); + } + }); +}; + +StorageManager.localFileExists = function(saveName) { + const fs = require("fs"); + return fs.existsSync(this.filePath(saveName)); +}; + +StorageManager.removeLocalFile = function(saveName) { + this.fsUnlink(this.filePath(saveName)); +}; + +StorageManager.saveToForage = function(saveName, zip) { + const key = this.forageKey(saveName); + const testKey = this.forageTestKey(); + setTimeout(() => localforage.removeItem(testKey)); + return localforage + .setItem(testKey, zip) + .then(() => localforage.setItem(key, zip)) + .then(() => this.updateForageKeys()); +}; + +StorageManager.loadFromForage = function(saveName) { + const key = this.forageKey(saveName); + return localforage.getItem(key); +}; + +StorageManager.forageExists = function(saveName) { + const key = this.forageKey(saveName); + return this._forageKeys.includes(key); +}; + +StorageManager.removeForage = function(saveName) { + const key = this.forageKey(saveName); + return localforage.removeItem(key).then(() => this.updateForageKeys()); +}; + +StorageManager.updateForageKeys = function() { + this._forageKeysUpdated = false; + return localforage.keys().then(keys => { + this._forageKeys = keys; + this._forageKeysUpdated = true; + return 0; + }); +}; + +StorageManager.forageKeysUpdated = function() { + return this._forageKeysUpdated; +}; + +StorageManager.fsMkdir = function(path) { + const fs = require("fs"); + if (!fs.existsSync(path)) { + fs.mkdirSync(path); + } +}; + +StorageManager.fsRename = function(oldPath, newPath) { + const fs = require("fs"); + if (fs.existsSync(oldPath)) { + fs.renameSync(oldPath, newPath); + } +}; + +StorageManager.fsUnlink = function(path) { + const fs = require("fs"); + if (fs.existsSync(path)) { + fs.unlinkSync(path); + } +}; + +StorageManager.fsReadFile = function(path) { + const fs = require("fs"); + if (fs.existsSync(path)) { + return fs.readFileSync(path, { encoding: "utf8" }); + } else { + return null; + } +}; + +StorageManager.fsWriteFile = function(path, data) { + const fs = require("fs"); + fs.writeFileSync(path, data); +}; + +StorageManager.fileDirectoryPath = function() { + const path = require("path"); + const base = path.dirname(process.mainModule.filename); + return path.join(base, "save/"); +}; + +StorageManager.filePath = function(saveName) { + const dir = this.fileDirectoryPath(); + return dir + saveName + ".rmmzsave"; +}; + +StorageManager.forageKey = function(saveName) { + const gameId = $dataSystem.advanced.gameId; + return "rmmzsave." + gameId + "." + saveName; +}; + +StorageManager.forageTestKey = function() { + return "rmmzsave.test"; +}; + +//----------------------------------------------------------------------------- +// FontManager +// +// The static class that loads font files. + +function FontManager() { + throw new Error("This is a static class"); +} + +FontManager._urls = {}; +FontManager._states = {}; + +FontManager.load = function(family, filename) { + if (this._states[family] !== "loaded") { + if (filename) { + const url = this.makeUrl(filename); + this.startLoading(family, url); + } else { + this._urls[family] = ""; + this._states[family] = "loaded"; + } + } +}; + +FontManager.isReady = function() { + for (const family in this._states) { + const state = this._states[family]; + if (state === "loading") { + return false; + } + if (state === "error") { + this.throwLoadError(family); + } + } + return true; +}; + +FontManager.startLoading = function(family, url) { + const source = "url(" + url + ")"; + const font = new FontFace(family, source); + this._urls[family] = url; + this._states[family] = "loading"; + font.load() + .then(() => { + document.fonts.add(font); + this._states[family] = "loaded"; + return 0; + }) + .catch(() => { + this._states[family] = "error"; + }); +}; + +FontManager.throwLoadError = function(family) { + const url = this._urls[family]; + const retry = () => this.startLoading(family, url); + throw ["LoadError", url, retry]; +}; + +FontManager.makeUrl = function(filename) { + return "fonts/" + Utils.encodeURI(filename); +}; + +//----------------------------------------------------------------------------- +// ImageManager +// +// The static class that loads images, creates bitmap objects and retains them. + +function ImageManager() { + throw new Error("This is a static class"); +} + +ImageManager.iconWidth = 32; +ImageManager.iconHeight = 32; +ImageManager.faceWidth = 144; +ImageManager.faceHeight = 144; + +ImageManager._cache = {}; +ImageManager._system = {}; +ImageManager._emptyBitmap = new Bitmap(1, 1); + +ImageManager.loadAnimation = function(filename) { + return this.loadBitmap("img/animations/", filename); +}; + +ImageManager.loadBattleback1 = function(filename) { + return this.loadBitmap("img/battlebacks1/", filename); +}; + +ImageManager.loadBattleback2 = function(filename) { + return this.loadBitmap("img/battlebacks2/", filename); +}; + +ImageManager.loadEnemy = function(filename) { + return this.loadBitmap("img/enemies/", filename); +}; + +ImageManager.loadCharacter = function(filename) { + return this.loadBitmap("img/characters/", filename); +}; + +ImageManager.loadFace = function(filename) { + return this.loadBitmap("img/faces/", filename); +}; + +ImageManager.loadParallax = function(filename) { + return this.loadBitmap("img/parallaxes/", filename); +}; + +ImageManager.loadPicture = function(filename) { + return this.loadBitmap("img/pictures/", filename); +}; + +ImageManager.loadSvActor = function(filename) { + return this.loadBitmap("img/sv_actors/", filename); +}; + +ImageManager.loadSvEnemy = function(filename) { + return this.loadBitmap("img/sv_enemies/", filename); +}; + +ImageManager.loadSystem = function(filename) { + return this.loadBitmap("img/system/", filename); +}; + +ImageManager.loadTileset = function(filename) { + return this.loadBitmap("img/tilesets/", filename); +}; + +ImageManager.loadTitle1 = function(filename) { + return this.loadBitmap("img/titles1/", filename); +}; + +ImageManager.loadTitle2 = function(filename) { + return this.loadBitmap("img/titles2/", filename); +}; + +ImageManager.loadBitmap = function(folder, filename) { + if (filename) { + const url = folder + Utils.encodeURI(filename) + ".png"; + return this.loadBitmapFromUrl(url); + } else { + return this._emptyBitmap; + } +}; + +ImageManager.loadBitmapFromUrl = function(url) { + const cache = url.includes("/system/") ? this._system : this._cache; + if (!cache[url]) { + cache[url] = Bitmap.load(url); + } + return cache[url]; +}; + +ImageManager.clear = function() { + const cache = this._cache; + for (const url in cache) { + cache[url].destroy(); + } + this._cache = {}; +}; + +ImageManager.isReady = function() { + for (const cache of [this._cache, this._system]) { + for (const url in cache) { + const bitmap = cache[url]; + if (bitmap.isError()) { + this.throwLoadError(bitmap); + } + if (!bitmap.isReady()) { + return false; + } + } + } + return true; +}; + +ImageManager.throwLoadError = function(bitmap) { + const retry = bitmap.retry.bind(bitmap); + throw ["LoadError", bitmap.url, retry]; +}; + +ImageManager.isObjectCharacter = function(filename) { + const sign = Utils.extractFileName(filename).match(/^[!$]+/); + return sign && sign[0].includes("!"); +}; + +ImageManager.isBigCharacter = function(filename) { + const sign = Utils.extractFileName(filename).match(/^[!$]+/); + return sign && sign[0].includes("$"); +}; + +ImageManager.isZeroParallax = function(filename) { + return Utils.extractFileName(filename).charAt(0) === "!"; +}; + +//----------------------------------------------------------------------------- +// EffectManager +// +// The static class that loads Effekseer effects. + +function EffectManager() { + throw new Error("This is a static class"); +} + +EffectManager._cache = {}; +EffectManager._errorUrls = []; + +EffectManager.load = function(filename) { + if (filename) { + const url = this.makeUrl(filename); + const cache = this._cache; + if (!cache[url] && Graphics.effekseer) { + this.startLoading(url); + } + return cache[url]; + } else { + return null; + } +}; + +EffectManager.startLoading = function(url) { + const onLoad = () => this.onLoad(url); + const onError = (message, url) => this.onError(url); + const effect = Graphics.effekseer.loadEffect(url, 1, onLoad, onError); + this._cache[url] = effect; + return effect; +}; + +EffectManager.clear = function() { + for (const url in this._cache) { + const effect = this._cache[url]; + Graphics.effekseer.releaseEffect(effect); + } + this._cache = {}; +}; + +EffectManager.onLoad = function(/*url*/) { + // +}; + +EffectManager.onError = function(url) { + this._errorUrls.push(url); +}; + +EffectManager.makeUrl = function(filename) { + return "effects/" + Utils.encodeURI(filename) + ".efkefc"; +}; + +EffectManager.checkErrors = function() { + const url = this._errorUrls.shift(); + if (url) { + this.throwLoadError(url); + } +}; + +EffectManager.throwLoadError = function(url) { + const retry = () => this.startLoading(url); + throw ["LoadError", url, retry]; +}; + +EffectManager.isReady = function() { + this.checkErrors(); + for (const url in this._cache) { + const effect = this._cache[url]; + if (!effect.isLoaded) { + return false; + } + } + return true; +}; + +//----------------------------------------------------------------------------- +// AudioManager +// +// The static class that handles BGM, BGS, ME and SE. + +function AudioManager() { + throw new Error("This is a static class"); +} + +AudioManager._bgmVolume = 100; +AudioManager._bgsVolume = 100; +AudioManager._meVolume = 100; +AudioManager._seVolume = 100; +AudioManager._currentBgm = null; +AudioManager._currentBgs = null; +AudioManager._bgmBuffer = null; +AudioManager._bgsBuffer = null; +AudioManager._meBuffer = null; +AudioManager._seBuffers = []; +AudioManager._staticBuffers = []; +AudioManager._replayFadeTime = 0.5; +AudioManager._path = "audio/"; + +Object.defineProperty(AudioManager, "bgmVolume", { + get: function() { + return this._bgmVolume; + }, + set: function(value) { + this._bgmVolume = value; + this.updateBgmParameters(this._currentBgm); + }, + configurable: true +}); + +Object.defineProperty(AudioManager, "bgsVolume", { + get: function() { + return this._bgsVolume; + }, + set: function(value) { + this._bgsVolume = value; + this.updateBgsParameters(this._currentBgs); + }, + configurable: true +}); + +Object.defineProperty(AudioManager, "meVolume", { + get: function() { + return this._meVolume; + }, + set: function(value) { + this._meVolume = value; + this.updateMeParameters(this._currentMe); + }, + configurable: true +}); + +Object.defineProperty(AudioManager, "seVolume", { + get: function() { + return this._seVolume; + }, + set: function(value) { + this._seVolume = value; + }, + configurable: true +}); + +AudioManager.playBgm = function(bgm, pos) { + if (this.isCurrentBgm(bgm)) { + this.updateBgmParameters(bgm); + } else { + this.stopBgm(); + if (bgm.name) { + this._bgmBuffer = this.createBuffer("bgm/", bgm.name); + this.updateBgmParameters(bgm); + if (!this._meBuffer) { + this._bgmBuffer.play(true, pos || 0); + } + } + } + this.updateCurrentBgm(bgm, pos); +}; + +AudioManager.replayBgm = function(bgm) { + if (this.isCurrentBgm(bgm)) { + this.updateBgmParameters(bgm); + } else { + this.playBgm(bgm, bgm.pos); + if (this._bgmBuffer) { + this._bgmBuffer.fadeIn(this._replayFadeTime); + } + } +}; + +AudioManager.isCurrentBgm = function(bgm) { + return ( + this._currentBgm && + this._bgmBuffer && + this._currentBgm.name === bgm.name + ); +}; + +AudioManager.updateBgmParameters = function(bgm) { + this.updateBufferParameters(this._bgmBuffer, this._bgmVolume, bgm); +}; + +AudioManager.updateCurrentBgm = function(bgm, pos) { + this._currentBgm = { + name: bgm.name, + volume: bgm.volume, + pitch: bgm.pitch, + pan: bgm.pan, + pos: pos + }; +}; + +AudioManager.stopBgm = function() { + if (this._bgmBuffer) { + this._bgmBuffer.destroy(); + this._bgmBuffer = null; + this._currentBgm = null; + } +}; + +AudioManager.fadeOutBgm = function(duration) { + if (this._bgmBuffer && this._currentBgm) { + this._bgmBuffer.fadeOut(duration); + this._currentBgm = null; + } +}; + +AudioManager.fadeInBgm = function(duration) { + if (this._bgmBuffer && this._currentBgm) { + this._bgmBuffer.fadeIn(duration); + } +}; + +AudioManager.playBgs = function(bgs, pos) { + if (this.isCurrentBgs(bgs)) { + this.updateBgsParameters(bgs); + } else { + this.stopBgs(); + if (bgs.name) { + this._bgsBuffer = this.createBuffer("bgs/", bgs.name); + this.updateBgsParameters(bgs); + this._bgsBuffer.play(true, pos || 0); + } + } + this.updateCurrentBgs(bgs, pos); +}; + +AudioManager.replayBgs = function(bgs) { + if (this.isCurrentBgs(bgs)) { + this.updateBgsParameters(bgs); + } else { + this.playBgs(bgs, bgs.pos); + if (this._bgsBuffer) { + this._bgsBuffer.fadeIn(this._replayFadeTime); + } + } +}; + +AudioManager.isCurrentBgs = function(bgs) { + return ( + this._currentBgs && + this._bgsBuffer && + this._currentBgs.name === bgs.name + ); +}; + +AudioManager.updateBgsParameters = function(bgs) { + this.updateBufferParameters(this._bgsBuffer, this._bgsVolume, bgs); +}; + +AudioManager.updateCurrentBgs = function(bgs, pos) { + this._currentBgs = { + name: bgs.name, + volume: bgs.volume, + pitch: bgs.pitch, + pan: bgs.pan, + pos: pos + }; +}; + +AudioManager.stopBgs = function() { + if (this._bgsBuffer) { + this._bgsBuffer.destroy(); + this._bgsBuffer = null; + this._currentBgs = null; + } +}; + +AudioManager.fadeOutBgs = function(duration) { + if (this._bgsBuffer && this._currentBgs) { + this._bgsBuffer.fadeOut(duration); + this._currentBgs = null; + } +}; + +AudioManager.fadeInBgs = function(duration) { + if (this._bgsBuffer && this._currentBgs) { + this._bgsBuffer.fadeIn(duration); + } +}; + +AudioManager.playMe = function(me) { + this.stopMe(); + if (me.name) { + if (this._bgmBuffer && this._currentBgm) { + this._currentBgm.pos = this._bgmBuffer.seek(); + this._bgmBuffer.stop(); + } + this._meBuffer = this.createBuffer("me/", me.name); + this.updateMeParameters(me); + this._meBuffer.play(false); + this._meBuffer.addStopListener(this.stopMe.bind(this)); + } +}; + +AudioManager.updateMeParameters = function(me) { + this.updateBufferParameters(this._meBuffer, this._meVolume, me); +}; + +AudioManager.fadeOutMe = function(duration) { + if (this._meBuffer) { + this._meBuffer.fadeOut(duration); + } +}; + +AudioManager.stopMe = function() { + if (this._meBuffer) { + this._meBuffer.destroy(); + this._meBuffer = null; + if ( + this._bgmBuffer && + this._currentBgm && + !this._bgmBuffer.isPlaying() + ) { + this._bgmBuffer.play(true, this._currentBgm.pos); + this._bgmBuffer.fadeIn(this._replayFadeTime); + } + } +}; + +AudioManager.playSe = function(se) { + if (se.name) { + // [Note] Do not play the same sound in the same frame. + const latestBuffers = this._seBuffers.filter( + buffer => buffer.frameCount === Graphics.frameCount + ); + if (latestBuffers.find(buffer => buffer.name === se.name)) { + return; + } + const buffer = this.createBuffer("se/", se.name); + this.updateSeParameters(buffer, se); + buffer.play(false); + this._seBuffers.push(buffer); + this.cleanupSe(); + } +}; + +AudioManager.updateSeParameters = function(buffer, se) { + this.updateBufferParameters(buffer, this._seVolume, se); +}; + +AudioManager.cleanupSe = function() { + for (const buffer of this._seBuffers) { + if (!buffer.isPlaying()) { + buffer.destroy(); + } + } + this._seBuffers = this._seBuffers.filter(buffer => buffer.isPlaying()); +}; + +AudioManager.stopSe = function() { + for (const buffer of this._seBuffers) { + buffer.destroy(); + } + this._seBuffers = []; +}; + +AudioManager.playStaticSe = function(se) { + if (se.name) { + this.loadStaticSe(se); + for (const buffer of this._staticBuffers) { + if (buffer.name === se.name) { + buffer.stop(); + this.updateSeParameters(buffer, se); + buffer.play(false); + break; + } + } + } +}; + +AudioManager.loadStaticSe = function(se) { + if (se.name && !this.isStaticSe(se)) { + const buffer = this.createBuffer("se/", se.name); + this._staticBuffers.push(buffer); + } +}; + +AudioManager.isStaticSe = function(se) { + for (const buffer of this._staticBuffers) { + if (buffer.name === se.name) { + return true; + } + } + return false; +}; + +AudioManager.stopAll = function() { + this.stopMe(); + this.stopBgm(); + this.stopBgs(); + this.stopSe(); +}; + +AudioManager.saveBgm = function() { + if (this._currentBgm) { + const bgm = this._currentBgm; + return { + name: bgm.name, + volume: bgm.volume, + pitch: bgm.pitch, + pan: bgm.pan, + pos: this._bgmBuffer ? this._bgmBuffer.seek() : 0 + }; + } else { + return this.makeEmptyAudioObject(); + } +}; + +AudioManager.saveBgs = function() { + if (this._currentBgs) { + const bgs = this._currentBgs; + return { + name: bgs.name, + volume: bgs.volume, + pitch: bgs.pitch, + pan: bgs.pan, + pos: this._bgsBuffer ? this._bgsBuffer.seek() : 0 + }; + } else { + return this.makeEmptyAudioObject(); + } +}; + +AudioManager.makeEmptyAudioObject = function() { + return { name: "", volume: 0, pitch: 0 }; +}; + +AudioManager.createBuffer = function(folder, name) { + const ext = this.audioFileExt(); + const url = this._path + folder + Utils.encodeURI(name) + ext; + const buffer = new WebAudio(url); + buffer.name = name; + buffer.frameCount = Graphics.frameCount; + return buffer; +}; + +AudioManager.updateBufferParameters = function(buffer, configVolume, audio) { + if (buffer && audio) { + buffer.volume = (configVolume * (audio.volume || 0)) / 10000; + buffer.pitch = (audio.pitch || 0) / 100; + buffer.pan = (audio.pan || 0) / 100; + } +}; + +AudioManager.audioFileExt = function() { + return ".ogg"; +}; + +AudioManager.checkErrors = function() { + const buffers = [this._bgmBuffer, this._bgsBuffer, this._meBuffer]; + buffers.push(...this._seBuffers); + buffers.push(...this._staticBuffers); + for (const buffer of buffers) { + if (buffer && buffer.isError()) { + this.throwLoadError(buffer); + } + } +}; + +AudioManager.throwLoadError = function(webAudio) { + const retry = webAudio.retry.bind(webAudio); + throw ["LoadError", webAudio.url, retry]; +}; + +//----------------------------------------------------------------------------- +// SoundManager +// +// The static class that plays sound effects defined in the database. + +function SoundManager() { + throw new Error("This is a static class"); +} + +SoundManager.preloadImportantSounds = function() { + this.loadSystemSound(0); + this.loadSystemSound(1); + this.loadSystemSound(2); + this.loadSystemSound(3); +}; + +SoundManager.loadSystemSound = function(n) { + if ($dataSystem) { + AudioManager.loadStaticSe($dataSystem.sounds[n]); + } +}; + +SoundManager.playSystemSound = function(n) { + if ($dataSystem) { + AudioManager.playStaticSe($dataSystem.sounds[n]); + } +}; + +SoundManager.playCursor = function() { + this.playSystemSound(0); +}; + +SoundManager.playOk = function() { + this.playSystemSound(1); +}; + +SoundManager.playCancel = function() { + this.playSystemSound(2); +}; + +SoundManager.playBuzzer = function() { + this.playSystemSound(3); +}; + +SoundManager.playEquip = function() { + this.playSystemSound(4); +}; + +SoundManager.playSave = function() { + this.playSystemSound(5); +}; + +SoundManager.playLoad = function() { + this.playSystemSound(6); +}; + +SoundManager.playBattleStart = function() { + this.playSystemSound(7); +}; + +SoundManager.playEscape = function() { + this.playSystemSound(8); +}; + +SoundManager.playEnemyAttack = function() { + this.playSystemSound(9); +}; + +SoundManager.playEnemyDamage = function() { + this.playSystemSound(10); +}; + +SoundManager.playEnemyCollapse = function() { + this.playSystemSound(11); +}; + +SoundManager.playBossCollapse1 = function() { + this.playSystemSound(12); +}; + +SoundManager.playBossCollapse2 = function() { + this.playSystemSound(13); +}; + +SoundManager.playActorDamage = function() { + this.playSystemSound(14); +}; + +SoundManager.playActorCollapse = function() { + this.playSystemSound(15); +}; + +SoundManager.playRecovery = function() { + this.playSystemSound(16); +}; + +SoundManager.playMiss = function() { + this.playSystemSound(17); +}; + +SoundManager.playEvasion = function() { + this.playSystemSound(18); +}; + +SoundManager.playMagicEvasion = function() { + this.playSystemSound(19); +}; + +SoundManager.playReflection = function() { + this.playSystemSound(20); +}; + +SoundManager.playShop = function() { + this.playSystemSound(21); +}; + +SoundManager.playUseItem = function() { + this.playSystemSound(22); +}; + +SoundManager.playUseSkill = function() { + this.playSystemSound(23); +}; + +//----------------------------------------------------------------------------- +// TextManager +// +// The static class that handles terms and messages. + +function TextManager() { + throw new Error("This is a static class"); +} + +TextManager.basic = function(basicId) { + return $dataSystem.terms.basic[basicId] || ""; +}; + +TextManager.param = function(paramId) { + return $dataSystem.terms.params[paramId] || ""; +}; + +TextManager.command = function(commandId) { + return $dataSystem.terms.commands[commandId] || ""; +}; + +TextManager.message = function(messageId) { + return $dataSystem.terms.messages[messageId] || ""; +}; + +TextManager.getter = function(method, param) { + return { + get: function() { + return this[method](param); + }, + configurable: true + }; +}; + +Object.defineProperty(TextManager, "currencyUnit", { + get: function() { + return $dataSystem.currencyUnit; + }, + configurable: true +}); + +Object.defineProperties(TextManager, { + level: TextManager.getter("basic", 0), + levelA: TextManager.getter("basic", 1), + hp: TextManager.getter("basic", 2), + hpA: TextManager.getter("basic", 3), + mp: TextManager.getter("basic", 4), + mpA: TextManager.getter("basic", 5), + tp: TextManager.getter("basic", 6), + tpA: TextManager.getter("basic", 7), + exp: TextManager.getter("basic", 8), + expA: TextManager.getter("basic", 9), + fight: TextManager.getter("command", 0), + escape: TextManager.getter("command", 1), + attack: TextManager.getter("command", 2), + guard: TextManager.getter("command", 3), + item: TextManager.getter("command", 4), + skill: TextManager.getter("command", 5), + equip: TextManager.getter("command", 6), + status: TextManager.getter("command", 7), + formation: TextManager.getter("command", 8), + save: TextManager.getter("command", 9), + gameEnd: TextManager.getter("command", 10), + options: TextManager.getter("command", 11), + weapon: TextManager.getter("command", 12), + armor: TextManager.getter("command", 13), + keyItem: TextManager.getter("command", 14), + equip2: TextManager.getter("command", 15), + optimize: TextManager.getter("command", 16), + clear: TextManager.getter("command", 17), + newGame: TextManager.getter("command", 18), + continue_: TextManager.getter("command", 19), + toTitle: TextManager.getter("command", 21), + cancel: TextManager.getter("command", 22), + buy: TextManager.getter("command", 24), + sell: TextManager.getter("command", 25), + alwaysDash: TextManager.getter("message", "alwaysDash"), + commandRemember: TextManager.getter("message", "commandRemember"), + touchUI: TextManager.getter("message", "touchUI"), + bgmVolume: TextManager.getter("message", "bgmVolume"), + bgsVolume: TextManager.getter("message", "bgsVolume"), + meVolume: TextManager.getter("message", "meVolume"), + seVolume: TextManager.getter("message", "seVolume"), + possession: TextManager.getter("message", "possession"), + expTotal: TextManager.getter("message", "expTotal"), + expNext: TextManager.getter("message", "expNext"), + saveMessage: TextManager.getter("message", "saveMessage"), + loadMessage: TextManager.getter("message", "loadMessage"), + file: TextManager.getter("message", "file"), + autosave: TextManager.getter("message", "autosave"), + partyName: TextManager.getter("message", "partyName"), + emerge: TextManager.getter("message", "emerge"), + preemptive: TextManager.getter("message", "preemptive"), + surprise: TextManager.getter("message", "surprise"), + escapeStart: TextManager.getter("message", "escapeStart"), + escapeFailure: TextManager.getter("message", "escapeFailure"), + victory: TextManager.getter("message", "victory"), + defeat: TextManager.getter("message", "defeat"), + obtainExp: TextManager.getter("message", "obtainExp"), + obtainGold: TextManager.getter("message", "obtainGold"), + obtainItem: TextManager.getter("message", "obtainItem"), + levelUp: TextManager.getter("message", "levelUp"), + obtainSkill: TextManager.getter("message", "obtainSkill"), + useItem: TextManager.getter("message", "useItem"), + criticalToEnemy: TextManager.getter("message", "criticalToEnemy"), + criticalToActor: TextManager.getter("message", "criticalToActor"), + actorDamage: TextManager.getter("message", "actorDamage"), + actorRecovery: TextManager.getter("message", "actorRecovery"), + actorGain: TextManager.getter("message", "actorGain"), + actorLoss: TextManager.getter("message", "actorLoss"), + actorDrain: TextManager.getter("message", "actorDrain"), + actorNoDamage: TextManager.getter("message", "actorNoDamage"), + actorNoHit: TextManager.getter("message", "actorNoHit"), + enemyDamage: TextManager.getter("message", "enemyDamage"), + enemyRecovery: TextManager.getter("message", "enemyRecovery"), + enemyGain: TextManager.getter("message", "enemyGain"), + enemyLoss: TextManager.getter("message", "enemyLoss"), + enemyDrain: TextManager.getter("message", "enemyDrain"), + enemyNoDamage: TextManager.getter("message", "enemyNoDamage"), + enemyNoHit: TextManager.getter("message", "enemyNoHit"), + evasion: TextManager.getter("message", "evasion"), + magicEvasion: TextManager.getter("message", "magicEvasion"), + magicReflection: TextManager.getter("message", "magicReflection"), + counterAttack: TextManager.getter("message", "counterAttack"), + substitute: TextManager.getter("message", "substitute"), + buffAdd: TextManager.getter("message", "buffAdd"), + debuffAdd: TextManager.getter("message", "debuffAdd"), + buffRemove: TextManager.getter("message", "buffRemove"), + actionFailure: TextManager.getter("message", "actionFailure") +}); + +//----------------------------------------------------------------------------- +// ColorManager +// +// The static class that handles the window colors. + +function ColorManager() { + throw new Error("This is a static class"); +} + +ColorManager.loadWindowskin = function() { + this._windowskin = ImageManager.loadSystem("Window"); +}; + +ColorManager.textColor = function(n) { + const px = 96 + (n % 8) * 12 + 6; + const py = 144 + Math.floor(n / 8) * 12 + 6; + return this._windowskin.getPixel(px, py); +}; + +ColorManager.normalColor = function() { + return this.textColor(0); +}; + +ColorManager.systemColor = function() { + return this.textColor(16); +}; + +ColorManager.crisisColor = function() { + return this.textColor(17); +}; + +ColorManager.deathColor = function() { + return this.textColor(18); +}; + +ColorManager.gaugeBackColor = function() { + return this.textColor(19); +}; + +ColorManager.hpGaugeColor1 = function() { + return this.textColor(20); +}; + +ColorManager.hpGaugeColor2 = function() { + return this.textColor(21); +}; + +ColorManager.mpGaugeColor1 = function() { + return this.textColor(22); +}; + +ColorManager.mpGaugeColor2 = function() { + return this.textColor(23); +}; + +ColorManager.mpCostColor = function() { + return this.textColor(23); +}; + +ColorManager.powerUpColor = function() { + return this.textColor(24); +}; + +ColorManager.powerDownColor = function() { + return this.textColor(25); +}; + +ColorManager.ctGaugeColor1 = function() { + return this.textColor(26); +}; + +ColorManager.ctGaugeColor2 = function() { + return this.textColor(27); +}; + +ColorManager.tpGaugeColor1 = function() { + return this.textColor(28); +}; + +ColorManager.tpGaugeColor2 = function() { + return this.textColor(29); +}; + +ColorManager.tpCostColor = function() { + return this.textColor(29); +}; + +ColorManager.pendingColor = function() { + return this._windowskin.getPixel(120, 120); +}; + +ColorManager.hpColor = function(actor) { + if (!actor) { + return this.normalColor(); + } else if (actor.isDead()) { + return this.deathColor(); + } else if (actor.isDying()) { + return this.crisisColor(); + } else { + return this.normalColor(); + } +}; + +ColorManager.mpColor = function(/*actor*/) { + return this.normalColor(); +}; + +ColorManager.tpColor = function(/*actor*/) { + return this.normalColor(); +}; + +ColorManager.paramchangeTextColor = function(change) { + if (change > 0) { + return this.powerUpColor(); + } else if (change < 0) { + return this.powerDownColor(); + } else { + return this.normalColor(); + } +}; + +ColorManager.damageColor = function(colorType) { + switch (colorType) { + case 0: // HP damage + return "#ffffff"; + case 1: // HP recover + return "#b9ffb5"; + case 2: // MP damage + return "#ffff90"; + case 3: // MP recover + return "#80b0ff"; + default: + return "#808080"; + } +}; + +ColorManager.outlineColor = function() { + return "rgba(0, 0, 0, 0.6)"; +}; + +ColorManager.dimColor1 = function() { + return "rgba(0, 0, 0, 0.6)"; +}; + +ColorManager.dimColor2 = function() { + return "rgba(0, 0, 0, 0)"; +}; + +ColorManager.itemBackColor1 = function() { + return "rgba(32, 32, 32, 0.5)"; +}; + +ColorManager.itemBackColor2 = function() { + return "rgba(0, 0, 0, 0.5)"; +}; + +//----------------------------------------------------------------------------- +// SceneManager +// +// The static class that manages scene transitions. + +function SceneManager() { + throw new Error("This is a static class"); +} + +SceneManager._scene = null; +SceneManager._nextScene = null; +SceneManager._stack = []; +SceneManager._exiting = false; +SceneManager._previousScene = null; +SceneManager._previousClass = null; +SceneManager._backgroundBitmap = null; +SceneManager._smoothDeltaTime = 1; +SceneManager._elapsedTime = 0; + +SceneManager.run = function(sceneClass) { + try { + this.initialize(); + this.goto(sceneClass); + Graphics.startGameLoop(); + } catch (e) { + this.catchException(e); + } +}; + +SceneManager.initialize = function() { + this.checkBrowser(); + this.checkPluginErrors(); + this.initGraphics(); + this.initAudio(); + this.initVideo(); + this.initInput(); + this.setupEventHandlers(); +}; + +SceneManager.checkBrowser = function() { + if (!Utils.canUseWebGL()) { + throw new Error("Your browser does not support WebGL."); + } + if (!Utils.canUseWebAudioAPI()) { + throw new Error("Your browser does not support Web Audio API."); + } + if (!Utils.canUseCssFontLoading()) { + throw new Error("Your browser does not support CSS Font Loading."); + } + if (!Utils.canUseIndexedDB()) { + throw new Error("Your browser does not support IndexedDB."); + } +}; + +SceneManager.checkPluginErrors = function() { + PluginManager.checkErrors(); +}; + +SceneManager.initGraphics = function() { + if (!Graphics.initialize()) { + throw new Error("Failed to initialize graphics."); + } + Graphics.setTickHandler(this.update.bind(this)); +}; + +SceneManager.initAudio = function() { + WebAudio.initialize(); +}; + +SceneManager.initVideo = function() { + Video.initialize(Graphics.width, Graphics.height); +}; + +SceneManager.initInput = function() { + Input.initialize(); + TouchInput.initialize(); +}; + +SceneManager.setupEventHandlers = function() { + window.addEventListener("error", this.onError.bind(this)); + window.addEventListener("unhandledrejection", this.onReject.bind(this)); + window.addEventListener("unload", this.onUnload.bind(this)); + document.addEventListener("keydown", this.onKeyDown.bind(this)); +}; + +SceneManager.update = function(deltaTime) { + try { + const n = this.determineRepeatNumber(deltaTime); + for (let i = 0; i < n; i++) { + this.updateMain(); + } + } catch (e) { + this.catchException(e); + } +}; + +SceneManager.determineRepeatNumber = function(deltaTime) { + // [Note] We consider environments where the refresh rate is higher than + // 60Hz, but ignore sudden irregular deltaTime. + this._smoothDeltaTime *= 0.8; + this._smoothDeltaTime += Math.min(deltaTime, 2) * 0.2; + if (this._smoothDeltaTime >= 0.9) { + this._elapsedTime = 0; + return Math.round(this._smoothDeltaTime); + } else { + this._elapsedTime += deltaTime; + if (this._elapsedTime >= 1) { + this._elapsedTime -= 1; + return 1; + } + return 0; + } +}; + +SceneManager.terminate = function() { + window.close(); +}; + +SceneManager.onError = function(event) { + console.error(event.message); + console.error(event.filename, event.lineno); + try { + this.stop(); + Graphics.printError("Error", event.message, event); + AudioManager.stopAll(); + } catch (e) { + // + } +}; + +SceneManager.onReject = function(event) { + // Catch uncaught exception in Promise + event.message = event.reason; + this.onError(event); +}; + +SceneManager.onUnload = function() { + ImageManager.clear(); + EffectManager.clear(); + AudioManager.stopAll(); +}; + +SceneManager.onKeyDown = function(event) { + if (!event.ctrlKey && !event.altKey) { + switch (event.keyCode) { + case 116: // F5 + this.reloadGame(); + break; + case 119: // F8 + this.showDevTools(); + break; + } + } +}; + +SceneManager.reloadGame = function() { + if (Utils.isNwjs()) { + chrome.runtime.reload(); + } +}; + +SceneManager.showDevTools = function() { + if (Utils.isNwjs() && Utils.isOptionValid("test")) { + nw.Window.get().showDevTools(); + } +}; + +SceneManager.catchException = function(e) { + if (e instanceof Error) { + this.catchNormalError(e); + } else if (e instanceof Array && e[0] === "LoadError") { + this.catchLoadError(e); + } else { + this.catchUnknownError(e); + } + this.stop(); +}; + +SceneManager.catchNormalError = function(e) { + Graphics.printError(e.name, e.message, e); + AudioManager.stopAll(); + console.error(e.stack); +}; + +SceneManager.catchLoadError = function(e) { + const url = e[1]; + const retry = e[2]; + Graphics.printError("Failed to load", url); + if (retry) { + Graphics.showRetryButton(() => { + retry(); + SceneManager.resume(); + }); + } else { + AudioManager.stopAll(); + } +}; + +SceneManager.catchUnknownError = function(e) { + Graphics.printError("UnknownError", String(e)); + AudioManager.stopAll(); +}; + +SceneManager.updateMain = function() { + this.updateFrameCount(); + this.updateInputData(); + this.updateEffekseer(); + this.changeScene(); + this.updateScene(); +}; + +SceneManager.updateFrameCount = function() { + Graphics.frameCount++; +}; + +SceneManager.updateInputData = function() { + Input.update(); + TouchInput.update(); +}; + +SceneManager.updateEffekseer = function() { + if (Graphics.effekseer && this.isGameActive()) { + Graphics.effekseer.update(); + } +}; + +SceneManager.changeScene = function() { + if (this.isSceneChanging() && !this.isCurrentSceneBusy()) { + if (this._scene) { + this._scene.terminate(); + this.onSceneTerminate(); + } + this._scene = this._nextScene; + this._nextScene = null; + if (this._scene) { + this._scene.create(); + this.onSceneCreate(); + } + if (this._exiting) { + this.terminate(); + } + } +}; + +SceneManager.updateScene = function() { + if (this._scene) { + if (this._scene.isStarted()) { + if (this.isGameActive()) { + this._scene.update(); + } + } else if (this._scene.isReady()) { + this.onBeforeSceneStart(); + this._scene.start(); + this.onSceneStart(); + } + } +}; + +SceneManager.isGameActive = function() { + // [Note] We use "window.top" to support an iframe. + try { + return window.top.document.hasFocus(); + } catch (e) { + // SecurityError + return true; + } +}; + +SceneManager.onSceneTerminate = function() { + this._previousScene = this._scene; + this._previousClass = this._scene.constructor; + Graphics.setStage(null); +}; + +SceneManager.onSceneCreate = function() { + Graphics.startLoading(); +}; + +SceneManager.onBeforeSceneStart = function() { + if (this._previousScene) { + this._previousScene.destroy(); + this._previousScene = null; + } + if (Graphics.effekseer) { + Graphics.effekseer.stopAll(); + } +}; + +SceneManager.onSceneStart = function() { + Graphics.endLoading(); + Graphics.setStage(this._scene); +}; + +SceneManager.isSceneChanging = function() { + return this._exiting || !!this._nextScene; +}; + +SceneManager.isCurrentSceneBusy = function() { + return this._scene && this._scene.isBusy(); +}; + +SceneManager.isNextScene = function(sceneClass) { + return this._nextScene && this._nextScene.constructor === sceneClass; +}; + +SceneManager.isPreviousScene = function(sceneClass) { + return this._previousClass === sceneClass; +}; + +SceneManager.goto = function(sceneClass) { + if (sceneClass) { + this._nextScene = new sceneClass(); + } + if (this._scene) { + this._scene.stop(); + } +}; + +SceneManager.push = function(sceneClass) { + this._stack.push(this._scene.constructor); + this.goto(sceneClass); +}; + +SceneManager.pop = function() { + if (this._stack.length > 0) { + this.goto(this._stack.pop()); + } else { + this.exit(); + } +}; + +SceneManager.exit = function() { + this.goto(null); + this._exiting = true; +}; + +SceneManager.clearStack = function() { + this._stack = []; +}; + +SceneManager.stop = function() { + Graphics.stopGameLoop(); +}; + +SceneManager.prepareNextScene = function() { + this._nextScene.prepare(...arguments); +}; + +SceneManager.snap = function() { + return Bitmap.snap(this._scene); +}; + +SceneManager.snapForBackground = function() { + if (this._backgroundBitmap) { + this._backgroundBitmap.destroy(); + } + this._backgroundBitmap = this.snap(); +}; + +SceneManager.backgroundBitmap = function() { + return this._backgroundBitmap; +}; + +SceneManager.resume = function() { + TouchInput.update(); + Graphics.startGameLoop(); +}; + +//----------------------------------------------------------------------------- +// BattleManager +// +// The static class that manages battle progress. + +function BattleManager() { + throw new Error("This is a static class"); +} + +BattleManager.setup = function(troopId, canEscape, canLose) { + this.initMembers(); + this._canEscape = canEscape; + this._canLose = canLose; + $gameTroop.setup(troopId); + $gameScreen.onBattleStart(); + this.makeEscapeRatio(); +}; + +BattleManager.initMembers = function() { + this._phase = ""; + this._inputting = false; + this._canEscape = false; + this._canLose = false; + this._battleTest = false; + this._eventCallback = null; + this._preemptive = false; + this._surprise = false; + this._currentActor = null; + this._actionForcedBattler = null; + this._mapBgm = null; + this._mapBgs = null; + this._actionBattlers = []; + this._subject = null; + this._action = null; + this._targets = []; + this._logWindow = null; + this._spriteset = null; + this._escapeRatio = 0; + this._escaped = false; + this._rewards = {}; + this._tpbNeedsPartyCommand = true; +}; + +BattleManager.isTpb = function() { + return $dataSystem.battleSystem >= 1; +}; + +BattleManager.isActiveTpb = function() { + return $dataSystem.battleSystem === 1; +}; + +BattleManager.isBattleTest = function() { + return this._battleTest; +}; + +BattleManager.setBattleTest = function(battleTest) { + this._battleTest = battleTest; +}; + +BattleManager.setEventCallback = function(callback) { + this._eventCallback = callback; +}; + +BattleManager.setLogWindow = function(logWindow) { + this._logWindow = logWindow; +}; + +BattleManager.setSpriteset = function(spriteset) { + this._spriteset = spriteset; +}; + +BattleManager.onEncounter = function() { + this._preemptive = Math.random() < this.ratePreemptive(); + this._surprise = Math.random() < this.rateSurprise() && !this._preemptive; +}; + +BattleManager.ratePreemptive = function() { + return $gameParty.ratePreemptive($gameTroop.agility()); +}; + +BattleManager.rateSurprise = function() { + return $gameParty.rateSurprise($gameTroop.agility()); +}; + +BattleManager.saveBgmAndBgs = function() { + this._mapBgm = AudioManager.saveBgm(); + this._mapBgs = AudioManager.saveBgs(); +}; + +BattleManager.playBattleBgm = function() { + AudioManager.playBgm($gameSystem.battleBgm()); + AudioManager.stopBgs(); +}; + +BattleManager.playVictoryMe = function() { + AudioManager.playMe($gameSystem.victoryMe()); +}; + +BattleManager.playDefeatMe = function() { + AudioManager.playMe($gameSystem.defeatMe()); +}; + +BattleManager.replayBgmAndBgs = function() { + if (this._mapBgm) { + AudioManager.replayBgm(this._mapBgm); + } else { + AudioManager.stopBgm(); + } + if (this._mapBgs) { + AudioManager.replayBgs(this._mapBgs); + } +}; + +BattleManager.makeEscapeRatio = function() { + this._escapeRatio = (0.5 * $gameParty.agility()) / $gameTroop.agility(); +}; + +BattleManager.update = function(timeActive) { + if (!this.isBusy() && !this.updateEvent()) { + this.updatePhase(timeActive); + } + if (this.isTpb()) { + this.updateTpbInput(); + } +}; + +BattleManager.updatePhase = function(timeActive) { + switch (this._phase) { + case "start": + this.updateStart(); + break; + case "turn": + this.updateTurn(timeActive); + break; + case "action": + this.updateAction(); + break; + case "turnEnd": + this.updateTurnEnd(); + break; + case "battleEnd": + this.updateBattleEnd(); + break; + } +}; + +BattleManager.updateEvent = function() { + switch (this._phase) { + case "start": + case "turn": + case "turnEnd": + if (this.isActionForced()) { + this.processForcedAction(); + return true; + } else { + return this.updateEventMain(); + } + } + return this.checkAbort(); +}; + +BattleManager.updateEventMain = function() { + $gameTroop.updateInterpreter(); + $gameParty.requestMotionRefresh(); + if ($gameTroop.isEventRunning() || this.checkBattleEnd()) { + return true; + } + $gameTroop.setupBattleEvent(); + if ($gameTroop.isEventRunning() || SceneManager.isSceneChanging()) { + return true; + } + return false; +}; + +BattleManager.isBusy = function() { + return ( + $gameMessage.isBusy() || + this._spriteset.isBusy() || + this._logWindow.isBusy() + ); +}; + +BattleManager.updateTpbInput = function() { + if (this._inputting) { + this.checkTpbInputClose(); + } else { + this.checkTpbInputOpen(); + } +}; + +BattleManager.checkTpbInputClose = function() { + if (!this.isPartyTpbInputtable() || this.needsActorInputCancel()) { + this.cancelActorInput(); + this._currentActor = null; + this._inputting = false; + } +}; + +BattleManager.checkTpbInputOpen = function() { + if (this.isPartyTpbInputtable()) { + if (this._tpbNeedsPartyCommand) { + this._inputting = true; + this._tpbNeedsPartyCommand = false; + } else { + this.selectNextCommand(); + } + } +}; + +BattleManager.isPartyTpbInputtable = function() { + return $gameParty.canInput() && this.isTpbMainPhase(); +}; + +BattleManager.needsActorInputCancel = function() { + return this._currentActor && !this._currentActor.canInput(); +}; + +BattleManager.isTpbMainPhase = function() { + return ["turn", "turnEnd", "action"].includes(this._phase); +}; + +BattleManager.isInputting = function() { + return this._inputting; +}; + +BattleManager.isInTurn = function() { + return this._phase === "turn"; +}; + +BattleManager.isTurnEnd = function() { + return this._phase === "turnEnd"; +}; + +BattleManager.isAborting = function() { + return this._phase === "aborting"; +}; + +BattleManager.isBattleEnd = function() { + return this._phase === "battleEnd"; +}; + +BattleManager.canEscape = function() { + return this._canEscape; +}; + +BattleManager.canLose = function() { + return this._canLose; +}; + +BattleManager.isEscaped = function() { + return this._escaped; +}; + +BattleManager.actor = function() { + return this._currentActor; +}; + +BattleManager.startBattle = function() { + this._phase = "start"; + $gameSystem.onBattleStart(); + $gameParty.onBattleStart(this._preemptive); + $gameTroop.onBattleStart(this._surprise); + this.displayStartMessages(); +}; + +BattleManager.displayStartMessages = function() { + for (const name of $gameTroop.enemyNames()) { + $gameMessage.add(TextManager.emerge.format(name)); + } + if (this._preemptive) { + $gameMessage.add(TextManager.preemptive.format($gameParty.name())); + } else if (this._surprise) { + $gameMessage.add(TextManager.surprise.format($gameParty.name())); + } +}; + +BattleManager.startInput = function() { + this._phase = "input"; + this._inputting = true; + $gameParty.makeActions(); + $gameTroop.makeActions(); + this._currentActor = null; + if (this._surprise || !$gameParty.canInput()) { + this.startTurn(); + } +}; + +BattleManager.inputtingAction = function() { + return this._currentActor ? this._currentActor.inputtingAction() : null; +}; + +BattleManager.selectNextCommand = function() { + if (this._currentActor) { + if (this._currentActor.selectNextCommand()) { + return; + } + this.finishActorInput(); + } + this.selectNextActor(); +}; + +BattleManager.selectNextActor = function() { + this.changeCurrentActor(true); + if (!this._currentActor) { + if (this.isTpb()) { + this.changeCurrentActor(true); + } else { + this.startTurn(); + } + } +}; + +BattleManager.selectPreviousCommand = function() { + if (this._currentActor) { + if (this._currentActor.selectPreviousCommand()) { + return; + } + this.cancelActorInput(); + } + this.selectPreviousActor(); +}; + +BattleManager.selectPreviousActor = function() { + if (this.isTpb()) { + this.changeCurrentActor(true); + if (!this._currentActor) { + this._inputting = $gameParty.canInput(); + } + } else { + this.changeCurrentActor(false); + } +}; + +BattleManager.changeCurrentActor = function(forward) { + const members = $gameParty.battleMembers(); + let actor = this._currentActor; + for (;;) { + const currentIndex = members.indexOf(actor); + actor = members[currentIndex + (forward ? 1 : -1)]; + if (!actor || actor.canInput()) { + break; + } + } + this._currentActor = actor ? actor : null; + this.startActorInput(); +}; + +BattleManager.startActorInput = function() { + if (this._currentActor) { + this._currentActor.setActionState("inputting"); + this._inputting = true; + } +}; + +BattleManager.finishActorInput = function() { + if (this._currentActor) { + if (this.isTpb()) { + this._currentActor.startTpbCasting(); + } + this._currentActor.setActionState("waiting"); + } +}; + +BattleManager.cancelActorInput = function() { + if (this._currentActor) { + this._currentActor.setActionState("undecided"); + } +}; + +BattleManager.updateStart = function() { + if (this.isTpb()) { + this._phase = "turn"; + } else { + this.startInput(); + } +}; + +BattleManager.startTurn = function() { + this._phase = "turn"; + $gameTroop.increaseTurn(); + $gameParty.requestMotionRefresh(); + if (!this.isTpb()) { + this.makeActionOrders(); + this._logWindow.startTurn(); + this._inputting = false; + } +}; + +BattleManager.updateTurn = function(timeActive) { + $gameParty.requestMotionRefresh(); + if (this.isTpb() && timeActive) { + this.updateTpb(); + } + if (!this._subject) { + this._subject = this.getNextSubject(); + } + if (this._subject) { + this.processTurn(); + } else if (!this.isTpb()) { + this.endTurn(); + } +}; + +BattleManager.updateTpb = function() { + $gameParty.updateTpb(); + $gameTroop.updateTpb(); + this.updateAllTpbBattlers(); + this.checkTpbTurnEnd(); +}; + +BattleManager.updateAllTpbBattlers = function() { + for (const battler of this.allBattleMembers()) { + this.updateTpbBattler(battler); + } +}; + +BattleManager.updateTpbBattler = function(battler) { + if (battler.isTpbTurnEnd()) { + battler.onTurnEnd(); + battler.startTpbTurn(); + this.displayBattlerStatus(battler, false); + } else if (battler.isTpbReady()) { + battler.startTpbAction(); + this._actionBattlers.push(battler); + } else if (battler.isTpbTimeout()) { + battler.onTpbTimeout(); + this.displayBattlerStatus(battler, true); + } +}; + +BattleManager.checkTpbTurnEnd = function() { + if ($gameTroop.isTpbTurnEnd()) { + this.endTurn(); + } +}; + +BattleManager.processTurn = function() { + const subject = this._subject; + const action = subject.currentAction(); + if (action) { + action.prepare(); + if (action.isValid()) { + this.startAction(); + } + subject.removeCurrentAction(); + } else { + this.endAction(); + this._subject = null; + } +}; + +BattleManager.endBattlerActions = function(battler) { + battler.setActionState(this.isTpb() ? "undecided" : "done"); + battler.onAllActionsEnd(); + battler.clearTpbChargeTime(); + this.displayBattlerStatus(battler, true); +}; + +BattleManager.endTurn = function() { + this._phase = "turnEnd"; + this._preemptive = false; + this._surprise = false; +}; + +BattleManager.updateTurnEnd = function() { + if (this.isTpb()) { + this.startTurn(); + } else { + this.endAllBattlersTurn(); + this._phase = "start"; + } +}; + +BattleManager.endAllBattlersTurn = function() { + for (const battler of this.allBattleMembers()) { + battler.onTurnEnd(); + this.displayBattlerStatus(battler, false); + } +}; + +BattleManager.displayBattlerStatus = function(battler, current) { + this._logWindow.displayAutoAffectedStatus(battler); + if (current) { + this._logWindow.displayCurrentState(battler); + } + this._logWindow.displayRegeneration(battler); +}; + +BattleManager.getNextSubject = function() { + for (;;) { + const battler = this._actionBattlers.shift(); + if (!battler) { + return null; + } + if (battler.isBattleMember() && battler.isAlive()) { + return battler; + } + } +}; + +BattleManager.allBattleMembers = function() { + return $gameParty.battleMembers().concat($gameTroop.members()); +}; + +BattleManager.makeActionOrders = function() { + const battlers = []; + if (!this._surprise) { + battlers.push(...$gameParty.battleMembers()); + } + if (!this._preemptive) { + battlers.push(...$gameTroop.members()); + } + for (const battler of battlers) { + battler.makeSpeed(); + } + battlers.sort((a, b) => b.speed() - a.speed()); + this._actionBattlers = battlers; +}; + +BattleManager.startAction = function() { + const subject = this._subject; + const action = subject.currentAction(); + const targets = action.makeTargets(); + this._phase = "action"; + this._action = action; + this._targets = targets; + subject.cancelMotionRefresh(); + subject.useItem(action.item()); + this._action.applyGlobal(); + this._logWindow.startAction(subject, action, targets); +}; + +BattleManager.updateAction = function() { + const target = this._targets.shift(); + if (target) { + this.invokeAction(this._subject, target); + } else { + this.endAction(); + } +}; + +BattleManager.endAction = function() { + this._logWindow.endAction(this._subject); + this._phase = "turn"; + if (this._subject.numActions() === 0) { + this.endBattlerActions(this._subject); + this._subject = null; + } +}; + +BattleManager.invokeAction = function(subject, target) { + this._logWindow.push("pushBaseLine"); + if (Math.random() < this._action.itemCnt(target)) { + this.invokeCounterAttack(subject, target); + } else if (Math.random() < this._action.itemMrf(target)) { + this.invokeMagicReflection(subject, target); + } else { + this.invokeNormalAction(subject, target); + } + subject.setLastTarget(target); + this._logWindow.push("popBaseLine"); +}; + +BattleManager.invokeNormalAction = function(subject, target) { + const realTarget = this.applySubstitute(target); + this._action.apply(realTarget); + this._logWindow.displayActionResults(subject, realTarget); +}; + +BattleManager.invokeCounterAttack = function(subject, target) { + const action = new Game_Action(target); + action.setAttack(); + action.apply(subject); + this._logWindow.displayCounter(target); + this._logWindow.displayActionResults(target, subject); +}; + +BattleManager.invokeMagicReflection = function(subject, target) { + this._action._reflectionTarget = target; + this._logWindow.displayReflection(target); + this._action.apply(subject); + this._logWindow.displayActionResults(target, subject); +}; + +BattleManager.applySubstitute = function(target) { + if (this.checkSubstitute(target)) { + const substitute = target.friendsUnit().substituteBattler(); + if (substitute && target !== substitute) { + this._logWindow.displaySubstitute(substitute, target); + return substitute; + } + } + return target; +}; + +BattleManager.checkSubstitute = function(target) { + return target.isDying() && !this._action.isCertainHit(); +}; + +BattleManager.isActionForced = function() { + return !!this._actionForcedBattler; +}; + +BattleManager.forceAction = function(battler) { + this._actionForcedBattler = battler; + this._actionBattlers.remove(battler); +}; + +BattleManager.processForcedAction = function() { + if (this._actionForcedBattler) { + if (this._subject) { + this.endBattlerActions(this._subject); + } + this._subject = this._actionForcedBattler; + this._actionForcedBattler = null; + this.startAction(); + this._subject.removeCurrentAction(); + } +}; + +BattleManager.abort = function() { + this._phase = "aborting"; +}; + +BattleManager.checkBattleEnd = function() { + if (this._phase) { + if ($gameParty.isEscaped()) { + this.processPartyEscape(); + return true; + } else if ($gameParty.isAllDead()) { + this.processDefeat(); + return true; + } else if ($gameTroop.isAllDead()) { + this.processVictory(); + return true; + } + } + return false; +}; + +BattleManager.checkAbort = function() { + if (this.isAborting()) { + this.processAbort(); + return true; + } + return false; +}; + +BattleManager.processVictory = function() { + $gameParty.removeBattleStates(); + $gameParty.performVictory(); + this.playVictoryMe(); + this.replayBgmAndBgs(); + this.makeRewards(); + this.displayVictoryMessage(); + this.displayRewards(); + this.gainRewards(); + this.endBattle(0); +}; + +BattleManager.processEscape = function() { + $gameParty.performEscape(); + SoundManager.playEscape(); + const success = this._preemptive || Math.random() < this._escapeRatio; + if (success) { + this.onEscapeSuccess(); + } else { + this.onEscapeFailure(); + } + return success; +}; + +BattleManager.onEscapeSuccess = function() { + this.displayEscapeSuccessMessage(); + this._escaped = true; + this.processAbort(); +}; + +BattleManager.onEscapeFailure = function() { + $gameParty.onEscapeFailure(); + this.displayEscapeFailureMessage(); + this._escapeRatio += 0.1; + if (!this.isTpb()) { + this.startTurn(); + } +}; + +BattleManager.processPartyEscape = function() { + this._escaped = true; + this.processAbort(); +}; + +BattleManager.processAbort = function() { + $gameParty.removeBattleStates(); + this._logWindow.clear(); + this.replayBgmAndBgs(); + this.endBattle(1); +}; + +BattleManager.processDefeat = function() { + this.displayDefeatMessage(); + this.playDefeatMe(); + if (this._canLose) { + this.replayBgmAndBgs(); + } else { + AudioManager.stopBgm(); + } + this.endBattle(2); +}; + +BattleManager.endBattle = function(result) { + this._phase = "battleEnd"; + this.cancelActorInput(); + this._inputting = false; + if (this._eventCallback) { + this._eventCallback(result); + } + if (result === 0) { + $gameSystem.onBattleWin(); + } else if (this._escaped) { + $gameSystem.onBattleEscape(); + } + $gameTemp.clearCommonEventReservation(); +}; + +BattleManager.updateBattleEnd = function() { + if (this.isBattleTest()) { + AudioManager.stopBgm(); + SceneManager.exit(); + } else if (!this._escaped && $gameParty.isAllDead()) { + if (this._canLose) { + $gameParty.reviveBattleMembers(); + SceneManager.pop(); + } else { + SceneManager.goto(Scene_Gameover); + } + } else { + SceneManager.pop(); + } + this._phase = ""; +}; + +BattleManager.makeRewards = function() { + this._rewards = { + gold: $gameTroop.goldTotal(), + exp: $gameTroop.expTotal(), + items: $gameTroop.makeDropItems() + }; +}; + +BattleManager.displayVictoryMessage = function() { + $gameMessage.add(TextManager.victory.format($gameParty.name())); +}; + +BattleManager.displayDefeatMessage = function() { + $gameMessage.add(TextManager.defeat.format($gameParty.name())); +}; + +BattleManager.displayEscapeSuccessMessage = function() { + $gameMessage.add(TextManager.escapeStart.format($gameParty.name())); +}; + +BattleManager.displayEscapeFailureMessage = function() { + $gameMessage.add(TextManager.escapeStart.format($gameParty.name())); + $gameMessage.add("\\." + TextManager.escapeFailure); +}; + +BattleManager.displayRewards = function() { + this.displayExp(); + this.displayGold(); + this.displayDropItems(); +}; + +BattleManager.displayExp = function() { + const exp = this._rewards.exp; + if (exp > 0) { + const text = TextManager.obtainExp.format(exp, TextManager.exp); + $gameMessage.add("\\." + text); + } +}; + +BattleManager.displayGold = function() { + const gold = this._rewards.gold; + if (gold > 0) { + $gameMessage.add("\\." + TextManager.obtainGold.format(gold)); + } +}; + +BattleManager.displayDropItems = function() { + const items = this._rewards.items; + if (items.length > 0) { + $gameMessage.newPage(); + for (const item of items) { + $gameMessage.add(TextManager.obtainItem.format(item.name)); + } + } +}; + +BattleManager.gainRewards = function() { + this.gainExp(); + this.gainGold(); + this.gainDropItems(); +}; + +BattleManager.gainExp = function() { + const exp = this._rewards.exp; + for (const actor of $gameParty.allMembers()) { + actor.gainExp(exp); + } +}; + +BattleManager.gainGold = function() { + $gameParty.gainGold(this._rewards.gold); +}; + +BattleManager.gainDropItems = function() { + const items = this._rewards.items; + for (const item of items) { + $gameParty.gainItem(item, 1); + } +}; + +//----------------------------------------------------------------------------- +// PluginManager +// +// The static class that manages the plugins. + +function PluginManager() { + throw new Error("This is a static class"); +} + +PluginManager._scripts = []; +PluginManager._errorUrls = []; +PluginManager._parameters = {}; +PluginManager._commands = {}; + +PluginManager.setup = function(plugins) { + for (const plugin of plugins) { + const pluginName = Utils.extractFileName(plugin.name); + if (plugin.status && !this._scripts.includes(pluginName)) { + this.setParameters(pluginName, plugin.parameters); + this.loadScript(plugin.name); + this._scripts.push(pluginName); + } + } +}; + +PluginManager.parameters = function(name) { + return this._parameters[name.toLowerCase()] || {}; +}; + +PluginManager.setParameters = function(name, parameters) { + this._parameters[name.toLowerCase()] = parameters; +}; + +PluginManager.loadScript = function(filename) { + const url = this.makeUrl(filename); + const script = document.createElement("script"); + script.type = "text/javascript"; + script.src = url; + script.async = false; + script.defer = true; + script.onerror = this.onError.bind(this); + script._url = url; + document.body.appendChild(script); +}; + +PluginManager.onError = function(e) { + this._errorUrls.push(e.target._url); +}; + +PluginManager.makeUrl = function(filename) { + return "js/plugins/" + Utils.encodeURI(filename) + ".js"; +}; + +PluginManager.checkErrors = function() { + const url = this._errorUrls.shift(); + if (url) { + this.throwLoadError(url); + } +}; + +PluginManager.throwLoadError = function(url) { + throw new Error("Failed to load: " + url); +}; + +PluginManager.registerCommand = function(pluginName, commandName, func) { + const key = pluginName + ":" + commandName; + this._commands[key] = func; +}; + +PluginManager.callCommand = function(self, pluginName, commandName, args) { + const key = pluginName + ":" + commandName; + const func = this._commands[key]; + if (typeof func === "function") { + func.bind(self)(args); + } +}; + +//----------------------------------------------------------------------------- diff --git a/js/rmmz_objects.js b/js/rmmz_objects.js new file mode 100644 index 0000000..f7a3f12 --- /dev/null +++ b/js/rmmz_objects.js @@ -0,0 +1,11307 @@ +//============================================================================= +// rmmz_objects.js v1.4.4 +//============================================================================= + +//----------------------------------------------------------------------------- +// Game_Temp +// +// The game object class for temporary data that is not included in save data. + +function Game_Temp() { + this.initialize(...arguments); +} + +Game_Temp.prototype.initialize = function() { + this._isPlaytest = Utils.isOptionValid("test"); + this._destinationX = null; + this._destinationY = null; + this._touchTarget = null; + this._touchState = ""; + this._needsBattleRefresh = false; + this._commonEventQueue = []; + this._animationQueue = []; + this._balloonQueue = []; + this._lastActionData = [0, 0, 0, 0, 0, 0]; +}; + +Game_Temp.prototype.isPlaytest = function() { + return this._isPlaytest; +}; + +Game_Temp.prototype.setDestination = function(x, y) { + this._destinationX = x; + this._destinationY = y; +}; + +Game_Temp.prototype.clearDestination = function() { + this._destinationX = null; + this._destinationY = null; +}; + +Game_Temp.prototype.isDestinationValid = function() { + return this._destinationX !== null; +}; + +Game_Temp.prototype.destinationX = function() { + return this._destinationX; +}; + +Game_Temp.prototype.destinationY = function() { + return this._destinationY; +}; + +Game_Temp.prototype.setTouchState = function(target, state) { + this._touchTarget = target; + this._touchState = state; +}; + +Game_Temp.prototype.clearTouchState = function() { + this._touchTarget = null; + this._touchState = ""; +}; + +Game_Temp.prototype.touchTarget = function() { + return this._touchTarget; +}; + +Game_Temp.prototype.touchState = function() { + return this._touchState; +}; + +Game_Temp.prototype.requestBattleRefresh = function() { + if ($gameParty.inBattle()) { + this._needsBattleRefresh = true; + } +}; + +Game_Temp.prototype.clearBattleRefreshRequest = function() { + this._needsBattleRefresh = false; +}; + +Game_Temp.prototype.isBattleRefreshRequested = function() { + return this._needsBattleRefresh; +}; + +Game_Temp.prototype.reserveCommonEvent = function(commonEventId) { + this._commonEventQueue.push(commonEventId); +}; + +Game_Temp.prototype.retrieveCommonEvent = function() { + return $dataCommonEvents[this._commonEventQueue.shift()]; +}; + +Game_Temp.prototype.clearCommonEventReservation = function() { + this._commonEventQueue.length = 0; +}; + +Game_Temp.prototype.isCommonEventReserved = function() { + return this._commonEventQueue.length > 0; +}; + +// prettier-ignore +Game_Temp.prototype.requestAnimation = function( + targets, animationId, mirror = false +) { + if ($dataAnimations[animationId]) { + const request = { + targets: targets, + animationId: animationId, + mirror: mirror + }; + this._animationQueue.push(request); + for (const target of targets) { + if (target.startAnimation) { + target.startAnimation(); + } + } + } +}; + +Game_Temp.prototype.retrieveAnimation = function() { + return this._animationQueue.shift(); +}; + +Game_Temp.prototype.requestBalloon = function(target, balloonId) { + const request = { target: target, balloonId: balloonId }; + this._balloonQueue.push(request); + if (target.startBalloon) { + target.startBalloon(); + } +}; + +Game_Temp.prototype.retrieveBalloon = function() { + return this._balloonQueue.shift(); +}; + +Game_Temp.prototype.lastActionData = function(type) { + return this._lastActionData[type] || 0; +}; + +Game_Temp.prototype.setLastActionData = function(type, value) { + this._lastActionData[type] = value; +}; + +Game_Temp.prototype.setLastUsedSkillId = function(skillID) { + this.setLastActionData(0, skillID); +}; + +Game_Temp.prototype.setLastUsedItemId = function(itemID) { + this.setLastActionData(1, itemID); +}; + +Game_Temp.prototype.setLastSubjectActorId = function(actorID) { + this.setLastActionData(2, actorID); +}; + +Game_Temp.prototype.setLastSubjectEnemyIndex = function(enemyIndex) { + this.setLastActionData(3, enemyIndex); +}; + +Game_Temp.prototype.setLastTargetActorId = function(actorID) { + this.setLastActionData(4, actorID); +}; + +Game_Temp.prototype.setLastTargetEnemyIndex = function(enemyIndex) { + this.setLastActionData(5, enemyIndex); +}; + +//----------------------------------------------------------------------------- +// Game_System +// +// The game object class for the system data. + +function Game_System() { + this.initialize(...arguments); +} + +Game_System.prototype.initialize = function() { + this._saveEnabled = true; + this._menuEnabled = true; + this._encounterEnabled = true; + this._formationEnabled = true; + this._battleCount = 0; + this._winCount = 0; + this._escapeCount = 0; + this._saveCount = 0; + this._versionId = 0; + this._savefileId = 0; + this._framesOnSave = 0; + this._bgmOnSave = null; + this._bgsOnSave = null; + this._windowTone = null; + this._battleBgm = null; + this._victoryMe = null; + this._defeatMe = null; + this._savedBgm = null; + this._walkingBgm = null; +}; + +Game_System.prototype.isJapanese = function() { + return $dataSystem.locale.match(/^ja/); +}; + +Game_System.prototype.isChinese = function() { + return $dataSystem.locale.match(/^zh/); +}; + +Game_System.prototype.isKorean = function() { + return $dataSystem.locale.match(/^ko/); +}; + +Game_System.prototype.isCJK = function() { + return $dataSystem.locale.match(/^(ja|zh|ko)/); +}; + +Game_System.prototype.isRussian = function() { + return $dataSystem.locale.match(/^ru/); +}; + +Game_System.prototype.isSideView = function() { + return $dataSystem.optSideView; +}; + +Game_System.prototype.isAutosaveEnabled = function() { + return $dataSystem.optAutosave; +}; + +Game_System.prototype.isSaveEnabled = function() { + return this._saveEnabled; +}; + +Game_System.prototype.disableSave = function() { + this._saveEnabled = false; +}; + +Game_System.prototype.enableSave = function() { + this._saveEnabled = true; +}; + +Game_System.prototype.isMenuEnabled = function() { + return this._menuEnabled; +}; + +Game_System.prototype.disableMenu = function() { + this._menuEnabled = false; +}; + +Game_System.prototype.enableMenu = function() { + this._menuEnabled = true; +}; + +Game_System.prototype.isEncounterEnabled = function() { + return this._encounterEnabled; +}; + +Game_System.prototype.disableEncounter = function() { + this._encounterEnabled = false; +}; + +Game_System.prototype.enableEncounter = function() { + this._encounterEnabled = true; +}; + +Game_System.prototype.isFormationEnabled = function() { + return this._formationEnabled; +}; + +Game_System.prototype.disableFormation = function() { + this._formationEnabled = false; +}; + +Game_System.prototype.enableFormation = function() { + this._formationEnabled = true; +}; + +Game_System.prototype.battleCount = function() { + return this._battleCount; +}; + +Game_System.prototype.winCount = function() { + return this._winCount; +}; + +Game_System.prototype.escapeCount = function() { + return this._escapeCount; +}; + +Game_System.prototype.saveCount = function() { + return this._saveCount; +}; + +Game_System.prototype.versionId = function() { + return this._versionId; +}; + +Game_System.prototype.savefileId = function() { + return this._savefileId || 0; +}; + +Game_System.prototype.setSavefileId = function(savefileId) { + this._savefileId = savefileId; +}; + +Game_System.prototype.windowTone = function() { + return this._windowTone || $dataSystem.windowTone; +}; + +Game_System.prototype.setWindowTone = function(value) { + this._windowTone = value; +}; + +Game_System.prototype.battleBgm = function() { + return this._battleBgm || $dataSystem.battleBgm; +}; + +Game_System.prototype.setBattleBgm = function(value) { + this._battleBgm = value; +}; + +Game_System.prototype.victoryMe = function() { + return this._victoryMe || $dataSystem.victoryMe; +}; + +Game_System.prototype.setVictoryMe = function(value) { + this._victoryMe = value; +}; + +Game_System.prototype.defeatMe = function() { + return this._defeatMe || $dataSystem.defeatMe; +}; + +Game_System.prototype.setDefeatMe = function(value) { + this._defeatMe = value; +}; + +Game_System.prototype.onBattleStart = function() { + this._battleCount++; +}; + +Game_System.prototype.onBattleWin = function() { + this._winCount++; +}; + +Game_System.prototype.onBattleEscape = function() { + this._escapeCount++; +}; + +Game_System.prototype.onBeforeSave = function() { + this._saveCount++; + this._versionId = $dataSystem.versionId; + this._framesOnSave = Graphics.frameCount; + this._bgmOnSave = AudioManager.saveBgm(); + this._bgsOnSave = AudioManager.saveBgs(); +}; + +Game_System.prototype.onAfterLoad = function() { + Graphics.frameCount = this._framesOnSave; + AudioManager.playBgm(this._bgmOnSave); + AudioManager.playBgs(this._bgsOnSave); +}; + +Game_System.prototype.playtime = function() { + return Math.floor(Graphics.frameCount / 60); +}; + +Game_System.prototype.playtimeText = function() { + const hour = Math.floor(this.playtime() / 60 / 60); + const min = Math.floor(this.playtime() / 60) % 60; + const sec = this.playtime() % 60; + return hour.padZero(2) + ":" + min.padZero(2) + ":" + sec.padZero(2); +}; + +Game_System.prototype.saveBgm = function() { + this._savedBgm = AudioManager.saveBgm(); +}; + +Game_System.prototype.replayBgm = function() { + if (this._savedBgm) { + AudioManager.replayBgm(this._savedBgm); + } +}; + +Game_System.prototype.saveWalkingBgm = function() { + this._walkingBgm = AudioManager.saveBgm(); +}; + +Game_System.prototype.replayWalkingBgm = function() { + if (this._walkingBgm) { + AudioManager.playBgm(this._walkingBgm); + } +}; + +Game_System.prototype.saveWalkingBgm2 = function() { + this._walkingBgm = $dataMap.bgm; +}; + +Game_System.prototype.mainFontFace = function() { + return "rmmz-mainfont, " + $dataSystem.advanced.fallbackFonts; +}; + +Game_System.prototype.numberFontFace = function() { + return "rmmz-numberfont, " + this.mainFontFace(); +}; + +Game_System.prototype.mainFontSize = function() { + return $dataSystem.advanced.fontSize; +}; + +Game_System.prototype.windowPadding = function() { + return 12; +}; + +Game_System.prototype.windowOpacity = function() { + if ("windowOpacity" in $dataSystem.advanced) { + return $dataSystem.advanced.windowOpacity; + } else { + return 192; + } +}; + +//----------------------------------------------------------------------------- +// Game_Timer +// +// The game object class for the timer. + +function Game_Timer() { + this.initialize(...arguments); +} + +Game_Timer.prototype.initialize = function() { + this._frames = 0; + this._working = false; +}; + +Game_Timer.prototype.update = function(sceneActive) { + if (sceneActive && this._working && this._frames > 0) { + this._frames--; + if (this._frames === 0) { + this.onExpire(); + } + } +}; + +Game_Timer.prototype.start = function(count) { + this._frames = count; + this._working = true; +}; + +Game_Timer.prototype.stop = function() { + this._working = false; +}; + +Game_Timer.prototype.isWorking = function() { + return this._working; +}; + +Game_Timer.prototype.seconds = function() { + return Math.floor(this._frames / 60); +}; + +Game_Timer.prototype.frames = function() { + return this._frames; +}; + +Game_Timer.prototype.onExpire = function() { + BattleManager.abort(); +}; + +//----------------------------------------------------------------------------- +// Game_Message +// +// The game object class for the state of the message window that displays text +// or selections, etc. + +function Game_Message() { + this.initialize(...arguments); +} + +Game_Message.prototype.initialize = function() { + this.clear(); +}; + +Game_Message.prototype.clear = function() { + this._texts = []; + this._choices = []; + this._speakerName = ""; + this._faceName = ""; + this._faceIndex = 0; + this._background = 0; + this._positionType = 2; + this._choiceDefaultType = 0; + this._choiceCancelType = 0; + this._choiceBackground = 0; + this._choicePositionType = 2; + this._numInputVariableId = 0; + this._numInputMaxDigits = 0; + this._itemChoiceVariableId = 0; + this._itemChoiceItypeId = 0; + this._scrollMode = false; + this._scrollSpeed = 2; + this._scrollNoFast = false; + this._choiceCallback = null; +}; + +Game_Message.prototype.choices = function() { + return this._choices; +}; + +Game_Message.prototype.speakerName = function() { + return this._speakerName; +}; + +Game_Message.prototype.faceName = function() { + return this._faceName; +}; + +Game_Message.prototype.faceIndex = function() { + return this._faceIndex; +}; + +Game_Message.prototype.background = function() { + return this._background; +}; + +Game_Message.prototype.positionType = function() { + return this._positionType; +}; + +Game_Message.prototype.choiceDefaultType = function() { + return this._choiceDefaultType; +}; + +Game_Message.prototype.choiceCancelType = function() { + return this._choiceCancelType; +}; + +Game_Message.prototype.choiceBackground = function() { + return this._choiceBackground; +}; + +Game_Message.prototype.choicePositionType = function() { + return this._choicePositionType; +}; + +Game_Message.prototype.numInputVariableId = function() { + return this._numInputVariableId; +}; + +Game_Message.prototype.numInputMaxDigits = function() { + return this._numInputMaxDigits; +}; + +Game_Message.prototype.itemChoiceVariableId = function() { + return this._itemChoiceVariableId; +}; + +Game_Message.prototype.itemChoiceItypeId = function() { + return this._itemChoiceItypeId; +}; + +Game_Message.prototype.scrollMode = function() { + return this._scrollMode; +}; + +Game_Message.prototype.scrollSpeed = function() { + return this._scrollSpeed; +}; + +Game_Message.prototype.scrollNoFast = function() { + return this._scrollNoFast; +}; + +Game_Message.prototype.add = function(text) { + this._texts.push(text); +}; + +Game_Message.prototype.setSpeakerName = function(speakerName) { + this._speakerName = speakerName ? speakerName : ""; +}; + +Game_Message.prototype.setFaceImage = function(faceName, faceIndex) { + this._faceName = faceName; + this._faceIndex = faceIndex; +}; + +Game_Message.prototype.setBackground = function(background) { + this._background = background; +}; + +Game_Message.prototype.setPositionType = function(positionType) { + this._positionType = positionType; +}; + +Game_Message.prototype.setChoices = function(choices, defaultType, cancelType) { + this._choices = choices; + this._choiceDefaultType = defaultType; + this._choiceCancelType = cancelType; +}; + +Game_Message.prototype.setChoiceBackground = function(background) { + this._choiceBackground = background; +}; + +Game_Message.prototype.setChoicePositionType = function(positionType) { + this._choicePositionType = positionType; +}; + +Game_Message.prototype.setNumberInput = function(variableId, maxDigits) { + this._numInputVariableId = variableId; + this._numInputMaxDigits = maxDigits; +}; + +Game_Message.prototype.setItemChoice = function(variableId, itemType) { + this._itemChoiceVariableId = variableId; + this._itemChoiceItypeId = itemType; +}; + +Game_Message.prototype.setScroll = function(speed, noFast) { + this._scrollMode = true; + this._scrollSpeed = speed; + this._scrollNoFast = noFast; +}; + +Game_Message.prototype.setChoiceCallback = function(callback) { + this._choiceCallback = callback; +}; + +Game_Message.prototype.onChoice = function(n) { + if (this._choiceCallback) { + this._choiceCallback(n); + this._choiceCallback = null; + } +}; + +Game_Message.prototype.hasText = function() { + return this._texts.length > 0; +}; + +Game_Message.prototype.isChoice = function() { + return this._choices.length > 0; +}; + +Game_Message.prototype.isNumberInput = function() { + return this._numInputVariableId > 0; +}; + +Game_Message.prototype.isItemChoice = function() { + return this._itemChoiceVariableId > 0; +}; + +Game_Message.prototype.isBusy = function() { + return ( + this.hasText() || + this.isChoice() || + this.isNumberInput() || + this.isItemChoice() + ); +}; + +Game_Message.prototype.newPage = function() { + if (this._texts.length > 0) { + this._texts[this._texts.length - 1] += "\f"; + } +}; + +Game_Message.prototype.allText = function() { + return this._texts.join("\n"); +}; + +Game_Message.prototype.isRTL = function() { + return Utils.containsArabic(this.allText()); +}; + +//----------------------------------------------------------------------------- +// Game_Switches +// +// The game object class for switches. + +function Game_Switches() { + this.initialize(...arguments); +} + +Game_Switches.prototype.initialize = function() { + this.clear(); +}; + +Game_Switches.prototype.clear = function() { + this._data = []; +}; + +Game_Switches.prototype.value = function(switchId) { + return !!this._data[switchId]; +}; + +Game_Switches.prototype.setValue = function(switchId, value) { + if (switchId > 0 && switchId < $dataSystem.switches.length) { + this._data[switchId] = value; + this.onChange(); + } +}; + +Game_Switches.prototype.onChange = function() { + $gameMap.requestRefresh(); +}; + +//----------------------------------------------------------------------------- +// Game_Variables +// +// The game object class for variables. + +function Game_Variables() { + this.initialize(...arguments); +} + +Game_Variables.prototype.initialize = function() { + this.clear(); +}; + +Game_Variables.prototype.clear = function() { + this._data = []; +}; + +Game_Variables.prototype.value = function(variableId) { + return this._data[variableId] || 0; +}; + +Game_Variables.prototype.setValue = function(variableId, value) { + if (variableId > 0 && variableId < $dataSystem.variables.length) { + if (typeof value === "number") { + value = Math.floor(value); + } + this._data[variableId] = value; + this.onChange(); + } +}; + +Game_Variables.prototype.onChange = function() { + $gameMap.requestRefresh(); +}; + +//----------------------------------------------------------------------------- +// Game_SelfSwitches +// +// The game object class for self switches. + +function Game_SelfSwitches() { + this.initialize(...arguments); +} + +Game_SelfSwitches.prototype.initialize = function() { + this.clear(); +}; + +Game_SelfSwitches.prototype.clear = function() { + this._data = {}; +}; + +Game_SelfSwitches.prototype.value = function(key) { + return !!this._data[key]; +}; + +Game_SelfSwitches.prototype.setValue = function(key, value) { + if (value) { + this._data[key] = true; + } else { + delete this._data[key]; + } + this.onChange(); +}; + +Game_SelfSwitches.prototype.onChange = function() { + $gameMap.requestRefresh(); +}; + +//----------------------------------------------------------------------------- +// Game_Screen +// +// The game object class for screen effect data, such as changes in color tone +// and flashes. + +function Game_Screen() { + this.initialize(...arguments); +} + +Game_Screen.prototype.initialize = function() { + this.clear(); +}; + +Game_Screen.prototype.clear = function() { + this.clearFade(); + this.clearTone(); + this.clearFlash(); + this.clearShake(); + this.clearZoom(); + this.clearWeather(); + this.clearPictures(); +}; + +Game_Screen.prototype.onBattleStart = function() { + this.clearFade(); + this.clearFlash(); + this.clearShake(); + this.clearZoom(); + this.eraseBattlePictures(); +}; + +Game_Screen.prototype.brightness = function() { + return this._brightness; +}; + +Game_Screen.prototype.tone = function() { + return this._tone; +}; + +Game_Screen.prototype.flashColor = function() { + return this._flashColor; +}; + +Game_Screen.prototype.shake = function() { + return this._shake; +}; + +Game_Screen.prototype.zoomX = function() { + return this._zoomX; +}; + +Game_Screen.prototype.zoomY = function() { + return this._zoomY; +}; + +Game_Screen.prototype.zoomScale = function() { + return this._zoomScale; +}; + +Game_Screen.prototype.weatherType = function() { + return this._weatherType; +}; + +Game_Screen.prototype.weatherPower = function() { + return this._weatherPower; +}; + +Game_Screen.prototype.picture = function(pictureId) { + const realPictureId = this.realPictureId(pictureId); + return this._pictures[realPictureId]; +}; + +Game_Screen.prototype.realPictureId = function(pictureId) { + if ($gameParty.inBattle()) { + return pictureId + this.maxPictures(); + } else { + return pictureId; + } +}; + +Game_Screen.prototype.clearFade = function() { + this._brightness = 255; + this._fadeOutDuration = 0; + this._fadeInDuration = 0; +}; + +Game_Screen.prototype.clearTone = function() { + this._tone = [0, 0, 0, 0]; + this._toneTarget = [0, 0, 0, 0]; + this._toneDuration = 0; +}; + +Game_Screen.prototype.clearFlash = function() { + this._flashColor = [0, 0, 0, 0]; + this._flashDuration = 0; +}; + +Game_Screen.prototype.clearShake = function() { + this._shakePower = 0; + this._shakeSpeed = 0; + this._shakeDuration = 0; + this._shakeDirection = 1; + this._shake = 0; +}; + +Game_Screen.prototype.clearZoom = function() { + this._zoomX = 0; + this._zoomY = 0; + this._zoomScale = 1; + this._zoomScaleTarget = 1; + this._zoomDuration = 0; +}; + +Game_Screen.prototype.clearWeather = function() { + this._weatherType = "none"; + this._weatherPower = 0; + this._weatherPowerTarget = 0; + this._weatherDuration = 0; +}; + +Game_Screen.prototype.clearPictures = function() { + this._pictures = []; +}; + +Game_Screen.prototype.eraseBattlePictures = function() { + this._pictures = this._pictures.slice(0, this.maxPictures() + 1); +}; + +Game_Screen.prototype.maxPictures = function() { + return 100; +}; + +Game_Screen.prototype.startFadeOut = function(duration) { + this._fadeOutDuration = duration; + this._fadeInDuration = 0; +}; + +Game_Screen.prototype.startFadeIn = function(duration) { + this._fadeInDuration = duration; + this._fadeOutDuration = 0; +}; + +Game_Screen.prototype.startTint = function(tone, duration) { + this._toneTarget = tone.clone(); + this._toneDuration = duration; + if (this._toneDuration === 0) { + this._tone = this._toneTarget.clone(); + } +}; + +Game_Screen.prototype.startFlash = function(color, duration) { + this._flashColor = color.clone(); + this._flashDuration = duration; +}; + +Game_Screen.prototype.startShake = function(power, speed, duration) { + this._shakePower = power; + this._shakeSpeed = speed; + this._shakeDuration = duration; +}; + +Game_Screen.prototype.startZoom = function(x, y, scale, duration) { + this._zoomX = x; + this._zoomY = y; + this._zoomScaleTarget = scale; + this._zoomDuration = duration; +}; + +Game_Screen.prototype.setZoom = function(x, y, scale) { + this._zoomX = x; + this._zoomY = y; + this._zoomScale = scale; +}; + +Game_Screen.prototype.changeWeather = function(type, power, duration) { + if (type !== "none" || duration === 0) { + this._weatherType = type; + } + this._weatherPowerTarget = type === "none" ? 0 : power; + this._weatherDuration = duration; + if (duration === 0) { + this._weatherPower = this._weatherPowerTarget; + } +}; + +Game_Screen.prototype.update = function() { + this.updateFadeOut(); + this.updateFadeIn(); + this.updateTone(); + this.updateFlash(); + this.updateShake(); + this.updateZoom(); + this.updateWeather(); + this.updatePictures(); +}; + +Game_Screen.prototype.updateFadeOut = function() { + if (this._fadeOutDuration > 0) { + const d = this._fadeOutDuration; + this._brightness = (this._brightness * (d - 1)) / d; + this._fadeOutDuration--; + } +}; + +Game_Screen.prototype.updateFadeIn = function() { + if (this._fadeInDuration > 0) { + const d = this._fadeInDuration; + this._brightness = (this._brightness * (d - 1) + 255) / d; + this._fadeInDuration--; + } +}; + +Game_Screen.prototype.updateTone = function() { + if (this._toneDuration > 0) { + const d = this._toneDuration; + for (let i = 0; i < 4; i++) { + this._tone[i] = (this._tone[i] * (d - 1) + this._toneTarget[i]) / d; + } + this._toneDuration--; + } +}; + +Game_Screen.prototype.updateFlash = function() { + if (this._flashDuration > 0) { + const d = this._flashDuration; + this._flashColor[3] *= (d - 1) / d; + this._flashDuration--; + } +}; + +Game_Screen.prototype.updateShake = function() { + if (this._shakeDuration > 0 || this._shake !== 0) { + const delta = + (this._shakePower * this._shakeSpeed * this._shakeDirection) / 10; + if ( + this._shakeDuration <= 1 && + this._shake * (this._shake + delta) < 0 + ) { + this._shake = 0; + } else { + this._shake += delta; + } + if (this._shake > this._shakePower * 2) { + this._shakeDirection = -1; + } + if (this._shake < -this._shakePower * 2) { + this._shakeDirection = 1; + } + this._shakeDuration--; + } +}; + +Game_Screen.prototype.updateZoom = function() { + if (this._zoomDuration > 0) { + const d = this._zoomDuration; + const t = this._zoomScaleTarget; + this._zoomScale = (this._zoomScale * (d - 1) + t) / d; + this._zoomDuration--; + } +}; + +Game_Screen.prototype.updateWeather = function() { + if (this._weatherDuration > 0) { + const d = this._weatherDuration; + const t = this._weatherPowerTarget; + this._weatherPower = (this._weatherPower * (d - 1) + t) / d; + this._weatherDuration--; + if (this._weatherDuration === 0 && this._weatherPowerTarget === 0) { + this._weatherType = "none"; + } + } +}; + +Game_Screen.prototype.updatePictures = function() { + for (const picture of this._pictures) { + if (picture) { + picture.update(); + } + } +}; + +Game_Screen.prototype.startFlashForDamage = function() { + this.startFlash([255, 0, 0, 128], 8); +}; + +// prettier-ignore +Game_Screen.prototype.showPicture = function( + pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode +) { + const realPictureId = this.realPictureId(pictureId); + const picture = new Game_Picture(); + picture.show(name, origin, x, y, scaleX, scaleY, opacity, blendMode); + this._pictures[realPictureId] = picture; +}; + +// prettier-ignore +Game_Screen.prototype.movePicture = function( + pictureId, origin, x, y, scaleX, scaleY, opacity, blendMode, duration, + easingType +) { + const picture = this.picture(pictureId); + if (picture) { + // prettier-ignore + picture.move(origin, x, y, scaleX, scaleY, opacity, blendMode, + duration, easingType); + } +}; + +Game_Screen.prototype.rotatePicture = function(pictureId, speed) { + const picture = this.picture(pictureId); + if (picture) { + picture.rotate(speed); + } +}; + +Game_Screen.prototype.tintPicture = function(pictureId, tone, duration) { + const picture = this.picture(pictureId); + if (picture) { + picture.tint(tone, duration); + } +}; + +Game_Screen.prototype.erasePicture = function(pictureId) { + const realPictureId = this.realPictureId(pictureId); + this._pictures[realPictureId] = null; +}; + +//----------------------------------------------------------------------------- +// Game_Picture +// +// The game object class for a picture. + +function Game_Picture() { + this.initialize(...arguments); +} + +Game_Picture.prototype.initialize = function() { + this.initBasic(); + this.initTarget(); + this.initTone(); + this.initRotation(); +}; + +Game_Picture.prototype.name = function() { + return this._name; +}; + +Game_Picture.prototype.origin = function() { + return this._origin; +}; + +Game_Picture.prototype.x = function() { + return this._x; +}; + +Game_Picture.prototype.y = function() { + return this._y; +}; + +Game_Picture.prototype.scaleX = function() { + return this._scaleX; +}; + +Game_Picture.prototype.scaleY = function() { + return this._scaleY; +}; + +Game_Picture.prototype.opacity = function() { + return this._opacity; +}; + +Game_Picture.prototype.blendMode = function() { + return this._blendMode; +}; + +Game_Picture.prototype.tone = function() { + return this._tone; +}; + +Game_Picture.prototype.angle = function() { + return this._angle; +}; + +Game_Picture.prototype.initBasic = function() { + this._name = ""; + this._origin = 0; + this._x = 0; + this._y = 0; + this._scaleX = 100; + this._scaleY = 100; + this._opacity = 255; + this._blendMode = 0; +}; + +Game_Picture.prototype.initTarget = function() { + this._targetX = this._x; + this._targetY = this._y; + this._targetScaleX = this._scaleX; + this._targetScaleY = this._scaleY; + this._targetOpacity = this._opacity; + this._duration = 0; + this._wholeDuration = 0; + this._easingType = 0; + this._easingExponent = 0; +}; + +Game_Picture.prototype.initTone = function() { + this._tone = null; + this._toneTarget = null; + this._toneDuration = 0; +}; + +Game_Picture.prototype.initRotation = function() { + this._angle = 0; + this._rotationSpeed = 0; +}; + +// prettier-ignore +Game_Picture.prototype.show = function( + name, origin, x, y, scaleX, scaleY, opacity, blendMode +) { + this._name = name; + this._origin = origin; + this._x = x; + this._y = y; + this._scaleX = scaleX; + this._scaleY = scaleY; + this._opacity = opacity; + this._blendMode = blendMode; + this.initTarget(); + this.initTone(); + this.initRotation(); +}; + +// prettier-ignore +Game_Picture.prototype.move = function( + origin, x, y, scaleX, scaleY, opacity, blendMode, duration, easingType +) { + this._origin = origin; + this._targetX = x; + this._targetY = y; + this._targetScaleX = scaleX; + this._targetScaleY = scaleY; + this._targetOpacity = opacity; + this._blendMode = blendMode; + this._duration = duration; + this._wholeDuration = duration; + this._easingType = easingType; + this._easingExponent = 2; +}; + +Game_Picture.prototype.rotate = function(speed) { + this._rotationSpeed = speed; +}; + +Game_Picture.prototype.tint = function(tone, duration) { + if (!this._tone) { + this._tone = [0, 0, 0, 0]; + } + this._toneTarget = tone.clone(); + this._toneDuration = duration; + if (this._toneDuration === 0) { + this._tone = this._toneTarget.clone(); + } +}; + +Game_Picture.prototype.update = function() { + this.updateMove(); + this.updateTone(); + this.updateRotation(); +}; + +Game_Picture.prototype.updateMove = function() { + if (this._duration > 0) { + this._x = this.applyEasing(this._x, this._targetX); + this._y = this.applyEasing(this._y, this._targetY); + this._scaleX = this.applyEasing(this._scaleX, this._targetScaleX); + this._scaleY = this.applyEasing(this._scaleY, this._targetScaleY); + this._opacity = this.applyEasing(this._opacity, this._targetOpacity); + this._duration--; + } +}; + +Game_Picture.prototype.updateTone = function() { + if (this._toneDuration > 0) { + const d = this._toneDuration; + for (let i = 0; i < 4; i++) { + this._tone[i] = (this._tone[i] * (d - 1) + this._toneTarget[i]) / d; + } + this._toneDuration--; + } +}; + +Game_Picture.prototype.updateRotation = function() { + if (this._rotationSpeed !== 0) { + this._angle += this._rotationSpeed / 2; + } +}; + +Game_Picture.prototype.applyEasing = function(current, target) { + const d = this._duration; + const wd = this._wholeDuration; + const lt = this.calcEasing((wd - d) / wd); + const t = this.calcEasing((wd - d + 1) / wd); + const start = (current - target * lt) / (1 - lt); + return start + (target - start) * t; +}; + +Game_Picture.prototype.calcEasing = function(t) { + const exponent = this._easingExponent; + switch (this._easingType) { + case 1: // Slow start + return this.easeIn(t, exponent); + case 2: // Slow end + return this.easeOut(t, exponent); + case 3: // Slow start and end + return this.easeInOut(t, exponent); + default: + return t; + } +}; + +Game_Picture.prototype.easeIn = function(t, exponent) { + return Math.pow(t, exponent); +}; + +Game_Picture.prototype.easeOut = function(t, exponent) { + return 1 - Math.pow(1 - t, exponent); +}; + +Game_Picture.prototype.easeInOut = function(t, exponent) { + if (t < 0.5) { + return this.easeIn(t * 2, exponent) / 2; + } else { + return this.easeOut(t * 2 - 1, exponent) / 2 + 0.5; + } +}; + +//----------------------------------------------------------------------------- +// Game_Item +// +// The game object class for handling skills, items, weapons, and armor. It is +// required because save data should not include the database object itself. + +function Game_Item() { + this.initialize(...arguments); +} + +Game_Item.prototype.initialize = function(item) { + this._dataClass = ""; + this._itemId = 0; + if (item) { + this.setObject(item); + } +}; + +Game_Item.prototype.isSkill = function() { + return this._dataClass === "skill"; +}; + +Game_Item.prototype.isItem = function() { + return this._dataClass === "item"; +}; + +Game_Item.prototype.isUsableItem = function() { + return this.isSkill() || this.isItem(); +}; + +Game_Item.prototype.isWeapon = function() { + return this._dataClass === "weapon"; +}; + +Game_Item.prototype.isArmor = function() { + return this._dataClass === "armor"; +}; + +Game_Item.prototype.isEquipItem = function() { + return this.isWeapon() || this.isArmor(); +}; + +Game_Item.prototype.isNull = function() { + return this._dataClass === ""; +}; + +Game_Item.prototype.itemId = function() { + return this._itemId; +}; + +Game_Item.prototype.object = function() { + if (this.isSkill()) { + return $dataSkills[this._itemId]; + } else if (this.isItem()) { + return $dataItems[this._itemId]; + } else if (this.isWeapon()) { + return $dataWeapons[this._itemId]; + } else if (this.isArmor()) { + return $dataArmors[this._itemId]; + } else { + return null; + } +}; + +Game_Item.prototype.setObject = function(item) { + if (DataManager.isSkill(item)) { + this._dataClass = "skill"; + } else if (DataManager.isItem(item)) { + this._dataClass = "item"; + } else if (DataManager.isWeapon(item)) { + this._dataClass = "weapon"; + } else if (DataManager.isArmor(item)) { + this._dataClass = "armor"; + } else { + this._dataClass = ""; + } + this._itemId = item ? item.id : 0; +}; + +Game_Item.prototype.setEquip = function(isWeapon, itemId) { + this._dataClass = isWeapon ? "weapon" : "armor"; + this._itemId = itemId; +}; + +//----------------------------------------------------------------------------- +// Game_Action +// +// The game object class for a battle action. + +function Game_Action() { + this.initialize(...arguments); +} + +Game_Action.EFFECT_RECOVER_HP = 11; +Game_Action.EFFECT_RECOVER_MP = 12; +Game_Action.EFFECT_GAIN_TP = 13; +Game_Action.EFFECT_ADD_STATE = 21; +Game_Action.EFFECT_REMOVE_STATE = 22; +Game_Action.EFFECT_ADD_BUFF = 31; +Game_Action.EFFECT_ADD_DEBUFF = 32; +Game_Action.EFFECT_REMOVE_BUFF = 33; +Game_Action.EFFECT_REMOVE_DEBUFF = 34; +Game_Action.EFFECT_SPECIAL = 41; +Game_Action.EFFECT_GROW = 42; +Game_Action.EFFECT_LEARN_SKILL = 43; +Game_Action.EFFECT_COMMON_EVENT = 44; +Game_Action.SPECIAL_EFFECT_ESCAPE = 0; +Game_Action.HITTYPE_CERTAIN = 0; +Game_Action.HITTYPE_PHYSICAL = 1; +Game_Action.HITTYPE_MAGICAL = 2; + +Game_Action.prototype.initialize = function(subject, forcing) { + this._subjectActorId = 0; + this._subjectEnemyIndex = -1; + this._forcing = forcing || false; + this.setSubject(subject); + this.clear(); +}; + +Game_Action.prototype.clear = function() { + this._item = new Game_Item(); + this._targetIndex = -1; +}; + +Game_Action.prototype.setSubject = function(subject) { + if (subject.isActor()) { + this._subjectActorId = subject.actorId(); + this._subjectEnemyIndex = -1; + } else { + this._subjectEnemyIndex = subject.index(); + this._subjectActorId = 0; + } +}; + +Game_Action.prototype.subject = function() { + if (this._subjectActorId > 0) { + return $gameActors.actor(this._subjectActorId); + } else { + return $gameTroop.members()[this._subjectEnemyIndex]; + } +}; + +Game_Action.prototype.friendsUnit = function() { + return this.subject().friendsUnit(); +}; + +Game_Action.prototype.opponentsUnit = function() { + return this.subject().opponentsUnit(); +}; + +Game_Action.prototype.setEnemyAction = function(action) { + if (action) { + this.setSkill(action.skillId); + } else { + this.clear(); + } +}; + +Game_Action.prototype.setAttack = function() { + this.setSkill(this.subject().attackSkillId()); +}; + +Game_Action.prototype.setGuard = function() { + this.setSkill(this.subject().guardSkillId()); +}; + +Game_Action.prototype.setSkill = function(skillId) { + this._item.setObject($dataSkills[skillId]); +}; + +Game_Action.prototype.setItem = function(itemId) { + this._item.setObject($dataItems[itemId]); +}; + +Game_Action.prototype.setItemObject = function(object) { + this._item.setObject(object); +}; + +Game_Action.prototype.setTarget = function(targetIndex) { + this._targetIndex = targetIndex; +}; + +Game_Action.prototype.item = function() { + return this._item.object(); +}; + +Game_Action.prototype.isSkill = function() { + return this._item.isSkill(); +}; + +Game_Action.prototype.isItem = function() { + return this._item.isItem(); +}; + +Game_Action.prototype.numRepeats = function() { + let repeats = this.item().repeats; + if (this.isAttack()) { + repeats += this.subject().attackTimesAdd(); + } + return Math.floor(repeats); +}; + +Game_Action.prototype.checkItemScope = function(list) { + return list.includes(this.item().scope); +}; + +Game_Action.prototype.isForOpponent = function() { + return this.checkItemScope([1, 2, 3, 4, 5, 6, 14]); +}; + +Game_Action.prototype.isForFriend = function() { + return this.checkItemScope([7, 8, 9, 10, 11, 12, 13, 14]); +}; + +Game_Action.prototype.isForEveryone = function() { + return this.checkItemScope([14]); +}; + +Game_Action.prototype.isForAliveFriend = function() { + return this.checkItemScope([7, 8, 11, 14]); +}; + +Game_Action.prototype.isForDeadFriend = function() { + return this.checkItemScope([9, 10]); +}; + +Game_Action.prototype.isForUser = function() { + return this.checkItemScope([11]); +}; + +Game_Action.prototype.isForOne = function() { + return this.checkItemScope([1, 3, 7, 9, 11, 12]); +}; + +Game_Action.prototype.isForRandom = function() { + return this.checkItemScope([3, 4, 5, 6]); +}; + +Game_Action.prototype.isForAll = function() { + return this.checkItemScope([2, 8, 10, 13, 14]); +}; + +Game_Action.prototype.needsSelection = function() { + return this.checkItemScope([1, 7, 9, 12]); +}; + +Game_Action.prototype.numTargets = function() { + return this.isForRandom() ? this.item().scope - 2 : 0; +}; + +Game_Action.prototype.checkDamageType = function(list) { + return list.includes(this.item().damage.type); +}; + +Game_Action.prototype.isHpEffect = function() { + return this.checkDamageType([1, 3, 5]); +}; + +Game_Action.prototype.isMpEffect = function() { + return this.checkDamageType([2, 4, 6]); +}; + +Game_Action.prototype.isDamage = function() { + return this.checkDamageType([1, 2]); +}; + +Game_Action.prototype.isRecover = function() { + return this.checkDamageType([3, 4]); +}; + +Game_Action.prototype.isDrain = function() { + return this.checkDamageType([5, 6]); +}; + +Game_Action.prototype.isHpRecover = function() { + return this.checkDamageType([3]); +}; + +Game_Action.prototype.isMpRecover = function() { + return this.checkDamageType([4]); +}; + +Game_Action.prototype.isCertainHit = function() { + return this.item().hitType === Game_Action.HITTYPE_CERTAIN; +}; + +Game_Action.prototype.isPhysical = function() { + return this.item().hitType === Game_Action.HITTYPE_PHYSICAL; +}; + +Game_Action.prototype.isMagical = function() { + return this.item().hitType === Game_Action.HITTYPE_MAGICAL; +}; + +Game_Action.prototype.isAttack = function() { + return this.item() === $dataSkills[this.subject().attackSkillId()]; +}; + +Game_Action.prototype.isGuard = function() { + return this.item() === $dataSkills[this.subject().guardSkillId()]; +}; + +Game_Action.prototype.isMagicSkill = function() { + if (this.isSkill()) { + return $dataSystem.magicSkills.includes(this.item().stypeId); + } else { + return false; + } +}; + +Game_Action.prototype.decideRandomTarget = function() { + let target; + if (this.isForDeadFriend()) { + target = this.friendsUnit().randomDeadTarget(); + } else if (this.isForFriend()) { + target = this.friendsUnit().randomTarget(); + } else { + target = this.opponentsUnit().randomTarget(); + } + if (target) { + this._targetIndex = target.index(); + } else { + this.clear(); + } +}; + +Game_Action.prototype.setConfusion = function() { + this.setAttack(); +}; + +Game_Action.prototype.prepare = function() { + if (this.subject().isConfused() && !this._forcing) { + this.setConfusion(); + } +}; + +Game_Action.prototype.isValid = function() { + return (this._forcing && this.item()) || this.subject().canUse(this.item()); +}; + +Game_Action.prototype.speed = function() { + const agi = this.subject().agi; + let speed = agi + Math.randomInt(Math.floor(5 + agi / 4)); + if (this.item()) { + speed += this.item().speed; + } + if (this.isAttack()) { + speed += this.subject().attackSpeed(); + } + return speed; +}; + +Game_Action.prototype.makeTargets = function() { + const targets = []; + if (!this._forcing && this.subject().isConfused()) { + targets.push(this.confusionTarget()); + } else if (this.isForEveryone()) { + targets.push(...this.targetsForEveryone()); + } else if (this.isForOpponent()) { + targets.push(...this.targetsForOpponents()); + } else if (this.isForFriend()) { + targets.push(...this.targetsForFriends()); + } + return this.repeatTargets(targets); +}; + +Game_Action.prototype.repeatTargets = function(targets) { + const repeatedTargets = []; + const repeats = this.numRepeats(); + for (const target of targets) { + if (target) { + for (let i = 0; i < repeats; i++) { + repeatedTargets.push(target); + } + } + } + return repeatedTargets; +}; + +Game_Action.prototype.confusionTarget = function() { + switch (this.subject().confusionLevel()) { + case 1: + return this.opponentsUnit().randomTarget(); + case 2: + if (Math.randomInt(2) === 0) { + return this.opponentsUnit().randomTarget(); + } + return this.friendsUnit().randomTarget(); + default: + return this.friendsUnit().randomTarget(); + } +}; + +Game_Action.prototype.targetsForEveryone = function() { + const opponentMembers = this.opponentsUnit().aliveMembers(); + const friendMembers = this.friendsUnit().aliveMembers(); + return opponentMembers.concat(friendMembers); +}; + +Game_Action.prototype.targetsForOpponents = function() { + const unit = this.opponentsUnit(); + if (this.isForRandom()) { + return this.randomTargets(unit); + } else { + return this.targetsForAlive(unit); + } +}; + +Game_Action.prototype.targetsForFriends = function() { + const unit = this.friendsUnit(); + if (this.isForUser()) { + return [this.subject()]; + } else if (this.isForDeadFriend()) { + return this.targetsForDead(unit); + } else if (this.isForAliveFriend()) { + return this.targetsForAlive(unit); + } else { + return this.targetsForDeadAndAlive(unit); + } +}; + +Game_Action.prototype.randomTargets = function(unit) { + const targets = []; + for (let i = 0; i < this.numTargets(); i++) { + targets.push(unit.randomTarget()); + } + return targets; +}; + +Game_Action.prototype.targetsForDead = function(unit) { + if (this.isForOne()) { + return [unit.smoothDeadTarget(this._targetIndex)]; + } else { + return unit.deadMembers(); + } +}; + +Game_Action.prototype.targetsForAlive = function(unit) { + if (this.isForOne()) { + if (this._targetIndex < 0) { + return [unit.randomTarget()]; + } else { + return [unit.smoothTarget(this._targetIndex)]; + } + } else { + return unit.aliveMembers(); + } +}; + +Game_Action.prototype.targetsForDeadAndAlive = function(unit) { + if (this.isForOne()) { + return [unit.members()[this._targetIndex]]; + } else { + return unit.members(); + } +}; + +Game_Action.prototype.evaluate = function() { + let value = 0; + for (const target of this.itemTargetCandidates()) { + const targetValue = this.evaluateWithTarget(target); + if (this.isForAll()) { + value += targetValue; + } else if (targetValue > value) { + value = targetValue; + this._targetIndex = target.index(); + } + } + value *= this.numRepeats(); + if (value > 0) { + value += Math.random(); + } + return value; +}; + +Game_Action.prototype.itemTargetCandidates = function() { + if (!this.isValid()) { + return []; + } else if (this.isForOpponent()) { + return this.opponentsUnit().aliveMembers(); + } else if (this.isForUser()) { + return [this.subject()]; + } else if (this.isForDeadFriend()) { + return this.friendsUnit().deadMembers(); + } else { + return this.friendsUnit().aliveMembers(); + } +}; + +Game_Action.prototype.evaluateWithTarget = function(target) { + if (this.isHpEffect()) { + const value = this.makeDamageValue(target, false); + if (this.isForOpponent()) { + return value / Math.max(target.hp, 1); + } else { + const recovery = Math.min(-value, target.mhp - target.hp); + return recovery / target.mhp; + } + } +}; + +Game_Action.prototype.testApply = function(target) { + return ( + this.testLifeAndDeath(target) && + ($gameParty.inBattle() || + (this.isHpRecover() && target.hp < target.mhp) || + (this.isMpRecover() && target.mp < target.mmp) || + this.hasItemAnyValidEffects(target)) + ); +}; + +Game_Action.prototype.testLifeAndDeath = function(target) { + if (this.isForOpponent() || this.isForAliveFriend()) { + return target.isAlive(); + } else if (this.isForDeadFriend()) { + return target.isDead(); + } else { + return true; + } +}; + +Game_Action.prototype.hasItemAnyValidEffects = function(target) { + return this.item().effects.some(effect => + this.testItemEffect(target, effect) + ); +}; + +Game_Action.prototype.testItemEffect = function(target, effect) { + switch (effect.code) { + case Game_Action.EFFECT_RECOVER_HP: + return ( + target.hp < target.mhp || effect.value1 < 0 || effect.value2 < 0 + ); + case Game_Action.EFFECT_RECOVER_MP: + return ( + target.mp < target.mmp || effect.value1 < 0 || effect.value2 < 0 + ); + case Game_Action.EFFECT_ADD_STATE: + return !target.isStateAffected(effect.dataId); + case Game_Action.EFFECT_REMOVE_STATE: + return target.isStateAffected(effect.dataId); + case Game_Action.EFFECT_ADD_BUFF: + return !target.isMaxBuffAffected(effect.dataId); + case Game_Action.EFFECT_ADD_DEBUFF: + return !target.isMaxDebuffAffected(effect.dataId); + case Game_Action.EFFECT_REMOVE_BUFF: + return target.isBuffAffected(effect.dataId); + case Game_Action.EFFECT_REMOVE_DEBUFF: + return target.isDebuffAffected(effect.dataId); + case Game_Action.EFFECT_LEARN_SKILL: + return target.isActor() && !target.isLearnedSkill(effect.dataId); + default: + return true; + } +}; + +Game_Action.prototype.itemCnt = function(target) { + if (this.isPhysical() && target.canMove()) { + return target.cnt; + } else { + return 0; + } +}; + +Game_Action.prototype.itemMrf = function(target) { + if (this.isMagical()) { + return target.mrf; + } else { + return 0; + } +}; + +Game_Action.prototype.itemHit = function(/*target*/) { + const successRate = this.item().successRate; + if (this.isPhysical()) { + return successRate * 0.01 * this.subject().hit; + } else { + return successRate * 0.01; + } +}; + +Game_Action.prototype.itemEva = function(target) { + if (this.isPhysical()) { + return target.eva; + } else if (this.isMagical()) { + return target.mev; + } else { + return 0; + } +}; + +Game_Action.prototype.itemCri = function(target) { + return this.item().damage.critical + ? this.subject().cri * (1 - target.cev) + : 0; +}; + +Game_Action.prototype.apply = function(target) { + const result = target.result(); + this.subject().clearResult(); + result.clear(); + result.used = this.testApply(target); + result.missed = result.used && Math.random() >= this.itemHit(target); + result.evaded = !result.missed && Math.random() < this.itemEva(target); + result.physical = this.isPhysical(); + result.drain = this.isDrain(); + if (result.isHit()) { + if (this.item().damage.type > 0) { + result.critical = Math.random() < this.itemCri(target); + const value = this.makeDamageValue(target, result.critical); + this.executeDamage(target, value); + } + for (const effect of this.item().effects) { + this.applyItemEffect(target, effect); + } + this.applyItemUserEffect(target); + } + this.updateLastTarget(target); +}; + +Game_Action.prototype.makeDamageValue = function(target, critical) { + const item = this.item(); + const baseValue = this.evalDamageFormula(target); + let value = baseValue * this.calcElementRate(target); + if (this.isPhysical()) { + value *= target.pdr; + } + if (this.isMagical()) { + value *= target.mdr; + } + if (baseValue < 0) { + value *= target.rec; + } + if (critical) { + value = this.applyCritical(value); + } + value = this.applyVariance(value, item.damage.variance); + value = this.applyGuard(value, target); + value = Math.round(value); + return value; +}; + +Game_Action.prototype.evalDamageFormula = function(target) { + try { + const item = this.item(); + const a = this.subject(); // eslint-disable-line no-unused-vars + const b = target; // eslint-disable-line no-unused-vars + const v = $gameVariables._data; // eslint-disable-line no-unused-vars + const sign = [3, 4].includes(item.damage.type) ? -1 : 1; + const value = Math.max(eval(item.damage.formula), 0) * sign; + return isNaN(value) ? 0 : value; + } catch (e) { + return 0; + } +}; + +Game_Action.prototype.calcElementRate = function(target) { + if (this.item().damage.elementId < 0) { + return this.elementsMaxRate(target, this.subject().attackElements()); + } else { + return target.elementRate(this.item().damage.elementId); + } +}; + +Game_Action.prototype.elementsMaxRate = function(target, elements) { + if (elements.length > 0) { + const rates = elements.map(elementId => target.elementRate(elementId)); + return Math.max(...rates); + } else { + return 1; + } +}; + +Game_Action.prototype.applyCritical = function(damage) { + return damage * 3; +}; + +Game_Action.prototype.applyVariance = function(damage, variance) { + const amp = Math.floor(Math.max((Math.abs(damage) * variance) / 100, 0)); + const v = Math.randomInt(amp + 1) + Math.randomInt(amp + 1) - amp; + return damage >= 0 ? damage + v : damage - v; +}; + +Game_Action.prototype.applyGuard = function(damage, target) { + return damage / (damage > 0 && target.isGuard() ? 2 * target.grd : 1); +}; + +Game_Action.prototype.executeDamage = function(target, value) { + const result = target.result(); + if (value === 0) { + result.critical = false; + } + if (this.isHpEffect()) { + this.executeHpDamage(target, value); + } + if (this.isMpEffect()) { + this.executeMpDamage(target, value); + } +}; + +Game_Action.prototype.executeHpDamage = function(target, value) { + if (this.isDrain()) { + value = Math.min(target.hp, value); + } + this.makeSuccess(target); + target.gainHp(-value); + if (value > 0) { + target.onDamage(value); + } + this.gainDrainedHp(value); +}; + +Game_Action.prototype.executeMpDamage = function(target, value) { + if (!this.isMpRecover()) { + value = Math.min(target.mp, value); + } + if (value !== 0) { + this.makeSuccess(target); + } + target.gainMp(-value); + this.gainDrainedMp(value); +}; + +Game_Action.prototype.gainDrainedHp = function(value) { + if (this.isDrain()) { + let gainTarget = this.subject(); + if (this._reflectionTarget) { + gainTarget = this._reflectionTarget; + } + gainTarget.gainHp(value); + } +}; + +Game_Action.prototype.gainDrainedMp = function(value) { + if (this.isDrain()) { + let gainTarget = this.subject(); + if (this._reflectionTarget) { + gainTarget = this._reflectionTarget; + } + gainTarget.gainMp(value); + } +}; + +Game_Action.prototype.applyItemEffect = function(target, effect) { + switch (effect.code) { + case Game_Action.EFFECT_RECOVER_HP: + this.itemEffectRecoverHp(target, effect); + break; + case Game_Action.EFFECT_RECOVER_MP: + this.itemEffectRecoverMp(target, effect); + break; + case Game_Action.EFFECT_GAIN_TP: + this.itemEffectGainTp(target, effect); + break; + case Game_Action.EFFECT_ADD_STATE: + this.itemEffectAddState(target, effect); + break; + case Game_Action.EFFECT_REMOVE_STATE: + this.itemEffectRemoveState(target, effect); + break; + case Game_Action.EFFECT_ADD_BUFF: + this.itemEffectAddBuff(target, effect); + break; + case Game_Action.EFFECT_ADD_DEBUFF: + this.itemEffectAddDebuff(target, effect); + break; + case Game_Action.EFFECT_REMOVE_BUFF: + this.itemEffectRemoveBuff(target, effect); + break; + case Game_Action.EFFECT_REMOVE_DEBUFF: + this.itemEffectRemoveDebuff(target, effect); + break; + case Game_Action.EFFECT_SPECIAL: + this.itemEffectSpecial(target, effect); + break; + case Game_Action.EFFECT_GROW: + this.itemEffectGrow(target, effect); + break; + case Game_Action.EFFECT_LEARN_SKILL: + this.itemEffectLearnSkill(target, effect); + break; + case Game_Action.EFFECT_COMMON_EVENT: + this.itemEffectCommonEvent(target, effect); + break; + } +}; + +Game_Action.prototype.itemEffectRecoverHp = function(target, effect) { + let value = (target.mhp * effect.value1 + effect.value2) * target.rec; + if (this.isItem()) { + value *= this.subject().pha; + } + value = Math.floor(value); + if (value !== 0) { + target.gainHp(value); + this.makeSuccess(target); + } +}; + +Game_Action.prototype.itemEffectRecoverMp = function(target, effect) { + let value = (target.mmp * effect.value1 + effect.value2) * target.rec; + if (this.isItem()) { + value *= this.subject().pha; + } + value = Math.floor(value); + if (value !== 0) { + target.gainMp(value); + this.makeSuccess(target); + } +}; + +Game_Action.prototype.itemEffectGainTp = function(target, effect) { + let value = Math.floor(effect.value1); + if (value !== 0) { + target.gainTp(value); + this.makeSuccess(target); + } +}; + +Game_Action.prototype.itemEffectAddState = function(target, effect) { + if (effect.dataId === 0) { + this.itemEffectAddAttackState(target, effect); + } else { + this.itemEffectAddNormalState(target, effect); + } +}; + +Game_Action.prototype.itemEffectAddAttackState = function(target, effect) { + for (const stateId of this.subject().attackStates()) { + let chance = effect.value1; + chance *= target.stateRate(stateId); + chance *= this.subject().attackStatesRate(stateId); + chance *= this.lukEffectRate(target); + if (Math.random() < chance) { + target.addState(stateId); + this.makeSuccess(target); + } + } +}; + +Game_Action.prototype.itemEffectAddNormalState = function(target, effect) { + let chance = effect.value1; + if (!this.isCertainHit()) { + chance *= target.stateRate(effect.dataId); + chance *= this.lukEffectRate(target); + } + if (Math.random() < chance) { + target.addState(effect.dataId); + this.makeSuccess(target); + } +}; + +Game_Action.prototype.itemEffectRemoveState = function(target, effect) { + let chance = effect.value1; + if (Math.random() < chance) { + target.removeState(effect.dataId); + this.makeSuccess(target); + } +}; + +Game_Action.prototype.itemEffectAddBuff = function(target, effect) { + target.addBuff(effect.dataId, effect.value1); + this.makeSuccess(target); +}; + +Game_Action.prototype.itemEffectAddDebuff = function(target, effect) { + let chance = target.debuffRate(effect.dataId) * this.lukEffectRate(target); + if (Math.random() < chance) { + target.addDebuff(effect.dataId, effect.value1); + this.makeSuccess(target); + } +}; + +Game_Action.prototype.itemEffectRemoveBuff = function(target, effect) { + if (target.isBuffAffected(effect.dataId)) { + target.removeBuff(effect.dataId); + this.makeSuccess(target); + } +}; + +Game_Action.prototype.itemEffectRemoveDebuff = function(target, effect) { + if (target.isDebuffAffected(effect.dataId)) { + target.removeBuff(effect.dataId); + this.makeSuccess(target); + } +}; + +Game_Action.prototype.itemEffectSpecial = function(target, effect) { + if (effect.dataId === Game_Action.SPECIAL_EFFECT_ESCAPE) { + target.escape(); + this.makeSuccess(target); + } +}; + +Game_Action.prototype.itemEffectGrow = function(target, effect) { + target.addParam(effect.dataId, Math.floor(effect.value1)); + this.makeSuccess(target); +}; + +Game_Action.prototype.itemEffectLearnSkill = function(target, effect) { + if (target.isActor()) { + target.learnSkill(effect.dataId); + this.makeSuccess(target); + } +}; + +Game_Action.prototype.itemEffectCommonEvent = function(/*target, effect*/) { + // +}; + +Game_Action.prototype.makeSuccess = function(target) { + target.result().success = true; +}; + +Game_Action.prototype.applyItemUserEffect = function(/*target*/) { + const value = Math.floor(this.item().tpGain * this.subject().tcr); + this.subject().gainSilentTp(value); +}; + +Game_Action.prototype.lukEffectRate = function(target) { + return Math.max(1.0 + (this.subject().luk - target.luk) * 0.001, 0.0); +}; + +Game_Action.prototype.applyGlobal = function() { + for (const effect of this.item().effects) { + if (effect.code === Game_Action.EFFECT_COMMON_EVENT) { + $gameTemp.reserveCommonEvent(effect.dataId); + } + } + this.updateLastUsed(); + this.updateLastSubject(); +}; + +Game_Action.prototype.updateLastUsed = function() { + const item = this.item(); + if (DataManager.isSkill(item)) { + $gameTemp.setLastUsedSkillId(item.id); + } else if (DataManager.isItem(item)) { + $gameTemp.setLastUsedItemId(item.id); + } +}; + +Game_Action.prototype.updateLastSubject = function() { + const subject = this.subject(); + if (subject.isActor()) { + $gameTemp.setLastSubjectActorId(subject.actorId()); + } else { + $gameTemp.setLastSubjectEnemyIndex(subject.index() + 1); + } +}; + +Game_Action.prototype.updateLastTarget = function(target) { + if (target.isActor()) { + $gameTemp.setLastTargetActorId(target.actorId()); + } else { + $gameTemp.setLastTargetEnemyIndex(target.index() + 1); + } +}; + +//----------------------------------------------------------------------------- +// Game_ActionResult +// +// The game object class for a result of a battle action. For convinience, all +// member variables in this class are public. + +function Game_ActionResult() { + this.initialize(...arguments); +} + +Game_ActionResult.prototype.initialize = function() { + this.clear(); +}; + +Game_ActionResult.prototype.clear = function() { + this.used = false; + this.missed = false; + this.evaded = false; + this.physical = false; + this.drain = false; + this.critical = false; + this.success = false; + this.hpAffected = false; + this.hpDamage = 0; + this.mpDamage = 0; + this.tpDamage = 0; + this.addedStates = []; + this.removedStates = []; + this.addedBuffs = []; + this.addedDebuffs = []; + this.removedBuffs = []; +}; + +Game_ActionResult.prototype.addedStateObjects = function() { + return this.addedStates.map(id => $dataStates[id]); +}; + +Game_ActionResult.prototype.removedStateObjects = function() { + return this.removedStates.map(id => $dataStates[id]); +}; + +Game_ActionResult.prototype.isStatusAffected = function() { + return ( + this.addedStates.length > 0 || + this.removedStates.length > 0 || + this.addedBuffs.length > 0 || + this.addedDebuffs.length > 0 || + this.removedBuffs.length > 0 + ); +}; + +Game_ActionResult.prototype.isHit = function() { + return this.used && !this.missed && !this.evaded; +}; + +Game_ActionResult.prototype.isStateAdded = function(stateId) { + return this.addedStates.includes(stateId); +}; + +Game_ActionResult.prototype.pushAddedState = function(stateId) { + if (!this.isStateAdded(stateId)) { + this.addedStates.push(stateId); + } +}; + +Game_ActionResult.prototype.isStateRemoved = function(stateId) { + return this.removedStates.includes(stateId); +}; + +Game_ActionResult.prototype.pushRemovedState = function(stateId) { + if (!this.isStateRemoved(stateId)) { + this.removedStates.push(stateId); + } +}; + +Game_ActionResult.prototype.isBuffAdded = function(paramId) { + return this.addedBuffs.includes(paramId); +}; + +Game_ActionResult.prototype.pushAddedBuff = function(paramId) { + if (!this.isBuffAdded(paramId)) { + this.addedBuffs.push(paramId); + } +}; + +Game_ActionResult.prototype.isDebuffAdded = function(paramId) { + return this.addedDebuffs.includes(paramId); +}; + +Game_ActionResult.prototype.pushAddedDebuff = function(paramId) { + if (!this.isDebuffAdded(paramId)) { + this.addedDebuffs.push(paramId); + } +}; + +Game_ActionResult.prototype.isBuffRemoved = function(paramId) { + return this.removedBuffs.includes(paramId); +}; + +Game_ActionResult.prototype.pushRemovedBuff = function(paramId) { + if (!this.isBuffRemoved(paramId)) { + this.removedBuffs.push(paramId); + } +}; + +//----------------------------------------------------------------------------- +// Game_BattlerBase +// +// The superclass of Game_Battler. It mainly contains parameters calculation. + +function Game_BattlerBase() { + this.initialize(...arguments); +} + +Game_BattlerBase.TRAIT_ELEMENT_RATE = 11; +Game_BattlerBase.TRAIT_DEBUFF_RATE = 12; +Game_BattlerBase.TRAIT_STATE_RATE = 13; +Game_BattlerBase.TRAIT_STATE_RESIST = 14; +Game_BattlerBase.TRAIT_PARAM = 21; +Game_BattlerBase.TRAIT_XPARAM = 22; +Game_BattlerBase.TRAIT_SPARAM = 23; +Game_BattlerBase.TRAIT_ATTACK_ELEMENT = 31; +Game_BattlerBase.TRAIT_ATTACK_STATE = 32; +Game_BattlerBase.TRAIT_ATTACK_SPEED = 33; +Game_BattlerBase.TRAIT_ATTACK_TIMES = 34; +Game_BattlerBase.TRAIT_ATTACK_SKILL = 35; +Game_BattlerBase.TRAIT_STYPE_ADD = 41; +Game_BattlerBase.TRAIT_STYPE_SEAL = 42; +Game_BattlerBase.TRAIT_SKILL_ADD = 43; +Game_BattlerBase.TRAIT_SKILL_SEAL = 44; +Game_BattlerBase.TRAIT_EQUIP_WTYPE = 51; +Game_BattlerBase.TRAIT_EQUIP_ATYPE = 52; +Game_BattlerBase.TRAIT_EQUIP_LOCK = 53; +Game_BattlerBase.TRAIT_EQUIP_SEAL = 54; +Game_BattlerBase.TRAIT_SLOT_TYPE = 55; +Game_BattlerBase.TRAIT_ACTION_PLUS = 61; +Game_BattlerBase.TRAIT_SPECIAL_FLAG = 62; +Game_BattlerBase.TRAIT_COLLAPSE_TYPE = 63; +Game_BattlerBase.TRAIT_PARTY_ABILITY = 64; +Game_BattlerBase.FLAG_ID_AUTO_BATTLE = 0; +Game_BattlerBase.FLAG_ID_GUARD = 1; +Game_BattlerBase.FLAG_ID_SUBSTITUTE = 2; +Game_BattlerBase.FLAG_ID_PRESERVE_TP = 3; +Game_BattlerBase.ICON_BUFF_START = 32; +Game_BattlerBase.ICON_DEBUFF_START = 48; + +Object.defineProperties(Game_BattlerBase.prototype, { + // Hit Points + hp: { + get: function() { + return this._hp; + }, + configurable: true + }, + // Magic Points + mp: { + get: function() { + return this._mp; + }, + configurable: true + }, + // Tactical Points + tp: { + get: function() { + return this._tp; + }, + configurable: true + }, + // Maximum Hit Points + mhp: { + get: function() { + return this.param(0); + }, + configurable: true + }, + // Maximum Magic Points + mmp: { + get: function() { + return this.param(1); + }, + configurable: true + }, + // ATtacK power + atk: { + get: function() { + return this.param(2); + }, + configurable: true + }, + // DEFense power + def: { + get: function() { + return this.param(3); + }, + configurable: true + }, + // Magic ATtack power + mat: { + get: function() { + return this.param(4); + }, + configurable: true + }, + // Magic DeFense power + mdf: { + get: function() { + return this.param(5); + }, + configurable: true + }, + // AGIlity + agi: { + get: function() { + return this.param(6); + }, + configurable: true + }, + // LUcK + luk: { + get: function() { + return this.param(7); + }, + configurable: true + }, + // HIT rate + hit: { + get: function() { + return this.xparam(0); + }, + configurable: true + }, + // EVAsion rate + eva: { + get: function() { + return this.xparam(1); + }, + configurable: true + }, + // CRItical rate + cri: { + get: function() { + return this.xparam(2); + }, + configurable: true + }, + // Critical EVasion rate + cev: { + get: function() { + return this.xparam(3); + }, + configurable: true + }, + // Magic EVasion rate + mev: { + get: function() { + return this.xparam(4); + }, + configurable: true + }, + // Magic ReFlection rate + mrf: { + get: function() { + return this.xparam(5); + }, + configurable: true + }, + // CouNTer attack rate + cnt: { + get: function() { + return this.xparam(6); + }, + configurable: true + }, + // Hp ReGeneration rate + hrg: { + get: function() { + return this.xparam(7); + }, + configurable: true + }, + // Mp ReGeneration rate + mrg: { + get: function() { + return this.xparam(8); + }, + configurable: true + }, + // Tp ReGeneration rate + trg: { + get: function() { + return this.xparam(9); + }, + configurable: true + }, + // TarGet Rate + tgr: { + get: function() { + return this.sparam(0); + }, + configurable: true + }, + // GuaRD effect rate + grd: { + get: function() { + return this.sparam(1); + }, + configurable: true + }, + // RECovery effect rate + rec: { + get: function() { + return this.sparam(2); + }, + configurable: true + }, + // PHArmacology + pha: { + get: function() { + return this.sparam(3); + }, + configurable: true + }, + // Mp Cost Rate + mcr: { + get: function() { + return this.sparam(4); + }, + configurable: true + }, + // Tp Charge Rate + tcr: { + get: function() { + return this.sparam(5); + }, + configurable: true + }, + // Physical Damage Rate + pdr: { + get: function() { + return this.sparam(6); + }, + configurable: true + }, + // Magic Damage Rate + mdr: { + get: function() { + return this.sparam(7); + }, + configurable: true + }, + // Floor Damage Rate + fdr: { + get: function() { + return this.sparam(8); + }, + configurable: true + }, + // EXperience Rate + exr: { + get: function() { + return this.sparam(9); + }, + configurable: true + } +}); + +Game_BattlerBase.prototype.initialize = function() { + this.initMembers(); +}; + +Game_BattlerBase.prototype.initMembers = function() { + this._hp = 1; + this._mp = 0; + this._tp = 0; + this._hidden = false; + this.clearParamPlus(); + this.clearStates(); + this.clearBuffs(); +}; + +Game_BattlerBase.prototype.clearParamPlus = function() { + this._paramPlus = [0, 0, 0, 0, 0, 0, 0, 0]; +}; + +Game_BattlerBase.prototype.clearStates = function() { + this._states = []; + this._stateTurns = {}; +}; + +Game_BattlerBase.prototype.eraseState = function(stateId) { + this._states.remove(stateId); + delete this._stateTurns[stateId]; +}; + +Game_BattlerBase.prototype.isStateAffected = function(stateId) { + return this._states.includes(stateId); +}; + +Game_BattlerBase.prototype.isDeathStateAffected = function() { + return this.isStateAffected(this.deathStateId()); +}; + +Game_BattlerBase.prototype.deathStateId = function() { + return 1; +}; + +Game_BattlerBase.prototype.resetStateCounts = function(stateId) { + const state = $dataStates[stateId]; + const variance = 1 + Math.max(state.maxTurns - state.minTurns, 0); + this._stateTurns[stateId] = state.minTurns + Math.randomInt(variance); +}; + +Game_BattlerBase.prototype.isStateExpired = function(stateId) { + return this._stateTurns[stateId] === 0; +}; + +Game_BattlerBase.prototype.updateStateTurns = function() { + for (const stateId of this._states) { + if (this._stateTurns[stateId] > 0) { + this._stateTurns[stateId]--; + } + } +}; + +Game_BattlerBase.prototype.clearBuffs = function() { + this._buffs = [0, 0, 0, 0, 0, 0, 0, 0]; + this._buffTurns = [0, 0, 0, 0, 0, 0, 0, 0]; +}; + +Game_BattlerBase.prototype.eraseBuff = function(paramId) { + this._buffs[paramId] = 0; + this._buffTurns[paramId] = 0; +}; + +Game_BattlerBase.prototype.buffLength = function() { + return this._buffs.length; +}; + +Game_BattlerBase.prototype.buff = function(paramId) { + return this._buffs[paramId]; +}; + +Game_BattlerBase.prototype.isBuffAffected = function(paramId) { + return this._buffs[paramId] > 0; +}; + +Game_BattlerBase.prototype.isDebuffAffected = function(paramId) { + return this._buffs[paramId] < 0; +}; + +Game_BattlerBase.prototype.isBuffOrDebuffAffected = function(paramId) { + return this._buffs[paramId] !== 0; +}; + +Game_BattlerBase.prototype.isMaxBuffAffected = function(paramId) { + return this._buffs[paramId] === 2; +}; + +Game_BattlerBase.prototype.isMaxDebuffAffected = function(paramId) { + return this._buffs[paramId] === -2; +}; + +Game_BattlerBase.prototype.increaseBuff = function(paramId) { + if (!this.isMaxBuffAffected(paramId)) { + this._buffs[paramId]++; + } +}; + +Game_BattlerBase.prototype.decreaseBuff = function(paramId) { + if (!this.isMaxDebuffAffected(paramId)) { + this._buffs[paramId]--; + } +}; + +Game_BattlerBase.prototype.overwriteBuffTurns = function(paramId, turns) { + if (this._buffTurns[paramId] < turns) { + this._buffTurns[paramId] = turns; + } +}; + +Game_BattlerBase.prototype.isBuffExpired = function(paramId) { + return this._buffTurns[paramId] === 0; +}; + +Game_BattlerBase.prototype.updateBuffTurns = function() { + for (let i = 0; i < this._buffTurns.length; i++) { + if (this._buffTurns[i] > 0) { + this._buffTurns[i]--; + } + } +}; + +Game_BattlerBase.prototype.die = function() { + this._hp = 0; + this.clearStates(); + this.clearBuffs(); +}; + +Game_BattlerBase.prototype.revive = function() { + if (this._hp === 0) { + this._hp = 1; + } +}; + +Game_BattlerBase.prototype.states = function() { + return this._states.map(id => $dataStates[id]); +}; + +Game_BattlerBase.prototype.stateIcons = function() { + return this.states() + .map(state => state.iconIndex) + .filter(iconIndex => iconIndex > 0); +}; + +Game_BattlerBase.prototype.buffIcons = function() { + const icons = []; + for (let i = 0; i < this._buffs.length; i++) { + if (this._buffs[i] !== 0) { + icons.push(this.buffIconIndex(this._buffs[i], i)); + } + } + return icons; +}; + +Game_BattlerBase.prototype.buffIconIndex = function(buffLevel, paramId) { + if (buffLevel > 0) { + return Game_BattlerBase.ICON_BUFF_START + (buffLevel - 1) * 8 + paramId; + } else if (buffLevel < 0) { + return ( + Game_BattlerBase.ICON_DEBUFF_START + (-buffLevel - 1) * 8 + paramId + ); + } else { + return 0; + } +}; + +Game_BattlerBase.prototype.allIcons = function() { + return this.stateIcons().concat(this.buffIcons()); +}; + +Game_BattlerBase.prototype.traitObjects = function() { + // Returns an array of the all objects having traits. States only here. + return this.states(); +}; + +Game_BattlerBase.prototype.allTraits = function() { + return this.traitObjects().reduce((r, obj) => r.concat(obj.traits), []); +}; + +Game_BattlerBase.prototype.traits = function(code) { + return this.allTraits().filter(trait => trait.code === code); +}; + +Game_BattlerBase.prototype.traitsWithId = function(code, id) { + return this.allTraits().filter( + trait => trait.code === code && trait.dataId === id + ); +}; + +Game_BattlerBase.prototype.traitsPi = function(code, id) { + return this.traitsWithId(code, id).reduce((r, trait) => r * trait.value, 1); +}; + +Game_BattlerBase.prototype.traitsSum = function(code, id) { + return this.traitsWithId(code, id).reduce((r, trait) => r + trait.value, 0); +}; + +Game_BattlerBase.prototype.traitsSumAll = function(code) { + return this.traits(code).reduce((r, trait) => r + trait.value, 0); +}; + +Game_BattlerBase.prototype.traitsSet = function(code) { + return this.traits(code).reduce((r, trait) => r.concat(trait.dataId), []); +}; + +Game_BattlerBase.prototype.paramBase = function(/*paramId*/) { + return 0; +}; + +Game_BattlerBase.prototype.paramPlus = function(paramId) { + return this._paramPlus[paramId]; +}; + +Game_BattlerBase.prototype.paramBasePlus = function(paramId) { + return Math.max(0, this.paramBase(paramId) + this.paramPlus(paramId)); +}; + +Game_BattlerBase.prototype.paramMin = function(paramId) { + if (paramId === 0) { + return 1; // MHP + } else { + return 0; + } +}; + +Game_BattlerBase.prototype.paramMax = function(/*paramId*/) { + return Infinity; +}; + +Game_BattlerBase.prototype.paramRate = function(paramId) { + return this.traitsPi(Game_BattlerBase.TRAIT_PARAM, paramId); +}; + +Game_BattlerBase.prototype.paramBuffRate = function(paramId) { + return this._buffs[paramId] * 0.25 + 1.0; +}; + +Game_BattlerBase.prototype.param = function(paramId) { + const value = + this.paramBasePlus(paramId) * + this.paramRate(paramId) * + this.paramBuffRate(paramId); + const maxValue = this.paramMax(paramId); + const minValue = this.paramMin(paramId); + return Math.round(value.clamp(minValue, maxValue)); +}; + +Game_BattlerBase.prototype.xparam = function(xparamId) { + return this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId); +}; + +Game_BattlerBase.prototype.sparam = function(sparamId) { + return this.traitsPi(Game_BattlerBase.TRAIT_SPARAM, sparamId); +}; + +Game_BattlerBase.prototype.elementRate = function(elementId) { + return this.traitsPi(Game_BattlerBase.TRAIT_ELEMENT_RATE, elementId); +}; + +Game_BattlerBase.prototype.debuffRate = function(paramId) { + return this.traitsPi(Game_BattlerBase.TRAIT_DEBUFF_RATE, paramId); +}; + +Game_BattlerBase.prototype.stateRate = function(stateId) { + return this.traitsPi(Game_BattlerBase.TRAIT_STATE_RATE, stateId); +}; + +Game_BattlerBase.prototype.stateResistSet = function() { + return this.traitsSet(Game_BattlerBase.TRAIT_STATE_RESIST); +}; + +Game_BattlerBase.prototype.isStateResist = function(stateId) { + return this.stateResistSet().includes(stateId); +}; + +Game_BattlerBase.prototype.attackElements = function() { + return this.traitsSet(Game_BattlerBase.TRAIT_ATTACK_ELEMENT); +}; + +Game_BattlerBase.prototype.attackStates = function() { + return this.traitsSet(Game_BattlerBase.TRAIT_ATTACK_STATE); +}; + +Game_BattlerBase.prototype.attackStatesRate = function(stateId) { + return this.traitsSum(Game_BattlerBase.TRAIT_ATTACK_STATE, stateId); +}; + +Game_BattlerBase.prototype.attackSpeed = function() { + return this.traitsSumAll(Game_BattlerBase.TRAIT_ATTACK_SPEED); +}; + +Game_BattlerBase.prototype.attackTimesAdd = function() { + return Math.max(this.traitsSumAll(Game_BattlerBase.TRAIT_ATTACK_TIMES), 0); +}; + +Game_BattlerBase.prototype.attackSkillId = function() { + const set = this.traitsSet(Game_BattlerBase.TRAIT_ATTACK_SKILL); + return set.length > 0 ? Math.max(...set) : 1; +}; + +Game_BattlerBase.prototype.addedSkillTypes = function() { + return this.traitsSet(Game_BattlerBase.TRAIT_STYPE_ADD); +}; + +Game_BattlerBase.prototype.isSkillTypeSealed = function(stypeId) { + return this.traitsSet(Game_BattlerBase.TRAIT_STYPE_SEAL).includes(stypeId); +}; + +Game_BattlerBase.prototype.addedSkills = function() { + return this.traitsSet(Game_BattlerBase.TRAIT_SKILL_ADD); +}; + +Game_BattlerBase.prototype.isSkillSealed = function(skillId) { + return this.traitsSet(Game_BattlerBase.TRAIT_SKILL_SEAL).includes(skillId); +}; + +Game_BattlerBase.prototype.isEquipWtypeOk = function(wtypeId) { + return this.traitsSet(Game_BattlerBase.TRAIT_EQUIP_WTYPE).includes(wtypeId); +}; + +Game_BattlerBase.prototype.isEquipAtypeOk = function(atypeId) { + return this.traitsSet(Game_BattlerBase.TRAIT_EQUIP_ATYPE).includes(atypeId); +}; + +Game_BattlerBase.prototype.isEquipTypeLocked = function(etypeId) { + return this.traitsSet(Game_BattlerBase.TRAIT_EQUIP_LOCK).includes(etypeId); +}; + +Game_BattlerBase.prototype.isEquipTypeSealed = function(etypeId) { + return this.traitsSet(Game_BattlerBase.TRAIT_EQUIP_SEAL).includes(etypeId); +}; + +Game_BattlerBase.prototype.slotType = function() { + const set = this.traitsSet(Game_BattlerBase.TRAIT_SLOT_TYPE); + return set.length > 0 ? Math.max(...set) : 0; +}; + +Game_BattlerBase.prototype.isDualWield = function() { + return this.slotType() === 1; +}; + +Game_BattlerBase.prototype.actionPlusSet = function() { + return this.traits(Game_BattlerBase.TRAIT_ACTION_PLUS).map( + trait => trait.value + ); +}; + +Game_BattlerBase.prototype.specialFlag = function(flagId) { + return this.traits(Game_BattlerBase.TRAIT_SPECIAL_FLAG).some( + trait => trait.dataId === flagId + ); +}; + +Game_BattlerBase.prototype.collapseType = function() { + const set = this.traitsSet(Game_BattlerBase.TRAIT_COLLAPSE_TYPE); + return set.length > 0 ? Math.max(...set) : 0; +}; + +Game_BattlerBase.prototype.partyAbility = function(abilityId) { + return this.traits(Game_BattlerBase.TRAIT_PARTY_ABILITY).some( + trait => trait.dataId === abilityId + ); +}; + +Game_BattlerBase.prototype.isAutoBattle = function() { + return this.specialFlag(Game_BattlerBase.FLAG_ID_AUTO_BATTLE); +}; + +Game_BattlerBase.prototype.isGuard = function() { + return this.specialFlag(Game_BattlerBase.FLAG_ID_GUARD) && this.canMove(); +}; + +Game_BattlerBase.prototype.isSubstitute = function() { + return ( + this.specialFlag(Game_BattlerBase.FLAG_ID_SUBSTITUTE) && this.canMove() + ); +}; + +Game_BattlerBase.prototype.isPreserveTp = function() { + return this.specialFlag(Game_BattlerBase.FLAG_ID_PRESERVE_TP); +}; + +Game_BattlerBase.prototype.addParam = function(paramId, value) { + this._paramPlus[paramId] += value; + this.refresh(); +}; + +Game_BattlerBase.prototype.setHp = function(hp) { + this._hp = hp; + this.refresh(); +}; + +Game_BattlerBase.prototype.setMp = function(mp) { + this._mp = mp; + this.refresh(); +}; + +Game_BattlerBase.prototype.setTp = function(tp) { + this._tp = tp; + this.refresh(); +}; + +Game_BattlerBase.prototype.maxTp = function() { + return 100; +}; + +Game_BattlerBase.prototype.refresh = function() { + for (const stateId of this.stateResistSet()) { + this.eraseState(stateId); + } + this._hp = this._hp.clamp(0, this.mhp); + this._mp = this._mp.clamp(0, this.mmp); + this._tp = this._tp.clamp(0, this.maxTp()); +}; + +Game_BattlerBase.prototype.recoverAll = function() { + this.clearStates(); + this._hp = this.mhp; + this._mp = this.mmp; +}; + +Game_BattlerBase.prototype.hpRate = function() { + return this.hp / this.mhp; +}; + +Game_BattlerBase.prototype.mpRate = function() { + return this.mmp > 0 ? this.mp / this.mmp : 0; +}; + +Game_BattlerBase.prototype.tpRate = function() { + return this.tp / this.maxTp(); +}; + +Game_BattlerBase.prototype.hide = function() { + this._hidden = true; +}; + +Game_BattlerBase.prototype.appear = function() { + this._hidden = false; +}; + +Game_BattlerBase.prototype.isHidden = function() { + return this._hidden; +}; + +Game_BattlerBase.prototype.isAppeared = function() { + return !this.isHidden(); +}; + +Game_BattlerBase.prototype.isDead = function() { + return this.isAppeared() && this.isDeathStateAffected(); +}; + +Game_BattlerBase.prototype.isAlive = function() { + return this.isAppeared() && !this.isDeathStateAffected(); +}; + +Game_BattlerBase.prototype.isDying = function() { + return this.isAlive() && this._hp < this.mhp / 4; +}; + +Game_BattlerBase.prototype.isRestricted = function() { + return this.isAppeared() && this.restriction() > 0; +}; + +Game_BattlerBase.prototype.canInput = function() { + // prettier-ignore + return this.isAppeared() && this.isActor() && + !this.isRestricted() && !this.isAutoBattle(); +}; + +Game_BattlerBase.prototype.canMove = function() { + return this.isAppeared() && this.restriction() < 4; +}; + +Game_BattlerBase.prototype.isConfused = function() { + return ( + this.isAppeared() && this.restriction() >= 1 && this.restriction() <= 3 + ); +}; + +Game_BattlerBase.prototype.confusionLevel = function() { + return this.isConfused() ? this.restriction() : 0; +}; + +Game_BattlerBase.prototype.isActor = function() { + return false; +}; + +Game_BattlerBase.prototype.isEnemy = function() { + return false; +}; + +Game_BattlerBase.prototype.sortStates = function() { + this._states.sort((a, b) => { + const p1 = $dataStates[a].priority; + const p2 = $dataStates[b].priority; + if (p1 !== p2) { + return p2 - p1; + } + return a - b; + }); +}; + +Game_BattlerBase.prototype.restriction = function() { + const restrictions = this.states().map(state => state.restriction); + return Math.max(0, ...restrictions); +}; + +Game_BattlerBase.prototype.addNewState = function(stateId) { + if (stateId === this.deathStateId()) { + this.die(); + } + const restricted = this.isRestricted(); + this._states.push(stateId); + this.sortStates(); + if (!restricted && this.isRestricted()) { + this.onRestrict(); + } +}; + +Game_BattlerBase.prototype.onRestrict = function() { + // +}; + +Game_BattlerBase.prototype.mostImportantStateText = function() { + for (const state of this.states()) { + if (state.message3) { + return state.message3; + } + } + return ""; +}; + +Game_BattlerBase.prototype.stateMotionIndex = function() { + const states = this.states(); + if (states.length > 0) { + return states[0].motion; + } else { + return 0; + } +}; + +Game_BattlerBase.prototype.stateOverlayIndex = function() { + const states = this.states(); + if (states.length > 0) { + return states[0].overlay; + } else { + return 0; + } +}; + +Game_BattlerBase.prototype.isSkillWtypeOk = function(/*skill*/) { + return true; +}; + +Game_BattlerBase.prototype.skillMpCost = function(skill) { + return Math.floor(skill.mpCost * this.mcr); +}; + +Game_BattlerBase.prototype.skillTpCost = function(skill) { + return skill.tpCost; +}; + +Game_BattlerBase.prototype.canPaySkillCost = function(skill) { + return ( + this._tp >= this.skillTpCost(skill) && + this._mp >= this.skillMpCost(skill) + ); +}; + +Game_BattlerBase.prototype.paySkillCost = function(skill) { + this._mp -= this.skillMpCost(skill); + this._tp -= this.skillTpCost(skill); +}; + +Game_BattlerBase.prototype.isOccasionOk = function(item) { + if ($gameParty.inBattle()) { + return item.occasion === 0 || item.occasion === 1; + } else { + return item.occasion === 0 || item.occasion === 2; + } +}; + +Game_BattlerBase.prototype.meetsUsableItemConditions = function(item) { + return this.canMove() && this.isOccasionOk(item); +}; + +Game_BattlerBase.prototype.meetsSkillConditions = function(skill) { + return ( + this.meetsUsableItemConditions(skill) && + this.isSkillWtypeOk(skill) && + this.canPaySkillCost(skill) && + !this.isSkillSealed(skill.id) && + !this.isSkillTypeSealed(skill.stypeId) + ); +}; + +Game_BattlerBase.prototype.meetsItemConditions = function(item) { + return this.meetsUsableItemConditions(item) && $gameParty.hasItem(item); +}; + +Game_BattlerBase.prototype.canUse = function(item) { + if (!item) { + return false; + } else if (DataManager.isSkill(item)) { + return this.meetsSkillConditions(item); + } else if (DataManager.isItem(item)) { + return this.meetsItemConditions(item); + } else { + return false; + } +}; + +Game_BattlerBase.prototype.canEquip = function(item) { + if (!item) { + return false; + } else if (DataManager.isWeapon(item)) { + return this.canEquipWeapon(item); + } else if (DataManager.isArmor(item)) { + return this.canEquipArmor(item); + } else { + return false; + } +}; + +Game_BattlerBase.prototype.canEquipWeapon = function(item) { + return ( + this.isEquipWtypeOk(item.wtypeId) && + !this.isEquipTypeSealed(item.etypeId) + ); +}; + +Game_BattlerBase.prototype.canEquipArmor = function(item) { + return ( + this.isEquipAtypeOk(item.atypeId) && + !this.isEquipTypeSealed(item.etypeId) + ); +}; + +Game_BattlerBase.prototype.guardSkillId = function() { + return 2; +}; + +Game_BattlerBase.prototype.canAttack = function() { + return this.canUse($dataSkills[this.attackSkillId()]); +}; + +Game_BattlerBase.prototype.canGuard = function() { + return this.canUse($dataSkills[this.guardSkillId()]); +}; + +//----------------------------------------------------------------------------- +// Game_Battler +// +// The superclass of Game_Actor and Game_Enemy. It contains methods for sprites +// and actions. + +function Game_Battler() { + this.initialize(...arguments); +} + +Game_Battler.prototype = Object.create(Game_BattlerBase.prototype); +Game_Battler.prototype.constructor = Game_Battler; + +Game_Battler.prototype.initialize = function() { + Game_BattlerBase.prototype.initialize.call(this); +}; + +Game_Battler.prototype.initMembers = function() { + Game_BattlerBase.prototype.initMembers.call(this); + this._actions = []; + this._speed = 0; + this._result = new Game_ActionResult(); + this._actionState = ""; + this._lastTargetIndex = 0; + this._damagePopup = false; + this._effectType = null; + this._motionType = null; + this._weaponImageId = 0; + this._motionRefresh = false; + this._selected = false; + this._tpbState = ""; + this._tpbChargeTime = 0; + this._tpbCastTime = 0; + this._tpbIdleTime = 0; + this._tpbTurnCount = 0; + this._tpbTurnEnd = false; +}; + +Game_Battler.prototype.clearDamagePopup = function() { + this._damagePopup = false; +}; + +Game_Battler.prototype.clearWeaponAnimation = function() { + this._weaponImageId = 0; +}; + +Game_Battler.prototype.clearEffect = function() { + this._effectType = null; +}; + +Game_Battler.prototype.clearMotion = function() { + this._motionType = null; + this._motionRefresh = false; +}; + +Game_Battler.prototype.requestEffect = function(effectType) { + this._effectType = effectType; +}; + +Game_Battler.prototype.requestMotion = function(motionType) { + this._motionType = motionType; +}; + +Game_Battler.prototype.requestMotionRefresh = function() { + this._motionRefresh = true; +}; + +Game_Battler.prototype.cancelMotionRefresh = function() { + this._motionRefresh = false; +}; + +Game_Battler.prototype.select = function() { + this._selected = true; +}; + +Game_Battler.prototype.deselect = function() { + this._selected = false; +}; + +Game_Battler.prototype.isDamagePopupRequested = function() { + return this._damagePopup; +}; + +Game_Battler.prototype.isEffectRequested = function() { + return !!this._effectType; +}; + +Game_Battler.prototype.isMotionRequested = function() { + return !!this._motionType; +}; + +Game_Battler.prototype.isWeaponAnimationRequested = function() { + return this._weaponImageId > 0; +}; + +Game_Battler.prototype.isMotionRefreshRequested = function() { + return this._motionRefresh; +}; + +Game_Battler.prototype.isSelected = function() { + return this._selected; +}; + +Game_Battler.prototype.effectType = function() { + return this._effectType; +}; + +Game_Battler.prototype.motionType = function() { + return this._motionType; +}; + +Game_Battler.prototype.weaponImageId = function() { + return this._weaponImageId; +}; + +Game_Battler.prototype.startDamagePopup = function() { + this._damagePopup = true; +}; + +Game_Battler.prototype.shouldPopupDamage = function() { + const result = this._result; + return ( + result.missed || + result.evaded || + result.hpAffected || + result.mpDamage !== 0 + ); +}; + +Game_Battler.prototype.startWeaponAnimation = function(weaponImageId) { + this._weaponImageId = weaponImageId; +}; + +Game_Battler.prototype.action = function(index) { + return this._actions[index]; +}; + +Game_Battler.prototype.setAction = function(index, action) { + this._actions[index] = action; +}; + +Game_Battler.prototype.numActions = function() { + return this._actions.length; +}; + +Game_Battler.prototype.clearActions = function() { + this._actions = []; +}; + +Game_Battler.prototype.result = function() { + return this._result; +}; + +Game_Battler.prototype.clearResult = function() { + this._result.clear(); +}; + +Game_Battler.prototype.clearTpbChargeTime = function() { + this._tpbState = "charging"; + this._tpbChargeTime = 0; +}; + +Game_Battler.prototype.applyTpbPenalty = function() { + this._tpbState = "charging"; + this._tpbChargeTime -= 1; +}; + +Game_Battler.prototype.initTpbChargeTime = function(advantageous) { + const speed = this.tpbRelativeSpeed(); + this._tpbState = "charging"; + this._tpbChargeTime = advantageous ? 1 : speed * Math.random() * 0.5; + if (this.isRestricted()) { + this._tpbChargeTime = 0; + } +}; + +Game_Battler.prototype.tpbChargeTime = function() { + return this._tpbChargeTime; +}; + +Game_Battler.prototype.startTpbCasting = function() { + this._tpbState = "casting"; + this._tpbCastTime = 0; +}; + +Game_Battler.prototype.startTpbAction = function() { + this._tpbState = "acting"; +}; + +Game_Battler.prototype.isTpbCharged = function() { + return this._tpbState === "charged"; +}; + +Game_Battler.prototype.isTpbReady = function() { + return this._tpbState === "ready"; +}; + +Game_Battler.prototype.isTpbTimeout = function() { + return this._tpbIdleTime >= 1; +}; + +Game_Battler.prototype.updateTpb = function() { + if (this.canMove()) { + this.updateTpbChargeTime(); + this.updateTpbCastTime(); + this.updateTpbAutoBattle(); + } + if (this.isAlive()) { + this.updateTpbIdleTime(); + } +}; + +Game_Battler.prototype.updateTpbChargeTime = function() { + if (this._tpbState === "charging") { + this._tpbChargeTime += this.tpbAcceleration(); + if (this._tpbChargeTime >= 1) { + this._tpbChargeTime = 1; + this.onTpbCharged(); + } + } +}; + +Game_Battler.prototype.updateTpbCastTime = function() { + if (this._tpbState === "casting") { + this._tpbCastTime += this.tpbAcceleration(); + if (this._tpbCastTime >= this.tpbRequiredCastTime()) { + this._tpbCastTime = this.tpbRequiredCastTime(); + this._tpbState = "ready"; + } + } +}; + +Game_Battler.prototype.updateTpbAutoBattle = function() { + if (this.isTpbCharged() && !this.isTpbTurnEnd() && this.isAutoBattle()) { + this.makeTpbActions(); + } +}; + +Game_Battler.prototype.updateTpbIdleTime = function() { + if (!this.canMove() || this.isTpbCharged()) { + this._tpbIdleTime += this.tpbAcceleration(); + } +}; + +Game_Battler.prototype.tpbAcceleration = function() { + const speed = this.tpbRelativeSpeed(); + const referenceTime = $gameParty.tpbReferenceTime(); + return speed / referenceTime; +}; + +Game_Battler.prototype.tpbRelativeSpeed = function() { + return this.tpbSpeed() / $gameParty.tpbBaseSpeed(); +}; + +Game_Battler.prototype.tpbSpeed = function() { + return Math.sqrt(this.agi) + 1; +}; + +Game_Battler.prototype.tpbBaseSpeed = function() { + const baseAgility = this.paramBasePlus(6); + return Math.sqrt(baseAgility) + 1; +}; + +Game_Battler.prototype.tpbRequiredCastTime = function() { + const actions = this._actions.filter(action => action.isValid()); + const items = actions.map(action => action.item()); + const delay = items.reduce((r, item) => r + Math.max(0, -item.speed), 0); + return Math.sqrt(delay) / this.tpbSpeed(); +}; + +Game_Battler.prototype.onTpbCharged = function() { + if (!this.shouldDelayTpbCharge()) { + this.finishTpbCharge(); + } +}; + +Game_Battler.prototype.shouldDelayTpbCharge = function() { + return !BattleManager.isActiveTpb() && $gameParty.canInput(); +}; + +Game_Battler.prototype.finishTpbCharge = function() { + this._tpbState = "charged"; + this._tpbTurnEnd = true; + this._tpbIdleTime = 0; +}; + +Game_Battler.prototype.isTpbTurnEnd = function() { + return this._tpbTurnEnd; +}; + +Game_Battler.prototype.initTpbTurn = function() { + this._tpbTurnEnd = false; + this._tpbTurnCount = 0; + this._tpbIdleTime = 0; +}; + +Game_Battler.prototype.startTpbTurn = function() { + this._tpbTurnEnd = false; + this._tpbTurnCount++; + this._tpbIdleTime = 0; + if (this.numActions() === 0) { + this.makeTpbActions(); + } +}; + +Game_Battler.prototype.makeTpbActions = function() { + this.makeActions(); + if (this.canInput()) { + this.setActionState("undecided"); + } else { + this.startTpbCasting(); + this.setActionState("waiting"); + } +}; + +Game_Battler.prototype.onTpbTimeout = function() { + this.onAllActionsEnd(); + this._tpbTurnEnd = true; + this._tpbIdleTime = 0; +}; + +Game_Battler.prototype.turnCount = function() { + if (BattleManager.isTpb()) { + return this._tpbTurnCount; + } else { + return $gameTroop.turnCount() + 1; + } +}; + +Game_Battler.prototype.canInput = function() { + if (BattleManager.isTpb() && !this.isTpbCharged()) { + return false; + } + return Game_BattlerBase.prototype.canInput.call(this); +}; + +Game_Battler.prototype.refresh = function() { + Game_BattlerBase.prototype.refresh.call(this); + if (this.hp === 0) { + this.addState(this.deathStateId()); + } else { + this.removeState(this.deathStateId()); + } +}; + +Game_Battler.prototype.addState = function(stateId) { + if (this.isStateAddable(stateId)) { + if (!this.isStateAffected(stateId)) { + this.addNewState(stateId); + this.refresh(); + } + this.resetStateCounts(stateId); + this._result.pushAddedState(stateId); + } +}; + +Game_Battler.prototype.isStateAddable = function(stateId) { + return ( + this.isAlive() && + $dataStates[stateId] && + !this.isStateResist(stateId) && + !this.isStateRestrict(stateId) + ); +}; + +Game_Battler.prototype.isStateRestrict = function(stateId) { + return $dataStates[stateId].removeByRestriction && this.isRestricted(); +}; + +Game_Battler.prototype.onRestrict = function() { + Game_BattlerBase.prototype.onRestrict.call(this); + this.clearTpbChargeTime(); + this.clearActions(); + for (const state of this.states()) { + if (state.removeByRestriction) { + this.removeState(state.id); + } + } +}; + +Game_Battler.prototype.removeState = function(stateId) { + if (this.isStateAffected(stateId)) { + if (stateId === this.deathStateId()) { + this.revive(); + } + this.eraseState(stateId); + this.refresh(); + this._result.pushRemovedState(stateId); + } +}; + +Game_Battler.prototype.escape = function() { + if ($gameParty.inBattle()) { + this.hide(); + } + this.clearActions(); + this.clearStates(); + SoundManager.playEscape(); +}; + +Game_Battler.prototype.addBuff = function(paramId, turns) { + if (this.isAlive()) { + this.increaseBuff(paramId); + if (this.isBuffAffected(paramId)) { + this.overwriteBuffTurns(paramId, turns); + } + this._result.pushAddedBuff(paramId); + this.refresh(); + } +}; + +Game_Battler.prototype.addDebuff = function(paramId, turns) { + if (this.isAlive()) { + this.decreaseBuff(paramId); + if (this.isDebuffAffected(paramId)) { + this.overwriteBuffTurns(paramId, turns); + } + this._result.pushAddedDebuff(paramId); + this.refresh(); + } +}; + +Game_Battler.prototype.removeBuff = function(paramId) { + if (this.isAlive() && this.isBuffOrDebuffAffected(paramId)) { + this.eraseBuff(paramId); + this._result.pushRemovedBuff(paramId); + this.refresh(); + } +}; + +Game_Battler.prototype.removeBattleStates = function() { + for (const state of this.states()) { + if (state.removeAtBattleEnd) { + this.removeState(state.id); + } + } +}; + +Game_Battler.prototype.removeAllBuffs = function() { + for (let i = 0; i < this.buffLength(); i++) { + this.removeBuff(i); + } +}; + +Game_Battler.prototype.removeStatesAuto = function(timing) { + for (const state of this.states()) { + if ( + this.isStateExpired(state.id) && + state.autoRemovalTiming === timing + ) { + this.removeState(state.id); + } + } +}; + +Game_Battler.prototype.removeBuffsAuto = function() { + for (let i = 0; i < this.buffLength(); i++) { + if (this.isBuffExpired(i)) { + this.removeBuff(i); + } + } +}; + +Game_Battler.prototype.removeStatesByDamage = function() { + for (const state of this.states()) { + if ( + state.removeByDamage && + Math.randomInt(100) < state.chanceByDamage + ) { + this.removeState(state.id); + } + } +}; + +Game_Battler.prototype.makeActionTimes = function() { + const actionPlusSet = this.actionPlusSet(); + return actionPlusSet.reduce((r, p) => (Math.random() < p ? r + 1 : r), 1); +}; + +Game_Battler.prototype.makeActions = function() { + this.clearActions(); + if (this.canMove()) { + const actionTimes = this.makeActionTimes(); + this._actions = []; + for (let i = 0; i < actionTimes; i++) { + this._actions.push(new Game_Action(this)); + } + } +}; + +Game_Battler.prototype.speed = function() { + return this._speed; +}; + +Game_Battler.prototype.makeSpeed = function() { + this._speed = Math.min(...this._actions.map(action => action.speed())) || 0; +}; + +Game_Battler.prototype.currentAction = function() { + return this._actions[0]; +}; + +Game_Battler.prototype.removeCurrentAction = function() { + this._actions.shift(); +}; + +Game_Battler.prototype.setLastTarget = function(target) { + this._lastTargetIndex = target ? target.index() : 0; +}; + +Game_Battler.prototype.forceAction = function(skillId, targetIndex) { + this.clearActions(); + const action = new Game_Action(this, true); + action.setSkill(skillId); + if (targetIndex === -2) { + action.setTarget(this._lastTargetIndex); + } else if (targetIndex === -1) { + action.decideRandomTarget(); + } else { + action.setTarget(targetIndex); + } + this._actions.push(action); +}; + +Game_Battler.prototype.useItem = function(item) { + if (DataManager.isSkill(item)) { + this.paySkillCost(item); + } else if (DataManager.isItem(item)) { + this.consumeItem(item); + } +}; + +Game_Battler.prototype.consumeItem = function(item) { + $gameParty.consumeItem(item); +}; + +Game_Battler.prototype.gainHp = function(value) { + this._result.hpDamage = -value; + this._result.hpAffected = true; + this.setHp(this.hp + value); +}; + +Game_Battler.prototype.gainMp = function(value) { + this._result.mpDamage = -value; + this.setMp(this.mp + value); +}; + +Game_Battler.prototype.gainTp = function(value) { + this._result.tpDamage = -value; + this.setTp(this.tp + value); +}; + +Game_Battler.prototype.gainSilentTp = function(value) { + this.setTp(this.tp + value); +}; + +Game_Battler.prototype.initTp = function() { + this.setTp(Math.randomInt(25)); +}; + +Game_Battler.prototype.clearTp = function() { + this.setTp(0); +}; + +Game_Battler.prototype.chargeTpByDamage = function(damageRate) { + const value = Math.floor(50 * damageRate * this.tcr); + this.gainSilentTp(value); +}; + +Game_Battler.prototype.regenerateHp = function() { + const minRecover = -this.maxSlipDamage(); + const value = Math.max(Math.floor(this.mhp * this.hrg), minRecover); + if (value !== 0) { + this.gainHp(value); + } +}; + +Game_Battler.prototype.maxSlipDamage = function() { + return $dataSystem.optSlipDeath ? this.hp : Math.max(this.hp - 1, 0); +}; + +Game_Battler.prototype.regenerateMp = function() { + const value = Math.floor(this.mmp * this.mrg); + if (value !== 0) { + this.gainMp(value); + } +}; + +Game_Battler.prototype.regenerateTp = function() { + const value = Math.floor(100 * this.trg); + this.gainSilentTp(value); +}; + +Game_Battler.prototype.regenerateAll = function() { + if (this.isAlive()) { + this.regenerateHp(); + this.regenerateMp(); + this.regenerateTp(); + } +}; + +Game_Battler.prototype.onBattleStart = function(advantageous) { + this.setActionState("undecided"); + this.clearMotion(); + this.initTpbChargeTime(advantageous); + this.initTpbTurn(); + if (!this.isPreserveTp()) { + this.initTp(); + } +}; + +Game_Battler.prototype.onAllActionsEnd = function() { + this.clearResult(); + this.removeStatesAuto(1); + this.removeBuffsAuto(); +}; + +Game_Battler.prototype.onTurnEnd = function() { + this.clearResult(); + this.regenerateAll(); + this.updateStateTurns(); + this.updateBuffTurns(); + this.removeStatesAuto(2); +}; + +Game_Battler.prototype.onBattleEnd = function() { + this.clearResult(); + this.removeBattleStates(); + this.removeAllBuffs(); + this.clearActions(); + if (!this.isPreserveTp()) { + this.clearTp(); + } + this.appear(); +}; + +Game_Battler.prototype.onDamage = function(value) { + this.removeStatesByDamage(); + this.chargeTpByDamage(value / this.mhp); +}; + +Game_Battler.prototype.setActionState = function(actionState) { + this._actionState = actionState; + this.requestMotionRefresh(); +}; + +Game_Battler.prototype.isUndecided = function() { + return this._actionState === "undecided"; +}; + +Game_Battler.prototype.isInputting = function() { + return this._actionState === "inputting"; +}; + +Game_Battler.prototype.isWaiting = function() { + return this._actionState === "waiting"; +}; + +Game_Battler.prototype.isActing = function() { + return this._actionState === "acting"; +}; + +Game_Battler.prototype.isChanting = function() { + if (this.isWaiting()) { + return this._actions.some(action => action.isMagicSkill()); + } + return false; +}; + +Game_Battler.prototype.isGuardWaiting = function() { + if (this.isWaiting()) { + return this._actions.some(action => action.isGuard()); + } + return false; +}; + +Game_Battler.prototype.performActionStart = function(action) { + if (!action.isGuard()) { + this.setActionState("acting"); + } +}; + +Game_Battler.prototype.performAction = function(/*action*/) { + // +}; + +Game_Battler.prototype.performActionEnd = function() { + // +}; + +Game_Battler.prototype.performDamage = function() { + // +}; + +Game_Battler.prototype.performMiss = function() { + SoundManager.playMiss(); +}; + +Game_Battler.prototype.performRecovery = function() { + SoundManager.playRecovery(); +}; + +Game_Battler.prototype.performEvasion = function() { + SoundManager.playEvasion(); +}; + +Game_Battler.prototype.performMagicEvasion = function() { + SoundManager.playMagicEvasion(); +}; + +Game_Battler.prototype.performCounter = function() { + SoundManager.playEvasion(); +}; + +Game_Battler.prototype.performReflection = function() { + SoundManager.playReflection(); +}; + +Game_Battler.prototype.performSubstitute = function(/*target*/) { + // +}; + +Game_Battler.prototype.performCollapse = function() { + // +}; + +//----------------------------------------------------------------------------- +// Game_Actor +// +// The game object class for an actor. + +function Game_Actor() { + this.initialize(...arguments); +} + +Game_Actor.prototype = Object.create(Game_Battler.prototype); +Game_Actor.prototype.constructor = Game_Actor; + +Object.defineProperty(Game_Actor.prototype, "level", { + get: function() { + return this._level; + }, + configurable: true +}); + +Game_Actor.prototype.initialize = function(actorId) { + Game_Battler.prototype.initialize.call(this); + this.setup(actorId); +}; + +Game_Actor.prototype.initMembers = function() { + Game_Battler.prototype.initMembers.call(this); + this._actorId = 0; + this._name = ""; + this._nickname = ""; + this._classId = 0; + this._level = 0; + this._characterName = ""; + this._characterIndex = 0; + this._faceName = ""; + this._faceIndex = 0; + this._battlerName = ""; + this._exp = {}; + this._skills = []; + this._equips = []; + this._actionInputIndex = 0; + this._lastMenuSkill = new Game_Item(); + this._lastBattleSkill = new Game_Item(); + this._lastCommandSymbol = ""; +}; + +Game_Actor.prototype.setup = function(actorId) { + const actor = $dataActors[actorId]; + this._actorId = actorId; + this._name = actor.name; + this._nickname = actor.nickname; + this._profile = actor.profile; + this._classId = actor.classId; + this._level = actor.initialLevel; + this.initImages(); + this.initExp(); + this.initSkills(); + this.initEquips(actor.equips); + this.clearParamPlus(); + this.recoverAll(); +}; + +Game_Actor.prototype.actorId = function() { + return this._actorId; +}; + +Game_Actor.prototype.actor = function() { + return $dataActors[this._actorId]; +}; + +Game_Actor.prototype.name = function() { + return this._name; +}; + +Game_Actor.prototype.setName = function(name) { + this._name = name; +}; + +Game_Actor.prototype.nickname = function() { + return this._nickname; +}; + +Game_Actor.prototype.setNickname = function(nickname) { + this._nickname = nickname; +}; + +Game_Actor.prototype.profile = function() { + return this._profile; +}; + +Game_Actor.prototype.setProfile = function(profile) { + this._profile = profile; +}; + +Game_Actor.prototype.characterName = function() { + return this._characterName; +}; + +Game_Actor.prototype.characterIndex = function() { + return this._characterIndex; +}; + +Game_Actor.prototype.faceName = function() { + return this._faceName; +}; + +Game_Actor.prototype.faceIndex = function() { + return this._faceIndex; +}; + +Game_Actor.prototype.battlerName = function() { + return this._battlerName; +}; + +Game_Actor.prototype.clearStates = function() { + Game_Battler.prototype.clearStates.call(this); + this._stateSteps = {}; +}; + +Game_Actor.prototype.eraseState = function(stateId) { + Game_Battler.prototype.eraseState.call(this, stateId); + delete this._stateSteps[stateId]; +}; + +Game_Actor.prototype.resetStateCounts = function(stateId) { + Game_Battler.prototype.resetStateCounts.call(this, stateId); + this._stateSteps[stateId] = $dataStates[stateId].stepsToRemove; +}; + +Game_Actor.prototype.initImages = function() { + const actor = this.actor(); + this._characterName = actor.characterName; + this._characterIndex = actor.characterIndex; + this._faceName = actor.faceName; + this._faceIndex = actor.faceIndex; + this._battlerName = actor.battlerName; +}; + +Game_Actor.prototype.expForLevel = function(level) { + const c = this.currentClass(); + const basis = c.expParams[0]; + const extra = c.expParams[1]; + const acc_a = c.expParams[2]; + const acc_b = c.expParams[3]; + return Math.round( + (basis * Math.pow(level - 1, 0.9 + acc_a / 250) * level * (level + 1)) / + (6 + Math.pow(level, 2) / 50 / acc_b) + + (level - 1) * extra + ); +}; + +Game_Actor.prototype.initExp = function() { + this._exp[this._classId] = this.currentLevelExp(); +}; + +Game_Actor.prototype.currentExp = function() { + return this._exp[this._classId]; +}; + +Game_Actor.prototype.currentLevelExp = function() { + return this.expForLevel(this._level); +}; + +Game_Actor.prototype.nextLevelExp = function() { + return this.expForLevel(this._level + 1); +}; + +Game_Actor.prototype.nextRequiredExp = function() { + return this.nextLevelExp() - this.currentExp(); +}; + +Game_Actor.prototype.maxLevel = function() { + return this.actor().maxLevel; +}; + +Game_Actor.prototype.isMaxLevel = function() { + return this._level >= this.maxLevel(); +}; + +Game_Actor.prototype.initSkills = function() { + this._skills = []; + for (const learning of this.currentClass().learnings) { + if (learning.level <= this._level) { + this.learnSkill(learning.skillId); + } + } +}; + +Game_Actor.prototype.initEquips = function(equips) { + const slots = this.equipSlots(); + const maxSlots = slots.length; + this._equips = []; + for (let i = 0; i < maxSlots; i++) { + this._equips[i] = new Game_Item(); + } + for (let j = 0; j < equips.length; j++) { + if (j < maxSlots) { + this._equips[j].setEquip(slots[j] === 1, equips[j]); + } + } + this.releaseUnequippableItems(true); + this.refresh(); +}; + +Game_Actor.prototype.equipSlots = function() { + const slots = []; + for (let i = 1; i < $dataSystem.equipTypes.length; i++) { + slots.push(i); + } + if (slots.length >= 2 && this.isDualWield()) { + slots[1] = 1; + } + return slots; +}; + +Game_Actor.prototype.equips = function() { + return this._equips.map(item => item.object()); +}; + +Game_Actor.prototype.weapons = function() { + return this.equips().filter(item => item && DataManager.isWeapon(item)); +}; + +Game_Actor.prototype.armors = function() { + return this.equips().filter(item => item && DataManager.isArmor(item)); +}; + +Game_Actor.prototype.hasWeapon = function(weapon) { + return this.weapons().includes(weapon); +}; + +Game_Actor.prototype.hasArmor = function(armor) { + return this.armors().includes(armor); +}; + +Game_Actor.prototype.isEquipChangeOk = function(slotId) { + return ( + !this.isEquipTypeLocked(this.equipSlots()[slotId]) && + !this.isEquipTypeSealed(this.equipSlots()[slotId]) + ); +}; + +Game_Actor.prototype.changeEquip = function(slotId, item) { + if ( + this.tradeItemWithParty(item, this.equips()[slotId]) && + (!item || this.equipSlots()[slotId] === item.etypeId) + ) { + this._equips[slotId].setObject(item); + this.refresh(); + } +}; + +Game_Actor.prototype.forceChangeEquip = function(slotId, item) { + this._equips[slotId].setObject(item); + this.releaseUnequippableItems(true); + this.refresh(); +}; + +Game_Actor.prototype.tradeItemWithParty = function(newItem, oldItem) { + if (newItem && !$gameParty.hasItem(newItem)) { + return false; + } else { + $gameParty.gainItem(oldItem, 1); + $gameParty.loseItem(newItem, 1); + return true; + } +}; + +Game_Actor.prototype.changeEquipById = function(etypeId, itemId) { + const slotId = etypeId - 1; + if (this.equipSlots()[slotId] === 1) { + this.changeEquip(slotId, $dataWeapons[itemId]); + } else { + this.changeEquip(slotId, $dataArmors[itemId]); + } +}; + +Game_Actor.prototype.isEquipped = function(item) { + return this.equips().includes(item); +}; + +Game_Actor.prototype.discardEquip = function(item) { + const slotId = this.equips().indexOf(item); + if (slotId >= 0) { + this._equips[slotId].setObject(null); + } +}; + +Game_Actor.prototype.releaseUnequippableItems = function(forcing) { + for (;;) { + const slots = this.equipSlots(); + const equips = this.equips(); + let changed = false; + for (let i = 0; i < equips.length; i++) { + const item = equips[i]; + if (item && (!this.canEquip(item) || item.etypeId !== slots[i])) { + if (!forcing) { + this.tradeItemWithParty(null, item); + } + this._equips[i].setObject(null); + changed = true; + } + } + if (!changed) { + break; + } + } +}; + +Game_Actor.prototype.clearEquipments = function() { + const maxSlots = this.equipSlots().length; + for (let i = 0; i < maxSlots; i++) { + if (this.isEquipChangeOk(i)) { + this.changeEquip(i, null); + } + } +}; + +Game_Actor.prototype.optimizeEquipments = function() { + const maxSlots = this.equipSlots().length; + this.clearEquipments(); + for (let i = 0; i < maxSlots; i++) { + if (this.isEquipChangeOk(i)) { + this.changeEquip(i, this.bestEquipItem(i)); + } + } +}; + +Game_Actor.prototype.bestEquipItem = function(slotId) { + const etypeId = this.equipSlots()[slotId]; + const items = $gameParty + .equipItems() + .filter(item => item.etypeId === etypeId && this.canEquip(item)); + let bestItem = null; + let bestPerformance = -1000; + for (let i = 0; i < items.length; i++) { + const performance = this.calcEquipItemPerformance(items[i]); + if (performance > bestPerformance) { + bestPerformance = performance; + bestItem = items[i]; + } + } + return bestItem; +}; + +Game_Actor.prototype.calcEquipItemPerformance = function(item) { + return item.params.reduce((a, b) => a + b); +}; + +Game_Actor.prototype.isSkillWtypeOk = function(skill) { + const wtypeId1 = skill.requiredWtypeId1; + const wtypeId2 = skill.requiredWtypeId2; + if ( + (wtypeId1 === 0 && wtypeId2 === 0) || + (wtypeId1 > 0 && this.isWtypeEquipped(wtypeId1)) || + (wtypeId2 > 0 && this.isWtypeEquipped(wtypeId2)) + ) { + return true; + } else { + return false; + } +}; + +Game_Actor.prototype.isWtypeEquipped = function(wtypeId) { + return this.weapons().some(weapon => weapon.wtypeId === wtypeId); +}; + +Game_Actor.prototype.refresh = function() { + this.releaseUnequippableItems(false); + Game_Battler.prototype.refresh.call(this); +}; + +Game_Actor.prototype.hide = function() { + Game_Battler.prototype.hide.call(this); + $gameTemp.requestBattleRefresh(); +}; + +Game_Actor.prototype.isActor = function() { + return true; +}; + +Game_Actor.prototype.friendsUnit = function() { + return $gameParty; +}; + +Game_Actor.prototype.opponentsUnit = function() { + return $gameTroop; +}; + +Game_Actor.prototype.index = function() { + return $gameParty.members().indexOf(this); +}; + +Game_Actor.prototype.isBattleMember = function() { + return $gameParty.battleMembers().includes(this); +}; + +Game_Actor.prototype.isFormationChangeOk = function() { + return true; +}; + +Game_Actor.prototype.currentClass = function() { + return $dataClasses[this._classId]; +}; + +Game_Actor.prototype.isClass = function(gameClass) { + return gameClass && this._classId === gameClass.id; +}; + +Game_Actor.prototype.skillTypes = function() { + const skillTypes = this.addedSkillTypes().sort((a, b) => a - b); + return skillTypes.filter((x, i, self) => self.indexOf(x) === i); +}; + +Game_Actor.prototype.skills = function() { + const list = []; + for (const id of this._skills.concat(this.addedSkills())) { + if (!list.includes($dataSkills[id])) { + list.push($dataSkills[id]); + } + } + return list; +}; + +Game_Actor.prototype.usableSkills = function() { + return this.skills().filter(skill => this.canUse(skill)); +}; + +Game_Actor.prototype.traitObjects = function() { + const objects = Game_Battler.prototype.traitObjects.call(this); + objects.push(this.actor(), this.currentClass()); + for (const item of this.equips()) { + if (item) { + objects.push(item); + } + } + return objects; +}; + +Game_Actor.prototype.attackElements = function() { + const set = Game_Battler.prototype.attackElements.call(this); + if (this.hasNoWeapons() && !set.includes(this.bareHandsElementId())) { + set.push(this.bareHandsElementId()); + } + return set; +}; + +Game_Actor.prototype.hasNoWeapons = function() { + return this.weapons().length === 0; +}; + +Game_Actor.prototype.bareHandsElementId = function() { + return 1; +}; + +Game_Actor.prototype.paramBase = function(paramId) { + return this.currentClass().params[paramId][this._level]; +}; + +Game_Actor.prototype.paramPlus = function(paramId) { + let value = Game_Battler.prototype.paramPlus.call(this, paramId); + for (const item of this.equips()) { + if (item) { + value += item.params[paramId]; + } + } + return value; +}; + +Game_Actor.prototype.attackAnimationId1 = function() { + if (this.hasNoWeapons()) { + return this.bareHandsAnimationId(); + } else { + const weapons = this.weapons(); + return weapons[0] ? weapons[0].animationId : 0; + } +}; + +Game_Actor.prototype.attackAnimationId2 = function() { + const weapons = this.weapons(); + return weapons[1] ? weapons[1].animationId : 0; +}; + +Game_Actor.prototype.bareHandsAnimationId = function() { + return 1; +}; + +Game_Actor.prototype.changeExp = function(exp, show) { + this._exp[this._classId] = Math.max(exp, 0); + const lastLevel = this._level; + const lastSkills = this.skills(); + while (!this.isMaxLevel() && this.currentExp() >= this.nextLevelExp()) { + this.levelUp(); + } + while (this.currentExp() < this.currentLevelExp()) { + this.levelDown(); + } + if (show && this._level > lastLevel) { + this.displayLevelUp(this.findNewSkills(lastSkills)); + } + this.refresh(); +}; + +Game_Actor.prototype.levelUp = function() { + this._level++; + for (const learning of this.currentClass().learnings) { + if (learning.level === this._level) { + this.learnSkill(learning.skillId); + } + } +}; + +Game_Actor.prototype.levelDown = function() { + this._level--; +}; + +Game_Actor.prototype.findNewSkills = function(lastSkills) { + const newSkills = this.skills(); + for (const lastSkill of lastSkills) { + newSkills.remove(lastSkill); + } + return newSkills; +}; + +Game_Actor.prototype.displayLevelUp = function(newSkills) { + const text = TextManager.levelUp.format( + this._name, + TextManager.level, + this._level + ); + $gameMessage.newPage(); + $gameMessage.add(text); + for (const skill of newSkills) { + $gameMessage.add(TextManager.obtainSkill.format(skill.name)); + } +}; + +Game_Actor.prototype.gainExp = function(exp) { + const newExp = this.currentExp() + Math.round(exp * this.finalExpRate()); + this.changeExp(newExp, this.shouldDisplayLevelUp()); +}; + +Game_Actor.prototype.finalExpRate = function() { + return this.exr * (this.isBattleMember() ? 1 : this.benchMembersExpRate()); +}; + +Game_Actor.prototype.benchMembersExpRate = function() { + return $dataSystem.optExtraExp ? 1 : 0; +}; + +Game_Actor.prototype.shouldDisplayLevelUp = function() { + return true; +}; + +Game_Actor.prototype.changeLevel = function(level, show) { + level = level.clamp(1, this.maxLevel()); + this.changeExp(this.expForLevel(level), show); +}; + +Game_Actor.prototype.learnSkill = function(skillId) { + if (!this.isLearnedSkill(skillId)) { + this._skills.push(skillId); + this._skills.sort((a, b) => a - b); + } +}; + +Game_Actor.prototype.forgetSkill = function(skillId) { + this._skills.remove(skillId); +}; + +Game_Actor.prototype.isLearnedSkill = function(skillId) { + return this._skills.includes(skillId); +}; + +Game_Actor.prototype.hasSkill = function(skillId) { + return this.skills().includes($dataSkills[skillId]); +}; + +Game_Actor.prototype.changeClass = function(classId, keepExp) { + if (keepExp) { + this._exp[classId] = this.currentExp(); + } + this._classId = classId; + this._level = 0; + this.changeExp(this._exp[this._classId] || 0, false); + this.refresh(); +}; + +Game_Actor.prototype.setCharacterImage = function( + characterName, + characterIndex +) { + this._characterName = characterName; + this._characterIndex = characterIndex; +}; + +Game_Actor.prototype.setFaceImage = function(faceName, faceIndex) { + this._faceName = faceName; + this._faceIndex = faceIndex; + $gameTemp.requestBattleRefresh(); +}; + +Game_Actor.prototype.setBattlerImage = function(battlerName) { + this._battlerName = battlerName; +}; + +Game_Actor.prototype.isSpriteVisible = function() { + return $gameSystem.isSideView(); +}; + +Game_Actor.prototype.performActionStart = function(action) { + Game_Battler.prototype.performActionStart.call(this, action); +}; + +Game_Actor.prototype.performAction = function(action) { + Game_Battler.prototype.performAction.call(this, action); + if (action.isAttack()) { + this.performAttack(); + } else if (action.isGuard()) { + this.requestMotion("guard"); + } else if (action.isMagicSkill()) { + this.requestMotion("spell"); + } else if (action.isSkill()) { + this.requestMotion("skill"); + } else if (action.isItem()) { + this.requestMotion("item"); + } +}; + +Game_Actor.prototype.performActionEnd = function() { + Game_Battler.prototype.performActionEnd.call(this); +}; + +Game_Actor.prototype.performAttack = function() { + const weapons = this.weapons(); + const wtypeId = weapons[0] ? weapons[0].wtypeId : 0; + const attackMotion = $dataSystem.attackMotions[wtypeId]; + if (attackMotion) { + if (attackMotion.type === 0) { + this.requestMotion("thrust"); + } else if (attackMotion.type === 1) { + this.requestMotion("swing"); + } else if (attackMotion.type === 2) { + this.requestMotion("missile"); + } + this.startWeaponAnimation(attackMotion.weaponImageId); + } +}; + +Game_Actor.prototype.performDamage = function() { + Game_Battler.prototype.performDamage.call(this); + if (this.isSpriteVisible()) { + this.requestMotion("damage"); + } else { + $gameScreen.startShake(5, 5, 10); + } + SoundManager.playActorDamage(); +}; + +Game_Actor.prototype.performEvasion = function() { + Game_Battler.prototype.performEvasion.call(this); + this.requestMotion("evade"); +}; + +Game_Actor.prototype.performMagicEvasion = function() { + Game_Battler.prototype.performMagicEvasion.call(this); + this.requestMotion("evade"); +}; + +Game_Actor.prototype.performCounter = function() { + Game_Battler.prototype.performCounter.call(this); + this.performAttack(); +}; + +Game_Actor.prototype.performCollapse = function() { + Game_Battler.prototype.performCollapse.call(this); + if ($gameParty.inBattle()) { + SoundManager.playActorCollapse(); + } +}; + +Game_Actor.prototype.performVictory = function() { + this.setActionState("done"); + if (this.canMove()) { + this.requestMotion("victory"); + } +}; + +Game_Actor.prototype.performEscape = function() { + if (this.canMove()) { + this.requestMotion("escape"); + } +}; + +Game_Actor.prototype.makeActionList = function() { + const list = []; + const attackAction = new Game_Action(this); + attackAction.setAttack(); + list.push(attackAction); + for (const skill of this.usableSkills()) { + const skillAction = new Game_Action(this); + skillAction.setSkill(skill.id); + list.push(skillAction); + } + return list; +}; + +Game_Actor.prototype.makeAutoBattleActions = function() { + for (let i = 0; i < this.numActions(); i++) { + const list = this.makeActionList(); + let maxValue = -Number.MAX_VALUE; + for (const action of list) { + const value = action.evaluate(); + if (value > maxValue) { + maxValue = value; + this.setAction(i, action); + } + } + } + this.setActionState("waiting"); +}; + +Game_Actor.prototype.makeConfusionActions = function() { + for (let i = 0; i < this.numActions(); i++) { + this.action(i).setConfusion(); + } + this.setActionState("waiting"); +}; + +Game_Actor.prototype.makeActions = function() { + Game_Battler.prototype.makeActions.call(this); + if (this.numActions() > 0) { + this.setActionState("undecided"); + } else { + this.setActionState("waiting"); + } + if (this.isAutoBattle()) { + this.makeAutoBattleActions(); + } else if (this.isConfused()) { + this.makeConfusionActions(); + } +}; + +Game_Actor.prototype.onPlayerWalk = function() { + this.clearResult(); + this.checkFloorEffect(); + if ($gamePlayer.isNormal()) { + this.turnEndOnMap(); + for (const state of this.states()) { + this.updateStateSteps(state); + } + this.showAddedStates(); + this.showRemovedStates(); + } +}; + +Game_Actor.prototype.updateStateSteps = function(state) { + if (state.removeByWalking) { + if (this._stateSteps[state.id] > 0) { + if (--this._stateSteps[state.id] === 0) { + this.removeState(state.id); + } + } + } +}; + +Game_Actor.prototype.showAddedStates = function() { + for (const state of this.result().addedStateObjects()) { + if (state.message1) { + $gameMessage.add(state.message1.format(this._name)); + } + } +}; + +Game_Actor.prototype.showRemovedStates = function() { + for (const state of this.result().removedStateObjects()) { + if (state.message4) { + $gameMessage.add(state.message4.format(this._name)); + } + } +}; + +Game_Actor.prototype.stepsForTurn = function() { + return 20; +}; + +Game_Actor.prototype.turnEndOnMap = function() { + if ($gameParty.steps() % this.stepsForTurn() === 0) { + this.onTurnEnd(); + if (this.result().hpDamage > 0) { + this.performMapDamage(); + } + } +}; + +Game_Actor.prototype.checkFloorEffect = function() { + if ($gamePlayer.isOnDamageFloor()) { + this.executeFloorDamage(); + } +}; + +Game_Actor.prototype.executeFloorDamage = function() { + const floorDamage = Math.floor(this.basicFloorDamage() * this.fdr); + const realDamage = Math.min(floorDamage, this.maxFloorDamage()); + this.gainHp(-realDamage); + if (realDamage > 0) { + this.performMapDamage(); + } +}; + +Game_Actor.prototype.basicFloorDamage = function() { + return 10; +}; + +Game_Actor.prototype.maxFloorDamage = function() { + return $dataSystem.optFloorDeath ? this.hp : Math.max(this.hp - 1, 0); +}; + +Game_Actor.prototype.performMapDamage = function() { + if (!$gameParty.inBattle()) { + $gameScreen.startFlashForDamage(); + } +}; + +Game_Actor.prototype.clearActions = function() { + Game_Battler.prototype.clearActions.call(this); + this._actionInputIndex = 0; +}; + +Game_Actor.prototype.inputtingAction = function() { + return this.action(this._actionInputIndex); +}; + +Game_Actor.prototype.selectNextCommand = function() { + if (this._actionInputIndex < this.numActions() - 1) { + this._actionInputIndex++; + return true; + } else { + return false; + } +}; + +Game_Actor.prototype.selectPreviousCommand = function() { + if (this._actionInputIndex > 0) { + this._actionInputIndex--; + return true; + } else { + return false; + } +}; + +Game_Actor.prototype.lastSkill = function() { + if ($gameParty.inBattle()) { + return this.lastBattleSkill(); + } else { + return this.lastMenuSkill(); + } +}; + +Game_Actor.prototype.lastMenuSkill = function() { + return this._lastMenuSkill.object(); +}; + +Game_Actor.prototype.setLastMenuSkill = function(skill) { + this._lastMenuSkill.setObject(skill); +}; + +Game_Actor.prototype.lastBattleSkill = function() { + return this._lastBattleSkill.object(); +}; + +Game_Actor.prototype.setLastBattleSkill = function(skill) { + this._lastBattleSkill.setObject(skill); +}; + +Game_Actor.prototype.lastCommandSymbol = function() { + return this._lastCommandSymbol; +}; + +Game_Actor.prototype.setLastCommandSymbol = function(symbol) { + this._lastCommandSymbol = symbol; +}; + +Game_Actor.prototype.testEscape = function(item) { + return item.effects.some( + effect => effect && effect.code === Game_Action.EFFECT_SPECIAL + ); +}; + +Game_Actor.prototype.meetsUsableItemConditions = function(item) { + if ($gameParty.inBattle()) { + if (!BattleManager.canEscape() && this.testEscape(item)) { + return false; + } + } + return Game_BattlerBase.prototype.meetsUsableItemConditions.call( + this, + item + ); +}; + +Game_Actor.prototype.onEscapeFailure = function() { + if (BattleManager.isTpb()) { + this.applyTpbPenalty(); + } + this.clearActions(); + this.requestMotionRefresh(); +}; + +//----------------------------------------------------------------------------- +// Game_Enemy +// +// The game object class for an enemy. + +function Game_Enemy() { + this.initialize(...arguments); +} + +Game_Enemy.prototype = Object.create(Game_Battler.prototype); +Game_Enemy.prototype.constructor = Game_Enemy; + +Game_Enemy.prototype.initialize = function(enemyId, x, y) { + Game_Battler.prototype.initialize.call(this); + this.setup(enemyId, x, y); +}; + +Game_Enemy.prototype.initMembers = function() { + Game_Battler.prototype.initMembers.call(this); + this._enemyId = 0; + this._letter = ""; + this._plural = false; + this._screenX = 0; + this._screenY = 0; +}; + +Game_Enemy.prototype.setup = function(enemyId, x, y) { + this._enemyId = enemyId; + this._screenX = x; + this._screenY = y; + this.recoverAll(); +}; + +Game_Enemy.prototype.isEnemy = function() { + return true; +}; + +Game_Enemy.prototype.friendsUnit = function() { + return $gameTroop; +}; + +Game_Enemy.prototype.opponentsUnit = function() { + return $gameParty; +}; + +Game_Enemy.prototype.index = function() { + return $gameTroop.members().indexOf(this); +}; + +Game_Enemy.prototype.isBattleMember = function() { + return this.index() >= 0; +}; + +Game_Enemy.prototype.enemyId = function() { + return this._enemyId; +}; + +Game_Enemy.prototype.enemy = function() { + return $dataEnemies[this._enemyId]; +}; + +Game_Enemy.prototype.traitObjects = function() { + return Game_Battler.prototype.traitObjects.call(this).concat(this.enemy()); +}; + +Game_Enemy.prototype.paramBase = function(paramId) { + return this.enemy().params[paramId]; +}; + +Game_Enemy.prototype.exp = function() { + return this.enemy().exp; +}; + +Game_Enemy.prototype.gold = function() { + return this.enemy().gold; +}; + +Game_Enemy.prototype.makeDropItems = function() { + const rate = this.dropItemRate(); + return this.enemy().dropItems.reduce((r, di) => { + if (di.kind > 0 && Math.random() * di.denominator < rate) { + return r.concat(this.itemObject(di.kind, di.dataId)); + } else { + return r; + } + }, []); +}; + +Game_Enemy.prototype.dropItemRate = function() { + return $gameParty.hasDropItemDouble() ? 2 : 1; +}; + +Game_Enemy.prototype.itemObject = function(kind, dataId) { + if (kind === 1) { + return $dataItems[dataId]; + } else if (kind === 2) { + return $dataWeapons[dataId]; + } else if (kind === 3) { + return $dataArmors[dataId]; + } else { + return null; + } +}; + +Game_Enemy.prototype.isSpriteVisible = function() { + return true; +}; + +Game_Enemy.prototype.screenX = function() { + return this._screenX; +}; + +Game_Enemy.prototype.screenY = function() { + return this._screenY; +}; + +Game_Enemy.prototype.battlerName = function() { + return this.enemy().battlerName; +}; + +Game_Enemy.prototype.battlerHue = function() { + return this.enemy().battlerHue; +}; + +Game_Enemy.prototype.originalName = function() { + return this.enemy().name; +}; + +Game_Enemy.prototype.name = function() { + return this.originalName() + (this._plural ? this._letter : ""); +}; + +Game_Enemy.prototype.isLetterEmpty = function() { + return this._letter === ""; +}; + +Game_Enemy.prototype.setLetter = function(letter) { + this._letter = letter; +}; + +Game_Enemy.prototype.setPlural = function(plural) { + this._plural = plural; +}; + +Game_Enemy.prototype.performActionStart = function(action) { + Game_Battler.prototype.performActionStart.call(this, action); + this.requestEffect("whiten"); +}; + +Game_Enemy.prototype.performAction = function(action) { + Game_Battler.prototype.performAction.call(this, action); +}; + +Game_Enemy.prototype.performActionEnd = function() { + Game_Battler.prototype.performActionEnd.call(this); +}; + +Game_Enemy.prototype.performDamage = function() { + Game_Battler.prototype.performDamage.call(this); + SoundManager.playEnemyDamage(); + this.requestEffect("blink"); +}; + +Game_Enemy.prototype.performCollapse = function() { + Game_Battler.prototype.performCollapse.call(this); + switch (this.collapseType()) { + case 0: + this.requestEffect("collapse"); + SoundManager.playEnemyCollapse(); + break; + case 1: + this.requestEffect("bossCollapse"); + SoundManager.playBossCollapse1(); + break; + case 2: + this.requestEffect("instantCollapse"); + break; + } +}; + +Game_Enemy.prototype.transform = function(enemyId) { + const name = this.originalName(); + this._enemyId = enemyId; + if (this.originalName() !== name) { + this._letter = ""; + this._plural = false; + } + this.refresh(); + if (this.numActions() > 0) { + this.makeActions(); + } +}; + +Game_Enemy.prototype.meetsCondition = function(action) { + const param1 = action.conditionParam1; + const param2 = action.conditionParam2; + switch (action.conditionType) { + case 1: + return this.meetsTurnCondition(param1, param2); + case 2: + return this.meetsHpCondition(param1, param2); + case 3: + return this.meetsMpCondition(param1, param2); + case 4: + return this.meetsStateCondition(param1); + case 5: + return this.meetsPartyLevelCondition(param1); + case 6: + return this.meetsSwitchCondition(param1); + default: + return true; + } +}; + +Game_Enemy.prototype.meetsTurnCondition = function(param1, param2) { + const n = this.turnCount(); + if (param2 === 0) { + return n === param1; + } else { + return n > 0 && n >= param1 && n % param2 === param1 % param2; + } +}; + +Game_Enemy.prototype.meetsHpCondition = function(param1, param2) { + return this.hpRate() >= param1 && this.hpRate() <= param2; +}; + +Game_Enemy.prototype.meetsMpCondition = function(param1, param2) { + return this.mpRate() >= param1 && this.mpRate() <= param2; +}; + +Game_Enemy.prototype.meetsStateCondition = function(param) { + return this.isStateAffected(param); +}; + +Game_Enemy.prototype.meetsPartyLevelCondition = function(param) { + return $gameParty.highestLevel() >= param; +}; + +Game_Enemy.prototype.meetsSwitchCondition = function(param) { + return $gameSwitches.value(param); +}; + +Game_Enemy.prototype.isActionValid = function(action) { + return ( + this.meetsCondition(action) && this.canUse($dataSkills[action.skillId]) + ); +}; + +Game_Enemy.prototype.selectAction = function(actionList, ratingZero) { + const sum = actionList.reduce((r, a) => r + a.rating - ratingZero, 0); + if (sum > 0) { + let value = Math.randomInt(sum); + for (const action of actionList) { + value -= action.rating - ratingZero; + if (value < 0) { + return action; + } + } + } else { + return null; + } +}; + +Game_Enemy.prototype.selectAllActions = function(actionList) { + const ratingMax = Math.max(...actionList.map(a => a.rating)); + const ratingZero = ratingMax - 3; + actionList = actionList.filter(a => a.rating > ratingZero); + for (let i = 0; i < this.numActions(); i++) { + this.action(i).setEnemyAction( + this.selectAction(actionList, ratingZero) + ); + } +}; + +Game_Enemy.prototype.makeActions = function() { + Game_Battler.prototype.makeActions.call(this); + if (this.numActions() > 0) { + const actionList = this.enemy().actions.filter(a => + this.isActionValid(a) + ); + if (actionList.length > 0) { + this.selectAllActions(actionList); + } + } + this.setActionState("waiting"); +}; + +//----------------------------------------------------------------------------- +// Game_Actors +// +// The wrapper class for an actor array. + +function Game_Actors() { + this.initialize(...arguments); +} + +Game_Actors.prototype.initialize = function() { + this._data = []; +}; + +Game_Actors.prototype.actor = function(actorId) { + if ($dataActors[actorId]) { + if (!this._data[actorId]) { + this._data[actorId] = new Game_Actor(actorId); + } + return this._data[actorId]; + } + return null; +}; + +//----------------------------------------------------------------------------- +// Game_Unit +// +// The superclass of Game_Party and Game_Troop. + +function Game_Unit() { + this.initialize(...arguments); +} + +Game_Unit.prototype.initialize = function() { + this._inBattle = false; +}; + +Game_Unit.prototype.inBattle = function() { + return this._inBattle; +}; + +Game_Unit.prototype.members = function() { + return []; +}; + +Game_Unit.prototype.aliveMembers = function() { + return this.members().filter(member => member.isAlive()); +}; + +Game_Unit.prototype.deadMembers = function() { + return this.members().filter(member => member.isDead()); +}; + +Game_Unit.prototype.movableMembers = function() { + return this.members().filter(member => member.canMove()); +}; + +Game_Unit.prototype.clearActions = function() { + for (const member of this.members()) { + member.clearActions(); + } +}; + +Game_Unit.prototype.agility = function() { + const members = this.members(); + const sum = members.reduce((r, member) => r + member.agi, 0); + return Math.max(1, sum / Math.max(1, members.length)); +}; + +Game_Unit.prototype.tgrSum = function() { + return this.aliveMembers().reduce((r, member) => r + member.tgr, 0); +}; + +Game_Unit.prototype.randomTarget = function() { + let tgrRand = Math.random() * this.tgrSum(); + let target = null; + for (const member of this.aliveMembers()) { + tgrRand -= member.tgr; + if (tgrRand <= 0 && !target) { + target = member; + } + } + return target; +}; + +Game_Unit.prototype.randomDeadTarget = function() { + const members = this.deadMembers(); + return members.length ? members[Math.randomInt(members.length)] : null; +}; + +Game_Unit.prototype.smoothTarget = function(index) { + const member = this.members()[Math.max(0, index)]; + return member && member.isAlive() ? member : this.aliveMembers()[0]; +}; + +Game_Unit.prototype.smoothDeadTarget = function(index) { + const member = this.members()[Math.max(0, index)]; + return member && member.isDead() ? member : this.deadMembers()[0]; +}; + +Game_Unit.prototype.clearResults = function() { + for (const member of this.members()) { + member.clearResult(); + } +}; + +Game_Unit.prototype.onBattleStart = function(advantageous) { + for (const member of this.members()) { + member.onBattleStart(advantageous); + } + this._inBattle = true; +}; + +Game_Unit.prototype.onBattleEnd = function() { + this._inBattle = false; + for (const member of this.members()) { + member.onBattleEnd(); + } +}; + +Game_Unit.prototype.makeActions = function() { + for (const member of this.members()) { + member.makeActions(); + } +}; + +Game_Unit.prototype.select = function(activeMember) { + for (const member of this.members()) { + if (member === activeMember) { + member.select(); + } else { + member.deselect(); + } + } +}; + +Game_Unit.prototype.isAllDead = function() { + return this.aliveMembers().length === 0; +}; + +Game_Unit.prototype.substituteBattler = function() { + for (const member of this.members()) { + if (member.isSubstitute()) { + return member; + } + } + return null; +}; + +Game_Unit.prototype.tpbBaseSpeed = function() { + const members = this.members(); + return Math.max(...members.map(member => member.tpbBaseSpeed())); +}; + +Game_Unit.prototype.tpbReferenceTime = function() { + return BattleManager.isActiveTpb() ? 240 : 60; +}; + +Game_Unit.prototype.updateTpb = function() { + for (const member of this.members()) { + member.updateTpb(); + } +}; + +//----------------------------------------------------------------------------- +// Game_Party +// +// The game object class for the party. Information such as gold and items is +// included. + +function Game_Party() { + this.initialize(...arguments); +} + +Game_Party.prototype = Object.create(Game_Unit.prototype); +Game_Party.prototype.constructor = Game_Party; + +Game_Party.ABILITY_ENCOUNTER_HALF = 0; +Game_Party.ABILITY_ENCOUNTER_NONE = 1; +Game_Party.ABILITY_CANCEL_SURPRISE = 2; +Game_Party.ABILITY_RAISE_PREEMPTIVE = 3; +Game_Party.ABILITY_GOLD_DOUBLE = 4; +Game_Party.ABILITY_DROP_ITEM_DOUBLE = 5; + +Game_Party.prototype.initialize = function() { + Game_Unit.prototype.initialize.call(this); + this._gold = 0; + this._steps = 0; + this._lastItem = new Game_Item(); + this._menuActorId = 0; + this._targetActorId = 0; + this._actors = []; + this.initAllItems(); +}; + +Game_Party.prototype.initAllItems = function() { + this._items = {}; + this._weapons = {}; + this._armors = {}; +}; + +Game_Party.prototype.exists = function() { + return this._actors.length > 0; +}; + +Game_Party.prototype.size = function() { + return this.members().length; +}; + +Game_Party.prototype.isEmpty = function() { + return this.size() === 0; +}; + +Game_Party.prototype.members = function() { + return this.inBattle() ? this.battleMembers() : this.allMembers(); +}; + +Game_Party.prototype.allMembers = function() { + return this._actors.map(id => $gameActors.actor(id)); +}; + +Game_Party.prototype.battleMembers = function() { + return this.allBattleMembers().filter(actor => actor.isAppeared()); +}; + +Game_Party.prototype.hiddenBattleMembers = function() { + return this.allBattleMembers().filter(actor => actor.isHidden()); +}; + +Game_Party.prototype.allBattleMembers = function() { + return this.allMembers().slice(0, this.maxBattleMembers()); +}; + +Game_Party.prototype.maxBattleMembers = function() { + return 4; +}; + +Game_Party.prototype.leader = function() { + return this.battleMembers()[0]; +}; + +Game_Party.prototype.removeInvalidMembers = function() { + for (const actorId of this._actors) { + if (!$dataActors[actorId]) { + this._actors.remove(actorId); + } + } +}; + +Game_Party.prototype.reviveBattleMembers = function() { + for (const actor of this.battleMembers()) { + if (actor.isDead()) { + actor.setHp(1); + } + } +}; + +Game_Party.prototype.items = function() { + return Object.keys(this._items).map(id => $dataItems[id]); +}; + +Game_Party.prototype.weapons = function() { + return Object.keys(this._weapons).map(id => $dataWeapons[id]); +}; + +Game_Party.prototype.armors = function() { + return Object.keys(this._armors).map(id => $dataArmors[id]); +}; + +Game_Party.prototype.equipItems = function() { + return this.weapons().concat(this.armors()); +}; + +Game_Party.prototype.allItems = function() { + return this.items().concat(this.equipItems()); +}; + +Game_Party.prototype.itemContainer = function(item) { + if (!item) { + return null; + } else if (DataManager.isItem(item)) { + return this._items; + } else if (DataManager.isWeapon(item)) { + return this._weapons; + } else if (DataManager.isArmor(item)) { + return this._armors; + } else { + return null; + } +}; + +Game_Party.prototype.setupStartingMembers = function() { + this._actors = []; + for (const actorId of $dataSystem.partyMembers) { + if ($gameActors.actor(actorId)) { + this._actors.push(actorId); + } + } +}; + +Game_Party.prototype.name = function() { + const numBattleMembers = this.battleMembers().length; + if (numBattleMembers === 0) { + return ""; + } else if (numBattleMembers === 1) { + return this.leader().name(); + } else { + return TextManager.partyName.format(this.leader().name()); + } +}; + +Game_Party.prototype.setupBattleTest = function() { + this.setupBattleTestMembers(); + this.setupBattleTestItems(); +}; + +Game_Party.prototype.setupBattleTestMembers = function() { + for (const battler of $dataSystem.testBattlers) { + const actor = $gameActors.actor(battler.actorId); + if (actor) { + actor.changeLevel(battler.level, false); + actor.initEquips(battler.equips); + actor.recoverAll(); + this.addActor(battler.actorId); + } + } +}; + +Game_Party.prototype.setupBattleTestItems = function() { + for (const item of $dataItems) { + if (item && item.name.length > 0) { + this.gainItem(item, this.maxItems(item)); + } + } +}; + +Game_Party.prototype.highestLevel = function() { + return Math.max(...this.members().map(actor => actor.level)); +}; + +Game_Party.prototype.addActor = function(actorId) { + if (!this._actors.includes(actorId)) { + this._actors.push(actorId); + $gamePlayer.refresh(); + $gameMap.requestRefresh(); + $gameTemp.requestBattleRefresh(); + if (this.inBattle()) { + const actor = $gameActors.actor(actorId); + if (this.battleMembers().includes(actor)) { + actor.onBattleStart(); + } + } + } +}; + +Game_Party.prototype.removeActor = function(actorId) { + if (this._actors.includes(actorId)) { + const actor = $gameActors.actor(actorId); + const wasBattleMember = this.battleMembers().includes(actor); + this._actors.remove(actorId); + $gamePlayer.refresh(); + $gameMap.requestRefresh(); + $gameTemp.requestBattleRefresh(); + if (this.inBattle() && wasBattleMember) { + actor.onBattleEnd(); + } + } +}; + +Game_Party.prototype.gold = function() { + return this._gold; +}; + +Game_Party.prototype.gainGold = function(amount) { + this._gold = (this._gold + amount).clamp(0, this.maxGold()); +}; + +Game_Party.prototype.loseGold = function(amount) { + this.gainGold(-amount); +}; + +Game_Party.prototype.maxGold = function() { + return 99999999; +}; + +Game_Party.prototype.steps = function() { + return this._steps; +}; + +Game_Party.prototype.increaseSteps = function() { + this._steps++; +}; + +Game_Party.prototype.numItems = function(item) { + const container = this.itemContainer(item); + return container ? container[item.id] || 0 : 0; +}; + +Game_Party.prototype.maxItems = function(/*item*/) { + return 99; +}; + +Game_Party.prototype.hasMaxItems = function(item) { + return this.numItems(item) >= this.maxItems(item); +}; + +Game_Party.prototype.hasItem = function(item, includeEquip) { + if (this.numItems(item) > 0) { + return true; + } else if (includeEquip && this.isAnyMemberEquipped(item)) { + return true; + } else { + return false; + } +}; + +Game_Party.prototype.isAnyMemberEquipped = function(item) { + return this.members().some(actor => actor.equips().includes(item)); +}; + +Game_Party.prototype.gainItem = function(item, amount, includeEquip) { + const container = this.itemContainer(item); + if (container) { + const lastNumber = this.numItems(item); + const newNumber = lastNumber + amount; + container[item.id] = newNumber.clamp(0, this.maxItems(item)); + if (container[item.id] === 0) { + delete container[item.id]; + } + if (includeEquip && newNumber < 0) { + this.discardMembersEquip(item, -newNumber); + } + $gameMap.requestRefresh(); + } +}; + +Game_Party.prototype.discardMembersEquip = function(item, amount) { + let n = amount; + for (const actor of this.members()) { + while (n > 0 && actor.isEquipped(item)) { + actor.discardEquip(item); + n--; + } + } +}; + +Game_Party.prototype.loseItem = function(item, amount, includeEquip) { + this.gainItem(item, -amount, includeEquip); +}; + +Game_Party.prototype.consumeItem = function(item) { + if (DataManager.isItem(item) && item.consumable) { + this.loseItem(item, 1); + } +}; + +Game_Party.prototype.canUse = function(item) { + return this.members().some(actor => actor.canUse(item)); +}; + +Game_Party.prototype.canInput = function() { + return this.members().some(actor => actor.canInput()); +}; + +Game_Party.prototype.isAllDead = function() { + if (Game_Unit.prototype.isAllDead.call(this)) { + return this.inBattle() || !this.isEmpty(); + } else { + return false; + } +}; + +Game_Party.prototype.isEscaped = function() { + return this.isAllDead() && this.hiddenBattleMembers().length > 0; +}; + +Game_Party.prototype.onPlayerWalk = function() { + for (const actor of this.members()) { + actor.onPlayerWalk(); + } +}; + +Game_Party.prototype.menuActor = function() { + let actor = $gameActors.actor(this._menuActorId); + if (!this.members().includes(actor)) { + actor = this.members()[0]; + } + return actor; +}; + +Game_Party.prototype.setMenuActor = function(actor) { + this._menuActorId = actor.actorId(); +}; + +Game_Party.prototype.makeMenuActorNext = function() { + let index = this.members().indexOf(this.menuActor()); + if (index >= 0) { + index = (index + 1) % this.members().length; + this.setMenuActor(this.members()[index]); + } else { + this.setMenuActor(this.members()[0]); + } +}; + +Game_Party.prototype.makeMenuActorPrevious = function() { + let index = this.members().indexOf(this.menuActor()); + if (index >= 0) { + index = (index + this.members().length - 1) % this.members().length; + this.setMenuActor(this.members()[index]); + } else { + this.setMenuActor(this.members()[0]); + } +}; + +Game_Party.prototype.targetActor = function() { + let actor = $gameActors.actor(this._targetActorId); + if (!this.members().includes(actor)) { + actor = this.members()[0]; + } + return actor; +}; + +Game_Party.prototype.setTargetActor = function(actor) { + this._targetActorId = actor.actorId(); +}; + +Game_Party.prototype.lastItem = function() { + return this._lastItem.object(); +}; + +Game_Party.prototype.setLastItem = function(item) { + this._lastItem.setObject(item); +}; + +Game_Party.prototype.swapOrder = function(index1, index2) { + const temp = this._actors[index1]; + this._actors[index1] = this._actors[index2]; + this._actors[index2] = temp; + $gamePlayer.refresh(); +}; + +Game_Party.prototype.charactersForSavefile = function() { + return this.battleMembers().map(actor => [ + actor.characterName(), + actor.characterIndex() + ]); +}; + +Game_Party.prototype.facesForSavefile = function() { + return this.battleMembers().map(actor => [ + actor.faceName(), + actor.faceIndex() + ]); +}; + +Game_Party.prototype.partyAbility = function(abilityId) { + return this.battleMembers().some(actor => actor.partyAbility(abilityId)); +}; + +Game_Party.prototype.hasEncounterHalf = function() { + return this.partyAbility(Game_Party.ABILITY_ENCOUNTER_HALF); +}; + +Game_Party.prototype.hasEncounterNone = function() { + return this.partyAbility(Game_Party.ABILITY_ENCOUNTER_NONE); +}; + +Game_Party.prototype.hasCancelSurprise = function() { + return this.partyAbility(Game_Party.ABILITY_CANCEL_SURPRISE); +}; + +Game_Party.prototype.hasRaisePreemptive = function() { + return this.partyAbility(Game_Party.ABILITY_RAISE_PREEMPTIVE); +}; + +Game_Party.prototype.hasGoldDouble = function() { + return this.partyAbility(Game_Party.ABILITY_GOLD_DOUBLE); +}; + +Game_Party.prototype.hasDropItemDouble = function() { + return this.partyAbility(Game_Party.ABILITY_DROP_ITEM_DOUBLE); +}; + +Game_Party.prototype.ratePreemptive = function(troopAgi) { + let rate = this.agility() >= troopAgi ? 0.05 : 0.03; + if (this.hasRaisePreemptive()) { + rate *= 4; + } + return rate; +}; + +Game_Party.prototype.rateSurprise = function(troopAgi) { + let rate = this.agility() >= troopAgi ? 0.03 : 0.05; + if (this.hasCancelSurprise()) { + rate = 0; + } + return rate; +}; + +Game_Party.prototype.performVictory = function() { + for (const actor of this.members()) { + actor.performVictory(); + } +}; + +Game_Party.prototype.performEscape = function() { + for (const actor of this.members()) { + actor.performEscape(); + } +}; + +Game_Party.prototype.removeBattleStates = function() { + for (const actor of this.members()) { + actor.removeBattleStates(); + } +}; + +Game_Party.prototype.requestMotionRefresh = function() { + for (const actor of this.members()) { + actor.requestMotionRefresh(); + } +}; + +Game_Party.prototype.onEscapeFailure = function() { + for (const actor of this.members()) { + actor.onEscapeFailure(); + } +}; + +//----------------------------------------------------------------------------- +// Game_Troop +// +// The game object class for a troop and the battle-related data. + +function Game_Troop() { + this.initialize(...arguments); +} + +Game_Troop.prototype = Object.create(Game_Unit.prototype); +Game_Troop.prototype.constructor = Game_Troop; + +// prettier-ignore +Game_Troop.LETTER_TABLE_HALF = [ + " A"," B"," C"," D"," E"," F"," G"," H"," I"," J"," K"," L"," M", + " N"," O"," P"," Q"," R"," S"," T"," U"," V"," W"," X"," Y"," Z" +]; +// prettier-ignore +Game_Troop.LETTER_TABLE_FULL = [ + "A","B","C","D","E","F","G","H","I","J","K","L","M", + "N","O","P","Q","R","S","T","U","V","W","X","Y","Z" +]; + +Game_Troop.prototype.initialize = function() { + Game_Unit.prototype.initialize.call(this); + this._interpreter = new Game_Interpreter(); + this.clear(); +}; + +Game_Troop.prototype.isEventRunning = function() { + return this._interpreter.isRunning(); +}; + +Game_Troop.prototype.updateInterpreter = function() { + this._interpreter.update(); +}; + +Game_Troop.prototype.turnCount = function() { + return this._turnCount; +}; + +Game_Troop.prototype.members = function() { + return this._enemies; +}; + +Game_Troop.prototype.clear = function() { + this._interpreter.clear(); + this._troopId = 0; + this._eventFlags = {}; + this._enemies = []; + this._turnCount = 0; + this._namesCount = {}; +}; + +Game_Troop.prototype.troop = function() { + return $dataTroops[this._troopId]; +}; + +Game_Troop.prototype.setup = function(troopId) { + this.clear(); + this._troopId = troopId; + this._enemies = []; + for (const member of this.troop().members) { + if ($dataEnemies[member.enemyId]) { + const enemyId = member.enemyId; + const x = member.x; + const y = member.y; + const enemy = new Game_Enemy(enemyId, x, y); + if (member.hidden) { + enemy.hide(); + } + this._enemies.push(enemy); + } + } + this.makeUniqueNames(); +}; + +Game_Troop.prototype.makeUniqueNames = function() { + const table = this.letterTable(); + for (const enemy of this.members()) { + if (enemy.isAlive() && enemy.isLetterEmpty()) { + const name = enemy.originalName(); + const n = this._namesCount[name] || 0; + enemy.setLetter(table[n % table.length]); + this._namesCount[name] = n + 1; + } + } + this.updatePluralFlags(); +}; + +Game_Troop.prototype.updatePluralFlags = function() { + for (const enemy of this.members()) { + const name = enemy.originalName(); + if (this._namesCount[name] >= 2) { + enemy.setPlural(true); + } + } +}; + +Game_Troop.prototype.letterTable = function() { + return $gameSystem.isCJK() + ? Game_Troop.LETTER_TABLE_FULL + : Game_Troop.LETTER_TABLE_HALF; +}; + +Game_Troop.prototype.enemyNames = function() { + const names = []; + for (const enemy of this.members()) { + const name = enemy.originalName(); + if (enemy.isAlive() && !names.includes(name)) { + names.push(name); + } + } + return names; +}; + +Game_Troop.prototype.meetsConditions = function(page) { + const c = page.conditions; + if ( + !c.turnEnding && + !c.turnValid && + !c.enemyValid && + !c.actorValid && + !c.switchValid + ) { + return false; // Conditions not set + } + if (c.turnEnding) { + if (!BattleManager.isTurnEnd()) { + return false; + } + } + if (c.turnValid) { + const n = this._turnCount; + const a = c.turnA; + const b = c.turnB; + if (b === 0 && n !== a) { + return false; + } + if (b > 0 && (n < 1 || n < a || n % b !== a % b)) { + return false; + } + } + if (c.enemyValid) { + const enemy = $gameTroop.members()[c.enemyIndex]; + if (!enemy || enemy.hpRate() * 100 > c.enemyHp) { + return false; + } + } + if (c.actorValid) { + const actor = $gameActors.actor(c.actorId); + if (!actor || actor.hpRate() * 100 > c.actorHp) { + return false; + } + } + if (c.switchValid) { + if (!$gameSwitches.value(c.switchId)) { + return false; + } + } + return true; +}; + +Game_Troop.prototype.setupBattleEvent = function() { + if (!this._interpreter.isRunning()) { + if (this._interpreter.setupReservedCommonEvent()) { + return; + } + const pages = this.troop().pages; + for (let i = 0; i < pages.length; i++) { + const page = pages[i]; + if (this.meetsConditions(page) && !this._eventFlags[i]) { + this._interpreter.setup(page.list); + if (page.span <= 1) { + this._eventFlags[i] = true; + } + break; + } + } + } +}; + +Game_Troop.prototype.increaseTurn = function() { + const pages = this.troop().pages; + for (let i = 0; i < pages.length; i++) { + const page = pages[i]; + if (page.span === 1) { + this._eventFlags[i] = false; + } + } + this._turnCount++; +}; + +Game_Troop.prototype.expTotal = function() { + return this.deadMembers().reduce((r, enemy) => r + enemy.exp(), 0); +}; + +Game_Troop.prototype.goldTotal = function() { + const members = this.deadMembers(); + return members.reduce((r, enemy) => r + enemy.gold(), 0) * this.goldRate(); +}; + +Game_Troop.prototype.goldRate = function() { + return $gameParty.hasGoldDouble() ? 2 : 1; +}; + +Game_Troop.prototype.makeDropItems = function() { + const members = this.deadMembers(); + return members.reduce((r, enemy) => r.concat(enemy.makeDropItems()), []); +}; + +Game_Troop.prototype.isTpbTurnEnd = function() { + const members = this.members(); + const turnMax = Math.max(...members.map(member => member.turnCount())); + return turnMax > this._turnCount; +}; + +//----------------------------------------------------------------------------- +// Game_Map +// +// The game object class for a map. It contains scrolling and passage +// determination functions. + +function Game_Map() { + this.initialize(...arguments); +} + +Game_Map.prototype.initialize = function() { + this._interpreter = new Game_Interpreter(); + this._mapId = 0; + this._tilesetId = 0; + this._events = []; + this._commonEvents = []; + this._vehicles = []; + this._displayX = 0; + this._displayY = 0; + this._nameDisplay = true; + this._scrollDirection = 2; + this._scrollRest = 0; + this._scrollSpeed = 4; + this._parallaxName = ""; + this._parallaxZero = false; + this._parallaxLoopX = false; + this._parallaxLoopY = false; + this._parallaxSx = 0; + this._parallaxSy = 0; + this._parallaxX = 0; + this._parallaxY = 0; + this._battleback1Name = null; + this._battleback2Name = null; + this.createVehicles(); +}; + +Game_Map.prototype.setup = function(mapId) { + if (!$dataMap) { + throw new Error("The map data is not available"); + } + this._mapId = mapId; + this._tilesetId = $dataMap.tilesetId; + this._displayX = 0; + this._displayY = 0; + this.refereshVehicles(); + this.setupEvents(); + this.setupScroll(); + this.setupParallax(); + this.setupBattleback(); + this._needsRefresh = false; +}; + +Game_Map.prototype.isEventRunning = function() { + return this._interpreter.isRunning() || this.isAnyEventStarting(); +}; + +Game_Map.prototype.tileWidth = function() { + return 48; +}; + +Game_Map.prototype.tileHeight = function() { + return 48; +}; + +Game_Map.prototype.mapId = function() { + return this._mapId; +}; + +Game_Map.prototype.tilesetId = function() { + return this._tilesetId; +}; + +Game_Map.prototype.displayX = function() { + return this._displayX; +}; + +Game_Map.prototype.displayY = function() { + return this._displayY; +}; + +Game_Map.prototype.parallaxName = function() { + return this._parallaxName; +}; + +Game_Map.prototype.battleback1Name = function() { + return this._battleback1Name; +}; + +Game_Map.prototype.battleback2Name = function() { + return this._battleback2Name; +}; + +Game_Map.prototype.requestRefresh = function() { + this._needsRefresh = true; +}; + +Game_Map.prototype.isNameDisplayEnabled = function() { + return this._nameDisplay; +}; + +Game_Map.prototype.disableNameDisplay = function() { + this._nameDisplay = false; +}; + +Game_Map.prototype.enableNameDisplay = function() { + this._nameDisplay = true; +}; + +Game_Map.prototype.createVehicles = function() { + this._vehicles = []; + this._vehicles[0] = new Game_Vehicle("boat"); + this._vehicles[1] = new Game_Vehicle("ship"); + this._vehicles[2] = new Game_Vehicle("airship"); +}; + +Game_Map.prototype.refereshVehicles = function() { + for (const vehicle of this._vehicles) { + vehicle.refresh(); + } +}; + +Game_Map.prototype.vehicles = function() { + return this._vehicles; +}; + +Game_Map.prototype.vehicle = function(type) { + if (type === 0 || type === "boat") { + return this.boat(); + } else if (type === 1 || type === "ship") { + return this.ship(); + } else if (type === 2 || type === "airship") { + return this.airship(); + } else { + return null; + } +}; + +Game_Map.prototype.boat = function() { + return this._vehicles[0]; +}; + +Game_Map.prototype.ship = function() { + return this._vehicles[1]; +}; + +Game_Map.prototype.airship = function() { + return this._vehicles[2]; +}; + +Game_Map.prototype.setupEvents = function() { + this._events = []; + this._commonEvents = []; + for (const event of $dataMap.events.filter(event => !!event)) { + this._events[event.id] = new Game_Event(this._mapId, event.id); + } + for (const commonEvent of this.parallelCommonEvents()) { + this._commonEvents.push(new Game_CommonEvent(commonEvent.id)); + } + this.refreshTileEvents(); +}; + +Game_Map.prototype.events = function() { + return this._events.filter(event => !!event); +}; + +Game_Map.prototype.event = function(eventId) { + return this._events[eventId]; +}; + +Game_Map.prototype.eraseEvent = function(eventId) { + this._events[eventId].erase(); +}; + +Game_Map.prototype.autorunCommonEvents = function() { + return $dataCommonEvents.filter( + commonEvent => commonEvent && commonEvent.trigger === 1 + ); +}; + +Game_Map.prototype.parallelCommonEvents = function() { + return $dataCommonEvents.filter( + commonEvent => commonEvent && commonEvent.trigger === 2 + ); +}; + +Game_Map.prototype.setupScroll = function() { + this._scrollDirection = 2; + this._scrollRest = 0; + this._scrollSpeed = 4; +}; + +Game_Map.prototype.setupParallax = function() { + this._parallaxName = $dataMap.parallaxName || ""; + this._parallaxZero = ImageManager.isZeroParallax(this._parallaxName); + this._parallaxLoopX = $dataMap.parallaxLoopX; + this._parallaxLoopY = $dataMap.parallaxLoopY; + this._parallaxSx = $dataMap.parallaxSx; + this._parallaxSy = $dataMap.parallaxSy; + this._parallaxX = 0; + this._parallaxY = 0; +}; + +Game_Map.prototype.setupBattleback = function() { + if ($dataMap.specifyBattleback) { + this._battleback1Name = $dataMap.battleback1Name; + this._battleback2Name = $dataMap.battleback2Name; + } else { + this._battleback1Name = null; + this._battleback2Name = null; + } +}; + +Game_Map.prototype.setDisplayPos = function(x, y) { + if (this.isLoopHorizontal()) { + this._displayX = x.mod(this.width()); + this._parallaxX = x; + } else { + const endX = this.width() - this.screenTileX(); + this._displayX = endX < 0 ? endX / 2 : x.clamp(0, endX); + this._parallaxX = this._displayX; + } + if (this.isLoopVertical()) { + this._displayY = y.mod(this.height()); + this._parallaxY = y; + } else { + const endY = this.height() - this.screenTileY(); + this._displayY = endY < 0 ? endY / 2 : y.clamp(0, endY); + this._parallaxY = this._displayY; + } +}; + +Game_Map.prototype.parallaxOx = function() { + if (this._parallaxZero) { + return this._parallaxX * this.tileWidth(); + } else if (this._parallaxLoopX) { + return (this._parallaxX * this.tileWidth()) / 2; + } else { + return 0; + } +}; + +Game_Map.prototype.parallaxOy = function() { + if (this._parallaxZero) { + return this._parallaxY * this.tileHeight(); + } else if (this._parallaxLoopY) { + return (this._parallaxY * this.tileHeight()) / 2; + } else { + return 0; + } +}; + +Game_Map.prototype.tileset = function() { + return $dataTilesets[this._tilesetId]; +}; + +Game_Map.prototype.tilesetFlags = function() { + const tileset = this.tileset(); + if (tileset) { + return tileset.flags; + } else { + return []; + } +}; + +Game_Map.prototype.displayName = function() { + return $dataMap.displayName; +}; + +Game_Map.prototype.width = function() { + return $dataMap.width; +}; + +Game_Map.prototype.height = function() { + return $dataMap.height; +}; + +Game_Map.prototype.data = function() { + return $dataMap.data; +}; + +Game_Map.prototype.isLoopHorizontal = function() { + return $dataMap.scrollType === 2 || $dataMap.scrollType === 3; +}; + +Game_Map.prototype.isLoopVertical = function() { + return $dataMap.scrollType === 1 || $dataMap.scrollType === 3; +}; + +Game_Map.prototype.isDashDisabled = function() { + return $dataMap.disableDashing; +}; + +Game_Map.prototype.encounterList = function() { + return $dataMap.encounterList; +}; + +Game_Map.prototype.encounterStep = function() { + return $dataMap.encounterStep; +}; + +Game_Map.prototype.isOverworld = function() { + return this.tileset() && this.tileset().mode === 0; +}; + +Game_Map.prototype.screenTileX = function() { + return Math.round((Graphics.width / this.tileWidth()) * 16) / 16; +}; + +Game_Map.prototype.screenTileY = function() { + return Math.round((Graphics.height / this.tileHeight()) * 16) / 16; +}; + +Game_Map.prototype.adjustX = function(x) { + if ( + this.isLoopHorizontal() && + x < this._displayX - (this.width() - this.screenTileX()) / 2 + ) { + return x - this._displayX + $dataMap.width; + } else { + return x - this._displayX; + } +}; + +Game_Map.prototype.adjustY = function(y) { + if ( + this.isLoopVertical() && + y < this._displayY - (this.height() - this.screenTileY()) / 2 + ) { + return y - this._displayY + $dataMap.height; + } else { + return y - this._displayY; + } +}; + +Game_Map.prototype.roundX = function(x) { + return this.isLoopHorizontal() ? x.mod(this.width()) : x; +}; + +Game_Map.prototype.roundY = function(y) { + return this.isLoopVertical() ? y.mod(this.height()) : y; +}; + +Game_Map.prototype.xWithDirection = function(x, d) { + return x + (d === 6 ? 1 : d === 4 ? -1 : 0); +}; + +Game_Map.prototype.yWithDirection = function(y, d) { + return y + (d === 2 ? 1 : d === 8 ? -1 : 0); +}; + +Game_Map.prototype.roundXWithDirection = function(x, d) { + return this.roundX(x + (d === 6 ? 1 : d === 4 ? -1 : 0)); +}; + +Game_Map.prototype.roundYWithDirection = function(y, d) { + return this.roundY(y + (d === 2 ? 1 : d === 8 ? -1 : 0)); +}; + +Game_Map.prototype.deltaX = function(x1, x2) { + let result = x1 - x2; + if (this.isLoopHorizontal() && Math.abs(result) > this.width() / 2) { + if (result < 0) { + result += this.width(); + } else { + result -= this.width(); + } + } + return result; +}; + +Game_Map.prototype.deltaY = function(y1, y2) { + let result = y1 - y2; + if (this.isLoopVertical() && Math.abs(result) > this.height() / 2) { + if (result < 0) { + result += this.height(); + } else { + result -= this.height(); + } + } + return result; +}; + +Game_Map.prototype.distance = function(x1, y1, x2, y2) { + return Math.abs(this.deltaX(x1, x2)) + Math.abs(this.deltaY(y1, y2)); +}; + +Game_Map.prototype.canvasToMapX = function(x) { + const tileWidth = this.tileWidth(); + const originX = this._displayX * tileWidth; + const mapX = Math.floor((originX + x) / tileWidth); + return this.roundX(mapX); +}; + +Game_Map.prototype.canvasToMapY = function(y) { + const tileHeight = this.tileHeight(); + const originY = this._displayY * tileHeight; + const mapY = Math.floor((originY + y) / tileHeight); + return this.roundY(mapY); +}; + +Game_Map.prototype.autoplay = function() { + if ($dataMap.autoplayBgm) { + if ($gamePlayer.isInVehicle()) { + $gameSystem.saveWalkingBgm2(); + } else { + AudioManager.playBgm($dataMap.bgm); + } + } + if ($dataMap.autoplayBgs) { + AudioManager.playBgs($dataMap.bgs); + } +}; + +Game_Map.prototype.refreshIfNeeded = function() { + if (this._needsRefresh) { + this.refresh(); + } +}; + +Game_Map.prototype.refresh = function() { + for (const event of this.events()) { + event.refresh(); + } + for (const commonEvent of this._commonEvents) { + commonEvent.refresh(); + } + this.refreshTileEvents(); + this._needsRefresh = false; +}; + +Game_Map.prototype.refreshTileEvents = function() { + this._tileEvents = this.events().filter(event => event.isTile()); +}; + +Game_Map.prototype.eventsXy = function(x, y) { + return this.events().filter(event => event.pos(x, y)); +}; + +Game_Map.prototype.eventsXyNt = function(x, y) { + return this.events().filter(event => event.posNt(x, y)); +}; + +Game_Map.prototype.tileEventsXy = function(x, y) { + return this._tileEvents.filter(event => event.posNt(x, y)); +}; + +Game_Map.prototype.eventIdXy = function(x, y) { + const list = this.eventsXy(x, y); + return list.length === 0 ? 0 : list[0].eventId(); +}; + +Game_Map.prototype.scrollDown = function(distance) { + if (this.isLoopVertical()) { + this._displayY += distance; + this._displayY %= $dataMap.height; + if (this._parallaxLoopY) { + this._parallaxY += distance; + } + } else if (this.height() >= this.screenTileY()) { + const lastY = this._displayY; + this._displayY = Math.min( + this._displayY + distance, + this.height() - this.screenTileY() + ); + this._parallaxY += this._displayY - lastY; + } +}; + +Game_Map.prototype.scrollLeft = function(distance) { + if (this.isLoopHorizontal()) { + this._displayX += $dataMap.width - distance; + this._displayX %= $dataMap.width; + if (this._parallaxLoopX) { + this._parallaxX -= distance; + } + } else if (this.width() >= this.screenTileX()) { + const lastX = this._displayX; + this._displayX = Math.max(this._displayX - distance, 0); + this._parallaxX += this._displayX - lastX; + } +}; + +Game_Map.prototype.scrollRight = function(distance) { + if (this.isLoopHorizontal()) { + this._displayX += distance; + this._displayX %= $dataMap.width; + if (this._parallaxLoopX) { + this._parallaxX += distance; + } + } else if (this.width() >= this.screenTileX()) { + const lastX = this._displayX; + this._displayX = Math.min( + this._displayX + distance, + this.width() - this.screenTileX() + ); + this._parallaxX += this._displayX - lastX; + } +}; + +Game_Map.prototype.scrollUp = function(distance) { + if (this.isLoopVertical()) { + this._displayY += $dataMap.height - distance; + this._displayY %= $dataMap.height; + if (this._parallaxLoopY) { + this._parallaxY -= distance; + } + } else if (this.height() >= this.screenTileY()) { + const lastY = this._displayY; + this._displayY = Math.max(this._displayY - distance, 0); + this._parallaxY += this._displayY - lastY; + } +}; + +Game_Map.prototype.isValid = function(x, y) { + return x >= 0 && x < this.width() && y >= 0 && y < this.height(); +}; + +Game_Map.prototype.checkPassage = function(x, y, bit) { + const flags = this.tilesetFlags(); + const tiles = this.allTiles(x, y); + for (const tile of tiles) { + const flag = flags[tile]; + if ((flag & 0x10) !== 0) { + // [*] No effect on passage + continue; + } + if ((flag & bit) === 0) { + // [o] Passable + return true; + } + if ((flag & bit) === bit) { + // [x] Impassable + return false; + } + } + return false; +}; + +Game_Map.prototype.tileId = function(x, y, z) { + const width = $dataMap.width; + const height = $dataMap.height; + return $dataMap.data[(z * height + y) * width + x] || 0; +}; + +Game_Map.prototype.layeredTiles = function(x, y) { + const tiles = []; + for (let i = 0; i < 4; i++) { + tiles.push(this.tileId(x, y, 3 - i)); + } + return tiles; +}; + +Game_Map.prototype.allTiles = function(x, y) { + const tiles = this.tileEventsXy(x, y).map(event => event.tileId()); + return tiles.concat(this.layeredTiles(x, y)); +}; + +Game_Map.prototype.autotileType = function(x, y, z) { + const tileId = this.tileId(x, y, z); + return tileId >= 2048 ? Math.floor((tileId - 2048) / 48) : -1; +}; + +Game_Map.prototype.isPassable = function(x, y, d) { + return this.checkPassage(x, y, (1 << (d / 2 - 1)) & 0x0f); +}; + +Game_Map.prototype.isBoatPassable = function(x, y) { + return this.checkPassage(x, y, 0x0200); +}; + +Game_Map.prototype.isShipPassable = function(x, y) { + return this.checkPassage(x, y, 0x0400); +}; + +Game_Map.prototype.isAirshipLandOk = function(x, y) { + return this.checkPassage(x, y, 0x0800) && this.checkPassage(x, y, 0x0f); +}; + +Game_Map.prototype.checkLayeredTilesFlags = function(x, y, bit) { + const flags = this.tilesetFlags(); + return this.layeredTiles(x, y).some(tileId => (flags[tileId] & bit) !== 0); +}; + +Game_Map.prototype.isLadder = function(x, y) { + return this.isValid(x, y) && this.checkLayeredTilesFlags(x, y, 0x20); +}; + +Game_Map.prototype.isBush = function(x, y) { + return this.isValid(x, y) && this.checkLayeredTilesFlags(x, y, 0x40); +}; + +Game_Map.prototype.isCounter = function(x, y) { + return this.isValid(x, y) && this.checkLayeredTilesFlags(x, y, 0x80); +}; + +Game_Map.prototype.isDamageFloor = function(x, y) { + return this.isValid(x, y) && this.checkLayeredTilesFlags(x, y, 0x100); +}; + +Game_Map.prototype.terrainTag = function(x, y) { + if (this.isValid(x, y)) { + const flags = this.tilesetFlags(); + const tiles = this.layeredTiles(x, y); + for (const tile of tiles) { + const tag = flags[tile] >> 12; + if (tag > 0) { + return tag; + } + } + } + return 0; +}; + +Game_Map.prototype.regionId = function(x, y) { + return this.isValid(x, y) ? this.tileId(x, y, 5) : 0; +}; + +Game_Map.prototype.startScroll = function(direction, distance, speed) { + this._scrollDirection = direction; + this._scrollRest = distance; + this._scrollSpeed = speed; +}; + +Game_Map.prototype.isScrolling = function() { + return this._scrollRest > 0; +}; + +Game_Map.prototype.update = function(sceneActive) { + this.refreshIfNeeded(); + if (sceneActive) { + this.updateInterpreter(); + } + this.updateScroll(); + this.updateEvents(); + this.updateVehicles(); + this.updateParallax(); +}; + +Game_Map.prototype.updateScroll = function() { + if (this.isScrolling()) { + const lastX = this._displayX; + const lastY = this._displayY; + this.doScroll(this._scrollDirection, this.scrollDistance()); + if (this._displayX === lastX && this._displayY === lastY) { + this._scrollRest = 0; + } else { + this._scrollRest -= this.scrollDistance(); + } + } +}; + +Game_Map.prototype.scrollDistance = function() { + return Math.pow(2, this._scrollSpeed) / 256; +}; + +Game_Map.prototype.doScroll = function(direction, distance) { + switch (direction) { + case 2: + this.scrollDown(distance); + break; + case 4: + this.scrollLeft(distance); + break; + case 6: + this.scrollRight(distance); + break; + case 8: + this.scrollUp(distance); + break; + } +}; + +Game_Map.prototype.updateEvents = function() { + for (const event of this.events()) { + event.update(); + } + for (const commonEvent of this._commonEvents) { + commonEvent.update(); + } +}; + +Game_Map.prototype.updateVehicles = function() { + for (const vehicle of this._vehicles) { + vehicle.update(); + } +}; + +Game_Map.prototype.updateParallax = function() { + if (this._parallaxLoopX) { + this._parallaxX += this._parallaxSx / this.tileWidth() / 2; + } + if (this._parallaxLoopY) { + this._parallaxY += this._parallaxSy / this.tileHeight() / 2; + } +}; + +Game_Map.prototype.changeTileset = function(tilesetId) { + this._tilesetId = tilesetId; + this.refresh(); +}; + +Game_Map.prototype.changeBattleback = function( + battleback1Name, + battleback2Name +) { + this._battleback1Name = battleback1Name; + this._battleback2Name = battleback2Name; +}; + +Game_Map.prototype.changeParallax = function(name, loopX, loopY, sx, sy) { + this._parallaxName = name; + this._parallaxZero = ImageManager.isZeroParallax(this._parallaxName); + if (this._parallaxLoopX && !loopX) { + this._parallaxX = 0; + } + if (this._parallaxLoopY && !loopY) { + this._parallaxY = 0; + } + this._parallaxLoopX = loopX; + this._parallaxLoopY = loopY; + this._parallaxSx = sx; + this._parallaxSy = sy; +}; + +Game_Map.prototype.updateInterpreter = function() { + for (;;) { + this._interpreter.update(); + if (this._interpreter.isRunning()) { + return; + } + if (this._interpreter.eventId() > 0) { + this.unlockEvent(this._interpreter.eventId()); + this._interpreter.clear(); + } + if (!this.setupStartingEvent()) { + return; + } + } +}; + +Game_Map.prototype.unlockEvent = function(eventId) { + if (this._events[eventId]) { + this._events[eventId].unlock(); + } +}; + +Game_Map.prototype.setupStartingEvent = function() { + this.refreshIfNeeded(); + if (this._interpreter.setupReservedCommonEvent()) { + return true; + } + if (this.setupTestEvent()) { + return true; + } + if (this.setupStartingMapEvent()) { + return true; + } + if (this.setupAutorunCommonEvent()) { + return true; + } + return false; +}; + +Game_Map.prototype.setupTestEvent = function() { + if (window.$testEvent) { + this._interpreter.setup($testEvent, 0); + $testEvent = null; + return true; + } + return false; +}; + +Game_Map.prototype.setupStartingMapEvent = function() { + for (const event of this.events()) { + if (event.isStarting()) { + event.clearStartingFlag(); + this._interpreter.setup(event.list(), event.eventId()); + return true; + } + } + return false; +}; + +Game_Map.prototype.setupAutorunCommonEvent = function() { + for (const commonEvent of this.autorunCommonEvents()) { + if ($gameSwitches.value(commonEvent.switchId)) { + this._interpreter.setup(commonEvent.list); + return true; + } + } + return false; +}; + +Game_Map.prototype.isAnyEventStarting = function() { + return this.events().some(event => event.isStarting()); +}; + +//----------------------------------------------------------------------------- +// Game_CommonEvent +// +// The game object class for a common event. It contains functionality for +// running parallel process events. + +function Game_CommonEvent() { + this.initialize(...arguments); +} + +Game_CommonEvent.prototype.initialize = function(commonEventId) { + this._commonEventId = commonEventId; + this.refresh(); +}; + +Game_CommonEvent.prototype.event = function() { + return $dataCommonEvents[this._commonEventId]; +}; + +Game_CommonEvent.prototype.list = function() { + return this.event().list; +}; + +Game_CommonEvent.prototype.refresh = function() { + if (this.isActive()) { + if (!this._interpreter) { + this._interpreter = new Game_Interpreter(); + } + } else { + this._interpreter = null; + } +}; + +Game_CommonEvent.prototype.isActive = function() { + const event = this.event(); + return event.trigger === 2 && $gameSwitches.value(event.switchId); +}; + +Game_CommonEvent.prototype.update = function() { + if (this._interpreter) { + if (!this._interpreter.isRunning()) { + this._interpreter.setup(this.list()); + } + this._interpreter.update(); + } +}; + +//----------------------------------------------------------------------------- +// Game_CharacterBase +// +// The superclass of Game_Character. It handles basic information, such as +// coordinates and images, shared by all characters. + +function Game_CharacterBase() { + this.initialize(...arguments); +} + +Object.defineProperties(Game_CharacterBase.prototype, { + x: { + get: function() { + return this._x; + }, + configurable: true + }, + y: { + get: function() { + return this._y; + }, + configurable: true + } +}); + +Game_CharacterBase.prototype.initialize = function() { + this.initMembers(); +}; + +Game_CharacterBase.prototype.initMembers = function() { + this._x = 0; + this._y = 0; + this._realX = 0; + this._realY = 0; + this._moveSpeed = 4; + this._moveFrequency = 6; + this._opacity = 255; + this._blendMode = 0; + this._direction = 2; + this._pattern = 1; + this._priorityType = 1; + this._tileId = 0; + this._characterName = ""; + this._characterIndex = 0; + this._isObjectCharacter = false; + this._walkAnime = true; + this._stepAnime = false; + this._directionFix = false; + this._through = false; + this._transparent = false; + this._bushDepth = 0; + this._animationId = 0; + this._balloonId = 0; + this._animationPlaying = false; + this._balloonPlaying = false; + this._animationCount = 0; + this._stopCount = 0; + this._jumpCount = 0; + this._jumpPeak = 0; + this._movementSuccess = true; +}; + +Game_CharacterBase.prototype.pos = function(x, y) { + return this._x === x && this._y === y; +}; + +Game_CharacterBase.prototype.posNt = function(x, y) { + // No through + return this.pos(x, y) && !this.isThrough(); +}; + +Game_CharacterBase.prototype.moveSpeed = function() { + return this._moveSpeed; +}; + +Game_CharacterBase.prototype.setMoveSpeed = function(moveSpeed) { + this._moveSpeed = moveSpeed; +}; + +Game_CharacterBase.prototype.moveFrequency = function() { + return this._moveFrequency; +}; + +Game_CharacterBase.prototype.setMoveFrequency = function(moveFrequency) { + this._moveFrequency = moveFrequency; +}; + +Game_CharacterBase.prototype.opacity = function() { + return this._opacity; +}; + +Game_CharacterBase.prototype.setOpacity = function(opacity) { + this._opacity = opacity; +}; + +Game_CharacterBase.prototype.blendMode = function() { + return this._blendMode; +}; + +Game_CharacterBase.prototype.setBlendMode = function(blendMode) { + this._blendMode = blendMode; +}; + +Game_CharacterBase.prototype.isNormalPriority = function() { + return this._priorityType === 1; +}; + +Game_CharacterBase.prototype.setPriorityType = function(priorityType) { + this._priorityType = priorityType; +}; + +Game_CharacterBase.prototype.isMoving = function() { + return this._realX !== this._x || this._realY !== this._y; +}; + +Game_CharacterBase.prototype.isJumping = function() { + return this._jumpCount > 0; +}; + +Game_CharacterBase.prototype.jumpHeight = function() { + return ( + (this._jumpPeak * this._jumpPeak - + Math.pow(Math.abs(this._jumpCount - this._jumpPeak), 2)) / + 2 + ); +}; + +Game_CharacterBase.prototype.isStopping = function() { + return !this.isMoving() && !this.isJumping(); +}; + +Game_CharacterBase.prototype.checkStop = function(threshold) { + return this._stopCount > threshold; +}; + +Game_CharacterBase.prototype.resetStopCount = function() { + this._stopCount = 0; +}; + +Game_CharacterBase.prototype.realMoveSpeed = function() { + return this._moveSpeed + (this.isDashing() ? 1 : 0); +}; + +Game_CharacterBase.prototype.distancePerFrame = function() { + return Math.pow(2, this.realMoveSpeed()) / 256; +}; + +Game_CharacterBase.prototype.isDashing = function() { + return false; +}; + +Game_CharacterBase.prototype.isDebugThrough = function() { + return false; +}; + +Game_CharacterBase.prototype.straighten = function() { + if (this.hasWalkAnime() || this.hasStepAnime()) { + this._pattern = 1; + } + this._animationCount = 0; +}; + +Game_CharacterBase.prototype.reverseDir = function(d) { + return 10 - d; +}; + +Game_CharacterBase.prototype.canPass = function(x, y, d) { + const x2 = $gameMap.roundXWithDirection(x, d); + const y2 = $gameMap.roundYWithDirection(y, d); + if (!$gameMap.isValid(x2, y2)) { + return false; + } + if (this.isThrough() || this.isDebugThrough()) { + return true; + } + if (!this.isMapPassable(x, y, d)) { + return false; + } + if (this.isCollidedWithCharacters(x2, y2)) { + return false; + } + return true; +}; + +Game_CharacterBase.prototype.canPassDiagonally = function(x, y, horz, vert) { + const x2 = $gameMap.roundXWithDirection(x, horz); + const y2 = $gameMap.roundYWithDirection(y, vert); + if (this.canPass(x, y, vert) && this.canPass(x, y2, horz)) { + return true; + } + if (this.canPass(x, y, horz) && this.canPass(x2, y, vert)) { + return true; + } + return false; +}; + +Game_CharacterBase.prototype.isMapPassable = function(x, y, d) { + const x2 = $gameMap.roundXWithDirection(x, d); + const y2 = $gameMap.roundYWithDirection(y, d); + const d2 = this.reverseDir(d); + return $gameMap.isPassable(x, y, d) && $gameMap.isPassable(x2, y2, d2); +}; + +Game_CharacterBase.prototype.isCollidedWithCharacters = function(x, y) { + return this.isCollidedWithEvents(x, y) || this.isCollidedWithVehicles(x, y); +}; + +Game_CharacterBase.prototype.isCollidedWithEvents = function(x, y) { + const events = $gameMap.eventsXyNt(x, y); + return events.some(event => event.isNormalPriority()); +}; + +Game_CharacterBase.prototype.isCollidedWithVehicles = function(x, y) { + return $gameMap.boat().posNt(x, y) || $gameMap.ship().posNt(x, y); +}; + +Game_CharacterBase.prototype.setPosition = function(x, y) { + this._x = Math.round(x); + this._y = Math.round(y); + this._realX = x; + this._realY = y; +}; + +Game_CharacterBase.prototype.copyPosition = function(character) { + this._x = character._x; + this._y = character._y; + this._realX = character._realX; + this._realY = character._realY; + this._direction = character._direction; +}; + +Game_CharacterBase.prototype.locate = function(x, y) { + this.setPosition(x, y); + this.straighten(); + this.refreshBushDepth(); +}; + +Game_CharacterBase.prototype.direction = function() { + return this._direction; +}; + +Game_CharacterBase.prototype.setDirection = function(d) { + if (!this.isDirectionFixed() && d) { + this._direction = d; + } + this.resetStopCount(); +}; + +Game_CharacterBase.prototype.isTile = function() { + return this._tileId > 0 && this._priorityType === 0; +}; + +Game_CharacterBase.prototype.isObjectCharacter = function() { + return this._isObjectCharacter; +}; + +Game_CharacterBase.prototype.shiftY = function() { + return this.isObjectCharacter() ? 0 : 6; +}; + +Game_CharacterBase.prototype.scrolledX = function() { + return $gameMap.adjustX(this._realX); +}; + +Game_CharacterBase.prototype.scrolledY = function() { + return $gameMap.adjustY(this._realY); +}; + +Game_CharacterBase.prototype.screenX = function() { + const tw = $gameMap.tileWidth(); + return Math.floor(this.scrolledX() * tw + tw / 2); +}; + +Game_CharacterBase.prototype.screenY = function() { + const th = $gameMap.tileHeight(); + return Math.floor( + this.scrolledY() * th + th - this.shiftY() - this.jumpHeight() + ); +}; + +Game_CharacterBase.prototype.screenZ = function() { + return this._priorityType * 2 + 1; +}; + +Game_CharacterBase.prototype.isNearTheScreen = function() { + const gw = Graphics.width; + const gh = Graphics.height; + const tw = $gameMap.tileWidth(); + const th = $gameMap.tileHeight(); + const px = this.scrolledX() * tw + tw / 2 - gw / 2; + const py = this.scrolledY() * th + th / 2 - gh / 2; + return px >= -gw && px <= gw && py >= -gh && py <= gh; +}; + +Game_CharacterBase.prototype.update = function() { + if (this.isStopping()) { + this.updateStop(); + } + if (this.isJumping()) { + this.updateJump(); + } else if (this.isMoving()) { + this.updateMove(); + } + this.updateAnimation(); +}; + +Game_CharacterBase.prototype.updateStop = function() { + this._stopCount++; +}; + +Game_CharacterBase.prototype.updateJump = function() { + this._jumpCount--; + this._realX = + (this._realX * this._jumpCount + this._x) / (this._jumpCount + 1.0); + this._realY = + (this._realY * this._jumpCount + this._y) / (this._jumpCount + 1.0); + this.refreshBushDepth(); + if (this._jumpCount === 0) { + this._realX = this._x = $gameMap.roundX(this._x); + this._realY = this._y = $gameMap.roundY(this._y); + } +}; + +Game_CharacterBase.prototype.updateMove = function() { + if (this._x < this._realX) { + this._realX = Math.max(this._realX - this.distancePerFrame(), this._x); + } + if (this._x > this._realX) { + this._realX = Math.min(this._realX + this.distancePerFrame(), this._x); + } + if (this._y < this._realY) { + this._realY = Math.max(this._realY - this.distancePerFrame(), this._y); + } + if (this._y > this._realY) { + this._realY = Math.min(this._realY + this.distancePerFrame(), this._y); + } + if (!this.isMoving()) { + this.refreshBushDepth(); + } +}; + +Game_CharacterBase.prototype.updateAnimation = function() { + this.updateAnimationCount(); + if (this._animationCount >= this.animationWait()) { + this.updatePattern(); + this._animationCount = 0; + } +}; + +Game_CharacterBase.prototype.animationWait = function() { + return (9 - this.realMoveSpeed()) * 3; +}; + +Game_CharacterBase.prototype.updateAnimationCount = function() { + if (this.isMoving() && this.hasWalkAnime()) { + this._animationCount += 1.5; + } else if (this.hasStepAnime() || !this.isOriginalPattern()) { + this._animationCount++; + } +}; + +Game_CharacterBase.prototype.updatePattern = function() { + if (!this.hasStepAnime() && this._stopCount > 0) { + this.resetPattern(); + } else { + this._pattern = (this._pattern + 1) % this.maxPattern(); + } +}; + +Game_CharacterBase.prototype.maxPattern = function() { + return 4; +}; + +Game_CharacterBase.prototype.pattern = function() { + return this._pattern < 3 ? this._pattern : 1; +}; + +Game_CharacterBase.prototype.setPattern = function(pattern) { + this._pattern = pattern; +}; + +Game_CharacterBase.prototype.isOriginalPattern = function() { + return this.pattern() === 1; +}; + +Game_CharacterBase.prototype.resetPattern = function() { + this.setPattern(1); +}; + +Game_CharacterBase.prototype.refreshBushDepth = function() { + if ( + this.isNormalPriority() && + !this.isObjectCharacter() && + this.isOnBush() && + !this.isJumping() + ) { + if (!this.isMoving()) { + this._bushDepth = 12; + } + } else { + this._bushDepth = 0; + } +}; + +Game_CharacterBase.prototype.isOnLadder = function() { + return $gameMap.isLadder(this._x, this._y); +}; + +Game_CharacterBase.prototype.isOnBush = function() { + return $gameMap.isBush(this._x, this._y); +}; + +Game_CharacterBase.prototype.terrainTag = function() { + return $gameMap.terrainTag(this._x, this._y); +}; + +Game_CharacterBase.prototype.regionId = function() { + return $gameMap.regionId(this._x, this._y); +}; + +Game_CharacterBase.prototype.increaseSteps = function() { + if (this.isOnLadder()) { + this.setDirection(8); + } + this.resetStopCount(); + this.refreshBushDepth(); +}; + +Game_CharacterBase.prototype.tileId = function() { + return this._tileId; +}; + +Game_CharacterBase.prototype.characterName = function() { + return this._characterName; +}; + +Game_CharacterBase.prototype.characterIndex = function() { + return this._characterIndex; +}; + +Game_CharacterBase.prototype.setImage = function( + characterName, + characterIndex +) { + this._tileId = 0; + this._characterName = characterName; + this._characterIndex = characterIndex; + this._isObjectCharacter = ImageManager.isObjectCharacter(characterName); +}; + +Game_CharacterBase.prototype.setTileImage = function(tileId) { + this._tileId = tileId; + this._characterName = ""; + this._characterIndex = 0; + this._isObjectCharacter = true; +}; + +Game_CharacterBase.prototype.checkEventTriggerTouchFront = function(d) { + const x2 = $gameMap.roundXWithDirection(this._x, d); + const y2 = $gameMap.roundYWithDirection(this._y, d); + this.checkEventTriggerTouch(x2, y2); +}; + +Game_CharacterBase.prototype.checkEventTriggerTouch = function(/*x, y*/) { + return false; +}; + +Game_CharacterBase.prototype.isMovementSucceeded = function(/*x, y*/) { + return this._movementSuccess; +}; + +Game_CharacterBase.prototype.setMovementSuccess = function(success) { + this._movementSuccess = success; +}; + +Game_CharacterBase.prototype.moveStraight = function(d) { + this.setMovementSuccess(this.canPass(this._x, this._y, d)); + if (this.isMovementSucceeded()) { + this.setDirection(d); + this._x = $gameMap.roundXWithDirection(this._x, d); + this._y = $gameMap.roundYWithDirection(this._y, d); + this._realX = $gameMap.xWithDirection(this._x, this.reverseDir(d)); + this._realY = $gameMap.yWithDirection(this._y, this.reverseDir(d)); + this.increaseSteps(); + } else { + this.setDirection(d); + this.checkEventTriggerTouchFront(d); + } +}; + +Game_CharacterBase.prototype.moveDiagonally = function(horz, vert) { + this.setMovementSuccess( + this.canPassDiagonally(this._x, this._y, horz, vert) + ); + if (this.isMovementSucceeded()) { + this._x = $gameMap.roundXWithDirection(this._x, horz); + this._y = $gameMap.roundYWithDirection(this._y, vert); + this._realX = $gameMap.xWithDirection(this._x, this.reverseDir(horz)); + this._realY = $gameMap.yWithDirection(this._y, this.reverseDir(vert)); + this.increaseSteps(); + } + if (this._direction === this.reverseDir(horz)) { + this.setDirection(horz); + } + if (this._direction === this.reverseDir(vert)) { + this.setDirection(vert); + } +}; + +Game_CharacterBase.prototype.jump = function(xPlus, yPlus) { + if (Math.abs(xPlus) > Math.abs(yPlus)) { + if (xPlus !== 0) { + this.setDirection(xPlus < 0 ? 4 : 6); + } + } else { + if (yPlus !== 0) { + this.setDirection(yPlus < 0 ? 8 : 2); + } + } + this._x += xPlus; + this._y += yPlus; + const distance = Math.round(Math.sqrt(xPlus * xPlus + yPlus * yPlus)); + this._jumpPeak = 10 + distance - this._moveSpeed; + this._jumpCount = this._jumpPeak * 2; + this.resetStopCount(); + this.straighten(); +}; + +Game_CharacterBase.prototype.hasWalkAnime = function() { + return this._walkAnime; +}; + +Game_CharacterBase.prototype.setWalkAnime = function(walkAnime) { + this._walkAnime = walkAnime; +}; + +Game_CharacterBase.prototype.hasStepAnime = function() { + return this._stepAnime; +}; + +Game_CharacterBase.prototype.setStepAnime = function(stepAnime) { + this._stepAnime = stepAnime; +}; + +Game_CharacterBase.prototype.isDirectionFixed = function() { + return this._directionFix; +}; + +Game_CharacterBase.prototype.setDirectionFix = function(directionFix) { + this._directionFix = directionFix; +}; + +Game_CharacterBase.prototype.isThrough = function() { + return this._through; +}; + +Game_CharacterBase.prototype.setThrough = function(through) { + this._through = through; +}; + +Game_CharacterBase.prototype.isTransparent = function() { + return this._transparent; +}; + +Game_CharacterBase.prototype.bushDepth = function() { + return this._bushDepth; +}; + +Game_CharacterBase.prototype.setTransparent = function(transparent) { + this._transparent = transparent; +}; + +Game_CharacterBase.prototype.startAnimation = function() { + this._animationPlaying = true; +}; + +Game_CharacterBase.prototype.startBalloon = function() { + this._balloonPlaying = true; +}; + +Game_CharacterBase.prototype.isAnimationPlaying = function() { + return this._animationPlaying; +}; + +Game_CharacterBase.prototype.isBalloonPlaying = function() { + return this._balloonPlaying; +}; + +Game_CharacterBase.prototype.endAnimation = function() { + this._animationPlaying = false; +}; + +Game_CharacterBase.prototype.endBalloon = function() { + this._balloonPlaying = false; +}; + +//----------------------------------------------------------------------------- +// Game_Character +// +// The superclass of Game_Player, Game_Follower, GameVehicle, and Game_Event. + +function Game_Character() { + this.initialize(...arguments); +} + +Game_Character.prototype = Object.create(Game_CharacterBase.prototype); +Game_Character.prototype.constructor = Game_Character; + +Game_Character.ROUTE_END = 0; +Game_Character.ROUTE_MOVE_DOWN = 1; +Game_Character.ROUTE_MOVE_LEFT = 2; +Game_Character.ROUTE_MOVE_RIGHT = 3; +Game_Character.ROUTE_MOVE_UP = 4; +Game_Character.ROUTE_MOVE_LOWER_L = 5; +Game_Character.ROUTE_MOVE_LOWER_R = 6; +Game_Character.ROUTE_MOVE_UPPER_L = 7; +Game_Character.ROUTE_MOVE_UPPER_R = 8; +Game_Character.ROUTE_MOVE_RANDOM = 9; +Game_Character.ROUTE_MOVE_TOWARD = 10; +Game_Character.ROUTE_MOVE_AWAY = 11; +Game_Character.ROUTE_MOVE_FORWARD = 12; +Game_Character.ROUTE_MOVE_BACKWARD = 13; +Game_Character.ROUTE_JUMP = 14; +Game_Character.ROUTE_WAIT = 15; +Game_Character.ROUTE_TURN_DOWN = 16; +Game_Character.ROUTE_TURN_LEFT = 17; +Game_Character.ROUTE_TURN_RIGHT = 18; +Game_Character.ROUTE_TURN_UP = 19; +Game_Character.ROUTE_TURN_90D_R = 20; +Game_Character.ROUTE_TURN_90D_L = 21; +Game_Character.ROUTE_TURN_180D = 22; +Game_Character.ROUTE_TURN_90D_R_L = 23; +Game_Character.ROUTE_TURN_RANDOM = 24; +Game_Character.ROUTE_TURN_TOWARD = 25; +Game_Character.ROUTE_TURN_AWAY = 26; +Game_Character.ROUTE_SWITCH_ON = 27; +Game_Character.ROUTE_SWITCH_OFF = 28; +Game_Character.ROUTE_CHANGE_SPEED = 29; +Game_Character.ROUTE_CHANGE_FREQ = 30; +Game_Character.ROUTE_WALK_ANIME_ON = 31; +Game_Character.ROUTE_WALK_ANIME_OFF = 32; +Game_Character.ROUTE_STEP_ANIME_ON = 33; +Game_Character.ROUTE_STEP_ANIME_OFF = 34; +Game_Character.ROUTE_DIR_FIX_ON = 35; +Game_Character.ROUTE_DIR_FIX_OFF = 36; +Game_Character.ROUTE_THROUGH_ON = 37; +Game_Character.ROUTE_THROUGH_OFF = 38; +Game_Character.ROUTE_TRANSPARENT_ON = 39; +Game_Character.ROUTE_TRANSPARENT_OFF = 40; +Game_Character.ROUTE_CHANGE_IMAGE = 41; +Game_Character.ROUTE_CHANGE_OPACITY = 42; +Game_Character.ROUTE_CHANGE_BLEND_MODE = 43; +Game_Character.ROUTE_PLAY_SE = 44; +Game_Character.ROUTE_SCRIPT = 45; + +Game_Character.prototype.initialize = function() { + Game_CharacterBase.prototype.initialize.call(this); +}; + +Game_Character.prototype.initMembers = function() { + Game_CharacterBase.prototype.initMembers.call(this); + this._moveRouteForcing = false; + this._moveRoute = null; + this._moveRouteIndex = 0; + this._originalMoveRoute = null; + this._originalMoveRouteIndex = 0; + this._waitCount = 0; +}; + +Game_Character.prototype.memorizeMoveRoute = function() { + this._originalMoveRoute = this._moveRoute; + this._originalMoveRouteIndex = this._moveRouteIndex; +}; + +Game_Character.prototype.restoreMoveRoute = function() { + this._moveRoute = this._originalMoveRoute; + this._moveRouteIndex = this._originalMoveRouteIndex; + this._originalMoveRoute = null; +}; + +Game_Character.prototype.isMoveRouteForcing = function() { + return this._moveRouteForcing; +}; + +Game_Character.prototype.setMoveRoute = function(moveRoute) { + if (this._moveRouteForcing) { + this._originalMoveRoute = moveRoute; + this._originalMoveRouteIndex = 0; + } else { + this._moveRoute = moveRoute; + this._moveRouteIndex = 0; + } +}; + +Game_Character.prototype.forceMoveRoute = function(moveRoute) { + if (!this._originalMoveRoute) { + this.memorizeMoveRoute(); + } + this._moveRoute = moveRoute; + this._moveRouteIndex = 0; + this._moveRouteForcing = true; + this._waitCount = 0; +}; + +Game_Character.prototype.updateStop = function() { + Game_CharacterBase.prototype.updateStop.call(this); + if (this._moveRouteForcing) { + this.updateRoutineMove(); + } +}; + +Game_Character.prototype.updateRoutineMove = function() { + if (this._waitCount > 0) { + this._waitCount--; + } else { + this.setMovementSuccess(true); + const command = this._moveRoute.list[this._moveRouteIndex]; + if (command) { + this.processMoveCommand(command); + this.advanceMoveRouteIndex(); + } + } +}; + +Game_Character.prototype.processMoveCommand = function(command) { + const gc = Game_Character; + const params = command.parameters; + switch (command.code) { + case gc.ROUTE_END: + this.processRouteEnd(); + break; + case gc.ROUTE_MOVE_DOWN: + this.moveStraight(2); + break; + case gc.ROUTE_MOVE_LEFT: + this.moveStraight(4); + break; + case gc.ROUTE_MOVE_RIGHT: + this.moveStraight(6); + break; + case gc.ROUTE_MOVE_UP: + this.moveStraight(8); + break; + case gc.ROUTE_MOVE_LOWER_L: + this.moveDiagonally(4, 2); + break; + case gc.ROUTE_MOVE_LOWER_R: + this.moveDiagonally(6, 2); + break; + case gc.ROUTE_MOVE_UPPER_L: + this.moveDiagonally(4, 8); + break; + case gc.ROUTE_MOVE_UPPER_R: + this.moveDiagonally(6, 8); + break; + case gc.ROUTE_MOVE_RANDOM: + this.moveRandom(); + break; + case gc.ROUTE_MOVE_TOWARD: + this.moveTowardPlayer(); + break; + case gc.ROUTE_MOVE_AWAY: + this.moveAwayFromPlayer(); + break; + case gc.ROUTE_MOVE_FORWARD: + this.moveForward(); + break; + case gc.ROUTE_MOVE_BACKWARD: + this.moveBackward(); + break; + case gc.ROUTE_JUMP: + this.jump(params[0], params[1]); + break; + case gc.ROUTE_WAIT: + this._waitCount = params[0] - 1; + break; + case gc.ROUTE_TURN_DOWN: + this.setDirection(2); + break; + case gc.ROUTE_TURN_LEFT: + this.setDirection(4); + break; + case gc.ROUTE_TURN_RIGHT: + this.setDirection(6); + break; + case gc.ROUTE_TURN_UP: + this.setDirection(8); + break; + case gc.ROUTE_TURN_90D_R: + this.turnRight90(); + break; + case gc.ROUTE_TURN_90D_L: + this.turnLeft90(); + break; + case gc.ROUTE_TURN_180D: + this.turn180(); + break; + case gc.ROUTE_TURN_90D_R_L: + this.turnRightOrLeft90(); + break; + case gc.ROUTE_TURN_RANDOM: + this.turnRandom(); + break; + case gc.ROUTE_TURN_TOWARD: + this.turnTowardPlayer(); + break; + case gc.ROUTE_TURN_AWAY: + this.turnAwayFromPlayer(); + break; + case gc.ROUTE_SWITCH_ON: + $gameSwitches.setValue(params[0], true); + break; + case gc.ROUTE_SWITCH_OFF: + $gameSwitches.setValue(params[0], false); + break; + case gc.ROUTE_CHANGE_SPEED: + this.setMoveSpeed(params[0]); + break; + case gc.ROUTE_CHANGE_FREQ: + this.setMoveFrequency(params[0]); + break; + case gc.ROUTE_WALK_ANIME_ON: + this.setWalkAnime(true); + break; + case gc.ROUTE_WALK_ANIME_OFF: + this.setWalkAnime(false); + break; + case gc.ROUTE_STEP_ANIME_ON: + this.setStepAnime(true); + break; + case gc.ROUTE_STEP_ANIME_OFF: + this.setStepAnime(false); + break; + case gc.ROUTE_DIR_FIX_ON: + this.setDirectionFix(true); + break; + case gc.ROUTE_DIR_FIX_OFF: + this.setDirectionFix(false); + break; + case gc.ROUTE_THROUGH_ON: + this.setThrough(true); + break; + case gc.ROUTE_THROUGH_OFF: + this.setThrough(false); + break; + case gc.ROUTE_TRANSPARENT_ON: + this.setTransparent(true); + break; + case gc.ROUTE_TRANSPARENT_OFF: + this.setTransparent(false); + break; + case gc.ROUTE_CHANGE_IMAGE: + this.setImage(params[0], params[1]); + break; + case gc.ROUTE_CHANGE_OPACITY: + this.setOpacity(params[0]); + break; + case gc.ROUTE_CHANGE_BLEND_MODE: + this.setBlendMode(params[0]); + break; + case gc.ROUTE_PLAY_SE: + AudioManager.playSe(params[0]); + break; + case gc.ROUTE_SCRIPT: + eval(params[0]); + break; + } +}; + +Game_Character.prototype.deltaXFrom = function(x) { + return $gameMap.deltaX(this.x, x); +}; + +Game_Character.prototype.deltaYFrom = function(y) { + return $gameMap.deltaY(this.y, y); +}; + +Game_Character.prototype.moveRandom = function() { + const d = 2 + Math.randomInt(4) * 2; + if (this.canPass(this.x, this.y, d)) { + this.moveStraight(d); + } +}; + +Game_Character.prototype.moveTowardCharacter = function(character) { + const sx = this.deltaXFrom(character.x); + const sy = this.deltaYFrom(character.y); + if (Math.abs(sx) > Math.abs(sy)) { + this.moveStraight(sx > 0 ? 4 : 6); + if (!this.isMovementSucceeded() && sy !== 0) { + this.moveStraight(sy > 0 ? 8 : 2); + } + } else if (sy !== 0) { + this.moveStraight(sy > 0 ? 8 : 2); + if (!this.isMovementSucceeded() && sx !== 0) { + this.moveStraight(sx > 0 ? 4 : 6); + } + } +}; + +Game_Character.prototype.moveAwayFromCharacter = function(character) { + const sx = this.deltaXFrom(character.x); + const sy = this.deltaYFrom(character.y); + if (Math.abs(sx) > Math.abs(sy)) { + this.moveStraight(sx > 0 ? 6 : 4); + if (!this.isMovementSucceeded() && sy !== 0) { + this.moveStraight(sy > 0 ? 2 : 8); + } + } else if (sy !== 0) { + this.moveStraight(sy > 0 ? 2 : 8); + if (!this.isMovementSucceeded() && sx !== 0) { + this.moveStraight(sx > 0 ? 6 : 4); + } + } +}; + +Game_Character.prototype.turnTowardCharacter = function(character) { + const sx = this.deltaXFrom(character.x); + const sy = this.deltaYFrom(character.y); + if (Math.abs(sx) > Math.abs(sy)) { + this.setDirection(sx > 0 ? 4 : 6); + } else if (sy !== 0) { + this.setDirection(sy > 0 ? 8 : 2); + } +}; + +Game_Character.prototype.turnAwayFromCharacter = function(character) { + const sx = this.deltaXFrom(character.x); + const sy = this.deltaYFrom(character.y); + if (Math.abs(sx) > Math.abs(sy)) { + this.setDirection(sx > 0 ? 6 : 4); + } else if (sy !== 0) { + this.setDirection(sy > 0 ? 2 : 8); + } +}; + +Game_Character.prototype.turnTowardPlayer = function() { + this.turnTowardCharacter($gamePlayer); +}; + +Game_Character.prototype.turnAwayFromPlayer = function() { + this.turnAwayFromCharacter($gamePlayer); +}; + +Game_Character.prototype.moveTowardPlayer = function() { + this.moveTowardCharacter($gamePlayer); +}; + +Game_Character.prototype.moveAwayFromPlayer = function() { + this.moveAwayFromCharacter($gamePlayer); +}; + +Game_Character.prototype.moveForward = function() { + this.moveStraight(this.direction()); +}; + +Game_Character.prototype.moveBackward = function() { + const lastDirectionFix = this.isDirectionFixed(); + this.setDirectionFix(true); + this.moveStraight(this.reverseDir(this.direction())); + this.setDirectionFix(lastDirectionFix); +}; + +Game_Character.prototype.processRouteEnd = function() { + if (this._moveRoute.repeat) { + this._moveRouteIndex = -1; + } else if (this._moveRouteForcing) { + this._moveRouteForcing = false; + this.restoreMoveRoute(); + this.setMovementSuccess(false); + } +}; + +Game_Character.prototype.advanceMoveRouteIndex = function() { + const moveRoute = this._moveRoute; + if (moveRoute && (this.isMovementSucceeded() || moveRoute.skippable)) { + let numCommands = moveRoute.list.length - 1; + this._moveRouteIndex++; + if (moveRoute.repeat && this._moveRouteIndex >= numCommands) { + this._moveRouteIndex = 0; + } + } +}; + +Game_Character.prototype.turnRight90 = function() { + switch (this.direction()) { + case 2: + this.setDirection(4); + break; + case 4: + this.setDirection(8); + break; + case 6: + this.setDirection(2); + break; + case 8: + this.setDirection(6); + break; + } +}; + +Game_Character.prototype.turnLeft90 = function() { + switch (this.direction()) { + case 2: + this.setDirection(6); + break; + case 4: + this.setDirection(2); + break; + case 6: + this.setDirection(8); + break; + case 8: + this.setDirection(4); + break; + } +}; + +Game_Character.prototype.turn180 = function() { + this.setDirection(this.reverseDir(this.direction())); +}; + +Game_Character.prototype.turnRightOrLeft90 = function() { + switch (Math.randomInt(2)) { + case 0: + this.turnRight90(); + break; + case 1: + this.turnLeft90(); + break; + } +}; + +Game_Character.prototype.turnRandom = function() { + this.setDirection(2 + Math.randomInt(4) * 2); +}; + +Game_Character.prototype.swap = function(character) { + const newX = character.x; + const newY = character.y; + character.locate(this.x, this.y); + this.locate(newX, newY); +}; + +Game_Character.prototype.findDirectionTo = function(goalX, goalY) { + const searchLimit = this.searchLimit(); + const mapWidth = $gameMap.width(); + const nodeList = []; + const openList = []; + const closedList = []; + const start = {}; + let best = start; + + if (this.x === goalX && this.y === goalY) { + return 0; + } + + start.parent = null; + start.x = this.x; + start.y = this.y; + start.g = 0; + start.f = $gameMap.distance(start.x, start.y, goalX, goalY); + nodeList.push(start); + openList.push(start.y * mapWidth + start.x); + + while (nodeList.length > 0) { + let bestIndex = 0; + for (let i = 0; i < nodeList.length; i++) { + if (nodeList[i].f < nodeList[bestIndex].f) { + bestIndex = i; + } + } + + const current = nodeList[bestIndex]; + const x1 = current.x; + const y1 = current.y; + const pos1 = y1 * mapWidth + x1; + const g1 = current.g; + + nodeList.splice(bestIndex, 1); + openList.splice(openList.indexOf(pos1), 1); + closedList.push(pos1); + + if (current.x === goalX && current.y === goalY) { + best = current; + break; + } + + if (g1 >= searchLimit) { + continue; + } + + for (let j = 0; j < 4; j++) { + const direction = 2 + j * 2; + const x2 = $gameMap.roundXWithDirection(x1, direction); + const y2 = $gameMap.roundYWithDirection(y1, direction); + const pos2 = y2 * mapWidth + x2; + + if (closedList.includes(pos2)) { + continue; + } + if (!this.canPass(x1, y1, direction)) { + continue; + } + + const g2 = g1 + 1; + const index2 = openList.indexOf(pos2); + + if (index2 < 0 || g2 < nodeList[index2].g) { + let neighbor = {}; + if (index2 >= 0) { + neighbor = nodeList[index2]; + } else { + nodeList.push(neighbor); + openList.push(pos2); + } + neighbor.parent = current; + neighbor.x = x2; + neighbor.y = y2; + neighbor.g = g2; + neighbor.f = g2 + $gameMap.distance(x2, y2, goalX, goalY); + if (!best || neighbor.f - neighbor.g < best.f - best.g) { + best = neighbor; + } + } + } + } + + let node = best; + while (node.parent && node.parent !== start) { + node = node.parent; + } + + const deltaX1 = $gameMap.deltaX(node.x, start.x); + const deltaY1 = $gameMap.deltaY(node.y, start.y); + if (deltaY1 > 0) { + return 2; + } else if (deltaX1 < 0) { + return 4; + } else if (deltaX1 > 0) { + return 6; + } else if (deltaY1 < 0) { + return 8; + } + + const deltaX2 = this.deltaXFrom(goalX); + const deltaY2 = this.deltaYFrom(goalY); + if (Math.abs(deltaX2) > Math.abs(deltaY2)) { + return deltaX2 > 0 ? 4 : 6; + } else if (deltaY2 !== 0) { + return deltaY2 > 0 ? 8 : 2; + } + + return 0; +}; + +Game_Character.prototype.searchLimit = function() { + return 12; +}; + +//----------------------------------------------------------------------------- +// Game_Player +// +// The game object class for the player. It contains event starting +// determinants and map scrolling functions. + +function Game_Player() { + this.initialize(...arguments); +} + +Game_Player.prototype = Object.create(Game_Character.prototype); +Game_Player.prototype.constructor = Game_Player; + +Game_Player.prototype.initialize = function() { + Game_Character.prototype.initialize.call(this); + this.setTransparent($dataSystem.optTransparent); +}; + +Game_Player.prototype.initMembers = function() { + Game_Character.prototype.initMembers.call(this); + this._vehicleType = "walk"; + this._vehicleGettingOn = false; + this._vehicleGettingOff = false; + this._dashing = false; + this._needsMapReload = false; + this._transferring = false; + this._newMapId = 0; + this._newX = 0; + this._newY = 0; + this._newDirection = 0; + this._fadeType = 0; + this._followers = new Game_Followers(); + this._encounterCount = 0; +}; + +Game_Player.prototype.clearTransferInfo = function() { + this._transferring = false; + this._newMapId = 0; + this._newX = 0; + this._newY = 0; + this._newDirection = 0; +}; + +Game_Player.prototype.followers = function() { + return this._followers; +}; + +Game_Player.prototype.refresh = function() { + const actor = $gameParty.leader(); + const characterName = actor ? actor.characterName() : ""; + const characterIndex = actor ? actor.characterIndex() : 0; + this.setImage(characterName, characterIndex); + this._followers.refresh(); +}; + +Game_Player.prototype.isStopping = function() { + if (this._vehicleGettingOn || this._vehicleGettingOff) { + return false; + } + return Game_Character.prototype.isStopping.call(this); +}; + +Game_Player.prototype.reserveTransfer = function(mapId, x, y, d, fadeType) { + this._transferring = true; + this._newMapId = mapId; + this._newX = x; + this._newY = y; + this._newDirection = d; + this._fadeType = fadeType; +}; + +Game_Player.prototype.setupForNewGame = function() { + const mapId = $dataSystem.startMapId; + const x = $dataSystem.startX; + const y = $dataSystem.startY; + this.reserveTransfer(mapId, x, y, 2, 0); +}; + +Game_Player.prototype.requestMapReload = function() { + this._needsMapReload = true; +}; + +Game_Player.prototype.isTransferring = function() { + return this._transferring; +}; + +Game_Player.prototype.newMapId = function() { + return this._newMapId; +}; + +Game_Player.prototype.fadeType = function() { + return this._fadeType; +}; + +Game_Player.prototype.performTransfer = function() { + if (this.isTransferring()) { + this.setDirection(this._newDirection); + if (this._newMapId !== $gameMap.mapId() || this._needsMapReload) { + $gameMap.setup(this._newMapId); + this._needsMapReload = false; + } + this.locate(this._newX, this._newY); + this.refresh(); + this.clearTransferInfo(); + } +}; + +Game_Player.prototype.isMapPassable = function(x, y, d) { + const vehicle = this.vehicle(); + if (vehicle) { + return vehicle.isMapPassable(x, y, d); + } else { + return Game_Character.prototype.isMapPassable.call(this, x, y, d); + } +}; + +Game_Player.prototype.vehicle = function() { + return $gameMap.vehicle(this._vehicleType); +}; + +Game_Player.prototype.isInBoat = function() { + return this._vehicleType === "boat"; +}; + +Game_Player.prototype.isInShip = function() { + return this._vehicleType === "ship"; +}; + +Game_Player.prototype.isInAirship = function() { + return this._vehicleType === "airship"; +}; + +Game_Player.prototype.isInVehicle = function() { + return this.isInBoat() || this.isInShip() || this.isInAirship(); +}; + +Game_Player.prototype.isNormal = function() { + return this._vehicleType === "walk" && !this.isMoveRouteForcing(); +}; + +Game_Player.prototype.isDashing = function() { + return this._dashing; +}; + +Game_Player.prototype.isDebugThrough = function() { + return Input.isPressed("control") && $gameTemp.isPlaytest(); +}; + +Game_Player.prototype.isCollided = function(x, y) { + if (this.isThrough()) { + return false; + } else { + return this.pos(x, y) || this._followers.isSomeoneCollided(x, y); + } +}; + +Game_Player.prototype.centerX = function() { + return ($gameMap.screenTileX() - 1) / 2; +}; + +Game_Player.prototype.centerY = function() { + return ($gameMap.screenTileY() - 1) / 2; +}; + +Game_Player.prototype.center = function(x, y) { + return $gameMap.setDisplayPos(x - this.centerX(), y - this.centerY()); +}; + +Game_Player.prototype.locate = function(x, y) { + Game_Character.prototype.locate.call(this, x, y); + this.center(x, y); + this.makeEncounterCount(); + if (this.isInVehicle()) { + this.vehicle().refresh(); + } + this._followers.synchronize(x, y, this.direction()); +}; + +Game_Player.prototype.increaseSteps = function() { + Game_Character.prototype.increaseSteps.call(this); + if (this.isNormal()) { + $gameParty.increaseSteps(); + } +}; + +Game_Player.prototype.makeEncounterCount = function() { + const n = $gameMap.encounterStep(); + this._encounterCount = Math.randomInt(n) + Math.randomInt(n) + 1; +}; + +Game_Player.prototype.makeEncounterTroopId = function() { + const encounterList = []; + let weightSum = 0; + for (const encounter of $gameMap.encounterList()) { + if (this.meetsEncounterConditions(encounter)) { + encounterList.push(encounter); + weightSum += encounter.weight; + } + } + if (weightSum > 0) { + let value = Math.randomInt(weightSum); + for (const encounter of encounterList) { + value -= encounter.weight; + if (value < 0) { + return encounter.troopId; + } + } + } + return 0; +}; + +Game_Player.prototype.meetsEncounterConditions = function(encounter) { + return ( + encounter.regionSet.length === 0 || + encounter.regionSet.includes(this.regionId()) + ); +}; + +Game_Player.prototype.executeEncounter = function() { + if (!$gameMap.isEventRunning() && this._encounterCount <= 0) { + this.makeEncounterCount(); + const troopId = this.makeEncounterTroopId(); + if ($dataTroops[troopId]) { + BattleManager.setup(troopId, true, false); + BattleManager.onEncounter(); + return true; + } else { + return false; + } + } else { + return false; + } +}; + +Game_Player.prototype.startMapEvent = function(x, y, triggers, normal) { + if (!$gameMap.isEventRunning()) { + for (const event of $gameMap.eventsXy(x, y)) { + if ( + event.isTriggerIn(triggers) && + event.isNormalPriority() === normal + ) { + event.start(); + } + } + } +}; + +Game_Player.prototype.moveByInput = function() { + if (!this.isMoving() && this.canMove()) { + let direction = this.getInputDirection(); + if (direction > 0) { + $gameTemp.clearDestination(); + } else if ($gameTemp.isDestinationValid()) { + const x = $gameTemp.destinationX(); + const y = $gameTemp.destinationY(); + direction = this.findDirectionTo(x, y); + } + if (direction > 0) { + this.executeMove(direction); + } + } +}; + +Game_Player.prototype.canMove = function() { + if ($gameMap.isEventRunning() || $gameMessage.isBusy()) { + return false; + } + if (this.isMoveRouteForcing() || this.areFollowersGathering()) { + return false; + } + if (this._vehicleGettingOn || this._vehicleGettingOff) { + return false; + } + if (this.isInVehicle() && !this.vehicle().canMove()) { + return false; + } + return true; +}; + +Game_Player.prototype.getInputDirection = function() { + return Input.dir4; +}; + +Game_Player.prototype.executeMove = function(direction) { + this.moveStraight(direction); +}; + +Game_Player.prototype.update = function(sceneActive) { + const lastScrolledX = this.scrolledX(); + const lastScrolledY = this.scrolledY(); + const wasMoving = this.isMoving(); + this.updateDashing(); + if (sceneActive) { + this.moveByInput(); + } + Game_Character.prototype.update.call(this); + this.updateScroll(lastScrolledX, lastScrolledY); + this.updateVehicle(); + if (!this.isMoving()) { + this.updateNonmoving(wasMoving, sceneActive); + } + this._followers.update(); +}; + +Game_Player.prototype.updateDashing = function() { + if (this.isMoving()) { + return; + } + if (this.canMove() && !this.isInVehicle() && !$gameMap.isDashDisabled()) { + this._dashing = + this.isDashButtonPressed() || $gameTemp.isDestinationValid(); + } else { + this._dashing = false; + } +}; + +Game_Player.prototype.isDashButtonPressed = function() { + const shift = Input.isPressed("shift"); + if (ConfigManager.alwaysDash) { + return !shift; + } else { + return shift; + } +}; + +Game_Player.prototype.updateScroll = function(lastScrolledX, lastScrolledY) { + const x1 = lastScrolledX; + const y1 = lastScrolledY; + const x2 = this.scrolledX(); + const y2 = this.scrolledY(); + if (y2 > y1 && y2 > this.centerY()) { + $gameMap.scrollDown(y2 - y1); + } + if (x2 < x1 && x2 < this.centerX()) { + $gameMap.scrollLeft(x1 - x2); + } + if (x2 > x1 && x2 > this.centerX()) { + $gameMap.scrollRight(x2 - x1); + } + if (y2 < y1 && y2 < this.centerY()) { + $gameMap.scrollUp(y1 - y2); + } +}; + +Game_Player.prototype.updateVehicle = function() { + if (this.isInVehicle() && !this.areFollowersGathering()) { + if (this._vehicleGettingOn) { + this.updateVehicleGetOn(); + } else if (this._vehicleGettingOff) { + this.updateVehicleGetOff(); + } else { + this.vehicle().syncWithPlayer(); + } + } +}; + +Game_Player.prototype.updateVehicleGetOn = function() { + if (!this.areFollowersGathering() && !this.isMoving()) { + this.setDirection(this.vehicle().direction()); + this.setMoveSpeed(this.vehicle().moveSpeed()); + this._vehicleGettingOn = false; + this.setTransparent(true); + if (this.isInAirship()) { + this.setThrough(true); + } + this.vehicle().getOn(); + } +}; + +Game_Player.prototype.updateVehicleGetOff = function() { + if (!this.areFollowersGathering() && this.vehicle().isLowest()) { + this._vehicleGettingOff = false; + this._vehicleType = "walk"; + this.setTransparent(false); + } +}; + +Game_Player.prototype.updateNonmoving = function(wasMoving, sceneActive) { + if (!$gameMap.isEventRunning()) { + if (wasMoving) { + $gameParty.onPlayerWalk(); + this.checkEventTriggerHere([1, 2]); + if ($gameMap.setupStartingEvent()) { + return; + } + } + if (sceneActive && this.triggerAction()) { + return; + } + if (wasMoving) { + this.updateEncounterCount(); + } else { + $gameTemp.clearDestination(); + } + } +}; + +Game_Player.prototype.triggerAction = function() { + if (this.canMove()) { + if (this.triggerButtonAction()) { + return true; + } + if (this.triggerTouchAction()) { + return true; + } + } + return false; +}; + +Game_Player.prototype.triggerButtonAction = function() { + if (Input.isTriggered("ok")) { + if (this.getOnOffVehicle()) { + return true; + } + this.checkEventTriggerHere([0]); + if ($gameMap.setupStartingEvent()) { + return true; + } + this.checkEventTriggerThere([0, 1, 2]); + if ($gameMap.setupStartingEvent()) { + return true; + } + } + return false; +}; + +Game_Player.prototype.triggerTouchAction = function() { + if ($gameTemp.isDestinationValid()) { + const direction = this.direction(); + const x1 = this.x; + const y1 = this.y; + const x2 = $gameMap.roundXWithDirection(x1, direction); + const y2 = $gameMap.roundYWithDirection(y1, direction); + const x3 = $gameMap.roundXWithDirection(x2, direction); + const y3 = $gameMap.roundYWithDirection(y2, direction); + const destX = $gameTemp.destinationX(); + const destY = $gameTemp.destinationY(); + if (destX === x1 && destY === y1) { + return this.triggerTouchActionD1(x1, y1); + } else if (destX === x2 && destY === y2) { + return this.triggerTouchActionD2(x2, y2); + } else if (destX === x3 && destY === y3) { + return this.triggerTouchActionD3(x2, y2); + } + } + return false; +}; + +Game_Player.prototype.triggerTouchActionD1 = function(x1, y1) { + if ($gameMap.airship().pos(x1, y1)) { + if (TouchInput.isTriggered() && this.getOnOffVehicle()) { + return true; + } + } + this.checkEventTriggerHere([0]); + return $gameMap.setupStartingEvent(); +}; + +Game_Player.prototype.triggerTouchActionD2 = function(x2, y2) { + if ($gameMap.boat().pos(x2, y2) || $gameMap.ship().pos(x2, y2)) { + if (TouchInput.isTriggered() && this.getOnVehicle()) { + return true; + } + } + if (this.isInBoat() || this.isInShip()) { + if (TouchInput.isTriggered() && this.getOffVehicle()) { + return true; + } + } + this.checkEventTriggerThere([0, 1, 2]); + return $gameMap.setupStartingEvent(); +}; + +Game_Player.prototype.triggerTouchActionD3 = function(x2, y2) { + if ($gameMap.isCounter(x2, y2)) { + this.checkEventTriggerThere([0, 1, 2]); + } + return $gameMap.setupStartingEvent(); +}; + +Game_Player.prototype.updateEncounterCount = function() { + if (this.canEncounter()) { + this._encounterCount -= this.encounterProgressValue(); + } +}; + +Game_Player.prototype.canEncounter = function() { + return ( + !$gameParty.hasEncounterNone() && + $gameSystem.isEncounterEnabled() && + !this.isInAirship() && + !this.isMoveRouteForcing() && + !this.isDebugThrough() + ); +}; + +Game_Player.prototype.encounterProgressValue = function() { + let value = $gameMap.isBush(this.x, this.y) ? 2 : 1; + if ($gameParty.hasEncounterHalf()) { + value *= 0.5; + } + if (this.isInShip()) { + value *= 0.5; + } + return value; +}; + +Game_Player.prototype.checkEventTriggerHere = function(triggers) { + if (this.canStartLocalEvents()) { + this.startMapEvent(this.x, this.y, triggers, false); + } +}; + +Game_Player.prototype.checkEventTriggerThere = function(triggers) { + if (this.canStartLocalEvents()) { + const direction = this.direction(); + const x1 = this.x; + const y1 = this.y; + const x2 = $gameMap.roundXWithDirection(x1, direction); + const y2 = $gameMap.roundYWithDirection(y1, direction); + this.startMapEvent(x2, y2, triggers, true); + if (!$gameMap.isAnyEventStarting() && $gameMap.isCounter(x2, y2)) { + const x3 = $gameMap.roundXWithDirection(x2, direction); + const y3 = $gameMap.roundYWithDirection(y2, direction); + this.startMapEvent(x3, y3, triggers, true); + } + } +}; + +Game_Player.prototype.checkEventTriggerTouch = function(x, y) { + if (this.canStartLocalEvents()) { + this.startMapEvent(x, y, [1, 2], true); + } +}; + +Game_Player.prototype.canStartLocalEvents = function() { + return !this.isInAirship(); +}; + +Game_Player.prototype.getOnOffVehicle = function() { + if (this.isInVehicle()) { + return this.getOffVehicle(); + } else { + return this.getOnVehicle(); + } +}; + +Game_Player.prototype.getOnVehicle = function() { + const direction = this.direction(); + const x1 = this.x; + const y1 = this.y; + const x2 = $gameMap.roundXWithDirection(x1, direction); + const y2 = $gameMap.roundYWithDirection(y1, direction); + if ($gameMap.airship().pos(x1, y1)) { + this._vehicleType = "airship"; + } else if ($gameMap.ship().pos(x2, y2)) { + this._vehicleType = "ship"; + } else if ($gameMap.boat().pos(x2, y2)) { + this._vehicleType = "boat"; + } + if (this.isInVehicle()) { + this._vehicleGettingOn = true; + if (!this.isInAirship()) { + this.forceMoveForward(); + } + this.gatherFollowers(); + } + return this._vehicleGettingOn; +}; + +Game_Player.prototype.getOffVehicle = function() { + if (this.vehicle().isLandOk(this.x, this.y, this.direction())) { + if (this.isInAirship()) { + this.setDirection(2); + } + this._followers.synchronize(this.x, this.y, this.direction()); + this.vehicle().getOff(); + if (!this.isInAirship()) { + this.forceMoveForward(); + this.setTransparent(false); + } + this._vehicleGettingOff = true; + this.setMoveSpeed(4); + this.setThrough(false); + this.makeEncounterCount(); + this.gatherFollowers(); + } + return this._vehicleGettingOff; +}; + +Game_Player.prototype.forceMoveForward = function() { + this.setThrough(true); + this.moveForward(); + this.setThrough(false); +}; + +Game_Player.prototype.isOnDamageFloor = function() { + return $gameMap.isDamageFloor(this.x, this.y) && !this.isInAirship(); +}; + +Game_Player.prototype.moveStraight = function(d) { + if (this.canPass(this.x, this.y, d)) { + this._followers.updateMove(); + } + Game_Character.prototype.moveStraight.call(this, d); +}; + +Game_Player.prototype.moveDiagonally = function(horz, vert) { + if (this.canPassDiagonally(this.x, this.y, horz, vert)) { + this._followers.updateMove(); + } + Game_Character.prototype.moveDiagonally.call(this, horz, vert); +}; + +Game_Player.prototype.jump = function(xPlus, yPlus) { + Game_Character.prototype.jump.call(this, xPlus, yPlus); + this._followers.jumpAll(); +}; + +Game_Player.prototype.showFollowers = function() { + this._followers.show(); +}; + +Game_Player.prototype.hideFollowers = function() { + this._followers.hide(); +}; + +Game_Player.prototype.gatherFollowers = function() { + this._followers.gather(); +}; + +Game_Player.prototype.areFollowersGathering = function() { + return this._followers.areGathering(); +}; + +Game_Player.prototype.areFollowersGathered = function() { + return this._followers.areGathered(); +}; + +//----------------------------------------------------------------------------- +// Game_Follower +// +// The game object class for a follower. A follower is an allied character, +// other than the front character, displayed in the party. + +function Game_Follower() { + this.initialize(...arguments); +} + +Game_Follower.prototype = Object.create(Game_Character.prototype); +Game_Follower.prototype.constructor = Game_Follower; + +Game_Follower.prototype.initialize = function(memberIndex) { + Game_Character.prototype.initialize.call(this); + this._memberIndex = memberIndex; + this.setTransparent($dataSystem.optTransparent); + this.setThrough(true); +}; + +Game_Follower.prototype.refresh = function() { + const characterName = this.isVisible() ? this.actor().characterName() : ""; + const characterIndex = this.isVisible() ? this.actor().characterIndex() : 0; + this.setImage(characterName, characterIndex); +}; + +Game_Follower.prototype.actor = function() { + return $gameParty.battleMembers()[this._memberIndex]; +}; + +Game_Follower.prototype.isVisible = function() { + return this.actor() && $gamePlayer.followers().isVisible(); +}; + +Game_Follower.prototype.isGathered = function() { + return !this.isMoving() && this.pos($gamePlayer.x, $gamePlayer.y); +}; + +Game_Follower.prototype.update = function() { + Game_Character.prototype.update.call(this); + this.setMoveSpeed($gamePlayer.realMoveSpeed()); + this.setOpacity($gamePlayer.opacity()); + this.setBlendMode($gamePlayer.blendMode()); + this.setWalkAnime($gamePlayer.hasWalkAnime()); + this.setStepAnime($gamePlayer.hasStepAnime()); + this.setDirectionFix($gamePlayer.isDirectionFixed()); + this.setTransparent($gamePlayer.isTransparent()); +}; + +Game_Follower.prototype.chaseCharacter = function(character) { + const sx = this.deltaXFrom(character.x); + const sy = this.deltaYFrom(character.y); + if (sx !== 0 && sy !== 0) { + this.moveDiagonally(sx > 0 ? 4 : 6, sy > 0 ? 8 : 2); + } else if (sx !== 0) { + this.moveStraight(sx > 0 ? 4 : 6); + } else if (sy !== 0) { + this.moveStraight(sy > 0 ? 8 : 2); + } + this.setMoveSpeed($gamePlayer.realMoveSpeed()); +}; + +//----------------------------------------------------------------------------- +// Game_Followers +// +// The wrapper class for a follower array. + +function Game_Followers() { + this.initialize(...arguments); +} + +Game_Followers.prototype.initialize = function() { + this._visible = $dataSystem.optFollowers; + this._gathering = false; + this._data = []; + this.setup(); +}; + +Game_Followers.prototype.setup = function() { + this._data = []; + for (let i = 1; i < $gameParty.maxBattleMembers(); i++) { + this._data.push(new Game_Follower(i)); + } +}; + +Game_Followers.prototype.isVisible = function() { + return this._visible; +}; + +Game_Followers.prototype.show = function() { + this._visible = true; +}; + +Game_Followers.prototype.hide = function() { + this._visible = false; +}; + +Game_Followers.prototype.data = function() { + return this._data.clone(); +}; + +Game_Followers.prototype.reverseData = function() { + return this._data.clone().reverse(); +}; + +Game_Followers.prototype.follower = function(index) { + return this._data[index]; +}; + +Game_Followers.prototype.refresh = function() { + for (const follower of this._data) { + follower.refresh(); + } +}; + +Game_Followers.prototype.update = function() { + if (this.areGathering()) { + if (!this.areMoving()) { + this.updateMove(); + } + if (this.areGathered()) { + this._gathering = false; + } + } + for (const follower of this._data) { + follower.update(); + } +}; + +Game_Followers.prototype.updateMove = function() { + for (let i = this._data.length - 1; i >= 0; i--) { + const precedingCharacter = i > 0 ? this._data[i - 1] : $gamePlayer; + this._data[i].chaseCharacter(precedingCharacter); + } +}; + +Game_Followers.prototype.jumpAll = function() { + if ($gamePlayer.isJumping()) { + for (const follower of this._data) { + const sx = $gamePlayer.deltaXFrom(follower.x); + const sy = $gamePlayer.deltaYFrom(follower.y); + follower.jump(sx, sy); + } + } +}; + +Game_Followers.prototype.synchronize = function(x, y, d) { + for (const follower of this._data) { + follower.locate(x, y); + follower.setDirection(d); + } +}; + +Game_Followers.prototype.gather = function() { + this._gathering = true; +}; + +Game_Followers.prototype.areGathering = function() { + return this._gathering; +}; + +Game_Followers.prototype.visibleFollowers = function() { + return this._data.filter(follower => follower.isVisible()); +}; + +Game_Followers.prototype.areMoving = function() { + return this.visibleFollowers().some(follower => follower.isMoving()); +}; + +Game_Followers.prototype.areGathered = function() { + return this.visibleFollowers().every(follower => follower.isGathered()); +}; + +Game_Followers.prototype.isSomeoneCollided = function(x, y) { + return this.visibleFollowers().some(follower => follower.pos(x, y)); +}; + +//----------------------------------------------------------------------------- +// Game_Vehicle +// +// The game object class for a vehicle. + +function Game_Vehicle() { + this.initialize(...arguments); +} + +Game_Vehicle.prototype = Object.create(Game_Character.prototype); +Game_Vehicle.prototype.constructor = Game_Vehicle; + +Game_Vehicle.prototype.initialize = function(type) { + Game_Character.prototype.initialize.call(this); + this._type = type; + this.resetDirection(); + this.initMoveSpeed(); + this.loadSystemSettings(); +}; + +Game_Vehicle.prototype.initMembers = function() { + Game_Character.prototype.initMembers.call(this); + this._type = ""; + this._mapId = 0; + this._altitude = 0; + this._driving = false; + this._bgm = null; +}; + +Game_Vehicle.prototype.isBoat = function() { + return this._type === "boat"; +}; + +Game_Vehicle.prototype.isShip = function() { + return this._type === "ship"; +}; + +Game_Vehicle.prototype.isAirship = function() { + return this._type === "airship"; +}; + +Game_Vehicle.prototype.resetDirection = function() { + this.setDirection(4); +}; + +Game_Vehicle.prototype.initMoveSpeed = function() { + if (this.isBoat()) { + this.setMoveSpeed(4); + } else if (this.isShip()) { + this.setMoveSpeed(5); + } else if (this.isAirship()) { + this.setMoveSpeed(6); + } +}; + +Game_Vehicle.prototype.vehicle = function() { + if (this.isBoat()) { + return $dataSystem.boat; + } else if (this.isShip()) { + return $dataSystem.ship; + } else if (this.isAirship()) { + return $dataSystem.airship; + } else { + return null; + } +}; + +Game_Vehicle.prototype.loadSystemSettings = function() { + const vehicle = this.vehicle(); + this._mapId = vehicle.startMapId; + this.setPosition(vehicle.startX, vehicle.startY); + this.setImage(vehicle.characterName, vehicle.characterIndex); +}; + +Game_Vehicle.prototype.refresh = function() { + if (this._driving) { + this._mapId = $gameMap.mapId(); + this.syncWithPlayer(); + } else if (this._mapId === $gameMap.mapId()) { + this.locate(this.x, this.y); + } + if (this.isAirship()) { + this.setPriorityType(this._driving ? 2 : 0); + } else { + this.setPriorityType(1); + } + this.setWalkAnime(this._driving); + this.setStepAnime(this._driving); + this.setTransparent(this._mapId !== $gameMap.mapId()); +}; + +Game_Vehicle.prototype.setLocation = function(mapId, x, y) { + this._mapId = mapId; + this.setPosition(x, y); + this.refresh(); +}; + +Game_Vehicle.prototype.pos = function(x, y) { + if (this._mapId === $gameMap.mapId()) { + return Game_Character.prototype.pos.call(this, x, y); + } else { + return false; + } +}; + +Game_Vehicle.prototype.isMapPassable = function(x, y, d) { + const x2 = $gameMap.roundXWithDirection(x, d); + const y2 = $gameMap.roundYWithDirection(y, d); + if (this.isBoat()) { + return $gameMap.isBoatPassable(x2, y2); + } else if (this.isShip()) { + return $gameMap.isShipPassable(x2, y2); + } else if (this.isAirship()) { + return true; + } else { + return false; + } +}; + +Game_Vehicle.prototype.getOn = function() { + this._driving = true; + this.setWalkAnime(true); + this.setStepAnime(true); + $gameSystem.saveWalkingBgm(); + this.playBgm(); +}; + +Game_Vehicle.prototype.getOff = function() { + this._driving = false; + this.setWalkAnime(false); + this.setStepAnime(false); + this.resetDirection(); + $gameSystem.replayWalkingBgm(); +}; + +Game_Vehicle.prototype.setBgm = function(bgm) { + this._bgm = bgm; +}; + +Game_Vehicle.prototype.playBgm = function() { + AudioManager.playBgm(this._bgm || this.vehicle().bgm); +}; + +Game_Vehicle.prototype.syncWithPlayer = function() { + this.copyPosition($gamePlayer); + this.refreshBushDepth(); +}; + +Game_Vehicle.prototype.screenY = function() { + return Game_Character.prototype.screenY.call(this) - this._altitude; +}; + +Game_Vehicle.prototype.shadowX = function() { + return this.screenX(); +}; + +Game_Vehicle.prototype.shadowY = function() { + return this.screenY() + this._altitude; +}; + +Game_Vehicle.prototype.shadowOpacity = function() { + return (255 * this._altitude) / this.maxAltitude(); +}; + +Game_Vehicle.prototype.canMove = function() { + if (this.isAirship()) { + return this.isHighest(); + } else { + return true; + } +}; + +Game_Vehicle.prototype.update = function() { + Game_Character.prototype.update.call(this); + if (this.isAirship()) { + this.updateAirship(); + } +}; + +Game_Vehicle.prototype.updateAirship = function() { + this.updateAirshipAltitude(); + this.setStepAnime(this.isHighest()); + this.setPriorityType(this.isLowest() ? 0 : 2); +}; + +Game_Vehicle.prototype.updateAirshipAltitude = function() { + if (this._driving && !this.isHighest()) { + this._altitude++; + } + if (!this._driving && !this.isLowest()) { + this._altitude--; + } +}; + +Game_Vehicle.prototype.maxAltitude = function() { + return 48; +}; + +Game_Vehicle.prototype.isLowest = function() { + return this._altitude <= 0; +}; + +Game_Vehicle.prototype.isHighest = function() { + return this._altitude >= this.maxAltitude(); +}; + +Game_Vehicle.prototype.isTakeoffOk = function() { + return $gamePlayer.areFollowersGathered(); +}; + +Game_Vehicle.prototype.isLandOk = function(x, y, d) { + if (this.isAirship()) { + if (!$gameMap.isAirshipLandOk(x, y)) { + return false; + } + if ($gameMap.eventsXy(x, y).length > 0) { + return false; + } + } else { + const x2 = $gameMap.roundXWithDirection(x, d); + const y2 = $gameMap.roundYWithDirection(y, d); + if (!$gameMap.isValid(x2, y2)) { + return false; + } + if (!$gameMap.isPassable(x2, y2, this.reverseDir(d))) { + return false; + } + if (this.isCollidedWithCharacters(x2, y2)) { + return false; + } + } + return true; +}; + +//----------------------------------------------------------------------------- +// Game_Event +// +// The game object class for an event. It contains functionality for event page +// switching and running parallel process events. + +function Game_Event() { + this.initialize(...arguments); +} + +Game_Event.prototype = Object.create(Game_Character.prototype); +Game_Event.prototype.constructor = Game_Event; + +Game_Event.prototype.initialize = function(mapId, eventId) { + Game_Character.prototype.initialize.call(this); + this._mapId = mapId; + this._eventId = eventId; + this.locate(this.event().x, this.event().y); + this.refresh(); +}; + +Game_Event.prototype.initMembers = function() { + Game_Character.prototype.initMembers.call(this); + this._moveType = 0; + this._trigger = 0; + this._starting = false; + this._erased = false; + this._pageIndex = -2; + this._originalPattern = 1; + this._originalDirection = 2; + this._prelockDirection = 0; + this._locked = false; +}; + +Game_Event.prototype.eventId = function() { + return this._eventId; +}; + +Game_Event.prototype.event = function() { + return $dataMap.events[this._eventId]; +}; + +Game_Event.prototype.page = function() { + return this.event().pages[this._pageIndex]; +}; + +Game_Event.prototype.list = function() { + return this.page().list; +}; + +Game_Event.prototype.isCollidedWithCharacters = function(x, y) { + return ( + Game_Character.prototype.isCollidedWithCharacters.call(this, x, y) || + this.isCollidedWithPlayerCharacters(x, y) + ); +}; + +Game_Event.prototype.isCollidedWithEvents = function(x, y) { + const events = $gameMap.eventsXyNt(x, y); + return events.length > 0; +}; + +Game_Event.prototype.isCollidedWithPlayerCharacters = function(x, y) { + return this.isNormalPriority() && $gamePlayer.isCollided(x, y); +}; + +Game_Event.prototype.lock = function() { + if (!this._locked) { + this._prelockDirection = this.direction(); + this.turnTowardPlayer(); + this._locked = true; + } +}; + +Game_Event.prototype.unlock = function() { + if (this._locked) { + this._locked = false; + this.setDirection(this._prelockDirection); + } +}; + +Game_Event.prototype.updateStop = function() { + if (this._locked) { + this.resetStopCount(); + } + Game_Character.prototype.updateStop.call(this); + if (!this.isMoveRouteForcing()) { + this.updateSelfMovement(); + } +}; + +Game_Event.prototype.updateSelfMovement = function() { + if ( + !this._locked && + this.isNearTheScreen() && + this.checkStop(this.stopCountThreshold()) + ) { + switch (this._moveType) { + case 1: + this.moveTypeRandom(); + break; + case 2: + this.moveTypeTowardPlayer(); + break; + case 3: + this.moveTypeCustom(); + break; + } + } +}; + +Game_Event.prototype.stopCountThreshold = function() { + return 30 * (5 - this.moveFrequency()); +}; + +Game_Event.prototype.moveTypeRandom = function() { + switch (Math.randomInt(6)) { + case 0: + case 1: + this.moveRandom(); + break; + case 2: + case 3: + case 4: + this.moveForward(); + break; + case 5: + this.resetStopCount(); + break; + } +}; + +Game_Event.prototype.moveTypeTowardPlayer = function() { + if (this.isNearThePlayer()) { + switch (Math.randomInt(6)) { + case 0: + case 1: + case 2: + case 3: + this.moveTowardPlayer(); + break; + case 4: + this.moveRandom(); + break; + case 5: + this.moveForward(); + break; + } + } else { + this.moveRandom(); + } +}; + +Game_Event.prototype.isNearThePlayer = function() { + const sx = Math.abs(this.deltaXFrom($gamePlayer.x)); + const sy = Math.abs(this.deltaYFrom($gamePlayer.y)); + return sx + sy < 20; +}; + +Game_Event.prototype.moveTypeCustom = function() { + this.updateRoutineMove(); +}; + +Game_Event.prototype.isStarting = function() { + return this._starting; +}; + +Game_Event.prototype.clearStartingFlag = function() { + this._starting = false; +}; + +Game_Event.prototype.isTriggerIn = function(triggers) { + return triggers.includes(this._trigger); +}; + +Game_Event.prototype.start = function() { + const list = this.list(); + if (list && list.length > 1) { + this._starting = true; + if (this.isTriggerIn([0, 1, 2])) { + this.lock(); + } + } +}; + +Game_Event.prototype.erase = function() { + this._erased = true; + this.refresh(); +}; + +Game_Event.prototype.refresh = function() { + const newPageIndex = this._erased ? -1 : this.findProperPageIndex(); + if (this._pageIndex !== newPageIndex) { + this._pageIndex = newPageIndex; + this.setupPage(); + } +}; + +Game_Event.prototype.findProperPageIndex = function() { + const pages = this.event().pages; + for (let i = pages.length - 1; i >= 0; i--) { + const page = pages[i]; + if (this.meetsConditions(page)) { + return i; + } + } + return -1; +}; + +Game_Event.prototype.meetsConditions = function(page) { + const c = page.conditions; + if (c.switch1Valid) { + if (!$gameSwitches.value(c.switch1Id)) { + return false; + } + } + if (c.switch2Valid) { + if (!$gameSwitches.value(c.switch2Id)) { + return false; + } + } + if (c.variableValid) { + if ($gameVariables.value(c.variableId) < c.variableValue) { + return false; + } + } + if (c.selfSwitchValid) { + const key = [this._mapId, this._eventId, c.selfSwitchCh]; + if ($gameSelfSwitches.value(key) !== true) { + return false; + } + } + if (c.itemValid) { + const item = $dataItems[c.itemId]; + if (!$gameParty.hasItem(item)) { + return false; + } + } + if (c.actorValid) { + const actor = $gameActors.actor(c.actorId); + if (!$gameParty.members().includes(actor)) { + return false; + } + } + return true; +}; + +Game_Event.prototype.setupPage = function() { + if (this._pageIndex >= 0) { + this.setupPageSettings(); + } else { + this.clearPageSettings(); + } + this.refreshBushDepth(); + this.clearStartingFlag(); + this.checkEventTriggerAuto(); +}; + +Game_Event.prototype.clearPageSettings = function() { + this.setImage("", 0); + this._moveType = 0; + this._trigger = null; + this._interpreter = null; + this.setThrough(true); +}; + +Game_Event.prototype.setupPageSettings = function() { + const page = this.page(); + const image = page.image; + if (image.tileId > 0) { + this.setTileImage(image.tileId); + } else { + this.setImage(image.characterName, image.characterIndex); + } + if (this._originalDirection !== image.direction) { + this._originalDirection = image.direction; + this._prelockDirection = 0; + this.setDirectionFix(false); + this.setDirection(image.direction); + } + if (this._originalPattern !== image.pattern) { + this._originalPattern = image.pattern; + this.setPattern(image.pattern); + } + this.setMoveSpeed(page.moveSpeed); + this.setMoveFrequency(page.moveFrequency); + this.setPriorityType(page.priorityType); + this.setWalkAnime(page.walkAnime); + this.setStepAnime(page.stepAnime); + this.setDirectionFix(page.directionFix); + this.setThrough(page.through); + this.setMoveRoute(page.moveRoute); + this._moveType = page.moveType; + this._trigger = page.trigger; + if (this._trigger === 4) { + this._interpreter = new Game_Interpreter(); + } else { + this._interpreter = null; + } +}; + +Game_Event.prototype.isOriginalPattern = function() { + return this.pattern() === this._originalPattern; +}; + +Game_Event.prototype.resetPattern = function() { + this.setPattern(this._originalPattern); +}; + +Game_Event.prototype.checkEventTriggerTouch = function(x, y) { + if (!$gameMap.isEventRunning()) { + if (this._trigger === 2 && $gamePlayer.pos(x, y)) { + if (!this.isJumping() && this.isNormalPriority()) { + this.start(); + } + } + } +}; + +Game_Event.prototype.checkEventTriggerAuto = function() { + if (this._trigger === 3) { + this.start(); + } +}; + +Game_Event.prototype.update = function() { + Game_Character.prototype.update.call(this); + this.checkEventTriggerAuto(); + this.updateParallel(); +}; + +Game_Event.prototype.updateParallel = function() { + if (this._interpreter) { + if (!this._interpreter.isRunning()) { + this._interpreter.setup(this.list(), this._eventId); + } + this._interpreter.update(); + } +}; + +Game_Event.prototype.locate = function(x, y) { + Game_Character.prototype.locate.call(this, x, y); + this._prelockDirection = 0; +}; + +Game_Event.prototype.forceMoveRoute = function(moveRoute) { + Game_Character.prototype.forceMoveRoute.call(this, moveRoute); + this._prelockDirection = 0; +}; + +//----------------------------------------------------------------------------- +// Game_Interpreter +// +// The interpreter for running event commands. + +function Game_Interpreter() { + this.initialize(...arguments); +} + +Game_Interpreter.prototype.initialize = function(depth) { + this._depth = depth || 0; + this.checkOverflow(); + this.clear(); + this._branch = {}; + this._indent = 0; + this._frameCount = 0; + this._freezeChecker = 0; +}; + +Game_Interpreter.prototype.checkOverflow = function() { + if (this._depth >= 100) { + throw new Error("Common event calls exceeded the limit"); + } +}; + +Game_Interpreter.prototype.clear = function() { + this._mapId = 0; + this._eventId = 0; + this._list = null; + this._index = 0; + this._waitCount = 0; + this._waitMode = ""; + this._comments = ""; + this._characterId = 0; + this._childInterpreter = null; +}; + +Game_Interpreter.prototype.setup = function(list, eventId) { + this.clear(); + this._mapId = $gameMap.mapId(); + this._eventId = eventId || 0; + this._list = list; + this.loadImages(); +}; + +Game_Interpreter.prototype.loadImages = function() { + // [Note] The certain versions of MV had a more complicated preload scheme. + // However it is usually sufficient to preload face and picture images. + const list = this._list.slice(0, 200); + for (const command of list) { + switch (command.code) { + case 101: // Show Text + ImageManager.loadFace(command.parameters[0]); + break; + case 231: // Show Picture + ImageManager.loadPicture(command.parameters[1]); + break; + } + } +}; + +Game_Interpreter.prototype.eventId = function() { + return this._eventId; +}; + +Game_Interpreter.prototype.isOnCurrentMap = function() { + return this._mapId === $gameMap.mapId(); +}; + +Game_Interpreter.prototype.setupReservedCommonEvent = function() { + if ($gameTemp.isCommonEventReserved()) { + const commonEvent = $gameTemp.retrieveCommonEvent(); + if (commonEvent) { + this.setup(commonEvent.list); + return true; + } + } + return false; +}; + +Game_Interpreter.prototype.isRunning = function() { + return !!this._list; +}; + +Game_Interpreter.prototype.update = function() { + while (this.isRunning()) { + if (this.updateChild() || this.updateWait()) { + break; + } + if (SceneManager.isSceneChanging()) { + break; + } + if (!this.executeCommand()) { + break; + } + if (this.checkFreeze()) { + break; + } + } +}; + +Game_Interpreter.prototype.updateChild = function() { + if (this._childInterpreter) { + this._childInterpreter.update(); + if (this._childInterpreter.isRunning()) { + return true; + } else { + this._childInterpreter = null; + } + } + return false; +}; + +Game_Interpreter.prototype.updateWait = function() { + return this.updateWaitCount() || this.updateWaitMode(); +}; + +Game_Interpreter.prototype.updateWaitCount = function() { + if (this._waitCount > 0) { + this._waitCount--; + return true; + } + return false; +}; + +Game_Interpreter.prototype.updateWaitMode = function() { + let character = null; + let waiting = false; + switch (this._waitMode) { + case "message": + waiting = $gameMessage.isBusy(); + break; + case "transfer": + waiting = $gamePlayer.isTransferring(); + break; + case "scroll": + waiting = $gameMap.isScrolling(); + break; + case "route": + character = this.character(this._characterId); + waiting = character && character.isMoveRouteForcing(); + break; + case "animation": + character = this.character(this._characterId); + waiting = character && character.isAnimationPlaying(); + break; + case "balloon": + character = this.character(this._characterId); + waiting = character && character.isBalloonPlaying(); + break; + case "gather": + waiting = $gamePlayer.areFollowersGathering(); + break; + case "action": + waiting = BattleManager.isActionForced(); + break; + case "video": + waiting = Video.isPlaying(); + break; + case "image": + waiting = !ImageManager.isReady(); + break; + } + if (!waiting) { + this._waitMode = ""; + } + return waiting; +}; + +Game_Interpreter.prototype.setWaitMode = function(waitMode) { + this._waitMode = waitMode; +}; + +Game_Interpreter.prototype.wait = function(duration) { + this._waitCount = duration; +}; + +Game_Interpreter.prototype.fadeSpeed = function() { + return 24; +}; + +Game_Interpreter.prototype.executeCommand = function() { + const command = this.currentCommand(); + if (command) { + this._indent = command.indent; + const methodName = "command" + command.code; + if (typeof this[methodName] === "function") { + if (!this[methodName](command.parameters)) { + return false; + } + } + this._index++; + } else { + this.terminate(); + } + return true; +}; + +Game_Interpreter.prototype.checkFreeze = function() { + if (this._frameCount !== Graphics.frameCount) { + this._frameCount = Graphics.frameCount; + this._freezeChecker = 0; + } + if (this._freezeChecker++ >= 100000) { + return true; + } else { + return false; + } +}; + +Game_Interpreter.prototype.terminate = function() { + this._list = null; + this._comments = ""; +}; + +Game_Interpreter.prototype.skipBranch = function() { + while (this._list[this._index + 1].indent > this._indent) { + this._index++; + } +}; + +Game_Interpreter.prototype.currentCommand = function() { + return this._list[this._index]; +}; + +Game_Interpreter.prototype.nextEventCode = function() { + const command = this._list[this._index + 1]; + if (command) { + return command.code; + } else { + return 0; + } +}; + +Game_Interpreter.prototype.iterateActorId = function(param, callback) { + if (param === 0) { + $gameParty.members().forEach(callback); + } else { + const actor = $gameActors.actor(param); + if (actor) { + callback(actor); + } + } +}; + +Game_Interpreter.prototype.iterateActorEx = function(param1, param2, callback) { + if (param1 === 0) { + this.iterateActorId(param2, callback); + } else { + this.iterateActorId($gameVariables.value(param2), callback); + } +}; + +Game_Interpreter.prototype.iterateActorIndex = function(param, callback) { + if (param < 0) { + $gameParty.members().forEach(callback); + } else { + const actor = $gameParty.members()[param]; + if (actor) { + callback(actor); + } + } +}; + +Game_Interpreter.prototype.iterateEnemyIndex = function(param, callback) { + if (param < 0) { + $gameTroop.members().forEach(callback); + } else { + const enemy = $gameTroop.members()[param]; + if (enemy) { + callback(enemy); + } + } +}; + +Game_Interpreter.prototype.iterateBattler = function(param1, param2, callback) { + if ($gameParty.inBattle()) { + if (param1 === 0) { + this.iterateEnemyIndex(param2, callback); + } else { + this.iterateActorId(param2, callback); + } + } +}; + +Game_Interpreter.prototype.character = function(param) { + if ($gameParty.inBattle()) { + return null; + } else if (param < 0) { + return $gamePlayer; + } else if (this.isOnCurrentMap()) { + return $gameMap.event(param > 0 ? param : this._eventId); + } else { + return null; + } +}; + +// prettier-ignore +Game_Interpreter.prototype.operateValue = function( + operation, operandType, operand +) { + const value = operandType === 0 ? operand : $gameVariables.value(operand); + return operation === 0 ? value : -value; +}; + +Game_Interpreter.prototype.changeHp = function(target, value, allowDeath) { + if (target.isAlive()) { + if (!allowDeath && target.hp <= -value) { + value = 1 - target.hp; + } + target.gainHp(value); + if (target.isDead()) { + target.performCollapse(); + } + } +}; + +// Show Text +Game_Interpreter.prototype.command101 = function(params) { + if ($gameMessage.isBusy()) { + return false; + } + $gameMessage.setFaceImage(params[0], params[1]); + $gameMessage.setBackground(params[2]); + $gameMessage.setPositionType(params[3]); + $gameMessage.setSpeakerName(params[4]); + while (this.nextEventCode() === 401) { + // Text data + this._index++; + $gameMessage.add(this.currentCommand().parameters[0]); + } + switch (this.nextEventCode()) { + case 102: // Show Choices + this._index++; + this.setupChoices(this.currentCommand().parameters); + break; + case 103: // Input Number + this._index++; + this.setupNumInput(this.currentCommand().parameters); + break; + case 104: // Select Item + this._index++; + this.setupItemChoice(this.currentCommand().parameters); + break; + } + this.setWaitMode("message"); + return true; +}; + +// Show Choices +Game_Interpreter.prototype.command102 = function(params) { + if ($gameMessage.isBusy()) { + return false; + } + this.setupChoices(params); + this.setWaitMode("message"); + return true; +}; + +Game_Interpreter.prototype.setupChoices = function(params) { + const choices = params[0].clone(); + const cancelType = params[1] < choices.length ? params[1] : -2; + const defaultType = params.length > 2 ? params[2] : 0; + const positionType = params.length > 3 ? params[3] : 2; + const background = params.length > 4 ? params[4] : 0; + $gameMessage.setChoices(choices, defaultType, cancelType); + $gameMessage.setChoiceBackground(background); + $gameMessage.setChoicePositionType(positionType); + $gameMessage.setChoiceCallback(n => { + this._branch[this._indent] = n; + }); +}; + +// When [**] +Game_Interpreter.prototype.command402 = function(params) { + if (this._branch[this._indent] !== params[0]) { + this.skipBranch(); + } + return true; +}; + +// When Cancel +Game_Interpreter.prototype.command403 = function() { + if (this._branch[this._indent] >= 0) { + this.skipBranch(); + } + return true; +}; + +// Input Number +Game_Interpreter.prototype.command103 = function(params) { + if ($gameMessage.isBusy()) { + return false; + } + this.setupNumInput(params); + this.setWaitMode("message"); + return true; +}; + +Game_Interpreter.prototype.setupNumInput = function(params) { + $gameMessage.setNumberInput(params[0], params[1]); +}; + +// Select Item +Game_Interpreter.prototype.command104 = function(params) { + if ($gameMessage.isBusy()) { + return false; + } + this.setupItemChoice(params); + this.setWaitMode("message"); + return true; +}; + +Game_Interpreter.prototype.setupItemChoice = function(params) { + $gameMessage.setItemChoice(params[0], params[1] || 2); +}; + +// Show Scrolling Text +Game_Interpreter.prototype.command105 = function(params) { + if ($gameMessage.isBusy()) { + return false; + } + $gameMessage.setScroll(params[0], params[1]); + while (this.nextEventCode() === 405) { + this._index++; + $gameMessage.add(this.currentCommand().parameters[0]); + } + this.setWaitMode("message"); + return true; +}; + +// Comment +Game_Interpreter.prototype.command108 = function(params) { + this._comments = [params[0]]; + while (this.nextEventCode() === 408) { + this._index++; + this._comments.push(this.currentCommand().parameters[0]); + } + return true; +}; + +// Conditional Branch +Game_Interpreter.prototype.command111 = function(params) { + let result = false; + let value1, value2; + let actor, enemy, character; + switch (params[0]) { + case 0: // Switch + result = $gameSwitches.value(params[1]) === (params[2] === 0); + break; + case 1: // Variable + value1 = $gameVariables.value(params[1]); + if (params[2] === 0) { + value2 = params[3]; + } else { + value2 = $gameVariables.value(params[3]); + } + switch (params[4]) { + case 0: // Equal to + result = value1 === value2; + break; + case 1: // Greater than or Equal to + result = value1 >= value2; + break; + case 2: // Less than or Equal to + result = value1 <= value2; + break; + case 3: // Greater than + result = value1 > value2; + break; + case 4: // Less than + result = value1 < value2; + break; + case 5: // Not Equal to + result = value1 !== value2; + break; + } + break; + case 2: // Self Switch + if (this._eventId > 0) { + const key = [this._mapId, this._eventId, params[1]]; + result = $gameSelfSwitches.value(key) === (params[2] === 0); + } + break; + case 3: // Timer + if ($gameTimer.isWorking()) { + const sec = $gameTimer.frames() / 60; + if (params[2] === 0) { + result = sec >= params[1]; + } else { + result = sec <= params[1]; + } + } + break; + case 4: // Actor + actor = $gameActors.actor(params[1]); + if (actor) { + const n = params[3]; + switch (params[2]) { + case 0: // In the Party + result = $gameParty.members().includes(actor); + break; + case 1: // Name + result = actor.name() === n; + break; + case 2: // Class + result = actor.isClass($dataClasses[n]); + break; + case 3: // Skill + result = actor.hasSkill(n); + break; + case 4: // Weapon + result = actor.hasWeapon($dataWeapons[n]); + break; + case 5: // Armor + result = actor.hasArmor($dataArmors[n]); + break; + case 6: // State + result = actor.isStateAffected(n); + break; + } + } + break; + case 5: // Enemy + enemy = $gameTroop.members()[params[1]]; + if (enemy) { + switch (params[2]) { + case 0: // Appeared + result = enemy.isAlive(); + break; + case 1: // State + result = enemy.isStateAffected(params[3]); + break; + } + } + break; + case 6: // Character + character = this.character(params[1]); + if (character) { + result = character.direction() === params[2]; + } + break; + case 7: // Gold + switch (params[2]) { + case 0: // Greater than or equal to + result = $gameParty.gold() >= params[1]; + break; + case 1: // Less than or equal to + result = $gameParty.gold() <= params[1]; + break; + case 2: // Less than + result = $gameParty.gold() < params[1]; + break; + } + break; + case 8: // Item + result = $gameParty.hasItem($dataItems[params[1]]); + break; + case 9: // Weapon + result = $gameParty.hasItem($dataWeapons[params[1]], params[2]); + break; + case 10: // Armor + result = $gameParty.hasItem($dataArmors[params[1]], params[2]); + break; + case 11: // Button + switch (params[2] || 0) { + case 0: + result = Input.isPressed(params[1]); + break; + case 1: + result = Input.isTriggered(params[1]); + break; + case 2: + result = Input.isRepeated(params[1]); + break; + } + break; + case 12: // Script + result = !!eval(params[1]); + break; + case 13: // Vehicle + result = $gamePlayer.vehicle() === $gameMap.vehicle(params[1]); + break; + } + this._branch[this._indent] = result; + if (this._branch[this._indent] === false) { + this.skipBranch(); + } + return true; +}; + +// Else +Game_Interpreter.prototype.command411 = function() { + if (this._branch[this._indent] !== false) { + this.skipBranch(); + } + return true; +}; + +// Loop +Game_Interpreter.prototype.command112 = function() { + return true; +}; + +// Repeat Above +Game_Interpreter.prototype.command413 = function() { + do { + this._index--; + } while (this.currentCommand().indent !== this._indent); + return true; +}; + +// Break Loop +Game_Interpreter.prototype.command113 = function() { + let depth = 0; + while (this._index < this._list.length - 1) { + this._index++; + const command = this.currentCommand(); + if (command.code === 112) { + depth++; + } + if (command.code === 413) { + if (depth > 0) { + depth--; + } else { + break; + } + } + } + return true; +}; + +// Exit Event Processing +Game_Interpreter.prototype.command115 = function() { + this._index = this._list.length; + return true; +}; + +// Common Event +Game_Interpreter.prototype.command117 = function(params) { + const commonEvent = $dataCommonEvents[params[0]]; + if (commonEvent) { + const eventId = this.isOnCurrentMap() ? this._eventId : 0; + this.setupChild(commonEvent.list, eventId); + } + return true; +}; + +Game_Interpreter.prototype.setupChild = function(list, eventId) { + this._childInterpreter = new Game_Interpreter(this._depth + 1); + this._childInterpreter.setup(list, eventId); +}; + +// Label +Game_Interpreter.prototype.command118 = function() { + return true; +}; + +// Jump to Label +Game_Interpreter.prototype.command119 = function(params) { + const labelName = params[0]; + for (let i = 0; i < this._list.length; i++) { + const command = this._list[i]; + if (command.code === 118 && command.parameters[0] === labelName) { + this.jumpTo(i); + break; + } + } + return true; +}; + +Game_Interpreter.prototype.jumpTo = function(index) { + const lastIndex = this._index; + const startIndex = Math.min(index, lastIndex); + const endIndex = Math.max(index, lastIndex); + let indent = this._indent; + for (let i = startIndex; i <= endIndex; i++) { + const newIndent = this._list[i].indent; + if (newIndent !== indent) { + this._branch[indent] = null; + indent = newIndent; + } + } + this._index = index; +}; + +// Control Switches +Game_Interpreter.prototype.command121 = function(params) { + for (let i = params[0]; i <= params[1]; i++) { + $gameSwitches.setValue(i, params[2] === 0); + } + return true; +}; + +// Control Variables +Game_Interpreter.prototype.command122 = function(params) { + const startId = params[0]; + const endId = params[1]; + const operationType = params[2]; + const operand = params[3]; + let value = 0; + let randomMax = 1; + switch (operand) { + case 0: // Constant + value = params[4]; + break; + case 1: // Variable + value = $gameVariables.value(params[4]); + break; + case 2: // Random + value = params[4]; + randomMax = params[5] - params[4] + 1; + randomMax = Math.max(randomMax, 1); + break; + case 3: // Game Data + value = this.gameDataOperand(params[4], params[5], params[6]); + break; + case 4: // Script + value = eval(params[4]); + break; + } + for (let i = startId; i <= endId; i++) { + if (typeof value === "number") { + const realValue = value + Math.randomInt(randomMax); + this.operateVariable(i, operationType, realValue); + } else { + this.operateVariable(i, operationType, value); + } + } + return true; +}; + +Game_Interpreter.prototype.gameDataOperand = function(type, param1, param2) { + let actor, enemy, character; + switch (type) { + case 0: // Item + return $gameParty.numItems($dataItems[param1]); + case 1: // Weapon + return $gameParty.numItems($dataWeapons[param1]); + case 2: // Armor + return $gameParty.numItems($dataArmors[param1]); + case 3: // Actor + actor = $gameActors.actor(param1); + if (actor) { + switch (param2) { + case 0: // Level + return actor.level; + case 1: // EXP + return actor.currentExp(); + case 2: // HP + return actor.hp; + case 3: // MP + return actor.mp; + case 12: // TP + return actor.tp; + default: + // Parameter + if (param2 >= 4 && param2 <= 11) { + return actor.param(param2 - 4); + } + } + } + break; + case 4: // Enemy + enemy = $gameTroop.members()[param1]; + if (enemy) { + switch (param2) { + case 0: // HP + return enemy.hp; + case 1: // MP + return enemy.mp; + case 10: // TP + return enemy.tp; + default: + // Parameter + if (param2 >= 2 && param2 <= 9) { + return enemy.param(param2 - 2); + } + } + } + break; + case 5: // Character + character = this.character(param1); + if (character) { + switch (param2) { + case 0: // Map X + return character.x; + case 1: // Map Y + return character.y; + case 2: // Direction + return character.direction(); + case 3: // Screen X + return character.screenX(); + case 4: // Screen Y + return character.screenY(); + } + } + break; + case 6: // Party + actor = $gameParty.members()[param1]; + return actor ? actor.actorId() : 0; + case 8: // Last + return $gameTemp.lastActionData(param1); + case 7: // Other + switch (param1) { + case 0: // Map ID + return $gameMap.mapId(); + case 1: // Party Members + return $gameParty.size(); + case 2: // Gold + return $gameParty.gold(); + case 3: // Steps + return $gameParty.steps(); + case 4: // Play Time + return $gameSystem.playtime(); + case 5: // Timer + return $gameTimer.seconds(); + case 6: // Save Count + return $gameSystem.saveCount(); + case 7: // Battle Count + return $gameSystem.battleCount(); + case 8: // Win Count + return $gameSystem.winCount(); + case 9: // Escape Count + return $gameSystem.escapeCount(); + } + break; + } + return 0; +}; + +Game_Interpreter.prototype.operateVariable = function( + variableId, + operationType, + value +) { + try { + const oldValue = $gameVariables.value(variableId); + switch (operationType) { + case 0: // Set + $gameVariables.setValue(variableId, value); + break; + case 1: // Add + $gameVariables.setValue(variableId, oldValue + value); + break; + case 2: // Sub + $gameVariables.setValue(variableId, oldValue - value); + break; + case 3: // Mul + $gameVariables.setValue(variableId, oldValue * value); + break; + case 4: // Div + $gameVariables.setValue(variableId, oldValue / value); + break; + case 5: // Mod + $gameVariables.setValue(variableId, oldValue % value); + break; + } + } catch (e) { + $gameVariables.setValue(variableId, 0); + } +}; + +// Control Self Switch +Game_Interpreter.prototype.command123 = function(params) { + if (this._eventId > 0) { + const key = [this._mapId, this._eventId, params[0]]; + $gameSelfSwitches.setValue(key, params[1] === 0); + } + return true; +}; + +// Control Timer +Game_Interpreter.prototype.command124 = function(params) { + if (params[0] === 0) { + // Start + $gameTimer.start(params[1] * 60); + } else { + // Stop + $gameTimer.stop(); + } + return true; +}; + +// Change Gold +Game_Interpreter.prototype.command125 = function(params) { + const value = this.operateValue(params[0], params[1], params[2]); + $gameParty.gainGold(value); + return true; +}; + +// Change Items +Game_Interpreter.prototype.command126 = function(params) { + const value = this.operateValue(params[1], params[2], params[3]); + $gameParty.gainItem($dataItems[params[0]], value); + return true; +}; + +// Change Weapons +Game_Interpreter.prototype.command127 = function(params) { + const value = this.operateValue(params[1], params[2], params[3]); + $gameParty.gainItem($dataWeapons[params[0]], value, params[4]); + return true; +}; + +// Change Armors +Game_Interpreter.prototype.command128 = function(params) { + const value = this.operateValue(params[1], params[2], params[3]); + $gameParty.gainItem($dataArmors[params[0]], value, params[4]); + return true; +}; + +// Change Party Member +Game_Interpreter.prototype.command129 = function(params) { + const actor = $gameActors.actor(params[0]); + if (actor) { + if (params[1] === 0) { + // Add + if (params[2]) { + // Initialize + $gameActors.actor(params[0]).setup(params[0]); + } + $gameParty.addActor(params[0]); + } else { + // Remove + $gameParty.removeActor(params[0]); + } + } + return true; +}; + +// Change Battle BGM +Game_Interpreter.prototype.command132 = function(params) { + $gameSystem.setBattleBgm(params[0]); + return true; +}; + +// Change Victory ME +Game_Interpreter.prototype.command133 = function(params) { + $gameSystem.setVictoryMe(params[0]); + return true; +}; + +// Change Save Access +Game_Interpreter.prototype.command134 = function(params) { + if (params[0] === 0) { + $gameSystem.disableSave(); + } else { + $gameSystem.enableSave(); + } + return true; +}; + +// Change Menu Access +Game_Interpreter.prototype.command135 = function(params) { + if (params[0] === 0) { + $gameSystem.disableMenu(); + } else { + $gameSystem.enableMenu(); + } + return true; +}; + +// Change Encounter +Game_Interpreter.prototype.command136 = function(params) { + if (params[0] === 0) { + $gameSystem.disableEncounter(); + } else { + $gameSystem.enableEncounter(); + } + $gamePlayer.makeEncounterCount(); + return true; +}; + +// Change Formation Access +Game_Interpreter.prototype.command137 = function(params) { + if (params[0] === 0) { + $gameSystem.disableFormation(); + } else { + $gameSystem.enableFormation(); + } + return true; +}; + +// Change Window Color +Game_Interpreter.prototype.command138 = function(params) { + $gameSystem.setWindowTone(params[0]); + return true; +}; + +// Change Defeat ME +Game_Interpreter.prototype.command139 = function(params) { + $gameSystem.setDefeatMe(params[0]); + return true; +}; + +// Change Vehicle BGM +Game_Interpreter.prototype.command140 = function(params) { + const vehicle = $gameMap.vehicle(params[0]); + if (vehicle) { + vehicle.setBgm(params[1]); + } + return true; +}; + +// Transfer Player +Game_Interpreter.prototype.command201 = function(params) { + if ($gameParty.inBattle() || $gameMessage.isBusy()) { + return false; + } + let mapId, x, y; + if (params[0] === 0) { + // Direct designation + mapId = params[1]; + x = params[2]; + y = params[3]; + } else { + // Designation with variables + mapId = $gameVariables.value(params[1]); + x = $gameVariables.value(params[2]); + y = $gameVariables.value(params[3]); + } + $gamePlayer.reserveTransfer(mapId, x, y, params[4], params[5]); + this.setWaitMode("transfer"); + return true; +}; + +// Set Vehicle Location +Game_Interpreter.prototype.command202 = function(params) { + let mapId, x, y; + if (params[1] === 0) { + // Direct designation + mapId = params[2]; + x = params[3]; + y = params[4]; + } else { + // Designation with variables + mapId = $gameVariables.value(params[2]); + x = $gameVariables.value(params[3]); + y = $gameVariables.value(params[4]); + } + const vehicle = $gameMap.vehicle(params[0]); + if (vehicle) { + vehicle.setLocation(mapId, x, y); + } + return true; +}; + +// Set Event Location +Game_Interpreter.prototype.command203 = function(params) { + const character = this.character(params[0]); + if (character) { + if (params[1] === 0) { + // Direct designation + character.locate(params[2], params[3]); + } else if (params[1] === 1) { + // Designation with variables + const x = $gameVariables.value(params[2]); + const y = $gameVariables.value(params[3]); + character.locate(x, y); + } else { + // Exchange with another event + const character2 = this.character(params[2]); + if (character2) { + character.swap(character2); + } + } + if (params[4] > 0) { + character.setDirection(params[4]); + } + } + return true; +}; + +// Scroll Map +Game_Interpreter.prototype.command204 = function(params) { + if (!$gameParty.inBattle()) { + if ($gameMap.isScrolling()) { + this.setWaitMode("scroll"); + return false; + } + $gameMap.startScroll(params[0], params[1], params[2]); + if (params[3]) { + this.setWaitMode("scroll"); + } + } + return true; +}; + +// Set Movement Route +Game_Interpreter.prototype.command205 = function(params) { + $gameMap.refreshIfNeeded(); + this._characterId = params[0]; + const character = this.character(this._characterId); + if (character) { + character.forceMoveRoute(params[1]); + if (params[1].wait) { + this.setWaitMode("route"); + } + } + return true; +}; + +// Get on/off Vehicle +Game_Interpreter.prototype.command206 = function() { + $gamePlayer.getOnOffVehicle(); + return true; +}; + +// Change Transparency +Game_Interpreter.prototype.command211 = function(params) { + $gamePlayer.setTransparent(params[0] === 0); + return true; +}; + +// Show Animation +Game_Interpreter.prototype.command212 = function(params) { + this._characterId = params[0]; + const character = this.character(this._characterId); + if (character) { + $gameTemp.requestAnimation([character], params[1]); + if (params[2]) { + this.setWaitMode("animation"); + } + } + return true; +}; + +// Show Balloon Icon +Game_Interpreter.prototype.command213 = function(params) { + this._characterId = params[0]; + const character = this.character(this._characterId); + if (character) { + $gameTemp.requestBalloon(character, params[1]); + if (params[2]) { + this.setWaitMode("balloon"); + } + } + return true; +}; + +// Erase Event +Game_Interpreter.prototype.command214 = function() { + if (this.isOnCurrentMap() && this._eventId > 0) { + $gameMap.eraseEvent(this._eventId); + } + return true; +}; + +// Change Player Followers +Game_Interpreter.prototype.command216 = function(params) { + if (params[0] === 0) { + $gamePlayer.showFollowers(); + } else { + $gamePlayer.hideFollowers(); + } + $gamePlayer.refresh(); + return true; +}; + +// Gather Followers +Game_Interpreter.prototype.command217 = function() { + if (!$gameParty.inBattle()) { + $gamePlayer.gatherFollowers(); + this.setWaitMode("gather"); + } + return true; +}; + +// Fadeout Screen +Game_Interpreter.prototype.command221 = function() { + if ($gameMessage.isBusy()) { + return false; + } + $gameScreen.startFadeOut(this.fadeSpeed()); + this.wait(this.fadeSpeed()); + return true; +}; + +// Fadein Screen +Game_Interpreter.prototype.command222 = function() { + if ($gameMessage.isBusy()) { + return false; + } + $gameScreen.startFadeIn(this.fadeSpeed()); + this.wait(this.fadeSpeed()); + return true; +}; + +// Tint Screen +Game_Interpreter.prototype.command223 = function(params) { + $gameScreen.startTint(params[0], params[1]); + if (params[2]) { + this.wait(params[1]); + } + return true; +}; + +// Flash Screen +Game_Interpreter.prototype.command224 = function(params) { + $gameScreen.startFlash(params[0], params[1]); + if (params[2]) { + this.wait(params[1]); + } + return true; +}; + +// Shake Screen +Game_Interpreter.prototype.command225 = function(params) { + $gameScreen.startShake(params[0], params[1], params[2]); + if (params[3]) { + this.wait(params[2]); + } + return true; +}; + +// Wait +Game_Interpreter.prototype.command230 = function(params) { + this.wait(params[0]); + return true; +}; + +// Show Picture +Game_Interpreter.prototype.command231 = function(params) { + const point = this.picturePoint(params); + // prettier-ignore + $gameScreen.showPicture( + params[0], params[1], params[2], point.x, point.y, + params[6], params[7], params[8], params[9] + ); + return true; +}; + +// Move Picture +Game_Interpreter.prototype.command232 = function(params) { + const point = this.picturePoint(params); + // prettier-ignore + $gameScreen.movePicture( + params[0], params[2], point.x, point.y, params[6], params[7], + params[8], params[9], params[10], params[12] || 0 + ); + if (params[11]) { + this.wait(params[10]); + } + return true; +}; + +Game_Interpreter.prototype.picturePoint = function(params) { + const point = new Point(); + if (params[3] === 0) { + // Direct designation + point.x = params[4]; + point.y = params[5]; + } else { + // Designation with variables + point.x = $gameVariables.value(params[4]); + point.y = $gameVariables.value(params[5]); + } + return point; +}; + +// Rotate Picture +Game_Interpreter.prototype.command233 = function(params) { + $gameScreen.rotatePicture(params[0], params[1]); + return true; +}; + +// Tint Picture +Game_Interpreter.prototype.command234 = function(params) { + $gameScreen.tintPicture(params[0], params[1], params[2]); + if (params[3]) { + this.wait(params[2]); + } + return true; +}; + +// Erase Picture +Game_Interpreter.prototype.command235 = function(params) { + $gameScreen.erasePicture(params[0]); + return true; +}; + +// Set Weather Effect +Game_Interpreter.prototype.command236 = function(params) { + if (!$gameParty.inBattle()) { + $gameScreen.changeWeather(params[0], params[1], params[2]); + if (params[3]) { + this.wait(params[2]); + } + } + return true; +}; + +// Play BGM +Game_Interpreter.prototype.command241 = function(params) { + AudioManager.playBgm(params[0]); + return true; +}; + +// Fadeout BGM +Game_Interpreter.prototype.command242 = function(params) { + AudioManager.fadeOutBgm(params[0]); + return true; +}; + +// Save BGM +Game_Interpreter.prototype.command243 = function() { + $gameSystem.saveBgm(); + return true; +}; + +// Resume BGM +Game_Interpreter.prototype.command244 = function() { + $gameSystem.replayBgm(); + return true; +}; + +// Play BGS +Game_Interpreter.prototype.command245 = function(params) { + AudioManager.playBgs(params[0]); + return true; +}; + +// Fadeout BGS +Game_Interpreter.prototype.command246 = function(params) { + AudioManager.fadeOutBgs(params[0]); + return true; +}; + +// Play ME +Game_Interpreter.prototype.command249 = function(params) { + AudioManager.playMe(params[0]); + return true; +}; + +// Play SE +Game_Interpreter.prototype.command250 = function(params) { + AudioManager.playSe(params[0]); + return true; +}; + +// Stop SE +Game_Interpreter.prototype.command251 = function() { + AudioManager.stopSe(); + return true; +}; + +// Play Movie +Game_Interpreter.prototype.command261 = function(params) { + if ($gameMessage.isBusy()) { + return false; + } + const name = params[0]; + if (name.length > 0) { + const ext = this.videoFileExt(); + Video.play("movies/" + name + ext); + this.setWaitMode("video"); + } + return true; +}; + +Game_Interpreter.prototype.videoFileExt = function() { + if (Utils.canPlayWebm()) { + return ".webm"; + } else { + return ".mp4"; + } +}; + +// Change Map Name Display +Game_Interpreter.prototype.command281 = function(params) { + if (params[0] === 0) { + $gameMap.enableNameDisplay(); + } else { + $gameMap.disableNameDisplay(); + } + return true; +}; + +// Change Tileset +Game_Interpreter.prototype.command282 = function(params) { + const tileset = $dataTilesets[params[0]]; + const allReady = tileset.tilesetNames + .map(tilesetName => ImageManager.loadTileset(tilesetName)) + .every(bitmap => bitmap.isReady()); + if (allReady) { + $gameMap.changeTileset(params[0]); + return true; + } else { + return false; + } +}; + +// Change Battle Background +Game_Interpreter.prototype.command283 = function(params) { + $gameMap.changeBattleback(params[0], params[1]); + return true; +}; + +// Change Parallax +Game_Interpreter.prototype.command284 = function(params) { + // prettier-ignore + $gameMap.changeParallax( + params[0], params[1], params[2], params[3], params[4] + ); + return true; +}; + +// Get Location Info +Game_Interpreter.prototype.command285 = function(params) { + let x, y, value; + if (params[2] === 0) { + // Direct designation + x = params[3]; + y = params[4]; + } else if (params[2] === 1) { + // Designation with variables + x = $gameVariables.value(params[3]); + y = $gameVariables.value(params[4]); + } else { + // Designation by a character + const character = this.character(params[3]); + x = character.x; + y = character.y; + } + switch (params[1]) { + case 0: // Terrain Tag + value = $gameMap.terrainTag(x, y); + break; + case 1: // Event ID + value = $gameMap.eventIdXy(x, y); + break; + case 2: // Tile ID (Layer 1) + case 3: // Tile ID (Layer 2) + case 4: // Tile ID (Layer 3) + case 5: // Tile ID (Layer 4) + value = $gameMap.tileId(x, y, params[1] - 2); + break; + default: + // Region ID + value = $gameMap.regionId(x, y); + break; + } + $gameVariables.setValue(params[0], value); + return true; +}; + +// Battle Processing +Game_Interpreter.prototype.command301 = function(params) { + if (!$gameParty.inBattle()) { + let troopId; + if (params[0] === 0) { + // Direct designation + troopId = params[1]; + } else if (params[0] === 1) { + // Designation with a variable + troopId = $gameVariables.value(params[1]); + } else { + // Same as Random Encounters + troopId = $gamePlayer.makeEncounterTroopId(); + } + if ($dataTroops[troopId]) { + BattleManager.setup(troopId, params[2], params[3]); + BattleManager.setEventCallback(n => { + this._branch[this._indent] = n; + }); + $gamePlayer.makeEncounterCount(); + SceneManager.push(Scene_Battle); + } + } + return true; +}; + +// If Win +Game_Interpreter.prototype.command601 = function() { + if (this._branch[this._indent] !== 0) { + this.skipBranch(); + } + return true; +}; + +// If Escape +Game_Interpreter.prototype.command602 = function() { + if (this._branch[this._indent] !== 1) { + this.skipBranch(); + } + return true; +}; + +// If Lose +Game_Interpreter.prototype.command603 = function() { + if (this._branch[this._indent] !== 2) { + this.skipBranch(); + } + return true; +}; + +// Shop Processing +Game_Interpreter.prototype.command302 = function(params) { + if (!$gameParty.inBattle()) { + const goods = [params]; + while (this.nextEventCode() === 605) { + this._index++; + goods.push(this.currentCommand().parameters); + } + SceneManager.push(Scene_Shop); + SceneManager.prepareNextScene(goods, params[4]); + } + return true; +}; + +// Name Input Processing +Game_Interpreter.prototype.command303 = function(params) { + if (!$gameParty.inBattle()) { + if ($dataActors[params[0]]) { + SceneManager.push(Scene_Name); + SceneManager.prepareNextScene(params[0], params[1]); + } + } + return true; +}; + +// Change HP +Game_Interpreter.prototype.command311 = function(params) { + const value = this.operateValue(params[2], params[3], params[4]); + this.iterateActorEx(params[0], params[1], actor => { + this.changeHp(actor, value, params[5]); + }); + return true; +}; + +// Change MP +Game_Interpreter.prototype.command312 = function(params) { + const value = this.operateValue(params[2], params[3], params[4]); + this.iterateActorEx(params[0], params[1], actor => { + actor.gainMp(value); + }); + return true; +}; + +// Change TP +Game_Interpreter.prototype.command326 = function(params) { + const value = this.operateValue(params[2], params[3], params[4]); + this.iterateActorEx(params[0], params[1], actor => { + actor.gainTp(value); + }); + return true; +}; + +// Change State +Game_Interpreter.prototype.command313 = function(params) { + this.iterateActorEx(params[0], params[1], actor => { + const alreadyDead = actor.isDead(); + if (params[2] === 0) { + actor.addState(params[3]); + } else { + actor.removeState(params[3]); + } + if (actor.isDead() && !alreadyDead) { + actor.performCollapse(); + } + actor.clearResult(); + }); + return true; +}; + +// Recover All +Game_Interpreter.prototype.command314 = function(params) { + this.iterateActorEx(params[0], params[1], actor => { + actor.recoverAll(); + }); + return true; +}; + +// Change EXP +Game_Interpreter.prototype.command315 = function(params) { + const value = this.operateValue(params[2], params[3], params[4]); + this.iterateActorEx(params[0], params[1], actor => { + actor.changeExp(actor.currentExp() + value, params[5]); + }); + return true; +}; + +// Change Level +Game_Interpreter.prototype.command316 = function(params) { + const value = this.operateValue(params[2], params[3], params[4]); + this.iterateActorEx(params[0], params[1], actor => { + actor.changeLevel(actor.level + value, params[5]); + }); + return true; +}; + +// Change Parameter +Game_Interpreter.prototype.command317 = function(params) { + const value = this.operateValue(params[3], params[4], params[5]); + this.iterateActorEx(params[0], params[1], actor => { + actor.addParam(params[2], value); + }); + return true; +}; + +// Change Skill +Game_Interpreter.prototype.command318 = function(params) { + this.iterateActorEx(params[0], params[1], actor => { + if (params[2] === 0) { + actor.learnSkill(params[3]); + } else { + actor.forgetSkill(params[3]); + } + }); + return true; +}; + +// Change Equipment +Game_Interpreter.prototype.command319 = function(params) { + const actor = $gameActors.actor(params[0]); + if (actor) { + actor.changeEquipById(params[1], params[2]); + } + return true; +}; + +// Change Name +Game_Interpreter.prototype.command320 = function(params) { + const actor = $gameActors.actor(params[0]); + if (actor) { + actor.setName(params[1]); + } + return true; +}; + +// Change Class +Game_Interpreter.prototype.command321 = function(params) { + const actor = $gameActors.actor(params[0]); + if (actor && $dataClasses[params[1]]) { + actor.changeClass(params[1], params[2]); + } + return true; +}; + +// Change Actor Images +Game_Interpreter.prototype.command322 = function(params) { + const actor = $gameActors.actor(params[0]); + if (actor) { + actor.setCharacterImage(params[1], params[2]); + actor.setFaceImage(params[3], params[4]); + actor.setBattlerImage(params[5]); + } + $gamePlayer.refresh(); + return true; +}; + +// Change Vehicle Image +Game_Interpreter.prototype.command323 = function(params) { + const vehicle = $gameMap.vehicle(params[0]); + if (vehicle) { + vehicle.setImage(params[1], params[2]); + } + return true; +}; + +// Change Nickname +Game_Interpreter.prototype.command324 = function(params) { + const actor = $gameActors.actor(params[0]); + if (actor) { + actor.setNickname(params[1]); + } + return true; +}; + +// Change Profile +Game_Interpreter.prototype.command325 = function(params) { + const actor = $gameActors.actor(params[0]); + if (actor) { + actor.setProfile(params[1]); + } + return true; +}; + +// Change Enemy HP +Game_Interpreter.prototype.command331 = function(params) { + const value = this.operateValue(params[1], params[2], params[3]); + this.iterateEnemyIndex(params[0], enemy => { + this.changeHp(enemy, value, params[4]); + }); + return true; +}; + +// Change Enemy MP +Game_Interpreter.prototype.command332 = function(params) { + const value = this.operateValue(params[1], params[2], params[3]); + this.iterateEnemyIndex(params[0], enemy => { + enemy.gainMp(value); + }); + return true; +}; + +// Change Enemy TP +Game_Interpreter.prototype.command342 = function(params) { + const value = this.operateValue(params[1], params[2], params[3]); + this.iterateEnemyIndex(params[0], enemy => { + enemy.gainTp(value); + }); + return true; +}; + +// Change Enemy State +Game_Interpreter.prototype.command333 = function(params) { + this.iterateEnemyIndex(params[0], enemy => { + const alreadyDead = enemy.isDead(); + if (params[1] === 0) { + enemy.addState(params[2]); + } else { + enemy.removeState(params[2]); + } + if (enemy.isDead() && !alreadyDead) { + enemy.performCollapse(); + } + enemy.clearResult(); + }); + return true; +}; + +// Enemy Recover All +Game_Interpreter.prototype.command334 = function(params) { + this.iterateEnemyIndex(params[0], enemy => { + enemy.recoverAll(); + }); + return true; +}; + +// Enemy Appear +Game_Interpreter.prototype.command335 = function(params) { + this.iterateEnemyIndex(params[0], enemy => { + enemy.appear(); + $gameTroop.makeUniqueNames(); + }); + return true; +}; + +// Enemy Transform +Game_Interpreter.prototype.command336 = function(params) { + this.iterateEnemyIndex(params[0], enemy => { + enemy.transform(params[1]); + $gameTroop.makeUniqueNames(); + }); + return true; +}; + +// Show Battle Animation +Game_Interpreter.prototype.command337 = function(params) { + let param = params[0]; + if (params[2]) { + param = -1; + } + const targets = []; + this.iterateEnemyIndex(param, enemy => { + if (enemy.isAlive()) { + targets.push(enemy); + } + }); + $gameTemp.requestAnimation(targets, params[1]); + return true; +}; + +// Force Action +Game_Interpreter.prototype.command339 = function(params) { + this.iterateBattler(params[0], params[1], battler => { + if (!battler.isDeathStateAffected()) { + battler.forceAction(params[2], params[3]); + BattleManager.forceAction(battler); + this.setWaitMode("action"); + } + }); + return true; +}; + +// Abort Battle +Game_Interpreter.prototype.command340 = function() { + BattleManager.abort(); + return true; +}; + +// Open Menu Screen +Game_Interpreter.prototype.command351 = function() { + if (!$gameParty.inBattle()) { + SceneManager.push(Scene_Menu); + Window_MenuCommand.initCommandPosition(); + } + return true; +}; + +// Open Save Screen +Game_Interpreter.prototype.command352 = function() { + if (!$gameParty.inBattle()) { + SceneManager.push(Scene_Save); + } + return true; +}; + +// Game Over +Game_Interpreter.prototype.command353 = function() { + SceneManager.goto(Scene_Gameover); + return true; +}; + +// Return to Title Screen +Game_Interpreter.prototype.command354 = function() { + SceneManager.goto(Scene_Title); + return true; +}; + +// Script +Game_Interpreter.prototype.command355 = function() { + let script = this.currentCommand().parameters[0] + "\n"; + while (this.nextEventCode() === 655) { + this._index++; + script += this.currentCommand().parameters[0] + "\n"; + } + eval(script); + return true; +}; + +// Plugin Command MV (deprecated) +Game_Interpreter.prototype.command356 = function(params) { + const args = params[0].split(" "); + const command = args.shift(); + this.pluginCommand(command, args); + return true; +}; + +Game_Interpreter.prototype.pluginCommand = function() { + // deprecated +}; + +// Plugin Command +Game_Interpreter.prototype.command357 = function(params) { + const pluginName = Utils.extractFileName(params[0]); + PluginManager.callCommand(this, pluginName, params[1], params[3]); + return true; +}; + +//----------------------------------------------------------------------------- diff --git a/js/rmmz_scenes.js b/js/rmmz_scenes.js new file mode 100644 index 0000000..3f09fa2 --- /dev/null +++ b/js/rmmz_scenes.js @@ -0,0 +1,3583 @@ +//============================================================================= +// rmmz_scenes.js v1.4.4 +//============================================================================= + +//----------------------------------------------------------------------------- +// Scene_Base +// +// The superclass of all scenes within the game. + +function Scene_Base() { + this.initialize(...arguments); +} + +Scene_Base.prototype = Object.create(Stage.prototype); +Scene_Base.prototype.constructor = Scene_Base; + +Scene_Base.prototype.initialize = function() { + Stage.prototype.initialize.call(this); + this._started = false; + this._active = false; + this._fadeSign = 0; + this._fadeDuration = 0; + this._fadeWhite = 0; + this._fadeOpacity = 0; + this.createColorFilter(); +}; + +Scene_Base.prototype.create = function() { + // +}; + +Scene_Base.prototype.isActive = function() { + return this._active; +}; + +Scene_Base.prototype.isReady = function() { + return ( + ImageManager.isReady() && + EffectManager.isReady() && + FontManager.isReady() + ); +}; + +Scene_Base.prototype.start = function() { + this._started = true; + this._active = true; +}; + +Scene_Base.prototype.update = function() { + this.updateFade(); + this.updateColorFilter(); + this.updateChildren(); + AudioManager.checkErrors(); +}; + +Scene_Base.prototype.stop = function() { + this._active = false; +}; + +Scene_Base.prototype.isStarted = function() { + return this._started; +}; + +Scene_Base.prototype.isBusy = function() { + return this.isFading(); +}; + +Scene_Base.prototype.isFading = function() { + return this._fadeDuration > 0; +}; + +Scene_Base.prototype.terminate = function() { + // +}; + +Scene_Base.prototype.createWindowLayer = function() { + this._windowLayer = new WindowLayer(); + this._windowLayer.x = (Graphics.width - Graphics.boxWidth) / 2; + this._windowLayer.y = (Graphics.height - Graphics.boxHeight) / 2; + this.addChild(this._windowLayer); +}; + +Scene_Base.prototype.addWindow = function(window) { + this._windowLayer.addChild(window); +}; + +Scene_Base.prototype.startFadeIn = function(duration, white) { + this._fadeSign = 1; + this._fadeDuration = duration || 30; + this._fadeWhite = white; + this._fadeOpacity = 255; + this.updateColorFilter(); +}; + +Scene_Base.prototype.startFadeOut = function(duration, white) { + this._fadeSign = -1; + this._fadeDuration = duration || 30; + this._fadeWhite = white; + this._fadeOpacity = 0; + this.updateColorFilter(); +}; + +Scene_Base.prototype.createColorFilter = function() { + this._colorFilter = new ColorFilter(); + this.filters = [this._colorFilter]; +}; + +Scene_Base.prototype.updateColorFilter = function() { + const c = this._fadeWhite ? 255 : 0; + const blendColor = [c, c, c, this._fadeOpacity]; + this._colorFilter.setBlendColor(blendColor); +}; + +Scene_Base.prototype.updateFade = function() { + if (this._fadeDuration > 0) { + const d = this._fadeDuration; + if (this._fadeSign > 0) { + this._fadeOpacity -= this._fadeOpacity / d; + } else { + this._fadeOpacity += (255 - this._fadeOpacity) / d; + } + this._fadeDuration--; + } +}; + +Scene_Base.prototype.updateChildren = function() { + for (const child of this.children) { + if (child.update) { + child.update(); + } + } +}; + +Scene_Base.prototype.popScene = function() { + SceneManager.pop(); +}; + +Scene_Base.prototype.checkGameover = function() { + if ($gameParty.isAllDead()) { + SceneManager.goto(Scene_Gameover); + } +}; + +Scene_Base.prototype.fadeOutAll = function() { + const time = this.slowFadeSpeed() / 60; + AudioManager.fadeOutBgm(time); + AudioManager.fadeOutBgs(time); + AudioManager.fadeOutMe(time); + this.startFadeOut(this.slowFadeSpeed()); +}; + +Scene_Base.prototype.fadeSpeed = function() { + return 24; +}; + +Scene_Base.prototype.slowFadeSpeed = function() { + return this.fadeSpeed() * 2; +}; + +Scene_Base.prototype.scaleSprite = function(sprite) { + const ratioX = Graphics.width / sprite.bitmap.width; + const ratioY = Graphics.height / sprite.bitmap.height; + const scale = Math.max(ratioX, ratioY, 1.0); + sprite.scale.x = scale; + sprite.scale.y = scale; +}; + +Scene_Base.prototype.centerSprite = function(sprite) { + sprite.x = Graphics.width / 2; + sprite.y = Graphics.height / 2; + sprite.anchor.x = 0.5; + sprite.anchor.y = 0.5; +}; + +Scene_Base.prototype.isBottomHelpMode = function() { + return true; +}; + +Scene_Base.prototype.isBottomButtonMode = function() { + return false; +}; + +Scene_Base.prototype.isRightInputMode = function() { + return true; +}; + +Scene_Base.prototype.mainCommandWidth = function() { + return 240; +}; + +Scene_Base.prototype.buttonAreaTop = function() { + if (this.isBottomButtonMode()) { + return Graphics.boxHeight - this.buttonAreaHeight(); + } else { + return 0; + } +}; + +Scene_Base.prototype.buttonAreaBottom = function() { + return this.buttonAreaTop() + this.buttonAreaHeight(); +}; + +Scene_Base.prototype.buttonAreaHeight = function() { + return 52; +}; + +Scene_Base.prototype.buttonY = function() { + const offsetY = Math.floor((this.buttonAreaHeight() - 48) / 2); + return this.buttonAreaTop() + offsetY; +}; + +Scene_Base.prototype.calcWindowHeight = function(numLines, selectable) { + if (selectable) { + return Window_Selectable.prototype.fittingHeight(numLines); + } else { + return Window_Base.prototype.fittingHeight(numLines); + } +}; + +Scene_Base.prototype.requestAutosave = function() { + if (this.isAutosaveEnabled()) { + this.executeAutosave(); + } +}; + +Scene_Base.prototype.isAutosaveEnabled = function() { + return ( + !DataManager.isBattleTest() && + !DataManager.isEventTest() && + $gameSystem.isAutosaveEnabled() && + $gameSystem.isSaveEnabled() + ); +}; + +Scene_Base.prototype.executeAutosave = function() { + $gameSystem.onBeforeSave(); + DataManager.saveGame(0) + .then(() => this.onAutosaveSuccess()) + .catch(() => this.onAutosaveFailure()); +}; + +Scene_Base.prototype.onAutosaveSuccess = function() { + // +}; + +Scene_Base.prototype.onAutosaveFailure = function() { + // +}; + +//----------------------------------------------------------------------------- +// Scene_Boot +// +// The scene class for initializing the entire game. + +function Scene_Boot() { + this.initialize(...arguments); +} + +Scene_Boot.prototype = Object.create(Scene_Base.prototype); +Scene_Boot.prototype.constructor = Scene_Boot; + +Scene_Boot.prototype.initialize = function() { + Scene_Base.prototype.initialize.call(this); + this._databaseLoaded = false; +}; + +Scene_Boot.prototype.create = function() { + Scene_Base.prototype.create.call(this); + DataManager.loadDatabase(); + StorageManager.updateForageKeys(); +}; + +Scene_Boot.prototype.isReady = function() { + if (!this._databaseLoaded) { + if ( + DataManager.isDatabaseLoaded() && + StorageManager.forageKeysUpdated() + ) { + this._databaseLoaded = true; + this.onDatabaseLoaded(); + } + return false; + } + return Scene_Base.prototype.isReady.call(this) && this.isPlayerDataLoaded(); +}; + +Scene_Boot.prototype.onDatabaseLoaded = function() { + this.setEncryptionInfo(); + this.loadSystemImages(); + this.loadPlayerData(); + this.loadGameFonts(); +}; + +Scene_Boot.prototype.setEncryptionInfo = function() { + const hasImages = $dataSystem.hasEncryptedImages; + const hasAudio = $dataSystem.hasEncryptedAudio; + const key = $dataSystem.encryptionKey; + Utils.setEncryptionInfo(hasImages, hasAudio, key); +}; + +Scene_Boot.prototype.loadSystemImages = function() { + ColorManager.loadWindowskin(); + ImageManager.loadSystem("IconSet"); +}; + +Scene_Boot.prototype.loadPlayerData = function() { + DataManager.loadGlobalInfo(); + ConfigManager.load(); +}; + +Scene_Boot.prototype.loadGameFonts = function() { + const advanced = $dataSystem.advanced; + FontManager.load("rmmz-mainfont", advanced.mainFontFilename); + FontManager.load("rmmz-numberfont", advanced.numberFontFilename); +}; + +Scene_Boot.prototype.isPlayerDataLoaded = function() { + return DataManager.isGlobalInfoLoaded() && ConfigManager.isLoaded(); +}; + +Scene_Boot.prototype.start = function() { + Scene_Base.prototype.start.call(this); + SoundManager.preloadImportantSounds(); + if (DataManager.isBattleTest()) { + DataManager.setupBattleTest(); + SceneManager.goto(Scene_Battle); + } else if (DataManager.isEventTest()) { + DataManager.setupEventTest(); + SceneManager.goto(Scene_Map); + } else { + this.startNormalGame(); + } + this.resizeScreen(); + this.updateDocumentTitle(); +}; + +Scene_Boot.prototype.startNormalGame = function() { + this.checkPlayerLocation(); + DataManager.setupNewGame(); + SceneManager.goto(Scene_Title); + Window_TitleCommand.initCommandPosition(); +}; + +Scene_Boot.prototype.resizeScreen = function() { + const screenWidth = $dataSystem.advanced.screenWidth; + const screenHeight = $dataSystem.advanced.screenHeight; + Graphics.resize(screenWidth, screenHeight); + this.adjustBoxSize(); + this.adjustWindow(); +}; + +Scene_Boot.prototype.adjustBoxSize = function() { + const uiAreaWidth = $dataSystem.advanced.uiAreaWidth; + const uiAreaHeight = $dataSystem.advanced.uiAreaHeight; + const boxMargin = 4; + Graphics.boxWidth = uiAreaWidth - boxMargin * 2; + Graphics.boxHeight = uiAreaHeight - boxMargin * 2; +}; + +Scene_Boot.prototype.adjustWindow = function() { + if (Utils.isNwjs()) { + const xDelta = Graphics.width - window.innerWidth; + const yDelta = Graphics.height - window.innerHeight; + window.moveBy(-xDelta / 2, -yDelta / 2); + window.resizeBy(xDelta, yDelta); + } +}; + +Scene_Boot.prototype.updateDocumentTitle = function() { + document.title = $dataSystem.gameTitle; +}; + +Scene_Boot.prototype.checkPlayerLocation = function() { + if ($dataSystem.startMapId === 0) { + throw new Error("Player's starting position is not set"); + } +}; + +//----------------------------------------------------------------------------- +// Scene_Title +// +// The scene class of the title screen. + +function Scene_Title() { + this.initialize(...arguments); +} + +Scene_Title.prototype = Object.create(Scene_Base.prototype); +Scene_Title.prototype.constructor = Scene_Title; + +Scene_Title.prototype.initialize = function() { + Scene_Base.prototype.initialize.call(this); +}; + +Scene_Title.prototype.create = function() { + Scene_Base.prototype.create.call(this); + this.createBackground(); + this.createForeground(); + this.createWindowLayer(); + this.createCommandWindow(); +}; + +Scene_Title.prototype.start = function() { + Scene_Base.prototype.start.call(this); + SceneManager.clearStack(); + this.adjustBackground(); + this.playTitleMusic(); + this.startFadeIn(this.fadeSpeed(), false); +}; + +Scene_Title.prototype.update = function() { + if (!this.isBusy()) { + this._commandWindow.open(); + } + Scene_Base.prototype.update.call(this); +}; + +Scene_Title.prototype.isBusy = function() { + return ( + this._commandWindow.isClosing() || + Scene_Base.prototype.isBusy.call(this) + ); +}; + +Scene_Title.prototype.terminate = function() { + Scene_Base.prototype.terminate.call(this); + SceneManager.snapForBackground(); + if (this._gameTitleSprite) { + this._gameTitleSprite.bitmap.destroy(); + } +}; + +Scene_Title.prototype.createBackground = function() { + this._backSprite1 = new Sprite( + ImageManager.loadTitle1($dataSystem.title1Name) + ); + this._backSprite2 = new Sprite( + ImageManager.loadTitle2($dataSystem.title2Name) + ); + this.addChild(this._backSprite1); + this.addChild(this._backSprite2); +}; + +Scene_Title.prototype.createForeground = function() { + this._gameTitleSprite = new Sprite( + new Bitmap(Graphics.width, Graphics.height) + ); + this.addChild(this._gameTitleSprite); + if ($dataSystem.optDrawTitle) { + this.drawGameTitle(); + } +}; + +Scene_Title.prototype.drawGameTitle = function() { + const x = 20; + const y = Graphics.height / 4; + const maxWidth = Graphics.width - x * 2; + const text = $dataSystem.gameTitle; + const bitmap = this._gameTitleSprite.bitmap; + bitmap.fontFace = $gameSystem.mainFontFace(); + bitmap.outlineColor = "black"; + bitmap.outlineWidth = 8; + bitmap.fontSize = 72; + bitmap.drawText(text, x, y, maxWidth, 48, "center"); +}; + +Scene_Title.prototype.adjustBackground = function() { + this.scaleSprite(this._backSprite1); + this.scaleSprite(this._backSprite2); + this.centerSprite(this._backSprite1); + this.centerSprite(this._backSprite2); +}; + +Scene_Title.prototype.createCommandWindow = function() { + const background = $dataSystem.titleCommandWindow.background; + const rect = this.commandWindowRect(); + this._commandWindow = new Window_TitleCommand(rect); + this._commandWindow.setBackgroundType(background); + this._commandWindow.setHandler("newGame", this.commandNewGame.bind(this)); + this._commandWindow.setHandler("continue", this.commandContinue.bind(this)); + this._commandWindow.setHandler("options", this.commandOptions.bind(this)); + this.addWindow(this._commandWindow); +}; + +Scene_Title.prototype.commandWindowRect = function() { + const offsetX = $dataSystem.titleCommandWindow.offsetX; + const offsetY = $dataSystem.titleCommandWindow.offsetY; + const ww = this.mainCommandWidth(); + const wh = this.calcWindowHeight(3, true); + const wx = (Graphics.boxWidth - ww) / 2 + offsetX; + const wy = Graphics.boxHeight - wh - 96 + offsetY; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Title.prototype.commandNewGame = function() { + DataManager.setupNewGame(); + this._commandWindow.close(); + this.fadeOutAll(); + SceneManager.goto(Scene_Map); +}; + +Scene_Title.prototype.commandContinue = function() { + this._commandWindow.close(); + SceneManager.push(Scene_Load); +}; + +Scene_Title.prototype.commandOptions = function() { + this._commandWindow.close(); + SceneManager.push(Scene_Options); +}; + +Scene_Title.prototype.playTitleMusic = function() { + AudioManager.playBgm($dataSystem.titleBgm); + AudioManager.stopBgs(); + AudioManager.stopMe(); +}; + +//----------------------------------------------------------------------------- +// Scene_Message +// +// The superclass of Scene_Map and Scene_Battle. + +function Scene_Message() { + this.initialize(...arguments); +} + +Scene_Message.prototype = Object.create(Scene_Base.prototype); +Scene_Message.prototype.constructor = Scene_Message; + +Scene_Message.prototype.initialize = function() { + Scene_Base.prototype.initialize.call(this); +}; + +Scene_Message.prototype.isMessageWindowClosing = function() { + return this._messageWindow.isClosing(); +}; + +Scene_Message.prototype.createAllWindows = function() { + this.createMessageWindow(); + this.createScrollTextWindow(); + this.createGoldWindow(); + this.createNameBoxWindow(); + this.createChoiceListWindow(); + this.createNumberInputWindow(); + this.createEventItemWindow(); + this.associateWindows(); +}; + +Scene_Message.prototype.createMessageWindow = function() { + const rect = this.messageWindowRect(); + this._messageWindow = new Window_Message(rect); + this.addWindow(this._messageWindow); +}; + +Scene_Message.prototype.messageWindowRect = function() { + const ww = Graphics.boxWidth; + const wh = this.calcWindowHeight(4, false) + 8; + const wx = (Graphics.boxWidth - ww) / 2; + const wy = 0; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Message.prototype.createScrollTextWindow = function() { + const rect = this.scrollTextWindowRect(); + this._scrollTextWindow = new Window_ScrollText(rect); + this.addWindow(this._scrollTextWindow); +}; + +Scene_Message.prototype.scrollTextWindowRect = function() { + const wx = 0; + const wy = 0; + const ww = Graphics.boxWidth; + const wh = Graphics.boxHeight; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Message.prototype.createGoldWindow = function() { + const rect = this.goldWindowRect(); + this._goldWindow = new Window_Gold(rect); + this._goldWindow.openness = 0; + this.addWindow(this._goldWindow); +}; + +Scene_Message.prototype.goldWindowRect = function() { + const ww = this.mainCommandWidth(); + const wh = this.calcWindowHeight(1, true); + const wx = Graphics.boxWidth - ww; + const wy = 0; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Message.prototype.createNameBoxWindow = function() { + this._nameBoxWindow = new Window_NameBox(); + this.addWindow(this._nameBoxWindow); +}; + +Scene_Message.prototype.createChoiceListWindow = function() { + this._choiceListWindow = new Window_ChoiceList(); + this.addWindow(this._choiceListWindow); +}; + +Scene_Message.prototype.createNumberInputWindow = function() { + this._numberInputWindow = new Window_NumberInput(); + this.addWindow(this._numberInputWindow); +}; + +Scene_Message.prototype.createEventItemWindow = function() { + const rect = this.eventItemWindowRect(); + this._eventItemWindow = new Window_EventItem(rect); + this.addWindow(this._eventItemWindow); +}; + +Scene_Message.prototype.eventItemWindowRect = function() { + const wx = 0; + const wy = 0; + const ww = Graphics.boxWidth; + const wh = this.calcWindowHeight(4, true); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Message.prototype.associateWindows = function() { + const messageWindow = this._messageWindow; + messageWindow.setGoldWindow(this._goldWindow); + messageWindow.setNameBoxWindow(this._nameBoxWindow); + messageWindow.setChoiceListWindow(this._choiceListWindow); + messageWindow.setNumberInputWindow(this._numberInputWindow); + messageWindow.setEventItemWindow(this._eventItemWindow); + this._nameBoxWindow.setMessageWindow(messageWindow); + this._choiceListWindow.setMessageWindow(messageWindow); + this._numberInputWindow.setMessageWindow(messageWindow); + this._eventItemWindow.setMessageWindow(messageWindow); +}; + +//----------------------------------------------------------------------------- +// Scene_Map +// +// The scene class of the map screen. + +function Scene_Map() { + this.initialize(...arguments); +} + +Scene_Map.prototype = Object.create(Scene_Message.prototype); +Scene_Map.prototype.constructor = Scene_Map; + +Scene_Map.prototype.initialize = function() { + Scene_Message.prototype.initialize.call(this); + this._waitCount = 0; + this._encounterEffectDuration = 0; + this._mapLoaded = false; + this._touchCount = 0; + this._menuEnabled = false; +}; + +Scene_Map.prototype.create = function() { + Scene_Message.prototype.create.call(this); + this._transfer = $gamePlayer.isTransferring(); + this._lastMapWasNull = !$dataMap; + if (this._transfer) { + DataManager.loadMapData($gamePlayer.newMapId()); + this.onTransfer(); + } else if (!$dataMap || $dataMap.id !== $gameMap.mapId()) { + DataManager.loadMapData($gameMap.mapId()); + } +}; + +Scene_Map.prototype.isReady = function() { + if (!this._mapLoaded && DataManager.isMapLoaded()) { + this.onMapLoaded(); + this._mapLoaded = true; + } + return this._mapLoaded && Scene_Message.prototype.isReady.call(this); +}; + +Scene_Map.prototype.onMapLoaded = function() { + if (this._transfer) { + $gamePlayer.performTransfer(); + } + this.createDisplayObjects(); +}; + +Scene_Map.prototype.onTransfer = function() { + ImageManager.clear(); + EffectManager.clear(); +}; + +Scene_Map.prototype.start = function() { + Scene_Message.prototype.start.call(this); + SceneManager.clearStack(); + if (this._transfer) { + this.fadeInForTransfer(); + this.onTransferEnd(); + } else if (this.needsFadeIn()) { + this.startFadeIn(this.fadeSpeed(), false); + } + this.menuCalling = false; +}; + +Scene_Map.prototype.onTransferEnd = function() { + this._mapNameWindow.open(); + $gameMap.autoplay(); + if (this.shouldAutosave()) { + this.requestAutosave(); + } +}; + +Scene_Map.prototype.shouldAutosave = function() { + return !this._lastMapWasNull; +}; + +Scene_Map.prototype.update = function() { + Scene_Message.prototype.update.call(this); + this.updateDestination(); + this.updateMenuButton(); + this.updateMapNameWindow(); + this.updateMainMultiply(); + if (this.isSceneChangeOk()) { + this.updateScene(); + } else if (SceneManager.isNextScene(Scene_Battle)) { + this.updateEncounterEffect(); + } + this.updateWaitCount(); +}; + +Scene_Map.prototype.updateMainMultiply = function() { + if (this.isFastForward()) { + this.updateMain(); + } + this.updateMain(); +}; + +Scene_Map.prototype.updateMain = function() { + $gameMap.update(this.isActive()); + $gamePlayer.update(this.isPlayerActive()); + $gameTimer.update(this.isActive()); + $gameScreen.update(); +}; + +Scene_Map.prototype.isPlayerActive = function() { + return this.isActive() && !this.isFading(); +}; + +Scene_Map.prototype.isFastForward = function() { + return ( + $gameMap.isEventRunning() && + !SceneManager.isSceneChanging() && + (Input.isLongPressed("ok") || TouchInput.isLongPressed()) + ); +}; + +Scene_Map.prototype.stop = function() { + Scene_Message.prototype.stop.call(this); + $gamePlayer.straighten(); + this._mapNameWindow.close(); + if (this.needsSlowFadeOut()) { + this.startFadeOut(this.slowFadeSpeed(), false); + } else if (SceneManager.isNextScene(Scene_Map)) { + this.fadeOutForTransfer(); + } else if (SceneManager.isNextScene(Scene_Battle)) { + this.launchBattle(); + } +}; + +Scene_Map.prototype.isBusy = function() { + return ( + this.isMessageWindowClosing() || + this._waitCount > 0 || + this._encounterEffectDuration > 0 || + Scene_Message.prototype.isBusy.call(this) + ); +}; + +Scene_Map.prototype.terminate = function() { + Scene_Message.prototype.terminate.call(this); + if (!SceneManager.isNextScene(Scene_Battle)) { + this._spriteset.update(); + this._mapNameWindow.hide(); + this.hideMenuButton(); + SceneManager.snapForBackground(); + } + $gameScreen.clearZoom(); +}; + +Scene_Map.prototype.needsFadeIn = function() { + return ( + SceneManager.isPreviousScene(Scene_Battle) || + SceneManager.isPreviousScene(Scene_Load) + ); +}; + +Scene_Map.prototype.needsSlowFadeOut = function() { + return ( + SceneManager.isNextScene(Scene_Title) || + SceneManager.isNextScene(Scene_Gameover) + ); +}; + +Scene_Map.prototype.updateWaitCount = function() { + if (this._waitCount > 0) { + this._waitCount--; + return true; + } + return false; +}; + +Scene_Map.prototype.updateDestination = function() { + if (this.isMapTouchOk()) { + this.processMapTouch(); + } else { + $gameTemp.clearDestination(); + this._touchCount = 0; + } +}; + +Scene_Map.prototype.updateMenuButton = function() { + if (this._menuButton) { + const menuEnabled = this.isMenuEnabled(); + if (menuEnabled === this._menuEnabled) { + this._menuButton.visible = this._menuEnabled; + } else { + this._menuEnabled = menuEnabled; + } + } +}; + +Scene_Map.prototype.hideMenuButton = function() { + if (this._menuButton) { + this._menuButton.visible = false; + this._menuEnabled = false; + } +}; + +Scene_Map.prototype.updateMapNameWindow = function() { + if ($gameMessage.isBusy()) { + this._mapNameWindow.close(); + } +}; + +Scene_Map.prototype.isMenuEnabled = function() { + return $gameSystem.isMenuEnabled() && !$gameMap.isEventRunning(); +}; + +Scene_Map.prototype.isMapTouchOk = function() { + return this.isActive() && $gamePlayer.canMove(); +}; + +Scene_Map.prototype.processMapTouch = function() { + if (TouchInput.isTriggered() || this._touchCount > 0) { + if (TouchInput.isPressed() && !this.isAnyButtonPressed()) { + if (this._touchCount === 0 || this._touchCount >= 15) { + this.onMapTouch(); + } + this._touchCount++; + } else { + this._touchCount = 0; + } + } +}; + +Scene_Map.prototype.isAnyButtonPressed = function() { + return this._menuButton && this._menuButton.isPressed(); +}; + +Scene_Map.prototype.onMapTouch = function() { + const x = $gameMap.canvasToMapX(TouchInput.x); + const y = $gameMap.canvasToMapY(TouchInput.y); + $gameTemp.setDestination(x, y); +}; + +Scene_Map.prototype.isSceneChangeOk = function() { + return this.isActive() && !$gameMessage.isBusy(); +}; + +Scene_Map.prototype.updateScene = function() { + this.checkGameover(); + if (!SceneManager.isSceneChanging()) { + this.updateTransferPlayer(); + } + if (!SceneManager.isSceneChanging()) { + this.updateEncounter(); + } + if (!SceneManager.isSceneChanging()) { + this.updateCallMenu(); + } + if (!SceneManager.isSceneChanging()) { + this.updateCallDebug(); + } +}; + +Scene_Map.prototype.createDisplayObjects = function() { + this.createSpriteset(); + this.createWindowLayer(); + this.createAllWindows(); + this.createButtons(); +}; + +Scene_Map.prototype.createSpriteset = function() { + this._spriteset = new Spriteset_Map(); + this.addChild(this._spriteset); + this._spriteset.update(); +}; + +Scene_Map.prototype.createAllWindows = function() { + this.createMapNameWindow(); + Scene_Message.prototype.createAllWindows.call(this); +}; + +Scene_Map.prototype.createMapNameWindow = function() { + const rect = this.mapNameWindowRect(); + this._mapNameWindow = new Window_MapName(rect); + this.addWindow(this._mapNameWindow); +}; + +Scene_Map.prototype.mapNameWindowRect = function() { + const wx = 0; + const wy = 0; + const ww = 360; + const wh = this.calcWindowHeight(1, false); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Map.prototype.createButtons = function() { + if (ConfigManager.touchUI) { + this.createMenuButton(); + } +}; + +Scene_Map.prototype.createMenuButton = function() { + this._menuButton = new Sprite_Button("menu"); + this._menuButton.x = Graphics.boxWidth - this._menuButton.width - 4; + this._menuButton.y = this.buttonY(); + this._menuButton.visible = false; + this.addWindow(this._menuButton); +}; + +Scene_Map.prototype.updateTransferPlayer = function() { + if ($gamePlayer.isTransferring()) { + SceneManager.goto(Scene_Map); + } +}; + +Scene_Map.prototype.updateEncounter = function() { + if ($gamePlayer.executeEncounter()) { + SceneManager.push(Scene_Battle); + } +}; + +Scene_Map.prototype.updateCallMenu = function() { + if (this.isMenuEnabled()) { + if (this.isMenuCalled()) { + this.menuCalling = true; + } + if (this.menuCalling && !$gamePlayer.isMoving()) { + this.callMenu(); + } + } else { + this.menuCalling = false; + } +}; + +Scene_Map.prototype.isMenuCalled = function() { + return Input.isTriggered("menu") || TouchInput.isCancelled(); +}; + +Scene_Map.prototype.callMenu = function() { + SoundManager.playOk(); + SceneManager.push(Scene_Menu); + Window_MenuCommand.initCommandPosition(); + $gameTemp.clearDestination(); + this._mapNameWindow.hide(); + this._waitCount = 2; +}; + +Scene_Map.prototype.updateCallDebug = function() { + if (this.isDebugCalled()) { + SceneManager.push(Scene_Debug); + } +}; + +Scene_Map.prototype.isDebugCalled = function() { + return Input.isTriggered("debug") && $gameTemp.isPlaytest(); +}; + +Scene_Map.prototype.fadeInForTransfer = function() { + const fadeType = $gamePlayer.fadeType(); + switch (fadeType) { + case 0: + case 1: + this.startFadeIn(this.fadeSpeed(), fadeType === 1); + break; + } +}; + +Scene_Map.prototype.fadeOutForTransfer = function() { + const fadeType = $gamePlayer.fadeType(); + switch (fadeType) { + case 0: + case 1: + this.startFadeOut(this.fadeSpeed(), fadeType === 1); + break; + } +}; + +Scene_Map.prototype.launchBattle = function() { + BattleManager.saveBgmAndBgs(); + this.stopAudioOnBattleStart(); + SoundManager.playBattleStart(); + this.startEncounterEffect(); + this._mapNameWindow.hide(); +}; + +Scene_Map.prototype.stopAudioOnBattleStart = function() { + if (!AudioManager.isCurrentBgm($gameSystem.battleBgm())) { + AudioManager.stopBgm(); + } + AudioManager.stopBgs(); + AudioManager.stopMe(); + AudioManager.stopSe(); +}; + +Scene_Map.prototype.startEncounterEffect = function() { + this._spriteset.hideCharacters(); + this._encounterEffectDuration = this.encounterEffectSpeed(); +}; + +Scene_Map.prototype.updateEncounterEffect = function() { + if (this._encounterEffectDuration > 0) { + this._encounterEffectDuration--; + const speed = this.encounterEffectSpeed(); + const n = speed - this._encounterEffectDuration; + const p = n / speed; + const q = ((p - 1) * 20 * p + 5) * p + 1; + const zoomX = $gamePlayer.screenX(); + const zoomY = $gamePlayer.screenY() - 24; + if (n === 2) { + $gameScreen.setZoom(zoomX, zoomY, 1); + this.snapForBattleBackground(); + this.startFlashForEncounter(speed / 2); + } + $gameScreen.setZoom(zoomX, zoomY, q); + if (n === Math.floor(speed / 6)) { + this.startFlashForEncounter(speed / 2); + } + if (n === Math.floor(speed / 2)) { + BattleManager.playBattleBgm(); + this.startFadeOut(this.fadeSpeed()); + } + } +}; + +Scene_Map.prototype.snapForBattleBackground = function() { + this._windowLayer.visible = false; + SceneManager.snapForBackground(); + this._windowLayer.visible = true; +}; + +Scene_Map.prototype.startFlashForEncounter = function(duration) { + const color = [255, 255, 255, 255]; + $gameScreen.startFlash(color, duration); +}; + +Scene_Map.prototype.encounterEffectSpeed = function() { + return 60; +}; + +//----------------------------------------------------------------------------- +// Scene_MenuBase +// +// The superclass of all the menu-type scenes. + +function Scene_MenuBase() { + this.initialize(...arguments); +} + +Scene_MenuBase.prototype = Object.create(Scene_Base.prototype); +Scene_MenuBase.prototype.constructor = Scene_MenuBase; + +Scene_MenuBase.prototype.initialize = function() { + Scene_Base.prototype.initialize.call(this); +}; + +Scene_MenuBase.prototype.create = function() { + Scene_Base.prototype.create.call(this); + this.createBackground(); + this.updateActor(); + this.createWindowLayer(); + this.createButtons(); +}; + +Scene_MenuBase.prototype.update = function() { + Scene_Base.prototype.update.call(this); + this.updatePageButtons(); +}; + +Scene_MenuBase.prototype.helpAreaTop = function() { + if (this.isBottomHelpMode()) { + return this.mainAreaBottom(); + } else if (this.isBottomButtonMode()) { + return 0; + } else { + return this.buttonAreaBottom(); + } +}; + +Scene_MenuBase.prototype.helpAreaBottom = function() { + return this.helpAreaTop() + this.helpAreaHeight(); +}; + +Scene_MenuBase.prototype.helpAreaHeight = function() { + return this.calcWindowHeight(2, false); +}; + +Scene_MenuBase.prototype.mainAreaTop = function() { + if (!this.isBottomHelpMode()) { + return this.helpAreaBottom(); + } else if (this.isBottomButtonMode()) { + return 0; + } else { + return this.buttonAreaBottom(); + } +}; + +Scene_MenuBase.prototype.mainAreaBottom = function() { + return this.mainAreaTop() + this.mainAreaHeight(); +}; + +Scene_MenuBase.prototype.mainAreaHeight = function() { + return Graphics.boxHeight - this.buttonAreaHeight() - this.helpAreaHeight(); +}; + +Scene_MenuBase.prototype.actor = function() { + return this._actor; +}; + +Scene_MenuBase.prototype.updateActor = function() { + this._actor = $gameParty.menuActor(); +}; + +Scene_MenuBase.prototype.createBackground = function() { + this._backgroundFilter = new PIXI.filters.BlurFilter(); + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = SceneManager.backgroundBitmap(); + this._backgroundSprite.filters = [this._backgroundFilter]; + this.addChild(this._backgroundSprite); + this.setBackgroundOpacity(192); +}; + +Scene_MenuBase.prototype.setBackgroundOpacity = function(opacity) { + this._backgroundSprite.opacity = opacity; +}; + +Scene_MenuBase.prototype.createHelpWindow = function() { + const rect = this.helpWindowRect(); + this._helpWindow = new Window_Help(rect); + this.addWindow(this._helpWindow); +}; + +Scene_MenuBase.prototype.helpWindowRect = function() { + const wx = 0; + const wy = this.helpAreaTop(); + const ww = Graphics.boxWidth; + const wh = this.helpAreaHeight(); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_MenuBase.prototype.createButtons = function() { + if (ConfigManager.touchUI) { + if (this.needsCancelButton()) { + this.createCancelButton(); + } + if (this.needsPageButtons()) { + this.createPageButtons(); + } + } +}; + +Scene_MenuBase.prototype.needsCancelButton = function() { + return true; +}; + +Scene_MenuBase.prototype.createCancelButton = function() { + this._cancelButton = new Sprite_Button("cancel"); + this._cancelButton.x = Graphics.boxWidth - this._cancelButton.width - 4; + this._cancelButton.y = this.buttonY(); + this.addWindow(this._cancelButton); +}; + +Scene_MenuBase.prototype.needsPageButtons = function() { + return false; +}; + +Scene_MenuBase.prototype.createPageButtons = function() { + this._pageupButton = new Sprite_Button("pageup"); + this._pageupButton.x = 4; + this._pageupButton.y = this.buttonY(); + const pageupRight = this._pageupButton.x + this._pageupButton.width; + this._pagedownButton = new Sprite_Button("pagedown"); + this._pagedownButton.x = pageupRight + 4; + this._pagedownButton.y = this.buttonY(); + this.addWindow(this._pageupButton); + this.addWindow(this._pagedownButton); + this._pageupButton.setClickHandler(this.previousActor.bind(this)); + this._pagedownButton.setClickHandler(this.nextActor.bind(this)); +}; + +Scene_MenuBase.prototype.updatePageButtons = function() { + if (this._pageupButton && this._pagedownButton) { + const enabled = this.arePageButtonsEnabled(); + this._pageupButton.visible = enabled; + this._pagedownButton.visible = enabled; + } +}; + +Scene_MenuBase.prototype.arePageButtonsEnabled = function() { + return true; +}; + +Scene_MenuBase.prototype.nextActor = function() { + $gameParty.makeMenuActorNext(); + this.updateActor(); + this.onActorChange(); +}; + +Scene_MenuBase.prototype.previousActor = function() { + $gameParty.makeMenuActorPrevious(); + this.updateActor(); + this.onActorChange(); +}; + +Scene_MenuBase.prototype.onActorChange = function() { + SoundManager.playCursor(); +}; + +//----------------------------------------------------------------------------- +// Scene_Menu +// +// The scene class of the menu screen. + +function Scene_Menu() { + this.initialize(...arguments); +} + +Scene_Menu.prototype = Object.create(Scene_MenuBase.prototype); +Scene_Menu.prototype.constructor = Scene_Menu; + +Scene_Menu.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_Menu.prototype.helpAreaHeight = function() { + return 0; +}; + +Scene_Menu.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this.createCommandWindow(); + this.createGoldWindow(); + this.createStatusWindow(); +}; + +Scene_Menu.prototype.start = function() { + Scene_MenuBase.prototype.start.call(this); + this._statusWindow.refresh(); +}; + +Scene_Menu.prototype.createCommandWindow = function() { + const rect = this.commandWindowRect(); + const commandWindow = new Window_MenuCommand(rect); + commandWindow.setHandler("item", this.commandItem.bind(this)); + commandWindow.setHandler("skill", this.commandPersonal.bind(this)); + commandWindow.setHandler("equip", this.commandPersonal.bind(this)); + commandWindow.setHandler("status", this.commandPersonal.bind(this)); + commandWindow.setHandler("formation", this.commandFormation.bind(this)); + commandWindow.setHandler("options", this.commandOptions.bind(this)); + commandWindow.setHandler("save", this.commandSave.bind(this)); + commandWindow.setHandler("gameEnd", this.commandGameEnd.bind(this)); + commandWindow.setHandler("cancel", this.popScene.bind(this)); + this.addWindow(commandWindow); + this._commandWindow = commandWindow; +}; + +Scene_Menu.prototype.commandWindowRect = function() { + const ww = this.mainCommandWidth(); + const wh = this.mainAreaHeight() - this.goldWindowRect().height; + const wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0; + const wy = this.mainAreaTop(); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Menu.prototype.createGoldWindow = function() { + const rect = this.goldWindowRect(); + this._goldWindow = new Window_Gold(rect); + this.addWindow(this._goldWindow); +}; + +Scene_Menu.prototype.goldWindowRect = function() { + const ww = this.mainCommandWidth(); + const wh = this.calcWindowHeight(1, true); + const wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0; + const wy = this.mainAreaBottom() - wh; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Menu.prototype.createStatusWindow = function() { + const rect = this.statusWindowRect(); + this._statusWindow = new Window_MenuStatus(rect); + this.addWindow(this._statusWindow); +}; + +Scene_Menu.prototype.statusWindowRect = function() { + const ww = Graphics.boxWidth - this.mainCommandWidth(); + const wh = this.mainAreaHeight(); + const wx = this.isRightInputMode() ? 0 : Graphics.boxWidth - ww; + const wy = this.mainAreaTop(); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Menu.prototype.commandItem = function() { + SceneManager.push(Scene_Item); +}; + +Scene_Menu.prototype.commandPersonal = function() { + this._statusWindow.setFormationMode(false); + this._statusWindow.selectLast(); + this._statusWindow.activate(); + this._statusWindow.setHandler("ok", this.onPersonalOk.bind(this)); + this._statusWindow.setHandler("cancel", this.onPersonalCancel.bind(this)); +}; + +Scene_Menu.prototype.commandFormation = function() { + this._statusWindow.setFormationMode(true); + this._statusWindow.selectLast(); + this._statusWindow.activate(); + this._statusWindow.setHandler("ok", this.onFormationOk.bind(this)); + this._statusWindow.setHandler("cancel", this.onFormationCancel.bind(this)); +}; + +Scene_Menu.prototype.commandOptions = function() { + SceneManager.push(Scene_Options); +}; + +Scene_Menu.prototype.commandSave = function() { + SceneManager.push(Scene_Save); +}; + +Scene_Menu.prototype.commandGameEnd = function() { + SceneManager.push(Scene_GameEnd); +}; + +Scene_Menu.prototype.onPersonalOk = function() { + switch (this._commandWindow.currentSymbol()) { + case "skill": + SceneManager.push(Scene_Skill); + break; + case "equip": + SceneManager.push(Scene_Equip); + break; + case "status": + SceneManager.push(Scene_Status); + break; + } +}; + +Scene_Menu.prototype.onPersonalCancel = function() { + this._statusWindow.deselect(); + this._commandWindow.activate(); +}; + +Scene_Menu.prototype.onFormationOk = function() { + const index = this._statusWindow.index(); + const pendingIndex = this._statusWindow.pendingIndex(); + if (pendingIndex >= 0) { + $gameParty.swapOrder(index, pendingIndex); + this._statusWindow.setPendingIndex(-1); + this._statusWindow.redrawItem(index); + } else { + this._statusWindow.setPendingIndex(index); + } + this._statusWindow.activate(); +}; + +Scene_Menu.prototype.onFormationCancel = function() { + if (this._statusWindow.pendingIndex() >= 0) { + this._statusWindow.setPendingIndex(-1); + this._statusWindow.activate(); + } else { + this._statusWindow.deselect(); + this._commandWindow.activate(); + } +}; + +//----------------------------------------------------------------------------- +// Scene_ItemBase +// +// The superclass of Scene_Item and Scene_Skill. + +function Scene_ItemBase() { + this.initialize(...arguments); +} + +Scene_ItemBase.prototype = Object.create(Scene_MenuBase.prototype); +Scene_ItemBase.prototype.constructor = Scene_ItemBase; + +Scene_ItemBase.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_ItemBase.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); +}; + +Scene_ItemBase.prototype.createActorWindow = function() { + const rect = this.actorWindowRect(); + this._actorWindow = new Window_MenuActor(rect); + this._actorWindow.setHandler("ok", this.onActorOk.bind(this)); + this._actorWindow.setHandler("cancel", this.onActorCancel.bind(this)); + this.addWindow(this._actorWindow); +}; + +Scene_ItemBase.prototype.actorWindowRect = function() { + const wx = 0; + const wy = Math.min(this.mainAreaTop(), this.helpAreaTop()); + const ww = Graphics.boxWidth - this.mainCommandWidth(); + const wh = this.mainAreaHeight() + this.helpAreaHeight(); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_ItemBase.prototype.item = function() { + return this._itemWindow.item(); +}; + +Scene_ItemBase.prototype.user = function() { + return null; +}; + +Scene_ItemBase.prototype.isCursorLeft = function() { + return this._itemWindow.index() % 2 === 0; +}; + +Scene_ItemBase.prototype.showActorWindow = function() { + if (this.isCursorLeft()) { + this._actorWindow.x = Graphics.boxWidth - this._actorWindow.width; + } else { + this._actorWindow.x = 0; + } + this._actorWindow.show(); + this._actorWindow.activate(); +}; + +Scene_ItemBase.prototype.hideActorWindow = function() { + this._actorWindow.hide(); + this._actorWindow.deactivate(); +}; + +Scene_ItemBase.prototype.isActorWindowActive = function() { + return this._actorWindow && this._actorWindow.active; +}; + +Scene_ItemBase.prototype.onActorOk = function() { + if (this.canUse()) { + this.useItem(); + } else { + SoundManager.playBuzzer(); + } +}; + +Scene_ItemBase.prototype.onActorCancel = function() { + this.hideActorWindow(); + this.activateItemWindow(); +}; + +Scene_ItemBase.prototype.determineItem = function() { + const action = new Game_Action(this.user()); + const item = this.item(); + action.setItemObject(item); + if (action.isForFriend()) { + this.showActorWindow(); + this._actorWindow.selectForItem(this.item()); + } else { + this.useItem(); + this.activateItemWindow(); + } +}; + +Scene_ItemBase.prototype.useItem = function() { + this.playSeForItem(); + this.user().useItem(this.item()); + this.applyItem(); + this.checkCommonEvent(); + this.checkGameover(); + this._actorWindow.refresh(); +}; + +Scene_ItemBase.prototype.activateItemWindow = function() { + this._itemWindow.refresh(); + this._itemWindow.activate(); +}; + +Scene_ItemBase.prototype.itemTargetActors = function() { + const action = new Game_Action(this.user()); + action.setItemObject(this.item()); + if (!action.isForFriend()) { + return []; + } else if (action.isForAll()) { + return $gameParty.members(); + } else { + return [$gameParty.members()[this._actorWindow.index()]]; + } +}; + +Scene_ItemBase.prototype.canUse = function() { + const user = this.user(); + return user && user.canUse(this.item()) && this.isItemEffectsValid(); +}; + +Scene_ItemBase.prototype.isItemEffectsValid = function() { + const action = new Game_Action(this.user()); + action.setItemObject(this.item()); + return this.itemTargetActors().some(target => action.testApply(target)); +}; + +Scene_ItemBase.prototype.applyItem = function() { + const action = new Game_Action(this.user()); + action.setItemObject(this.item()); + for (const target of this.itemTargetActors()) { + for (let i = 0; i < action.numRepeats(); i++) { + action.apply(target); + } + } + action.applyGlobal(); +}; + +Scene_ItemBase.prototype.checkCommonEvent = function() { + if ($gameTemp.isCommonEventReserved()) { + SceneManager.goto(Scene_Map); + } +}; + +//----------------------------------------------------------------------------- +// Scene_Item +// +// The scene class of the item screen. + +function Scene_Item() { + this.initialize(...arguments); +} + +Scene_Item.prototype = Object.create(Scene_ItemBase.prototype); +Scene_Item.prototype.constructor = Scene_Item; + +Scene_Item.prototype.initialize = function() { + Scene_ItemBase.prototype.initialize.call(this); +}; + +Scene_Item.prototype.create = function() { + Scene_ItemBase.prototype.create.call(this); + this.createHelpWindow(); + this.createCategoryWindow(); + this.createItemWindow(); + this.createActorWindow(); +}; + +Scene_Item.prototype.createCategoryWindow = function() { + const rect = this.categoryWindowRect(); + this._categoryWindow = new Window_ItemCategory(rect); + this._categoryWindow.setHelpWindow(this._helpWindow); + this._categoryWindow.setHandler("ok", this.onCategoryOk.bind(this)); + this._categoryWindow.setHandler("cancel", this.popScene.bind(this)); + this.addWindow(this._categoryWindow); +}; + +Scene_Item.prototype.categoryWindowRect = function() { + const wx = 0; + const wy = this.mainAreaTop(); + const ww = Graphics.boxWidth; + const wh = this.calcWindowHeight(1, true); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Item.prototype.createItemWindow = function() { + const rect = this.itemWindowRect(); + this._itemWindow = new Window_ItemList(rect); + this._itemWindow.setHelpWindow(this._helpWindow); + this._itemWindow.setHandler("ok", this.onItemOk.bind(this)); + this._itemWindow.setHandler("cancel", this.onItemCancel.bind(this)); + this.addWindow(this._itemWindow); + this._categoryWindow.setItemWindow(this._itemWindow); + if (!this._categoryWindow.needsSelection()) { + this._itemWindow.y -= this._categoryWindow.height; + this._itemWindow.height += this._categoryWindow.height; + this._itemWindow.createContents(); + this._categoryWindow.update(); + this._categoryWindow.hide(); + this._categoryWindow.deactivate(); + this.onCategoryOk(); + } +}; + +Scene_Item.prototype.itemWindowRect = function() { + const wx = 0; + const wy = this._categoryWindow.y + this._categoryWindow.height; + const ww = Graphics.boxWidth; + const wh = this.mainAreaBottom() - wy; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Item.prototype.user = function() { + const members = $gameParty.movableMembers(); + const bestPha = Math.max(...members.map(member => member.pha)); + return members.find(member => member.pha === bestPha); +}; + +Scene_Item.prototype.onCategoryOk = function() { + this._itemWindow.activate(); + this._itemWindow.selectLast(); +}; + +Scene_Item.prototype.onItemOk = function() { + $gameParty.setLastItem(this.item()); + this.determineItem(); +}; + +Scene_Item.prototype.onItemCancel = function() { + if (this._categoryWindow.needsSelection()) { + this._itemWindow.deselect(); + this._categoryWindow.activate(); + } else { + this.popScene(); + } +}; + +Scene_Item.prototype.playSeForItem = function() { + SoundManager.playUseItem(); +}; + +Scene_Item.prototype.useItem = function() { + Scene_ItemBase.prototype.useItem.call(this); + this._itemWindow.redrawCurrentItem(); +}; + +//----------------------------------------------------------------------------- +// Scene_Skill +// +// The scene class of the skill screen. + +function Scene_Skill() { + this.initialize(...arguments); +} + +Scene_Skill.prototype = Object.create(Scene_ItemBase.prototype); +Scene_Skill.prototype.constructor = Scene_Skill; + +Scene_Skill.prototype.initialize = function() { + Scene_ItemBase.prototype.initialize.call(this); +}; + +Scene_Skill.prototype.create = function() { + Scene_ItemBase.prototype.create.call(this); + this.createHelpWindow(); + this.createSkillTypeWindow(); + this.createStatusWindow(); + this.createItemWindow(); + this.createActorWindow(); +}; + +Scene_Skill.prototype.start = function() { + Scene_ItemBase.prototype.start.call(this); + this.refreshActor(); +}; + +Scene_Skill.prototype.createSkillTypeWindow = function() { + const rect = this.skillTypeWindowRect(); + this._skillTypeWindow = new Window_SkillType(rect); + this._skillTypeWindow.setHelpWindow(this._helpWindow); + this._skillTypeWindow.setHandler("skill", this.commandSkill.bind(this)); + this._skillTypeWindow.setHandler("cancel", this.popScene.bind(this)); + this._skillTypeWindow.setHandler("pagedown", this.nextActor.bind(this)); + this._skillTypeWindow.setHandler("pageup", this.previousActor.bind(this)); + this.addWindow(this._skillTypeWindow); +}; + +Scene_Skill.prototype.skillTypeWindowRect = function() { + const ww = this.mainCommandWidth(); + const wh = this.calcWindowHeight(3, true); + const wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0; + const wy = this.mainAreaTop(); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Skill.prototype.createStatusWindow = function() { + const rect = this.statusWindowRect(); + this._statusWindow = new Window_SkillStatus(rect); + this.addWindow(this._statusWindow); +}; + +Scene_Skill.prototype.statusWindowRect = function() { + const ww = Graphics.boxWidth - this.mainCommandWidth(); + const wh = this._skillTypeWindow.height; + const wx = this.isRightInputMode() ? 0 : Graphics.boxWidth - ww; + const wy = this.mainAreaTop(); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Skill.prototype.createItemWindow = function() { + const rect = this.itemWindowRect(); + this._itemWindow = new Window_SkillList(rect); + this._itemWindow.setHelpWindow(this._helpWindow); + this._itemWindow.setHandler("ok", this.onItemOk.bind(this)); + this._itemWindow.setHandler("cancel", this.onItemCancel.bind(this)); + this._skillTypeWindow.setSkillWindow(this._itemWindow); + this.addWindow(this._itemWindow); +}; + +Scene_Skill.prototype.itemWindowRect = function() { + const wx = 0; + const wy = this._statusWindow.y + this._statusWindow.height; + const ww = Graphics.boxWidth; + const wh = this.mainAreaHeight() - this._statusWindow.height; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Skill.prototype.needsPageButtons = function() { + return true; +}; + +Scene_Skill.prototype.arePageButtonsEnabled = function() { + return !this.isActorWindowActive(); +}; + +Scene_Skill.prototype.refreshActor = function() { + const actor = this.actor(); + this._skillTypeWindow.setActor(actor); + this._statusWindow.setActor(actor); + this._itemWindow.setActor(actor); +}; + +Scene_Skill.prototype.user = function() { + return this.actor(); +}; + +Scene_Skill.prototype.commandSkill = function() { + this._itemWindow.activate(); + this._itemWindow.selectLast(); +}; + +Scene_Skill.prototype.onItemOk = function() { + this.actor().setLastMenuSkill(this.item()); + this.determineItem(); +}; + +Scene_Skill.prototype.onItemCancel = function() { + this._itemWindow.deselect(); + this._skillTypeWindow.activate(); +}; + +Scene_Skill.prototype.playSeForItem = function() { + SoundManager.playUseSkill(); +}; + +Scene_Skill.prototype.useItem = function() { + Scene_ItemBase.prototype.useItem.call(this); + this._statusWindow.refresh(); + this._itemWindow.refresh(); +}; + +Scene_Skill.prototype.onActorChange = function() { + Scene_MenuBase.prototype.onActorChange.call(this); + this.refreshActor(); + this._itemWindow.deselect(); + this._skillTypeWindow.activate(); +}; + +//----------------------------------------------------------------------------- +// Scene_Equip +// +// The scene class of the equipment screen. + +function Scene_Equip() { + this.initialize(...arguments); +} + +Scene_Equip.prototype = Object.create(Scene_MenuBase.prototype); +Scene_Equip.prototype.constructor = Scene_Equip; + +Scene_Equip.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_Equip.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this.createHelpWindow(); + this.createStatusWindow(); + this.createCommandWindow(); + this.createSlotWindow(); + this.createItemWindow(); + this.refreshActor(); +}; + +Scene_Equip.prototype.createStatusWindow = function() { + const rect = this.statusWindowRect(); + this._statusWindow = new Window_EquipStatus(rect); + this.addWindow(this._statusWindow); +}; + +Scene_Equip.prototype.statusWindowRect = function() { + const wx = 0; + const wy = this.mainAreaTop(); + const ww = this.statusWidth(); + const wh = this.mainAreaHeight(); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Equip.prototype.createCommandWindow = function() { + const rect = this.commandWindowRect(); + this._commandWindow = new Window_EquipCommand(rect); + this._commandWindow.setHelpWindow(this._helpWindow); + this._commandWindow.setHandler("equip", this.commandEquip.bind(this)); + this._commandWindow.setHandler("optimize", this.commandOptimize.bind(this)); + this._commandWindow.setHandler("clear", this.commandClear.bind(this)); + this._commandWindow.setHandler("cancel", this.popScene.bind(this)); + this._commandWindow.setHandler("pagedown", this.nextActor.bind(this)); + this._commandWindow.setHandler("pageup", this.previousActor.bind(this)); + this.addWindow(this._commandWindow); +}; + +Scene_Equip.prototype.commandWindowRect = function() { + const wx = this.statusWidth(); + const wy = this.mainAreaTop(); + const ww = Graphics.boxWidth - this.statusWidth(); + const wh = this.calcWindowHeight(1, true); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Equip.prototype.createSlotWindow = function() { + const rect = this.slotWindowRect(); + this._slotWindow = new Window_EquipSlot(rect); + this._slotWindow.setHelpWindow(this._helpWindow); + this._slotWindow.setStatusWindow(this._statusWindow); + this._slotWindow.setHandler("ok", this.onSlotOk.bind(this)); + this._slotWindow.setHandler("cancel", this.onSlotCancel.bind(this)); + this.addWindow(this._slotWindow); +}; + +Scene_Equip.prototype.slotWindowRect = function() { + const commandWindowRect = this.commandWindowRect(); + const wx = this.statusWidth(); + const wy = commandWindowRect.y + commandWindowRect.height; + const ww = Graphics.boxWidth - this.statusWidth(); + const wh = this.mainAreaHeight() - commandWindowRect.height; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Equip.prototype.createItemWindow = function() { + const rect = this.itemWindowRect(); + this._itemWindow = new Window_EquipItem(rect); + this._itemWindow.setHelpWindow(this._helpWindow); + this._itemWindow.setStatusWindow(this._statusWindow); + this._itemWindow.setHandler("ok", this.onItemOk.bind(this)); + this._itemWindow.setHandler("cancel", this.onItemCancel.bind(this)); + this._itemWindow.hide(); + this._slotWindow.setItemWindow(this._itemWindow); + this.addWindow(this._itemWindow); +}; + +Scene_Equip.prototype.itemWindowRect = function() { + return this.slotWindowRect(); +}; + +Scene_Equip.prototype.statusWidth = function() { + return 312; +}; + +Scene_Equip.prototype.needsPageButtons = function() { + return true; +}; + +Scene_Equip.prototype.arePageButtonsEnabled = function() { + return !(this._itemWindow && this._itemWindow.active); +}; + +Scene_Equip.prototype.refreshActor = function() { + const actor = this.actor(); + this._statusWindow.setActor(actor); + this._slotWindow.setActor(actor); + this._itemWindow.setActor(actor); +}; + +Scene_Equip.prototype.commandEquip = function() { + this._slotWindow.activate(); + this._slotWindow.select(0); +}; + +Scene_Equip.prototype.commandOptimize = function() { + SoundManager.playEquip(); + this.actor().optimizeEquipments(); + this._statusWindow.refresh(); + this._slotWindow.refresh(); + this._commandWindow.activate(); +}; + +Scene_Equip.prototype.commandClear = function() { + SoundManager.playEquip(); + this.actor().clearEquipments(); + this._statusWindow.refresh(); + this._slotWindow.refresh(); + this._commandWindow.activate(); +}; + +Scene_Equip.prototype.onSlotOk = function() { + this._slotWindow.hide(); + this._itemWindow.show(); + this._itemWindow.activate(); + this._itemWindow.select(0); +}; + +Scene_Equip.prototype.onSlotCancel = function() { + this._slotWindow.deselect(); + this._commandWindow.activate(); +}; + +Scene_Equip.prototype.onItemOk = function() { + SoundManager.playEquip(); + this.executeEquipChange(); + this.hideItemWindow(); + this._slotWindow.refresh(); + this._itemWindow.refresh(); + this._statusWindow.refresh(); +}; + +Scene_Equip.prototype.executeEquipChange = function() { + const actor = this.actor(); + const slotId = this._slotWindow.index(); + const item = this._itemWindow.item(); + actor.changeEquip(slotId, item); +}; + +Scene_Equip.prototype.onItemCancel = function() { + this.hideItemWindow(); +}; + +Scene_Equip.prototype.onActorChange = function() { + Scene_MenuBase.prototype.onActorChange.call(this); + this.refreshActor(); + this.hideItemWindow(); + this._slotWindow.deselect(); + this._slotWindow.deactivate(); + this._commandWindow.activate(); +}; + +Scene_Equip.prototype.hideItemWindow = function() { + this._slotWindow.show(); + this._slotWindow.activate(); + this._itemWindow.hide(); + this._itemWindow.deselect(); +}; + +//----------------------------------------------------------------------------- +// Scene_Status +// +// The scene class of the status screen. + +function Scene_Status() { + this.initialize(...arguments); +} + +Scene_Status.prototype = Object.create(Scene_MenuBase.prototype); +Scene_Status.prototype.constructor = Scene_Status; + +Scene_Status.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_Status.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this.createProfileWindow(); + this.createStatusWindow(); + this.createStatusParamsWindow(); + this.createStatusEquipWindow(); +}; + +Scene_Status.prototype.helpAreaHeight = function() { + return 0; +}; + +Scene_Status.prototype.createProfileWindow = function() { + const rect = this.profileWindowRect(); + this._profileWindow = new Window_Help(rect); + this.addWindow(this._profileWindow); +}; + +Scene_Status.prototype.profileWindowRect = function() { + const ww = Graphics.boxWidth; + const wh = this.profileHeight(); + const wx = 0; + const wy = this.mainAreaBottom() - wh; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Status.prototype.createStatusWindow = function() { + const rect = this.statusWindowRect(); + this._statusWindow = new Window_Status(rect); + this._statusWindow.setHandler("cancel", this.popScene.bind(this)); + this._statusWindow.setHandler("pagedown", this.nextActor.bind(this)); + this._statusWindow.setHandler("pageup", this.previousActor.bind(this)); + this.addWindow(this._statusWindow); +}; + +Scene_Status.prototype.statusWindowRect = function() { + const wx = 0; + const wy = this.mainAreaTop(); + const ww = Graphics.boxWidth; + const wh = this.statusParamsWindowRect().y - wy; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Status.prototype.createStatusParamsWindow = function() { + const rect = this.statusParamsWindowRect(); + this._statusParamsWindow = new Window_StatusParams(rect); + this.addWindow(this._statusParamsWindow); +}; + +Scene_Status.prototype.statusParamsWindowRect = function() { + const ww = this.statusParamsWidth(); + const wh = this.statusParamsHeight(); + const wx = 0; + const wy = this.mainAreaBottom() - this.profileHeight() - wh; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Status.prototype.createStatusEquipWindow = function() { + const rect = this.statusEquipWindowRect(); + this._statusEquipWindow = new Window_StatusEquip(rect); + this.addWindow(this._statusEquipWindow); +}; + +Scene_Status.prototype.statusEquipWindowRect = function() { + const ww = Graphics.boxWidth - this.statusParamsWidth(); + const wh = this.statusParamsHeight(); + const wx = this.statusParamsWidth(); + const wy = this.mainAreaBottom() - this.profileHeight() - wh; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Status.prototype.statusParamsWidth = function() { + return 300; +}; + +Scene_Status.prototype.statusParamsHeight = function() { + return this.calcWindowHeight(6, false); +}; + +Scene_Status.prototype.profileHeight = function() { + return this.calcWindowHeight(2, false); +}; + +Scene_Status.prototype.start = function() { + Scene_MenuBase.prototype.start.call(this); + this.refreshActor(); +}; + +Scene_Status.prototype.needsPageButtons = function() { + return true; +}; + +Scene_Status.prototype.refreshActor = function() { + const actor = this.actor(); + this._profileWindow.setText(actor.profile()); + this._statusWindow.setActor(actor); + this._statusParamsWindow.setActor(actor); + this._statusEquipWindow.setActor(actor); +}; + +Scene_Status.prototype.onActorChange = function() { + Scene_MenuBase.prototype.onActorChange.call(this); + this.refreshActor(); + this._statusWindow.activate(); +}; + +//----------------------------------------------------------------------------- +// Scene_Options +// +// The scene class of the options screen. + +function Scene_Options() { + this.initialize(...arguments); +} + +Scene_Options.prototype = Object.create(Scene_MenuBase.prototype); +Scene_Options.prototype.constructor = Scene_Options; + +Scene_Options.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_Options.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this.createOptionsWindow(); +}; + +Scene_Options.prototype.terminate = function() { + Scene_MenuBase.prototype.terminate.call(this); + ConfigManager.save(); +}; + +Scene_Options.prototype.createOptionsWindow = function() { + const rect = this.optionsWindowRect(); + this._optionsWindow = new Window_Options(rect); + this._optionsWindow.setHandler("cancel", this.popScene.bind(this)); + this.addWindow(this._optionsWindow); +}; + +Scene_Options.prototype.optionsWindowRect = function() { + const n = Math.min(this.maxCommands(), this.maxVisibleCommands()); + const ww = 400; + const wh = this.calcWindowHeight(n, true); + const wx = (Graphics.boxWidth - ww) / 2; + const wy = (Graphics.boxHeight - wh) / 2; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Options.prototype.maxCommands = function() { + // Increase this value when adding option items. + return 7; +}; + +Scene_Options.prototype.maxVisibleCommands = function() { + return 12; +}; + +//----------------------------------------------------------------------------- +// Scene_File +// +// The superclass of Scene_Save and Scene_Load. + +function Scene_File() { + this.initialize(...arguments); +} + +Scene_File.prototype = Object.create(Scene_MenuBase.prototype); +Scene_File.prototype.constructor = Scene_File; + +Scene_File.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_File.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + DataManager.loadAllSavefileImages(); + this.createHelpWindow(); + this.createListWindow(); + this._helpWindow.setText(this.helpWindowText()); +}; + +Scene_File.prototype.helpAreaHeight = function() { + return 0; +}; + +Scene_File.prototype.start = function() { + Scene_MenuBase.prototype.start.call(this); + this._listWindow.refresh(); +}; + +Scene_File.prototype.savefileId = function() { + return this._listWindow.savefileId(); +}; + +Scene_File.prototype.isSavefileEnabled = function(savefileId) { + return this._listWindow.isEnabled(savefileId); +}; + +Scene_File.prototype.createHelpWindow = function() { + const rect = this.helpWindowRect(); + this._helpWindow = new Window_Help(rect); + this.addWindow(this._helpWindow); +}; + +Scene_File.prototype.helpWindowRect = function() { + const wx = 0; + const wy = this.mainAreaTop(); + const ww = Graphics.boxWidth; + const wh = this.calcWindowHeight(1, false); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_File.prototype.createListWindow = function() { + const rect = this.listWindowRect(); + this._listWindow = new Window_SavefileList(rect); + this._listWindow.setHandler("ok", this.onSavefileOk.bind(this)); + this._listWindow.setHandler("cancel", this.popScene.bind(this)); + this._listWindow.setMode(this.mode(), this.needsAutosave()); + this._listWindow.selectSavefile(this.firstSavefileId()); + this._listWindow.refresh(); + this.addWindow(this._listWindow); +}; + +Scene_File.prototype.listWindowRect = function() { + const wx = 0; + const wy = this.mainAreaTop() + this._helpWindow.height; + const ww = Graphics.boxWidth; + const wh = this.mainAreaHeight() - this._helpWindow.height; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_File.prototype.mode = function() { + return null; +}; + +Scene_File.prototype.needsAutosave = function() { + return $gameSystem.isAutosaveEnabled(); +}; + +Scene_File.prototype.activateListWindow = function() { + this._listWindow.activate(); +}; + +Scene_File.prototype.helpWindowText = function() { + return ""; +}; + +Scene_File.prototype.firstSavefileId = function() { + return 0; +}; + +Scene_File.prototype.onSavefileOk = function() { + // +}; + +//----------------------------------------------------------------------------- +// Scene_Save +// +// The scene class of the save screen. + +function Scene_Save() { + this.initialize(...arguments); +} + +Scene_Save.prototype = Object.create(Scene_File.prototype); +Scene_Save.prototype.constructor = Scene_Save; + +Scene_Save.prototype.initialize = function() { + Scene_File.prototype.initialize.call(this); +}; + +Scene_Save.prototype.mode = function() { + return "save"; +}; + +Scene_Save.prototype.helpWindowText = function() { + return TextManager.saveMessage; +}; + +Scene_Save.prototype.firstSavefileId = function() { + return $gameSystem.savefileId(); +}; + +Scene_Save.prototype.onSavefileOk = function() { + Scene_File.prototype.onSavefileOk.call(this); + const savefileId = this.savefileId(); + if (this.isSavefileEnabled(savefileId)) { + this.executeSave(savefileId); + } else { + this.onSaveFailure(); + } +}; + +Scene_Save.prototype.executeSave = function(savefileId) { + $gameSystem.setSavefileId(savefileId); + $gameSystem.onBeforeSave(); + DataManager.saveGame(savefileId) + .then(() => this.onSaveSuccess()) + .catch(() => this.onSaveFailure()); +}; + +Scene_Save.prototype.onSaveSuccess = function() { + SoundManager.playSave(); + this.popScene(); +}; + +Scene_Save.prototype.onSaveFailure = function() { + SoundManager.playBuzzer(); + this.activateListWindow(); +}; + +//----------------------------------------------------------------------------- +// Scene_Load +// +// The scene class of the load screen. + +function Scene_Load() { + this.initialize(...arguments); +} + +Scene_Load.prototype = Object.create(Scene_File.prototype); +Scene_Load.prototype.constructor = Scene_Load; + +Scene_Load.prototype.initialize = function() { + Scene_File.prototype.initialize.call(this); + this._loadSuccess = false; +}; + +Scene_Load.prototype.terminate = function() { + Scene_File.prototype.terminate.call(this); + if (this._loadSuccess) { + $gameSystem.onAfterLoad(); + } +}; + +Scene_Load.prototype.mode = function() { + return "load"; +}; + +Scene_Load.prototype.helpWindowText = function() { + return TextManager.loadMessage; +}; + +Scene_Load.prototype.firstSavefileId = function() { + return DataManager.latestSavefileId(); +}; + +Scene_Load.prototype.onSavefileOk = function() { + Scene_File.prototype.onSavefileOk.call(this); + const savefileId = this.savefileId(); + if (this.isSavefileEnabled(savefileId)) { + this.executeLoad(savefileId); + } else { + this.onLoadFailure(); + } +}; + +Scene_Load.prototype.executeLoad = function(savefileId) { + DataManager.loadGame(savefileId) + .then(() => this.onLoadSuccess()) + .catch(() => this.onLoadFailure()); +}; + +Scene_Load.prototype.onLoadSuccess = function() { + SoundManager.playLoad(); + this.fadeOutAll(); + this.reloadMapIfUpdated(); + SceneManager.goto(Scene_Map); + this._loadSuccess = true; +}; + +Scene_Load.prototype.onLoadFailure = function() { + SoundManager.playBuzzer(); + this.activateListWindow(); +}; + +Scene_Load.prototype.reloadMapIfUpdated = function() { + if ($gameSystem.versionId() !== $dataSystem.versionId) { + const mapId = $gameMap.mapId(); + const x = $gamePlayer.x; + const y = $gamePlayer.y; + const d = $gamePlayer.direction(); + $gamePlayer.reserveTransfer(mapId, x, y, d, 0); + $gamePlayer.requestMapReload(); + } +}; + +//----------------------------------------------------------------------------- +// Scene_GameEnd +// +// The scene class of the game end screen. + +function Scene_GameEnd() { + this.initialize(...arguments); +} + +Scene_GameEnd.prototype = Object.create(Scene_MenuBase.prototype); +Scene_GameEnd.prototype.constructor = Scene_GameEnd; + +Scene_GameEnd.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_GameEnd.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this.createCommandWindow(); +}; + +Scene_GameEnd.prototype.stop = function() { + Scene_MenuBase.prototype.stop.call(this); + this._commandWindow.close(); +}; + +Scene_GameEnd.prototype.createBackground = function() { + Scene_MenuBase.prototype.createBackground.call(this); + this.setBackgroundOpacity(128); +}; + +Scene_GameEnd.prototype.createCommandWindow = function() { + const rect = this.commandWindowRect(); + this._commandWindow = new Window_GameEnd(rect); + this._commandWindow.setHandler("toTitle", this.commandToTitle.bind(this)); + this._commandWindow.setHandler("cancel", this.popScene.bind(this)); + this.addWindow(this._commandWindow); +}; + +Scene_GameEnd.prototype.commandWindowRect = function() { + const ww = this.mainCommandWidth(); + const wh = this.calcWindowHeight(2, true); + const wx = (Graphics.boxWidth - ww) / 2; + const wy = (Graphics.boxHeight - wh) / 2; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_GameEnd.prototype.commandToTitle = function() { + this.fadeOutAll(); + SceneManager.goto(Scene_Title); + Window_TitleCommand.initCommandPosition(); +}; + +//----------------------------------------------------------------------------- +// Scene_Shop +// +// The scene class of the shop screen. + +function Scene_Shop() { + this.initialize(...arguments); +} + +Scene_Shop.prototype = Object.create(Scene_MenuBase.prototype); +Scene_Shop.prototype.constructor = Scene_Shop; + +Scene_Shop.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_Shop.prototype.prepare = function(goods, purchaseOnly) { + this._goods = goods; + this._purchaseOnly = purchaseOnly; + this._item = null; +}; + +Scene_Shop.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this.createHelpWindow(); + this.createGoldWindow(); + this.createCommandWindow(); + this.createDummyWindow(); + this.createNumberWindow(); + this.createStatusWindow(); + this.createBuyWindow(); + this.createCategoryWindow(); + this.createSellWindow(); +}; + +Scene_Shop.prototype.createGoldWindow = function() { + const rect = this.goldWindowRect(); + this._goldWindow = new Window_Gold(rect); + this.addWindow(this._goldWindow); +}; + +Scene_Shop.prototype.goldWindowRect = function() { + const ww = this.mainCommandWidth(); + const wh = this.calcWindowHeight(1, true); + const wx = Graphics.boxWidth - ww; + const wy = this.mainAreaTop(); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Shop.prototype.createCommandWindow = function() { + const rect = this.commandWindowRect(); + this._commandWindow = new Window_ShopCommand(rect); + this._commandWindow.setPurchaseOnly(this._purchaseOnly); + this._commandWindow.y = this.mainAreaTop(); + this._commandWindow.setHandler("buy", this.commandBuy.bind(this)); + this._commandWindow.setHandler("sell", this.commandSell.bind(this)); + this._commandWindow.setHandler("cancel", this.popScene.bind(this)); + this.addWindow(this._commandWindow); +}; + +Scene_Shop.prototype.commandWindowRect = function() { + const wx = 0; + const wy = this.mainAreaTop(); + const ww = this._goldWindow.x; + const wh = this.calcWindowHeight(1, true); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Shop.prototype.createDummyWindow = function() { + const rect = this.dummyWindowRect(); + this._dummyWindow = new Window_Base(rect); + this.addWindow(this._dummyWindow); +}; + +Scene_Shop.prototype.dummyWindowRect = function() { + const wx = 0; + const wy = this._commandWindow.y + this._commandWindow.height; + const ww = Graphics.boxWidth; + const wh = this.mainAreaHeight() - this._commandWindow.height; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Shop.prototype.createNumberWindow = function() { + const rect = this.numberWindowRect(); + this._numberWindow = new Window_ShopNumber(rect); + this._numberWindow.hide(); + this._numberWindow.setHandler("ok", this.onNumberOk.bind(this)); + this._numberWindow.setHandler("cancel", this.onNumberCancel.bind(this)); + this.addWindow(this._numberWindow); +}; + +Scene_Shop.prototype.numberWindowRect = function() { + const wx = 0; + const wy = this._dummyWindow.y; + const ww = Graphics.boxWidth - this.statusWidth(); + const wh = this._dummyWindow.height; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Shop.prototype.createStatusWindow = function() { + const rect = this.statusWindowRect(); + this._statusWindow = new Window_ShopStatus(rect); + this._statusWindow.hide(); + this.addWindow(this._statusWindow); +}; + +Scene_Shop.prototype.statusWindowRect = function() { + const ww = this.statusWidth(); + const wh = this._dummyWindow.height; + const wx = Graphics.boxWidth - ww; + const wy = this._dummyWindow.y; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Shop.prototype.createBuyWindow = function() { + const rect = this.buyWindowRect(); + this._buyWindow = new Window_ShopBuy(rect); + this._buyWindow.setupGoods(this._goods); + this._buyWindow.setHelpWindow(this._helpWindow); + this._buyWindow.setStatusWindow(this._statusWindow); + this._buyWindow.hide(); + this._buyWindow.setHandler("ok", this.onBuyOk.bind(this)); + this._buyWindow.setHandler("cancel", this.onBuyCancel.bind(this)); + this.addWindow(this._buyWindow); +}; + +Scene_Shop.prototype.buyWindowRect = function() { + const wx = 0; + const wy = this._dummyWindow.y; + const ww = Graphics.boxWidth - this.statusWidth(); + const wh = this._dummyWindow.height; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Shop.prototype.createCategoryWindow = function() { + const rect = this.categoryWindowRect(); + this._categoryWindow = new Window_ItemCategory(rect); + this._categoryWindow.setHelpWindow(this._helpWindow); + this._categoryWindow.hide(); + this._categoryWindow.deactivate(); + this._categoryWindow.setHandler("ok", this.onCategoryOk.bind(this)); + this._categoryWindow.setHandler("cancel", this.onCategoryCancel.bind(this)); + this.addWindow(this._categoryWindow); +}; + +Scene_Shop.prototype.categoryWindowRect = function() { + const wx = 0; + const wy = this._dummyWindow.y; + const ww = Graphics.boxWidth; + const wh = this.calcWindowHeight(1, true); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Shop.prototype.createSellWindow = function() { + const rect = this.sellWindowRect(); + this._sellWindow = new Window_ShopSell(rect); + this._sellWindow.setHelpWindow(this._helpWindow); + this._sellWindow.hide(); + this._sellWindow.setHandler("ok", this.onSellOk.bind(this)); + this._sellWindow.setHandler("cancel", this.onSellCancel.bind(this)); + this._categoryWindow.setItemWindow(this._sellWindow); + this.addWindow(this._sellWindow); + if (!this._categoryWindow.needsSelection()) { + this._sellWindow.y -= this._categoryWindow.height; + this._sellWindow.height += this._categoryWindow.height; + } +}; + +Scene_Shop.prototype.sellWindowRect = function() { + const wx = 0; + const wy = this._categoryWindow.y + this._categoryWindow.height; + const ww = Graphics.boxWidth; + const wh = + this.mainAreaHeight() - + this._commandWindow.height - + this._categoryWindow.height; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Shop.prototype.statusWidth = function() { + return 352; +}; + +Scene_Shop.prototype.activateBuyWindow = function() { + this._buyWindow.setMoney(this.money()); + this._buyWindow.show(); + this._buyWindow.activate(); + this._statusWindow.show(); +}; + +Scene_Shop.prototype.activateSellWindow = function() { + if (this._categoryWindow.needsSelection()) { + this._categoryWindow.show(); + } + this._sellWindow.refresh(); + this._sellWindow.show(); + this._sellWindow.activate(); + this._statusWindow.hide(); +}; + +Scene_Shop.prototype.commandBuy = function() { + this._dummyWindow.hide(); + this.activateBuyWindow(); +}; + +Scene_Shop.prototype.commandSell = function() { + this._dummyWindow.hide(); + this._sellWindow.show(); + this._sellWindow.deselect(); + this._sellWindow.refresh(); + if (this._categoryWindow.needsSelection()) { + this._categoryWindow.show(); + this._categoryWindow.activate(); + } else { + this.onCategoryOk(); + } +}; + +Scene_Shop.prototype.onBuyOk = function() { + this._item = this._buyWindow.item(); + this._buyWindow.hide(); + this._numberWindow.setup(this._item, this.maxBuy(), this.buyingPrice()); + this._numberWindow.setCurrencyUnit(this.currencyUnit()); + this._numberWindow.show(); + this._numberWindow.activate(); +}; + +Scene_Shop.prototype.onBuyCancel = function() { + this._commandWindow.activate(); + this._dummyWindow.show(); + this._buyWindow.hide(); + this._statusWindow.hide(); + this._statusWindow.setItem(null); + this._helpWindow.clear(); +}; + +Scene_Shop.prototype.onCategoryOk = function() { + this.activateSellWindow(); + this._sellWindow.select(0); +}; + +Scene_Shop.prototype.onCategoryCancel = function() { + this._commandWindow.activate(); + this._dummyWindow.show(); + this._categoryWindow.hide(); + this._sellWindow.hide(); +}; + +Scene_Shop.prototype.onSellOk = function() { + this._item = this._sellWindow.item(); + this._categoryWindow.hide(); + this._sellWindow.hide(); + this._numberWindow.setup(this._item, this.maxSell(), this.sellingPrice()); + this._numberWindow.setCurrencyUnit(this.currencyUnit()); + this._numberWindow.show(); + this._numberWindow.activate(); + this._statusWindow.setItem(this._item); + this._statusWindow.show(); +}; + +Scene_Shop.prototype.onSellCancel = function() { + this._sellWindow.deselect(); + this._statusWindow.setItem(null); + this._helpWindow.clear(); + if (this._categoryWindow.needsSelection()) { + this._categoryWindow.activate(); + } else { + this.onCategoryCancel(); + } +}; + +Scene_Shop.prototype.onNumberOk = function() { + SoundManager.playShop(); + switch (this._commandWindow.currentSymbol()) { + case "buy": + this.doBuy(this._numberWindow.number()); + break; + case "sell": + this.doSell(this._numberWindow.number()); + break; + } + this.endNumberInput(); + this._goldWindow.refresh(); + this._statusWindow.refresh(); +}; + +Scene_Shop.prototype.onNumberCancel = function() { + SoundManager.playCancel(); + this.endNumberInput(); +}; + +Scene_Shop.prototype.doBuy = function(number) { + $gameParty.loseGold(number * this.buyingPrice()); + $gameParty.gainItem(this._item, number); +}; + +Scene_Shop.prototype.doSell = function(number) { + $gameParty.gainGold(number * this.sellingPrice()); + $gameParty.loseItem(this._item, number); +}; + +Scene_Shop.prototype.endNumberInput = function() { + this._numberWindow.hide(); + switch (this._commandWindow.currentSymbol()) { + case "buy": + this.activateBuyWindow(); + break; + case "sell": + this.activateSellWindow(); + break; + } +}; + +Scene_Shop.prototype.maxBuy = function() { + const num = $gameParty.numItems(this._item); + const max = $gameParty.maxItems(this._item) - num; + const price = this.buyingPrice(); + if (price > 0) { + return Math.min(max, Math.floor(this.money() / price)); + } else { + return max; + } +}; + +Scene_Shop.prototype.maxSell = function() { + return $gameParty.numItems(this._item); +}; + +Scene_Shop.prototype.money = function() { + return this._goldWindow.value(); +}; + +Scene_Shop.prototype.currencyUnit = function() { + return this._goldWindow.currencyUnit(); +}; + +Scene_Shop.prototype.buyingPrice = function() { + return this._buyWindow.price(this._item); +}; + +Scene_Shop.prototype.sellingPrice = function() { + return Math.floor(this._item.price / 2); +}; + +//----------------------------------------------------------------------------- +// Scene_Name +// +// The scene class of the name input screen. + +function Scene_Name() { + this.initialize(...arguments); +} + +Scene_Name.prototype = Object.create(Scene_MenuBase.prototype); +Scene_Name.prototype.constructor = Scene_Name; + +Scene_Name.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_Name.prototype.prepare = function(actorId, maxLength) { + this._actorId = actorId; + this._maxLength = maxLength; +}; + +Scene_Name.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this._actor = $gameActors.actor(this._actorId); + this.createEditWindow(); + this.createInputWindow(); +}; + +Scene_Name.prototype.start = function() { + Scene_MenuBase.prototype.start.call(this); + this._editWindow.refresh(); +}; + +Scene_Name.prototype.createEditWindow = function() { + const rect = this.editWindowRect(); + this._editWindow = new Window_NameEdit(rect); + this._editWindow.setup(this._actor, this._maxLength); + this.addWindow(this._editWindow); +}; + +Scene_Name.prototype.editWindowRect = function() { + const inputWindowHeight = this.calcWindowHeight(9, true); + const padding = $gameSystem.windowPadding(); + const ww = 600; + const wh = ImageManager.faceHeight + padding * 2; + const wx = (Graphics.boxWidth - ww) / 2; + const wy = (Graphics.boxHeight - (wh + inputWindowHeight + 8)) / 2; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Name.prototype.createInputWindow = function() { + const rect = this.inputWindowRect(); + this._inputWindow = new Window_NameInput(rect); + this._inputWindow.setEditWindow(this._editWindow); + this._inputWindow.setHandler("ok", this.onInputOk.bind(this)); + this.addWindow(this._inputWindow); +}; + +Scene_Name.prototype.inputWindowRect = function() { + const wx = this._editWindow.x; + const wy = this._editWindow.y + this._editWindow.height + 8; + const ww = this._editWindow.width; + const wh = this.calcWindowHeight(9, true); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Name.prototype.onInputOk = function() { + this._actor.setName(this._editWindow.name()); + this.popScene(); +}; + +//----------------------------------------------------------------------------- +// Scene_Debug +// +// The scene class of the debug screen. + +function Scene_Debug() { + this.initialize(...arguments); +} + +Scene_Debug.prototype = Object.create(Scene_MenuBase.prototype); +Scene_Debug.prototype.constructor = Scene_Debug; + +Scene_Debug.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); +}; + +Scene_Debug.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this.createRangeWindow(); + this.createEditWindow(); + this.createDebugHelpWindow(); +}; + +Scene_Debug.prototype.needsCancelButton = function() { + return false; +}; + +Scene_Debug.prototype.createRangeWindow = function() { + const rect = this.rangeWindowRect(); + this._rangeWindow = new Window_DebugRange(rect); + this._rangeWindow.setHandler("ok", this.onRangeOk.bind(this)); + this._rangeWindow.setHandler("cancel", this.popScene.bind(this)); + this.addWindow(this._rangeWindow); +}; + +Scene_Debug.prototype.rangeWindowRect = function() { + const wx = 0; + const wy = 0; + const ww = 246; + const wh = Graphics.boxHeight; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Debug.prototype.createEditWindow = function() { + const rect = this.editWindowRect(); + this._editWindow = new Window_DebugEdit(rect); + this._editWindow.setHandler("cancel", this.onEditCancel.bind(this)); + this._rangeWindow.setEditWindow(this._editWindow); + this.addWindow(this._editWindow); +}; + +Scene_Debug.prototype.editWindowRect = function() { + const wx = this._rangeWindow.width; + const wy = 0; + const ww = Graphics.boxWidth - wx; + const wh = this.calcWindowHeight(10, true); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Debug.prototype.createDebugHelpWindow = function() { + const rect = this.debugHelpWindowRect(); + this._debugHelpWindow = new Window_Base(rect); + this.addWindow(this._debugHelpWindow); +}; + +Scene_Debug.prototype.debugHelpWindowRect = function() { + const wx = this._editWindow.x; + const wy = this._editWindow.height; + const ww = this._editWindow.width; + const wh = Graphics.boxHeight - wy; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Debug.prototype.onRangeOk = function() { + this._editWindow.activate(); + this._editWindow.select(0); + this.refreshHelpWindow(); +}; + +Scene_Debug.prototype.onEditCancel = function() { + this._rangeWindow.activate(); + this._editWindow.deselect(); + this.refreshHelpWindow(); +}; + +Scene_Debug.prototype.refreshHelpWindow = function() { + const helpWindow = this._debugHelpWindow; + helpWindow.contents.clear(); + if (this._editWindow.active) { + const rect = helpWindow.baseTextRect(); + helpWindow.drawTextEx(this.helpText(), rect.x, rect.y, rect.width); + } +}; + +Scene_Debug.prototype.helpText = function() { + if (this._rangeWindow.mode() === "switch") { + return "Enter : ON / OFF"; + } else { + return ( + "Left : -1 Pageup : -10\n" + + "Right : +1 Pagedown : +10" + ); + } +}; + +//----------------------------------------------------------------------------- +// Scene_Battle +// +// The scene class of the battle screen. + +function Scene_Battle() { + this.initialize(...arguments); +} + +Scene_Battle.prototype = Object.create(Scene_Message.prototype); +Scene_Battle.prototype.constructor = Scene_Battle; + +Scene_Battle.prototype.initialize = function() { + Scene_Message.prototype.initialize.call(this); +}; + +Scene_Battle.prototype.create = function() { + Scene_Message.prototype.create.call(this); + this.createDisplayObjects(); +}; + +Scene_Battle.prototype.start = function() { + Scene_Message.prototype.start.call(this); + BattleManager.playBattleBgm(); + BattleManager.startBattle(); + this._statusWindow.refresh(); + this.startFadeIn(this.fadeSpeed(), false); +}; + +Scene_Battle.prototype.update = function() { + const active = this.isActive(); + $gameTimer.update(active); + $gameScreen.update(); + this.updateVisibility(); + if (active && !this.isBusy()) { + this.updateBattleProcess(); + } + Scene_Message.prototype.update.call(this); +}; + +Scene_Battle.prototype.updateVisibility = function() { + this.updateLogWindowVisibility(); + this.updateStatusWindowVisibility(); + this.updateInputWindowVisibility(); + this.updateCancelButton(); +}; + +Scene_Battle.prototype.updateBattleProcess = function() { + BattleManager.update(this.isTimeActive()); +}; + +Scene_Battle.prototype.isTimeActive = function() { + if (BattleManager.isActiveTpb()) { + return !this._skillWindow.active && !this._itemWindow.active; + } else { + return !this.isAnyInputWindowActive(); + } +}; + +Scene_Battle.prototype.isAnyInputWindowActive = function() { + return ( + this._partyCommandWindow.active || + this._actorCommandWindow.active || + this._skillWindow.active || + this._itemWindow.active || + this._actorWindow.active || + this._enemyWindow.active + ); +}; + +Scene_Battle.prototype.changeInputWindow = function() { + this.hideSubInputWindows(); + if (BattleManager.isInputting()) { + if (BattleManager.actor()) { + this.startActorCommandSelection(); + } else { + this.startPartyCommandSelection(); + } + } else { + this.endCommandSelection(); + } +}; + +Scene_Battle.prototype.stop = function() { + Scene_Message.prototype.stop.call(this); + if (this.needsSlowFadeOut()) { + this.startFadeOut(this.slowFadeSpeed(), false); + } else { + this.startFadeOut(this.fadeSpeed(), false); + } + this._statusWindow.close(); + this._partyCommandWindow.close(); + this._actorCommandWindow.close(); +}; + +Scene_Battle.prototype.terminate = function() { + Scene_Message.prototype.terminate.call(this); + $gameParty.onBattleEnd(); + $gameTroop.onBattleEnd(); + AudioManager.stopMe(); + if (this.shouldAutosave()) { + this.requestAutosave(); + } +}; + +Scene_Battle.prototype.shouldAutosave = function() { + return SceneManager.isNextScene(Scene_Map); +}; + +Scene_Battle.prototype.needsSlowFadeOut = function() { + return ( + SceneManager.isNextScene(Scene_Title) || + SceneManager.isNextScene(Scene_Gameover) + ); +}; + +Scene_Battle.prototype.updateLogWindowVisibility = function() { + this._logWindow.visible = !this._helpWindow.visible; +}; + +Scene_Battle.prototype.updateStatusWindowVisibility = function() { + if ($gameMessage.isBusy()) { + this._statusWindow.close(); + } else if (this.shouldOpenStatusWindow()) { + this._statusWindow.open(); + } + this.updateStatusWindowPosition(); +}; + +Scene_Battle.prototype.shouldOpenStatusWindow = function() { + return ( + this.isActive() && + !this.isMessageWindowClosing() && + !BattleManager.isBattleEnd() + ); +}; + +Scene_Battle.prototype.updateStatusWindowPosition = function() { + const statusWindow = this._statusWindow; + const targetX = this.statusWindowX(); + if (statusWindow.x < targetX) { + statusWindow.x = Math.min(statusWindow.x + 16, targetX); + } + if (statusWindow.x > targetX) { + statusWindow.x = Math.max(statusWindow.x - 16, targetX); + } +}; + +Scene_Battle.prototype.statusWindowX = function() { + if (this.isAnyInputWindowActive()) { + return this.statusWindowRect().x; + } else { + return this._partyCommandWindow.width / 2; + } +}; + +Scene_Battle.prototype.updateInputWindowVisibility = function() { + if ($gameMessage.isBusy()) { + this.closeCommandWindows(); + this.hideSubInputWindows(); + } else if (this.needsInputWindowChange()) { + this.changeInputWindow(); + } +}; + +Scene_Battle.prototype.needsInputWindowChange = function() { + const windowActive = this.isAnyInputWindowActive(); + const inputting = BattleManager.isInputting(); + if (windowActive && inputting) { + return this._actorCommandWindow.actor() !== BattleManager.actor(); + } + return windowActive !== inputting; +}; + +Scene_Battle.prototype.updateCancelButton = function() { + if (this._cancelButton) { + this._cancelButton.visible = + this.isAnyInputWindowActive() && !this._partyCommandWindow.active; + } +}; + +Scene_Battle.prototype.createDisplayObjects = function() { + this.createSpriteset(); + this.createWindowLayer(); + this.createAllWindows(); + this.createButtons(); + BattleManager.setLogWindow(this._logWindow); + BattleManager.setSpriteset(this._spriteset); + this._logWindow.setSpriteset(this._spriteset); +}; + +Scene_Battle.prototype.createSpriteset = function() { + this._spriteset = new Spriteset_Battle(); + this.addChild(this._spriteset); +}; + +Scene_Battle.prototype.createAllWindows = function() { + this.createLogWindow(); + this.createStatusWindow(); + this.createPartyCommandWindow(); + this.createActorCommandWindow(); + this.createHelpWindow(); + this.createSkillWindow(); + this.createItemWindow(); + this.createActorWindow(); + this.createEnemyWindow(); + Scene_Message.prototype.createAllWindows.call(this); +}; + +Scene_Battle.prototype.createLogWindow = function() { + const rect = this.logWindowRect(); + this._logWindow = new Window_BattleLog(rect); + this.addWindow(this._logWindow); +}; + +Scene_Battle.prototype.logWindowRect = function() { + const wx = 0; + const wy = 0; + const ww = Graphics.boxWidth; + const wh = this.calcWindowHeight(10, false); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Battle.prototype.createStatusWindow = function() { + const rect = this.statusWindowRect(); + const statusWindow = new Window_BattleStatus(rect); + this.addWindow(statusWindow); + this._statusWindow = statusWindow; +}; + +Scene_Battle.prototype.statusWindowRect = function() { + const extra = 10; + const ww = Graphics.boxWidth - 192; + const wh = this.windowAreaHeight() + extra; + const wx = this.isRightInputMode() ? 0 : Graphics.boxWidth - ww; + const wy = Graphics.boxHeight - wh + extra - 4; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Battle.prototype.createPartyCommandWindow = function() { + const rect = this.partyCommandWindowRect(); + const commandWindow = new Window_PartyCommand(rect); + commandWindow.setHandler("fight", this.commandFight.bind(this)); + commandWindow.setHandler("escape", this.commandEscape.bind(this)); + commandWindow.deselect(); + this.addWindow(commandWindow); + this._partyCommandWindow = commandWindow; +}; + +Scene_Battle.prototype.partyCommandWindowRect = function() { + const ww = 192; + const wh = this.windowAreaHeight(); + const wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0; + const wy = Graphics.boxHeight - wh; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Battle.prototype.createActorCommandWindow = function() { + const rect = this.actorCommandWindowRect(); + const commandWindow = new Window_ActorCommand(rect); + commandWindow.y = Graphics.boxHeight - commandWindow.height; + commandWindow.setHandler("attack", this.commandAttack.bind(this)); + commandWindow.setHandler("skill", this.commandSkill.bind(this)); + commandWindow.setHandler("guard", this.commandGuard.bind(this)); + commandWindow.setHandler("item", this.commandItem.bind(this)); + commandWindow.setHandler("cancel", this.commandCancel.bind(this)); + this.addWindow(commandWindow); + this._actorCommandWindow = commandWindow; +}; + +Scene_Battle.prototype.actorCommandWindowRect = function() { + const ww = 192; + const wh = this.windowAreaHeight(); + const wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0; + const wy = Graphics.boxHeight - wh; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Battle.prototype.createHelpWindow = function() { + const rect = this.helpWindowRect(); + this._helpWindow = new Window_Help(rect); + this._helpWindow.hide(); + this.addWindow(this._helpWindow); +}; + +Scene_Battle.prototype.helpWindowRect = function() { + const wx = 0; + const wy = this.helpAreaTop(); + const ww = Graphics.boxWidth; + const wh = this.helpAreaHeight(); + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Battle.prototype.createSkillWindow = function() { + const rect = this.skillWindowRect(); + this._skillWindow = new Window_BattleSkill(rect); + this._skillWindow.setHelpWindow(this._helpWindow); + this._skillWindow.setHandler("ok", this.onSkillOk.bind(this)); + this._skillWindow.setHandler("cancel", this.onSkillCancel.bind(this)); + this.addWindow(this._skillWindow); +}; + +Scene_Battle.prototype.skillWindowRect = function() { + const ww = Graphics.boxWidth; + const wh = this.windowAreaHeight(); + const wx = 0; + const wy = Graphics.boxHeight - wh; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Battle.prototype.createItemWindow = function() { + const rect = this.itemWindowRect(); + this._itemWindow = new Window_BattleItem(rect); + this._itemWindow.setHelpWindow(this._helpWindow); + this._itemWindow.setHandler("ok", this.onItemOk.bind(this)); + this._itemWindow.setHandler("cancel", this.onItemCancel.bind(this)); + this.addWindow(this._itemWindow); +}; + +Scene_Battle.prototype.itemWindowRect = function() { + return this.skillWindowRect(); +}; + +Scene_Battle.prototype.createActorWindow = function() { + const rect = this.actorWindowRect(); + this._actorWindow = new Window_BattleActor(rect); + this._actorWindow.setHandler("ok", this.onActorOk.bind(this)); + this._actorWindow.setHandler("cancel", this.onActorCancel.bind(this)); + this.addWindow(this._actorWindow); +}; + +Scene_Battle.prototype.actorWindowRect = function() { + return this.statusWindowRect(); +}; + +Scene_Battle.prototype.createEnemyWindow = function() { + const rect = this.enemyWindowRect(); + this._enemyWindow = new Window_BattleEnemy(rect); + this._enemyWindow.setHandler("ok", this.onEnemyOk.bind(this)); + this._enemyWindow.setHandler("cancel", this.onEnemyCancel.bind(this)); + this.addWindow(this._enemyWindow); +}; + +Scene_Battle.prototype.enemyWindowRect = function() { + const wx = this._statusWindow.x; + const ww = this._statusWindow.width; + const wh = this.windowAreaHeight(); + const wy = Graphics.boxHeight - wh; + return new Rectangle(wx, wy, ww, wh); +}; + +Scene_Battle.prototype.helpAreaTop = function() { + return 0; +}; + +Scene_Battle.prototype.helpAreaBottom = function() { + return this.helpAreaTop() + this.helpAreaHeight(); +}; + +Scene_Battle.prototype.helpAreaHeight = function() { + return this.calcWindowHeight(2, false); +}; + +Scene_Battle.prototype.buttonAreaTop = function() { + return this.helpAreaBottom(); +}; + +Scene_Battle.prototype.windowAreaHeight = function() { + return this.calcWindowHeight(4, true); +}; + +Scene_Battle.prototype.createButtons = function() { + if (ConfigManager.touchUI) { + this.createCancelButton(); + } +}; + +Scene_Battle.prototype.createCancelButton = function() { + this._cancelButton = new Sprite_Button("cancel"); + this._cancelButton.x = Graphics.boxWidth - this._cancelButton.width - 4; + this._cancelButton.y = this.buttonY(); + this.addWindow(this._cancelButton); +}; + +Scene_Battle.prototype.closeCommandWindows = function() { + this._partyCommandWindow.deactivate(); + this._actorCommandWindow.deactivate(); + this._partyCommandWindow.close(); + this._actorCommandWindow.close(); +}; + +Scene_Battle.prototype.hideSubInputWindows = function() { + this._actorWindow.deactivate(); + this._enemyWindow.deactivate(); + this._skillWindow.deactivate(); + this._itemWindow.deactivate(); + this._actorWindow.hide(); + this._enemyWindow.hide(); + this._skillWindow.hide(); + this._itemWindow.hide(); +}; + +Scene_Battle.prototype.startPartyCommandSelection = function() { + this._statusWindow.deselect(); + this._statusWindow.show(); + this._statusWindow.open(); + this._actorCommandWindow.setup(null); + this._actorCommandWindow.close(); + this._partyCommandWindow.setup(); +}; + +Scene_Battle.prototype.commandFight = function() { + this.selectNextCommand(); +}; + +Scene_Battle.prototype.commandEscape = function() { + BattleManager.processEscape(); + this.changeInputWindow(); +}; + +Scene_Battle.prototype.startActorCommandSelection = function() { + this._statusWindow.show(); + this._statusWindow.selectActor(BattleManager.actor()); + this._partyCommandWindow.close(); + this._actorCommandWindow.show(); + this._actorCommandWindow.setup(BattleManager.actor()); +}; + +Scene_Battle.prototype.commandAttack = function() { + const action = BattleManager.inputtingAction(); + action.setAttack(); + this.onSelectAction(); +}; + +Scene_Battle.prototype.commandSkill = function() { + this._skillWindow.setActor(BattleManager.actor()); + this._skillWindow.setStypeId(this._actorCommandWindow.currentExt()); + this._skillWindow.refresh(); + this._skillWindow.show(); + this._skillWindow.activate(); + this._statusWindow.hide(); + this._actorCommandWindow.hide(); +}; + +Scene_Battle.prototype.commandGuard = function() { + const action = BattleManager.inputtingAction(); + action.setGuard(); + this.onSelectAction(); +}; + +Scene_Battle.prototype.commandItem = function() { + this._itemWindow.refresh(); + this._itemWindow.show(); + this._itemWindow.activate(); + this._statusWindow.hide(); + this._actorCommandWindow.hide(); +}; + +Scene_Battle.prototype.commandCancel = function() { + this.selectPreviousCommand(); +}; + +Scene_Battle.prototype.selectNextCommand = function() { + BattleManager.selectNextCommand(); + this.changeInputWindow(); +}; + +Scene_Battle.prototype.selectPreviousCommand = function() { + BattleManager.selectPreviousCommand(); + this.changeInputWindow(); +}; + +Scene_Battle.prototype.startActorSelection = function() { + this._actorWindow.refresh(); + this._actorWindow.show(); + this._actorWindow.activate(); +}; + +Scene_Battle.prototype.onActorOk = function() { + const action = BattleManager.inputtingAction(); + action.setTarget(this._actorWindow.index()); + this.hideSubInputWindows(); + this.selectNextCommand(); +}; + +Scene_Battle.prototype.onActorCancel = function() { + this._actorWindow.hide(); + switch (this._actorCommandWindow.currentSymbol()) { + case "skill": + this._skillWindow.show(); + this._skillWindow.activate(); + break; + case "item": + this._itemWindow.show(); + this._itemWindow.activate(); + break; + } +}; + +Scene_Battle.prototype.startEnemySelection = function() { + this._enemyWindow.refresh(); + this._enemyWindow.show(); + this._enemyWindow.select(0); + this._enemyWindow.activate(); + this._statusWindow.hide(); +}; + +Scene_Battle.prototype.onEnemyOk = function() { + const action = BattleManager.inputtingAction(); + action.setTarget(this._enemyWindow.enemyIndex()); + this.hideSubInputWindows(); + this.selectNextCommand(); +}; + +Scene_Battle.prototype.onEnemyCancel = function() { + this._enemyWindow.hide(); + switch (this._actorCommandWindow.currentSymbol()) { + case "attack": + this._statusWindow.show(); + this._actorCommandWindow.activate(); + break; + case "skill": + this._skillWindow.show(); + this._skillWindow.activate(); + break; + case "item": + this._itemWindow.show(); + this._itemWindow.activate(); + break; + } +}; + +Scene_Battle.prototype.onSkillOk = function() { + const skill = this._skillWindow.item(); + const action = BattleManager.inputtingAction(); + action.setSkill(skill.id); + BattleManager.actor().setLastBattleSkill(skill); + this.onSelectAction(); +}; + +Scene_Battle.prototype.onSkillCancel = function() { + this._skillWindow.hide(); + this._statusWindow.show(); + this._actorCommandWindow.show(); + this._actorCommandWindow.activate(); +}; + +Scene_Battle.prototype.onItemOk = function() { + const item = this._itemWindow.item(); + const action = BattleManager.inputtingAction(); + action.setItem(item.id); + $gameParty.setLastItem(item); + this.onSelectAction(); +}; + +Scene_Battle.prototype.onItemCancel = function() { + this._itemWindow.hide(); + this._statusWindow.show(); + this._actorCommandWindow.show(); + this._actorCommandWindow.activate(); +}; + +Scene_Battle.prototype.onSelectAction = function() { + const action = BattleManager.inputtingAction(); + if (!action.needsSelection()) { + this.selectNextCommand(); + } else if (action.isForOpponent()) { + this.startEnemySelection(); + } else { + this.startActorSelection(); + } +}; + +Scene_Battle.prototype.endCommandSelection = function() { + this.closeCommandWindows(); + this.hideSubInputWindows(); + this._statusWindow.deselect(); + this._statusWindow.show(); +}; + +//----------------------------------------------------------------------------- +// Scene_Gameover +// +// The scene class of the game over screen. + +function Scene_Gameover() { + this.initialize(...arguments); +} + +Scene_Gameover.prototype = Object.create(Scene_Base.prototype); +Scene_Gameover.prototype.constructor = Scene_Gameover; + +Scene_Gameover.prototype.initialize = function() { + Scene_Base.prototype.initialize.call(this); +}; + +Scene_Gameover.prototype.create = function() { + Scene_Base.prototype.create.call(this); + this.playGameoverMusic(); + this.createBackground(); +}; + +Scene_Gameover.prototype.start = function() { + Scene_Base.prototype.start.call(this); + this.adjustBackground(); + this.startFadeIn(this.slowFadeSpeed(), false); +}; + +Scene_Gameover.prototype.update = function() { + if (this.isActive() && !this.isBusy() && this.isTriggered()) { + this.gotoTitle(); + } + Scene_Base.prototype.update.call(this); +}; + +Scene_Gameover.prototype.stop = function() { + Scene_Base.prototype.stop.call(this); + this.fadeOutAll(); +}; + +Scene_Gameover.prototype.terminate = function() { + Scene_Base.prototype.terminate.call(this); + AudioManager.stopAll(); +}; + +Scene_Gameover.prototype.playGameoverMusic = function() { + AudioManager.stopBgm(); + AudioManager.stopBgs(); + AudioManager.playMe($dataSystem.gameoverMe); +}; + +Scene_Gameover.prototype.createBackground = function() { + this._backSprite = new Sprite(); + this._backSprite.bitmap = ImageManager.loadSystem("GameOver"); + this.addChild(this._backSprite); +}; + +Scene_Gameover.prototype.adjustBackground = function() { + this.scaleSprite(this._backSprite); + this.centerSprite(this._backSprite); +}; + +Scene_Gameover.prototype.isTriggered = function() { + return Input.isTriggered("ok") || TouchInput.isTriggered(); +}; + +Scene_Gameover.prototype.gotoTitle = function() { + SceneManager.goto(Scene_Title); +}; + +//----------------------------------------------------------------------------- diff --git a/js/rmmz_sprites.js b/js/rmmz_sprites.js new file mode 100644 index 0000000..88d7ce7 --- /dev/null +++ b/js/rmmz_sprites.js @@ -0,0 +1,3699 @@ +//============================================================================= +// rmmz_sprites.js v1.4.4 +//============================================================================= + +//----------------------------------------------------------------------------- +// Sprite_Clickable +// +// The sprite class with click handling functions. + +function Sprite_Clickable() { + this.initialize(...arguments); +} + +Sprite_Clickable.prototype = Object.create(Sprite.prototype); +Sprite_Clickable.prototype.constructor = Sprite_Clickable; + +Sprite_Clickable.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this._pressed = false; + this._hovered = false; +}; + +Sprite_Clickable.prototype.update = function() { + Sprite.prototype.update.call(this); + this.processTouch(); +}; + +Sprite_Clickable.prototype.processTouch = function() { + if (this.isClickEnabled()) { + if (this.isBeingTouched()) { + if (!this._hovered && TouchInput.isHovered()) { + this._hovered = true; + this.onMouseEnter(); + } + if (TouchInput.isTriggered()) { + this._pressed = true; + this.onPress(); + } + } else { + if (this._hovered) { + this.onMouseExit(); + } + this._pressed = false; + this._hovered = false; + } + if (this._pressed && TouchInput.isReleased()) { + this._pressed = false; + this.onClick(); + } + } else { + this._pressed = false; + this._hovered = false; + } +}; + +Sprite_Clickable.prototype.isPressed = function() { + return this._pressed; +}; + +Sprite_Clickable.prototype.isClickEnabled = function() { + return this.worldVisible; +}; + +Sprite_Clickable.prototype.isBeingTouched = function() { + const touchPos = new Point(TouchInput.x, TouchInput.y); + const localPos = this.worldTransform.applyInverse(touchPos); + return this.hitTest(localPos.x, localPos.y); +}; + +Sprite_Clickable.prototype.hitTest = function(x, y) { + const rect = new Rectangle( + -this.anchor.x * this.width, + -this.anchor.y * this.height, + this.width, + this.height + ); + return rect.contains(x, y); +}; + +Sprite_Clickable.prototype.onMouseEnter = function() { + // +}; + +Sprite_Clickable.prototype.onMouseExit = function() { + // +}; + +Sprite_Clickable.prototype.onPress = function() { + // +}; + +Sprite_Clickable.prototype.onClick = function() { + // +}; + +//----------------------------------------------------------------------------- +// Sprite_Button +// +// The sprite for displaying a button. + +function Sprite_Button() { + this.initialize(...arguments); +} + +Sprite_Button.prototype = Object.create(Sprite_Clickable.prototype); +Sprite_Button.prototype.constructor = Sprite_Button; + +Sprite_Button.prototype.initialize = function(buttonType) { + Sprite_Clickable.prototype.initialize.call(this); + this._buttonType = buttonType; + this._clickHandler = null; + this._coldFrame = null; + this._hotFrame = null; + this.setupFrames(); +}; + +Sprite_Button.prototype.setupFrames = function() { + const data = this.buttonData(); + const x = data.x * this.blockWidth(); + const width = data.w * this.blockWidth(); + const height = this.blockHeight(); + this.loadButtonImage(); + this.setColdFrame(x, 0, width, height); + this.setHotFrame(x, height, width, height); + this.updateFrame(); + this.updateOpacity(); +}; + +Sprite_Button.prototype.blockWidth = function() { + return 48; +}; + +Sprite_Button.prototype.blockHeight = function() { + return 48; +}; + +Sprite_Button.prototype.loadButtonImage = function() { + this.bitmap = ImageManager.loadSystem("ButtonSet"); +}; + +Sprite_Button.prototype.buttonData = function() { + const buttonTable = { + cancel: { x: 0, w: 2 }, + pageup: { x: 2, w: 1 }, + pagedown: { x: 3, w: 1 }, + down: { x: 4, w: 1 }, + up: { x: 5, w: 1 }, + down2: { x: 6, w: 1 }, + up2: { x: 7, w: 1 }, + ok: { x: 8, w: 2 }, + menu: { x: 10, w: 1 } + }; + return buttonTable[this._buttonType]; +}; + +Sprite_Button.prototype.update = function() { + Sprite_Clickable.prototype.update.call(this); + this.checkBitmap(); + this.updateFrame(); + this.updateOpacity(); + this.processTouch(); +}; + +Sprite_Button.prototype.checkBitmap = function() { + if (this.bitmap.isReady() && this.bitmap.width < this.blockWidth() * 11) { + // Probably MV image is used + throw new Error("ButtonSet image is too small"); + } +}; + +Sprite_Button.prototype.updateFrame = function() { + const frame = this.isPressed() ? this._hotFrame : this._coldFrame; + if (frame) { + this.setFrame(frame.x, frame.y, frame.width, frame.height); + } +}; + +Sprite_Button.prototype.updateOpacity = function() { + this.opacity = this._pressed ? 255 : 192; +}; + +Sprite_Button.prototype.setColdFrame = function(x, y, width, height) { + this._coldFrame = new Rectangle(x, y, width, height); +}; + +Sprite_Button.prototype.setHotFrame = function(x, y, width, height) { + this._hotFrame = new Rectangle(x, y, width, height); +}; + +Sprite_Button.prototype.setClickHandler = function(method) { + this._clickHandler = method; +}; + +Sprite_Button.prototype.onClick = function() { + if (this._clickHandler) { + this._clickHandler(); + } else { + Input.virtualClick(this._buttonType); + } +}; + +//----------------------------------------------------------------------------- +// Sprite_Character +// +// The sprite for displaying a character. + +function Sprite_Character() { + this.initialize(...arguments); +} + +Sprite_Character.prototype = Object.create(Sprite.prototype); +Sprite_Character.prototype.constructor = Sprite_Character; + +Sprite_Character.prototype.initialize = function(character) { + Sprite.prototype.initialize.call(this); + this.initMembers(); + this.setCharacter(character); +}; + +Sprite_Character.prototype.initMembers = function() { + this.anchor.x = 0.5; + this.anchor.y = 1; + this._character = null; + this._balloonDuration = 0; + this._tilesetId = 0; + this._upperBody = null; + this._lowerBody = null; +}; + +Sprite_Character.prototype.setCharacter = function(character) { + this._character = character; +}; + +Sprite_Character.prototype.checkCharacter = function(character) { + return this._character === character; +}; + +Sprite_Character.prototype.update = function() { + Sprite.prototype.update.call(this); + this.updateBitmap(); + this.updateFrame(); + this.updatePosition(); + this.updateOther(); + this.updateVisibility(); +}; + +Sprite_Character.prototype.updateVisibility = function() { + Sprite.prototype.updateVisibility.call(this); + if (this.isEmptyCharacter() || this._character.isTransparent()) { + this.visible = false; + } +}; + +Sprite_Character.prototype.isTile = function() { + return this._character.isTile(); +}; + +Sprite_Character.prototype.isObjectCharacter = function() { + return this._character.isObjectCharacter(); +}; + +Sprite_Character.prototype.isEmptyCharacter = function() { + return this._tileId === 0 && !this._characterName; +}; + +Sprite_Character.prototype.tilesetBitmap = function(tileId) { + const tileset = $gameMap.tileset(); + const setNumber = 5 + Math.floor(tileId / 256); + return ImageManager.loadTileset(tileset.tilesetNames[setNumber]); +}; + +Sprite_Character.prototype.updateBitmap = function() { + if (this.isImageChanged()) { + this._tilesetId = $gameMap.tilesetId(); + this._tileId = this._character.tileId(); + this._characterName = this._character.characterName(); + this._characterIndex = this._character.characterIndex(); + if (this._tileId > 0) { + this.setTileBitmap(); + } else { + this.setCharacterBitmap(); + } + } +}; + +Sprite_Character.prototype.isImageChanged = function() { + return ( + this._tilesetId !== $gameMap.tilesetId() || + this._tileId !== this._character.tileId() || + this._characterName !== this._character.characterName() || + this._characterIndex !== this._character.characterIndex() + ); +}; + +Sprite_Character.prototype.setTileBitmap = function() { + this.bitmap = this.tilesetBitmap(this._tileId); +}; + +Sprite_Character.prototype.setCharacterBitmap = function() { + this.bitmap = ImageManager.loadCharacter(this._characterName); + this._isBigCharacter = ImageManager.isBigCharacter(this._characterName); +}; + +Sprite_Character.prototype.updateFrame = function() { + if (this.bitmap.isReady()) { + if (this._tileId > 0) { + this.updateTileFrame(); + } else { + this.updateCharacterFrame(); + } + } +}; + +Sprite_Character.prototype.updateTileFrame = function() { + const tileId = this._tileId; + const pw = this.patternWidth(); + const ph = this.patternHeight(); + const sx = ((Math.floor(tileId / 128) % 2) * 8 + (tileId % 8)) * pw; + const sy = (Math.floor((tileId % 256) / 8) % 16) * ph; + this.setFrame(sx, sy, pw, ph); +}; + +Sprite_Character.prototype.updateCharacterFrame = function() { + const pw = this.patternWidth(); + const ph = this.patternHeight(); + const sx = (this.characterBlockX() + this.characterPatternX()) * pw; + const sy = (this.characterBlockY() + this.characterPatternY()) * ph; + this.updateHalfBodySprites(); + if (this._bushDepth > 0) { + const d = this._bushDepth; + this._upperBody.setFrame(sx, sy, pw, ph - d); + this._lowerBody.setFrame(sx, sy + ph - d, pw, d); + this.setFrame(sx, sy, 0, ph); + } else { + this.setFrame(sx, sy, pw, ph); + } +}; + +Sprite_Character.prototype.characterBlockX = function() { + if (this._isBigCharacter) { + return 0; + } else { + const index = this._character.characterIndex(); + return (index % 4) * 3; + } +}; + +Sprite_Character.prototype.characterBlockY = function() { + if (this._isBigCharacter) { + return 0; + } else { + const index = this._character.characterIndex(); + return Math.floor(index / 4) * 4; + } +}; + +Sprite_Character.prototype.characterPatternX = function() { + return this._character.pattern(); +}; + +Sprite_Character.prototype.characterPatternY = function() { + return (this._character.direction() - 2) / 2; +}; + +Sprite_Character.prototype.patternWidth = function() { + if (this._tileId > 0) { + return $gameMap.tileWidth(); + } else if (this._isBigCharacter) { + return this.bitmap.width / 3; + } else { + return this.bitmap.width / 12; + } +}; + +Sprite_Character.prototype.patternHeight = function() { + if (this._tileId > 0) { + return $gameMap.tileHeight(); + } else if (this._isBigCharacter) { + return this.bitmap.height / 4; + } else { + return this.bitmap.height / 8; + } +}; + +Sprite_Character.prototype.updateHalfBodySprites = function() { + if (this._bushDepth > 0) { + this.createHalfBodySprites(); + this._upperBody.bitmap = this.bitmap; + this._upperBody.visible = true; + this._upperBody.y = -this._bushDepth; + this._lowerBody.bitmap = this.bitmap; + this._lowerBody.visible = true; + this._upperBody.setBlendColor(this.getBlendColor()); + this._lowerBody.setBlendColor(this.getBlendColor()); + this._upperBody.setColorTone(this.getColorTone()); + this._lowerBody.setColorTone(this.getColorTone()); + this._upperBody.blendMode = this.blendMode; + this._lowerBody.blendMode = this.blendMode; + } else if (this._upperBody) { + this._upperBody.visible = false; + this._lowerBody.visible = false; + } +}; + +Sprite_Character.prototype.createHalfBodySprites = function() { + if (!this._upperBody) { + this._upperBody = new Sprite(); + this._upperBody.anchor.x = 0.5; + this._upperBody.anchor.y = 1; + this.addChild(this._upperBody); + } + if (!this._lowerBody) { + this._lowerBody = new Sprite(); + this._lowerBody.anchor.x = 0.5; + this._lowerBody.anchor.y = 1; + this._lowerBody.opacity = 128; + this.addChild(this._lowerBody); + } +}; + +Sprite_Character.prototype.updatePosition = function() { + this.x = this._character.screenX(); + this.y = this._character.screenY(); + this.z = this._character.screenZ(); +}; + +Sprite_Character.prototype.updateOther = function() { + this.opacity = this._character.opacity(); + this.blendMode = this._character.blendMode(); + this._bushDepth = this._character.bushDepth(); +}; + +//----------------------------------------------------------------------------- +// Sprite_Battler +// +// The superclass of Sprite_Actor and Sprite_Enemy. + +function Sprite_Battler() { + this.initialize(...arguments); +} + +Sprite_Battler.prototype = Object.create(Sprite_Clickable.prototype); +Sprite_Battler.prototype.constructor = Sprite_Battler; + +Sprite_Battler.prototype.initialize = function(battler) { + Sprite_Clickable.prototype.initialize.call(this); + this.initMembers(); + this.setBattler(battler); +}; + +Sprite_Battler.prototype.initMembers = function() { + this.anchor.x = 0.5; + this.anchor.y = 1; + this._battler = null; + this._damages = []; + this._homeX = 0; + this._homeY = 0; + this._offsetX = 0; + this._offsetY = 0; + this._targetOffsetX = NaN; + this._targetOffsetY = NaN; + this._movementDuration = 0; + this._selectionEffectCount = 0; +}; + +Sprite_Battler.prototype.setBattler = function(battler) { + this._battler = battler; +}; + +Sprite_Battler.prototype.checkBattler = function(battler) { + return this._battler === battler; +}; + +Sprite_Battler.prototype.mainSprite = function() { + return this; +}; + +Sprite_Battler.prototype.setHome = function(x, y) { + this._homeX = x; + this._homeY = y; + this.updatePosition(); +}; + +Sprite_Battler.prototype.update = function() { + Sprite_Clickable.prototype.update.call(this); + if (this._battler) { + this.updateMain(); + this.updateDamagePopup(); + this.updateSelectionEffect(); + this.updateVisibility(); + } else { + this.bitmap = null; + } +}; + +Sprite_Battler.prototype.updateVisibility = function() { + Sprite_Clickable.prototype.updateVisibility.call(this); + if (!this._battler || !this._battler.isSpriteVisible()) { + this.visible = false; + } +}; + +Sprite_Battler.prototype.updateMain = function() { + if (this._battler.isSpriteVisible()) { + this.updateBitmap(); + this.updateFrame(); + } + this.updateMove(); + this.updatePosition(); +}; + +Sprite_Battler.prototype.updateBitmap = function() { + // +}; + +Sprite_Battler.prototype.updateFrame = function() { + // +}; + +Sprite_Battler.prototype.updateMove = function() { + if (this._movementDuration > 0) { + const d = this._movementDuration; + this._offsetX = (this._offsetX * (d - 1) + this._targetOffsetX) / d; + this._offsetY = (this._offsetY * (d - 1) + this._targetOffsetY) / d; + this._movementDuration--; + if (this._movementDuration === 0) { + this.onMoveEnd(); + } + } +}; + +Sprite_Battler.prototype.updatePosition = function() { + this.x = this._homeX + this._offsetX; + this.y = this._homeY + this._offsetY; +}; + +Sprite_Battler.prototype.updateDamagePopup = function() { + this.setupDamagePopup(); + if (this._damages.length > 0) { + for (const damage of this._damages) { + damage.update(); + } + if (!this._damages[0].isPlaying()) { + this.destroyDamageSprite(this._damages[0]); + } + } +}; + +Sprite_Battler.prototype.updateSelectionEffect = function() { + const target = this.mainSprite(); + if (this._battler.isSelected()) { + this._selectionEffectCount++; + if (this._selectionEffectCount % 30 < 15) { + target.setBlendColor([255, 255, 255, 64]); + } else { + target.setBlendColor([0, 0, 0, 0]); + } + } else if (this._selectionEffectCount > 0) { + this._selectionEffectCount = 0; + target.setBlendColor([0, 0, 0, 0]); + } +}; + +Sprite_Battler.prototype.setupDamagePopup = function() { + if (this._battler.isDamagePopupRequested()) { + if (this._battler.isSpriteVisible()) { + this.createDamageSprite(); + } + this._battler.clearDamagePopup(); + this._battler.clearResult(); + } +}; + +Sprite_Battler.prototype.createDamageSprite = function() { + const last = this._damages[this._damages.length - 1]; + const sprite = new Sprite_Damage(); + if (last) { + sprite.x = last.x + 8; + sprite.y = last.y - 16; + } else { + sprite.x = this.x + this.damageOffsetX(); + sprite.y = this.y + this.damageOffsetY(); + } + sprite.setup(this._battler); + this._damages.push(sprite); + this.parent.addChild(sprite); +}; + +Sprite_Battler.prototype.destroyDamageSprite = function(sprite) { + this.parent.removeChild(sprite); + this._damages.remove(sprite); + sprite.destroy(); +}; + +Sprite_Battler.prototype.damageOffsetX = function() { + return 0; +}; + +Sprite_Battler.prototype.damageOffsetY = function() { + return 0; +}; + +Sprite_Battler.prototype.startMove = function(x, y, duration) { + if (this._targetOffsetX !== x || this._targetOffsetY !== y) { + this._targetOffsetX = x; + this._targetOffsetY = y; + this._movementDuration = duration; + if (duration === 0) { + this._offsetX = x; + this._offsetY = y; + } + } +}; + +Sprite_Battler.prototype.onMoveEnd = function() { + // +}; + +Sprite_Battler.prototype.isEffecting = function() { + return false; +}; + +Sprite_Battler.prototype.isMoving = function() { + return this._movementDuration > 0; +}; + +Sprite_Battler.prototype.inHomePosition = function() { + return this._offsetX === 0 && this._offsetY === 0; +}; + +Sprite_Battler.prototype.onMouseEnter = function() { + $gameTemp.setTouchState(this._battler, "select"); +}; + +Sprite_Battler.prototype.onPress = function() { + $gameTemp.setTouchState(this._battler, "select"); +}; + +Sprite_Battler.prototype.onClick = function() { + $gameTemp.setTouchState(this._battler, "click"); +}; + +//----------------------------------------------------------------------------- +// Sprite_Actor +// +// The sprite for displaying an actor. + +function Sprite_Actor() { + this.initialize(...arguments); +} + +Sprite_Actor.prototype = Object.create(Sprite_Battler.prototype); +Sprite_Actor.prototype.constructor = Sprite_Actor; + +Sprite_Actor.MOTIONS = { + walk: { index: 0, loop: true }, + wait: { index: 1, loop: true }, + chant: { index: 2, loop: true }, + guard: { index: 3, loop: true }, + damage: { index: 4, loop: false }, + evade: { index: 5, loop: false }, + thrust: { index: 6, loop: false }, + swing: { index: 7, loop: false }, + missile: { index: 8, loop: false }, + skill: { index: 9, loop: false }, + spell: { index: 10, loop: false }, + item: { index: 11, loop: false }, + escape: { index: 12, loop: true }, + victory: { index: 13, loop: true }, + dying: { index: 14, loop: true }, + abnormal: { index: 15, loop: true }, + sleep: { index: 16, loop: true }, + dead: { index: 17, loop: true } +}; + +Sprite_Actor.prototype.initialize = function(battler) { + Sprite_Battler.prototype.initialize.call(this, battler); + this.moveToStartPosition(); +}; + +Sprite_Actor.prototype.initMembers = function() { + Sprite_Battler.prototype.initMembers.call(this); + this._battlerName = ""; + this._motion = null; + this._motionCount = 0; + this._pattern = 0; + this.createShadowSprite(); + this.createWeaponSprite(); + this.createMainSprite(); + this.createStateSprite(); +}; + +Sprite_Actor.prototype.mainSprite = function() { + return this._mainSprite; +}; + +Sprite_Actor.prototype.createMainSprite = function() { + this._mainSprite = new Sprite(); + this._mainSprite.anchor.x = 0.5; + this._mainSprite.anchor.y = 1; + this.addChild(this._mainSprite); +}; + +Sprite_Actor.prototype.createShadowSprite = function() { + this._shadowSprite = new Sprite(); + this._shadowSprite.bitmap = ImageManager.loadSystem("Shadow2"); + this._shadowSprite.anchor.x = 0.5; + this._shadowSprite.anchor.y = 0.5; + this._shadowSprite.y = -2; + this.addChild(this._shadowSprite); +}; + +Sprite_Actor.prototype.createWeaponSprite = function() { + this._weaponSprite = new Sprite_Weapon(); + this.addChild(this._weaponSprite); +}; + +Sprite_Actor.prototype.createStateSprite = function() { + this._stateSprite = new Sprite_StateOverlay(); + this.addChild(this._stateSprite); +}; + +Sprite_Actor.prototype.setBattler = function(battler) { + Sprite_Battler.prototype.setBattler.call(this, battler); + if (battler !== this._actor) { + this._actor = battler; + if (battler) { + this.setActorHome(battler.index()); + } else { + this._mainSprite.bitmap = null; + this._battlerName = ""; + } + this.startEntryMotion(); + this._stateSprite.setup(battler); + } +}; + +Sprite_Actor.prototype.moveToStartPosition = function() { + this.startMove(300, 0, 0); +}; + +Sprite_Actor.prototype.setActorHome = function(index) { + this.setHome(600 + index * 32, 280 + index * 48); +}; + +Sprite_Actor.prototype.update = function() { + Sprite_Battler.prototype.update.call(this); + this.updateShadow(); + if (this._actor) { + this.updateMotion(); + } +}; + +Sprite_Actor.prototype.updateShadow = function() { + this._shadowSprite.visible = !!this._actor; +}; + +Sprite_Actor.prototype.updateMain = function() { + Sprite_Battler.prototype.updateMain.call(this); + if (this._actor.isSpriteVisible() && !this.isMoving()) { + this.updateTargetPosition(); + } +}; + +Sprite_Actor.prototype.setupMotion = function() { + if (this._actor.isMotionRequested()) { + this.startMotion(this._actor.motionType()); + this._actor.clearMotion(); + } +}; + +Sprite_Actor.prototype.setupWeaponAnimation = function() { + if (this._actor.isWeaponAnimationRequested()) { + this._weaponSprite.setup(this._actor.weaponImageId()); + this._actor.clearWeaponAnimation(); + } +}; + +Sprite_Actor.prototype.startMotion = function(motionType) { + const newMotion = Sprite_Actor.MOTIONS[motionType]; + if (this._motion !== newMotion) { + this._motion = newMotion; + this._motionCount = 0; + this._pattern = 0; + } +}; + +Sprite_Actor.prototype.updateTargetPosition = function() { + if (this._actor.canMove() && BattleManager.isEscaped()) { + this.retreat(); + } else if (this.shouldStepForward()) { + this.stepForward(); + } else if (!this.inHomePosition()) { + this.stepBack(); + } +}; + +Sprite_Actor.prototype.shouldStepForward = function() { + return this._actor.isInputting() || this._actor.isActing(); +}; + +Sprite_Actor.prototype.updateBitmap = function() { + Sprite_Battler.prototype.updateBitmap.call(this); + const name = this._actor.battlerName(); + if (this._battlerName !== name) { + this._battlerName = name; + this._mainSprite.bitmap = ImageManager.loadSvActor(name); + } +}; + +Sprite_Actor.prototype.updateFrame = function() { + Sprite_Battler.prototype.updateFrame.call(this); + const bitmap = this._mainSprite.bitmap; + if (bitmap) { + const motionIndex = this._motion ? this._motion.index : 0; + const pattern = this._pattern < 3 ? this._pattern : 1; + const cw = bitmap.width / 9; + const ch = bitmap.height / 6; + const cx = Math.floor(motionIndex / 6) * 3 + pattern; + const cy = motionIndex % 6; + this._mainSprite.setFrame(cx * cw, cy * ch, cw, ch); + this.setFrame(0, 0, cw, ch); + } +}; + +Sprite_Actor.prototype.updateMove = function() { + const bitmap = this._mainSprite.bitmap; + if (!bitmap || bitmap.isReady()) { + Sprite_Battler.prototype.updateMove.call(this); + } +}; + +Sprite_Actor.prototype.updateMotion = function() { + this.setupMotion(); + this.setupWeaponAnimation(); + if (this._actor.isMotionRefreshRequested()) { + this.refreshMotion(); + this._actor.clearMotion(); + } + this.updateMotionCount(); +}; + +Sprite_Actor.prototype.updateMotionCount = function() { + if (this._motion && ++this._motionCount >= this.motionSpeed()) { + if (this._motion.loop) { + this._pattern = (this._pattern + 1) % 4; + } else if (this._pattern < 2) { + this._pattern++; + } else { + this.refreshMotion(); + } + this._motionCount = 0; + } +}; + +Sprite_Actor.prototype.motionSpeed = function() { + return 12; +}; + +Sprite_Actor.prototype.refreshMotion = function() { + const actor = this._actor; + if (actor) { + const stateMotion = actor.stateMotionIndex(); + if (actor.isInputting() || actor.isActing()) { + this.startMotion("walk"); + } else if (stateMotion === 3) { + this.startMotion("dead"); + } else if (stateMotion === 2) { + this.startMotion("sleep"); + } else if (actor.isChanting()) { + this.startMotion("chant"); + } else if (actor.isGuard() || actor.isGuardWaiting()) { + this.startMotion("guard"); + } else if (stateMotion === 1) { + this.startMotion("abnormal"); + } else if (actor.isDying()) { + this.startMotion("dying"); + } else if (actor.isUndecided()) { + this.startMotion("walk"); + } else { + this.startMotion("wait"); + } + } +}; + +Sprite_Actor.prototype.startEntryMotion = function() { + if (this._actor && this._actor.canMove()) { + this.startMotion("walk"); + this.startMove(0, 0, 30); + } else if (!this.isMoving()) { + this.refreshMotion(); + this.startMove(0, 0, 0); + } +}; + +Sprite_Actor.prototype.stepForward = function() { + this.startMove(-48, 0, 12); +}; + +Sprite_Actor.prototype.stepBack = function() { + this.startMove(0, 0, 12); +}; + +Sprite_Actor.prototype.retreat = function() { + this.startMove(300, 0, 30); +}; + +Sprite_Actor.prototype.onMoveEnd = function() { + Sprite_Battler.prototype.onMoveEnd.call(this); + if (!BattleManager.isBattleEnd()) { + this.refreshMotion(); + } +}; + +Sprite_Actor.prototype.damageOffsetX = function() { + return Sprite_Battler.prototype.damageOffsetX.call(this) - 32; +}; + +Sprite_Actor.prototype.damageOffsetY = function() { + return Sprite_Battler.prototype.damageOffsetY.call(this); +}; + +//----------------------------------------------------------------------------- +// Sprite_Enemy +// +// The sprite for displaying an enemy. + +function Sprite_Enemy() { + this.initialize(...arguments); +} + +Sprite_Enemy.prototype = Object.create(Sprite_Battler.prototype); +Sprite_Enemy.prototype.constructor = Sprite_Enemy; + +Sprite_Enemy.prototype.initialize = function(battler) { + Sprite_Battler.prototype.initialize.call(this, battler); +}; + +Sprite_Enemy.prototype.initMembers = function() { + Sprite_Battler.prototype.initMembers.call(this); + this._enemy = null; + this._appeared = false; + this._battlerName = ""; + this._battlerHue = 0; + this._effectType = null; + this._effectDuration = 0; + this._shake = 0; + this.createStateIconSprite(); +}; + +Sprite_Enemy.prototype.createStateIconSprite = function() { + this._stateIconSprite = new Sprite_StateIcon(); + this.addChild(this._stateIconSprite); +}; + +Sprite_Enemy.prototype.setBattler = function(battler) { + Sprite_Battler.prototype.setBattler.call(this, battler); + this._enemy = battler; + this.setHome(battler.screenX(), battler.screenY()); + this._stateIconSprite.setup(battler); +}; + +Sprite_Enemy.prototype.update = function() { + Sprite_Battler.prototype.update.call(this); + if (this._enemy) { + this.updateEffect(); + this.updateStateSprite(); + } +}; + +Sprite_Enemy.prototype.updateBitmap = function() { + Sprite_Battler.prototype.updateBitmap.call(this); + const name = this._enemy.battlerName(); + const hue = this._enemy.battlerHue(); + if (this._battlerName !== name || this._battlerHue !== hue) { + this._battlerName = name; + this._battlerHue = hue; + this.loadBitmap(name); + this.setHue(hue); + this.initVisibility(); + } +}; + +Sprite_Enemy.prototype.loadBitmap = function(name) { + if ($gameSystem.isSideView()) { + this.bitmap = ImageManager.loadSvEnemy(name); + } else { + this.bitmap = ImageManager.loadEnemy(name); + } +}; + +Sprite_Enemy.prototype.setHue = function(hue) { + Sprite_Battler.prototype.setHue.call(this, hue); + for (const child of this.children) { + if (child.setHue) { + child.setHue(-hue); + } + } +}; + +Sprite_Enemy.prototype.updateFrame = function() { + Sprite_Battler.prototype.updateFrame.call(this); + if (this._effectType === "bossCollapse") { + this.setFrame(0, 0, this.bitmap.width, this._effectDuration); + } else { + this.setFrame(0, 0, this.bitmap.width, this.bitmap.height); + } +}; + +Sprite_Enemy.prototype.updatePosition = function() { + Sprite_Battler.prototype.updatePosition.call(this); + this.x += this._shake; +}; + +Sprite_Enemy.prototype.updateStateSprite = function() { + this._stateIconSprite.y = -Math.round((this.bitmap.height + 40) * 0.9); + if (this._stateIconSprite.y < 20 - this.y) { + this._stateIconSprite.y = 20 - this.y; + } +}; + +Sprite_Enemy.prototype.initVisibility = function() { + this._appeared = this._enemy.isAlive(); + if (!this._appeared) { + this.opacity = 0; + } +}; + +Sprite_Enemy.prototype.setupEffect = function() { + if (this._appeared && this._enemy.isEffectRequested()) { + this.startEffect(this._enemy.effectType()); + this._enemy.clearEffect(); + } + if (!this._appeared && this._enemy.isAlive()) { + this.startEffect("appear"); + } else if (this._appeared && this._enemy.isHidden()) { + this.startEffect("disappear"); + } +}; + +Sprite_Enemy.prototype.startEffect = function(effectType) { + this._effectType = effectType; + switch (this._effectType) { + case "appear": + this.startAppear(); + break; + case "disappear": + this.startDisappear(); + break; + case "whiten": + this.startWhiten(); + break; + case "blink": + this.startBlink(); + break; + case "collapse": + this.startCollapse(); + break; + case "bossCollapse": + this.startBossCollapse(); + break; + case "instantCollapse": + this.startInstantCollapse(); + break; + } + this.revertToNormal(); +}; + +Sprite_Enemy.prototype.startAppear = function() { + this._effectDuration = 16; + this._appeared = true; +}; + +Sprite_Enemy.prototype.startDisappear = function() { + this._effectDuration = 32; + this._appeared = false; +}; + +Sprite_Enemy.prototype.startWhiten = function() { + this._effectDuration = 16; +}; + +Sprite_Enemy.prototype.startBlink = function() { + this._effectDuration = 20; +}; + +Sprite_Enemy.prototype.startCollapse = function() { + this._effectDuration = 32; + this._appeared = false; +}; + +Sprite_Enemy.prototype.startBossCollapse = function() { + this._effectDuration = this.bitmap.height; + this._appeared = false; +}; + +Sprite_Enemy.prototype.startInstantCollapse = function() { + this._effectDuration = 16; + this._appeared = false; +}; + +Sprite_Enemy.prototype.updateEffect = function() { + this.setupEffect(); + if (this._effectDuration > 0) { + this._effectDuration--; + switch (this._effectType) { + case "whiten": + this.updateWhiten(); + break; + case "blink": + this.updateBlink(); + break; + case "appear": + this.updateAppear(); + break; + case "disappear": + this.updateDisappear(); + break; + case "collapse": + this.updateCollapse(); + break; + case "bossCollapse": + this.updateBossCollapse(); + break; + case "instantCollapse": + this.updateInstantCollapse(); + break; + } + if (this._effectDuration === 0) { + this._effectType = null; + } + } +}; + +Sprite_Enemy.prototype.isEffecting = function() { + return this._effectType !== null; +}; + +Sprite_Enemy.prototype.revertToNormal = function() { + this._shake = 0; + this.blendMode = 0; + this.opacity = 255; + this.setBlendColor([0, 0, 0, 0]); +}; + +Sprite_Enemy.prototype.updateWhiten = function() { + const alpha = 128 - (16 - this._effectDuration) * 8; + this.setBlendColor([255, 255, 255, alpha]); +}; + +Sprite_Enemy.prototype.updateBlink = function() { + this.opacity = this._effectDuration % 10 < 5 ? 255 : 0; +}; + +Sprite_Enemy.prototype.updateAppear = function() { + this.opacity = (16 - this._effectDuration) * 16; +}; + +Sprite_Enemy.prototype.updateDisappear = function() { + this.opacity = 256 - (32 - this._effectDuration) * 10; +}; + +Sprite_Enemy.prototype.updateCollapse = function() { + this.blendMode = 1; + this.setBlendColor([255, 128, 128, 128]); + this.opacity *= this._effectDuration / (this._effectDuration + 1); +}; + +Sprite_Enemy.prototype.updateBossCollapse = function() { + this._shake = (this._effectDuration % 2) * 4 - 2; + this.blendMode = 1; + this.opacity *= this._effectDuration / (this._effectDuration + 1); + this.setBlendColor([255, 255, 255, 255 - this.opacity]); + if (this._effectDuration % 20 === 19) { + SoundManager.playBossCollapse2(); + } +}; + +Sprite_Enemy.prototype.updateInstantCollapse = function() { + this.opacity = 0; +}; + +Sprite_Enemy.prototype.damageOffsetX = function() { + return Sprite_Battler.prototype.damageOffsetX.call(this); +}; + +Sprite_Enemy.prototype.damageOffsetY = function() { + return Sprite_Battler.prototype.damageOffsetY.call(this) - 8; +}; + +//----------------------------------------------------------------------------- +// Sprite_Animation +// +// The sprite for displaying an animation. + +function Sprite_Animation() { + this.initialize(...arguments); +} + +Sprite_Animation.prototype = Object.create(Sprite.prototype); +Sprite_Animation.prototype.constructor = Sprite_Animation; + +Sprite_Animation.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.initMembers(); +}; + +Sprite_Animation.prototype.initMembers = function() { + this._targets = []; + this._animation = null; + this._mirror = false; + this._delay = 0; + this._previous = null; + this._effect = null; + this._handle = null; + this._playing = false; + this._started = false; + this._frameIndex = 0; + this._maxTimingFrames = 0; + this._flashColor = [0, 0, 0, 0]; + this._flashDuration = 0; + this._viewportSize = 4096; + this.z = 8; +}; + +Sprite_Animation.prototype.destroy = function(options) { + Sprite.prototype.destroy.call(this, options); + if (this._handle) { + this._handle.stop(); + } + this._effect = null; + this._handle = null; + this._playing = false; + this._started = false; +}; + +// prettier-ignore +Sprite_Animation.prototype.setup = function( + targets, animation, mirror, delay, previous +) { + this._targets = targets; + this._animation = animation; + this._mirror = mirror; + this._delay = delay; + this._previous = previous; + this._effect = EffectManager.load(animation.effectName); + this._playing = true; + const timings = animation.soundTimings.concat(animation.flashTimings); + for (const timing of timings) { + if (timing.frame > this._maxTimingFrames) { + this._maxTimingFrames = timing.frame; + } + } +}; + +Sprite_Animation.prototype.update = function() { + Sprite.prototype.update.call(this); + if (this._delay > 0) { + this._delay--; + } else if (this._playing) { + if (!this._started && this.canStart()) { + if (this._effect) { + if (this._effect.isLoaded) { + this._handle = Graphics.effekseer.play(this._effect); + this._started = true; + } else { + EffectManager.checkErrors(); + } + } else { + this._started = true; + } + } + if (this._started) { + this.updateEffectGeometry(); + this.updateMain(); + this.updateFlash(); + } + } +}; + +Sprite_Animation.prototype.canStart = function() { + if (this._previous && this.shouldWaitForPrevious()) { + return !this._previous.isPlaying(); + } else { + return true; + } +}; + +Sprite_Animation.prototype.shouldWaitForPrevious = function() { + // [Note] Older versions of Effekseer were very heavy on some mobile + // devices. We don't need this anymore. + return false; +}; + +Sprite_Animation.prototype.updateEffectGeometry = function() { + const scale = this._animation.scale / 100; + const r = Math.PI / 180; + const rx = this._animation.rotation.x * r; + const ry = this._animation.rotation.y * r; + const rz = this._animation.rotation.z * r; + if (this._handle) { + this._handle.setLocation(0, 0, 0); + this._handle.setRotation(rx, ry, rz); + this._handle.setScale(scale, scale, scale); + this._handle.setSpeed(this._animation.speed / 100); + } +}; + +Sprite_Animation.prototype.updateMain = function() { + this.processSoundTimings(); + this.processFlashTimings(); + this._frameIndex++; + this.checkEnd(); +}; + +Sprite_Animation.prototype.processSoundTimings = function() { + for (const timing of this._animation.soundTimings) { + if (timing.frame === this._frameIndex) { + AudioManager.playSe(timing.se); + } + } +}; + +Sprite_Animation.prototype.processFlashTimings = function() { + for (const timing of this._animation.flashTimings) { + if (timing.frame === this._frameIndex) { + this._flashColor = timing.color.clone(); + this._flashDuration = timing.duration; + } + } +}; + +Sprite_Animation.prototype.checkEnd = function() { + if ( + this._frameIndex > this._maxTimingFrames && + this._flashDuration === 0 && + !(this._handle && this._handle.exists) + ) { + this._playing = false; + } +}; + +Sprite_Animation.prototype.updateFlash = function() { + if (this._flashDuration > 0) { + const d = this._flashDuration--; + this._flashColor[3] *= (d - 1) / d; + for (const target of this._targets) { + target.setBlendColor(this._flashColor); + } + } +}; + +Sprite_Animation.prototype.isPlaying = function() { + return this._playing; +}; + +Sprite_Animation.prototype.setRotation = function(x, y, z) { + if (this._handle) { + this._handle.setRotation(x, y, z); + } +}; + +Sprite_Animation.prototype._render = function(renderer) { + if (this._targets.length > 0 && this._handle && this._handle.exists) { + this.onBeforeRender(renderer); + this.setProjectionMatrix(renderer); + this.setCameraMatrix(renderer); + this.setViewport(renderer); + Graphics.effekseer.beginDraw(); + Graphics.effekseer.drawHandle(this._handle); + Graphics.effekseer.endDraw(); + this.resetViewport(renderer); + this.onAfterRender(renderer); + } +}; + +Sprite_Animation.prototype.setProjectionMatrix = function(renderer) { + const x = this._mirror ? -1 : 1; + const y = -1; + const p = -(this._viewportSize / renderer.view.height); + // prettier-ignore + Graphics.effekseer.setProjectionMatrix([ + x, 0, 0, 0, + 0, y, 0, 0, + 0, 0, 1, p, + 0, 0, 0, 1, + ]); +}; + +Sprite_Animation.prototype.setCameraMatrix = function(/*renderer*/) { + // prettier-ignore + Graphics.effekseer.setCameraMatrix([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, -10, 1 + ]); +}; + +Sprite_Animation.prototype.setViewport = function(renderer) { + const vw = this._viewportSize; + const vh = this._viewportSize; + const vx = this._animation.offsetX - vw / 2; + const vy = this._animation.offsetY - vh / 2; + const pos = this.targetPosition(renderer); + renderer.gl.viewport(vx + pos.x, vy + pos.y, vw, vh); +}; + +Sprite_Animation.prototype.targetPosition = function(renderer) { + const pos = new Point(); + if (this._animation.displayType === 2) { + pos.x = renderer.view.width / 2; + pos.y = renderer.view.height / 2; + } else { + for (const target of this._targets) { + const tpos = this.targetSpritePosition(target); + pos.x += tpos.x; + pos.y += tpos.y; + } + pos.x /= this._targets.length; + pos.y /= this._targets.length; + } + return pos; +}; + +Sprite_Animation.prototype.targetSpritePosition = function(sprite) { + const point = new Point(0, -sprite.height / 2); + if (this._animation.alignBottom) { + point.y = 0; + } + sprite.updateTransform(); + return sprite.worldTransform.apply(point); +}; + +Sprite_Animation.prototype.resetViewport = function(renderer) { + renderer.gl.viewport(0, 0, renderer.view.width, renderer.view.height); +}; + +Sprite_Animation.prototype.onBeforeRender = function(renderer) { + renderer.batch.flush(); + renderer.geometry.reset(); +}; + +Sprite_Animation.prototype.onAfterRender = function(renderer) { + renderer.texture.reset(); + renderer.geometry.reset(); + renderer.state.reset(); + renderer.shader.reset(); + renderer.framebuffer.reset(); +}; + +//----------------------------------------------------------------------------- +// Sprite_AnimationMV +// +// The sprite for displaying an old format animation. + +function Sprite_AnimationMV() { + this.initialize(...arguments); +} + +Sprite_AnimationMV.prototype = Object.create(Sprite.prototype); +Sprite_AnimationMV.prototype.constructor = Sprite_AnimationMV; + +Sprite_AnimationMV.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.initMembers(); +}; + +Sprite_AnimationMV.prototype.initMembers = function() { + this._targets = []; + this._animation = null; + this._mirror = false; + this._delay = 0; + this._rate = 4; + this._duration = 0; + this._flashColor = [0, 0, 0, 0]; + this._flashDuration = 0; + this._screenFlashDuration = 0; + this._hidingDuration = 0; + this._hue1 = 0; + this._hue2 = 0; + this._bitmap1 = null; + this._bitmap2 = null; + this._cellSprites = []; + this._screenFlashSprite = null; + this.z = 8; +}; + +// prettier-ignore +Sprite_AnimationMV.prototype.setup = function( + targets, animation, mirror, delay +) { + this._targets = targets; + this._animation = animation; + this._mirror = mirror; + this._delay = delay; + if (this._animation) { + this.setupRate(); + this.setupDuration(); + this.loadBitmaps(); + this.createCellSprites(); + this.createScreenFlashSprite(); + } +}; + +Sprite_AnimationMV.prototype.setupRate = function() { + this._rate = 4; +}; + +Sprite_AnimationMV.prototype.setupDuration = function() { + this._duration = this._animation.frames.length * this._rate + 1; +}; + +Sprite_AnimationMV.prototype.update = function() { + Sprite.prototype.update.call(this); + this.updateMain(); + this.updateFlash(); + this.updateScreenFlash(); + this.updateHiding(); +}; + +Sprite_AnimationMV.prototype.updateFlash = function() { + if (this._flashDuration > 0) { + const d = this._flashDuration--; + this._flashColor[3] *= (d - 1) / d; + for (const target of this._targets) { + target.setBlendColor(this._flashColor); + } + } +}; + +Sprite_AnimationMV.prototype.updateScreenFlash = function() { + if (this._screenFlashDuration > 0) { + const d = this._screenFlashDuration--; + if (this._screenFlashSprite) { + this._screenFlashSprite.x = -this.absoluteX(); + this._screenFlashSprite.y = -this.absoluteY(); + this._screenFlashSprite.opacity *= (d - 1) / d; + this._screenFlashSprite.visible = this._screenFlashDuration > 0; + } + } +}; + +Sprite_AnimationMV.prototype.absoluteX = function() { + let x = 0; + let object = this; + while (object) { + x += object.x; + object = object.parent; + } + return x; +}; + +Sprite_AnimationMV.prototype.absoluteY = function() { + let y = 0; + let object = this; + while (object) { + y += object.y; + object = object.parent; + } + return y; +}; + +Sprite_AnimationMV.prototype.updateHiding = function() { + if (this._hidingDuration > 0) { + this._hidingDuration--; + if (this._hidingDuration === 0) { + for (const target of this._targets) { + target.show(); + } + } + } +}; + +Sprite_AnimationMV.prototype.isPlaying = function() { + return this._duration > 0; +}; + +Sprite_AnimationMV.prototype.loadBitmaps = function() { + const name1 = this._animation.animation1Name; + const name2 = this._animation.animation2Name; + this._hue1 = this._animation.animation1Hue; + this._hue2 = this._animation.animation2Hue; + this._bitmap1 = ImageManager.loadAnimation(name1); + this._bitmap2 = ImageManager.loadAnimation(name2); +}; + +Sprite_AnimationMV.prototype.isReady = function() { + return ( + this._bitmap1 && + this._bitmap1.isReady() && + this._bitmap2 && + this._bitmap2.isReady() + ); +}; + +Sprite_AnimationMV.prototype.createCellSprites = function() { + this._cellSprites = []; + for (let i = 0; i < 16; i++) { + const sprite = new Sprite(); + sprite.anchor.x = 0.5; + sprite.anchor.y = 0.5; + this._cellSprites.push(sprite); + this.addChild(sprite); + } +}; + +Sprite_AnimationMV.prototype.createScreenFlashSprite = function() { + this._screenFlashSprite = new ScreenSprite(); + this.addChild(this._screenFlashSprite); +}; + +Sprite_AnimationMV.prototype.updateMain = function() { + if (this.isPlaying() && this.isReady()) { + if (this._delay > 0) { + this._delay--; + } else { + this._duration--; + this.updatePosition(); + if (this._duration % this._rate === 0) { + this.updateFrame(); + } + if (this._duration <= 0) { + this.onEnd(); + } + } + } +}; + +Sprite_AnimationMV.prototype.updatePosition = function() { + if (this._animation.position === 3) { + this.x = this.parent.width / 2; + this.y = this.parent.height / 2; + } else if (this._targets.length > 0) { + const target = this._targets[0]; + const parent = target.parent; + const grandparent = parent ? parent.parent : null; + this.x = target.x; + this.y = target.y; + if (this.parent === grandparent) { + this.x += parent.x; + this.y += parent.y; + } + if (this._animation.position === 0) { + this.y -= target.height; + } else if (this._animation.position === 1) { + this.y -= target.height / 2; + } + } +}; + +Sprite_AnimationMV.prototype.updateFrame = function() { + if (this._duration > 0) { + const frameIndex = this.currentFrameIndex(); + this.updateAllCellSprites(this._animation.frames[frameIndex]); + for (const timing of this._animation.timings) { + if (timing.frame === frameIndex) { + this.processTimingData(timing); + } + } + } +}; + +Sprite_AnimationMV.prototype.currentFrameIndex = function() { + return ( + this._animation.frames.length - + Math.floor((this._duration + this._rate - 1) / this._rate) + ); +}; + +Sprite_AnimationMV.prototype.updateAllCellSprites = function(frame) { + if (this._targets.length > 0) { + for (let i = 0; i < this._cellSprites.length; i++) { + const sprite = this._cellSprites[i]; + if (i < frame.length) { + this.updateCellSprite(sprite, frame[i]); + } else { + sprite.visible = false; + } + } + } +}; + +Sprite_AnimationMV.prototype.updateCellSprite = function(sprite, cell) { + const pattern = cell[0]; + if (pattern >= 0) { + const sx = (pattern % 5) * 192; + const sy = Math.floor((pattern % 100) / 5) * 192; + const mirror = this._mirror; + sprite.bitmap = pattern < 100 ? this._bitmap1 : this._bitmap2; + sprite.setHue(pattern < 100 ? this._hue1 : this._hue2); + sprite.setFrame(sx, sy, 192, 192); + sprite.x = cell[1]; + sprite.y = cell[2]; + sprite.rotation = (cell[4] * Math.PI) / 180; + sprite.scale.x = cell[3] / 100; + + if (cell[5]) { + sprite.scale.x *= -1; + } + if (mirror) { + sprite.x *= -1; + sprite.rotation *= -1; + sprite.scale.x *= -1; + } + + sprite.scale.y = cell[3] / 100; + sprite.opacity = cell[6]; + sprite.blendMode = cell[7]; + sprite.visible = true; + } else { + sprite.visible = false; + } +}; + +Sprite_AnimationMV.prototype.processTimingData = function(timing) { + const duration = timing.flashDuration * this._rate; + switch (timing.flashScope) { + case 1: + this.startFlash(timing.flashColor, duration); + break; + case 2: + this.startScreenFlash(timing.flashColor, duration); + break; + case 3: + this.startHiding(duration); + break; + } + if (timing.se) { + AudioManager.playSe(timing.se); + } +}; + +Sprite_AnimationMV.prototype.startFlash = function(color, duration) { + this._flashColor = color.clone(); + this._flashDuration = duration; +}; + +Sprite_AnimationMV.prototype.startScreenFlash = function(color, duration) { + this._screenFlashDuration = duration; + if (this._screenFlashSprite) { + this._screenFlashSprite.setColor(color[0], color[1], color[2]); + this._screenFlashSprite.opacity = color[3]; + } +}; + +Sprite_AnimationMV.prototype.startHiding = function(duration) { + this._hidingDuration = duration; + for (const target of this._targets) { + target.hide(); + } +}; + +Sprite_AnimationMV.prototype.onEnd = function() { + this._flashDuration = 0; + this._screenFlashDuration = 0; + this._hidingDuration = 0; + for (const target of this._targets) { + target.setBlendColor([0, 0, 0, 0]); + target.show(); + } +}; + +//----------------------------------------------------------------------------- +// Sprite_Battleback +// +// The sprite for displaying a background image in battle. + +function Sprite_Battleback() { + this.initialize(...arguments); +} + +Sprite_Battleback.prototype = Object.create(TilingSprite.prototype); +Sprite_Battleback.prototype.constructor = Sprite_Battleback; + +Sprite_Battleback.prototype.initialize = function(type) { + TilingSprite.prototype.initialize.call(this); + if (type === 0) { + this.bitmap = this.battleback1Bitmap(); + } else { + this.bitmap = this.battleback2Bitmap(); + } +}; + +Sprite_Battleback.prototype.adjustPosition = function() { + this.width = Math.floor((1000 * Graphics.width) / 816); + this.height = Math.floor((740 * Graphics.height) / 624); + this.x = (Graphics.width - this.width) / 2; + if ($gameSystem.isSideView()) { + this.y = Graphics.height - this.height; + } else { + this.y = 0; + } + const ratioX = this.width / this.bitmap.width; + const ratioY = this.height / this.bitmap.height; + const scale = Math.max(ratioX, ratioY, 1.0); + this.scale.x = scale; + this.scale.y = scale; +}; + +Sprite_Battleback.prototype.battleback1Bitmap = function() { + return ImageManager.loadBattleback1(this.battleback1Name()); +}; + +Sprite_Battleback.prototype.battleback2Bitmap = function() { + return ImageManager.loadBattleback2(this.battleback2Name()); +}; + +Sprite_Battleback.prototype.battleback1Name = function() { + if (BattleManager.isBattleTest()) { + return $dataSystem.battleback1Name; + } else if ($gameMap.battleback1Name() !== null) { + return $gameMap.battleback1Name(); + } else if ($gameMap.isOverworld()) { + return this.overworldBattleback1Name(); + } else { + return ""; + } +}; + +Sprite_Battleback.prototype.battleback2Name = function() { + if (BattleManager.isBattleTest()) { + return $dataSystem.battleback2Name; + } else if ($gameMap.battleback2Name() !== null) { + return $gameMap.battleback2Name(); + } else if ($gameMap.isOverworld()) { + return this.overworldBattleback2Name(); + } else { + return ""; + } +}; + +Sprite_Battleback.prototype.overworldBattleback1Name = function() { + if ($gamePlayer.isInVehicle()) { + return this.shipBattleback1Name(); + } else { + return this.normalBattleback1Name(); + } +}; + +Sprite_Battleback.prototype.overworldBattleback2Name = function() { + if ($gamePlayer.isInVehicle()) { + return this.shipBattleback2Name(); + } else { + return this.normalBattleback2Name(); + } +}; + +Sprite_Battleback.prototype.normalBattleback1Name = function() { + return ( + this.terrainBattleback1Name(this.autotileType(1)) || + this.terrainBattleback1Name(this.autotileType(0)) || + this.defaultBattleback1Name() + ); +}; + +Sprite_Battleback.prototype.normalBattleback2Name = function() { + return ( + this.terrainBattleback2Name(this.autotileType(1)) || + this.terrainBattleback2Name(this.autotileType(0)) || + this.defaultBattleback2Name() + ); +}; + +Sprite_Battleback.prototype.terrainBattleback1Name = function(type) { + switch (type) { + case 24: + case 25: + return "Wasteland"; + case 26: + case 27: + return "DirtField"; + case 32: + case 33: + return "Desert"; + case 34: + return "Lava1"; + case 35: + return "Lava2"; + case 40: + case 41: + return "Snowfield"; + case 42: + return "Clouds"; + case 4: + case 5: + return "PoisonSwamp"; + default: + return null; + } +}; + +Sprite_Battleback.prototype.terrainBattleback2Name = function(type) { + switch (type) { + case 20: + case 21: + return "Forest"; + case 22: + case 30: + case 38: + return "Cliff"; + case 24: + case 25: + case 26: + case 27: + return "Wasteland"; + case 32: + case 33: + return "Desert"; + case 34: + case 35: + return "Lava"; + case 40: + case 41: + return "Snowfield"; + case 42: + return "Clouds"; + case 4: + case 5: + return "PoisonSwamp"; + } +}; + +Sprite_Battleback.prototype.defaultBattleback1Name = function() { + return "Grassland"; +}; + +Sprite_Battleback.prototype.defaultBattleback2Name = function() { + return "Grassland"; +}; + +Sprite_Battleback.prototype.shipBattleback1Name = function() { + return "Ship"; +}; + +Sprite_Battleback.prototype.shipBattleback2Name = function() { + return "Ship"; +}; + +Sprite_Battleback.prototype.autotileType = function(z) { + return $gameMap.autotileType($gamePlayer.x, $gamePlayer.y, z); +}; + +//----------------------------------------------------------------------------- +// Sprite_Damage +// +// The sprite for displaying a popup damage. + +function Sprite_Damage() { + this.initialize(...arguments); +} + +Sprite_Damage.prototype = Object.create(Sprite.prototype); +Sprite_Damage.prototype.constructor = Sprite_Damage; + +Sprite_Damage.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this._duration = 90; + this._flashColor = [0, 0, 0, 0]; + this._flashDuration = 0; + this._colorType = 0; +}; + +Sprite_Damage.prototype.destroy = function(options) { + for (const child of this.children) { + if (child.bitmap) { + child.bitmap.destroy(); + } + } + Sprite.prototype.destroy.call(this, options); +}; + +Sprite_Damage.prototype.setup = function(target) { + const result = target.result(); + if (result.missed || result.evaded) { + this._colorType = 0; + this.createMiss(); + } else if (result.hpAffected) { + this._colorType = result.hpDamage >= 0 ? 0 : 1; + this.createDigits(result.hpDamage); + } else if (target.isAlive() && result.mpDamage !== 0) { + this._colorType = result.mpDamage >= 0 ? 2 : 3; + this.createDigits(result.mpDamage); + } + if (result.critical) { + this.setupCriticalEffect(); + } +}; + +Sprite_Damage.prototype.setupCriticalEffect = function() { + this._flashColor = [255, 0, 0, 160]; + this._flashDuration = 60; +}; + +Sprite_Damage.prototype.fontFace = function() { + return $gameSystem.numberFontFace(); +}; + +Sprite_Damage.prototype.fontSize = function() { + return $gameSystem.mainFontSize() + 4; +}; + +Sprite_Damage.prototype.damageColor = function() { + return ColorManager.damageColor(this._colorType); +}; + +Sprite_Damage.prototype.outlineColor = function() { + return "rgba(0, 0, 0, 0.7)"; +}; + +Sprite_Damage.prototype.outlineWidth = function() { + return 4; +}; + +Sprite_Damage.prototype.createMiss = function() { + const h = this.fontSize(); + const w = Math.floor(h * 3.0); + const sprite = this.createChildSprite(w, h); + sprite.bitmap.drawText("Miss", 0, 0, w, h, "center"); + sprite.dy = 0; +}; + +Sprite_Damage.prototype.createDigits = function(value) { + const string = Math.abs(value).toString(); + const h = this.fontSize(); + const w = Math.floor(h * 0.75); + for (let i = 0; i < string.length; i++) { + const sprite = this.createChildSprite(w, h); + sprite.bitmap.drawText(string[i], 0, 0, w, h, "center"); + sprite.x = (i - (string.length - 1) / 2) * w; + sprite.dy = -i; + } +}; + +Sprite_Damage.prototype.createChildSprite = function(width, height) { + const sprite = new Sprite(); + sprite.bitmap = this.createBitmap(width, height); + sprite.anchor.x = 0.5; + sprite.anchor.y = 1; + sprite.y = -40; + sprite.ry = sprite.y; + this.addChild(sprite); + return sprite; +}; + +Sprite_Damage.prototype.createBitmap = function(width, height) { + const bitmap = new Bitmap(width, height); + bitmap.fontFace = this.fontFace(); + bitmap.fontSize = this.fontSize(); + bitmap.textColor = this.damageColor(); + bitmap.outlineColor = this.outlineColor(); + bitmap.outlineWidth = this.outlineWidth(); + return bitmap; +}; + +Sprite_Damage.prototype.update = function() { + Sprite.prototype.update.call(this); + if (this._duration > 0) { + this._duration--; + for (const child of this.children) { + this.updateChild(child); + } + } + this.updateFlash(); + this.updateOpacity(); +}; + +Sprite_Damage.prototype.updateChild = function(sprite) { + sprite.dy += 0.5; + sprite.ry += sprite.dy; + if (sprite.ry >= 0) { + sprite.ry = 0; + sprite.dy *= -0.6; + } + sprite.y = Math.round(sprite.ry); + sprite.setBlendColor(this._flashColor); +}; + +Sprite_Damage.prototype.updateFlash = function() { + if (this._flashDuration > 0) { + const d = this._flashDuration--; + this._flashColor[3] *= (d - 1) / d; + } +}; + +Sprite_Damage.prototype.updateOpacity = function() { + if (this._duration < 10) { + this.opacity = (255 * this._duration) / 10; + } +}; + +Sprite_Damage.prototype.isPlaying = function() { + return this._duration > 0; +}; + +//----------------------------------------------------------------------------- +// Sprite_Gauge +// +// The sprite for displaying a status gauge. + +function Sprite_Gauge() { + this.initialize(...arguments); +} + +Sprite_Gauge.prototype = Object.create(Sprite.prototype); +Sprite_Gauge.prototype.constructor = Sprite_Gauge; + +Sprite_Gauge.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.initMembers(); + this.createBitmap(); +}; + +Sprite_Gauge.prototype.initMembers = function() { + this._battler = null; + this._statusType = ""; + this._value = NaN; + this._maxValue = NaN; + this._targetValue = NaN; + this._targetMaxValue = NaN; + this._duration = 0; + this._flashingCount = 0; +}; + +Sprite_Gauge.prototype.destroy = function(options) { + this.bitmap.destroy(); + Sprite.prototype.destroy.call(this, options); +}; + +Sprite_Gauge.prototype.createBitmap = function() { + const width = this.bitmapWidth(); + const height = this.bitmapHeight(); + this.bitmap = new Bitmap(width, height); +}; + +Sprite_Gauge.prototype.bitmapWidth = function() { + return 128; +}; + +Sprite_Gauge.prototype.bitmapHeight = function() { + return 32; +}; + +Sprite_Gauge.prototype.textHeight = function() { + return 24; +}; + +Sprite_Gauge.prototype.gaugeHeight = function() { + return 12; +}; + +Sprite_Gauge.prototype.gaugeX = function() { + if (this._statusType === "time") { + return 0; + } else { + return this.measureLabelWidth() + 6; + } +}; + +Sprite_Gauge.prototype.labelY = function() { + return 3; +}; + +Sprite_Gauge.prototype.labelFontFace = function() { + return $gameSystem.mainFontFace(); +}; + +Sprite_Gauge.prototype.labelFontSize = function() { + return $gameSystem.mainFontSize() - 2; +}; + +Sprite_Gauge.prototype.valueFontFace = function() { + return $gameSystem.numberFontFace(); +}; + +Sprite_Gauge.prototype.valueFontSize = function() { + return $gameSystem.mainFontSize() - 6; +}; + +Sprite_Gauge.prototype.setup = function(battler, statusType) { + this._battler = battler; + this._statusType = statusType; + this._value = this.currentValue(); + this._maxValue = this.currentMaxValue(); + this.updateBitmap(); +}; + +Sprite_Gauge.prototype.update = function() { + Sprite.prototype.update.call(this); + this.updateBitmap(); +}; + +Sprite_Gauge.prototype.updateBitmap = function() { + const value = this.currentValue(); + const maxValue = this.currentMaxValue(); + if (value !== this._targetValue || maxValue !== this._targetMaxValue) { + this.updateTargetValue(value, maxValue); + } + this.updateGaugeAnimation(); + this.updateFlashing(); +}; + +Sprite_Gauge.prototype.updateTargetValue = function(value, maxValue) { + this._targetValue = value; + this._targetMaxValue = maxValue; + if (isNaN(this._value)) { + this._value = value; + this._maxValue = maxValue; + this.redraw(); + } else { + this._duration = this.smoothness(); + } +}; + +Sprite_Gauge.prototype.smoothness = function() { + return this._statusType === "time" ? 5 : 20; +}; + +Sprite_Gauge.prototype.updateGaugeAnimation = function() { + if (this._duration > 0) { + const d = this._duration; + this._value = (this._value * (d - 1) + this._targetValue) / d; + this._maxValue = (this._maxValue * (d - 1) + this._targetMaxValue) / d; + this._duration--; + this.redraw(); + } +}; + +Sprite_Gauge.prototype.updateFlashing = function() { + if (this._statusType === "time") { + this._flashingCount++; + if (this._battler.isInputting()) { + if (this._flashingCount % 30 < 15) { + this.setBlendColor(this.flashingColor1()); + } else { + this.setBlendColor(this.flashingColor2()); + } + } else { + this.setBlendColor([0, 0, 0, 0]); + } + } +}; + +Sprite_Gauge.prototype.flashingColor1 = function() { + return [255, 255, 255, 64]; +}; + +Sprite_Gauge.prototype.flashingColor2 = function() { + return [0, 0, 255, 48]; +}; + +Sprite_Gauge.prototype.isValid = function() { + if (this._battler) { + if (this._statusType === "tp" && !this._battler.isPreserveTp()) { + return $gameParty.inBattle(); + } else { + return true; + } + } + return false; +}; + +Sprite_Gauge.prototype.currentValue = function() { + if (this._battler) { + switch (this._statusType) { + case "hp": + return this._battler.hp; + case "mp": + return this._battler.mp; + case "tp": + return this._battler.tp; + case "time": + return this._battler.tpbChargeTime(); + } + } + return NaN; +}; + +Sprite_Gauge.prototype.currentMaxValue = function() { + if (this._battler) { + switch (this._statusType) { + case "hp": + return this._battler.mhp; + case "mp": + return this._battler.mmp; + case "tp": + return this._battler.maxTp(); + case "time": + return 1; + } + } + return NaN; +}; + +Sprite_Gauge.prototype.label = function() { + switch (this._statusType) { + case "hp": + return TextManager.hpA; + case "mp": + return TextManager.mpA; + case "tp": + return TextManager.tpA; + default: + return ""; + } +}; + +Sprite_Gauge.prototype.gaugeBackColor = function() { + return ColorManager.gaugeBackColor(); +}; + +Sprite_Gauge.prototype.gaugeColor1 = function() { + switch (this._statusType) { + case "hp": + return ColorManager.hpGaugeColor1(); + case "mp": + return ColorManager.mpGaugeColor1(); + case "tp": + return ColorManager.tpGaugeColor1(); + case "time": + return ColorManager.ctGaugeColor1(); + default: + return ColorManager.normalColor(); + } +}; + +Sprite_Gauge.prototype.gaugeColor2 = function() { + switch (this._statusType) { + case "hp": + return ColorManager.hpGaugeColor2(); + case "mp": + return ColorManager.mpGaugeColor2(); + case "tp": + return ColorManager.tpGaugeColor2(); + case "time": + return ColorManager.ctGaugeColor2(); + default: + return ColorManager.normalColor(); + } +}; + +Sprite_Gauge.prototype.labelColor = function() { + return ColorManager.systemColor(); +}; + +Sprite_Gauge.prototype.labelOutlineColor = function() { + return ColorManager.outlineColor(); +}; + +Sprite_Gauge.prototype.labelOutlineWidth = function() { + return 3; +}; + +Sprite_Gauge.prototype.valueColor = function() { + switch (this._statusType) { + case "hp": + return ColorManager.hpColor(this._battler); + case "mp": + return ColorManager.mpColor(this._battler); + case "tp": + return ColorManager.tpColor(this._battler); + default: + return ColorManager.normalColor(); + } +}; + +Sprite_Gauge.prototype.valueOutlineColor = function() { + return "rgba(0, 0, 0, 1)"; +}; + +Sprite_Gauge.prototype.valueOutlineWidth = function() { + return 2; +}; + +Sprite_Gauge.prototype.redraw = function() { + this.bitmap.clear(); + const currentValue = this.currentValue(); + if (!isNaN(currentValue)) { + this.drawGauge(); + if (this._statusType !== "time") { + this.drawLabel(); + if (this.isValid()) { + this.drawValue(); + } + } + } +}; + +Sprite_Gauge.prototype.drawGauge = function() { + const gaugeX = this.gaugeX(); + const gaugeY = this.textHeight() - this.gaugeHeight(); + const gaugewidth = this.bitmapWidth() - gaugeX; + const gaugeHeight = this.gaugeHeight(); + this.drawGaugeRect(gaugeX, gaugeY, gaugewidth, gaugeHeight); +}; + +Sprite_Gauge.prototype.drawGaugeRect = function(x, y, width, height) { + const rate = this.gaugeRate(); + const fillW = Math.floor((width - 2) * rate); + const fillH = height - 2; + const color0 = this.gaugeBackColor(); + const color1 = this.gaugeColor1(); + const color2 = this.gaugeColor2(); + this.bitmap.fillRect(x, y, width, height, color0); + this.bitmap.gradientFillRect(x + 1, y + 1, fillW, fillH, color1, color2); +}; + +Sprite_Gauge.prototype.gaugeRate = function() { + if (this.isValid()) { + const value = this._value; + const maxValue = this._maxValue; + return maxValue > 0 ? value / maxValue : 0; + } else { + return 0; + } +}; + +Sprite_Gauge.prototype.drawLabel = function() { + const label = this.label(); + const x = this.labelOutlineWidth() / 2; + const y = this.labelY(); + const width = this.bitmapWidth(); + const height = this.textHeight(); + this.setupLabelFont(); + this.bitmap.paintOpacity = this.labelOpacity(); + this.bitmap.drawText(label, x, y, width, height, "left"); + this.bitmap.paintOpacity = 255; +}; + +Sprite_Gauge.prototype.setupLabelFont = function() { + this.bitmap.fontFace = this.labelFontFace(); + this.bitmap.fontSize = this.labelFontSize(); + this.bitmap.textColor = this.labelColor(); + this.bitmap.outlineColor = this.labelOutlineColor(); + this.bitmap.outlineWidth = this.labelOutlineWidth(); +}; + +Sprite_Gauge.prototype.measureLabelWidth = function() { + this.setupLabelFont(); + const labels = [TextManager.hpA, TextManager.mpA, TextManager.tpA]; + const widths = labels.map(str => this.bitmap.measureTextWidth(str)); + return Math.ceil(Math.max(...widths)); +}; + +Sprite_Gauge.prototype.labelOpacity = function() { + return this.isValid() ? 255 : 160; +}; + +Sprite_Gauge.prototype.drawValue = function() { + const currentValue = this.currentValue(); + const width = this.bitmapWidth(); + const height = this.textHeight(); + this.setupValueFont(); + this.bitmap.drawText(currentValue, 0, 0, width, height, "right"); +}; + +Sprite_Gauge.prototype.setupValueFont = function() { + this.bitmap.fontFace = this.valueFontFace(); + this.bitmap.fontSize = this.valueFontSize(); + this.bitmap.textColor = this.valueColor(); + this.bitmap.outlineColor = this.valueOutlineColor(); + this.bitmap.outlineWidth = this.valueOutlineWidth(); +}; + +//----------------------------------------------------------------------------- +// Sprite_Name +// +// The sprite for displaying a status gauge. + +function Sprite_Name() { + this.initialize(...arguments); +} + +Sprite_Name.prototype = Object.create(Sprite.prototype); +Sprite_Name.prototype.constructor = Sprite_Name; + +Sprite_Name.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.initMembers(); + this.createBitmap(); +}; + +Sprite_Name.prototype.initMembers = function() { + this._battler = null; + this._name = ""; + this._textColor = ""; +}; + +Sprite_Name.prototype.destroy = function(options) { + this.bitmap.destroy(); + Sprite.prototype.destroy.call(this, options); +}; + +Sprite_Name.prototype.createBitmap = function() { + const width = this.bitmapWidth(); + const height = this.bitmapHeight(); + this.bitmap = new Bitmap(width, height); +}; + +Sprite_Name.prototype.bitmapWidth = function() { + return 128; +}; + +Sprite_Name.prototype.bitmapHeight = function() { + return 24; +}; + +Sprite_Name.prototype.fontFace = function() { + return $gameSystem.mainFontFace(); +}; + +Sprite_Name.prototype.fontSize = function() { + return $gameSystem.mainFontSize(); +}; + +Sprite_Name.prototype.setup = function(battler) { + this._battler = battler; + this.updateBitmap(); +}; + +Sprite_Name.prototype.update = function() { + Sprite.prototype.update.call(this); + this.updateBitmap(); +}; + +Sprite_Name.prototype.updateBitmap = function() { + const name = this.name(); + const color = this.textColor(); + if (name !== this._name || color !== this._textColor) { + this._name = name; + this._textColor = color; + this.redraw(); + } +}; + +Sprite_Name.prototype.name = function() { + return this._battler ? this._battler.name() : ""; +}; + +Sprite_Name.prototype.textColor = function() { + return ColorManager.hpColor(this._battler); +}; + +Sprite_Name.prototype.outlineColor = function() { + return ColorManager.outlineColor(); +}; + +Sprite_Name.prototype.outlineWidth = function() { + return 3; +}; + +Sprite_Name.prototype.redraw = function() { + const name = this.name(); + const width = this.bitmapWidth(); + const height = this.bitmapHeight(); + this.setupFont(); + this.bitmap.clear(); + this.bitmap.drawText(name, 0, 0, width, height, "left"); +}; + +Sprite_Name.prototype.setupFont = function() { + this.bitmap.fontFace = this.fontFace(); + this.bitmap.fontSize = this.fontSize(); + this.bitmap.textColor = this.textColor(); + this.bitmap.outlineColor = this.outlineColor(); + this.bitmap.outlineWidth = this.outlineWidth(); +}; + +//----------------------------------------------------------------------------- +// Sprite_StateIcon +// +// The sprite for displaying state icons. + +function Sprite_StateIcon() { + this.initialize(...arguments); +} + +Sprite_StateIcon.prototype = Object.create(Sprite.prototype); +Sprite_StateIcon.prototype.constructor = Sprite_StateIcon; + +Sprite_StateIcon.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.initMembers(); + this.loadBitmap(); +}; + +Sprite_StateIcon.prototype.initMembers = function() { + this._battler = null; + this._iconIndex = 0; + this._animationCount = 0; + this._animationIndex = 0; + this.anchor.x = 0.5; + this.anchor.y = 0.5; +}; + +Sprite_StateIcon.prototype.loadBitmap = function() { + this.bitmap = ImageManager.loadSystem("IconSet"); + this.setFrame(0, 0, 0, 0); +}; + +Sprite_StateIcon.prototype.setup = function(battler) { + if (this._battler !== battler) { + this._battler = battler; + this._animationCount = this.animationWait(); + } +}; + +Sprite_StateIcon.prototype.update = function() { + Sprite.prototype.update.call(this); + this._animationCount++; + if (this._animationCount >= this.animationWait()) { + this.updateIcon(); + this.updateFrame(); + this._animationCount = 0; + } +}; + +Sprite_StateIcon.prototype.animationWait = function() { + return 40; +}; + +Sprite_StateIcon.prototype.updateIcon = function() { + const icons = []; + if (this.shouldDisplay()) { + icons.push(...this._battler.allIcons()); + } + if (icons.length > 0) { + this._animationIndex++; + if (this._animationIndex >= icons.length) { + this._animationIndex = 0; + } + this._iconIndex = icons[this._animationIndex]; + } else { + this._animationIndex = 0; + this._iconIndex = 0; + } +}; + +Sprite_StateIcon.prototype.shouldDisplay = function() { + const battler = this._battler; + return battler && (battler.isActor() || battler.isAlive()); +}; + +Sprite_StateIcon.prototype.updateFrame = function() { + const pw = ImageManager.iconWidth; + const ph = ImageManager.iconHeight; + const sx = (this._iconIndex % 16) * pw; + const sy = Math.floor(this._iconIndex / 16) * ph; + this.setFrame(sx, sy, pw, ph); +}; + +//----------------------------------------------------------------------------- +// Sprite_StateOverlay +// +// The sprite for displaying an overlay image for a state. + +function Sprite_StateOverlay() { + this.initialize(...arguments); +} + +Sprite_StateOverlay.prototype = Object.create(Sprite.prototype); +Sprite_StateOverlay.prototype.constructor = Sprite_StateOverlay; + +Sprite_StateOverlay.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.initMembers(); + this.loadBitmap(); +}; + +Sprite_StateOverlay.prototype.initMembers = function() { + this._battler = null; + this._overlayIndex = 0; + this._animationCount = 0; + this._pattern = 0; + this.anchor.x = 0.5; + this.anchor.y = 1; +}; + +Sprite_StateOverlay.prototype.loadBitmap = function() { + this.bitmap = ImageManager.loadSystem("States"); + this.setFrame(0, 0, 0, 0); +}; + +Sprite_StateOverlay.prototype.setup = function(battler) { + this._battler = battler; +}; + +Sprite_StateOverlay.prototype.update = function() { + Sprite.prototype.update.call(this); + this._animationCount++; + if (this._animationCount >= this.animationWait()) { + this.updatePattern(); + this.updateFrame(); + this._animationCount = 0; + } +}; + +Sprite_StateOverlay.prototype.animationWait = function() { + return 8; +}; + +Sprite_StateOverlay.prototype.updatePattern = function() { + this._pattern++; + this._pattern %= 8; + if (this._battler) { + this._overlayIndex = this._battler.stateOverlayIndex(); + } else { + this._overlayIndex = 0; + } +}; + +Sprite_StateOverlay.prototype.updateFrame = function() { + if (this._overlayIndex > 0) { + const w = 96; + const h = 96; + const sx = this._pattern * w; + const sy = (this._overlayIndex - 1) * h; + this.setFrame(sx, sy, w, h); + } else { + this.setFrame(0, 0, 0, 0); + } +}; + +//----------------------------------------------------------------------------- +// Sprite_Weapon +// +// The sprite for displaying a weapon image for attacking. + +function Sprite_Weapon() { + this.initialize(...arguments); +} + +Sprite_Weapon.prototype = Object.create(Sprite.prototype); +Sprite_Weapon.prototype.constructor = Sprite_Weapon; + +Sprite_Weapon.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.initMembers(); +}; + +Sprite_Weapon.prototype.initMembers = function() { + this._weaponImageId = 0; + this._animationCount = 0; + this._pattern = 0; + this.anchor.x = 0.5; + this.anchor.y = 1; + this.x = -16; +}; + +Sprite_Weapon.prototype.setup = function(weaponImageId) { + this._weaponImageId = weaponImageId; + this._animationCount = 0; + this._pattern = 0; + this.loadBitmap(); + this.updateFrame(); +}; + +Sprite_Weapon.prototype.update = function() { + Sprite.prototype.update.call(this); + this._animationCount++; + if (this._animationCount >= this.animationWait()) { + this.updatePattern(); + this.updateFrame(); + this._animationCount = 0; + } +}; + +Sprite_Weapon.prototype.animationWait = function() { + return 12; +}; + +Sprite_Weapon.prototype.updatePattern = function() { + this._pattern++; + if (this._pattern >= 3) { + this._weaponImageId = 0; + } +}; + +Sprite_Weapon.prototype.loadBitmap = function() { + const pageId = Math.floor((this._weaponImageId - 1) / 12) + 1; + if (pageId >= 1) { + this.bitmap = ImageManager.loadSystem("Weapons" + pageId); + } else { + this.bitmap = ImageManager.loadSystem(""); + } +}; + +Sprite_Weapon.prototype.updateFrame = function() { + if (this._weaponImageId > 0) { + const index = (this._weaponImageId - 1) % 12; + const w = 96; + const h = 64; + const sx = (Math.floor(index / 6) * 3 + this._pattern) * w; + const sy = Math.floor(index % 6) * h; + this.setFrame(sx, sy, w, h); + } else { + this.setFrame(0, 0, 0, 0); + } +}; + +Sprite_Weapon.prototype.isPlaying = function() { + return this._weaponImageId > 0; +}; + +//----------------------------------------------------------------------------- +// Sprite_Balloon +// +// The sprite for displaying a balloon icon. + +function Sprite_Balloon() { + this.initialize(...arguments); +} + +Sprite_Balloon.prototype = Object.create(Sprite.prototype); +Sprite_Balloon.prototype.constructor = Sprite_Balloon; + +Sprite_Balloon.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.initMembers(); + this.loadBitmap(); +}; + +Sprite_Balloon.prototype.initMembers = function() { + this._target = null; + this._balloonId = 0; + this._duration = 0; + this.anchor.x = 0.5; + this.anchor.y = 1; + this.z = 7; +}; + +Sprite_Balloon.prototype.loadBitmap = function() { + this.bitmap = ImageManager.loadSystem("Balloon"); + this.setFrame(0, 0, 0, 0); +}; + +Sprite_Balloon.prototype.setup = function(targetSprite, balloonId) { + this._target = targetSprite; + this._balloonId = balloonId; + this._duration = 8 * this.speed() + this.waitTime(); +}; + +Sprite_Balloon.prototype.update = function() { + Sprite.prototype.update.call(this); + if (this._duration > 0) { + this._duration--; + if (this._duration > 0) { + this.updatePosition(); + this.updateFrame(); + } + } +}; + +Sprite_Balloon.prototype.updatePosition = function() { + this.x = this._target.x; + this.y = this._target.y - this._target.height; +}; + +Sprite_Balloon.prototype.updateFrame = function() { + const w = 48; + const h = 48; + const sx = this.frameIndex() * w; + const sy = (this._balloonId - 1) * h; + this.setFrame(sx, sy, w, h); +}; + +Sprite_Balloon.prototype.speed = function() { + return 8; +}; + +Sprite_Balloon.prototype.waitTime = function() { + return 12; +}; + +Sprite_Balloon.prototype.frameIndex = function() { + const index = (this._duration - this.waitTime()) / this.speed(); + return 7 - Math.max(Math.floor(index), 0); +}; + +Sprite_Balloon.prototype.isPlaying = function() { + return this._duration > 0; +}; + +//----------------------------------------------------------------------------- +// Sprite_Picture +// +// The sprite for displaying a picture. + +function Sprite_Picture() { + this.initialize(...arguments); +} + +Sprite_Picture.prototype = Object.create(Sprite_Clickable.prototype); +Sprite_Picture.prototype.constructor = Sprite_Picture; + +Sprite_Picture.prototype.initialize = function(pictureId) { + Sprite_Clickable.prototype.initialize.call(this); + this._pictureId = pictureId; + this._pictureName = ""; + this.update(); +}; + +Sprite_Picture.prototype.picture = function() { + return $gameScreen.picture(this._pictureId); +}; + +Sprite_Picture.prototype.update = function() { + Sprite_Clickable.prototype.update.call(this); + this.updateBitmap(); + if (this.visible) { + this.updateOrigin(); + this.updatePosition(); + this.updateScale(); + this.updateTone(); + this.updateOther(); + } +}; + +Sprite_Picture.prototype.updateBitmap = function() { + const picture = this.picture(); + if (picture) { + const pictureName = picture.name(); + if (this._pictureName !== pictureName) { + this._pictureName = pictureName; + this.loadBitmap(); + } + this.visible = true; + } else { + this._pictureName = ""; + this.bitmap = null; + this.visible = false; + } +}; + +Sprite_Picture.prototype.updateOrigin = function() { + const picture = this.picture(); + if (picture.origin() === 0) { + this.anchor.x = 0; + this.anchor.y = 0; + } else { + this.anchor.x = 0.5; + this.anchor.y = 0.5; + } +}; + +Sprite_Picture.prototype.updatePosition = function() { + const picture = this.picture(); + this.x = Math.round(picture.x()); + this.y = Math.round(picture.y()); +}; + +Sprite_Picture.prototype.updateScale = function() { + const picture = this.picture(); + this.scale.x = picture.scaleX() / 100; + this.scale.y = picture.scaleY() / 100; +}; + +Sprite_Picture.prototype.updateTone = function() { + const picture = this.picture(); + if (picture.tone()) { + this.setColorTone(picture.tone()); + } else { + this.setColorTone([0, 0, 0, 0]); + } +}; + +Sprite_Picture.prototype.updateOther = function() { + const picture = this.picture(); + this.opacity = picture.opacity(); + this.blendMode = picture.blendMode(); + this.rotation = (picture.angle() * Math.PI) / 180; +}; + +Sprite_Picture.prototype.loadBitmap = function() { + this.bitmap = ImageManager.loadPicture(this._pictureName); +}; + +//----------------------------------------------------------------------------- +// Sprite_Timer +// +// The sprite for displaying the timer. + +function Sprite_Timer() { + this.initialize(...arguments); +} + +Sprite_Timer.prototype = Object.create(Sprite.prototype); +Sprite_Timer.prototype.constructor = Sprite_Timer; + +Sprite_Timer.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this._seconds = 0; + this.createBitmap(); + this.update(); +}; + +Sprite_Timer.prototype.destroy = function(options) { + this.bitmap.destroy(); + Sprite.prototype.destroy.call(this, options); +}; + +Sprite_Timer.prototype.createBitmap = function() { + this.bitmap = new Bitmap(96, 48); + this.bitmap.fontFace = this.fontFace(); + this.bitmap.fontSize = this.fontSize(); + this.bitmap.outlineColor = ColorManager.outlineColor(); +}; + +Sprite_Timer.prototype.fontFace = function() { + return $gameSystem.numberFontFace(); +}; + +Sprite_Timer.prototype.fontSize = function() { + return $gameSystem.mainFontSize() + 8; +}; + +Sprite_Timer.prototype.update = function() { + Sprite.prototype.update.call(this); + this.updateBitmap(); + this.updatePosition(); + this.updateVisibility(); +}; + +Sprite_Timer.prototype.updateBitmap = function() { + if (this._seconds !== $gameTimer.seconds()) { + this._seconds = $gameTimer.seconds(); + this.redraw(); + } +}; + +Sprite_Timer.prototype.redraw = function() { + const text = this.timerText(); + const width = this.bitmap.width; + const height = this.bitmap.height; + this.bitmap.clear(); + this.bitmap.drawText(text, 0, 0, width, height, "center"); +}; + +Sprite_Timer.prototype.timerText = function() { + const min = Math.floor(this._seconds / 60) % 60; + const sec = this._seconds % 60; + return min.padZero(2) + ":" + sec.padZero(2); +}; + +Sprite_Timer.prototype.updatePosition = function() { + this.x = (Graphics.width - this.bitmap.width) / 2; + this.y = 0; +}; + +Sprite_Timer.prototype.updateVisibility = function() { + this.visible = $gameTimer.isWorking(); +}; + +//----------------------------------------------------------------------------- +// Sprite_Destination +// +// The sprite for displaying the destination place of the touch input. + +function Sprite_Destination() { + this.initialize(...arguments); +} + +Sprite_Destination.prototype = Object.create(Sprite.prototype); +Sprite_Destination.prototype.constructor = Sprite_Destination; + +Sprite_Destination.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.createBitmap(); + this._frameCount = 0; +}; + +Sprite_Destination.prototype.destroy = function(options) { + if (this.bitmap) { + this.bitmap.destroy(); + } + Sprite.prototype.destroy.call(this, options); +}; + +Sprite_Destination.prototype.update = function() { + Sprite.prototype.update.call(this); + if ($gameTemp.isDestinationValid()) { + this.updatePosition(); + this.updateAnimation(); + this.visible = true; + } else { + this._frameCount = 0; + this.visible = false; + } +}; + +Sprite_Destination.prototype.createBitmap = function() { + const tileWidth = $gameMap.tileWidth(); + const tileHeight = $gameMap.tileHeight(); + this.bitmap = new Bitmap(tileWidth, tileHeight); + this.bitmap.fillAll("white"); + this.anchor.x = 0.5; + this.anchor.y = 0.5; + this.blendMode = 1; +}; + +Sprite_Destination.prototype.updatePosition = function() { + const tileWidth = $gameMap.tileWidth(); + const tileHeight = $gameMap.tileHeight(); + const x = $gameTemp.destinationX(); + const y = $gameTemp.destinationY(); + this.x = ($gameMap.adjustX(x) + 0.5) * tileWidth; + this.y = ($gameMap.adjustY(y) + 0.5) * tileHeight; +}; + +Sprite_Destination.prototype.updateAnimation = function() { + this._frameCount++; + this._frameCount %= 20; + this.opacity = (20 - this._frameCount) * 6; + this.scale.x = 1 + this._frameCount / 20; + this.scale.y = this.scale.x; +}; + +//----------------------------------------------------------------------------- +// Spriteset_Base +// +// The superclass of Spriteset_Map and Spriteset_Battle. + +function Spriteset_Base() { + this.initialize(...arguments); +} + +Spriteset_Base.prototype = Object.create(Sprite.prototype); +Spriteset_Base.prototype.constructor = Spriteset_Base; + +Spriteset_Base.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.setFrame(0, 0, Graphics.width, Graphics.height); + this.loadSystemImages(); + this.createLowerLayer(); + this.createUpperLayer(); + this._animationSprites = []; +}; + +Spriteset_Base.prototype.destroy = function(options) { + this.removeAllAnimations(); + Sprite.prototype.destroy.call(this, options); +}; + +Spriteset_Base.prototype.loadSystemImages = function() { + // +}; + +Spriteset_Base.prototype.createLowerLayer = function() { + this.createBaseSprite(); + this.createBaseFilters(); +}; + +Spriteset_Base.prototype.createUpperLayer = function() { + this.createPictures(); + this.createTimer(); + this.createOverallFilters(); +}; + +Spriteset_Base.prototype.update = function() { + Sprite.prototype.update.call(this); + this.updateBaseFilters(); + this.updateOverallFilters(); + this.updatePosition(); + this.updateAnimations(); +}; + +Spriteset_Base.prototype.createBaseSprite = function() { + this._baseSprite = new Sprite(); + this._blackScreen = new ScreenSprite(); + this._blackScreen.opacity = 255; + this.addChild(this._baseSprite); + this._baseSprite.addChild(this._blackScreen); +}; + +Spriteset_Base.prototype.createBaseFilters = function() { + this._baseSprite.filters = []; + this._baseColorFilter = new ColorFilter(); + this._baseSprite.filters.push(this._baseColorFilter); +}; + +Spriteset_Base.prototype.createPictures = function() { + const rect = this.pictureContainerRect(); + this._pictureContainer = new Sprite(); + this._pictureContainer.setFrame(rect.x, rect.y, rect.width, rect.height); + for (let i = 1; i <= $gameScreen.maxPictures(); i++) { + this._pictureContainer.addChild(new Sprite_Picture(i)); + } + this.addChild(this._pictureContainer); +}; + +Spriteset_Base.prototype.pictureContainerRect = function() { + return new Rectangle(0, 0, Graphics.width, Graphics.height); +}; + +Spriteset_Base.prototype.createTimer = function() { + this._timerSprite = new Sprite_Timer(); + this.addChild(this._timerSprite); +}; + +Spriteset_Base.prototype.createOverallFilters = function() { + this.filters = []; + this._overallColorFilter = new ColorFilter(); + this.filters.push(this._overallColorFilter); +}; + +Spriteset_Base.prototype.updateBaseFilters = function() { + const filter = this._baseColorFilter; + filter.setColorTone($gameScreen.tone()); +}; + +Spriteset_Base.prototype.updateOverallFilters = function() { + const filter = this._overallColorFilter; + filter.setBlendColor($gameScreen.flashColor()); + filter.setBrightness($gameScreen.brightness()); +}; + +Spriteset_Base.prototype.updatePosition = function() { + const screen = $gameScreen; + const scale = screen.zoomScale(); + this.scale.x = scale; + this.scale.y = scale; + this.x = Math.round(-screen.zoomX() * (scale - 1)); + this.y = Math.round(-screen.zoomY() * (scale - 1)); + this.x += Math.round(screen.shake()); +}; + +Spriteset_Base.prototype.findTargetSprite = function(/*target*/) { + return null; +}; + +Spriteset_Base.prototype.updateAnimations = function() { + for (const sprite of this._animationSprites) { + if (!sprite.isPlaying()) { + this.removeAnimation(sprite); + } + } + this.processAnimationRequests(); +}; + +Spriteset_Base.prototype.processAnimationRequests = function() { + for (;;) { + const request = $gameTemp.retrieveAnimation(); + if (request) { + this.createAnimation(request); + } else { + break; + } + } +}; + +Spriteset_Base.prototype.createAnimation = function(request) { + const animation = $dataAnimations[request.animationId]; + const targets = request.targets; + const mirror = request.mirror; + let delay = this.animationBaseDelay(); + const nextDelay = this.animationNextDelay(); + if (this.isAnimationForEach(animation)) { + for (const target of targets) { + this.createAnimationSprite([target], animation, mirror, delay); + delay += nextDelay; + } + } else { + this.createAnimationSprite(targets, animation, mirror, delay); + } +}; + +// prettier-ignore +Spriteset_Base.prototype.createAnimationSprite = function( + targets, animation, mirror, delay +) { + const mv = this.isMVAnimation(animation); + const sprite = new (mv ? Sprite_AnimationMV : Sprite_Animation)(); + const targetSprites = this.makeTargetSprites(targets); + const baseDelay = this.animationBaseDelay(); + const previous = delay > baseDelay ? this.lastAnimationSprite() : null; + if (this.animationShouldMirror(targets[0])) { + mirror = !mirror; + } + sprite.targetObjects = targets; + sprite.setup(targetSprites, animation, mirror, delay, previous); + this._effectsContainer.addChild(sprite); + this._animationSprites.push(sprite); +}; + +Spriteset_Base.prototype.isMVAnimation = function(animation) { + return !!animation.frames; +}; + +Spriteset_Base.prototype.makeTargetSprites = function(targets) { + const targetSprites = []; + for (const target of targets) { + const targetSprite = this.findTargetSprite(target); + if (targetSprite) { + targetSprites.push(targetSprite); + } + } + return targetSprites; +}; + +Spriteset_Base.prototype.lastAnimationSprite = function() { + return this._animationSprites[this._animationSprites.length - 1]; +}; + +Spriteset_Base.prototype.isAnimationForEach = function(animation) { + const mv = this.isMVAnimation(animation); + return mv ? animation.position !== 3 : animation.displayType === 0; +}; + +Spriteset_Base.prototype.animationBaseDelay = function() { + return 8; +}; + +Spriteset_Base.prototype.animationNextDelay = function() { + return 12; +}; + +Spriteset_Base.prototype.animationShouldMirror = function(target) { + return target && target.isActor && target.isActor(); +}; + +Spriteset_Base.prototype.removeAnimation = function(sprite) { + this._animationSprites.remove(sprite); + this._effectsContainer.removeChild(sprite); + for (const target of sprite.targetObjects) { + if (target.endAnimation) { + target.endAnimation(); + } + } + sprite.destroy(); +}; + +Spriteset_Base.prototype.removeAllAnimations = function() { + for (const sprite of this._animationSprites.clone()) { + this.removeAnimation(sprite); + } +}; + +Spriteset_Base.prototype.isAnimationPlaying = function() { + return this._animationSprites.length > 0; +}; + +//----------------------------------------------------------------------------- +// Spriteset_Map +// +// The set of sprites on the map screen. + +function Spriteset_Map() { + this.initialize(...arguments); +} + +Spriteset_Map.prototype = Object.create(Spriteset_Base.prototype); +Spriteset_Map.prototype.constructor = Spriteset_Map; + +Spriteset_Map.prototype.initialize = function() { + Spriteset_Base.prototype.initialize.call(this); + this._balloonSprites = []; +}; + +Spriteset_Map.prototype.destroy = function(options) { + this.removeAllBalloons(); + Spriteset_Base.prototype.destroy.call(this, options); +}; + +Spriteset_Map.prototype.loadSystemImages = function() { + Spriteset_Base.prototype.loadSystemImages.call(this); + ImageManager.loadSystem("Balloon"); + ImageManager.loadSystem("Shadow1"); +}; + +Spriteset_Map.prototype.createLowerLayer = function() { + Spriteset_Base.prototype.createLowerLayer.call(this); + this.createParallax(); + this.createTilemap(); + this.createCharacters(); + this.createShadow(); + this.createDestination(); + this.createWeather(); +}; + +Spriteset_Map.prototype.update = function() { + Spriteset_Base.prototype.update.call(this); + this.updateTileset(); + this.updateParallax(); + this.updateTilemap(); + this.updateShadow(); + this.updateWeather(); + this.updateAnimations(); + this.updateBalloons(); +}; + +Spriteset_Map.prototype.hideCharacters = function() { + for (const sprite of this._characterSprites) { + if (!sprite.isTile() && !sprite.isObjectCharacter()) { + sprite.hide(); + } + } +}; + +Spriteset_Map.prototype.createParallax = function() { + this._parallax = new TilingSprite(); + this._parallax.move(0, 0, Graphics.width, Graphics.height); + this._baseSprite.addChild(this._parallax); +}; + +Spriteset_Map.prototype.createTilemap = function() { + const tilemap = new Tilemap(); + tilemap.tileWidth = $gameMap.tileWidth(); + tilemap.tileHeight = $gameMap.tileHeight(); + tilemap.setData($gameMap.width(), $gameMap.height(), $gameMap.data()); + tilemap.horizontalWrap = $gameMap.isLoopHorizontal(); + tilemap.verticalWrap = $gameMap.isLoopVertical(); + this._baseSprite.addChild(tilemap); + this._effectsContainer = tilemap; + this._tilemap = tilemap; + this.loadTileset(); +}; + +Spriteset_Map.prototype.loadTileset = function() { + this._tileset = $gameMap.tileset(); + if (this._tileset) { + const bitmaps = []; + const tilesetNames = this._tileset.tilesetNames; + for (const name of tilesetNames) { + bitmaps.push(ImageManager.loadTileset(name)); + } + this._tilemap.setBitmaps(bitmaps); + this._tilemap.flags = $gameMap.tilesetFlags(); + } +}; + +Spriteset_Map.prototype.createCharacters = function() { + this._characterSprites = []; + for (const event of $gameMap.events()) { + this._characterSprites.push(new Sprite_Character(event)); + } + for (const vehicle of $gameMap.vehicles()) { + this._characterSprites.push(new Sprite_Character(vehicle)); + } + for (const follower of $gamePlayer.followers().reverseData()) { + this._characterSprites.push(new Sprite_Character(follower)); + } + this._characterSprites.push(new Sprite_Character($gamePlayer)); + for (const sprite of this._characterSprites) { + this._tilemap.addChild(sprite); + } +}; + +Spriteset_Map.prototype.createShadow = function() { + this._shadowSprite = new Sprite(); + this._shadowSprite.bitmap = ImageManager.loadSystem("Shadow1"); + this._shadowSprite.anchor.x = 0.5; + this._shadowSprite.anchor.y = 1; + this._shadowSprite.z = 6; + this._tilemap.addChild(this._shadowSprite); +}; + +Spriteset_Map.prototype.createDestination = function() { + this._destinationSprite = new Sprite_Destination(); + this._destinationSprite.z = 9; + this._tilemap.addChild(this._destinationSprite); +}; + +Spriteset_Map.prototype.createWeather = function() { + this._weather = new Weather(); + this.addChild(this._weather); +}; + +Spriteset_Map.prototype.updateTileset = function() { + if (this._tileset !== $gameMap.tileset()) { + this.loadTileset(); + } +}; + +Spriteset_Map.prototype.updateParallax = function() { + if (this._parallaxName !== $gameMap.parallaxName()) { + this._parallaxName = $gameMap.parallaxName(); + this._parallax.bitmap = ImageManager.loadParallax(this._parallaxName); + } + if (this._parallax.bitmap) { + const bitmap = this._parallax.bitmap; + this._parallax.origin.x = $gameMap.parallaxOx() % bitmap.width; + this._parallax.origin.y = $gameMap.parallaxOy() % bitmap.height; + } +}; + +Spriteset_Map.prototype.updateTilemap = function() { + this._tilemap.origin.x = $gameMap.displayX() * $gameMap.tileWidth(); + this._tilemap.origin.y = $gameMap.displayY() * $gameMap.tileHeight(); +}; + +Spriteset_Map.prototype.updateShadow = function() { + const airship = $gameMap.airship(); + this._shadowSprite.x = airship.shadowX(); + this._shadowSprite.y = airship.shadowY(); + this._shadowSprite.opacity = airship.shadowOpacity(); +}; + +Spriteset_Map.prototype.updateWeather = function() { + this._weather.type = $gameScreen.weatherType(); + this._weather.power = $gameScreen.weatherPower(); + this._weather.origin.x = $gameMap.displayX() * $gameMap.tileWidth(); + this._weather.origin.y = $gameMap.displayY() * $gameMap.tileHeight(); +}; + +Spriteset_Map.prototype.updateBalloons = function() { + for (const sprite of this._balloonSprites) { + if (!sprite.isPlaying()) { + this.removeBalloon(sprite); + } + } + this.processBalloonRequests(); +}; + +Spriteset_Map.prototype.processBalloonRequests = function() { + for (;;) { + const request = $gameTemp.retrieveBalloon(); + if (request) { + this.createBalloon(request); + } else { + break; + } + } +}; + +Spriteset_Map.prototype.createBalloon = function(request) { + const targetSprite = this.findTargetSprite(request.target); + if (targetSprite) { + const sprite = new Sprite_Balloon(); + sprite.targetObject = request.target; + sprite.setup(targetSprite, request.balloonId); + this._effectsContainer.addChild(sprite); + this._balloonSprites.push(sprite); + } +}; + +Spriteset_Map.prototype.removeBalloon = function(sprite) { + this._balloonSprites.remove(sprite); + this._effectsContainer.removeChild(sprite); + if (sprite.targetObject.endBalloon) { + sprite.targetObject.endBalloon(); + } + sprite.destroy(); +}; + +Spriteset_Map.prototype.removeAllBalloons = function() { + for (const sprite of this._balloonSprites.clone()) { + this.removeBalloon(sprite); + } +}; + +Spriteset_Map.prototype.findTargetSprite = function(target) { + return this._characterSprites.find(sprite => sprite.checkCharacter(target)); +}; + +Spriteset_Map.prototype.animationBaseDelay = function() { + return 0; +}; + +//----------------------------------------------------------------------------- +// Spriteset_Battle +// +// The set of sprites on the battle screen. + +function Spriteset_Battle() { + this.initialize(...arguments); +} + +Spriteset_Battle.prototype = Object.create(Spriteset_Base.prototype); +Spriteset_Battle.prototype.constructor = Spriteset_Battle; + +Spriteset_Battle.prototype.initialize = function() { + Spriteset_Base.prototype.initialize.call(this); + this._battlebackLocated = false; +}; + +Spriteset_Battle.prototype.loadSystemImages = function() { + Spriteset_Base.prototype.loadSystemImages.call(this); + ImageManager.loadSystem("Shadow2"); + ImageManager.loadSystem("Weapons1"); + ImageManager.loadSystem("Weapons2"); + ImageManager.loadSystem("Weapons3"); +}; + +Spriteset_Battle.prototype.createLowerLayer = function() { + Spriteset_Base.prototype.createLowerLayer.call(this); + this.createBackground(); + this.createBattleback(); + this.createBattleField(); + this.createEnemies(); + this.createActors(); +}; + +Spriteset_Battle.prototype.createBackground = function() { + this._backgroundFilter = new PIXI.filters.BlurFilter(); + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = SceneManager.backgroundBitmap(); + this._backgroundSprite.filters = [this._backgroundFilter]; + this._baseSprite.addChild(this._backgroundSprite); +}; + +Spriteset_Battle.prototype.createBattleback = function() { + this._back1Sprite = new Sprite_Battleback(0); + this._back2Sprite = new Sprite_Battleback(1); + this._baseSprite.addChild(this._back1Sprite); + this._baseSprite.addChild(this._back2Sprite); +}; + +Spriteset_Battle.prototype.createBattleField = function() { + const width = Graphics.boxWidth; + const height = Graphics.boxHeight; + const x = (Graphics.width - width) / 2; + const y = (Graphics.height - height) / 2; + this._battleField = new Sprite(); + this._battleField.setFrame(0, 0, width, height); + this._battleField.x = x; + this._battleField.y = y - this.battleFieldOffsetY(); + this._baseSprite.addChild(this._battleField); + this._effectsContainer = this._battleField; +}; + +Spriteset_Battle.prototype.battleFieldOffsetY = function() { + return 24; +}; + +Spriteset_Battle.prototype.update = function() { + Spriteset_Base.prototype.update.call(this); + this.updateActors(); + this.updateBattleback(); + this.updateAnimations(); +}; + +Spriteset_Battle.prototype.updateBattleback = function() { + if (!this._battlebackLocated) { + this._back1Sprite.adjustPosition(); + this._back2Sprite.adjustPosition(); + this._battlebackLocated = true; + } +}; + +Spriteset_Battle.prototype.createEnemies = function() { + const enemies = $gameTroop.members(); + const sprites = []; + for (const enemy of enemies) { + sprites.push(new Sprite_Enemy(enemy)); + } + sprites.sort(this.compareEnemySprite.bind(this)); + for (const sprite of sprites) { + this._battleField.addChild(sprite); + } + this._enemySprites = sprites; +}; + +Spriteset_Battle.prototype.compareEnemySprite = function(a, b) { + if (a.y !== b.y) { + return a.y - b.y; + } else { + return b.spriteId - a.spriteId; + } +}; + +Spriteset_Battle.prototype.createActors = function() { + this._actorSprites = []; + if ($gameSystem.isSideView()) { + for (let i = 0; i < $gameParty.maxBattleMembers(); i++) { + const sprite = new Sprite_Actor(); + this._actorSprites.push(sprite); + this._battleField.addChild(sprite); + } + } +}; + +Spriteset_Battle.prototype.updateActors = function() { + const members = $gameParty.battleMembers(); + for (let i = 0; i < this._actorSprites.length; i++) { + this._actorSprites[i].setBattler(members[i]); + } +}; + +Spriteset_Battle.prototype.findTargetSprite = function(target) { + return this.battlerSprites().find(sprite => sprite.checkBattler(target)); +}; + +Spriteset_Battle.prototype.battlerSprites = function() { + return this._enemySprites.concat(this._actorSprites); +}; + +Spriteset_Battle.prototype.isEffecting = function() { + return this.battlerSprites().some(sprite => sprite.isEffecting()); +}; + +Spriteset_Battle.prototype.isAnyoneMoving = function() { + return this.battlerSprites().some(sprite => sprite.isMoving()); +}; + +Spriteset_Battle.prototype.isBusy = function() { + return this.isAnimationPlaying() || this.isAnyoneMoving(); +}; + +//----------------------------------------------------------------------------- diff --git a/js/rmmz_windows.js b/js/rmmz_windows.js new file mode 100644 index 0000000..a5c3237 --- /dev/null +++ b/js/rmmz_windows.js @@ -0,0 +1,6630 @@ +//============================================================================= +// rmmz_windows.js v1.4.4 +//============================================================================= + +//----------------------------------------------------------------------------- +// Window_Base +// +// The superclass of all windows within the game. + +function Window_Base() { + this.initialize(...arguments); +} + +Window_Base.prototype = Object.create(Window.prototype); +Window_Base.prototype.constructor = Window_Base; + +Window_Base.prototype.initialize = function(rect) { + Window.prototype.initialize.call(this); + this.loadWindowskin(); + this.checkRectObject(rect); + this.move(rect.x, rect.y, rect.width, rect.height); + this.updatePadding(); + this.updateBackOpacity(); + this.updateTone(); + this.createContents(); + this._opening = false; + this._closing = false; + this._dimmerSprite = null; +}; + +Window_Base.prototype.destroy = function(options) { + this.destroyContents(); + if (this._dimmerSprite) { + this._dimmerSprite.bitmap.destroy(); + } + Window.prototype.destroy.call(this, options); +}; + +Window_Base.prototype.checkRectObject = function(rect) { + if (typeof rect !== "object" || !("x" in rect)) { + // Probably MV plugin is used + throw new Error("Argument must be a Rectangle"); + } +}; + +Window_Base.prototype.lineHeight = function() { + return 36; +}; + +Window_Base.prototype.itemWidth = function() { + return this.innerWidth; +}; + +Window_Base.prototype.itemHeight = function() { + return this.lineHeight(); +}; + +Window_Base.prototype.itemPadding = function() { + return 8; +}; + +Window_Base.prototype.baseTextRect = function() { + const rect = new Rectangle(0, 0, this.innerWidth, this.innerHeight); + rect.pad(-this.itemPadding(), 0); + return rect; +}; + +Window_Base.prototype.loadWindowskin = function() { + this.windowskin = ImageManager.loadSystem("Window"); +}; + +Window_Base.prototype.updatePadding = function() { + this.padding = $gameSystem.windowPadding(); +}; + +Window_Base.prototype.updateBackOpacity = function() { + this.backOpacity = $gameSystem.windowOpacity(); +}; + +Window_Base.prototype.fittingHeight = function(numLines) { + return numLines * this.itemHeight() + $gameSystem.windowPadding() * 2; +}; + +Window_Base.prototype.updateTone = function() { + const tone = $gameSystem.windowTone(); + this.setTone(tone[0], tone[1], tone[2]); +}; + +Window_Base.prototype.createContents = function() { + const width = this.contentsWidth(); + const height = this.contentsHeight(); + this.destroyContents(); + this.contents = new Bitmap(width, height); + this.contentsBack = new Bitmap(width, height); + this.resetFontSettings(); +}; + +Window_Base.prototype.destroyContents = function() { + if (this.contents) { + this.contents.destroy(); + } + if (this.contentsBack) { + this.contentsBack.destroy(); + } +}; + +Window_Base.prototype.contentsWidth = function() { + return this.innerWidth; +}; + +Window_Base.prototype.contentsHeight = function() { + return this.innerHeight; +}; + +Window_Base.prototype.resetFontSettings = function() { + this.contents.fontFace = $gameSystem.mainFontFace(); + this.contents.fontSize = $gameSystem.mainFontSize(); + this.resetTextColor(); +}; + +Window_Base.prototype.resetTextColor = function() { + this.changeTextColor(ColorManager.normalColor()); + this.changeOutlineColor(ColorManager.outlineColor()); +}; + +Window_Base.prototype.update = function() { + Window.prototype.update.call(this); + this.updateTone(); + this.updateOpen(); + this.updateClose(); + this.updateBackgroundDimmer(); +}; + +Window_Base.prototype.updateOpen = function() { + if (this._opening) { + this.openness += 32; + if (this.isOpen()) { + this._opening = false; + } + } +}; + +Window_Base.prototype.updateClose = function() { + if (this._closing) { + this.openness -= 32; + if (this.isClosed()) { + this._closing = false; + } + } +}; + +Window_Base.prototype.open = function() { + if (!this.isOpen()) { + this._opening = true; + } + this._closing = false; +}; + +Window_Base.prototype.close = function() { + if (!this.isClosed()) { + this._closing = true; + } + this._opening = false; +}; + +Window_Base.prototype.isOpening = function() { + return this._opening; +}; + +Window_Base.prototype.isClosing = function() { + return this._closing; +}; + +Window_Base.prototype.show = function() { + this.visible = true; +}; + +Window_Base.prototype.hide = function() { + this.visible = false; +}; + +Window_Base.prototype.activate = function() { + this.active = true; +}; + +Window_Base.prototype.deactivate = function() { + this.active = false; +}; + +Window_Base.prototype.systemColor = function() { + return ColorManager.systemColor(); +}; + +Window_Base.prototype.translucentOpacity = function() { + return 160; +}; + +Window_Base.prototype.changeTextColor = function(color) { + this.contents.textColor = color; +}; + +Window_Base.prototype.changeOutlineColor = function(color) { + this.contents.outlineColor = color; +}; + +Window_Base.prototype.changePaintOpacity = function(enabled) { + this.contents.paintOpacity = enabled ? 255 : this.translucentOpacity(); +}; + +Window_Base.prototype.drawRect = function(x, y, width, height) { + const outlineColor = this.contents.outlineColor; + const mainColor = this.contents.textColor; + this.contents.fillRect(x, y, width, height, outlineColor); + this.contents.fillRect(x + 1, y + 1, width - 2, height - 2, mainColor); +}; + +Window_Base.prototype.drawText = function(text, x, y, maxWidth, align) { + this.contents.drawText(text, x, y, maxWidth, this.lineHeight(), align); +}; + +Window_Base.prototype.textWidth = function(text) { + return this.contents.measureTextWidth(text); +}; + +Window_Base.prototype.drawTextEx = function(text, x, y, width) { + this.resetFontSettings(); + const textState = this.createTextState(text, x, y, width); + this.processAllText(textState); + return textState.outputWidth; +}; + +Window_Base.prototype.textSizeEx = function(text) { + this.resetFontSettings(); + const textState = this.createTextState(text, 0, 0, 0); + textState.drawing = false; + this.processAllText(textState); + return { width: textState.outputWidth, height: textState.outputHeight }; +}; + +Window_Base.prototype.createTextState = function(text, x, y, width) { + const rtl = Utils.containsArabic(text); + const textState = {}; + textState.text = this.convertEscapeCharacters(text); + textState.index = 0; + textState.x = rtl ? x + width : x; + textState.y = y; + textState.width = width; + textState.height = this.calcTextHeight(textState); + textState.startX = textState.x; + textState.startY = textState.y; + textState.rtl = rtl; + textState.buffer = this.createTextBuffer(rtl); + textState.drawing = true; + textState.outputWidth = 0; + textState.outputHeight = 0; + return textState; +}; + +Window_Base.prototype.processAllText = function(textState) { + while (textState.index < textState.text.length) { + this.processCharacter(textState); + } + this.flushTextState(textState); +}; + +Window_Base.prototype.flushTextState = function(textState) { + const text = textState.buffer; + const rtl = textState.rtl; + const width = this.textWidth(text); + const height = textState.height; + const x = rtl ? textState.x - width : textState.x; + const y = textState.y; + if (textState.drawing) { + this.contents.drawText(text, x, y, width, height); + } + textState.x += rtl ? -width : width; + textState.buffer = this.createTextBuffer(rtl); + const outputWidth = Math.abs(textState.x - textState.startX); + if (textState.outputWidth < outputWidth) { + textState.outputWidth = outputWidth; + } + textState.outputHeight = y - textState.startY + height; +}; + +Window_Base.prototype.createTextBuffer = function(rtl) { + // U+202B: RIGHT-TO-LEFT EMBEDDING + return rtl ? "\u202B" : ""; +}; + +Window_Base.prototype.convertEscapeCharacters = function(text) { + /* eslint no-control-regex: 0 */ + text = text.replace(/\\/g, "\x1b"); + text = text.replace(/\x1b\x1b/g, "\\"); + text = text.replace(/\x1bV\[(\d+)\]/gi, (_, p1) => + $gameVariables.value(parseInt(p1)) + ); + text = text.replace(/\x1bV\[(\d+)\]/gi, (_, p1) => + $gameVariables.value(parseInt(p1)) + ); + text = text.replace(/\x1bN\[(\d+)\]/gi, (_, p1) => + this.actorName(parseInt(p1)) + ); + text = text.replace(/\x1bP\[(\d+)\]/gi, (_, p1) => + this.partyMemberName(parseInt(p1)) + ); + text = text.replace(/\x1bG/gi, TextManager.currencyUnit); + return text; +}; + +Window_Base.prototype.actorName = function(n) { + const actor = n >= 1 ? $gameActors.actor(n) : null; + return actor ? actor.name() : ""; +}; + +Window_Base.prototype.partyMemberName = function(n) { + const actor = n >= 1 ? $gameParty.members()[n - 1] : null; + return actor ? actor.name() : ""; +}; + +Window_Base.prototype.processCharacter = function(textState) { + const c = textState.text[textState.index++]; + if (c.charCodeAt(0) < 0x20) { + this.flushTextState(textState); + this.processControlCharacter(textState, c); + } else { + textState.buffer += c; + } +}; + +Window_Base.prototype.processControlCharacter = function(textState, c) { + if (c === "\n") { + this.processNewLine(textState); + } + if (c === "\x1b") { + const code = this.obtainEscapeCode(textState); + this.processEscapeCharacter(code, textState); + } +}; + +Window_Base.prototype.processNewLine = function(textState) { + textState.x = textState.startX; + textState.y += textState.height; + textState.height = this.calcTextHeight(textState); +}; + +Window_Base.prototype.obtainEscapeCode = function(textState) { + const regExp = /^[$.|^!><{}\\]|^[A-Z]+/i; + const arr = regExp.exec(textState.text.slice(textState.index)); + if (arr) { + textState.index += arr[0].length; + return arr[0].toUpperCase(); + } else { + return ""; + } +}; + +Window_Base.prototype.obtainEscapeParam = function(textState) { + const regExp = /^\[\d+\]/; + const arr = regExp.exec(textState.text.slice(textState.index)); + if (arr) { + textState.index += arr[0].length; + return parseInt(arr[0].slice(1)); + } else { + return ""; + } +}; + +Window_Base.prototype.processEscapeCharacter = function(code, textState) { + switch (code) { + case "C": + this.processColorChange(this.obtainEscapeParam(textState)); + break; + case "I": + this.processDrawIcon(this.obtainEscapeParam(textState), textState); + break; + case "PX": + textState.x = this.obtainEscapeParam(textState); + break; + case "PY": + textState.y = this.obtainEscapeParam(textState); + break; + case "FS": + this.contents.fontSize = this.obtainEscapeParam(textState); + break; + case "{": + this.makeFontBigger(); + break; + case "}": + this.makeFontSmaller(); + break; + } +}; + +Window_Base.prototype.processColorChange = function(colorIndex) { + this.changeTextColor(ColorManager.textColor(colorIndex)); +}; + +Window_Base.prototype.processDrawIcon = function(iconIndex, textState) { + if (textState.drawing) { + this.drawIcon(iconIndex, textState.x + 2, textState.y + 2); + } + textState.x += ImageManager.iconWidth + 4; +}; + +Window_Base.prototype.makeFontBigger = function() { + if (this.contents.fontSize <= 96) { + this.contents.fontSize += 12; + } +}; + +Window_Base.prototype.makeFontSmaller = function() { + if (this.contents.fontSize >= 24) { + this.contents.fontSize -= 12; + } +}; + +Window_Base.prototype.calcTextHeight = function(textState) { + const lineSpacing = this.lineHeight() - $gameSystem.mainFontSize(); + const lastFontSize = this.contents.fontSize; + const lines = textState.text.slice(textState.index).split("\n"); + const textHeight = this.maxFontSizeInLine(lines[0]) + lineSpacing; + this.contents.fontSize = lastFontSize; + return textHeight; +}; + +Window_Base.prototype.maxFontSizeInLine = function(line) { + let maxFontSize = this.contents.fontSize; + const regExp = /\x1b({|}|FS)(\[(\d+)])?/gi; + for (;;) { + const array = regExp.exec(line); + if (!array) { + break; + } + const code = String(array[1]).toUpperCase(); + if (code === "{") { + this.makeFontBigger(); + } else if (code === "}") { + this.makeFontSmaller(); + } else if (code === "FS") { + this.contents.fontSize = parseInt(array[3]); + } + if (this.contents.fontSize > maxFontSize) { + maxFontSize = this.contents.fontSize; + } + } + return maxFontSize; +}; + +Window_Base.prototype.drawIcon = function(iconIndex, x, y) { + const bitmap = ImageManager.loadSystem("IconSet"); + const pw = ImageManager.iconWidth; + const ph = ImageManager.iconHeight; + const sx = (iconIndex % 16) * pw; + const sy = Math.floor(iconIndex / 16) * ph; + this.contents.blt(bitmap, sx, sy, pw, ph, x, y); +}; + +// prettier-ignore +Window_Base.prototype.drawFace = function( + faceName, faceIndex, x, y, width, height +) { + width = width || ImageManager.faceWidth; + height = height || ImageManager.faceHeight; + const bitmap = ImageManager.loadFace(faceName); + const pw = ImageManager.faceWidth; + const ph = ImageManager.faceHeight; + const sw = Math.min(width, pw); + const sh = Math.min(height, ph); + const dx = Math.floor(x + Math.max(width - pw, 0) / 2); + const dy = Math.floor(y + Math.max(height - ph, 0) / 2); + const sx = Math.floor((faceIndex % 4) * pw + (pw - sw) / 2); + const sy = Math.floor(Math.floor(faceIndex / 4) * ph + (ph - sh) / 2); + this.contents.blt(bitmap, sx, sy, sw, sh, dx, dy); +}; + +// prettier-ignore +Window_Base.prototype.drawCharacter = function( + characterName, characterIndex, x, y +) { + const bitmap = ImageManager.loadCharacter(characterName); + const big = ImageManager.isBigCharacter(characterName); + const pw = bitmap.width / (big ? 3 : 12); + const ph = bitmap.height / (big ? 4 : 8); + const n = big ? 0: characterIndex; + const sx = ((n % 4) * 3 + 1) * pw; + const sy = Math.floor(n / 4) * 4 * ph; + this.contents.blt(bitmap, sx, sy, pw, ph, x - pw / 2, y - ph); +}; + +Window_Base.prototype.drawItemName = function(item, x, y, width) { + if (item) { + const iconY = y + (this.lineHeight() - ImageManager.iconHeight) / 2; + const textMargin = ImageManager.iconWidth + 4; + const itemWidth = Math.max(0, width - textMargin); + this.resetTextColor(); + this.drawIcon(item.iconIndex, x, iconY); + this.drawText(item.name, x + textMargin, y, itemWidth); + } +}; + +Window_Base.prototype.drawCurrencyValue = function(value, unit, x, y, width) { + const unitWidth = Math.min(80, this.textWidth(unit)); + this.resetTextColor(); + this.drawText(value, x, y, width - unitWidth - 6, "right"); + this.changeTextColor(ColorManager.systemColor()); + this.drawText(unit, x + width - unitWidth, y, unitWidth, "right"); +}; + +Window_Base.prototype.setBackgroundType = function(type) { + if (type === 0) { + this.opacity = 255; + } else { + this.opacity = 0; + } + if (type === 1) { + this.showBackgroundDimmer(); + } else { + this.hideBackgroundDimmer(); + } +}; + +Window_Base.prototype.showBackgroundDimmer = function() { + if (!this._dimmerSprite) { + this.createDimmerSprite(); + } + const bitmap = this._dimmerSprite.bitmap; + if (bitmap.width !== this.width || bitmap.height !== this.height) { + this.refreshDimmerBitmap(); + } + this._dimmerSprite.visible = true; + this.updateBackgroundDimmer(); +}; + +Window_Base.prototype.createDimmerSprite = function() { + this._dimmerSprite = new Sprite(); + this._dimmerSprite.bitmap = new Bitmap(0, 0); + this._dimmerSprite.x = -4; + this.addChildToBack(this._dimmerSprite); +}; + +Window_Base.prototype.hideBackgroundDimmer = function() { + if (this._dimmerSprite) { + this._dimmerSprite.visible = false; + } +}; + +Window_Base.prototype.updateBackgroundDimmer = function() { + if (this._dimmerSprite) { + this._dimmerSprite.opacity = this.openness; + } +}; + +Window_Base.prototype.refreshDimmerBitmap = function() { + if (this._dimmerSprite) { + const bitmap = this._dimmerSprite.bitmap; + const w = this.width > 0 ? this.width + 8 : 0; + const h = this.height; + const m = this.padding; + const c1 = ColorManager.dimColor1(); + const c2 = ColorManager.dimColor2(); + bitmap.resize(w, h); + bitmap.gradientFillRect(0, 0, w, m, c2, c1, true); + bitmap.fillRect(0, m, w, h - m * 2, c1); + bitmap.gradientFillRect(0, h - m, w, m, c1, c2, true); + this._dimmerSprite.setFrame(0, 0, w, h); + } +}; + +Window_Base.prototype.playCursorSound = function() { + SoundManager.playCursor(); +}; + +Window_Base.prototype.playOkSound = function() { + SoundManager.playOk(); +}; + +Window_Base.prototype.playBuzzerSound = function() { + SoundManager.playBuzzer(); +}; + +//----------------------------------------------------------------------------- +// Window_Scrollable +// +// The window class with scroll functions. + +function Window_Scrollable() { + this.initialize(...arguments); +} + +Window_Scrollable.prototype = Object.create(Window_Base.prototype); +Window_Scrollable.prototype.constructor = Window_Scrollable; + +Window_Scrollable.prototype.initialize = function(rect) { + Window_Base.prototype.initialize.call(this, rect); + this._scrollX = 0; + this._scrollY = 0; + this._scrollBaseX = 0; + this._scrollBaseY = 0; + this.clearScrollStatus(); +}; + +Window_Scrollable.prototype.clearScrollStatus = function() { + this._scrollTargetX = 0; + this._scrollTargetY = 0; + this._scrollDuration = 0; + this._scrollAccelX = 0; + this._scrollAccelY = 0; + this._scrollTouching = false; + this._scrollLastTouchX = 0; + this._scrollLastTouchY = 0; + this._scrollLastCursorVisible = false; +}; + +Window_Scrollable.prototype.scrollX = function() { + return this._scrollX; +}; + +Window_Scrollable.prototype.scrollY = function() { + return this._scrollY; +}; + +Window_Scrollable.prototype.scrollBaseX = function() { + return this._scrollBaseX; +}; + +Window_Scrollable.prototype.scrollBaseY = function() { + return this._scrollBaseY; +}; + +Window_Scrollable.prototype.scrollTo = function(x, y) { + const scrollX = x.clamp(0, this.maxScrollX()); + const scrollY = y.clamp(0, this.maxScrollY()); + if (this._scrollX !== scrollX || this._scrollY !== scrollY) { + this._scrollX = scrollX; + this._scrollY = scrollY; + this.updateOrigin(); + } +}; + +Window_Scrollable.prototype.scrollBy = function(x, y) { + this.scrollTo(this._scrollX + x, this._scrollY + y); +}; + +Window_Scrollable.prototype.smoothScrollTo = function(x, y) { + this._scrollTargetX = x.clamp(0, this.maxScrollX()); + this._scrollTargetY = y.clamp(0, this.maxScrollY()); + this._scrollDuration = Input.keyRepeatInterval; +}; + +Window_Scrollable.prototype.smoothScrollBy = function(x, y) { + if (this._scrollDuration === 0) { + this._scrollTargetX = this.scrollX(); + this._scrollTargetY = this.scrollY(); + } + this.smoothScrollTo(this._scrollTargetX + x, this._scrollTargetY + y); +}; + +Window_Scrollable.prototype.setScrollAccel = function(x, y) { + this._scrollAccelX = x; + this._scrollAccelY = y; +}; + +Window_Scrollable.prototype.overallWidth = function() { + return this.innerWidth; +}; + +Window_Scrollable.prototype.overallHeight = function() { + return this.innerHeight; +}; + +Window_Scrollable.prototype.maxScrollX = function() { + return Math.max(0, this.overallWidth() - this.innerWidth); +}; + +Window_Scrollable.prototype.maxScrollY = function() { + return Math.max(0, this.overallHeight() - this.innerHeight); +}; + +Window_Scrollable.prototype.scrollBlockWidth = function() { + return this.itemWidth(); +}; + +Window_Scrollable.prototype.scrollBlockHeight = function() { + return this.itemHeight(); +}; + +Window_Scrollable.prototype.smoothScrollDown = function(n) { + this.smoothScrollBy(0, this.itemHeight() * n); +}; + +Window_Scrollable.prototype.smoothScrollUp = function(n) { + this.smoothScrollBy(0, -this.itemHeight() * n); +}; + +Window_Scrollable.prototype.update = function() { + Window_Base.prototype.update.call(this); + this.processWheelScroll(); + this.processTouchScroll(); + this.updateSmoothScroll(); + this.updateScrollAccel(); + this.updateArrows(); + this.updateOrigin(); +}; + +Window_Scrollable.prototype.processWheelScroll = function() { + if (this.isWheelScrollEnabled() && this.isTouchedInsideFrame()) { + const threshold = 20; + if (TouchInput.wheelY >= threshold) { + this.smoothScrollDown(1); + } + if (TouchInput.wheelY <= -threshold) { + this.smoothScrollUp(1); + } + } +}; + +Window_Scrollable.prototype.processTouchScroll = function() { + if (this.isTouchScrollEnabled()) { + if (TouchInput.isTriggered() && this.isTouchedInsideFrame()) { + this.onTouchScrollStart(); + } + if (this._scrollTouching) { + if (TouchInput.isReleased()) { + this.onTouchScrollEnd(); + } else if (TouchInput.isMoved()) { + this.onTouchScroll(); + } + } + } +}; + +Window_Scrollable.prototype.isWheelScrollEnabled = function() { + return this.isScrollEnabled(); +}; + +Window_Scrollable.prototype.isTouchScrollEnabled = function() { + return this.isScrollEnabled(); +}; + +Window_Scrollable.prototype.isScrollEnabled = function() { + return true; +}; + +Window_Scrollable.prototype.isTouchedInsideFrame = function() { + const touchPos = new Point(TouchInput.x, TouchInput.y); + const localPos = this.worldTransform.applyInverse(touchPos); + return this.innerRect.contains(localPos.x, localPos.y); +}; + +Window_Scrollable.prototype.onTouchScrollStart = function() { + this._scrollTouching = true; + this._scrollLastTouchX = TouchInput.x; + this._scrollLastTouchY = TouchInput.y; + this._scrollLastCursorVisible = this.cursorVisible; + this.setScrollAccel(0, 0); +}; + +Window_Scrollable.prototype.onTouchScroll = function() { + const accelX = this._scrollLastTouchX - TouchInput.x; + const accelY = this._scrollLastTouchY - TouchInput.y; + this.setScrollAccel(accelX, accelY); + this._scrollLastTouchX = TouchInput.x; + this._scrollLastTouchY = TouchInput.y; + this.cursorVisible = false; +}; + +Window_Scrollable.prototype.onTouchScrollEnd = function() { + this._scrollTouching = false; + this.cursorVisible = this._scrollLastCursorVisible; +}; + +Window_Scrollable.prototype.updateSmoothScroll = function() { + if (this._scrollDuration > 0) { + const d = this._scrollDuration; + const deltaX = (this._scrollTargetX - this._scrollX) / d; + const deltaY = (this._scrollTargetY - this._scrollY) / d; + this.scrollBy(deltaX, deltaY); + this._scrollDuration--; + } +}; + +Window_Scrollable.prototype.updateScrollAccel = function() { + if (this._scrollAccelX !== 0 || this._scrollAccelY !== 0) { + this.scrollBy(this._scrollAccelX, this._scrollAccelY); + this._scrollAccelX *= 0.92; + this._scrollAccelY *= 0.92; + if (Math.abs(this._scrollAccelX) < 1) { + this._scrollAccelX = 0; + } + if (Math.abs(this._scrollAccelY) < 1) { + this._scrollAccelY = 0; + } + } +}; + +Window_Scrollable.prototype.updateArrows = function() { + this.downArrowVisible = this._scrollY < this.maxScrollY(); + this.upArrowVisible = this._scrollY > 0; +}; + +Window_Scrollable.prototype.updateOrigin = function() { + const blockWidth = this.scrollBlockWidth() || 1; + const blockHeight = this.scrollBlockHeight() || 1; + const baseX = this._scrollX - (this._scrollX % blockWidth); + const baseY = this._scrollY - (this._scrollY % blockHeight); + if (baseX !== this._scrollBaseX || baseY !== this._scrollBaseY) { + this.updateScrollBase(baseX, baseY); + this.paint(); + } + this.origin.x = this._scrollX % blockWidth; + this.origin.y = this._scrollY % blockHeight; +}; + +Window_Scrollable.prototype.updateScrollBase = function(baseX, baseY) { + const deltaX = baseX - this._scrollBaseX; + const deltaY = baseY - this._scrollBaseY; + this._scrollBaseX = baseX; + this._scrollBaseY = baseY; + this.moveCursorBy(-deltaX, -deltaY); + this.moveInnerChildrenBy(-deltaX, -deltaY); +}; + +Window_Scrollable.prototype.paint = function() { + // to be overridden +}; + +//----------------------------------------------------------------------------- +// Window_Selectable +// +// The window class with cursor movement functions. + +function Window_Selectable() { + this.initialize(...arguments); +} + +Window_Selectable.prototype = Object.create(Window_Scrollable.prototype); +Window_Selectable.prototype.constructor = Window_Selectable; + +Window_Selectable.prototype.initialize = function(rect) { + Window_Scrollable.prototype.initialize.call(this, rect); + this._index = -1; + this._cursorFixed = false; + this._cursorAll = false; + this._helpWindow = null; + this._handlers = {}; + this._doubleTouch = false; + this._canRepeat = true; + this.deactivate(); +}; + +Window_Selectable.prototype.index = function() { + return this._index; +}; + +Window_Selectable.prototype.cursorFixed = function() { + return this._cursorFixed; +}; + +Window_Selectable.prototype.setCursorFixed = function(cursorFixed) { + this._cursorFixed = cursorFixed; +}; + +Window_Selectable.prototype.cursorAll = function() { + return this._cursorAll; +}; + +Window_Selectable.prototype.setCursorAll = function(cursorAll) { + this._cursorAll = cursorAll; +}; + +Window_Selectable.prototype.maxCols = function() { + return 1; +}; + +Window_Selectable.prototype.maxItems = function() { + return 0; +}; + +Window_Selectable.prototype.colSpacing = function() { + return 8; +}; + +Window_Selectable.prototype.rowSpacing = function() { + return 4; +}; + +Window_Selectable.prototype.itemWidth = function() { + return Math.floor(this.innerWidth / this.maxCols()); +}; + +Window_Selectable.prototype.itemHeight = function() { + return Window_Scrollable.prototype.itemHeight.call(this) + 8; +}; + +Window_Selectable.prototype.contentsHeight = function() { + return this.innerHeight + this.itemHeight(); +}; + +Window_Selectable.prototype.maxRows = function() { + return Math.max(Math.ceil(this.maxItems() / this.maxCols()), 1); +}; + +Window_Selectable.prototype.overallHeight = function() { + return this.maxRows() * this.itemHeight(); +}; + +Window_Selectable.prototype.activate = function() { + Window_Scrollable.prototype.activate.call(this); + this.reselect(); +}; + +Window_Selectable.prototype.deactivate = function() { + Window_Scrollable.prototype.deactivate.call(this); + this.reselect(); +}; + +Window_Selectable.prototype.select = function(index) { + this._index = index; + this.refreshCursor(); + this.callUpdateHelp(); +}; + +Window_Selectable.prototype.forceSelect = function(index) { + this.select(index); + this.ensureCursorVisible(false); +}; + +Window_Selectable.prototype.smoothSelect = function(index) { + this.select(index); + this.ensureCursorVisible(true); +}; + +Window_Selectable.prototype.deselect = function() { + this.select(-1); +}; + +Window_Selectable.prototype.reselect = function() { + this.select(this._index); + this.ensureCursorVisible(true); + this.cursorVisible = true; +}; + +Window_Selectable.prototype.row = function() { + return Math.floor(this.index() / this.maxCols()); +}; + +Window_Selectable.prototype.topRow = function() { + return Math.floor(this.scrollY() / this.itemHeight()); +}; + +Window_Selectable.prototype.maxTopRow = function() { + return Math.max(0, this.maxRows() - this.maxPageRows()); +}; + +Window_Selectable.prototype.setTopRow = function(row) { + this.scrollTo(this.scrollX(), row * this.itemHeight()); +}; + +Window_Selectable.prototype.maxPageRows = function() { + return Math.floor(this.innerHeight / this.itemHeight()); +}; + +Window_Selectable.prototype.maxPageItems = function() { + return this.maxPageRows() * this.maxCols(); +}; + +Window_Selectable.prototype.maxVisibleItems = function() { + const visibleRows = Math.ceil(this.contentsHeight() / this.itemHeight()); + return visibleRows * this.maxCols(); +}; + +Window_Selectable.prototype.isHorizontal = function() { + return this.maxPageRows() === 1; +}; + +Window_Selectable.prototype.topIndex = function() { + return this.topRow() * this.maxCols(); +}; + +Window_Selectable.prototype.itemRect = function(index) { + const maxCols = this.maxCols(); + const itemWidth = this.itemWidth(); + const itemHeight = this.itemHeight(); + const colSpacing = this.colSpacing(); + const rowSpacing = this.rowSpacing(); + const col = index % maxCols; + const row = Math.floor(index / maxCols); + const x = col * itemWidth + colSpacing / 2 - this.scrollBaseX(); + const y = row * itemHeight + rowSpacing / 2 - this.scrollBaseY(); + const width = itemWidth - colSpacing; + const height = itemHeight - rowSpacing; + return new Rectangle(x, y, width, height); +}; + +Window_Selectable.prototype.itemRectWithPadding = function(index) { + const rect = this.itemRect(index); + const padding = this.itemPadding(); + rect.x += padding; + rect.width -= padding * 2; + return rect; +}; + +Window_Selectable.prototype.itemLineRect = function(index) { + const rect = this.itemRectWithPadding(index); + const padding = (rect.height - this.lineHeight()) / 2; + rect.y += padding; + rect.height -= padding * 2; + return rect; +}; + +Window_Selectable.prototype.setHelpWindow = function(helpWindow) { + this._helpWindow = helpWindow; + this.callUpdateHelp(); +}; + +Window_Selectable.prototype.showHelpWindow = function() { + if (this._helpWindow) { + this._helpWindow.show(); + } +}; + +Window_Selectable.prototype.hideHelpWindow = function() { + if (this._helpWindow) { + this._helpWindow.hide(); + } +}; + +Window_Selectable.prototype.setHandler = function(symbol, method) { + this._handlers[symbol] = method; +}; + +Window_Selectable.prototype.isHandled = function(symbol) { + return !!this._handlers[symbol]; +}; + +Window_Selectable.prototype.callHandler = function(symbol) { + if (this.isHandled(symbol)) { + this._handlers[symbol](); + } +}; + +Window_Selectable.prototype.isOpenAndActive = function() { + return this.isOpen() && this.visible && this.active; +}; + +Window_Selectable.prototype.isCursorMovable = function() { + return ( + this.isOpenAndActive() && + !this._cursorFixed && + !this._cursorAll && + this.maxItems() > 0 + ); +}; + +Window_Selectable.prototype.cursorDown = function(wrap) { + const index = this.index(); + const maxItems = this.maxItems(); + const maxCols = this.maxCols(); + if (index < maxItems - maxCols || (wrap && maxCols === 1)) { + this.smoothSelect((index + maxCols) % maxItems); + } +}; + +Window_Selectable.prototype.cursorUp = function(wrap) { + const index = Math.max(0, this.index()); + const maxItems = this.maxItems(); + const maxCols = this.maxCols(); + if (index >= maxCols || (wrap && maxCols === 1)) { + this.smoothSelect((index - maxCols + maxItems) % maxItems); + } +}; + +Window_Selectable.prototype.cursorRight = function(wrap) { + const index = this.index(); + const maxItems = this.maxItems(); + const maxCols = this.maxCols(); + const horizontal = this.isHorizontal(); + if (maxCols >= 2 && (index < maxItems - 1 || (wrap && horizontal))) { + this.smoothSelect((index + 1) % maxItems); + } +}; + +Window_Selectable.prototype.cursorLeft = function(wrap) { + const index = Math.max(0, this.index()); + const maxItems = this.maxItems(); + const maxCols = this.maxCols(); + const horizontal = this.isHorizontal(); + if (maxCols >= 2 && (index > 0 || (wrap && horizontal))) { + this.smoothSelect((index - 1 + maxItems) % maxItems); + } +}; + +Window_Selectable.prototype.cursorPagedown = function() { + const index = this.index(); + const maxItems = this.maxItems(); + if (this.topRow() + this.maxPageRows() < this.maxRows()) { + this.smoothScrollDown(this.maxPageRows()); + this.select(Math.min(index + this.maxPageItems(), maxItems - 1)); + } +}; + +Window_Selectable.prototype.cursorPageup = function() { + const index = this.index(); + if (this.topRow() > 0) { + this.smoothScrollUp(this.maxPageRows()); + this.select(Math.max(index - this.maxPageItems(), 0)); + } +}; + +Window_Selectable.prototype.isScrollEnabled = function() { + return this.active || this.index() < 0; +}; + +Window_Selectable.prototype.update = function() { + this.processCursorMove(); + this.processHandling(); + this.processTouch(); + Window_Scrollable.prototype.update.call(this); +}; + +Window_Selectable.prototype.processCursorMove = function() { + if (this.isCursorMovable()) { + const lastIndex = this.index(); + if (Input.isRepeated("down")) { + this.cursorDown(Input.isTriggered("down")); + } + if (Input.isRepeated("up")) { + this.cursorUp(Input.isTriggered("up")); + } + if (Input.isRepeated("right")) { + this.cursorRight(Input.isTriggered("right")); + } + if (Input.isRepeated("left")) { + this.cursorLeft(Input.isTriggered("left")); + } + if (!this.isHandled("pagedown") && Input.isTriggered("pagedown")) { + this.cursorPagedown(); + } + if (!this.isHandled("pageup") && Input.isTriggered("pageup")) { + this.cursorPageup(); + } + if (this.index() !== lastIndex) { + this.playCursorSound(); + } + } +}; + +Window_Selectable.prototype.processHandling = function() { + if (this.isOpenAndActive()) { + if (this.isOkEnabled() && this.isOkTriggered()) { + return this.processOk(); + } + if (this.isCancelEnabled() && this.isCancelTriggered()) { + return this.processCancel(); + } + if (this.isHandled("pagedown") && Input.isTriggered("pagedown")) { + return this.processPagedown(); + } + if (this.isHandled("pageup") && Input.isTriggered("pageup")) { + return this.processPageup(); + } + } +}; + +Window_Selectable.prototype.processTouch = function() { + if (this.isOpenAndActive()) { + if (this.isHoverEnabled() && TouchInput.isHovered()) { + this.onTouchSelect(false); + } else if (TouchInput.isTriggered()) { + this.onTouchSelect(true); + } + if (TouchInput.isClicked()) { + this.onTouchOk(); + } else if (TouchInput.isCancelled()) { + this.onTouchCancel(); + } + } +}; + +Window_Selectable.prototype.isHoverEnabled = function() { + return true; +}; + +Window_Selectable.prototype.onTouchSelect = function(trigger) { + this._doubleTouch = false; + if (this.isCursorMovable()) { + const lastIndex = this.index(); + const hitIndex = this.hitIndex(); + if (hitIndex >= 0) { + if (hitIndex === this.index()) { + this._doubleTouch = true; + } + this.select(hitIndex); + } + if (trigger && this.index() !== lastIndex) { + this.playCursorSound(); + } + } +}; + +Window_Selectable.prototype.onTouchOk = function() { + if (this.isTouchOkEnabled()) { + const hitIndex = this.hitIndex(); + if (this._cursorFixed) { + if (hitIndex === this.index()) { + this.processOk(); + } + } else if (hitIndex >= 0) { + this.processOk(); + } + } +}; + +Window_Selectable.prototype.onTouchCancel = function() { + if (this.isCancelEnabled()) { + this.processCancel(); + } +}; + +Window_Selectable.prototype.hitIndex = function() { + const touchPos = new Point(TouchInput.x, TouchInput.y); + const localPos = this.worldTransform.applyInverse(touchPos); + return this.hitTest(localPos.x, localPos.y); +}; + +Window_Selectable.prototype.hitTest = function(x, y) { + if (this.innerRect.contains(x, y)) { + const cx = this.origin.x + x - this.padding; + const cy = this.origin.y + y - this.padding; + const topIndex = this.topIndex(); + for (let i = 0; i < this.maxVisibleItems(); i++) { + const index = topIndex + i; + if (index < this.maxItems()) { + const rect = this.itemRect(index); + if (rect.contains(cx, cy)) { + return index; + } + } + } + } + return -1; +}; + +Window_Selectable.prototype.isTouchOkEnabled = function() { + return ( + this.isOkEnabled() && + (this._cursorFixed || this._cursorAll || this._doubleTouch) + ); +}; + +Window_Selectable.prototype.isOkEnabled = function() { + return this.isHandled("ok"); +}; + +Window_Selectable.prototype.isCancelEnabled = function() { + return this.isHandled("cancel"); +}; + +Window_Selectable.prototype.isOkTriggered = function() { + return this._canRepeat ? Input.isRepeated("ok") : Input.isTriggered("ok"); +}; + +Window_Selectable.prototype.isCancelTriggered = function() { + return Input.isRepeated("cancel"); +}; + +Window_Selectable.prototype.processOk = function() { + if (this.isCurrentItemEnabled()) { + this.playOkSound(); + this.updateInputData(); + this.deactivate(); + this.callOkHandler(); + } else { + this.playBuzzerSound(); + } +}; + +Window_Selectable.prototype.callOkHandler = function() { + this.callHandler("ok"); +}; + +Window_Selectable.prototype.processCancel = function() { + SoundManager.playCancel(); + this.updateInputData(); + this.deactivate(); + this.callCancelHandler(); +}; + +Window_Selectable.prototype.callCancelHandler = function() { + this.callHandler("cancel"); +}; + +Window_Selectable.prototype.processPageup = function() { + this.updateInputData(); + this.deactivate(); + this.callHandler("pageup"); +}; + +Window_Selectable.prototype.processPagedown = function() { + this.updateInputData(); + this.deactivate(); + this.callHandler("pagedown"); +}; + +Window_Selectable.prototype.updateInputData = function() { + Input.update(); + TouchInput.update(); + this.clearScrollStatus(); +}; + +Window_Selectable.prototype.ensureCursorVisible = function(smooth) { + if (this._cursorAll) { + this.scrollTo(0, 0); + } else if (this.innerHeight > 0 && this.row() >= 0) { + const scrollY = this.scrollY(); + const itemTop = this.row() * this.itemHeight(); + const itemBottom = itemTop + this.itemHeight(); + const scrollMin = itemBottom - this.innerHeight; + if (scrollY > itemTop) { + if (smooth) { + this.smoothScrollTo(0, itemTop); + } else { + this.scrollTo(0, itemTop); + } + } else if (scrollY < scrollMin) { + if (smooth) { + this.smoothScrollTo(0, scrollMin); + } else { + this.scrollTo(0, scrollMin); + } + } + } +}; + +Window_Selectable.prototype.callUpdateHelp = function() { + if (this.active && this._helpWindow) { + this.updateHelp(); + } +}; + +Window_Selectable.prototype.updateHelp = function() { + this._helpWindow.clear(); +}; + +Window_Selectable.prototype.setHelpWindowItem = function(item) { + if (this._helpWindow) { + this._helpWindow.setItem(item); + } +}; + +Window_Selectable.prototype.isCurrentItemEnabled = function() { + return true; +}; + +Window_Selectable.prototype.drawAllItems = function() { + const topIndex = this.topIndex(); + for (let i = 0; i < this.maxVisibleItems(); i++) { + const index = topIndex + i; + if (index < this.maxItems()) { + this.drawItemBackground(index); + this.drawItem(index); + } + } +}; + +Window_Selectable.prototype.drawItem = function(/*index*/) { + // +}; + +Window_Selectable.prototype.clearItem = function(index) { + const rect = this.itemRect(index); + this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); + this.contentsBack.clearRect(rect.x, rect.y, rect.width, rect.height); +}; + +Window_Selectable.prototype.drawItemBackground = function(index) { + const rect = this.itemRect(index); + this.drawBackgroundRect(rect); +}; + +Window_Selectable.prototype.drawBackgroundRect = function(rect) { + const c1 = ColorManager.itemBackColor1(); + const c2 = ColorManager.itemBackColor2(); + const x = rect.x; + const y = rect.y; + const w = rect.width; + const h = rect.height; + this.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true); + this.contentsBack.strokeRect(x, y, w, h, c1); +}; + +Window_Selectable.prototype.redrawItem = function(index) { + if (index >= 0) { + this.clearItem(index); + this.drawItemBackground(index); + this.drawItem(index); + } +}; + +Window_Selectable.prototype.redrawCurrentItem = function() { + this.redrawItem(this.index()); +}; + +Window_Selectable.prototype.refresh = function() { + this.paint(); +}; + +Window_Selectable.prototype.paint = function() { + if (this.contents) { + this.contents.clear(); + this.contentsBack.clear(); + this.drawAllItems(); + } +}; + +Window_Selectable.prototype.refreshCursor = function() { + if (this._cursorAll) { + this.refreshCursorForAll(); + } else if (this.index() >= 0) { + const rect = this.itemRect(this.index()); + this.setCursorRect(rect.x, rect.y, rect.width, rect.height); + } else { + this.setCursorRect(0, 0, 0, 0); + } +}; + +Window_Selectable.prototype.refreshCursorForAll = function() { + const maxItems = this.maxItems(); + if (maxItems > 0) { + const rect = this.itemRect(0); + rect.enlarge(this.itemRect(maxItems - 1)); + this.setCursorRect(rect.x, rect.y, rect.width, rect.height); + } else { + this.setCursorRect(0, 0, 0, 0); + } +}; + +//----------------------------------------------------------------------------- +// Window_Command +// +// The superclass of windows for selecting a command. + +function Window_Command() { + this.initialize(...arguments); +} + +Window_Command.prototype = Object.create(Window_Selectable.prototype); +Window_Command.prototype.constructor = Window_Command; + +Window_Command.prototype.initialize = function(rect) { + Window_Selectable.prototype.initialize.call(this, rect); + this.refresh(); + this.select(0); + this.activate(); +}; + +Window_Command.prototype.maxItems = function() { + return this._list.length; +}; + +Window_Command.prototype.clearCommandList = function() { + this._list = []; +}; + +Window_Command.prototype.makeCommandList = function() { + // +}; + +// prettier-ignore +Window_Command.prototype.addCommand = function( + name, symbol, enabled = true, ext = null +) { + this._list.push({ name: name, symbol: symbol, enabled: enabled, ext: ext }); +}; + +Window_Command.prototype.commandName = function(index) { + return this._list[index].name; +}; + +Window_Command.prototype.commandSymbol = function(index) { + return this._list[index].symbol; +}; + +Window_Command.prototype.isCommandEnabled = function(index) { + return this._list[index].enabled; +}; + +Window_Command.prototype.currentData = function() { + return this.index() >= 0 ? this._list[this.index()] : null; +}; + +Window_Command.prototype.isCurrentItemEnabled = function() { + return this.currentData() ? this.currentData().enabled : false; +}; + +Window_Command.prototype.currentSymbol = function() { + return this.currentData() ? this.currentData().symbol : null; +}; + +Window_Command.prototype.currentExt = function() { + return this.currentData() ? this.currentData().ext : null; +}; + +Window_Command.prototype.findSymbol = function(symbol) { + return this._list.findIndex(item => item.symbol === symbol); +}; + +Window_Command.prototype.selectSymbol = function(symbol) { + const index = this.findSymbol(symbol); + if (index >= 0) { + this.forceSelect(index); + } else { + this.forceSelect(0); + } +}; + +Window_Command.prototype.findExt = function(ext) { + return this._list.findIndex(item => item.ext === ext); +}; + +Window_Command.prototype.selectExt = function(ext) { + const index = this.findExt(ext); + if (index >= 0) { + this.forceSelect(index); + } else { + this.forceSelect(0); + } +}; + +Window_Command.prototype.drawItem = function(index) { + const rect = this.itemLineRect(index); + const align = this.itemTextAlign(); + this.resetTextColor(); + this.changePaintOpacity(this.isCommandEnabled(index)); + this.drawText(this.commandName(index), rect.x, rect.y, rect.width, align); +}; + +Window_Command.prototype.itemTextAlign = function() { + return "center"; +}; + +Window_Command.prototype.isOkEnabled = function() { + return true; +}; + +Window_Command.prototype.callOkHandler = function() { + const symbol = this.currentSymbol(); + if (this.isHandled(symbol)) { + this.callHandler(symbol); + } else if (this.isHandled("ok")) { + Window_Selectable.prototype.callOkHandler.call(this); + } else { + this.activate(); + } +}; + +Window_Command.prototype.refresh = function() { + this.clearCommandList(); + this.makeCommandList(); + Window_Selectable.prototype.refresh.call(this); +}; + +//----------------------------------------------------------------------------- +// Window_HorzCommand +// +// The command window for the horizontal selection format. + +function Window_HorzCommand() { + this.initialize(...arguments); +} + +Window_HorzCommand.prototype = Object.create(Window_Command.prototype); +Window_HorzCommand.prototype.constructor = Window_HorzCommand; + +Window_HorzCommand.prototype.initialize = function(rect) { + Window_Command.prototype.initialize.call(this, rect); +}; + +Window_HorzCommand.prototype.maxCols = function() { + return 4; +}; + +Window_HorzCommand.prototype.itemTextAlign = function() { + return "center"; +}; + +//----------------------------------------------------------------------------- +// Window_Help +// +// The window for displaying the description of the selected item. + +function Window_Help() { + this.initialize(...arguments); +} + +Window_Help.prototype = Object.create(Window_Base.prototype); +Window_Help.prototype.constructor = Window_Help; + +Window_Help.prototype.initialize = function(rect) { + Window_Base.prototype.initialize.call(this, rect); + this._text = ""; +}; + +Window_Help.prototype.setText = function(text) { + if (this._text !== text) { + this._text = text; + this.refresh(); + } +}; + +Window_Help.prototype.clear = function() { + this.setText(""); +}; + +Window_Help.prototype.setItem = function(item) { + this.setText(item ? item.description : ""); +}; + +Window_Help.prototype.refresh = function() { + const rect = this.baseTextRect(); + this.contents.clear(); + this.drawTextEx(this._text, rect.x, rect.y, rect.width); +}; + +//----------------------------------------------------------------------------- +// Window_Gold +// +// The window for displaying the party's gold. + +function Window_Gold() { + this.initialize(...arguments); +} + +Window_Gold.prototype = Object.create(Window_Selectable.prototype); +Window_Gold.prototype.constructor = Window_Gold; + +Window_Gold.prototype.initialize = function(rect) { + Window_Selectable.prototype.initialize.call(this, rect); + this.refresh(); +}; + +Window_Gold.prototype.colSpacing = function() { + return 0; +}; + +Window_Gold.prototype.refresh = function() { + const rect = this.itemLineRect(0); + const x = rect.x; + const y = rect.y; + const width = rect.width; + this.contents.clear(); + this.drawCurrencyValue(this.value(), this.currencyUnit(), x, y, width); +}; + +Window_Gold.prototype.value = function() { + return $gameParty.gold(); +}; + +Window_Gold.prototype.currencyUnit = function() { + return TextManager.currencyUnit; +}; + +Window_Gold.prototype.open = function() { + this.refresh(); + Window_Selectable.prototype.open.call(this); +}; + +//----------------------------------------------------------------------------- +// Window_StatusBase +// +// The superclass of windows for displaying actor status. + +function Window_StatusBase() { + this.initialize(...arguments); +} + +Window_StatusBase.prototype = Object.create(Window_Selectable.prototype); +Window_StatusBase.prototype.constructor = Window_StatusBase; + +Window_StatusBase.prototype.initialize = function(rect) { + Window_Selectable.prototype.initialize.call(this, rect); + this._additionalSprites = {}; + this.loadFaceImages(); +}; + +Window_StatusBase.prototype.loadFaceImages = function() { + for (const actor of $gameParty.members()) { + ImageManager.loadFace(actor.faceName()); + } +}; + +Window_StatusBase.prototype.refresh = function() { + this.hideAdditionalSprites(); + Window_Selectable.prototype.refresh.call(this); +}; + +Window_StatusBase.prototype.hideAdditionalSprites = function() { + for (const sprite of Object.values(this._additionalSprites)) { + sprite.hide(); + } +}; + +Window_StatusBase.prototype.placeActorName = function(actor, x, y) { + const key = "actor%1-name".format(actor.actorId()); + const sprite = this.createInnerSprite(key, Sprite_Name); + sprite.setup(actor); + sprite.move(x, y); + sprite.show(); +}; + +Window_StatusBase.prototype.placeStateIcon = function(actor, x, y) { + const key = "actor%1-stateIcon".format(actor.actorId()); + const sprite = this.createInnerSprite(key, Sprite_StateIcon); + sprite.setup(actor); + sprite.move(x, y); + sprite.show(); +}; + +Window_StatusBase.prototype.placeGauge = function(actor, type, x, y) { + const key = "actor%1-gauge-%2".format(actor.actorId(), type); + const sprite = this.createInnerSprite(key, Sprite_Gauge); + sprite.setup(actor, type); + sprite.move(x, y); + sprite.show(); +}; + +Window_StatusBase.prototype.createInnerSprite = function(key, spriteClass) { + const dict = this._additionalSprites; + if (dict[key]) { + return dict[key]; + } else { + const sprite = new spriteClass(); + dict[key] = sprite; + this.addInnerChild(sprite); + return sprite; + } +}; + +Window_StatusBase.prototype.placeTimeGauge = function(actor, x, y) { + if (BattleManager.isTpb()) { + this.placeGauge(actor, "time", x, y); + } +}; + +Window_StatusBase.prototype.placeBasicGauges = function(actor, x, y) { + this.placeGauge(actor, "hp", x, y); + this.placeGauge(actor, "mp", x, y + this.gaugeLineHeight()); + if ($dataSystem.optDisplayTp) { + this.placeGauge(actor, "tp", x, y + this.gaugeLineHeight() * 2); + } +}; + +Window_StatusBase.prototype.gaugeLineHeight = function() { + return 24; +}; + +Window_StatusBase.prototype.drawActorCharacter = function(actor, x, y) { + this.drawCharacter(actor.characterName(), actor.characterIndex(), x, y); +}; + +// prettier-ignore +Window_StatusBase.prototype.drawActorFace = function( + actor, x, y, width, height +) { + this.drawFace(actor.faceName(), actor.faceIndex(), x, y, width, height); +}; + +Window_StatusBase.prototype.drawActorName = function(actor, x, y, width) { + width = width || 168; + this.changeTextColor(ColorManager.hpColor(actor)); + this.drawText(actor.name(), x, y, width); +}; + +Window_StatusBase.prototype.drawActorClass = function(actor, x, y, width) { + width = width || 168; + this.resetTextColor(); + this.drawText(actor.currentClass().name, x, y, width); +}; + +Window_StatusBase.prototype.drawActorNickname = function(actor, x, y, width) { + width = width || 270; + this.resetTextColor(); + this.drawText(actor.nickname(), x, y, width); +}; + +Window_StatusBase.prototype.drawActorLevel = function(actor, x, y) { + this.changeTextColor(ColorManager.systemColor()); + this.drawText(TextManager.levelA, x, y, 48); + this.resetTextColor(); + this.drawText(actor.level, x + 84, y, 36, "right"); +}; + +Window_StatusBase.prototype.drawActorIcons = function(actor, x, y, width) { + width = width || 144; + const iconWidth = ImageManager.iconWidth; + const icons = actor.allIcons().slice(0, Math.floor(width / iconWidth)); + let iconX = x; + for (const icon of icons) { + this.drawIcon(icon, iconX, y + 2); + iconX += iconWidth; + } +}; + +Window_StatusBase.prototype.drawActorSimpleStatus = function(actor, x, y) { + const lineHeight = this.lineHeight(); + const x2 = x + 180; + this.drawActorName(actor, x, y); + this.drawActorLevel(actor, x, y + lineHeight * 1); + this.drawActorIcons(actor, x, y + lineHeight * 2); + this.drawActorClass(actor, x2, y); + this.placeBasicGauges(actor, x2, y + lineHeight); +}; + +Window_StatusBase.prototype.actorSlotName = function(actor, index) { + const slots = actor.equipSlots(); + return $dataSystem.equipTypes[slots[index]]; +}; + +//----------------------------------------------------------------------------- +// Window_MenuCommand +// +// The window for selecting a command on the menu screen. + +function Window_MenuCommand() { + this.initialize(...arguments); +} + +Window_MenuCommand.prototype = Object.create(Window_Command.prototype); +Window_MenuCommand.prototype.constructor = Window_MenuCommand; + +Window_MenuCommand.prototype.initialize = function(rect) { + Window_Command.prototype.initialize.call(this, rect); + this.selectLast(); + this._canRepeat = false; +}; + +Window_MenuCommand._lastCommandSymbol = null; + +Window_MenuCommand.initCommandPosition = function() { + this._lastCommandSymbol = null; +}; + +Window_MenuCommand.prototype.makeCommandList = function() { + this.addMainCommands(); + this.addFormationCommand(); + this.addOriginalCommands(); + this.addOptionsCommand(); + this.addSaveCommand(); + this.addGameEndCommand(); +}; + +Window_MenuCommand.prototype.addMainCommands = function() { + const enabled = this.areMainCommandsEnabled(); + if (this.needsCommand("item")) { + this.addCommand(TextManager.item, "item", enabled); + } + if (this.needsCommand("skill")) { + this.addCommand(TextManager.skill, "skill", enabled); + } + if (this.needsCommand("equip")) { + this.addCommand(TextManager.equip, "equip", enabled); + } + if (this.needsCommand("status")) { + this.addCommand(TextManager.status, "status", enabled); + } +}; + +Window_MenuCommand.prototype.addFormationCommand = function() { + if (this.needsCommand("formation")) { + const enabled = this.isFormationEnabled(); + this.addCommand(TextManager.formation, "formation", enabled); + } +}; + +Window_MenuCommand.prototype.addOriginalCommands = function() { + // +}; + +Window_MenuCommand.prototype.addOptionsCommand = function() { + if (this.needsCommand("options")) { + const enabled = this.isOptionsEnabled(); + this.addCommand(TextManager.options, "options", enabled); + } +}; + +Window_MenuCommand.prototype.addSaveCommand = function() { + if (this.needsCommand("save")) { + const enabled = this.isSaveEnabled(); + this.addCommand(TextManager.save, "save", enabled); + } +}; + +Window_MenuCommand.prototype.addGameEndCommand = function() { + const enabled = this.isGameEndEnabled(); + this.addCommand(TextManager.gameEnd, "gameEnd", enabled); +}; + +Window_MenuCommand.prototype.needsCommand = function(name) { + const table = ["item", "skill", "equip", "status", "formation", "save"]; + const index = table.indexOf(name); + if (index >= 0) { + return $dataSystem.menuCommands[index]; + } + return true; +}; + +Window_MenuCommand.prototype.areMainCommandsEnabled = function() { + return $gameParty.exists(); +}; + +Window_MenuCommand.prototype.isFormationEnabled = function() { + return $gameParty.size() >= 2 && $gameSystem.isFormationEnabled(); +}; + +Window_MenuCommand.prototype.isOptionsEnabled = function() { + return true; +}; + +Window_MenuCommand.prototype.isSaveEnabled = function() { + return !DataManager.isEventTest() && $gameSystem.isSaveEnabled(); +}; + +Window_MenuCommand.prototype.isGameEndEnabled = function() { + return true; +}; + +Window_MenuCommand.prototype.processOk = function() { + Window_MenuCommand._lastCommandSymbol = this.currentSymbol(); + Window_Command.prototype.processOk.call(this); +}; + +Window_MenuCommand.prototype.selectLast = function() { + this.selectSymbol(Window_MenuCommand._lastCommandSymbol); +}; + +//----------------------------------------------------------------------------- +// Window_MenuStatus +// +// The window for displaying party member status on the menu screen. + +function Window_MenuStatus() { + this.initialize(...arguments); +} + +Window_MenuStatus.prototype = Object.create(Window_StatusBase.prototype); +Window_MenuStatus.prototype.constructor = Window_MenuStatus; + +Window_MenuStatus.prototype.initialize = function(rect) { + Window_StatusBase.prototype.initialize.call(this, rect); + this._formationMode = false; + this._pendingIndex = -1; + this.refresh(); +}; + +Window_MenuStatus.prototype.maxItems = function() { + return $gameParty.size(); +}; + +Window_MenuStatus.prototype.numVisibleRows = function() { + return 4; +}; + +Window_MenuStatus.prototype.itemHeight = function() { + return Math.floor(this.innerHeight / this.numVisibleRows()); +}; + +Window_MenuStatus.prototype.actor = function(index) { + return $gameParty.members()[index]; +}; + +Window_MenuStatus.prototype.drawItem = function(index) { + this.drawPendingItemBackground(index); + this.drawItemImage(index); + this.drawItemStatus(index); +}; + +Window_MenuStatus.prototype.drawPendingItemBackground = function(index) { + if (index === this._pendingIndex) { + const rect = this.itemRect(index); + const color = ColorManager.pendingColor(); + this.changePaintOpacity(false); + this.contents.fillRect(rect.x, rect.y, rect.width, rect.height, color); + this.changePaintOpacity(true); + } +}; + +Window_MenuStatus.prototype.drawItemImage = function(index) { + const actor = this.actor(index); + const rect = this.itemRect(index); + const width = ImageManager.faceWidth; + const height = rect.height - 2; + this.changePaintOpacity(actor.isBattleMember()); + this.drawActorFace(actor, rect.x + 1, rect.y + 1, width, height); + this.changePaintOpacity(true); +}; + +Window_MenuStatus.prototype.drawItemStatus = function(index) { + const actor = this.actor(index); + const rect = this.itemRect(index); + const x = rect.x + 180; + const y = rect.y + Math.floor(rect.height / 2 - this.lineHeight() * 1.5); + this.drawActorSimpleStatus(actor, x, y); +}; + +Window_MenuStatus.prototype.processOk = function() { + Window_StatusBase.prototype.processOk.call(this); + const actor = this.actor(this.index()); + $gameParty.setMenuActor(actor); +}; + +Window_MenuStatus.prototype.isCurrentItemEnabled = function() { + if (this._formationMode) { + const actor = this.actor(this.index()); + return actor && actor.isFormationChangeOk(); + } else { + return true; + } +}; + +Window_MenuStatus.prototype.selectLast = function() { + this.smoothSelect($gameParty.menuActor().index() || 0); +}; + +Window_MenuStatus.prototype.formationMode = function() { + return this._formationMode; +}; + +Window_MenuStatus.prototype.setFormationMode = function(formationMode) { + this._formationMode = formationMode; +}; + +Window_MenuStatus.prototype.pendingIndex = function() { + return this._pendingIndex; +}; + +Window_MenuStatus.prototype.setPendingIndex = function(index) { + const lastPendingIndex = this._pendingIndex; + this._pendingIndex = index; + this.redrawItem(this._pendingIndex); + this.redrawItem(lastPendingIndex); +}; + +//----------------------------------------------------------------------------- +// Window_MenuActor +// +// The window for selecting a target actor on the item and skill screens. + +function Window_MenuActor() { + this.initialize(...arguments); +} + +Window_MenuActor.prototype = Object.create(Window_MenuStatus.prototype); +Window_MenuActor.prototype.constructor = Window_MenuActor; + +Window_MenuActor.prototype.initialize = function(rect) { + Window_MenuStatus.prototype.initialize.call(this, rect); + this.hide(); +}; + +Window_MenuActor.prototype.processOk = function() { + if (!this.cursorAll()) { + $gameParty.setTargetActor($gameParty.members()[this.index()]); + } + this.callOkHandler(); +}; + +Window_MenuActor.prototype.selectLast = function() { + this.forceSelect($gameParty.targetActor().index() || 0); +}; + +Window_MenuActor.prototype.selectForItem = function(item) { + const actor = $gameParty.menuActor(); + const action = new Game_Action(actor); + action.setItemObject(item); + this.setCursorFixed(false); + this.setCursorAll(false); + if (action.isForUser()) { + if (DataManager.isSkill(item)) { + this.setCursorFixed(true); + this.forceSelect(actor.index()); + } else { + this.selectLast(); + } + } else if (action.isForAll()) { + this.setCursorAll(true); + this.forceSelect(0); + } else { + this.selectLast(); + } +}; + +//----------------------------------------------------------------------------- +// Window_ItemCategory +// +// The window for selecting a category of items on the item and shop screens. + +function Window_ItemCategory() { + this.initialize(...arguments); +} + +Window_ItemCategory.prototype = Object.create(Window_HorzCommand.prototype); +Window_ItemCategory.prototype.constructor = Window_ItemCategory; + +Window_ItemCategory.prototype.initialize = function(rect) { + Window_HorzCommand.prototype.initialize.call(this, rect); +}; + +Window_ItemCategory.prototype.maxCols = function() { + return 4; +}; + +Window_ItemCategory.prototype.update = function() { + Window_HorzCommand.prototype.update.call(this); + if (this._itemWindow) { + this._itemWindow.setCategory(this.currentSymbol()); + } +}; + +Window_ItemCategory.prototype.makeCommandList = function() { + if (this.needsCommand("item")) { + this.addCommand(TextManager.item, "item"); + } + if (this.needsCommand("weapon")) { + this.addCommand(TextManager.weapon, "weapon"); + } + if (this.needsCommand("armor")) { + this.addCommand(TextManager.armor, "armor"); + } + if (this.needsCommand("keyItem")) { + this.addCommand(TextManager.keyItem, "keyItem"); + } +}; + +Window_ItemCategory.prototype.needsCommand = function(name) { + const table = ["item", "weapon", "armor", "keyItem"]; + const index = table.indexOf(name); + if (index >= 0) { + return $dataSystem.itemCategories[index]; + } + return true; +}; + +Window_ItemCategory.prototype.setItemWindow = function(itemWindow) { + this._itemWindow = itemWindow; +}; + +Window_ItemCategory.prototype.needsSelection = function() { + return this.maxItems() >= 2; +}; + +//----------------------------------------------------------------------------- +// Window_ItemList +// +// The window for selecting an item on the item screen. + +function Window_ItemList() { + this.initialize(...arguments); +} + +Window_ItemList.prototype = Object.create(Window_Selectable.prototype); +Window_ItemList.prototype.constructor = Window_ItemList; + +Window_ItemList.prototype.initialize = function(rect) { + Window_Selectable.prototype.initialize.call(this, rect); + this._category = "none"; + this._data = []; +}; + +Window_ItemList.prototype.setCategory = function(category) { + if (this._category !== category) { + this._category = category; + this.refresh(); + this.scrollTo(0, 0); + } +}; + +Window_ItemList.prototype.maxCols = function() { + return 2; +}; + +Window_ItemList.prototype.colSpacing = function() { + return 16; +}; + +Window_ItemList.prototype.maxItems = function() { + return this._data ? this._data.length : 1; +}; + +Window_ItemList.prototype.item = function() { + return this.itemAt(this.index()); +}; + +Window_ItemList.prototype.itemAt = function(index) { + return this._data && index >= 0 ? this._data[index] : null; +}; + +Window_ItemList.prototype.isCurrentItemEnabled = function() { + return this.isEnabled(this.item()); +}; + +Window_ItemList.prototype.includes = function(item) { + switch (this._category) { + case "item": + return DataManager.isItem(item) && item.itypeId === 1; + case "weapon": + return DataManager.isWeapon(item); + case "armor": + return DataManager.isArmor(item); + case "keyItem": + return DataManager.isItem(item) && item.itypeId === 2; + default: + return false; + } +}; + +Window_ItemList.prototype.needsNumber = function() { + if (this._category === "keyItem") { + return $dataSystem.optKeyItemsNumber; + } else { + return true; + } +}; + +Window_ItemList.prototype.isEnabled = function(item) { + return $gameParty.canUse(item); +}; + +Window_ItemList.prototype.makeItemList = function() { + this._data = $gameParty.allItems().filter(item => this.includes(item)); + if (this.includes(null)) { + this._data.push(null); + } +}; + +Window_ItemList.prototype.selectLast = function() { + const index = this._data.indexOf($gameParty.lastItem()); + this.forceSelect(index >= 0 ? index : 0); +}; + +Window_ItemList.prototype.drawItem = function(index) { + const item = this.itemAt(index); + if (item) { + const numberWidth = this.numberWidth(); + const rect = this.itemLineRect(index); + this.changePaintOpacity(this.isEnabled(item)); + this.drawItemName(item, rect.x, rect.y, rect.width - numberWidth); + this.drawItemNumber(item, rect.x, rect.y, rect.width); + this.changePaintOpacity(1); + } +}; + +Window_ItemList.prototype.numberWidth = function() { + return this.textWidth("000"); +}; + +Window_ItemList.prototype.drawItemNumber = function(item, x, y, width) { + if (this.needsNumber()) { + this.drawText(":", x, y, width - this.textWidth("00"), "right"); + this.drawText($gameParty.numItems(item), x, y, width, "right"); + } +}; + +Window_ItemList.prototype.updateHelp = function() { + this.setHelpWindowItem(this.item()); +}; + +Window_ItemList.prototype.refresh = function() { + this.makeItemList(); + Window_Selectable.prototype.refresh.call(this); +}; + +//----------------------------------------------------------------------------- +// Window_SkillType +// +// The window for selecting a skill type on the skill screen. + +function Window_SkillType() { + this.initialize(...arguments); +} + +Window_SkillType.prototype = Object.create(Window_Command.prototype); +Window_SkillType.prototype.constructor = Window_SkillType; + +Window_SkillType.prototype.initialize = function(rect) { + Window_Command.prototype.initialize.call(this, rect); + this._actor = null; +}; + +Window_SkillType.prototype.setActor = function(actor) { + if (this._actor !== actor) { + this._actor = actor; + this.refresh(); + this.selectLast(); + } +}; + +Window_SkillType.prototype.makeCommandList = function() { + if (this._actor) { + const skillTypes = this._actor.skillTypes(); + for (const stypeId of skillTypes) { + const name = $dataSystem.skillTypes[stypeId]; + this.addCommand(name, "skill", true, stypeId); + } + } +}; + +Window_SkillType.prototype.update = function() { + Window_Command.prototype.update.call(this); + if (this._skillWindow) { + this._skillWindow.setStypeId(this.currentExt()); + } +}; + +Window_SkillType.prototype.setSkillWindow = function(skillWindow) { + this._skillWindow = skillWindow; +}; + +Window_SkillType.prototype.selectLast = function() { + const skill = this._actor.lastMenuSkill(); + if (skill) { + this.selectExt(skill.stypeId); + } else { + this.forceSelect(0); + } +}; + +//----------------------------------------------------------------------------- +// Window_SkillStatus +// +// The window for displaying the skill user's status on the skill screen. + +function Window_SkillStatus() { + this.initialize(...arguments); +} + +Window_SkillStatus.prototype = Object.create(Window_StatusBase.prototype); +Window_SkillStatus.prototype.constructor = Window_SkillStatus; + +Window_SkillStatus.prototype.initialize = function(rect) { + Window_StatusBase.prototype.initialize.call(this, rect); + this._actor = null; +}; + +Window_SkillStatus.prototype.setActor = function(actor) { + if (this._actor !== actor) { + this._actor = actor; + this.refresh(); + } +}; + +Window_SkillStatus.prototype.refresh = function() { + Window_StatusBase.prototype.refresh.call(this); + if (this._actor) { + const x = this.colSpacing() / 2; + const h = this.innerHeight; + const y = h / 2 - this.lineHeight() * 1.5; + this.drawActorFace(this._actor, x + 1, 0, 144, h); + this.drawActorSimpleStatus(this._actor, x + 180, y); + } +}; + +//----------------------------------------------------------------------------- +// Window_SkillList +// +// The window for selecting a skill on the skill screen. + +function Window_SkillList() { + this.initialize(...arguments); +} + +Window_SkillList.prototype = Object.create(Window_Selectable.prototype); +Window_SkillList.prototype.constructor = Window_SkillList; + +Window_SkillList.prototype.initialize = function(rect) { + Window_Selectable.prototype.initialize.call(this, rect); + this._actor = null; + this._stypeId = 0; + this._data = []; +}; + +Window_SkillList.prototype.setActor = function(actor) { + if (this._actor !== actor) { + this._actor = actor; + this.refresh(); + this.scrollTo(0, 0); + } +}; + +Window_SkillList.prototype.setStypeId = function(stypeId) { + if (this._stypeId !== stypeId) { + this._stypeId = stypeId; + this.refresh(); + this.scrollTo(0, 0); + } +}; + +Window_SkillList.prototype.maxCols = function() { + return 2; +}; + +Window_SkillList.prototype.colSpacing = function() { + return 16; +}; + +Window_SkillList.prototype.maxItems = function() { + return this._data ? this._data.length : 1; +}; + +Window_SkillList.prototype.item = function() { + return this.itemAt(this.index()); +}; + +Window_SkillList.prototype.itemAt = function(index) { + return this._data && index >= 0 ? this._data[index] : null; +}; + +Window_SkillList.prototype.isCurrentItemEnabled = function() { + return this.isEnabled(this._data[this.index()]); +}; + +Window_SkillList.prototype.includes = function(item) { + return item && item.stypeId === this._stypeId; +}; + +Window_SkillList.prototype.isEnabled = function(item) { + return this._actor && this._actor.canUse(item); +}; + +Window_SkillList.prototype.makeItemList = function() { + if (this._actor) { + this._data = this._actor.skills().filter(item => this.includes(item)); + } else { + this._data = []; + } +}; + +Window_SkillList.prototype.selectLast = function() { + const index = this._data.indexOf(this._actor.lastSkill()); + this.forceSelect(index >= 0 ? index : 0); +}; + +Window_SkillList.prototype.drawItem = function(index) { + const skill = this.itemAt(index); + if (skill) { + const costWidth = this.costWidth(); + const rect = this.itemLineRect(index); + this.changePaintOpacity(this.isEnabled(skill)); + this.drawItemName(skill, rect.x, rect.y, rect.width - costWidth); + this.drawSkillCost(skill, rect.x, rect.y, rect.width); + this.changePaintOpacity(1); + } +}; + +Window_SkillList.prototype.costWidth = function() { + return this.textWidth("000"); +}; + +Window_SkillList.prototype.drawSkillCost = function(skill, x, y, width) { + if (this._actor.skillTpCost(skill) > 0) { + this.changeTextColor(ColorManager.tpCostColor()); + this.drawText(this._actor.skillTpCost(skill), x, y, width, "right"); + } else if (this._actor.skillMpCost(skill) > 0) { + this.changeTextColor(ColorManager.mpCostColor()); + this.drawText(this._actor.skillMpCost(skill), x, y, width, "right"); + } +}; + +Window_SkillList.prototype.updateHelp = function() { + this.setHelpWindowItem(this.item()); +}; + +Window_SkillList.prototype.refresh = function() { + this.makeItemList(); + Window_Selectable.prototype.refresh.call(this); +}; + +//----------------------------------------------------------------------------- +// Window_EquipStatus +// +// The window for displaying parameter changes on the equipment screen. + +function Window_EquipStatus() { + this.initialize(...arguments); +} + +Window_EquipStatus.prototype = Object.create(Window_StatusBase.prototype); +Window_EquipStatus.prototype.constructor = Window_EquipStatus; + +Window_EquipStatus.prototype.initialize = function(rect) { + Window_StatusBase.prototype.initialize.call(this, rect); + this._actor = null; + this._tempActor = null; + this.refresh(); +}; + +Window_EquipStatus.prototype.setActor = function(actor) { + if (this._actor !== actor) { + this._actor = actor; + this.refresh(); + } +}; + +Window_EquipStatus.prototype.colSpacing = function() { + return 0; +}; + +Window_EquipStatus.prototype.refresh = function() { + this.contents.clear(); + if (this._actor) { + const nameRect = this.itemLineRect(0); + this.drawActorName(this._actor, nameRect.x, 0, nameRect.width); + this.drawActorFace(this._actor, nameRect.x, nameRect.height); + this.drawAllParams(); + } +}; + +Window_EquipStatus.prototype.setTempActor = function(tempActor) { + if (this._tempActor !== tempActor) { + this._tempActor = tempActor; + this.refresh(); + } +}; + +Window_EquipStatus.prototype.drawAllParams = function() { + for (let i = 0; i < 6; i++) { + const x = this.itemPadding(); + const y = this.paramY(i); + this.drawItem(x, y, 2 + i); + } +}; + +Window_EquipStatus.prototype.drawItem = function(x, y, paramId) { + const paramX = this.paramX(); + const paramWidth = this.paramWidth(); + const rightArrowWidth = this.rightArrowWidth(); + this.drawParamName(x, y, paramId); + if (this._actor) { + this.drawCurrentParam(paramX, y, paramId); + } + this.drawRightArrow(paramX + paramWidth, y); + if (this._tempActor) { + this.drawNewParam(paramX + paramWidth + rightArrowWidth, y, paramId); + } +}; + +Window_EquipStatus.prototype.drawParamName = function(x, y, paramId) { + const width = this.paramX() - this.itemPadding() * 2; + this.changeTextColor(ColorManager.systemColor()); + this.drawText(TextManager.param(paramId), x, y, width); +}; + +Window_EquipStatus.prototype.drawCurrentParam = function(x, y, paramId) { + const paramWidth = this.paramWidth(); + this.resetTextColor(); + this.drawText(this._actor.param(paramId), x, y, paramWidth, "right"); +}; + +Window_EquipStatus.prototype.drawRightArrow = function(x, y) { + const rightArrowWidth = this.rightArrowWidth(); + this.changeTextColor(ColorManager.systemColor()); + this.drawText("\u2192", x, y, rightArrowWidth, "center"); +}; + +Window_EquipStatus.prototype.drawNewParam = function(x, y, paramId) { + const paramWidth = this.paramWidth(); + const newValue = this._tempActor.param(paramId); + const diffvalue = newValue - this._actor.param(paramId); + this.changeTextColor(ColorManager.paramchangeTextColor(diffvalue)); + this.drawText(newValue, x, y, paramWidth, "right"); +}; + +Window_EquipStatus.prototype.rightArrowWidth = function() { + return 32; +}; + +Window_EquipStatus.prototype.paramWidth = function() { + return 48; +}; + +Window_EquipStatus.prototype.paramX = function() { + const itemPadding = this.itemPadding(); + const rightArrowWidth = this.rightArrowWidth(); + const paramWidth = this.paramWidth(); + return this.innerWidth - itemPadding - paramWidth * 2 - rightArrowWidth; +}; + +Window_EquipStatus.prototype.paramY = function(index) { + const faceHeight = ImageManager.faceHeight; + return faceHeight + Math.floor(this.lineHeight() * (index + 1.5)); +}; + +//----------------------------------------------------------------------------- +// Window_EquipCommand +// +// The window for selecting a command on the equipment screen. + +function Window_EquipCommand() { + this.initialize(...arguments); +} + +Window_EquipCommand.prototype = Object.create(Window_HorzCommand.prototype); +Window_EquipCommand.prototype.constructor = Window_EquipCommand; + +Window_EquipCommand.prototype.initialize = function(rect) { + Window_HorzCommand.prototype.initialize.call(this, rect); +}; + +Window_EquipCommand.prototype.maxCols = function() { + return 3; +}; + +Window_EquipCommand.prototype.makeCommandList = function() { + this.addCommand(TextManager.equip2, "equip"); + this.addCommand(TextManager.optimize, "optimize"); + this.addCommand(TextManager.clear, "clear"); +}; + +//----------------------------------------------------------------------------- +// Window_EquipSlot +// +// The window for selecting an equipment slot on the equipment screen. + +function Window_EquipSlot() { + this.initialize(...arguments); +} + +Window_EquipSlot.prototype = Object.create(Window_StatusBase.prototype); +Window_EquipSlot.prototype.constructor = Window_EquipSlot; + +Window_EquipSlot.prototype.initialize = function(rect) { + Window_StatusBase.prototype.initialize.call(this, rect); + this._actor = null; + this.refresh(); +}; + +Window_EquipSlot.prototype.setActor = function(actor) { + if (this._actor !== actor) { + this._actor = actor; + this.refresh(); + } +}; + +Window_EquipSlot.prototype.update = function() { + Window_StatusBase.prototype.update.call(this); + if (this._itemWindow) { + this._itemWindow.setSlotId(this.index()); + } +}; + +Window_EquipSlot.prototype.maxItems = function() { + return this._actor ? this._actor.equipSlots().length : 0; +}; + +Window_EquipSlot.prototype.item = function() { + return this.itemAt(this.index()); +}; + +Window_EquipSlot.prototype.itemAt = function(index) { + return this._actor ? this._actor.equips()[index] : null; +}; + +Window_EquipSlot.prototype.drawItem = function(index) { + if (this._actor) { + const slotName = this.actorSlotName(this._actor, index); + const item = this.itemAt(index); + const slotNameWidth = this.slotNameWidth(); + const rect = this.itemLineRect(index); + const itemWidth = rect.width - slotNameWidth; + this.changeTextColor(ColorManager.systemColor()); + this.changePaintOpacity(this.isEnabled(index)); + this.drawText(slotName, rect.x, rect.y, slotNameWidth, rect.height); + this.drawItemName(item, rect.x + slotNameWidth, rect.y, itemWidth); + this.changePaintOpacity(true); + } +}; + +Window_EquipSlot.prototype.slotNameWidth = function() { + return 138; +}; + +Window_EquipSlot.prototype.isEnabled = function(index) { + return this._actor ? this._actor.isEquipChangeOk(index) : false; +}; + +Window_EquipSlot.prototype.isCurrentItemEnabled = function() { + return this.isEnabled(this.index()); +}; + +Window_EquipSlot.prototype.setStatusWindow = function(statusWindow) { + this._statusWindow = statusWindow; + this.callUpdateHelp(); +}; + +Window_EquipSlot.prototype.setItemWindow = function(itemWindow) { + this._itemWindow = itemWindow; +}; + +Window_EquipSlot.prototype.updateHelp = function() { + Window_StatusBase.prototype.updateHelp.call(this); + this.setHelpWindowItem(this.item()); + if (this._statusWindow) { + this._statusWindow.setTempActor(null); + } +}; + +//----------------------------------------------------------------------------- +// Window_EquipItem +// +// The window for selecting an equipment item on the equipment screen. + +function Window_EquipItem() { + this.initialize(...arguments); +} + +Window_EquipItem.prototype = Object.create(Window_ItemList.prototype); +Window_EquipItem.prototype.constructor = Window_EquipItem; + +Window_EquipItem.prototype.initialize = function(rect) { + Window_ItemList.prototype.initialize.call(this, rect); + this._actor = null; + this._slotId = 0; +}; + +Window_EquipItem.prototype.maxCols = function() { + return 1; +}; + +Window_EquipItem.prototype.colSpacing = function() { + return 8; +}; + +Window_EquipItem.prototype.setActor = function(actor) { + if (this._actor !== actor) { + this._actor = actor; + this.refresh(); + this.scrollTo(0, 0); + } +}; + +Window_EquipItem.prototype.setSlotId = function(slotId) { + if (this._slotId !== slotId) { + this._slotId = slotId; + this.refresh(); + this.scrollTo(0, 0); + } +}; + +Window_EquipItem.prototype.includes = function(item) { + if (item === null) { + return true; + } + return ( + this._actor && + this._actor.canEquip(item) && + item.etypeId === this.etypeId() + ); +}; + +Window_EquipItem.prototype.etypeId = function() { + if (this._actor && this._slotId >= 0) { + return this._actor.equipSlots()[this._slotId]; + } else { + return 0; + } +}; + +Window_EquipItem.prototype.isEnabled = function(/*item*/) { + return true; +}; + +Window_EquipItem.prototype.selectLast = function() { + // +}; + +Window_EquipItem.prototype.setStatusWindow = function(statusWindow) { + this._statusWindow = statusWindow; + this.callUpdateHelp(); +}; + +Window_EquipItem.prototype.updateHelp = function() { + Window_ItemList.prototype.updateHelp.call(this); + if (this._actor && this._statusWindow && this._slotId >= 0) { + const actor = JsonEx.makeDeepCopy(this._actor); + actor.forceChangeEquip(this._slotId, this.item()); + this._statusWindow.setTempActor(actor); + } +}; + +Window_EquipItem.prototype.playOkSound = function() { + // +}; + +//----------------------------------------------------------------------------- +// Window_Status +// +// The window for displaying full status on the status screen. + +function Window_Status() { + this.initialize(...arguments); +} + +Window_Status.prototype = Object.create(Window_StatusBase.prototype); +Window_Status.prototype.constructor = Window_Status; + +Window_Status.prototype.initialize = function(rect) { + Window_StatusBase.prototype.initialize.call(this, rect); + this._actor = null; + this.refresh(); + this.activate(); +}; + +Window_Status.prototype.setActor = function(actor) { + if (this._actor !== actor) { + this._actor = actor; + this.refresh(); + } +}; + +Window_Status.prototype.refresh = function() { + Window_StatusBase.prototype.refresh.call(this); + if (this._actor) { + this.drawBlock1(); + this.drawBlock2(); + } +}; + +Window_Status.prototype.drawBlock1 = function() { + const y = this.block1Y(); + this.drawActorName(this._actor, 6, y, 168); + this.drawActorClass(this._actor, 192, y, 168); + this.drawActorNickname(this._actor, 432, y, 270); +}; + +Window_Status.prototype.block1Y = function() { + return 0; +}; + +Window_Status.prototype.drawBlock2 = function() { + const y = this.block2Y(); + this.drawActorFace(this._actor, 12, y); + this.drawBasicInfo(204, y); + this.drawExpInfo(456, y); +}; + +Window_Status.prototype.block2Y = function() { + const lineHeight = this.lineHeight(); + const min = lineHeight; + const max = this.innerHeight - lineHeight * 4; + return Math.floor((lineHeight * 1.4).clamp(min, max)); +}; + +Window_Status.prototype.drawBasicInfo = function(x, y) { + const lineHeight = this.lineHeight(); + this.drawActorLevel(this._actor, x, y + lineHeight * 0); + this.drawActorIcons(this._actor, x, y + lineHeight * 1); + this.placeBasicGauges(this._actor, x, y + lineHeight * 2); +}; + +Window_Status.prototype.drawExpInfo = function(x, y) { + const lineHeight = this.lineHeight(); + const expTotal = TextManager.expTotal.format(TextManager.exp); + const expNext = TextManager.expNext.format(TextManager.level); + this.changeTextColor(ColorManager.systemColor()); + this.drawText(expTotal, x, y + lineHeight * 0, 270); + this.drawText(expNext, x, y + lineHeight * 2, 270); + this.resetTextColor(); + this.drawText(this.expTotalValue(), x, y + lineHeight * 1, 270, "right"); + this.drawText(this.expNextValue(), x, y + lineHeight * 3, 270, "right"); +}; + +Window_Status.prototype.expTotalValue = function() { + if (this._actor.isMaxLevel()) { + return "-------"; + } else { + return this._actor.currentExp(); + } +}; + +Window_Status.prototype.expNextValue = function() { + if (this._actor.isMaxLevel()) { + return "-------"; + } else { + return this._actor.nextRequiredExp(); + } +}; + +//----------------------------------------------------------------------------- +// Window_StatusParams +// +// The window for displaying parameters on the status screen. + +function Window_StatusParams() { + this.initialize(...arguments); +} + +Window_StatusParams.prototype = Object.create(Window_StatusBase.prototype); +Window_StatusParams.prototype.constructor = Window_StatusParams; + +Window_StatusParams.prototype.initialize = function(rect) { + Window_StatusBase.prototype.initialize.call(this, rect); + this._actor = null; +}; + +Window_StatusParams.prototype.setActor = function(actor) { + if (this._actor !== actor) { + this._actor = actor; + this.refresh(); + } +}; + +Window_StatusParams.prototype.maxItems = function() { + return 6; +}; + +Window_StatusParams.prototype.itemHeight = function() { + return this.lineHeight(); +}; + +Window_StatusParams.prototype.drawItem = function(index) { + const rect = this.itemLineRect(index); + const paramId = index + 2; + const name = TextManager.param(paramId); + const value = this._actor.param(paramId); + this.changeTextColor(ColorManager.systemColor()); + this.drawText(name, rect.x, rect.y, 160); + this.resetTextColor(); + this.drawText(value, rect.x + 160, rect.y, 60, "right"); +}; + +Window_StatusParams.prototype.drawItemBackground = function(/*index*/) { + // +}; + +//----------------------------------------------------------------------------- +// Window_StatusEquip +// +// The window for displaying equipment items on the status screen. + +function Window_StatusEquip() { + this.initialize(...arguments); +} + +Window_StatusEquip.prototype = Object.create(Window_StatusBase.prototype); +Window_StatusEquip.prototype.constructor = Window_StatusEquip; + +Window_StatusEquip.prototype.initialize = function(rect) { + Window_StatusBase.prototype.initialize.call(this, rect); + this._actor = null; +}; + +Window_StatusEquip.prototype.setActor = function(actor) { + if (this._actor !== actor) { + this._actor = actor; + this.refresh(); + } +}; + +Window_StatusEquip.prototype.maxItems = function() { + return this._actor ? this._actor.equipSlots().length : 0; +}; + +Window_StatusEquip.prototype.itemHeight = function() { + return this.lineHeight(); +}; + +Window_StatusEquip.prototype.drawItem = function(index) { + const rect = this.itemLineRect(index); + const equips = this._actor.equips(); + const item = equips[index]; + const slotName = this.actorSlotName(this._actor, index); + const sw = 138; + this.changeTextColor(ColorManager.systemColor()); + this.drawText(slotName, rect.x, rect.y, sw, rect.height); + this.drawItemName(item, rect.x + sw, rect.y, rect.width - sw); +}; + +Window_StatusEquip.prototype.drawItemBackground = function(/*index*/) { + // +}; + +//----------------------------------------------------------------------------- +// Window_Options +// +// The window for changing various settings on the options screen. + +function Window_Options() { + this.initialize(...arguments); +} + +Window_Options.prototype = Object.create(Window_Command.prototype); +Window_Options.prototype.constructor = Window_Options; + +Window_Options.prototype.initialize = function(rect) { + Window_Command.prototype.initialize.call(this, rect); +}; + +Window_Options.prototype.makeCommandList = function() { + this.addGeneralOptions(); + this.addVolumeOptions(); +}; + +Window_Options.prototype.addGeneralOptions = function() { + this.addCommand(TextManager.alwaysDash, "alwaysDash"); + this.addCommand(TextManager.commandRemember, "commandRemember"); + this.addCommand(TextManager.touchUI, "touchUI"); +}; + +Window_Options.prototype.addVolumeOptions = function() { + this.addCommand(TextManager.bgmVolume, "bgmVolume"); + this.addCommand(TextManager.bgsVolume, "bgsVolume"); + this.addCommand(TextManager.meVolume, "meVolume"); + this.addCommand(TextManager.seVolume, "seVolume"); +}; + +Window_Options.prototype.drawItem = function(index) { + const title = this.commandName(index); + const status = this.statusText(index); + const rect = this.itemLineRect(index); + const statusWidth = this.statusWidth(); + const titleWidth = rect.width - statusWidth; + this.resetTextColor(); + this.changePaintOpacity(this.isCommandEnabled(index)); + this.drawText(title, rect.x, rect.y, titleWidth, "left"); + this.drawText(status, rect.x + titleWidth, rect.y, statusWidth, "right"); +}; + +Window_Options.prototype.statusWidth = function() { + return 120; +}; + +Window_Options.prototype.statusText = function(index) { + const symbol = this.commandSymbol(index); + const value = this.getConfigValue(symbol); + if (this.isVolumeSymbol(symbol)) { + return this.volumeStatusText(value); + } else { + return this.booleanStatusText(value); + } +}; + +Window_Options.prototype.isVolumeSymbol = function(symbol) { + return symbol.includes("Volume"); +}; + +Window_Options.prototype.booleanStatusText = function(value) { + return value ? "ON" : "OFF"; +}; + +Window_Options.prototype.volumeStatusText = function(value) { + return value + "%"; +}; + +Window_Options.prototype.processOk = function() { + const index = this.index(); + const symbol = this.commandSymbol(index); + if (this.isVolumeSymbol(symbol)) { + this.changeVolume(symbol, true, true); + } else { + this.changeValue(symbol, !this.getConfigValue(symbol)); + } +}; + +Window_Options.prototype.cursorRight = function() { + const index = this.index(); + const symbol = this.commandSymbol(index); + if (this.isVolumeSymbol(symbol)) { + this.changeVolume(symbol, true, false); + } else { + this.changeValue(symbol, true); + } +}; + +Window_Options.prototype.cursorLeft = function() { + const index = this.index(); + const symbol = this.commandSymbol(index); + if (this.isVolumeSymbol(symbol)) { + this.changeVolume(symbol, false, false); + } else { + this.changeValue(symbol, false); + } +}; + +Window_Options.prototype.changeVolume = function(symbol, forward, wrap) { + const lastValue = this.getConfigValue(symbol); + const offset = this.volumeOffset(); + const value = lastValue + (forward ? offset : -offset); + if (value > 100 && wrap) { + this.changeValue(symbol, 0); + } else { + this.changeValue(symbol, value.clamp(0, 100)); + } +}; + +Window_Options.prototype.volumeOffset = function() { + return 20; +}; + +Window_Options.prototype.changeValue = function(symbol, value) { + const lastValue = this.getConfigValue(symbol); + if (lastValue !== value) { + this.setConfigValue(symbol, value); + this.redrawItem(this.findSymbol(symbol)); + this.playCursorSound(); + } +}; + +Window_Options.prototype.getConfigValue = function(symbol) { + return ConfigManager[symbol]; +}; + +Window_Options.prototype.setConfigValue = function(symbol, volume) { + ConfigManager[symbol] = volume; +}; + +//----------------------------------------------------------------------------- +// Window_SavefileList +// +// The window for selecting a save file on the save and load screens. + +function Window_SavefileList() { + this.initialize(...arguments); +} + +Window_SavefileList.prototype = Object.create(Window_Selectable.prototype); +Window_SavefileList.prototype.constructor = Window_SavefileList; + +Window_SavefileList.prototype.initialize = function(rect) { + Window_Selectable.prototype.initialize.call(this, rect); + this.activate(); + this._mode = null; + this._autosave = false; +}; + +Window_SavefileList.prototype.setMode = function(mode, autosave) { + this._mode = mode; + this._autosave = autosave; + this.refresh(); +}; + +Window_SavefileList.prototype.maxItems = function() { + return DataManager.maxSavefiles() - (this._autosave ? 0 : 1); +}; + +Window_SavefileList.prototype.numVisibleRows = function() { + return 5; +}; + +Window_SavefileList.prototype.itemHeight = function() { + return Math.floor(this.innerHeight / this.numVisibleRows()); +}; + +Window_SavefileList.prototype.drawItem = function(index) { + const savefileId = this.indexToSavefileId(index); + const info = DataManager.savefileInfo(savefileId); + const rect = this.itemRectWithPadding(index); + this.resetTextColor(); + this.changePaintOpacity(this.isEnabled(savefileId)); + this.drawTitle(savefileId, rect.x, rect.y + 4); + if (info) { + this.drawContents(info, rect); + } +}; + +Window_SavefileList.prototype.indexToSavefileId = function(index) { + return index + (this._autosave ? 0 : 1); +}; + +Window_SavefileList.prototype.savefileIdToIndex = function(savefileId) { + return savefileId - (this._autosave ? 0 : 1); +}; + +Window_SavefileList.prototype.isEnabled = function(savefileId) { + if (this._mode === "save") { + return savefileId > 0; + } else { + return !!DataManager.savefileInfo(savefileId); + } +}; + +Window_SavefileList.prototype.savefileId = function() { + return this.indexToSavefileId(this.index()); +}; + +Window_SavefileList.prototype.selectSavefile = function(savefileId) { + const index = Math.max(0, this.savefileIdToIndex(savefileId)); + this.select(index); + this.setTopRow(index - 2); +}; + +Window_SavefileList.prototype.drawTitle = function(savefileId, x, y) { + if (savefileId === 0) { + this.drawText(TextManager.autosave, x, y, 180); + } else { + this.drawText(TextManager.file + " " + savefileId, x, y, 180); + } +}; + +Window_SavefileList.prototype.drawContents = function(info, rect) { + const bottom = rect.y + rect.height; + if (rect.width >= 420) { + this.drawPartyCharacters(info, rect.x + 220, bottom - 8); + } + const lineHeight = this.lineHeight(); + const y2 = bottom - lineHeight - 4; + if (y2 >= lineHeight) { + this.drawPlaytime(info, rect.x, y2, rect.width); + } +}; + +Window_SavefileList.prototype.drawPartyCharacters = function(info, x, y) { + if (info.characters) { + let characterX = x; + for (const data of info.characters) { + this.drawCharacter(data[0], data[1], characterX, y); + characterX += 48; + } + } +}; + +Window_SavefileList.prototype.drawPlaytime = function(info, x, y, width) { + if (info.playtime) { + this.drawText(info.playtime, x, y, width, "right"); + } +}; + +Window_SavefileList.prototype.playOkSound = function() { + // +}; + +//----------------------------------------------------------------------------- +// Window_ShopCommand +// +// The window for selecting buy/sell on the shop screen. + +function Window_ShopCommand() { + this.initialize(...arguments); +} + +Window_ShopCommand.prototype = Object.create(Window_HorzCommand.prototype); +Window_ShopCommand.prototype.constructor = Window_ShopCommand; + +Window_ShopCommand.prototype.initialize = function(rect) { + Window_HorzCommand.prototype.initialize.call(this, rect); +}; + +Window_ShopCommand.prototype.setPurchaseOnly = function(purchaseOnly) { + this._purchaseOnly = purchaseOnly; + this.refresh(); +}; + +Window_ShopCommand.prototype.maxCols = function() { + return 3; +}; + +Window_ShopCommand.prototype.makeCommandList = function() { + this.addCommand(TextManager.buy, "buy"); + this.addCommand(TextManager.sell, "sell", !this._purchaseOnly); + this.addCommand(TextManager.cancel, "cancel"); +}; + +//----------------------------------------------------------------------------- +// Window_ShopBuy +// +// The window for selecting an item to buy on the shop screen. + +function Window_ShopBuy() { + this.initialize(...arguments); +} + +Window_ShopBuy.prototype = Object.create(Window_Selectable.prototype); +Window_ShopBuy.prototype.constructor = Window_ShopBuy; + +Window_ShopBuy.prototype.initialize = function(rect) { + Window_Selectable.prototype.initialize.call(this, rect); + this._money = 0; +}; + +Window_ShopBuy.prototype.setupGoods = function(shopGoods) { + this._shopGoods = shopGoods; + this.refresh(); + this.select(0); +}; + +Window_ShopBuy.prototype.maxItems = function() { + return this._data ? this._data.length : 1; +}; + +Window_ShopBuy.prototype.item = function() { + return this.itemAt(this.index()); +}; + +Window_ShopBuy.prototype.itemAt = function(index) { + return this._data && index >= 0 ? this._data[index] : null; +}; + +Window_ShopBuy.prototype.setMoney = function(money) { + this._money = money; + this.refresh(); +}; + +Window_ShopBuy.prototype.isCurrentItemEnabled = function() { + return this.isEnabled(this._data[this.index()]); +}; + +Window_ShopBuy.prototype.price = function(item) { + return this._price[this._data.indexOf(item)] || 0; +}; + +Window_ShopBuy.prototype.isEnabled = function(item) { + return ( + item && this.price(item) <= this._money && !$gameParty.hasMaxItems(item) + ); +}; + +Window_ShopBuy.prototype.refresh = function() { + this.makeItemList(); + Window_Selectable.prototype.refresh.call(this); +}; + +Window_ShopBuy.prototype.makeItemList = function() { + this._data = []; + this._price = []; + for (const goods of this._shopGoods) { + const item = this.goodsToItem(goods); + if (item) { + this._data.push(item); + this._price.push(goods[2] === 0 ? item.price : goods[3]); + } + } +}; + +Window_ShopBuy.prototype.goodsToItem = function(goods) { + switch (goods[0]) { + case 0: + return $dataItems[goods[1]]; + case 1: + return $dataWeapons[goods[1]]; + case 2: + return $dataArmors[goods[1]]; + default: + return null; + } +}; + +Window_ShopBuy.prototype.drawItem = function(index) { + const item = this.itemAt(index); + const price = this.price(item); + const rect = this.itemLineRect(index); + const priceWidth = this.priceWidth(); + const priceX = rect.x + rect.width - priceWidth; + const nameWidth = rect.width - priceWidth; + this.changePaintOpacity(this.isEnabled(item)); + this.drawItemName(item, rect.x, rect.y, nameWidth); + this.drawText(price, priceX, rect.y, priceWidth, "right"); + this.changePaintOpacity(true); +}; + +Window_ShopBuy.prototype.priceWidth = function() { + return 96; +}; + +Window_ShopBuy.prototype.setStatusWindow = function(statusWindow) { + this._statusWindow = statusWindow; + this.callUpdateHelp(); +}; + +Window_ShopBuy.prototype.updateHelp = function() { + this.setHelpWindowItem(this.item()); + if (this._statusWindow) { + this._statusWindow.setItem(this.item()); + } +}; + +//----------------------------------------------------------------------------- +// Window_ShopSell +// +// The window for selecting an item to sell on the shop screen. + +function Window_ShopSell() { + this.initialize(...arguments); +} + +Window_ShopSell.prototype = Object.create(Window_ItemList.prototype); +Window_ShopSell.prototype.constructor = Window_ShopSell; + +Window_ShopSell.prototype.initialize = function(rect) { + Window_ItemList.prototype.initialize.call(this, rect); +}; + +Window_ShopSell.prototype.isEnabled = function(item) { + return item && item.price > 0; +}; + +//----------------------------------------------------------------------------- +// Window_ShopNumber +// +// The window for inputting quantity of items to buy or sell on the shop +// screen. + +function Window_ShopNumber() { + this.initialize(...arguments); +} + +Window_ShopNumber.prototype = Object.create(Window_Selectable.prototype); +Window_ShopNumber.prototype.constructor = Window_ShopNumber; + +Window_ShopNumber.prototype.initialize = function(rect) { + Window_Selectable.prototype.initialize.call(this, rect); + this._item = null; + this._max = 1; + this._price = 0; + this._number = 1; + this._currencyUnit = TextManager.currencyUnit; + this.createButtons(); + this.select(0); + this._canRepeat = false; +}; + +Window_ShopNumber.prototype.isScrollEnabled = function() { + return false; +}; + +Window_ShopNumber.prototype.number = function() { + return this._number; +}; + +Window_ShopNumber.prototype.setup = function(item, max, price) { + this._item = item; + this._max = Math.floor(max); + this._price = price; + this._number = 1; + this.placeButtons(); + this.refresh(); +}; + +Window_ShopNumber.prototype.setCurrencyUnit = function(currencyUnit) { + this._currencyUnit = currencyUnit; + this.refresh(); +}; + +Window_ShopNumber.prototype.createButtons = function() { + this._buttons = []; + if (ConfigManager.touchUI) { + for (const type of ["down2", "down", "up", "up2", "ok"]) { + const button = new Sprite_Button(type); + this._buttons.push(button); + this.addInnerChild(button); + } + this._buttons[0].setClickHandler(this.onButtonDown2.bind(this)); + this._buttons[1].setClickHandler(this.onButtonDown.bind(this)); + this._buttons[2].setClickHandler(this.onButtonUp.bind(this)); + this._buttons[3].setClickHandler(this.onButtonUp2.bind(this)); + this._buttons[4].setClickHandler(this.onButtonOk.bind(this)); + } +}; + +Window_ShopNumber.prototype.placeButtons = function() { + const sp = this.buttonSpacing(); + const totalWidth = this.totalButtonWidth(); + let x = (this.innerWidth - totalWidth) / 2; + for (const button of this._buttons) { + button.x = x; + button.y = this.buttonY(); + x += button.width + sp; + } +}; + +Window_ShopNumber.prototype.totalButtonWidth = function() { + const sp = this.buttonSpacing(); + return this._buttons.reduce((r, button) => r + button.width + sp, -sp); +}; + +Window_ShopNumber.prototype.buttonSpacing = function() { + return 8; +}; + +Window_ShopNumber.prototype.refresh = function() { + Window_Selectable.prototype.refresh.call(this); + this.drawItemBackground(0); + this.drawCurrentItemName(); + this.drawMultiplicationSign(); + this.drawNumber(); + this.drawHorzLine(); + this.drawTotalPrice(); +}; + +Window_ShopNumber.prototype.drawCurrentItemName = function() { + const padding = this.itemPadding(); + const x = padding * 2; + const y = this.itemNameY(); + const width = this.multiplicationSignX() - padding * 3; + this.drawItemName(this._item, x, y, width); +}; + +Window_ShopNumber.prototype.drawMultiplicationSign = function() { + const sign = this.multiplicationSign(); + const width = this.textWidth(sign); + const x = this.multiplicationSignX(); + const y = this.itemNameY(); + this.resetTextColor(); + this.drawText(sign, x, y, width); +}; + +Window_ShopNumber.prototype.multiplicationSign = function() { + return "\u00d7"; +}; + +Window_ShopNumber.prototype.multiplicationSignX = function() { + const sign = this.multiplicationSign(); + const width = this.textWidth(sign); + return this.cursorX() - width * 2; +}; + +Window_ShopNumber.prototype.drawNumber = function() { + const x = this.cursorX(); + const y = this.itemNameY(); + const width = this.cursorWidth() - this.itemPadding(); + this.resetTextColor(); + this.drawText(this._number, x, y, width, "right"); +}; + +Window_ShopNumber.prototype.drawHorzLine = function() { + const padding = this.itemPadding(); + const lineHeight = this.lineHeight(); + const itemY = this.itemNameY(); + const totalY = this.totalPriceY(); + const x = padding; + const y = Math.floor((itemY + totalY + lineHeight) / 2); + const width = this.innerWidth - padding * 2; + this.drawRect(x, y, width, 5); +}; + +Window_ShopNumber.prototype.drawTotalPrice = function() { + const padding = this.itemPadding(); + const total = this._price * this._number; + const width = this.innerWidth - padding * 2; + const y = this.totalPriceY(); + this.drawCurrencyValue(total, this._currencyUnit, 0, y, width); +}; + +Window_ShopNumber.prototype.itemNameY = function() { + return Math.floor(this.innerHeight / 2 - this.lineHeight() * 1.5); +}; + +Window_ShopNumber.prototype.totalPriceY = function() { + return Math.floor(this.itemNameY() + this.lineHeight() * 2); +}; + +Window_ShopNumber.prototype.buttonY = function() { + return Math.floor(this.totalPriceY() + this.lineHeight() * 2); +}; + +Window_ShopNumber.prototype.cursorWidth = function() { + const padding = this.itemPadding(); + const digitWidth = this.textWidth("0"); + return this.maxDigits() * digitWidth + padding * 2; +}; + +Window_ShopNumber.prototype.cursorX = function() { + const padding = this.itemPadding(); + return this.innerWidth - this.cursorWidth() - padding * 2; +}; + +Window_ShopNumber.prototype.maxDigits = function() { + return 2; +}; + +Window_ShopNumber.prototype.update = function() { + Window_Selectable.prototype.update.call(this); + this.processNumberChange(); +}; + +Window_ShopNumber.prototype.playOkSound = function() { + // +}; + +Window_ShopNumber.prototype.processNumberChange = function() { + if (this.isOpenAndActive()) { + if (Input.isRepeated("right")) { + this.changeNumber(1); + } + if (Input.isRepeated("left")) { + this.changeNumber(-1); + } + if (Input.isRepeated("up")) { + this.changeNumber(10); + } + if (Input.isRepeated("down")) { + this.changeNumber(-10); + } + } +}; + +Window_ShopNumber.prototype.changeNumber = function(amount) { + const lastNumber = this._number; + this._number = (this._number + amount).clamp(1, this._max); + if (this._number !== lastNumber) { + this.playCursorSound(); + this.refresh(); + } +}; + +Window_ShopNumber.prototype.itemRect = function() { + const rect = new Rectangle(); + rect.x = this.cursorX(); + rect.y = this.itemNameY(); + rect.width = this.cursorWidth(); + rect.height = this.lineHeight(); + return rect; +}; + +Window_ShopNumber.prototype.isTouchOkEnabled = function() { + return false; +}; + +Window_ShopNumber.prototype.onButtonUp = function() { + this.changeNumber(1); +}; + +Window_ShopNumber.prototype.onButtonUp2 = function() { + this.changeNumber(10); +}; + +Window_ShopNumber.prototype.onButtonDown = function() { + this.changeNumber(-1); +}; + +Window_ShopNumber.prototype.onButtonDown2 = function() { + this.changeNumber(-10); +}; + +Window_ShopNumber.prototype.onButtonOk = function() { + this.processOk(); +}; + +//----------------------------------------------------------------------------- +// Window_ShopStatus +// +// The window for displaying number of items in possession and the actor's +// equipment on the shop screen. + +function Window_ShopStatus() { + this.initialize(...arguments); +} + +Window_ShopStatus.prototype = Object.create(Window_StatusBase.prototype); +Window_ShopStatus.prototype.constructor = Window_ShopStatus; + +Window_ShopStatus.prototype.initialize = function(rect) { + Window_StatusBase.prototype.initialize.call(this, rect); + this._item = null; + this._pageIndex = 0; + this.refresh(); +}; + +Window_ShopStatus.prototype.refresh = function() { + this.contents.clear(); + if (this._item) { + const x = this.itemPadding(); + this.drawPossession(x, 0); + if (this.isEquipItem()) { + const y = Math.floor(this.lineHeight() * 1.5); + this.drawEquipInfo(x, y); + } + } +}; + +Window_ShopStatus.prototype.setItem = function(item) { + this._item = item; + this.refresh(); +}; + +Window_ShopStatus.prototype.isEquipItem = function() { + return DataManager.isWeapon(this._item) || DataManager.isArmor(this._item); +}; + +Window_ShopStatus.prototype.drawPossession = function(x, y) { + const width = this.innerWidth - this.itemPadding() - x; + const possessionWidth = this.textWidth("0000"); + this.changeTextColor(ColorManager.systemColor()); + this.drawText(TextManager.possession, x, y, width - possessionWidth); + this.resetTextColor(); + this.drawText($gameParty.numItems(this._item), x, y, width, "right"); +}; + +Window_ShopStatus.prototype.drawEquipInfo = function(x, y) { + const members = this.statusMembers(); + for (let i = 0; i < members.length; i++) { + const actorY = y + Math.floor(this.lineHeight() * i * 2.2); + this.drawActorEquipInfo(x, actorY, members[i]); + } +}; + +Window_ShopStatus.prototype.statusMembers = function() { + const start = this._pageIndex * this.pageSize(); + const end = start + this.pageSize(); + return $gameParty.members().slice(start, end); +}; + +Window_ShopStatus.prototype.pageSize = function() { + return 4; +}; + +Window_ShopStatus.prototype.maxPages = function() { + return Math.floor( + ($gameParty.size() + this.pageSize() - 1) / this.pageSize() + ); +}; + +Window_ShopStatus.prototype.drawActorEquipInfo = function(x, y, actor) { + const item1 = this.currentEquippedItem(actor, this._item.etypeId); + const width = this.innerWidth - x - this.itemPadding(); + const enabled = actor.canEquip(this._item); + this.changePaintOpacity(enabled); + this.resetTextColor(); + this.drawText(actor.name(), x, y, width); + if (enabled) { + this.drawActorParamChange(x, y, actor, item1); + } + this.drawItemName(item1, x, y + this.lineHeight(), width); + this.changePaintOpacity(true); +}; + +// prettier-ignore +Window_ShopStatus.prototype.drawActorParamChange = function( + x, y, actor, item1 +) { + const width = this.innerWidth - this.itemPadding() - x; + const paramId = this.paramId(); + const change = + this._item.params[paramId] - (item1 ? item1.params[paramId] : 0); + this.changeTextColor(ColorManager.paramchangeTextColor(change)); + this.drawText((change > 0 ? "+" : "") + change, x, y, width, "right"); +}; + +Window_ShopStatus.prototype.paramId = function() { + return DataManager.isWeapon(this._item) ? 2 : 3; +}; + +Window_ShopStatus.prototype.currentEquippedItem = function(actor, etypeId) { + const list = []; + const equips = actor.equips(); + const slots = actor.equipSlots(); + for (let i = 0; i < slots.length; i++) { + if (slots[i] === etypeId) { + list.push(equips[i]); + } + } + const paramId = this.paramId(); + let worstParam = Number.MAX_VALUE; + let worstItem = null; + for (const item of list) { + if (item && item.params[paramId] < worstParam) { + worstParam = item.params[paramId]; + worstItem = item; + } + } + return worstItem; +}; + +Window_ShopStatus.prototype.update = function() { + Window_StatusBase.prototype.update.call(this); + this.updatePage(); +}; + +Window_ShopStatus.prototype.updatePage = function() { + if (this.isPageChangeEnabled() && this.isPageChangeRequested()) { + this.changePage(); + } +}; + +Window_ShopStatus.prototype.isPageChangeEnabled = function() { + return this.visible && this.maxPages() >= 2; +}; + +Window_ShopStatus.prototype.isPageChangeRequested = function() { + if (Input.isTriggered("shift")) { + return true; + } + if (TouchInput.isTriggered() && this.isTouchedInsideFrame()) { + return true; + } + return false; +}; + +Window_ShopStatus.prototype.changePage = function() { + this._pageIndex = (this._pageIndex + 1) % this.maxPages(); + this.refresh(); + this.playCursorSound(); +}; + +//----------------------------------------------------------------------------- +// Window_NameEdit +// +// The window for editing an actor's name on the name input screen. + +function Window_NameEdit() { + this.initialize(...arguments); +} + +Window_NameEdit.prototype = Object.create(Window_StatusBase.prototype); +Window_NameEdit.prototype.constructor = Window_NameEdit; + +Window_NameEdit.prototype.initialize = function(rect) { + Window_StatusBase.prototype.initialize.call(this, rect); + this._actor = null; + this._maxLength = 0; + this._name = ""; + this._index = 0; + this._defaultName = 0; + this.deactivate(); +}; + +Window_NameEdit.prototype.setup = function(actor, maxLength) { + this._actor = actor; + this._maxLength = maxLength; + this._name = actor.name().slice(0, this._maxLength); + this._index = this._name.length; + this._defaultName = this._name; + ImageManager.loadFace(actor.faceName()); +}; + +Window_NameEdit.prototype.name = function() { + return this._name; +}; + +Window_NameEdit.prototype.restoreDefault = function() { + this._name = this._defaultName; + this._index = this._name.length; + this.refresh(); + return this._name.length > 0; +}; + +Window_NameEdit.prototype.add = function(ch) { + if (this._index < this._maxLength) { + this._name += ch; + this._index++; + this.refresh(); + return true; + } else { + return false; + } +}; + +Window_NameEdit.prototype.back = function() { + if (this._index > 0) { + this._index--; + this._name = this._name.slice(0, this._index); + this.refresh(); + return true; + } else { + return false; + } +}; + +Window_NameEdit.prototype.faceWidth = function() { + return 144; +}; + +Window_NameEdit.prototype.charWidth = function() { + const text = $gameSystem.isJapanese() ? "\uff21" : "A"; + return this.textWidth(text); +}; + +Window_NameEdit.prototype.left = function() { + const nameCenter = (this.innerWidth + this.faceWidth()) / 2; + const nameWidth = (this._maxLength + 1) * this.charWidth(); + return Math.min(nameCenter - nameWidth / 2, this.innerWidth - nameWidth); +}; + +Window_NameEdit.prototype.itemRect = function(index) { + const x = this.left() + index * this.charWidth(); + const y = 54; + const width = this.charWidth(); + const height = this.lineHeight(); + return new Rectangle(x, y, width, height); +}; + +Window_NameEdit.prototype.underlineRect = function(index) { + const rect = this.itemRect(index); + rect.x++; + rect.y += rect.height - 4; + rect.width -= 2; + rect.height = 2; + return rect; +}; + +Window_NameEdit.prototype.underlineColor = function() { + return ColorManager.normalColor(); +}; + +Window_NameEdit.prototype.drawUnderline = function(index) { + const rect = this.underlineRect(index); + const color = this.underlineColor(); + this.contents.paintOpacity = 48; + this.contents.fillRect(rect.x, rect.y, rect.width, rect.height, color); + this.contents.paintOpacity = 255; +}; + +Window_NameEdit.prototype.drawChar = function(index) { + const rect = this.itemRect(index); + this.resetTextColor(); + this.drawText(this._name[index] || "", rect.x, rect.y); +}; + +Window_NameEdit.prototype.refresh = function() { + this.contents.clear(); + this.drawActorFace(this._actor, 0, 0); + for (let i = 0; i < this._maxLength; i++) { + this.drawUnderline(i); + } + for (let j = 0; j < this._name.length; j++) { + this.drawChar(j); + } + const rect = this.itemRect(this._index); + this.setCursorRect(rect.x, rect.y, rect.width, rect.height); +}; + +//----------------------------------------------------------------------------- +// Window_NameInput +// +// The window for selecting text characters on the name input screen. + +function Window_NameInput() { + this.initialize(...arguments); +} + +Window_NameInput.prototype = Object.create(Window_Selectable.prototype); +Window_NameInput.prototype.constructor = Window_NameInput; + +// prettier-ignore +Window_NameInput.LATIN1 = + [ "A","B","C","D","E", "a","b","c","d","e", + "F","G","H","I","J", "f","g","h","i","j", + "K","L","M","N","O", "k","l","m","n","o", + "P","Q","R","S","T", "p","q","r","s","t", + "U","V","W","X","Y", "u","v","w","x","y", + "Z","[","]","^","_", "z","{","}","|","~", + "0","1","2","3","4", "!","#","$","%","&", + "5","6","7","8","9", "(",")","*","+","-", + "/","=","@","<",">", ":",";"," ","Page","OK" ]; +// prettier-ignore +Window_NameInput.LATIN2 = + [ "Á","É","Í","Ó","Ú", "á","é","í","ó","ú", + "À","È","Ì","Ò","Ù", "à","è","ì","ò","ù", + "Â","Ê","Î","Ô","Û", "â","ê","î","ô","û", + "Ä","Ë","Ï","Ö","Ü", "ä","ë","ï","ö","ü", + "Ā","Ē","Ī","Ō","Ū", "ā","ē","ī","ō","ū", + "Ã","Å","Æ","Ç","Ð", "ã","å","æ","ç","ð", + "Ñ","Õ","Ø","Š","Ŵ", "ñ","õ","ø","š","ŵ", + "Ý","Ŷ","Ÿ","Ž","Þ", "ý","ÿ","ŷ","ž","þ", + "IJ","Œ","ij","œ","ß", "«","»"," ","Page","OK" ]; +// prettier-ignore +Window_NameInput.RUSSIA = + [ "А","Б","В","Г","Д", "а","б","в","г","д", + "Е","Ё","Ж","З","И", "е","ё","ж","з","и", + "Й","К","Л","М","Н", "й","к","л","м","н", + "О","П","Р","С","Т", "о","п","р","с","т", + "У","Ф","Х","Ц","Ч", "у","ф","х","ц","ч", + "Ш","Щ","Ъ","Ы","Ь", "ш","щ","ъ","ы","ь", + "Э","Ю","Я","^","_", "э","ю","я","%","&", + "0","1","2","3","4", "(",")","*","+","-", + "5","6","7","8","9", ":",";"," ","","OK" ]; +// prettier-ignore +Window_NameInput.JAPAN1 = + [ "あ","い","う","え","お", "が","ぎ","ぐ","げ","ご", + "か","き","く","け","こ", "ざ","じ","ず","ぜ","ぞ", + "さ","し","す","せ","そ", "だ","ぢ","づ","で","ど", + "た","ち","つ","て","と", "ば","び","ぶ","べ","ぼ", + "な","に","ぬ","ね","の", "ぱ","ぴ","ぷ","ぺ","ぽ", + "は","ひ","ふ","へ","ほ", "ぁ","ぃ","ぅ","ぇ","ぉ", + "ま","み","む","め","も", "っ","ゃ","ゅ","ょ","ゎ", + "や","ゆ","よ","わ","ん", "ー","~","・","=","☆", + "ら","り","る","れ","ろ", "ゔ","を"," ","カナ","決定" ]; +// prettier-ignore +Window_NameInput.JAPAN2 = + [ "ア","イ","ウ","エ","オ", "ガ","ギ","グ","ゲ","ゴ", + "カ","キ","ク","ケ","コ", "ザ","ジ","ズ","ゼ","ゾ", + "サ","シ","ス","セ","ソ", "ダ","ヂ","ヅ","デ","ド", + "タ","チ","ツ","テ","ト", "バ","ビ","ブ","ベ","ボ", + "ナ","ニ","ヌ","ネ","ノ", "パ","ピ","プ","ペ","ポ", + "ハ","ヒ","フ","ヘ","ホ", "ァ","ィ","ゥ","ェ","ォ", + "マ","ミ","ム","メ","モ", "ッ","ャ","ュ","ョ","ヮ", + "ヤ","ユ","ヨ","ワ","ン", "ー","~","・","=","☆", + "ラ","リ","ル","レ","ロ", "ヴ","ヲ"," ","英数","決定" ]; +// prettier-ignore +Window_NameInput.JAPAN3 = + [ "A","B","C","D","E", "a","b","c","d","e", + "F","G","H","I","J", "f","g","h","i","j", + "K","L","M","N","O", "k","l","m","n","o", + "P","Q","R","S","T", "p","q","r","s","t", + "U","V","W","X","Y", "u","v","w","x","y", + "Z","[","]","^","_", "z","{","}","|","~", + "0","1","2","3","4", "!","#","$","%","&", + "5","6","7","8","9", "(",")","*","+","-", + "/","=","@","<",">", ":",";"," ","かな","決定" ]; + +Window_NameInput.prototype.initialize = function(rect) { + Window_Selectable.prototype.initialize.call(this, rect); + this._editWindow = null; + this._page = 0; + this._index = 0; +}; + +Window_NameInput.prototype.setEditWindow = function(editWindow) { + this._editWindow = editWindow; + this.refresh(); + this.updateCursor(); + this.activate(); +}; + +Window_NameInput.prototype.table = function() { + if ($gameSystem.isJapanese()) { + return [ + Window_NameInput.JAPAN1, + Window_NameInput.JAPAN2, + Window_NameInput.JAPAN3 + ]; + } else if ($gameSystem.isRussian()) { + return [Window_NameInput.RUSSIA]; + } else { + return [Window_NameInput.LATIN1, Window_NameInput.LATIN2]; + } +}; + +Window_NameInput.prototype.maxCols = function() { + return 10; +}; + +Window_NameInput.prototype.maxItems = function() { + return 90; +}; + +Window_NameInput.prototype.itemWidth = function() { + return Math.floor((this.innerWidth - this.groupSpacing()) / 10); +}; + +Window_NameInput.prototype.groupSpacing = function() { + return 24; +}; + +Window_NameInput.prototype.character = function() { + return this._index < 88 ? this.table()[this._page][this._index] : ""; +}; + +Window_NameInput.prototype.isPageChange = function() { + return this._index === 88; +}; + +Window_NameInput.prototype.isOk = function() { + return this._index === 89; +}; + +Window_NameInput.prototype.itemRect = function(index) { + const itemWidth = this.itemWidth(); + const itemHeight = this.itemHeight(); + const colSpacing = this.colSpacing(); + const rowSpacing = this.rowSpacing(); + const groupSpacing = this.groupSpacing(); + const col = index % 10; + const group = Math.floor(col / 5); + const x = col * itemWidth + group * groupSpacing + colSpacing / 2; + const y = Math.floor(index / 10) * itemHeight + rowSpacing / 2; + const width = itemWidth - colSpacing; + const height = itemHeight - rowSpacing; + return new Rectangle(x, y, width, height); +}; + +Window_NameInput.prototype.drawItem = function(index) { + const table = this.table(); + const character = table[this._page][index]; + const rect = this.itemLineRect(index); + this.drawText(character, rect.x, rect.y, rect.width, "center"); +}; + +Window_NameInput.prototype.updateCursor = function() { + const rect = this.itemRect(this._index); + this.setCursorRect(rect.x, rect.y, rect.width, rect.height); +}; + +Window_NameInput.prototype.isCursorMovable = function() { + return this.active; +}; + +Window_NameInput.prototype.cursorDown = function(wrap) { + if (this._index < 80 || wrap) { + this._index = (this._index + 10) % 90; + } +}; + +Window_NameInput.prototype.cursorUp = function(wrap) { + if (this._index >= 10 || wrap) { + this._index = (this._index + 80) % 90; + } +}; + +Window_NameInput.prototype.cursorRight = function(wrap) { + if (this._index % 10 < 9) { + this._index++; + } else if (wrap) { + this._index -= 9; + } +}; + +Window_NameInput.prototype.cursorLeft = function(wrap) { + if (this._index % 10 > 0) { + this._index--; + } else if (wrap) { + this._index += 9; + } +}; + +Window_NameInput.prototype.cursorPagedown = function() { + this._page = (this._page + 1) % this.table().length; + this.refresh(); +}; + +Window_NameInput.prototype.cursorPageup = function() { + this._page = (this._page + this.table().length - 1) % this.table().length; + this.refresh(); +}; + +Window_NameInput.prototype.processCursorMove = function() { + const lastPage = this._page; + Window_Selectable.prototype.processCursorMove.call(this); + this.updateCursor(); + if (this._page !== lastPage) { + this.playCursorSound(); + } +}; + +Window_NameInput.prototype.processHandling = function() { + if (this.isOpen() && this.active) { + if (Input.isTriggered("shift")) { + this.processJump(); + } + if (Input.isRepeated("cancel")) { + this.processBack(); + } + if (Input.isRepeated("ok")) { + this.processOk(); + } + } +}; + +Window_NameInput.prototype.isCancelEnabled = function() { + return true; +}; + +Window_NameInput.prototype.processCancel = function() { + this.processBack(); +}; + +Window_NameInput.prototype.processJump = function() { + if (this._index !== 89) { + this._index = 89; + this.playCursorSound(); + } +}; + +Window_NameInput.prototype.processBack = function() { + if (this._editWindow.back()) { + SoundManager.playCancel(); + } +}; + +Window_NameInput.prototype.processOk = function() { + if (this.character()) { + this.onNameAdd(); + } else if (this.isPageChange()) { + this.playOkSound(); + this.cursorPagedown(); + } else if (this.isOk()) { + this.onNameOk(); + } +}; + +Window_NameInput.prototype.onNameAdd = function() { + if (this._editWindow.add(this.character())) { + this.playOkSound(); + } else { + this.playBuzzerSound(); + } +}; + +Window_NameInput.prototype.onNameOk = function() { + if (this._editWindow.name() === "") { + if (this._editWindow.restoreDefault()) { + this.playOkSound(); + } else { + this.playBuzzerSound(); + } + } else { + this.playOkSound(); + this.callOkHandler(); + } +}; + +//----------------------------------------------------------------------------- +// Window_NameBox +// +// The window for displaying a speaker name above the message window. + +function Window_NameBox() { + this.initialize(...arguments); +} + +Window_NameBox.prototype = Object.create(Window_Base.prototype); +Window_NameBox.prototype.constructor = Window_NameBox; + +Window_NameBox.prototype.initialize = function() { + Window_Base.prototype.initialize.call(this, new Rectangle()); + this.openness = 0; + this._name = ""; +}; + +Window_NameBox.prototype.setMessageWindow = function(messageWindow) { + this._messageWindow = messageWindow; +}; + +Window_NameBox.prototype.setName = function(name) { + if (this._name !== name) { + this._name = name; + this.refresh(); + } +}; + +Window_NameBox.prototype.clear = function() { + this.setName(""); +}; + +Window_NameBox.prototype.start = function() { + this.updatePlacement(); + this.updateBackground(); + this.createContents(); + this.refresh(); +}; + +Window_NameBox.prototype.updatePlacement = function() { + this.width = this.windowWidth(); + this.height = this.windowHeight(); + const messageWindow = this._messageWindow; + if ($gameMessage.isRTL()) { + this.x = messageWindow.x + messageWindow.width - this.width; + } else { + this.x = messageWindow.x; + } + if (messageWindow.y > 0) { + this.y = messageWindow.y - this.height; + } else { + this.y = messageWindow.y + messageWindow.height; + } +}; + +Window_NameBox.prototype.updateBackground = function() { + this.setBackgroundType($gameMessage.background()); +}; + +Window_NameBox.prototype.windowWidth = function() { + if (this._name) { + const textWidth = this.textSizeEx(this._name).width; + const padding = this.padding + this.itemPadding(); + const width = Math.ceil(textWidth) + padding * 2; + return Math.min(width, Graphics.boxWidth); + } else { + return 0; + } +}; + +Window_NameBox.prototype.windowHeight = function() { + return this.fittingHeight(1); +}; + +Window_NameBox.prototype.refresh = function() { + const rect = this.baseTextRect(); + this.contents.clear(); + this.drawTextEx(this._name, rect.x, rect.y, rect.width); +}; + +//----------------------------------------------------------------------------- +// Window_ChoiceList +// +// The window used for the event command [Show Choices]. + +function Window_ChoiceList() { + this.initialize(...arguments); +} + +Window_ChoiceList.prototype = Object.create(Window_Command.prototype); +Window_ChoiceList.prototype.constructor = Window_ChoiceList; + +Window_ChoiceList.prototype.initialize = function() { + Window_Command.prototype.initialize.call(this, new Rectangle()); + this.createCancelButton(); + this.openness = 0; + this.deactivate(); + this._background = 0; + this._canRepeat = false; +}; + +Window_ChoiceList.prototype.setMessageWindow = function(messageWindow) { + this._messageWindow = messageWindow; +}; + +Window_ChoiceList.prototype.createCancelButton = function() { + if (ConfigManager.touchUI) { + this._cancelButton = new Sprite_Button("cancel"); + this._cancelButton.visible = false; + this.addChild(this._cancelButton); + } +}; + +Window_ChoiceList.prototype.start = function() { + this.updatePlacement(); + this.updateBackground(); + this.placeCancelButton(); + this.createContents(); + this.refresh(); + this.scrollTo(0, 0); + this.selectDefault(); + this.open(); + this.activate(); +}; + +Window_ChoiceList.prototype.update = function() { + Window_Selectable.prototype.update.call(this); + this.updateCancelButton(); +}; + +Window_ChoiceList.prototype.updateCancelButton = function() { + if (this._cancelButton) { + this._cancelButton.visible = this.needsCancelButton() && this.isOpen(); + } +}; + +Window_ChoiceList.prototype.selectDefault = function() { + this.select($gameMessage.choiceDefaultType()); +}; + +Window_ChoiceList.prototype.updatePlacement = function() { + this.x = this.windowX(); + this.y = this.windowY(); + this.width = this.windowWidth(); + this.height = this.windowHeight(); +}; + +Window_ChoiceList.prototype.updateBackground = function() { + this._background = $gameMessage.choiceBackground(); + this.setBackgroundType(this._background); +}; + +Window_ChoiceList.prototype.placeCancelButton = function() { + if (this._cancelButton) { + const spacing = 8; + const button = this._cancelButton; + const right = this.x + this.width; + if (right < Graphics.boxWidth - button.width + spacing) { + button.x = this.width + spacing; + } else { + button.x = -button.width - spacing; + } + button.y = this.height / 2 - button.height / 2; + } +}; + +Window_ChoiceList.prototype.windowX = function() { + const positionType = $gameMessage.choicePositionType(); + if (positionType === 1) { + return (Graphics.boxWidth - this.windowWidth()) / 2; + } else if (positionType === 2) { + return Graphics.boxWidth - this.windowWidth(); + } else { + return 0; + } +}; + +Window_ChoiceList.prototype.windowY = function() { + const messageY = this._messageWindow.y; + if (messageY >= Graphics.boxHeight / 2) { + return messageY - this.windowHeight(); + } else { + return messageY + this._messageWindow.height; + } +}; + +Window_ChoiceList.prototype.windowWidth = function() { + const width = this.maxChoiceWidth() + this.colSpacing() + this.padding * 2; + return Math.min(width, Graphics.boxWidth); +}; + +Window_ChoiceList.prototype.windowHeight = function() { + return this.fittingHeight(this.numVisibleRows()); +}; + +Window_ChoiceList.prototype.numVisibleRows = function() { + const choices = $gameMessage.choices(); + return Math.min(choices.length, this.maxLines()); +}; + +Window_ChoiceList.prototype.maxLines = function() { + const messageWindow = this._messageWindow; + const messageY = messageWindow ? messageWindow.y : 0; + const messageHeight = messageWindow ? messageWindow.height : 0; + const centerY = Graphics.boxHeight / 2; + if (messageY < centerY && messageY + messageHeight > centerY) { + return 4; + } else { + return 8; + } +}; + +Window_ChoiceList.prototype.maxChoiceWidth = function() { + let maxWidth = 96; + const choices = $gameMessage.choices(); + for (const choice of choices) { + const textWidth = this.textSizeEx(choice).width; + const choiceWidth = Math.ceil(textWidth) + this.itemPadding() * 2; + if (maxWidth < choiceWidth) { + maxWidth = choiceWidth; + } + } + return maxWidth; +}; + +Window_ChoiceList.prototype.makeCommandList = function() { + const choices = $gameMessage.choices(); + for (const choice of choices) { + this.addCommand(choice, "choice"); + } +}; + +Window_ChoiceList.prototype.drawItem = function(index) { + const rect = this.itemLineRect(index); + this.drawTextEx(this.commandName(index), rect.x, rect.y, rect.width); +}; + +Window_ChoiceList.prototype.isCancelEnabled = function() { + return $gameMessage.choiceCancelType() !== -1; +}; + +Window_ChoiceList.prototype.needsCancelButton = function() { + return $gameMessage.choiceCancelType() === -2; +}; + +Window_ChoiceList.prototype.callOkHandler = function() { + $gameMessage.onChoice(this.index()); + this._messageWindow.terminateMessage(); + this.close(); +}; + +Window_ChoiceList.prototype.callCancelHandler = function() { + $gameMessage.onChoice($gameMessage.choiceCancelType()); + this._messageWindow.terminateMessage(); + this.close(); +}; + +//----------------------------------------------------------------------------- +// Window_NumberInput +// +// The window used for the event command [Input Number]. + +function Window_NumberInput() { + this.initialize(...arguments); +} + +Window_NumberInput.prototype = Object.create(Window_Selectable.prototype); +Window_NumberInput.prototype.constructor = Window_NumberInput; + +Window_NumberInput.prototype.initialize = function() { + Window_Selectable.prototype.initialize.call(this, new Rectangle()); + this._number = 0; + this._maxDigits = 1; + this.openness = 0; + this.createButtons(); + this.deactivate(); + this._canRepeat = false; +}; + +Window_NumberInput.prototype.setMessageWindow = function(messageWindow) { + this._messageWindow = messageWindow; +}; + +Window_NumberInput.prototype.start = function() { + this._maxDigits = $gameMessage.numInputMaxDigits(); + this._number = $gameVariables.value($gameMessage.numInputVariableId()); + this._number = this._number.clamp(0, Math.pow(10, this._maxDigits) - 1); + this.updatePlacement(); + this.placeButtons(); + this.createContents(); + this.refresh(); + this.open(); + this.activate(); + this.select(0); +}; + +Window_NumberInput.prototype.updatePlacement = function() { + const messageY = this._messageWindow.y; + const spacing = 8; + this.width = this.windowWidth(); + this.height = this.windowHeight(); + this.x = (Graphics.boxWidth - this.width) / 2; + if (messageY >= Graphics.boxHeight / 2) { + this.y = messageY - this.height - spacing; + } else { + this.y = messageY + this._messageWindow.height + spacing; + } +}; + +Window_NumberInput.prototype.windowWidth = function() { + const totalItemWidth = this.maxCols() * this.itemWidth(); + const totalButtonWidth = this.totalButtonWidth(); + return Math.max(totalItemWidth, totalButtonWidth) + this.padding * 2; +}; + +Window_NumberInput.prototype.windowHeight = function() { + if (ConfigManager.touchUI) { + return this.fittingHeight(1) + this.buttonSpacing() + 48; + } else { + return this.fittingHeight(1); + } +}; + +Window_NumberInput.prototype.maxCols = function() { + return this._maxDigits; +}; + +Window_NumberInput.prototype.maxItems = function() { + return this._maxDigits; +}; + +Window_NumberInput.prototype.itemWidth = function() { + return 48; +}; + +Window_NumberInput.prototype.itemRect = function(index) { + const rect = Window_Selectable.prototype.itemRect.call(this, index); + const innerMargin = this.innerWidth - this.maxCols() * this.itemWidth(); + rect.x += innerMargin / 2; + return rect; +}; + +Window_NumberInput.prototype.isScrollEnabled = function() { + return false; +}; + +Window_NumberInput.prototype.isHoverEnabled = function() { + return false; +}; + +Window_NumberInput.prototype.createButtons = function() { + this._buttons = []; + if (ConfigManager.touchUI) { + for (const type of ["down", "up", "ok"]) { + const button = new Sprite_Button(type); + this._buttons.push(button); + this.addInnerChild(button); + } + this._buttons[0].setClickHandler(this.onButtonDown.bind(this)); + this._buttons[1].setClickHandler(this.onButtonUp.bind(this)); + this._buttons[2].setClickHandler(this.onButtonOk.bind(this)); + } +}; + +Window_NumberInput.prototype.placeButtons = function() { + const sp = this.buttonSpacing(); + const totalWidth = this.totalButtonWidth(); + let x = (this.innerWidth - totalWidth) / 2; + for (const button of this._buttons) { + button.x = x; + button.y = this.buttonY(); + x += button.width + sp; + } +}; + +Window_NumberInput.prototype.totalButtonWidth = function() { + const sp = this.buttonSpacing(); + return this._buttons.reduce((r, button) => r + button.width + sp, -sp); +}; + +Window_NumberInput.prototype.buttonSpacing = function() { + return 8; +}; + +Window_NumberInput.prototype.buttonY = function() { + return this.itemHeight() + this.buttonSpacing(); +}; + +Window_NumberInput.prototype.update = function() { + Window_Selectable.prototype.update.call(this); + this.processDigitChange(); +}; + +Window_NumberInput.prototype.processDigitChange = function() { + if (this.isOpenAndActive()) { + if (Input.isRepeated("up")) { + this.changeDigit(true); + } else if (Input.isRepeated("down")) { + this.changeDigit(false); + } + } +}; + +Window_NumberInput.prototype.changeDigit = function(up) { + const index = this.index(); + const place = Math.pow(10, this._maxDigits - 1 - index); + let n = Math.floor(this._number / place) % 10; + this._number -= n * place; + if (up) { + n = (n + 1) % 10; + } else { + n = (n + 9) % 10; + } + this._number += n * place; + this.refresh(); + this.playCursorSound(); +}; + +Window_NumberInput.prototype.isTouchOkEnabled = function() { + return false; +}; + +Window_NumberInput.prototype.isOkEnabled = function() { + return true; +}; + +Window_NumberInput.prototype.isCancelEnabled = function() { + return false; +}; + +Window_NumberInput.prototype.processOk = function() { + this.playOkSound(); + $gameVariables.setValue($gameMessage.numInputVariableId(), this._number); + this._messageWindow.terminateMessage(); + this.updateInputData(); + this.deactivate(); + this.close(); +}; + +Window_NumberInput.prototype.drawItem = function(index) { + const rect = this.itemLineRect(index); + const align = "center"; + const s = this._number.padZero(this._maxDigits); + const c = s.slice(index, index + 1); + this.resetTextColor(); + this.drawText(c, rect.x, rect.y, rect.width, align); +}; + +Window_NumberInput.prototype.onButtonUp = function() { + this.changeDigit(true); +}; + +Window_NumberInput.prototype.onButtonDown = function() { + this.changeDigit(false); +}; + +Window_NumberInput.prototype.onButtonOk = function() { + this.processOk(); +}; + +//----------------------------------------------------------------------------- +// Window_EventItem +// +// The window used for the event command [Select Item]. + +function Window_EventItem() { + this.initialize(...arguments); +} + +Window_EventItem.prototype = Object.create(Window_ItemList.prototype); +Window_EventItem.prototype.constructor = Window_EventItem; + +Window_EventItem.prototype.initialize = function(rect) { + Window_ItemList.prototype.initialize.call(this, rect); + this.createCancelButton(); + this.openness = 0; + this.deactivate(); + this.setHandler("ok", this.onOk.bind(this)); + this.setHandler("cancel", this.onCancel.bind(this)); +}; + +Window_EventItem.prototype.setMessageWindow = function(messageWindow) { + this._messageWindow = messageWindow; +}; + +Window_EventItem.prototype.createCancelButton = function() { + if (ConfigManager.touchUI) { + this._cancelButton = new Sprite_Button("cancel"); + this._cancelButton.visible = false; + this.addChild(this._cancelButton); + } +}; + +Window_EventItem.prototype.start = function() { + this.refresh(); + this.updatePlacement(); + this.placeCancelButton(); + this.forceSelect(0); + this.open(); + this.activate(); +}; + +Window_EventItem.prototype.update = function() { + Window_Selectable.prototype.update.call(this); + this.updateCancelButton(); +}; + +Window_EventItem.prototype.updateCancelButton = function() { + if (this._cancelButton) { + this._cancelButton.visible = this.isOpen(); + } +}; + +Window_EventItem.prototype.updatePlacement = function() { + if (this._messageWindow.y >= Graphics.boxHeight / 2) { + this.y = 0; + } else { + this.y = Graphics.boxHeight - this.height; + } +}; + +Window_EventItem.prototype.placeCancelButton = function() { + if (this._cancelButton) { + const spacing = 8; + const button = this._cancelButton; + if (this.y === 0) { + button.y = this.height + spacing; + } else if (this._messageWindow.y >= Graphics.boxHeight / 4) { + const distance = this.y - this._messageWindow.y; + button.y = -button.height - spacing - distance; + } else { + button.y = -button.height - spacing; + } + button.x = this.width - button.width - spacing; + } +}; + +Window_EventItem.prototype.includes = function(item) { + const itypeId = $gameMessage.itemChoiceItypeId(); + return DataManager.isItem(item) && item.itypeId === itypeId; +}; + +Window_EventItem.prototype.needsNumber = function() { + const itypeId = $gameMessage.itemChoiceItypeId(); + if (itypeId === 2) { + // Key Item + return $dataSystem.optKeyItemsNumber; + } else if (itypeId >= 3) { + // Hidden Item + return false; + } else { + // Normal Item + return true; + } +}; + +Window_EventItem.prototype.isEnabled = function(/*item*/) { + return true; +}; + +Window_EventItem.prototype.onOk = function() { + const item = this.item(); + const itemId = item ? item.id : 0; + $gameVariables.setValue($gameMessage.itemChoiceVariableId(), itemId); + this._messageWindow.terminateMessage(); + this.close(); +}; + +Window_EventItem.prototype.onCancel = function() { + $gameVariables.setValue($gameMessage.itemChoiceVariableId(), 0); + this._messageWindow.terminateMessage(); + this.close(); +}; + +//----------------------------------------------------------------------------- +// Window_Message +// +// The window for displaying text messages. + +function Window_Message() { + this.initialize(...arguments); +} + +Window_Message.prototype = Object.create(Window_Base.prototype); +Window_Message.prototype.constructor = Window_Message; + +Window_Message.prototype.initialize = function(rect) { + Window_Base.prototype.initialize.call(this, rect); + this.openness = 0; + this.initMembers(); +}; + +Window_Message.prototype.initMembers = function() { + this._background = 0; + this._positionType = 2; + this._waitCount = 0; + this._faceBitmap = null; + this._textState = null; + this._goldWindow = null; + this._nameBoxWindow = null; + this._choiceListWindow = null; + this._numberInputWindow = null; + this._eventItemWindow = null; + this.clearFlags(); +}; + +Window_Message.prototype.setGoldWindow = function(goldWindow) { + this._goldWindow = goldWindow; +}; + +Window_Message.prototype.setNameBoxWindow = function(nameBoxWindow) { + this._nameBoxWindow = nameBoxWindow; +}; + +Window_Message.prototype.setChoiceListWindow = function(choiceListWindow) { + this._choiceListWindow = choiceListWindow; +}; + +Window_Message.prototype.setNumberInputWindow = function(numberInputWindow) { + this._numberInputWindow = numberInputWindow; +}; + +Window_Message.prototype.setEventItemWindow = function(eventItemWindow) { + this._eventItemWindow = eventItemWindow; +}; + +Window_Message.prototype.clearFlags = function() { + this._showFast = false; + this._lineShowFast = false; + this._pauseSkip = false; +}; + +Window_Message.prototype.update = function() { + this.checkToNotClose(); + Window_Base.prototype.update.call(this); + this.synchronizeNameBox(); + while (!this.isOpening() && !this.isClosing()) { + if (this.updateWait()) { + return; + } else if (this.updateLoading()) { + return; + } else if (this.updateInput()) { + return; + } else if (this.updateMessage()) { + return; + } else if (this.canStart()) { + this.startMessage(); + } else { + this.startInput(); + return; + } + } +}; + +Window_Message.prototype.checkToNotClose = function() { + if (this.isOpen() && this.isClosing() && this.doesContinue()) { + this.open(); + } +}; + +Window_Message.prototype.synchronizeNameBox = function() { + this._nameBoxWindow.openness = this.openness; +}; + +Window_Message.prototype.canStart = function() { + return $gameMessage.hasText() && !$gameMessage.scrollMode(); +}; + +Window_Message.prototype.startMessage = function() { + const text = $gameMessage.allText(); + const textState = this.createTextState(text, 0, 0, 0); + textState.x = this.newLineX(textState); + textState.startX = textState.x; + this._textState = textState; + this.newPage(this._textState); + this.updatePlacement(); + this.updateBackground(); + this.open(); + this._nameBoxWindow.start(); +}; + +Window_Message.prototype.newLineX = function(textState) { + const faceExists = $gameMessage.faceName() !== ""; + const faceWidth = ImageManager.faceWidth; + const spacing = 20; + const margin = faceExists ? faceWidth + spacing : 4; + return textState.rtl ? this.innerWidth - margin : margin; +}; + +Window_Message.prototype.updatePlacement = function() { + const goldWindow = this._goldWindow; + this._positionType = $gameMessage.positionType(); + this.y = (this._positionType * (Graphics.boxHeight - this.height)) / 2; + if (goldWindow) { + goldWindow.y = this.y > 0 ? 0 : Graphics.boxHeight - goldWindow.height; + } +}; + +Window_Message.prototype.updateBackground = function() { + this._background = $gameMessage.background(); + this.setBackgroundType(this._background); +}; + +Window_Message.prototype.terminateMessage = function() { + this.close(); + this._goldWindow.close(); + $gameMessage.clear(); +}; + +Window_Message.prototype.updateWait = function() { + if (this._waitCount > 0) { + this._waitCount--; + return true; + } else { + return false; + } +}; + +Window_Message.prototype.updateLoading = function() { + if (this._faceBitmap) { + if (this._faceBitmap.isReady()) { + this.drawMessageFace(); + this._faceBitmap = null; + return false; + } else { + return true; + } + } else { + return false; + } +}; + +Window_Message.prototype.updateInput = function() { + if (this.isAnySubWindowActive()) { + return true; + } + if (this.pause) { + if (this.isTriggered()) { + Input.update(); + this.pause = false; + if (!this._textState) { + this.terminateMessage(); + } + } + return true; + } + return false; +}; + +Window_Message.prototype.isAnySubWindowActive = function() { + return ( + this._choiceListWindow.active || + this._numberInputWindow.active || + this._eventItemWindow.active + ); +}; + +Window_Message.prototype.updateMessage = function() { + const textState = this._textState; + if (textState) { + while (!this.isEndOfText(textState)) { + if (this.needsNewPage(textState)) { + this.newPage(textState); + } + this.updateShowFast(); + this.processCharacter(textState); + if (this.shouldBreakHere(textState)) { + break; + } + } + this.flushTextState(textState); + if (this.isEndOfText(textState) && !this.isWaiting()) { + this.onEndOfText(); + } + return true; + } else { + return false; + } +}; + +Window_Message.prototype.shouldBreakHere = function(textState) { + if (this.canBreakHere(textState)) { + if (!this._showFast && !this._lineShowFast) { + return true; + } + if (this.isWaiting()) { + return true; + } + } + return false; +}; + +Window_Message.prototype.canBreakHere = function(textState) { + if (!this.isEndOfText(textState)) { + const c = textState.text[textState.index]; + if (c.charCodeAt(0) >= 0xdc00 && c.charCodeAt(0) <= 0xdfff) { + // surrogate pair + return false; + } + if (textState.rtl && c.charCodeAt(0) > 0x20) { + return false; + } + } + return true; +}; + +Window_Message.prototype.onEndOfText = function() { + if (!this.startInput()) { + if (!this._pauseSkip) { + this.startPause(); + } else { + this.terminateMessage(); + } + } + this._textState = null; +}; + +Window_Message.prototype.startInput = function() { + if ($gameMessage.isChoice()) { + this._choiceListWindow.start(); + return true; + } else if ($gameMessage.isNumberInput()) { + this._numberInputWindow.start(); + return true; + } else if ($gameMessage.isItemChoice()) { + this._eventItemWindow.start(); + return true; + } else { + return false; + } +}; + +Window_Message.prototype.isTriggered = function() { + return ( + Input.isRepeated("ok") || + Input.isRepeated("cancel") || + TouchInput.isRepeated() + ); +}; + +Window_Message.prototype.doesContinue = function() { + return ( + $gameMessage.hasText() && + !$gameMessage.scrollMode() && + !this.areSettingsChanged() + ); +}; + +Window_Message.prototype.areSettingsChanged = function() { + return ( + this._background !== $gameMessage.background() || + this._positionType !== $gameMessage.positionType() + ); +}; + +Window_Message.prototype.updateShowFast = function() { + if (this.isTriggered()) { + this._showFast = true; + } +}; + +Window_Message.prototype.newPage = function(textState) { + this.contents.clear(); + this.resetFontSettings(); + this.clearFlags(); + this.updateSpeakerName(); + this.loadMessageFace(); + textState.x = textState.startX; + textState.y = 0; + textState.height = this.calcTextHeight(textState); +}; + +Window_Message.prototype.updateSpeakerName = function() { + this._nameBoxWindow.setName($gameMessage.speakerName()); +}; + +Window_Message.prototype.loadMessageFace = function() { + this._faceBitmap = ImageManager.loadFace($gameMessage.faceName()); +}; + +Window_Message.prototype.drawMessageFace = function() { + const faceName = $gameMessage.faceName(); + const faceIndex = $gameMessage.faceIndex(); + const rtl = $gameMessage.isRTL(); + const width = ImageManager.faceWidth; + const height = this.innerHeight; + const x = rtl ? this.innerWidth - width - 4 : 4; + this.drawFace(faceName, faceIndex, x, 0, width, height); +}; + +Window_Message.prototype.processControlCharacter = function(textState, c) { + Window_Base.prototype.processControlCharacter.call(this, textState, c); + if (c === "\f") { + this.processNewPage(textState); + } +}; + +Window_Message.prototype.processNewLine = function(textState) { + this._lineShowFast = false; + Window_Base.prototype.processNewLine.call(this, textState); + if (this.needsNewPage(textState)) { + this.startPause(); + } +}; + +Window_Message.prototype.processNewPage = function(textState) { + if (textState.text[textState.index] === "\n") { + textState.index++; + } + textState.y = this.contents.height; + this.startPause(); +}; + +Window_Message.prototype.isEndOfText = function(textState) { + return textState.index >= textState.text.length; +}; + +Window_Message.prototype.needsNewPage = function(textState) { + return ( + !this.isEndOfText(textState) && + textState.y + textState.height > this.contents.height + ); +}; + +Window_Message.prototype.processEscapeCharacter = function(code, textState) { + switch (code) { + case "$": + this._goldWindow.open(); + break; + case ".": + this.startWait(15); + break; + case "|": + this.startWait(60); + break; + case "!": + this.startPause(); + break; + case ">": + this._lineShowFast = true; + break; + case "<": + this._lineShowFast = false; + break; + case "^": + this._pauseSkip = true; + break; + default: + Window_Base.prototype.processEscapeCharacter.call( + this, + code, + textState + ); + break; + } +}; + +Window_Message.prototype.startWait = function(count) { + this._waitCount = count; +}; + +Window_Message.prototype.startPause = function() { + this.startWait(10); + this.pause = true; +}; + +Window_Message.prototype.isWaiting = function() { + return this.pause || this._waitCount > 0; +}; + +//----------------------------------------------------------------------------- +// Window_ScrollText +// +// The window for displaying scrolling text. No frame is displayed, but it +// is handled as a window for convenience. + +function Window_ScrollText() { + this.initialize(...arguments); +} + +Window_ScrollText.prototype = Object.create(Window_Base.prototype); +Window_ScrollText.prototype.constructor = Window_ScrollText; + +Window_ScrollText.prototype.initialize = function(rect) { + Window_Base.prototype.initialize.call(this, new Rectangle()); + this.opacity = 0; + this.hide(); + this._reservedRect = rect; + this._text = ""; + this._allTextHeight = 0; +}; + +Window_ScrollText.prototype.update = function() { + Window_Base.prototype.update.call(this); + if ($gameMessage.scrollMode()) { + if (this._text) { + this.updateMessage(); + } + if (!this._text && $gameMessage.hasText()) { + this.startMessage(); + } + } +}; + +Window_ScrollText.prototype.startMessage = function() { + this._text = $gameMessage.allText(); + if (this._text) { + this.updatePlacement(); + this.refresh(); + this.show(); + } else { + $gameMessage.clear(); + } +}; + +Window_ScrollText.prototype.refresh = function() { + this._allTextHeight = this.textSizeEx(this._text).height; + this.createContents(); + this.origin.y = -this.height; + const rect = this.baseTextRect(); + this.drawTextEx(this._text, rect.x, rect.y, rect.width); +}; + +Window_ScrollText.prototype.updatePlacement = function() { + const rect = this._reservedRect; + this.move(rect.x, rect.y, rect.width, rect.height); +}; + +Window_ScrollText.prototype.contentsHeight = function() { + return Math.max(this._allTextHeight, 1); +}; + +Window_ScrollText.prototype.updateMessage = function() { + this.origin.y += this.scrollSpeed(); + if (this.origin.y >= this.contents.height) { + this.terminateMessage(); + } +}; + +Window_ScrollText.prototype.scrollSpeed = function() { + let speed = $gameMessage.scrollSpeed() / 2; + if (this.isFastForward()) { + speed *= this.fastForwardRate(); + } + return speed; +}; + +Window_ScrollText.prototype.isFastForward = function() { + if ($gameMessage.scrollNoFast()) { + return false; + } else { + return ( + Input.isPressed("ok") || + Input.isPressed("shift") || + TouchInput.isPressed() + ); + } +}; + +Window_ScrollText.prototype.fastForwardRate = function() { + return 3; +}; + +Window_ScrollText.prototype.terminateMessage = function() { + this._text = null; + $gameMessage.clear(); + this.hide(); +}; + +//----------------------------------------------------------------------------- +// Window_MapName +// +// The window for displaying the map name on the map screen. + +function Window_MapName() { + this.initialize(...arguments); +} + +Window_MapName.prototype = Object.create(Window_Base.prototype); +Window_MapName.prototype.constructor = Window_MapName; + +Window_MapName.prototype.initialize = function(rect) { + Window_Base.prototype.initialize.call(this, rect); + this.opacity = 0; + this.contentsOpacity = 0; + this._showCount = 0; + this.refresh(); +}; + +Window_MapName.prototype.update = function() { + Window_Base.prototype.update.call(this); + if (this._showCount > 0 && $gameMap.isNameDisplayEnabled()) { + this.updateFadeIn(); + this._showCount--; + } else { + this.updateFadeOut(); + } +}; + +Window_MapName.prototype.updateFadeIn = function() { + this.contentsOpacity += 16; +}; + +Window_MapName.prototype.updateFadeOut = function() { + this.contentsOpacity -= 16; +}; + +Window_MapName.prototype.open = function() { + this.refresh(); + this._showCount = 150; +}; + +Window_MapName.prototype.close = function() { + this._showCount = 0; +}; + +Window_MapName.prototype.refresh = function() { + this.contents.clear(); + if ($gameMap.displayName()) { + const width = this.innerWidth; + this.drawBackground(0, 0, width, this.lineHeight()); + this.drawText($gameMap.displayName(), 0, 0, width, "center"); + } +}; + +Window_MapName.prototype.drawBackground = function(x, y, width, height) { + const color1 = ColorManager.dimColor1(); + const color2 = ColorManager.dimColor2(); + const half = width / 2; + this.contents.gradientFillRect(x, y, half, height, color2, color1); + this.contents.gradientFillRect(x + half, y, half, height, color1, color2); +}; + +//----------------------------------------------------------------------------- +// Window_BattleLog +// +// The window for displaying battle progress. No frame is displayed, but it is +// handled as a window for convenience. + +function Window_BattleLog() { + this.initialize(...arguments); +} + +Window_BattleLog.prototype = Object.create(Window_Base.prototype); +Window_BattleLog.prototype.constructor = Window_BattleLog; + +Window_BattleLog.prototype.initialize = function(rect) { + Window_Base.prototype.initialize.call(this, rect); + this.opacity = 0; + this._lines = []; + this._methods = []; + this._waitCount = 0; + this._waitMode = ""; + this._baseLineStack = []; + this._spriteset = null; + this.refresh(); +}; + +Window_BattleLog.prototype.setSpriteset = function(spriteset) { + this._spriteset = spriteset; +}; + +Window_BattleLog.prototype.maxLines = function() { + return 10; +}; + +Window_BattleLog.prototype.numLines = function() { + return this._lines.length; +}; + +Window_BattleLog.prototype.messageSpeed = function() { + return 16; +}; + +Window_BattleLog.prototype.isBusy = function() { + return this._waitCount > 0 || this._waitMode || this._methods.length > 0; +}; + +Window_BattleLog.prototype.update = function() { + if (!this.updateWait()) { + this.callNextMethod(); + } +}; + +Window_BattleLog.prototype.updateWait = function() { + return this.updateWaitCount() || this.updateWaitMode(); +}; + +Window_BattleLog.prototype.updateWaitCount = function() { + if (this._waitCount > 0) { + this._waitCount -= this.isFastForward() ? 3 : 1; + if (this._waitCount < 0) { + this._waitCount = 0; + } + return true; + } + return false; +}; + +Window_BattleLog.prototype.updateWaitMode = function() { + let waiting = false; + switch (this._waitMode) { + case "effect": + waiting = this._spriteset.isEffecting(); + break; + case "movement": + waiting = this._spriteset.isAnyoneMoving(); + break; + } + if (!waiting) { + this._waitMode = ""; + } + return waiting; +}; + +Window_BattleLog.prototype.setWaitMode = function(waitMode) { + this._waitMode = waitMode; +}; + +Window_BattleLog.prototype.callNextMethod = function() { + if (this._methods.length > 0) { + const method = this._methods.shift(); + if (method.name && this[method.name]) { + this[method.name].apply(this, method.params); + } else { + throw new Error("Method not found: " + method.name); + } + } +}; + +Window_BattleLog.prototype.isFastForward = function() { + return ( + Input.isLongPressed("ok") || + Input.isPressed("shift") || + TouchInput.isLongPressed() + ); +}; + +Window_BattleLog.prototype.push = function(methodName) { + const methodArgs = Array.prototype.slice.call(arguments, 1); + this._methods.push({ name: methodName, params: methodArgs }); +}; + +Window_BattleLog.prototype.clear = function() { + this._lines = []; + this._baseLineStack = []; + this.refresh(); +}; + +Window_BattleLog.prototype.wait = function() { + this._waitCount = this.messageSpeed(); +}; + +Window_BattleLog.prototype.waitForEffect = function() { + this.setWaitMode("effect"); +}; + +Window_BattleLog.prototype.waitForMovement = function() { + this.setWaitMode("movement"); +}; + +Window_BattleLog.prototype.addText = function(text) { + this._lines.push(text); + this.refresh(); + this.wait(); +}; + +Window_BattleLog.prototype.pushBaseLine = function() { + this._baseLineStack.push(this._lines.length); +}; + +Window_BattleLog.prototype.popBaseLine = function() { + const baseLine = this._baseLineStack.pop(); + while (this._lines.length > baseLine) { + this._lines.pop(); + } +}; + +Window_BattleLog.prototype.waitForNewLine = function() { + let baseLine = 0; + if (this._baseLineStack.length > 0) { + baseLine = this._baseLineStack[this._baseLineStack.length - 1]; + } + if (this._lines.length > baseLine) { + this.wait(); + } +}; + +Window_BattleLog.prototype.popupDamage = function(target) { + if (target.shouldPopupDamage()) { + target.startDamagePopup(); + } +}; + +Window_BattleLog.prototype.performActionStart = function(subject, action) { + subject.performActionStart(action); +}; + +Window_BattleLog.prototype.performAction = function(subject, action) { + subject.performAction(action); +}; + +Window_BattleLog.prototype.performActionEnd = function(subject) { + subject.performActionEnd(); +}; + +Window_BattleLog.prototype.performDamage = function(target) { + target.performDamage(); +}; + +Window_BattleLog.prototype.performMiss = function(target) { + target.performMiss(); +}; + +Window_BattleLog.prototype.performRecovery = function(target) { + target.performRecovery(); +}; + +Window_BattleLog.prototype.performEvasion = function(target) { + target.performEvasion(); +}; + +Window_BattleLog.prototype.performMagicEvasion = function(target) { + target.performMagicEvasion(); +}; + +Window_BattleLog.prototype.performCounter = function(target) { + target.performCounter(); +}; + +Window_BattleLog.prototype.performReflection = function(target) { + target.performReflection(); +}; + +Window_BattleLog.prototype.performSubstitute = function(substitute, target) { + substitute.performSubstitute(target); +}; + +Window_BattleLog.prototype.performCollapse = function(target) { + target.performCollapse(); +}; + +// prettier-ignore +Window_BattleLog.prototype.showAnimation = function( + subject, targets, animationId +) { + if (animationId < 0) { + this.showAttackAnimation(subject, targets); + } else { + this.showNormalAnimation(targets, animationId); + } +}; + +Window_BattleLog.prototype.showAttackAnimation = function(subject, targets) { + if (subject.isActor()) { + this.showActorAttackAnimation(subject, targets); + } else { + this.showEnemyAttackAnimation(subject, targets); + } +}; + +// prettier-ignore +Window_BattleLog.prototype.showActorAttackAnimation = function( + subject, targets +) { + this.showNormalAnimation(targets, subject.attackAnimationId1(), false); + this.showNormalAnimation(targets, subject.attackAnimationId2(), true); +}; + +// prettier-ignore +Window_BattleLog.prototype.showEnemyAttackAnimation = function( + /* subject, targets */ +) { + SoundManager.playEnemyAttack(); +}; + +// prettier-ignore +Window_BattleLog.prototype.showNormalAnimation = function( + targets, animationId, mirror +) { + const animation = $dataAnimations[animationId]; + if (animation) { + $gameTemp.requestAnimation(targets, animationId, mirror); + } +}; + +Window_BattleLog.prototype.refresh = function() { + this.drawBackground(); + this.contents.clear(); + for (let i = 0; i < this._lines.length; i++) { + this.drawLineText(i); + } +}; + +Window_BattleLog.prototype.drawBackground = function() { + const rect = this.backRect(); + const color = this.backColor(); + this.contentsBack.clear(); + this.contentsBack.paintOpacity = this.backPaintOpacity(); + this.contentsBack.fillRect(rect.x, rect.y, rect.width, rect.height, color); + this.contentsBack.paintOpacity = 255; +}; + +Window_BattleLog.prototype.backRect = function() { + const height = this.numLines() * this.itemHeight(); + return new Rectangle(0, 0, this.innerWidth, height); +}; + +Window_BattleLog.prototype.lineRect = function(index) { + const itemHeight = this.itemHeight(); + const padding = this.itemPadding(); + const x = padding; + const y = index * itemHeight; + const width = this.innerWidth - padding * 2; + const height = itemHeight; + return new Rectangle(x, y, width, height); +}; + +Window_BattleLog.prototype.backColor = function() { + return "#000000"; +}; + +Window_BattleLog.prototype.backPaintOpacity = function() { + return 64; +}; + +Window_BattleLog.prototype.drawLineText = function(index) { + const rect = this.lineRect(index); + this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); + this.drawTextEx(this._lines[index], rect.x, rect.y, rect.width); +}; + +Window_BattleLog.prototype.startTurn = function() { + this.push("wait"); +}; + +Window_BattleLog.prototype.startAction = function(subject, action, targets) { + const item = action.item(); + this.push("performActionStart", subject, action); + this.push("waitForMovement"); + this.push("performAction", subject, action); + this.push("showAnimation", subject, targets.clone(), item.animationId); + this.displayAction(subject, item); +}; + +Window_BattleLog.prototype.endAction = function(subject) { + this.push("waitForNewLine"); + this.push("clear"); + this.push("performActionEnd", subject); +}; + +Window_BattleLog.prototype.displayCurrentState = function(subject) { + const stateText = subject.mostImportantStateText(); + if (stateText) { + this.push("addText", stateText.format(subject.name())); + this.push("wait"); + this.push("clear"); + } +}; + +Window_BattleLog.prototype.displayRegeneration = function(subject) { + this.push("popupDamage", subject); +}; + +Window_BattleLog.prototype.displayAction = function(subject, item) { + const numMethods = this._methods.length; + if (DataManager.isSkill(item)) { + this.displayItemMessage(item.message1, subject, item); + this.displayItemMessage(item.message2, subject, item); + } else { + this.displayItemMessage(TextManager.useItem, subject, item); + } + if (this._methods.length === numMethods) { + this.push("wait"); + } +}; + +Window_BattleLog.prototype.displayItemMessage = function(fmt, subject, item) { + if (fmt) { + this.push("addText", fmt.format(subject.name(), item.name)); + } +}; + +Window_BattleLog.prototype.displayCounter = function(target) { + this.push("performCounter", target); + this.push("addText", TextManager.counterAttack.format(target.name())); +}; + +Window_BattleLog.prototype.displayReflection = function(target) { + this.push("performReflection", target); + this.push("addText", TextManager.magicReflection.format(target.name())); +}; + +Window_BattleLog.prototype.displaySubstitute = function(substitute, target) { + const substName = substitute.name(); + const text = TextManager.substitute.format(substName, target.name()); + this.push("performSubstitute", substitute, target); + this.push("addText", text); +}; + +Window_BattleLog.prototype.displayActionResults = function(subject, target) { + if (target.result().used) { + this.push("pushBaseLine"); + this.displayCritical(target); + this.push("popupDamage", target); + this.push("popupDamage", subject); + this.displayDamage(target); + this.displayAffectedStatus(target); + this.displayFailure(target); + this.push("waitForNewLine"); + this.push("popBaseLine"); + } +}; + +Window_BattleLog.prototype.displayFailure = function(target) { + if (target.result().isHit() && !target.result().success) { + this.push("addText", TextManager.actionFailure.format(target.name())); + } +}; + +Window_BattleLog.prototype.displayCritical = function(target) { + if (target.result().critical) { + if (target.isActor()) { + this.push("addText", TextManager.criticalToActor); + } else { + this.push("addText", TextManager.criticalToEnemy); + } + } +}; + +Window_BattleLog.prototype.displayDamage = function(target) { + if (target.result().missed) { + this.displayMiss(target); + } else if (target.result().evaded) { + this.displayEvasion(target); + } else { + this.displayHpDamage(target); + this.displayMpDamage(target); + this.displayTpDamage(target); + } +}; + +Window_BattleLog.prototype.displayMiss = function(target) { + let fmt; + if (target.result().physical) { + const isActor = target.isActor(); + fmt = isActor ? TextManager.actorNoHit : TextManager.enemyNoHit; + this.push("performMiss", target); + } else { + fmt = TextManager.actionFailure; + } + this.push("addText", fmt.format(target.name())); +}; + +Window_BattleLog.prototype.displayEvasion = function(target) { + let fmt; + if (target.result().physical) { + fmt = TextManager.evasion; + this.push("performEvasion", target); + } else { + fmt = TextManager.magicEvasion; + this.push("performMagicEvasion", target); + } + this.push("addText", fmt.format(target.name())); +}; + +Window_BattleLog.prototype.displayHpDamage = function(target) { + if (target.result().hpAffected) { + if (target.result().hpDamage > 0 && !target.result().drain) { + this.push("performDamage", target); + } + if (target.result().hpDamage < 0) { + this.push("performRecovery", target); + } + this.push("addText", this.makeHpDamageText(target)); + } +}; + +Window_BattleLog.prototype.displayMpDamage = function(target) { + if (target.isAlive() && target.result().mpDamage !== 0) { + if (target.result().mpDamage < 0) { + this.push("performRecovery", target); + } + this.push("addText", this.makeMpDamageText(target)); + } +}; + +Window_BattleLog.prototype.displayTpDamage = function(target) { + if (target.isAlive() && target.result().tpDamage !== 0) { + if (target.result().tpDamage < 0) { + this.push("performRecovery", target); + } + this.push("addText", this.makeTpDamageText(target)); + } +}; + +Window_BattleLog.prototype.displayAffectedStatus = function(target) { + if (target.result().isStatusAffected()) { + this.push("pushBaseLine"); + this.displayChangedStates(target); + this.displayChangedBuffs(target); + this.push("waitForNewLine"); + this.push("popBaseLine"); + } +}; + +Window_BattleLog.prototype.displayAutoAffectedStatus = function(target) { + if (target.result().isStatusAffected()) { + this.displayAffectedStatus(target, null); + this.push("clear"); + } +}; + +Window_BattleLog.prototype.displayChangedStates = function(target) { + this.displayAddedStates(target); + this.displayRemovedStates(target); +}; + +Window_BattleLog.prototype.displayAddedStates = function(target) { + const result = target.result(); + const states = result.addedStateObjects(); + for (const state of states) { + const stateText = target.isActor() ? state.message1 : state.message2; + if (state.id === target.deathStateId()) { + this.push("performCollapse", target); + } + if (stateText) { + this.push("popBaseLine"); + this.push("pushBaseLine"); + this.push("addText", stateText.format(target.name())); + this.push("waitForEffect"); + } + } +}; + +Window_BattleLog.prototype.displayRemovedStates = function(target) { + const result = target.result(); + const states = result.removedStateObjects(); + for (const state of states) { + if (state.message4) { + this.push("popBaseLine"); + this.push("pushBaseLine"); + this.push("addText", state.message4.format(target.name())); + } + } +}; + +Window_BattleLog.prototype.displayChangedBuffs = function(target) { + const result = target.result(); + this.displayBuffs(target, result.addedBuffs, TextManager.buffAdd); + this.displayBuffs(target, result.addedDebuffs, TextManager.debuffAdd); + this.displayBuffs(target, result.removedBuffs, TextManager.buffRemove); +}; + +Window_BattleLog.prototype.displayBuffs = function(target, buffs, fmt) { + for (const paramId of buffs) { + const text = fmt.format(target.name(), TextManager.param(paramId)); + this.push("popBaseLine"); + this.push("pushBaseLine"); + this.push("addText", text); + } +}; + +Window_BattleLog.prototype.makeHpDamageText = function(target) { + const result = target.result(); + const damage = result.hpDamage; + const isActor = target.isActor(); + let fmt; + if (damage > 0 && result.drain) { + fmt = isActor ? TextManager.actorDrain : TextManager.enemyDrain; + return fmt.format(target.name(), TextManager.hp, damage); + } else if (damage > 0) { + fmt = isActor ? TextManager.actorDamage : TextManager.enemyDamage; + return fmt.format(target.name(), damage); + } else if (damage < 0) { + fmt = isActor ? TextManager.actorRecovery : TextManager.enemyRecovery; + return fmt.format(target.name(), TextManager.hp, -damage); + } else { + fmt = isActor ? TextManager.actorNoDamage : TextManager.enemyNoDamage; + return fmt.format(target.name()); + } +}; + +Window_BattleLog.prototype.makeMpDamageText = function(target) { + const result = target.result(); + const damage = result.mpDamage; + const isActor = target.isActor(); + let fmt; + if (damage > 0 && result.drain) { + fmt = isActor ? TextManager.actorDrain : TextManager.enemyDrain; + return fmt.format(target.name(), TextManager.mp, damage); + } else if (damage > 0) { + fmt = isActor ? TextManager.actorLoss : TextManager.enemyLoss; + return fmt.format(target.name(), TextManager.mp, damage); + } else if (damage < 0) { + fmt = isActor ? TextManager.actorRecovery : TextManager.enemyRecovery; + return fmt.format(target.name(), TextManager.mp, -damage); + } else { + return ""; + } +}; + +Window_BattleLog.prototype.makeTpDamageText = function(target) { + const result = target.result(); + const damage = result.tpDamage; + const isActor = target.isActor(); + let fmt; + if (damage > 0) { + fmt = isActor ? TextManager.actorLoss : TextManager.enemyLoss; + return fmt.format(target.name(), TextManager.tp, damage); + } else if (damage < 0) { + fmt = isActor ? TextManager.actorGain : TextManager.enemyGain; + return fmt.format(target.name(), TextManager.tp, -damage); + } else { + return ""; + } +}; + +//----------------------------------------------------------------------------- +// Window_PartyCommand +// +// The window for selecting whether to fight or escape on the battle screen. + +function Window_PartyCommand() { + this.initialize(...arguments); +} + +Window_PartyCommand.prototype = Object.create(Window_Command.prototype); +Window_PartyCommand.prototype.constructor = Window_PartyCommand; + +Window_PartyCommand.prototype.initialize = function(rect) { + Window_Command.prototype.initialize.call(this, rect); + this.openness = 0; + this.deactivate(); +}; + +Window_PartyCommand.prototype.makeCommandList = function() { + this.addCommand(TextManager.fight, "fight"); + this.addCommand(TextManager.escape, "escape", BattleManager.canEscape()); +}; + +Window_PartyCommand.prototype.setup = function() { + this.refresh(); + this.forceSelect(0); + this.activate(); + this.open(); +}; + +//----------------------------------------------------------------------------- +// Window_ActorCommand +// +// The window for selecting an actor's action on the battle screen. + +function Window_ActorCommand() { + this.initialize(...arguments); +} + +Window_ActorCommand.prototype = Object.create(Window_Command.prototype); +Window_ActorCommand.prototype.constructor = Window_ActorCommand; + +Window_ActorCommand.prototype.initialize = function(rect) { + Window_Command.prototype.initialize.call(this, rect); + this.openness = 0; + this.deactivate(); + this._actor = null; +}; + +Window_ActorCommand.prototype.makeCommandList = function() { + if (this._actor) { + this.addAttackCommand(); + this.addSkillCommands(); + this.addGuardCommand(); + this.addItemCommand(); + } +}; + +Window_ActorCommand.prototype.addAttackCommand = function() { + this.addCommand(TextManager.attack, "attack", this._actor.canAttack()); +}; + +Window_ActorCommand.prototype.addSkillCommands = function() { + const skillTypes = this._actor.skillTypes(); + for (const stypeId of skillTypes) { + const name = $dataSystem.skillTypes[stypeId]; + this.addCommand(name, "skill", true, stypeId); + } +}; + +Window_ActorCommand.prototype.addGuardCommand = function() { + this.addCommand(TextManager.guard, "guard", this._actor.canGuard()); +}; + +Window_ActorCommand.prototype.addItemCommand = function() { + this.addCommand(TextManager.item, "item"); +}; + +Window_ActorCommand.prototype.setup = function(actor) { + this._actor = actor; + this.refresh(); + this.selectLast(); + this.activate(); + this.open(); +}; + +Window_ActorCommand.prototype.actor = function() { + return this._actor; +}; + +Window_ActorCommand.prototype.processOk = function() { + if (this._actor) { + if (ConfigManager.commandRemember) { + this._actor.setLastCommandSymbol(this.currentSymbol()); + } else { + this._actor.setLastCommandSymbol(""); + } + } + Window_Command.prototype.processOk.call(this); +}; + +Window_ActorCommand.prototype.selectLast = function() { + this.forceSelect(0); + if (this._actor && ConfigManager.commandRemember) { + const symbol = this._actor.lastCommandSymbol(); + this.selectSymbol(symbol); + if (symbol === "skill") { + const skill = this._actor.lastBattleSkill(); + if (skill) { + this.selectExt(skill.stypeId); + } + } + } +}; + +//----------------------------------------------------------------------------- +// Window_BattleStatus +// +// The window for displaying the status of party members on the battle screen. + +function Window_BattleStatus() { + this.initialize(...arguments); +} + +Window_BattleStatus.prototype = Object.create(Window_StatusBase.prototype); +Window_BattleStatus.prototype.constructor = Window_BattleStatus; + +Window_BattleStatus.prototype.initialize = function(rect) { + Window_StatusBase.prototype.initialize.call(this, rect); + this.frameVisible = false; + this.openness = 0; + this._bitmapsReady = 0; + this.preparePartyRefresh(); +}; + +Window_BattleStatus.prototype.extraHeight = function() { + return 10; +}; + +Window_BattleStatus.prototype.maxCols = function() { + return 4; +}; + +Window_BattleStatus.prototype.itemHeight = function() { + return this.innerHeight; +}; + +Window_BattleStatus.prototype.maxItems = function() { + return $gameParty.battleMembers().length; +}; + +Window_BattleStatus.prototype.rowSpacing = function() { + return 0; +}; + +Window_BattleStatus.prototype.updatePadding = function() { + this.padding = 8; +}; + +Window_BattleStatus.prototype.actor = function(index) { + return $gameParty.battleMembers()[index]; +}; + +Window_BattleStatus.prototype.selectActor = function(actor) { + const members = $gameParty.battleMembers(); + this.select(members.indexOf(actor)); +}; + +Window_BattleStatus.prototype.update = function() { + Window_StatusBase.prototype.update.call(this); + if ($gameTemp.isBattleRefreshRequested()) { + this.preparePartyRefresh(); + } +}; + +Window_BattleStatus.prototype.preparePartyRefresh = function() { + $gameTemp.clearBattleRefreshRequest(); + this._bitmapsReady = 0; + for (const actor of $gameParty.members()) { + const bitmap = ImageManager.loadFace(actor.faceName()); + bitmap.addLoadListener(this.performPartyRefresh.bind(this)); + } +}; + +Window_BattleStatus.prototype.performPartyRefresh = function() { + this._bitmapsReady++; + if (this._bitmapsReady >= $gameParty.members().length) { + this.refresh(); + } +}; + +Window_BattleStatus.prototype.drawItem = function(index) { + this.drawItemImage(index); + this.drawItemStatus(index); +}; + +Window_BattleStatus.prototype.drawItemImage = function(index) { + const actor = this.actor(index); + const rect = this.faceRect(index); + this.drawActorFace(actor, rect.x, rect.y, rect.width, rect.height); +}; + +Window_BattleStatus.prototype.drawItemStatus = function(index) { + const actor = this.actor(index); + const rect = this.itemRectWithPadding(index); + const nameX = this.nameX(rect); + const nameY = this.nameY(rect); + const stateIconX = this.stateIconX(rect); + const stateIconY = this.stateIconY(rect); + const basicGaugesX = this.basicGaugesX(rect); + const basicGaugesY = this.basicGaugesY(rect); + this.placeTimeGauge(actor, nameX, nameY); + this.placeActorName(actor, nameX, nameY); + this.placeStateIcon(actor, stateIconX, stateIconY); + this.placeBasicGauges(actor, basicGaugesX, basicGaugesY); +}; + +Window_BattleStatus.prototype.faceRect = function(index) { + const rect = this.itemRect(index); + rect.pad(-1); + rect.height = this.nameY(rect) + this.gaugeLineHeight() / 2 - rect.y; + return rect; +}; + +Window_BattleStatus.prototype.nameX = function(rect) { + return rect.x; +}; + +Window_BattleStatus.prototype.nameY = function(rect) { + return this.basicGaugesY(rect) - this.gaugeLineHeight(); +}; + +Window_BattleStatus.prototype.stateIconX = function(rect) { + return rect.x + rect.width - ImageManager.iconWidth / 2 + 4; +}; + +Window_BattleStatus.prototype.stateIconY = function(rect) { + return rect.y + ImageManager.iconHeight / 2 + 4; +}; + +Window_BattleStatus.prototype.basicGaugesX = function(rect) { + return rect.x; +}; + +Window_BattleStatus.prototype.basicGaugesY = function(rect) { + const bottom = rect.y + rect.height - this.extraHeight(); + const numGauges = $dataSystem.optDisplayTp ? 3 : 2; + return bottom - this.gaugeLineHeight() * numGauges; +}; + +//----------------------------------------------------------------------------- +// Window_BattleActor +// +// The window for selecting a target actor on the battle screen. + +function Window_BattleActor() { + this.initialize(...arguments); +} + +Window_BattleActor.prototype = Object.create(Window_BattleStatus.prototype); +Window_BattleActor.prototype.constructor = Window_BattleActor; + +Window_BattleActor.prototype.initialize = function(rect) { + Window_BattleStatus.prototype.initialize.call(this, rect); + this.openness = 255; + this.hide(); +}; + +Window_BattleActor.prototype.show = function() { + this.forceSelect(0); + $gameTemp.clearTouchState(); + Window_BattleStatus.prototype.show.call(this); +}; + +Window_BattleActor.prototype.hide = function() { + Window_BattleStatus.prototype.hide.call(this); + $gameParty.select(null); +}; + +Window_BattleActor.prototype.select = function(index) { + Window_BattleStatus.prototype.select.call(this, index); + $gameParty.select(this.actor(index)); +}; + +Window_BattleActor.prototype.processTouch = function() { + Window_BattleStatus.prototype.processTouch.call(this); + if (this.isOpenAndActive()) { + const target = $gameTemp.touchTarget(); + if (target) { + const members = $gameParty.battleMembers(); + if (members.includes(target)) { + this.select(members.indexOf(target)); + if ($gameTemp.touchState() === "click") { + this.processOk(); + } + } + $gameTemp.clearTouchState(); + } + } +}; + +//----------------------------------------------------------------------------- +// Window_BattleEnemy +// +// The window for selecting a target enemy on the battle screen. + +function Window_BattleEnemy() { + this.initialize(...arguments); +} + +Window_BattleEnemy.prototype = Object.create(Window_Selectable.prototype); +Window_BattleEnemy.prototype.constructor = Window_BattleEnemy; + +Window_BattleEnemy.prototype.initialize = function(rect) { + this._enemies = []; + Window_Selectable.prototype.initialize.call(this, rect); + this.refresh(); + this.hide(); +}; + +Window_BattleEnemy.prototype.maxCols = function() { + return 2; +}; + +Window_BattleEnemy.prototype.maxItems = function() { + return this._enemies.length; +}; + +Window_BattleEnemy.prototype.enemy = function() { + return this._enemies[this.index()]; +}; + +Window_BattleEnemy.prototype.enemyIndex = function() { + const enemy = this.enemy(); + return enemy ? enemy.index() : -1; +}; + +Window_BattleEnemy.prototype.drawItem = function(index) { + this.resetTextColor(); + const name = this._enemies[index].name(); + const rect = this.itemLineRect(index); + this.drawText(name, rect.x, rect.y, rect.width); +}; + +Window_BattleEnemy.prototype.show = function() { + this.refresh(); + this.forceSelect(0); + $gameTemp.clearTouchState(); + Window_Selectable.prototype.show.call(this); +}; + +Window_BattleEnemy.prototype.hide = function() { + Window_Selectable.prototype.hide.call(this); + $gameTroop.select(null); +}; + +Window_BattleEnemy.prototype.refresh = function() { + this._enemies = $gameTroop.aliveMembers(); + Window_Selectable.prototype.refresh.call(this); +}; + +Window_BattleEnemy.prototype.select = function(index) { + Window_Selectable.prototype.select.call(this, index); + $gameTroop.select(this.enemy()); +}; + +Window_BattleEnemy.prototype.processTouch = function() { + Window_Selectable.prototype.processTouch.call(this); + if (this.isOpenAndActive()) { + const target = $gameTemp.touchTarget(); + if (target) { + if (this._enemies.includes(target)) { + this.select(this._enemies.indexOf(target)); + if ($gameTemp.touchState() === "click") { + this.processOk(); + } + } + $gameTemp.clearTouchState(); + } + } +}; + +//----------------------------------------------------------------------------- +// Window_BattleSkill +// +// The window for selecting a skill to use on the battle screen. + +function Window_BattleSkill() { + this.initialize(...arguments); +} + +Window_BattleSkill.prototype = Object.create(Window_SkillList.prototype); +Window_BattleSkill.prototype.constructor = Window_BattleSkill; + +Window_BattleSkill.prototype.initialize = function(rect) { + Window_SkillList.prototype.initialize.call(this, rect); + this.hide(); +}; + +Window_BattleSkill.prototype.show = function() { + this.selectLast(); + this.showHelpWindow(); + Window_SkillList.prototype.show.call(this); +}; + +Window_BattleSkill.prototype.hide = function() { + this.hideHelpWindow(); + Window_SkillList.prototype.hide.call(this); +}; + +//----------------------------------------------------------------------------- +// Window_BattleItem +// +// The window for selecting an item to use on the battle screen. + +function Window_BattleItem() { + this.initialize(...arguments); +} + +Window_BattleItem.prototype = Object.create(Window_ItemList.prototype); +Window_BattleItem.prototype.constructor = Window_BattleItem; + +Window_BattleItem.prototype.initialize = function(rect) { + Window_ItemList.prototype.initialize.call(this, rect); + this.hide(); +}; + +Window_BattleItem.prototype.includes = function(item) { + return $gameParty.canUse(item); +}; + +Window_BattleItem.prototype.show = function() { + this.selectLast(); + this.showHelpWindow(); + Window_ItemList.prototype.show.call(this); +}; + +Window_BattleItem.prototype.hide = function() { + this.hideHelpWindow(); + Window_ItemList.prototype.hide.call(this); +}; + +//----------------------------------------------------------------------------- +// Window_TitleCommand +// +// The window for selecting New Game/Continue on the title screen. + +function Window_TitleCommand() { + this.initialize(...arguments); +} + +Window_TitleCommand.prototype = Object.create(Window_Command.prototype); +Window_TitleCommand.prototype.constructor = Window_TitleCommand; + +Window_TitleCommand.prototype.initialize = function(rect) { + Window_Command.prototype.initialize.call(this, rect); + this.openness = 0; + this.selectLast(); +}; + +Window_TitleCommand._lastCommandSymbol = null; + +Window_TitleCommand.initCommandPosition = function() { + this._lastCommandSymbol = null; +}; + +Window_TitleCommand.prototype.makeCommandList = function() { + const continueEnabled = this.isContinueEnabled(); + this.addCommand(TextManager.newGame, "newGame"); + this.addCommand(TextManager.continue_, "continue", continueEnabled); + this.addCommand(TextManager.options, "options"); +}; + +Window_TitleCommand.prototype.isContinueEnabled = function() { + return DataManager.isAnySavefileExists(); +}; + +Window_TitleCommand.prototype.processOk = function() { + Window_TitleCommand._lastCommandSymbol = this.currentSymbol(); + Window_Command.prototype.processOk.call(this); +}; + +Window_TitleCommand.prototype.selectLast = function() { + if (Window_TitleCommand._lastCommandSymbol) { + this.selectSymbol(Window_TitleCommand._lastCommandSymbol); + } else if (this.isContinueEnabled()) { + this.selectSymbol("continue"); + } +}; + +//----------------------------------------------------------------------------- +// Window_GameEnd +// +// The window for selecting "Go to Title" on the game end screen. + +function Window_GameEnd() { + this.initialize(...arguments); +} + +Window_GameEnd.prototype = Object.create(Window_Command.prototype); +Window_GameEnd.prototype.constructor = Window_GameEnd; + +Window_GameEnd.prototype.initialize = function(rect) { + Window_Command.prototype.initialize.call(this, rect); + this.openness = 0; + this.open(); +}; + +Window_GameEnd.prototype.makeCommandList = function() { + this.addCommand(TextManager.toTitle, "toTitle"); + this.addCommand(TextManager.cancel, "cancel"); +}; + +//----------------------------------------------------------------------------- +// Window_DebugRange +// +// The window for selecting a block of switches/variables on the debug screen. + +function Window_DebugRange() { + this.initialize(...arguments); +} + +Window_DebugRange.prototype = Object.create(Window_Selectable.prototype); +Window_DebugRange.prototype.constructor = Window_DebugRange; + +Window_DebugRange.lastTopRow = 0; +Window_DebugRange.lastIndex = 0; + +Window_DebugRange.prototype.initialize = function(rect) { + this._maxSwitches = Math.ceil(($dataSystem.switches.length - 1) / 10); + this._maxVariables = Math.ceil(($dataSystem.variables.length - 1) / 10); + Window_Selectable.prototype.initialize.call(this, rect); + this.refresh(); + this.setTopRow(Window_DebugRange.lastTopRow); + this.select(Window_DebugRange.lastIndex); + this.activate(); +}; + +Window_DebugRange.prototype.maxItems = function() { + return this._maxSwitches + this._maxVariables; +}; + +Window_DebugRange.prototype.update = function() { + Window_Selectable.prototype.update.call(this); + if (this._editWindow) { + const index = this.index(); + this._editWindow.setMode(this.mode(index)); + this._editWindow.setTopId(this.topId(index)); + } +}; + +Window_DebugRange.prototype.mode = function(index) { + return this.isSwitchMode(index) ? "switch" : "variable"; +}; + +Window_DebugRange.prototype.topId = function(index) { + if (this.isSwitchMode(index)) { + return index * 10 + 1; + } else { + return (index - this._maxSwitches) * 10 + 1; + } +}; + +Window_DebugRange.prototype.isSwitchMode = function(index) { + return index < this._maxSwitches; +}; + +Window_DebugRange.prototype.drawItem = function(index) { + const rect = this.itemLineRect(index); + const c = this.isSwitchMode(index) ? "S" : "V"; + const start = this.topId(index); + const end = start + 9; + const text = c + " [" + start.padZero(4) + "-" + end.padZero(4) + "]"; + this.drawText(text, rect.x, rect.y, rect.width); +}; + +Window_DebugRange.prototype.isCancelTriggered = function() { + return ( + Window_Selectable.prototype.isCancelTriggered() || + Input.isTriggered("debug") + ); +}; + +Window_DebugRange.prototype.processCancel = function() { + Window_Selectable.prototype.processCancel.call(this); + Window_DebugRange.lastTopRow = this.topRow(); + Window_DebugRange.lastIndex = this.index(); +}; + +Window_DebugRange.prototype.setEditWindow = function(editWindow) { + this._editWindow = editWindow; +}; + +//----------------------------------------------------------------------------- +// Window_DebugEdit +// +// The window for displaying switches and variables on the debug screen. + +function Window_DebugEdit() { + this.initialize(...arguments); +} + +Window_DebugEdit.prototype = Object.create(Window_Selectable.prototype); +Window_DebugEdit.prototype.constructor = Window_DebugEdit; + +Window_DebugEdit.prototype.initialize = function(rect) { + Window_Selectable.prototype.initialize.call(this, rect); + this._mode = "switch"; + this._topId = 1; + this.refresh(); +}; + +Window_DebugEdit.prototype.maxItems = function() { + return 10; +}; + +Window_DebugEdit.prototype.drawItem = function(index) { + const dataId = this._topId + index; + const idText = dataId.padZero(4) + ":"; + const idWidth = this.textWidth(idText); + const statusWidth = this.textWidth("-00000000"); + const name = this.itemName(dataId); + const status = this.itemStatus(dataId); + const rect = this.itemLineRect(index); + this.resetTextColor(); + this.drawText(idText, rect.x, rect.y, rect.width); + rect.x += idWidth; + rect.width -= idWidth + statusWidth; + this.drawText(name, rect.x, rect.y, rect.width); + this.drawText(status, rect.x + rect.width, rect.y, statusWidth, "right"); +}; + +Window_DebugEdit.prototype.itemName = function(dataId) { + if (this._mode === "switch") { + return $dataSystem.switches[dataId]; + } else { + return $dataSystem.variables[dataId]; + } +}; + +Window_DebugEdit.prototype.itemStatus = function(dataId) { + if (this._mode === "switch") { + return $gameSwitches.value(dataId) ? "[ON]" : "[OFF]"; + } else { + return String($gameVariables.value(dataId)); + } +}; + +Window_DebugEdit.prototype.setMode = function(mode) { + if (this._mode !== mode) { + this._mode = mode; + this.refresh(); + } +}; + +Window_DebugEdit.prototype.setTopId = function(id) { + if (this._topId !== id) { + this._topId = id; + this.refresh(); + } +}; + +Window_DebugEdit.prototype.currentId = function() { + return this._topId + this.index(); +}; + +Window_DebugEdit.prototype.update = function() { + Window_Selectable.prototype.update.call(this); + if (this.active) { + if (this._mode === "switch") { + this.updateSwitch(); + } else { + this.updateVariable(); + } + } +}; + +Window_DebugEdit.prototype.updateSwitch = function() { + if (Input.isRepeated("ok")) { + const switchId = this.currentId(); + this.playCursorSound(); + $gameSwitches.setValue(switchId, !$gameSwitches.value(switchId)); + this.redrawCurrentItem(); + } +}; + +Window_DebugEdit.prototype.updateVariable = function() { + const variableId = this.currentId(); + const value = $gameVariables.value(variableId); + if (typeof value === "number") { + const newValue = value + this.deltaForVariable(); + if (value !== newValue) { + $gameVariables.setValue(variableId, newValue); + this.playCursorSound(); + this.redrawCurrentItem(); + } + } +}; + +Window_DebugEdit.prototype.deltaForVariable = function() { + if (Input.isRepeated("right")) { + return 1; + } else if (Input.isRepeated("left")) { + return -1; + } else if (Input.isRepeated("pagedown")) { + return 10; + } else if (Input.isRepeated("pageup")) { + return -10; + } + return 0; +}; + +//-----------------------------------------------------------------------------