//============================================================================= // LN_AdvancedMapPuzzleSystem.js // ---------------------------------------------------------------------------- // Copyright (c) 2020 lriki // This software is released under the MIT License. // http://opensource.org/licenses/mit-license.php // ---------------------------------------------------------------------------- // [GitHub] : https://github.com/lriki/LN_AdvancedMapPuzzleSystem // [Twitter]: https://twitter.com/lriki8 //============================================================================= /*:ja * @plugindesc 謎解きマップシステムプラグイン v0.6.0 * @author lriki * * @help マップ上のキャラクター移動やイベントシステムを拡張し、謎解きの幅を広げるための様々な機能を追加します。 * * # 他プラグインとの競合情報 * - triacontane 様の HalfMove.js と併用する場合は、本プラグインをリストの下に追加してください。 * - サンシロ 様の SAN_AnalogMove.js と併用する場合は、本プラグインをリストの下に追加してください。 * * @param MapSkillEffectsMapId * @desc TODO * @type number * @default 1 * * @param GuideLineTerrainTag * @desc 箱オブジェクトの移動ガイドラインとなる地形タグです。 * @type number * @default 7 * * @param AllowAllMapPuzzles * @desc エリアタイプのすべてのマップで、謎解きシステムを有効にするかどうかを設定します。 false にした場合、規定ではすべてのマップで無効となり、マップのメモ欄に と記入したマップだけ有効になります。 * @type boolean * @default true * * @param SlipperyTileRegionId * @desc 滑る床として扱うリージョン ID です。 * @type number * @default 1 * * @param SlippingAnimationPattern * @desc 滑る床の上で移動している時のキャラクターのアニメーションパターン番号です。 * @type number * @default 2 * * MIT License */ !function(i){var r={};function a(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=i,a.c=r,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(i,r,function(e){return t[e]}.bind(null,r));return i},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=6)}([function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i(1),r=i(7),n=i(8),o=DataManager.onLoad;DataManager.onLoad=function(e){if(o.call(this,e),0=this._getonoffFrameMax&&(this._movingMode=o.MovingMode.Stopping)):S.call(this),a==this.isMoving()||this.isMoving()||(this._moveToFalling?(this._moveToFalling=!1,this.startFall()):this.raiseStepEnd())};var b=Game_CharacterBase.prototype.updateJump;Game_CharacterBase.prototype.updateJump=function(){var e,t,i,r,a,n=this.isJumping();b.call(this),this.isRidding()&&n&&(this._movingMode!=o.MovingMode.GroundToObject&&this._movingMode!=o.MovingMode.ObjectToObject||(e=this.riddingObject())&&(t=e._realX,i=e._realY-e.objectHeight(),r=2*this._jumpPeak,a=Math.min((r-this._jumpCount+1)/r,1),this._realX=c.MovingHelper.linear(a,this._getonoffStartX,t-this._getonoffStartX,1),this._realY=c.MovingHelper.linear(a,this._getonoffStartY,i-this._getonoffStartY,1),this._x=e._x,this._y=e._y-e.objectHeight())),this.isJumping()||(this._extraJumping=!1,this._movingMode=o.MovingMode.Stopping,n!=this.isJumping()&&this.onJumpEnd())},Game_CharacterBase.prototype.updateFall=function(){this.isMoving()||(this._fallingState==r.Failling&&($gameMap.terrainTag(this._x,this._y)==s.paramGuideLineTerrainTag||this.attemptMoveGroundToObject(2,!0)?this._fallingState=r.EpilogueToRide:this.moveStraightMain(2)),this._fallingState==r.EpilogueToRide&&(this._fallingState=r.None,this.setThrough(this._fallingOriginalThrough),this.setMoveSpeed(this._fallingOriginalSpeed),this.raiseStepEnd(),h.AMPS_SoundManager.playGSFalled()))},Game_CharacterBase.prototype.resetGetOnOffParams=function(){this._getonoffFrameMax=1/this.distancePerFrame(),this._getonoffFrameCount=0,this._getonoffStartX=this._realX,this._getonoffStartY=this._realY},Game_CharacterBase.prototype.updatePlateNotification=function(){var e,t;this.isMovementSucceeded(this.x,this.y)&&((e=$gameMap.eventsXy(this.x,this.y).find(function(e){return e.isPlateType()}))?e.objectId()==this.objectId()||this._riddeePlateCharacterId==e.objectId()||this.isThrough()||(this._riddeePlateCharacterId=e.objectId(),this._moveToPlateEnter=!0):-1!=this._riddeePlateCharacterId&&(this._moveToPlateLeave=this._riddeePlateCharacterId,this._riddeePlateCharacterId=-1)),0<=this._moveToPlateLeave&&(e=c.MovingHelper.getCharacterById(this._moveToPlateLeave),(t=p.AMPSManager.behavior(e._movingBehaviorType))&&t.onRidderLeaved(e,this),this._moveToPlateLeave=-1),this._moveToPlateEnter&&(e=c.MovingHelper.getCharacterById(this._riddeePlateCharacterId),(t=p.AMPSManager.behavior(e._movingBehaviorType))&&t.onRidderEnterd(e,this),this._moveToPlateEnter=!1)},Game_CharacterBase.prototype.raiseStepEnd=function(){var e,t;this.onStepEnd(),this.updatePlateNotification(),this.isOnSlipperyTile()?($gameTemp.clearDestination(),e=this._realX,t=this._realY,this.moveStraight(this._movingDirection),this._realX=e,this._realY=t,this.isMovementSucceeded(this.x,this.y)||this.raiseStop()):this.raiseStop()},Game_CharacterBase.prototype.raiseStop=function(){this.onStop()},Game_CharacterBase.prototype.onStepEnd=function(){},Game_CharacterBase.prototype.onStop=function(){var e;this._movingSequel&&this._movingSequel.onOwnerStepEnding(this),0<=this._movingSequelOwnerCharacterId&&((e=c.MovingHelper.getCharacterById(this._movingSequelOwnerCharacterId))._movingSequel&&e._movingSequel.onTargetStepEnding(this)),this.isRidding()||(this._ridingScreenZPriority=-1);var t=this.riddingObject();t&&t.onRideOnEvent()},Game_CharacterBase.prototype.onJumpEnd=function(){var e=this.riddingObject();e&&e.onRideOnEvent()},Game_CharacterBase.prototype.onRideOnEvent=function(){},Game_CharacterBase.prototype.onStartFalling=function(){};var O=Game_CharacterBase.prototype.isHalfMove;Game_CharacterBase.prototype.isHalfMove=function(){return!!this.isMover()&&(!this._forcePositionAdjustment&&(!!O&&O.call(this)))}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Game_Player.prototype.objectId=function(){return 0};var r=Game_Player.prototype.isCollided;Game_Player.prototype.isCollided=function(e,t){return!this.isRidding()&&r.call(this,e,t)};var a=Game_Player.prototype.canMove;Game_Player.prototype.canMove=function(){return!this.isJumping()&&(!this._movingSequel&&a.call(this))};var n=Game_Player.prototype.isDashing;Game_Player.prototype.isDashing=function(){return!this._movingSequel&&(!this.isOnSlipperyTile()&&n.call(this))}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s,r,a=i(1),c=i(2),h=i(0),p=i(3);(r=s=s||{})[r.Default=0]="Default",r[r.Front=1]="Front",Game_Event.prototype.clearMapObjectSettings=function(){this._objectTypeBox=!1,this._objectTypeEffect=!1,this._objectTypeReactor=!1,this._objectHeight=-1,this._fallable=!1,this._mapObjectEventTrigger=c.EventTrigger.None,this._mapSkillRange=-1,this._reactionMapSkill="",this._positionalObject=!1,this._mapSkillEffectInitialPosition=s.Default};var n=Game_Event.prototype.initMembers;Game_Event.prototype.initMembers=function(){n.call(this),this._objectHeight=-1,this._fallable=!1,this._mapObjectEventTrigger=c.EventTrigger.None,this._mapSkillEffectDataId=h.AMPSManager.tempMapSkillEffectDataId,this._mapSkillEffectInvokerId=h.AMPSManager.tempMapSkillEffectInvokerId,this._mapSkillEffectInitialPosition=s.Default};var o=Game_Event.prototype.event;Game_Event.prototype.event=function(){if(0>12==s.paramGuideLineTerrainTag)continue;if(0==(16&o)){if(0==(o&i))return!0;if((o&i)===i)return!1}}return!1},Game_Map.prototype.checkNotPassageAll=function(e,t){for(var i=this.tilesetFlags(),r=this.allTiles(e,t),a=0,n=0;nMath.abs(t)?this._movingDirection=0