let RD_PLPosX = 0; 
let RD_PLPosY = 0; 
let RD_Flg = false; 
let RD_Stop = false; 
let RD_EvMode = 0; 
let RD_BtlWinFlg = false; 
let Em_RD_EvMode = {
    CSelect: 1, 
    Event: 2,   
    BtlWin: 3,  
    DgWin: 4,   
    DgLose: 5,    
    EnemyBrk: 10, 
    Fotonia: 11,  
    EvEnemyBrk: 97, 
    BossAft: 98,  
    BossBef: 99   
};
let RD_ClearGold = 0; 
let RD_GainGold = 0;  
let RD_GainItem = []; 
let RD_ReloadCnt = 0; 
let RD_Koudo = 0;     
let RD_NextBtl_StartDrawUp = 0; 
class RDBtlSettingClass {
    constructor() {
        this.NextBtl_MpUp = 0;   
        this.NextBtl_StartDrawUp = 0;  
        this.NextBtl_DrawUp = 0;  
        this.Btl_MpUp = 0;  
        this.Btl_DrawUp = 0;  
        this.Btl_MaxHpUp = 0;   
        this.移動カードCng枚数 = 0;    
        this.移動カード制限枚数 = 0; 
        this.移動カード制限Turn = 0; 
    }
    RDEndReset() { 
        this.NextBtl_MpUp = 0;
        this.NextBtl_StartDrawUp = 0;
        this.NextBtl_DrawUp = 0;
        this.Btl_MpUp = 0;
        this.Btl_DrawUp = 0;
        if (this.Btl_MaxHpUp != 0) RD_CngMaxHpFunc(-this.Btl_MaxHpUp);
        this.Btl_MaxHpUp = 0;
        this.移動カードCng枚数 = 0;
        this.移動カード制限枚数 = 0;
        this.移動カード制限Turn = 0;
    }
    BtlEndReset() { 
        this.NextBtl_MpUp = 0;
        this.NextBtl_StartDrawUp = 0;
        this.NextBtl_DrawUp = 0;
    }
}
let RDBtlSettingData = new RDBtlSettingClass();
RDBtlSettingData.BtlEndReset();
let RD_LoseEndFlg = false; 
let RD_Keep_NPlayer = null; 
const RdnMapId = 120; 
const VN_BossBrk = 122;   
const VN_EmBrk = 123;     
const VN_GetFotn = 124;   
const VN_ThRitu = 125;    
const VN_RdKaiso = 126;   
const VN_RDClearGold = 127; 
const VN_rdSyori = 128;   
const SW_rdTettaiFlg = 948; 
const SW_rdClear = 949; 
const SW_rdClear_Dgn = SW_rdClear + 1; 
const SW_rdNoLive2D = 1363; 
const CN_RdBefBtl = 895; 
const CN_RdStart = 900; 
const CN_RdTurnUp = 901; 
const CN_RdAftEnd = 902; 
const CN_RdDgFunc = 903; 
const IN_CheckOff = 25; 
const IN_CheckOn = 26; 
const RdnPicPath = "pictures/UI_Dungeon/"; 
let RPB_Systeminitialize = Game_System.prototype.initialize;
Game_System.prototype.initialize = function () { 
    RPB_Systeminitialize.call(this);
    this.RD_HandVar = 4;        
    this.RD_BackMapData;        
    this.RD_MoveDeckBase = [];  
    this.RD_MoveDeck = [];      
    this.RD_HandCard = [];      
    this.RD_LineX = 0;          
    this.RD_LineY = 100;        
    this.RD_Map = [];           
    this.RD_BaseData;           
    this.RD_ReloadTurn = 1;     
    this.RD_FstKoudo = 5;          
};
Game_Interpreter.prototype._RD_BGM再開 = function () {
    if ($gameSystem.RD_BaseData._Bgm != "") {
        this.PlayBgm($gameSystem.RD_BaseData._Bgm);
    }
}
Game_Interpreter.prototype.RD_TalkStart = function () {
};
Game_Interpreter.prototype.RD_TalkEnd = function () {
    RD_EvMode = -1; 
    MenuModeStr = _MMode.RdDungeon;
};
let RD_PLMove_On = function (startFlg) {
    if (RD_LoseEndFlg) return; 
    if (startFlg) RD_Stop = false; 
    RD_Mode = EnRDMode.PL_Move; 
}
Game_Interpreter.prototype.RD_撤退扱い強制終了 = function () {
    this.rd_TalkUIOpiAll_255(); 
    RD_ClearMode = RD_ClearMode.Tettai; 
    this.RD_RDEnd_Cng(); 
    RD_Stop = false;
    RD_EvMode = -1; 
    this.RD_報酬反映(); 
}
Game_Interpreter.prototype.RD_RomaTalkStart = function () {
    L2dFadeMdl("romasha_talk","rightin",15);
    L2dAutoFadeOut(MdlRomashaBattle,15);
    Live2DParamSetCmnEventStart("romasha_talk");
    L2dIdleStart("romasha_talk","wait");
}
Game_Interpreter.prototype.RD_RomaTalkEnd = function () {
    L2dFadeMdl(MdlRomashaBattle,"rightin",15,"");
    L2dIdleStart(MdlRomashaBattle,"batalle_bless");
    L2dAutoFadeOut("romasha_talk",15);
    Live2DParamSetCmnEventStart("romasha_talk");
}
