treasure/js/plugins/_ManoUZ_Kidoku.js
2025-10-01 19:10:49 -05:00

97 lines
No EOL
31 KiB
JavaScript

/*:
* @plugindesc 既読の管理・スキップ
* @author しぐれん
*
* @target MZ
*
* @command DisableReadCheck
* @text 既読チェックの無効化
* @desc このイベントが終了するまで既読の記録・確認を無効化します。
*
* @command EnableReadCheck
* @text 既読チェックの有効化
* @desc このイベントが終了するまで既読の記録・確認を有効化します。
* コモンイベント内で実行した場合は、何も起きません。
*
* @command DisplayKidokuState
* @text 既読フラグ閲覧画面を開く
* @desc 表示内容は上級者向けです。
*
* @param skipModeSwtich
* @text スキップ:制御スイッチ
* @desc ONの場合、既読テキストが来た時に早送りします。
* @type switch
* @default 0
*
* @param ctrlSkip
* @text スキップ:CTRLキーで有効化
* @desc CTRLキーが押されている間、スキップモードになります。
* @type boolean
* @default true
*
* @param kidokuTextColorIndex
* @text 既読テキスト色設定
* @type number
* @default 6
*
* @param excludedCharacters
* @text 既読を記録しないイベント
* @desc 指定した歩行グラフィックのイベントは
* 既読チェックを行いません。
* @type file[]
* @dir img/characters
* @default ["!SF_Chest","!Chest"]
*
* @help
* 文章の既読を管理します。
* 一つの既読フラグで8byte使います。
*
* イベントコマンドの行番号を使って保存しています。
* イベントデータを書き換えると、既読データが不正確になります。
* 行番号は12bit(最大4095)で保存しているため、
* イベントのページ内容が巨大だと正しく保存されない可能性があります。
*
* コモンイベントの呼び出し階層が深い場合、記録を行いません。
*
* 既読フラグはイベントのページごとに独立しています。
* 他のイベントや他のイベントページとデータが混ざることはありません。
*
* ■既読テキストの色変更
* 既に表示されたことのある文章・既に選んだことのある選択肢の色を変えます。
* テキストの色が初期値または\c[0]で通常色になっている場合、色が変更されます。
*
* ■既読チェックの無効化
* ショップや宿屋などの既読チェックをする必要が無いイベントでは、
* 既読チェックを無効化できます。
*
* ■コモンイベントでの既読チェック禁止処理
* 禁止されている状態では、既読チェックを有効化できません。
* 以下の状況では既読チェックが禁止されます。
* ・並列実行のコモンイベント
* ・自動実行のコモンイベント
* ・戦闘中に呼び出されたイベント
*
* ■既読スキップモードについて
* 指定のスイッチがONの場合、またはCTRLキーが押し続けられている間は、
* 既読スキップモードになります。
* 既読スキップモードでは、既読文章が表示された場合に文章をスキップします。
* 既読ではない文章の場合、そこで一時停止します。
*
* ■既読フラグ閲覧画面について
* プラグインコマンドで既読フラグ閲覧画面を呼び出せます。
* ある程度は見やすくしてありますが、
* 上級者向け扱いです。
*
* ■既読フラグのセーブデータについて
* 専用のファイルを作成します。
* 複数のセーブデータ間で共有されます。
* 大きくても100KBほどに収まります。
*
*/
function _0x3ef3(_0x21f9ef,_0x1ef878){const _0x5556d4=_0x5556();return _0x3ef3=function(_0x3ef3eb,_0x453b3e){_0x3ef3eb=_0x3ef3eb-0x1ec;let _0x21f59b=_0x5556d4[_0x3ef3eb];return _0x21f59b;},_0x3ef3(_0x21f9ef,_0x1ef878);}function _0x5556(){const _0x32f894=['hasChanged','kidokuTextColorIndex','cancel','mainAreaTop','numberWindowWidth','bind','registerCommand','drawItem','12uAKPFu','setMapId','ctrlSkip','getMapFlags','setWritePermission','onKidokuFlagCancel','saveKidokBits','lastIndexOf','addWindow','update','_flags','setMapNumbers','4gRUGOR','setText','DisableReadCheck','add','call','error','parse','2122569ffdUWs','extractSaveContents','mainAreaHeight','size','fileAccessEnd','onChoiceSelected','setLastMassageLine','colorChanging','excludedCharacters','page:','table','DisplayKidokuState','flushTextState','20dKzAFI','_table','isTriggered','isPressed','length','kidokuFlagRect','canFileAccess','saveShared','makeContents','index','currentEventId','setHandler','KIDOKU','contents','setupChoices','terminate','needsMessageShowFast','_lastMessageLine','_temp','drawText','padStart','createChoiceBit','setReadcheckEnable','then','valueAt','setFlagWindow','onMessage','resetTextColor','boxWidth','isEventValid','control','needsColorChange','_sharedAccessState','_eventData','Map','34422URfmlg','onEventEnd','finally','2535416oTSvFC','_parallelGuard','clearLastMessageLine','width','_version','setHelpWindow','clearEventData','8LOrlil','Kidoku\x20Load\x20falled','15057ghxfde','currentMapValues','processColorChange','toString','changeTextColor','catch','saveMapData','mapId','event','_depth','loadPlayerData','createMapListWindow','37esqXCz','pause','_pageIndex','loadShared','lastMessageLine','setParallelGuard','startWait','textColor','indexOf','3665AOTXFr','selectOf','saveObject','depthValid','setupMapData','saveGame','KidokuValue:','eventId','getFlags','areReadChecksAllowed','saveCurrentData','EnableReadCheck','_writePermission','obtainEventName','clear','set','_contents','setup','tryLoadContents','gameId','setupEventData','obtainPageIndex','kidoku','refresh','save','prototype','mapListWindowRect','updateHelp','_showFast','_readonlryData','_pauseSkip','characterName','isSelectedChoice','_index','_flagWindow','windowLink','load','kidokuTextColor','obtainEventId','createHelpWindow','createMessageBit','depth','advanced','name','_flagListWindow','createHelpText','isSheredStorage','activate','loadObject','from','onEventStart','clearTemp','getSaveContents','_mapId','has','loadMapData','skipModeSwtich','version','select','4038XmvRdK','choiceTable','setContents','_state','onChoiceDrawItem','updateShowFast','canWriting','maxItems','createEventBit','createGameObjects','initialize','push','right','1356971rAIOYi','isEndOfText','setChoiceHedder','createAllWindows','loadContents','isCtrlSkipPressed','create','itemAt','onMadLoad','mapNumbers','mapNameText','_helpWindow','onMapListOk','ManoUZ_Kidoku','_list','_mapListWindow','812882sSOWys','_eventId','_set','map','camWriteng','left','onSetupChoice','command101','deselect','itemRectWithPadding','isSkipMode','command402','canWrite'];_0x5556=function(){return _0x32f894;};return _0x5556();}(function(_0x52d293,_0x5aded5){const _0x1fb3b6=_0x3ef3,_0x3e8e92=_0x52d293();while(!![]){try{const _0x3e47d5=parseInt(_0x1fb3b6(0x2b2))/0x1*(parseInt(_0x1fb3b6(0x29a))/0x2)+parseInt(_0x1fb3b6(0x2a6))/0x3*(parseInt(_0x1fb3b6(0x263))/0x4)+-parseInt(_0x1fb3b6(0x2bb))/0x5*(parseInt(_0x1fb3b6(0x225))/0x6)+-parseInt(_0x1fb3b6(0x242))/0x7+parseInt(_0x1fb3b6(0x2a4))/0x8*(parseInt(_0x1fb3b6(0x26a))/0x9)+parseInt(_0x1fb3b6(0x277))/0xa*(parseInt(_0x1fb3b6(0x232))/0xb)+-parseInt(_0x1fb3b6(0x257))/0xc*(parseInt(_0x1fb3b6(0x29d))/0xd);if(_0x3e47d5===_0x5aded5)break;else _0x3e8e92['push'](_0x3e8e92['shift']());}catch(_0x537912){_0x3e8e92['push'](_0x3e8e92['shift']());}}}(_0x5556,0x4e1b2),(function(){'use stirct';const _0x1f4243=_0x3ef3;const _0x3a9132=0x1348be5,_0x3f301d=_0x1f4243(0x283),_0x1af643=_0x1f4243(0x200),_0xa35f86=_0x1f4243(0x23f);function _0xf1bb37(){return PluginManager['parameters'](_0xa35f86);}const _0x1306ce=_0x48e9c0=>{return(_0x48e9c0&0x7fffffff)*0x100000000;},_0x20711d=(_0x591809,_0x828269,_0x114c68,_0x38f041,_0x5ed61e)=>{const _0x1c919e=_0x591809&0xff|(_0x828269&0x1f)<<0x8|(_0x114c68&0x7)<<0xd|(_0x5ed61e&0x7fff)<<0x10,_0x483194=_0x1306ce(_0x38f041);return _0x1c919e+_0x483194;};class _0x5db49f{['setMapId'](_0xb12328){const _0x211a1f=_0x1f4243;this[_0x211a1f(0x21f)]=_0xb12328;}[_0x1f4243(0x1f1)](){const _0x538cde=_0x1f4243;return this[_0x538cde(0x243)];}['mapId'](){const _0xa5d59f=_0x1f4243;return this[_0xa5d59f(0x21f)];}constructor(){const _0x1f7d4a=_0x1f4243;this[_0x1f7d4a(0x1f8)](),this[_0x1f7d4a(0x258)](0x0);}['createEventBit'](_0x30036e,_0x5f4982,_0x3310d3){const _0x175314=_0x1f4243;return _0x20711d(this['_eventId'],this[_0x175314(0x2b4)],_0x30036e,_0x5f4982,_0x3310d3);}[_0x1f4243(0x1f8)](){const _0x3253ea=_0x1f4243;this[_0x3253ea(0x1f9)](0x0,0x0);}[_0x1f4243(0x1f9)](_0x32ac0b,_0x6a80db){const _0x413a1a=_0x1f4243;this['_eventId']=_0x32ac0b,this[_0x413a1a(0x2b4)]=_0x6a80db;}[_0x1f4243(0x246)](){return this['_eventId']>0x0;}}class _0x1aba86{constructor(){const _0x2b58c7=_0x1f4243;this[_0x2b58c7(0x29f)](),this['setChoiceHedder'](NaN),this[_0x2b58c7(0x25b)](![]);}[_0x1f4243(0x25b)](_0x552ddc){const _0x3b852d=_0x1f4243;this[_0x3b852d(0x1f6)]=_0x552ddc;}['camWriteng'](){return this['_writePermission'];}['setLastMassageLine'](_0x22afbb,_0x41eb75){const _0x101b39=_0x1f4243;this[_0x101b39(0x288)]=_0x41eb75,this[_0x101b39(0x2af)]=_0x22afbb;}[_0x1f4243(0x29f)](){
const _0x540c09=_0x1f4243;this[_0x540c09(0x270)](NaN,NaN);}[_0x1f4243(0x2b6)](){const _0x37609b=_0x1f4243;return this[_0x37609b(0x288)];}[_0x1f4243(0x213)](){const _0x2ec642=_0x1f4243;return this[_0x2ec642(0x2af)];}['setChoiceHedder'](_0x2154dd){this['_choiceHedder']=_0x2154dd;}['choiceHedder'](){return this['_choiceHedder'];}}class _0x18c77f{constructor(){const _0x586269=_0x1f4243;this[_0x586269(0x278)]=[null];}[_0x1f4243(0x1f2)](_0x5c00e2){const _0x5435fe=_0x1f4243;if(_0x5c00e2>0x0){if(this[_0x5435fe(0x278)][_0x5c00e2])return this[_0x5435fe(0x278)][_0x5c00e2];}return[];}[_0x1f4243(0x2ac)](_0x2233e9,_0x181825){const _0x3a35f7=_0x1f4243;if(_0x2233e9>0x0){const _0x22485b=Array[_0x3a35f7(0x21b)](_0x181825);this[_0x3a35f7(0x278)][_0x2233e9]=_0x22485b;}}['mapNumbers'](){const _0x76b4ae=_0x1f4243,_0x7a33ea=[],_0xf5f0ea=this[_0x76b4ae(0x278)][_0x76b4ae(0x27b)];for(let _0x46dc03=0x0;_0x46dc03<_0xf5f0ea;_0x46dc03++){this[_0x76b4ae(0x278)][_0x46dc03]&&_0x7a33ea[_0x76b4ae(0x230)](_0x46dc03);}return _0x7a33ea;}}class _0x4567ee{[_0x1f4243(0x28d)](_0x4f9bd1){const _0x2d0a99=_0x1f4243;this['_state'][_0x2d0a99(0x25b)](_0x4f9bd1);}['setMapId'](_0x169350){const _0x15ea54=_0x1f4243;this[_0x15ea54(0x298)][_0x15ea54(0x258)](_0x169350);}constructor(_0x2f8e8c){const _0x2b6f57=_0x1f4243;this[_0x2b6f57(0x261)]=new _0x18c77f(),this['_eventData']=new _0x5db49f(),this['_state']=new _0x1aba86(),this[_0x2b6f57(0x2a1)]=_0x2f8e8c;}[_0x1f4243(0x23b)](){const _0x3b3b7d=_0x1f4243;return this['_flags'][_0x3b3b7d(0x23b)]();}[_0x1f4243(0x1fe)](_0x55c73f,_0x1d720b){const _0x42aa6c=_0x1f4243;this[_0x42aa6c(0x298)][_0x42aa6c(0x1f9)](_0x55c73f,_0x1d720b);}['clearEventData'](){const _0x19726f=_0x1f4243;this['_eventData'][_0x19726f(0x1f8)](),this[_0x19726f(0x228)][_0x19726f(0x25b)](![]);}['createChoiceBit'](_0x36fcbc,_0x953eee){const _0x23e624=_0x1f4243,_0x47f156=this[_0x23e624(0x228)]['choiceHedder']();if(this[_0x23e624(0x228)][_0x23e624(0x213)]()===_0x36fcbc&&!isNaN(_0x47f156))return this['_eventData'][_0x23e624(0x22d)](_0x36fcbc,_0x47f156,_0x953eee);return 0x0;}[_0x1f4243(0x212)](_0x5ab85a,_0x139bb2){const _0x263a4c=_0x1f4243;return this['_eventData'][_0x263a4c(0x22d)](_0x5ab85a,_0x139bb2,0x7fff);}[_0x1f4243(0x234)](_0x5b50b4){const _0x506560=_0x1f4243;this[_0x506560(0x228)]['setChoiceHedder'](_0x5b50b4);}[_0x1f4243(0x270)](_0x31bf27,_0x4d7837){const _0x22a91a=_0x1f4243;this[_0x22a91a(0x228)][_0x22a91a(0x270)](_0x31bf27,_0x4d7837);}[_0x1f4243(0x223)](){const _0x42a757=_0x1f4243;return this[_0x42a757(0x2a1)];}[_0x1f4243(0x213)](){const _0x4c5097=_0x1f4243;return this[_0x4c5097(0x228)][_0x4c5097(0x213)]();}['saveMapData'](_0x1a6958){const _0x555a7c=_0x1f4243,_0x4844fb=this[_0x555a7c(0x298)]['mapId']();this[_0x555a7c(0x261)][_0x555a7c(0x2ac)](_0x4844fb,_0x1a6958);}[_0x1f4243(0x24e)](){const _0x2e2de7=_0x1f4243;return this[_0x2e2de7(0x298)][_0x2e2de7(0x246)]()&&this[_0x2e2de7(0x228)][_0x2e2de7(0x246)]();}['eventId'](){const _0x4e1511=_0x1f4243;return this['_eventData'][_0x4e1511(0x1f1)]();}['mapId'](){const _0x562386=_0x1f4243;return this[_0x562386(0x298)][_0x562386(0x2ad)]();}[_0x1f4243(0x221)](_0x356900){const _0x14dbac=_0x1f4243;return this[_0x14dbac(0x261)][_0x14dbac(0x1f2)](_0x356900);}}class _0x244091{[_0x1f4243(0x28d)](_0x39a152){const _0x55b7ce=_0x1f4243;this[_0x55b7ce(0x1fa)][_0x55b7ce(0x28d)](_0x39a152);}constructor(_0x290cee){
const _0x346e23=_0x1f4243;this['_readonlryData']=_0x290cee,this[_0x346e23(0x244)]=new Set(),this[_0x346e23(0x227)](null),this[_0x346e23(0x21d)](),this['_sharedAccessState']='',this[_0x346e23(0x2b7)](![]);}[_0x1f4243(0x294)](_0x1473f0){const _0x99fa79=_0x1f4243;if(_0x1473f0){const _0x1eb8b4=_0x1473f0[_0x99fa79(0x209)]();return!this[_0x99fa79(0x207)][_0x99fa79(0x272)][_0x99fa79(0x220)](_0x1eb8b4);}return![];}[_0x1f4243(0x1f3)](_0x2a27ae){}[_0x1f4243(0x21c)](_0x2568ac,_0x4073d8){const _0x2a9953=_0x1f4243,_0xb71506=$gameMap['event'](_0x2568ac),_0x489010=this[_0x2a9953(0x294)](_0xb71506);this[_0x2a9953(0x1fa)][_0x2a9953(0x28d)](_0x489010);if(_0x2568ac>0x0){const _0x264957=_0xb71506['_pageIndex'];this[_0x2a9953(0x1fa)][_0x2a9953(0x1fe)](_0x2568ac,_0x264957),this[_0x2a9953(0x1ee)](_0x4073d8);}else this[_0x2a9953(0x1fa)][_0x2a9953(0x2a3)]();}[_0x1f4243(0x29b)](_0x5a0dca){}['clearTemp'](){const _0x317477=_0x1f4243;this[_0x317477(0x289)]={'hasChanged':![],'colorChanging':![],'choiceTable':[]};}[_0x1f4243(0x27f)](){
const _0x155a07=_0x1f4243;!this[_0x155a07(0x1fa)]&&(this[_0x155a07(0x1fa)]=new _0x4567ee(this['version']()),this[_0x155a07(0x244)]=new Set());}[_0x1f4243(0x223)](){return _0x3a9132;}[_0x1f4243(0x25d)](_0x40f904){const _0x298ecb=_0x1f4243;if(_0x40f904>0x0)this[_0x298ecb(0x244)][_0x298ecb(0x266)](_0x40f904),this['_temp'][_0x298ecb(0x24f)]=!![];else{const _0xeefc48=_0x40f904[_0x298ecb(0x2a9)](0x10);throw new Error(_0x298ecb(0x1f0)+_0xeefc48);}}[_0x1f4243(0x227)](_0x26dd2e){const _0x963c84=_0x1f4243;this[_0x963c84(0x1fa)]=_0x26dd2e;}[_0x1f4243(0x21e)](){const _0x430a5e=_0x1f4243;return this[_0x430a5e(0x1f4)](),this['_contents'];}['loadContents'](_0x44079b){const _0x3fba49=_0x1f4243;this[_0x3fba49(0x227)](null),this[_0x3fba49(0x244)]=null;if(this[_0x3fba49(0x1fc)](_0x44079b)){}this['makeContents']();}[_0x1f4243(0x1fc)](_0x386668){const _0x12e48a=_0x1f4243;if(!_0x386668)return!![];try{if(_0x3a9132===_0x386668[_0x12e48a(0x223)]()){const _0x235c57=_0x386668['mapId'](),_0x58980e=_0x386668['loadMapData'](_0x235c57);return this['setContents'](_0x386668),this['_set']=new Set(_0x58980e),!![];}}catch(_0xf7d528){console[_0x12e48a(0x268)](_0x12e48a(0x2a5)),console[_0x12e48a(0x274)](_0x386668);}return![];}[_0x1f4243(0x281)](){const _0x48b531=_0x1f4243;return this[_0x48b531(0x1fa)][_0x48b531(0x1f1)]();}[_0x1f4243(0x1ed)](_0x2d928e){return _0x2d928e<=0x7;}[_0x1f4243(0x291)](_0x43eda6,_0x205d55){const _0x78d30a=_0x1f4243;if(this[_0x78d30a(0x22b)]()&&this[_0x78d30a(0x1ed)](_0x43eda6)){this[_0x78d30a(0x1fa)][_0x78d30a(0x270)](_0x43eda6,_0x205d55);const _0x5ecebd=this[_0x78d30a(0x1fa)]['createMessageBit'](_0x43eda6,_0x205d55);this['_temp'][_0x78d30a(0x271)]=this['_set'][_0x78d30a(0x220)](_0x5ecebd),this[_0x78d30a(0x25d)](_0x5ecebd);}else this['_temp'][_0x78d30a(0x271)]=![];}['onSetupChoice'](_0x4e0d83,_0x406a35,_0x19f25e){const _0x361235=_0x1f4243;if(this['canWriting']()&&this[_0x361235(0x1ed)](_0x406a35)){this[_0x361235(0x1fa)][_0x361235(0x234)](_0x4e0d83);const _0xe78ee9=_0x19f25e[_0x361235(0x245)]((_0x5aa6b8,_0x29c177)=>{const _0x859539=_0x361235,_0x5dde37=this[_0x859539(0x1fa)][_0x859539(0x28c)](_0x406a35,_0x29c177);return this[_0x859539(0x244)][_0x859539(0x220)](_0x5dde37);});this[_0x361235(0x289)][_0x361235(0x226)]=_0xe78ee9;}else this[_0x361235(0x289)][_0x361235(0x226)]=[];}[_0x1f4243(0x26f)](_0x643d68,_0x23dcf6,_0x5b378f){const _0x44712a=_0x1f4243;if(this['canWriting']()){const _0x40b8c1=this[_0x44712a(0x1fa)][_0x44712a(0x28c)](_0x643d68,_0x23dcf6);this[_0x44712a(0x289)][_0x44712a(0x271)]=![],this[_0x44712a(0x25d)](_0x40b8c1),this[_0x44712a(0x1fa)][_0x44712a(0x234)](NaN);}}['isSelectedChoice'](_0x1ac892,_0x43c222){return!!this['_temp']['choiceTable'][_0x1ac892];}[_0x1f4243(0x296)](){const _0x44e9a5=_0x1f4243;return this[_0x44e9a5(0x289)][_0x44e9a5(0x271)];}[_0x1f4243(0x20f)](){const _0x2ed74e=_0x1f4243;return ColorManager[_0x2ed74e(0x2b9)](this[_0x2ed74e(0x207)]['colorIndex']);}[_0x1f4243(0x229)](_0x410092){const _0x2c56c8=_0x1f4243;this[_0x2c56c8(0x289)][_0x2c56c8(0x271)]=this[_0x2c56c8(0x20a)](_0x410092,'');}[_0x1f4243(0x2a7)](){const _0x5953d5=_0x1f4243;return this[_0x5953d5(0x244)];}['onMadLoad'](_0x16f49b){const _0x3867b0=_0x1f4243;this[_0x3867b0(0x1f4)]();}[_0x1f4243(0x1ee)](_0x1f404f){const _0x4fc861=_0x1f4243;if(this['_contents'][_0x4fc861(0x2ad)]()!==_0x1f404f){const _0x5c6533=this[_0x4fc861(0x1fa)][_0x4fc861(0x221)](_0x1f404f);this['_set']=new Set(_0x5c6533),this[_0x4fc861(0x1fa)]['setMapId'](_0x1f404f);}}[_0x1f4243(0x1f4)](){const _0x3f3987=_0x1f4243;this[_0x3f3987(0x289)][_0x3f3987(0x24f)]&&this['_set'][_0x3f3987(0x26d)]>0x0&&(this[_0x3f3987(0x1fa)]['saveMapData'](this[_0x3f3987(0x244)]),this['_temp'][_0x3f3987(0x24f)]=![]);}['mapNumbers'](){const _0x468d34=_0x1f4243;return this['_contents'][_0x468d34(0x23b)]();}[_0x1f4243(0x25a)](_0x279cd5){const _0x32c2c7=_0x1f4243,_0x2b47a3=this[_0x32c2c7(0x1fa)][_0x32c2c7(0x261)][_0x32c2c7(0x1f2)](_0x279cd5);return _0x2b47a3;}['isSheredStorage'](){return!![];}[_0x1f4243(0x27d)](){return this['isSheredStorage']()&&this['_sharedAccessState']==='';}[_0x1f4243(0x26e)](){const _0x39b210=_0x1f4243;this[_0x39b210(0x297)]='';}[_0x1f4243(0x2b5)](){const _0x104450=_0x1f4243;this['canFileAccess']()&&(this[_0x104450(0x297)]=_0x104450(0x20e),StorageManager[_0x104450(0x21a)](_0x1af643)[_0x104450(0x28e)](_0x39aaa0=>{const _0x5bf5a3=_0x104450;return $dataSystem['advanced'][_0x5bf5a3(0x1fd)]===_0x39aaa0[_0x5bf5a3(0x1fd)]&&this[_0x5bf5a3(0x236)](_0x39aaa0[_0x5bf5a3(0x284)]),0x0;})[_0x104450(0x2ab)](()=>{const _0xe56653=_0x104450;this[_0xe56653(0x27f)]();})[_0x104450(0x29c)](()=>{this['fileAccessEnd']();}));}[_0x1f4243(0x27e)](){const _0x300482=_0x1f4243;if(this[_0x300482(0x27d)]()){this[_0x300482(0x297)]=_0x300482(0x202),$dataSystem;const _0x3094ff={'gameId':$dataSystem[_0x300482(0x214)]['gameId'],'contents':this[_0x300482(0x1fa)]};StorageManager[_0x300482(0x1ec)](_0x1af643,_0x3094ff)[_0x300482(0x28e)](()=>{return 0x0;})['finally'](()=>this[_0x300482(0x26e)]());}}[_0x1f4243(0x22b)](){const _0x15af62=_0x1f4243;return!this[_0x15af62(0x29e)]&&this[_0x15af62(0x1fa)][_0x15af62(0x24e)]();}[_0x1f4243(0x2b7)](_0x474638){const _0x590ea2=_0x1f4243;this[_0x590ea2(0x29e)]=_0x474638;}[_0x1f4243(0x24c)](){const _0x1da206=_0x1f4243;return $gameSwitches['value'](this[_0x1da206(0x207)]['skipModeSwtich']);}[_0x1f4243(0x287)](){const _0x54ae69=_0x1f4243;return this[_0x54ae69(0x289)]['colorChanging']&&(this[_0x54ae69(0x24c)]()||this[_0x54ae69(0x237)]());}[_0x1f4243(0x237)](){const _0x4402a9=_0x1f4243;return this['_readonlryData'][_0x4402a9(0x259)]&&this[_0x4402a9(0x289)][_0x4402a9(0x271)]&&Input[_0x4402a9(0x27a)](_0x4402a9(0x295));}}const _0x3c59e2=((()=>{const _0x1d33f3=_0x1f4243,_0x2758b1=_0xf1bb37(),_0x24777d=JSON[_0x1d33f3(0x269)](_0x2758b1['excludedCharacters']||'[]'),_0x533444={'ctrlSkip':!![],'colorIndex':Number(_0x2758b1[_0x1d33f3(0x250)]||0x6),'skipModeSwtich':Number(_0x2758b1[_0x1d33f3(0x222)]||0x0),'excludedCharacters':new Set(_0x24777d)};
return new _0x244091(_0x533444);})()),_0x20c7e0=Game_Interpreter['prototype']['command402'];Game_Interpreter[_0x1f4243(0x203)][_0x1f4243(0x24d)]=function(_0x26301c){const _0x427aa4=_0x1f4243,_0x368a25=this[_0x427aa4(0x20b)],_0x1e6ec8=_0x20c7e0[_0x427aa4(0x267)](this,_0x26301c);return _0x368a25===this[_0x427aa4(0x20b)]&&_0x3c59e2[_0x427aa4(0x26f)](this[_0x427aa4(0x2af)],_0x26301c[0x0],_0x26301c[0x1]),_0x1e6ec8;};const _0xed151f=Game_Interpreter[_0x1f4243(0x203)]['command101'];Game_Interpreter[_0x1f4243(0x203)][_0x1f4243(0x249)]=function(_0x1f1169){const _0x1bd2f4=_0x1f4243,_0x18e4d6=this[_0x1bd2f4(0x20b)],_0x235633=_0xed151f[_0x1bd2f4(0x267)](this,_0x1f1169);return _0x235633&&_0x3c59e2[_0x1bd2f4(0x291)](this[_0x1bd2f4(0x2af)],_0x18e4d6),_0x235633;};const _0x4d7ee3=Game_Interpreter[_0x1f4243(0x203)][_0x1f4243(0x285)];Game_Interpreter[_0x1f4243(0x203)][_0x1f4243(0x285)]=function(_0x32525b){const _0x9df262=_0x1f4243;_0x3c59e2[_0x9df262(0x248)](this[_0x9df262(0x20b)],this['_depth'],_0x32525b[0x0]),_0x4d7ee3['call'](this,_0x32525b);};const _0x4a920a=Game_Interpreter[_0x1f4243(0x203)][_0x1f4243(0x1fb)];Game_Interpreter['prototype'][_0x1f4243(0x1fb)]=function(_0x1899ff,_0x342a61){const _0x4bac23=_0x1f4243;_0x4a920a[_0x4bac23(0x267)](this,_0x1899ff,_0x342a61),_0x342a61>0x0?this['_depth']===0x0&&_0x3c59e2[_0x4bac23(0x21c)](_0x342a61,this[_0x4bac23(0x21f)]):_0x3c59e2['onEventStart'](0x0,0x0);};const _0x389df2=Game_Interpreter['prototype'][_0x1f4243(0x286)];Game_Interpreter['prototype'][_0x1f4243(0x286)]=function(){const _0x53a016=_0x1f4243;this[_0x53a016(0x2af)]===0x0&&this[_0x53a016(0x243)]>0x0&&_0x3c59e2['onEventEnd'](this['_eventId']),_0x389df2['call'](this);};const _0xe3cf2f=Game_CommonEvent[_0x1f4243(0x203)][_0x1f4243(0x260)];Game_CommonEvent[_0x1f4243(0x203)][_0x1f4243(0x260)]=function(){const _0x1be6dd=_0x1f4243;_0x3c59e2[_0x1be6dd(0x2b7)](!![]),_0xe3cf2f[_0x1be6dd(0x267)](this),_0x3c59e2[_0x1be6dd(0x2b7)](![]);};const _0x17fe79=Window_Message[_0x1f4243(0x203)]['processColorChange'];Window_Message[_0x1f4243(0x203)][_0x1f4243(0x2a8)]=function(_0x552249){const _0x33d3b0=_0x1f4243;_0x552249===0x0&&_0x3c59e2[_0x33d3b0(0x296)]()?this[_0x33d3b0(0x2aa)](_0x3c59e2[_0x33d3b0(0x20f)]()):_0x17fe79[_0x33d3b0(0x267)](this,_0x552249);};const _0x280ff3=Window_Message['prototype']['resetTextColor'];Window_Message[_0x1f4243(0x203)][_0x1f4243(0x292)]=function(){const _0x2af579=_0x1f4243;_0x280ff3[_0x2af579(0x267)](this),_0x3c59e2['needsColorChange']()&&this[_0x2af579(0x2aa)](_0x3c59e2[_0x2af579(0x20f)]());};const _0x2405dd=Window_Message[_0x1f4243(0x203)][_0x1f4243(0x22a)];Window_Message[_0x1f4243(0x203)][_0x1f4243(0x22a)]=function(){const _0x6fa81d=_0x1f4243;_0x2405dd[_0x6fa81d(0x267)](this),this[_0x6fa81d(0x206)]=this[_0x6fa81d(0x206)]||_0x3c59e2[_0x6fa81d(0x287)]();};const _0x5c0404=Window_Message[_0x1f4243(0x203)]['flushTextState'];Window_Message[_0x1f4243(0x203)][_0x1f4243(0x276)]=function(_0x2932c1){const _0xe535b7=_0x1f4243;_0x5c0404[_0xe535b7(0x267)](this,_0x2932c1),!this[_0xe535b7(0x208)]&&_0x3c59e2[_0xe535b7(0x287)]()&&this[_0xe535b7(0x233)](_0x2932c1)&&(this[_0xe535b7(0x2b3)]=![],this[_0xe535b7(0x208)]=!![],this[_0xe535b7(0x2b8)](0xa));};const _0xc016b8=Window_Message[_0x1f4243(0x203)][_0x1f4243(0x279)];Window_Message[_0x1f4243(0x203)][_0x1f4243(0x279)]=function(){const _0x55fc93=_0x1f4243;return _0xc016b8[_0x55fc93(0x267)](this)||_0x3c59e2['isCtrlSkipPressed']();};const _0x2f9c20=Window_ChoiceList[_0x1f4243(0x203)][_0x1f4243(0x2a8)];Window_ChoiceList['prototype'][_0x1f4243(0x2a8)]=function(_0x30ac52){const _0x208df5=_0x1f4243;_0x30ac52===0x0&&_0x3c59e2[_0x208df5(0x296)]()?this['changeTextColor'](_0x3c59e2[_0x208df5(0x20f)]()):_0x2f9c20[_0x208df5(0x267)](this,_0x30ac52);};const _0x65e6d5=Window_ChoiceList[_0x1f4243(0x203)][_0x1f4243(0x292)];Window_ChoiceList[_0x1f4243(0x203)][_0x1f4243(0x292)]=function(){const _0x20ffdf=_0x1f4243;_0x65e6d5[_0x20ffdf(0x267)](this),_0x3c59e2[_0x20ffdf(0x296)]()&&this[_0x20ffdf(0x2aa)](_0x3c59e2[_0x20ffdf(0x20f)]());};const _0x1f7cbf=Window_ChoiceList[_0x1f4243(0x203)][_0x1f4243(0x256)];Window_ChoiceList[_0x1f4243(0x203)][_0x1f4243(0x256)]=function(_0x48faa2){const _0x43830c=_0x1f4243;_0x3c59e2[_0x43830c(0x229)](_0x48faa2),_0x1f7cbf[_0x43830c(0x267)](this,_0x48faa2);};const _0x16abcc=DataManager[_0x1f4243(0x22e)];DataManager[_0x1f4243(0x22e)]=function(){const _0x42e4d1=_0x1f4243;_0x3c59e2[_0x42e4d1(0x27f)](),_0x16abcc[_0x42e4d1(0x267)](this);};const _0x5e8e53=DataManager['loadMapData'];DataManager['loadMapData']=function(_0x611c45){const _0x4bd76e=_0x1f4243;_0x3c59e2[_0x4bd76e(0x23a)](_0x611c45),_0x5e8e53[_0x4bd76e(0x267)](this,_0x611c45);};const _0x4e22ec=DataManager[_0x1f4243(0x26b)];DataManager[_0x1f4243(0x26b)]=function(_0x5ba17e){const _0xd91ed9=_0x1f4243;_0x4e22ec['call'](this,_0x5ba17e);if(!_0x3c59e2[_0xd91ed9(0x218)]()){const _0x159c3d=_0x5ba17e[_0x3f301d];_0x3c59e2['loadContents'](_0x159c3d);}};const _0xcbff5b=DataManager['saveGame'];DataManager[_0x1f4243(0x1ef)]=function(_0x1e66e2){const _0xdfa67=_0x1f4243,_0x5ec8d9=_0xcbff5b[_0xdfa67(0x267)](this,_0x1e66e2);return _0x3c59e2[_0xdfa67(0x27e)](),_0x5ec8d9;};const _0x29709e=Scene_Boot[_0x1f4243(0x203)][_0x1f4243(0x2b0)];Scene_Boot[_0x1f4243(0x203)][_0x1f4243(0x2b0)]=function(){const _0x49869f=_0x1f4243;_0x29709e[_0x49869f(0x267)](this),_0x3c59e2[_0x49869f(0x2b5)]();};class _0x1827d9 extends Window_Selectable{['initialize'](_0xedc6d4){const _0x2e7d29=_0x1f4243;this[_0x2e7d29(0x240)]=[],super['initialize'](_0xedc6d4);}[_0x1f4243(0x290)](_0x3fc1fb){const _0x3620ae=_0x1f4243;this[_0x3620ae(0x20c)]=_0x3fc1fb;}[_0x1f4243(0x224)](_0x24c217){const _0x12627b=_0x1f4243;super[_0x12627b(0x224)](_0x24c217);if(this[_0x12627b(0x20c)]){const _0xea9cda=this[_0x12627b(0x239)](_0x24c217),_0x287562=_0x3c59e2[_0x12627b(0x25a)](_0xea9cda);this[_0x12627b(0x20c)][_0x12627b(0x227)](_0x287562,_0xea9cda);}}[_0x1f4243(0x2bc)](_0x4328c4){const _0x312345=_0x1f4243,_0x3ef17d=Math['round'](this[_0x312345(0x240)]['length']/0x2),_0x46a388=this['_list'][_0x3ef17d];if(_0x4328c4<_0x46a388){const _0x36071e=this[_0x312345(0x240)][_0x312345(0x2ba)](_0x4328c4);this['select'](_0x36071e);}else{const _0x212f5e=this['_list'][_0x312345(0x25e)](_0x4328c4);this[_0x312345(0x224)](_0x212f5e);}}[_0x1f4243(0x262)](_0x56ba7d){const _0x493238=_0x1f4243;this[_0x493238(0x240)]=_0x56ba7d,this[_0x493238(0x201)]();}[_0x1f4243(0x22c)](){const _0x48ba8b=_0x1f4243;return this[_0x48ba8b(0x240)][_0x48ba8b(0x27b)];}[_0x1f4243(0x239)](_0x235719){const _0x59ab34=_0x1f4243;return this[_0x59ab34(0x240)][_0x235719];}[_0x1f4243(0x205)](){const _0x350973=_0x1f4243,_0x4d6d11=this[_0x350973(0x23c)](this['index']());this[_0x350973(0x23d)][_0x350973(0x264)](_0x4d6d11);}[_0x1f4243(0x23c)](_0x1c91dd){const _0x105fc4=_0x1f4243,_0x4d72bb=this[_0x105fc4(0x239)](_0x1c91dd);if(isNaN(_0x4d72bb))return'';const _0x5b9252=_0x4d72bb['toString']()[_0x105fc4(0x28b)](0x4,'0'),_0x2c2850=$dataMapInfos[_0x4d72bb];return'Map'+_0x5b9252+':'+(_0x2c2850?_0x2c2850[_0x105fc4(0x215)]:'');}['drawItem'](_0x4f90d0){const _0xd7758b=_0x1f4243,_0xa849a1=this[_0xd7758b(0x239)](_0x4f90d0);if(isNaN(_0xa849a1))return;const _0x471014=this[_0xd7758b(0x24b)](_0x4f90d0),_0x29a216=_0xd7758b(0x299)+_0xa849a1[_0xd7758b(0x2a9)]()[_0xd7758b(0x28b)](0x4,'0');this[_0xd7758b(0x28a)](_0x29a216,_0x471014['x'],_0x471014['y'],_0x471014[_0xd7758b(0x2a0)]);}}class _0x18d343 extends Window_Selectable{['initialize'](_0x2cab85){const _0x9d5d3f=_0x1f4243;this['_list']=[],super[_0x9d5d3f(0x22f)](_0x2cab85);}['setContents'](_0x24eadc,_0x4abf7e){const _0x1d98d9=_0x1f4243;this[_0x1d98d9(0x21f)]=_0x4abf7e,this['_list']=Array['from'](_0x24eadc),this[_0x1d98d9(0x201)]();}[_0x1f4243(0x258)](_0x596609){const _0x3583d1=_0x1f4243;this[_0x3583d1(0x240)]=_0x3c59e2[_0x3583d1(0x25a)](_0x596609),this['_mapId']=_0x596609,this[_0x3583d1(0x201)]();}[_0x1f4243(0x22c)](){const _0x5e3f15=_0x1f4243;return this[_0x5e3f15(0x240)][_0x5e3f15(0x27b)];}[_0x1f4243(0x1ff)](_0x2fa209){
const _0x2ff8b8=0x1f00&_0x2fa209,_0x2de275=_0x2ff8b8>>0x8;return _0x2de275;}[_0x1f4243(0x210)](_0x4cdd29){return 0xff&_0x4cdd29;}[_0x1f4243(0x1f7)](_0x56199b){const _0x1b314e=_0x1f4243,_0x1007c4=this['obtainEventId'](_0x56199b);if(this[_0x1b314e(0x21f)]===$gameMap[_0x1b314e(0x2ad)]()){const _0xc7e0e3=$gameMap[_0x1b314e(0x2ae)](_0x1007c4);if(_0xc7e0e3)return _0xc7e0e3[_0x1b314e(0x2ae)]()[_0x1b314e(0x215)];}return'EV'+_0x1007c4[_0x1b314e(0x2a9)]()['padStart'](0x3,'0');}[_0x1f4243(0x217)](_0x1808ed){const _0x2f57d6=_0x1f4243,_0x3f8802=this[_0x2f57d6(0x1ff)](_0x1808ed),_0x3546a5=this[_0x2f57d6(0x210)](_0x1808ed);return _0x2f57d6(0x273)+(_0x3f8802+0x1);}[_0x1f4243(0x205)](){const _0x542b36=_0x1f4243,_0x27699d=this[_0x542b36(0x28f)](this[_0x542b36(0x280)]());if(isNaN(_0x27699d))this['_helpWindow'][_0x542b36(0x1f8)]();else{const _0x2e30cb=this[_0x542b36(0x217)](_0x27699d);this['_helpWindow']['setText'](_0x2e30cb);}}[_0x1f4243(0x28f)](_0x32c2c6){const _0x4f04ed=_0x1f4243;return this[_0x4f04ed(0x240)][_0x32c2c6];}[_0x1f4243(0x256)](_0x49bd37){const _0x3759f7=_0x1f4243;if(_0x49bd37<this[_0x3759f7(0x240)]['length']){const _0x5e620b=this['itemLineRect'](_0x49bd37),_0x4cd189=this[_0x3759f7(0x28f)](_0x49bd37),_0x325fd9=this[_0x3759f7(0x1f7)](_0x4cd189),_0x544723=_0x4cd189[_0x3759f7(0x2a9)](0x10)[_0x3759f7(0x28b)](0xc,'0');this['drawText'](_0x544723,_0x5e620b['x'],_0x5e620b['y'],_0x5e620b[_0x3759f7(0x2a0)],_0x3759f7(0x231)),this[_0x3759f7(0x28a)](_0x325fd9,_0x5e620b['x'],_0x5e620b['y'],_0x5e620b['width'],_0x3759f7(0x247));}}}class _0x58d698 extends Scene_MenuBase{[_0x1f4243(0x238)](){super['create'](),this['createAllWindows']();}[_0x1f4243(0x235)](){const _0x266e85=_0x1f4243;this[_0x266e85(0x211)](),this[_0x266e85(0x2b1)](),this['createKidokFlagWindow'](),this[_0x266e85(0x20d)]();}[_0x1f4243(0x20d)](){const _0x357761=_0x1f4243;this[_0x357761(0x241)]['setHelpWindow'](this['_helpWindow']),this[_0x357761(0x241)]['setFlagWindow'](this[_0x357761(0x216)]);}[_0x1f4243(0x2b1)](){const _0x5c4bf0=_0x1f4243,_0x38a685=this[_0x5c4bf0(0x204)](),_0x39cb18=new _0x1827d9(_0x38a685);_0x39cb18[_0x5c4bf0(0x262)](_0x3c59e2[_0x5c4bf0(0x23b)]()),_0x39cb18[_0x5c4bf0(0x282)]('ok',this[_0x5c4bf0(0x23e)]['bind'](this)),_0x39cb18[_0x5c4bf0(0x282)](_0x5c4bf0(0x251),this['popScene'][_0x5c4bf0(0x254)](this)),_0x39cb18[_0x5c4bf0(0x2bc)]($gameMap['mapId']()),this[_0x5c4bf0(0x241)]=_0x39cb18,this[_0x5c4bf0(0x25f)](_0x39cb18);}[_0x1f4243(0x23e)](){const _0xaed94a=_0x1f4243;this[_0xaed94a(0x216)][_0xaed94a(0x224)](0x0),this['_flagListWindow'][_0xaed94a(0x219)]();}['mapListWindowRect'](){const _0x44de0c=_0x1f4243,_0x7e014=this[_0x44de0c(0x253)]();return new Rectangle(0x0,this[_0x44de0c(0x252)](),_0x7e014,this['mainAreaHeight']());}[_0x1f4243(0x253)](){return 0xa0;}['kidokuFlagRect'](){const _0x6c6bce=_0x1f4243,_0x1fc5bc=this[_0x6c6bce(0x253)](),_0x8f5ae1=Graphics[_0x6c6bce(0x293)]-_0x1fc5bc;return new Rectangle(_0x1fc5bc,this[_0x6c6bce(0x252)](),_0x8f5ae1,this[_0x6c6bce(0x26c)]());}['createKidokFlagWindow'](){const _0x2d7930=_0x1f4243,_0x48b616=this[_0x2d7930(0x27c)](),_0x55e6c8=new _0x18d343(_0x48b616);_0x55e6c8[_0x2d7930(0x227)](_0x3c59e2[_0x2d7930(0x2a7)](),$gameMap[_0x2d7930(0x2ad)]()),_0x55e6c8[_0x2d7930(0x219)](),_0x55e6c8[_0x2d7930(0x282)](_0x2d7930(0x251),this[_0x2d7930(0x25c)]['bind'](this)),_0x55e6c8[_0x2d7930(0x2a2)](this[_0x2d7930(0x23d)]),_0x55e6c8[_0x2d7930(0x224)](0x0),this['_flagListWindow']=_0x55e6c8,this[_0x2d7930(0x25f)](_0x55e6c8);}['onKidokuFlagCancel'](){const _0x300ed5=_0x1f4243;this[_0x300ed5(0x216)][_0x300ed5(0x24a)](),this['_mapListWindow']['activate']();}}PluginManager[_0x1f4243(0x255)](_0xa35f86,_0x1f4243(0x275),()=>{const _0x22a889=_0x1f4243;_0x3c59e2[_0x22a889(0x1f4)](),SceneManager[_0x22a889(0x230)](_0x58d698);}),PluginManager[_0x1f4243(0x255)](_0xa35f86,_0x1f4243(0x265),function(){const _0x3883bd=_0x1f4243;this[_0x3883bd(0x2af)]===0x0&&_0x3c59e2[_0x3883bd(0x28d)](![]);}),PluginManager[_0x1f4243(0x255)](_0xa35f86,_0x1f4243(0x1f5),function(){const _0x5c0979=_0x1f4243;this[_0x5c0979(0x2af)]===0x0&&this['_eventId']>0x0&&this['_eventId']==_0x3c59e2['currentEventId']()&&_0x3c59e2['setReadcheckEnable'](!![]);});function _0x1bca17(_0x33f5e9,_0x4381f2){window[_0x4381f2]=_0x33f5e9;}const _0xbe9a28=[_0x5db49f,_0x1aba86,_0x18c77f,_0x4567ee];for(const _0x56f79a of _0xbe9a28){_0x1bca17(_0x56f79a,_0x56f79a[_0x1f4243(0x215)]);}}()));