Scene_Map.prototype.start = function() {
    Scene_MenuBase.prototype.start.call(this);
    SceneManager.clearStack();
    if (this._transfer) {
        this.fadeInForTransfer();
        this._mapNameWindow.open();
        this._ningjingWindow.open();
        $gameMap.autoplay();
    } else if (this.needsFadeIn()) {
        this.startFadeIn(this.fadeSpeed(), false);
    }
    this.menuCalling = false;
};
 
Scene_Map.prototype.stop = function() {
    Scene_MenuBase.prototype.stop.call(this);
    $gamePlayer.straighten();
    this._mapNameWindow.close();
    this._ningjingWindow.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.terminate = function() {
    Scene_MenuBase.prototype.terminate.call(this);
    if (!SceneManager.isNextScene(Scene_Battle)) {
        this._spriteset.update();
        this._mapNameWindow.hide();
        this._ningjingWindow.hide();
        SceneManager.snapForBackground();
    }
    $gameScreen.clearZoom();
};
Scene_Map.prototype.createDisplayObjects = function() {
    this.createSpriteset();
    this.createMapNameWindow();
    this.createNingJingWindow();
    this.createWindowLayer();
    this.createAllWindows();
};
Scene_Map.prototype.createNingJingWindow = function(){
    this._ningjingWindow = new Window_Testing(550,580,260,40);
    this.addChild(this._ningjingWindow);
};
 
Scene_Map.prototype.callMenu = function() {
    SoundManager.playOk();
    SceneManager.push(Scene_Menu);
    Window_MenuCommand.initCommandPosition();
    $gameTemp.clearDestination();
    this._ningjingWindow.hide();
    this._mapNameWindow.hide();
    this._waitCount = 2;
};
Scene_Map.prototype.launchBattle = function() {
    BattleManager.saveBgmAndBgs();
    this.stopAudioOnBattleStart();
    SoundManager.playBattleStart();
    this.startEncounterEffect();
    this._ningjingWindow.hide();
    this._mapNameWindow.hide();
};
 
function Window_Testing() {
    this.initialize.apply(this, arguments);
}
Window_Testing.prototype = Object.create(Window_Base.prototype);
Window_Testing.prototype.initialize = function(x, y, width, height) {
    Window_Base.prototype.initialize.call(this, x, y, width, height);
    this.contents.fontSize = 20;
}
 
Window_Testing.prototype.standardPadding = function() {
    return 8;
};
 
Window_Testing.prototype.update = function() {
    Window_Base.prototype.update.call(this);
 
        if ($gameVariables.value(1)==0){
                $gameVariables._data[1]=1
                $gameVariables._data[2]=1
                $gameVariables._data[3]=1
                $gameVariables._data[4]=1
        }else if($gameVariables.value(5)>=4){
                $gameVariables._data[5]-=4
                $gameVariables._data[4]+=1
        }else if($gameVariables.value(4)>=25){
                $gameVariables._data[4]-=24
                $gameVariables._data[3]+=1
        }else if($gameVariables.value(3)>=31){
                $gameVariables._data[3]-=30
                $gameVariables._data[2]+=1
        }else if($gameVariables.value(2)>=13){
                $gameVariables._data[2]-=12
                $gameVariables._data[1]+=1
        }
    var textW = 270;
    var textH = 0;
    this.contents.clear();
    this.drawText($gameVariables.value(1) + "年", -180, -6, textW, 'right');
    textH += this.lineHeight();
    this.drawText($gameVariables.value(2) + "月", -130, -6, textW, 'right');
    textH += this.lineHeight();
    this.drawText($gameVariables.value(3) + "日", -80, -6, textW, 'right');
    textH += this.lineHeight();
    this.drawText($gameVariables.value(4) + "时", -30, -6, textW, 'right');
    textH += this.lineHeight();
};