Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*:
- * Alone Panic
- * @plugindesc this plugin hold all the data who control the panic Meter and panics states
- * @author Nio Kasgami
- * @version 1.00 {Alpha}
- * @require NA
- * @overwrite {
- * Game_Player
- * Game_Actor
- * Game_Map
- * }
- * @TODOLIST {
- * make the fear system.
- * }
- */
- //-----------------------------------------------------------------------------
- // Game_Player
- //
- // The game object class for the player. It contains event starting
- // determinants and map scrolling functions.
- Object.defineProperty(Game_Player.prototype, 'fear', {
- get: function() {
- return this._fearPoint;
- },
- configurable: true
- });
- Object.defineProperty(Game_Player.prototype, 'maxFear', {
- get: function() {
- return this._maxFearPoint;
- },
- configurable: true
- });
- 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;
- this._fearPoint = 0;
- this._maxFearPoint = 1000;
- this._fearStates = [];
- };
- Game_Player.prototype.resetFear = function(){
- this._fearPoint = 0;
- };
- Game_Player.prototype.maxFear = function(){
- this._fearPoint = this._maxFearPoint;
- };
- Game_Player.prototype.setFear = function(value){
- this._fearPoint = value;
- };
- Game_Player.prototype.addFear = function(value){
- var oldFearPoint = this._fearPoint;
- this._fearPoint = oldFearPoint + value;
- };
- Game_Player.prototype.removeFear = function(value){
- var oldFearPoint = this._fearPoint;
- this._fearPoint = oldFearPoint - value;
- };
- Game_Player.prototype.progressiveFearIncreasing = function(){
- this._fearPoint++;
- };
- Game_Player.prototype.progressiveFearDecreasing = function(){
- this._fearPoint--;
- };
- Scene_Map.prototype.createDisplayObjects = function() {
- this.createSpriteset();
- this.createMapNameWindow();
- this.createWindowLayer();
- this.createAllWindows();
- this.drawFear();
- };
- Scene_Map.prototype.drawFear = function(){
- this._gameTitleSprite = new Sprite(new Bitmap(Graphics.width, Graphics.height));
- this.addChild(this._gameTitleSprite);
- var x = 20;
- var y = Graphics.height / 4;
- var maxWidth = Graphics.width - x * 2;
- var text = $gamePlayer.fear;
- this._gameTitleSprite.bitmap.outlineColor = 'black';
- this._gameTitleSprite.bitmap.outlineWidth = 8;
- this._gameTitleSprite.bitmap.fontSize = 72;
- this._gameTitleSprite.bitmap.drawText(text, x, y, maxWidth, 48, 'center');
- };
- Scene_Map.prototype.update = function() {
- var oldFear = $gamePlayer.fear;
- this.updateDestination();
- this.updateMainMultiply();
- if (this.isSceneChangeOk()) {
- this.updateScene();
- } else if (SceneManager.isNextScene(Scene_Battle)) {
- this.updateEncounterEffect();
- } else if($gamePlayer.fear !== oldFear){
- var x = 20;
- var y = Graphics.height / 4;
- var maxWidth = Graphics.width - x * 2;
- var text = $gamePlayer.fear;
- this._gameTitleSprite.bitmap.clear();
- this._gameTitleSprite.bitmap.drawText(text, x, y, maxWidth, 48, 'center');
- }
- this.updateWaitCount();
- Scene_Base.prototype.update.call(this);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement