1860 lines
77 KiB
JavaScript
1860 lines
77 KiB
JavaScript
/* 目次
|
||
戦闘開始処理command301::戦闘開始処理:初期
|
||
戦闘開始カットイン処理
|
||
ステータスの描画::行動ウィンドウの描画
|
||
プレイヤースキル表示::説明ウィンドウ描画
|
||
戦闘選択モード
|
||
戦闘決戦モード::戦闘ダメージ処理
|
||
戦闘終了リザルトモード
|
||
処理用
|
||
*/
|
||
let _BtlSaveVNArr = [51 , 54];
|
||
let _BtlSaveMoveVarArr = [];
|
||
let NupuBtl_Game_System_initialize = Game_System.prototype.initialize;
|
||
Game_System.prototype.initialize = function () {
|
||
NupuBtl_Game_System_initialize.call(this);
|
||
this.PL_SkillArr = [1 , 9 , 65 , 81 , 0 , 0, 0 , 0];
|
||
};
|
||
const CN_SkillLvUp = 504;
|
||
const CN_SkillLvDown = 505;
|
||
const STN_THMode = 2;
|
||
const SKN_THSkill = 130;
|
||
const VN_THSkLv = 30;
|
||
const VN_PL戦闘開始付与ステートID = 480;
|
||
const VN_戦闘ステ倍率 = 462;
|
||
const SNo_待機Skill = 81;
|
||
class _PL_Data {
|
||
constructor() {
|
||
this.hea = $gameVariables.value(VN_PLKenko);
|
||
this.sex = $gameVariables.value(VN_PLInran);
|
||
this._hp = $gameVariables.value(VN_PLHp);
|
||
this.mhp = $gameVariables.value(VN_PLHp);
|
||
this.atk = $gameVariables.value(VN_PLAtk);
|
||
this.def = $gameVariables.value(VN_PLDef);
|
||
this._hit = $gameVariables.value(VN_PLHit);
|
||
this._avo = $gameVariables.value(VN_PLkaihi);
|
||
this._pre = $gameVariables.value(VN_PLYomi);
|
||
this._tp = 0;
|
||
this.Do_Mp = $gameVariables.value(VN_FstMp);
|
||
this.Do_MaxMp = 20;
|
||
this.Enst;
|
||
this.Do_Arr = [0,0,0,0,0,0];
|
||
this.state = [];
|
||
this.stype = -1;
|
||
this.Skill;
|
||
this.APos = new Pos2D(836, 532);
|
||
this.dbgArr = [0,0];
|
||
this.EmFlg = false;
|
||
this.UseCost = 0;
|
||
this.UseCostRpts = 0;
|
||
this.UseTp = 0;
|
||
this._回避成功 = false;
|
||
this.PsvArr = [];
|
||
for (let i = 1; i <= $dataArmors.length - 1; i++) {
|
||
if(!$gameParty.hasItem($dataArmors[i], false)) continue;
|
||
if($dataArmors[i].atypeId == _ArmorType._パッシブ) {
|
||
this.PsvArr.push(i);
|
||
}
|
||
}
|
||
let _SskId = $gameActors._data[1]._equips[4]._itemId;
|
||
if(_SskId != 0){
|
||
this.PsvArr.push(_SskId);
|
||
}
|
||
let _WpId = $gameActors._data[1]._equips[0]._itemId;
|
||
this._hp += $dataWeapons[_WpId].params[0];
|
||
this.mhp += $dataWeapons[_WpId].params[0];
|
||
this.atk += $dataWeapons[_WpId].params[2];
|
||
this.def += $dataWeapons[_WpId].params[3];
|
||
this._hit += $dataWeapons[_WpId].params[4];
|
||
this._avo += $dataWeapons[_WpId].params[6];
|
||
this._pre += $dataWeapons[_WpId].params[7];
|
||
this.Do_MaxMp = $dataWeapons[_WpId].params[1];
|
||
let _WpAmId = Number(MetaChecker($dataWeapons[_WpId] , "パッシブ追加" , ""));
|
||
if (_WpAmId != "") {
|
||
this.PsvArr.push(_WpAmId);
|
||
}
|
||
}
|
||
get b_mhp() {
|
||
return this.mhp;
|
||
}
|
||
get b_atk() {
|
||
return _State変化後取得("atk" , this.atk , this , NEnemy);
|
||
}
|
||
get b_def() {
|
||
return _State変化後取得("def" , this.def , this , NEnemy);
|
||
}
|
||
get b_hit() {
|
||
return _State変化後取得("_hit" , this._hit , this , NEnemy);
|
||
}
|
||
get b_avo() {
|
||
return _State変化後取得("_avo" , this._avo , this , NEnemy);
|
||
}
|
||
get b_pre(){
|
||
return _State変化後取得("_pre" , this._pre , this , NEnemy);
|
||
}
|
||
}
|
||
let EmSt倍率 = function () {
|
||
return $gameVariables.value(VN_戦闘ステ倍率) / 100;
|
||
}
|
||
Object.defineProperties(Game_Enemy.prototype, {
|
||
b_mhp: { get: function() {
|
||
return Math.floor(this.mhp * EmSt倍率());
|
||
}
|
||
, configurable: true
|
||
},
|
||
b_atk: { get: function() {
|
||
let _RtnVar = _State変化後取得("atk" , this.atk * EmSt倍率() , this , NPlayer);
|
||
return Math.floor(_RtnVar);
|
||
}, configurable: true
|
||
},
|
||
b_def: { get: function() {
|
||
let _RtnVar = _State変化後取得("def" , this.def * EmSt倍率() , this , NPlayer);
|
||
return Math.floor(_RtnVar);
|
||
}, configurable: true
|
||
},
|
||
b_hit: { get: function() {
|
||
let _RtnVar = _State変化後取得("_hit" , this._hit * EmSt倍率() , this , NPlayer);
|
||
return Math.floor(_RtnVar);
|
||
}, configurable: true
|
||
},
|
||
b_avo: { get: function() {
|
||
let _RtnVar = _State変化後取得("_avo" , this._avo * EmSt倍率() , this , NPlayer);
|
||
return Math.floor(_RtnVar);
|
||
}, configurable: true
|
||
},
|
||
b_pre: { get: function() {
|
||
let _RtnVar = _State変化後取得("_pre" , this._pre * EmSt倍率() , this , NPlayer);
|
||
return Math.floor(_RtnVar);
|
||
}, configurable: true
|
||
}
|
||
});
|
||
Game_Enemy.prototype.enemy = function() {
|
||
if(MetaChecker($dataEnemies[this._enemyId] , "能力変数設定" , false) != false){
|
||
$dataEnemies[this._enemyId].params[0] = $gameVariables.value(VN_敵能力変数 + 0);
|
||
$dataEnemies[this._enemyId].params[2] = $gameVariables.value(VN_敵能力変数 + 1);
|
||
$dataEnemies[this._enemyId].params[3] = $gameVariables.value(VN_敵能力変数 + 2);
|
||
}
|
||
return $dataEnemies[this._enemyId];
|
||
};
|
||
let _State変化後取得 = function(_GetStr , _CngVar , _AChara , _BChara) {
|
||
_SetState = _AChara.state;
|
||
_PsvArr = _AChara.PsvArr;
|
||
let _RtnVar = _CngVar;
|
||
_PsvArr.forEach( _AmmId => {
|
||
let _Armor = $dataArmors[_AmmId];
|
||
for (let i = 0; i <= _Armor.traits.length - 1; i++) {
|
||
if(_Armor.traits[i].code != 11) continue;
|
||
switch(_Armor.traits[i].dataId){
|
||
case _Zoku._能力変化:
|
||
_RtnVar = Math.floor(_RtnVar * _Armor.traits[i].value);
|
||
break;
|
||
case _Zoku._瀕死時能力変化:
|
||
if(NPlayer._hp / NPlayer.mhp <= 0.2){
|
||
_RtnVar = Math.floor(_RtnVar * _Armor.traits[i].value);
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
});
|
||
if(_BChara != null){
|
||
if(_BChara.PsvArr != undefined) {
|
||
_BChara.PsvArr.forEach( _AmmId => {
|
||
let _Armor = $dataArmors[_AmmId];
|
||
for (let i = 0; i <= _Armor.traits.length - 1; i++) {
|
||
if(_Armor.traits[i].code != 11) continue;
|
||
switch(_Armor.traits[i].dataId){
|
||
case _Zoku._敵直感変化:
|
||
if(_GetStr == "_pre") {
|
||
_RtnVar = Math.floor(_RtnVar * _Armor.traits[i].value);
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}
|
||
for (let i = 0; i <= _SetState.length - 1; i++) {
|
||
let _State = $dataStates[_SetState[i]._No];
|
||
for (let j = 0; j <= _State.traits.length - 1; j++) {
|
||
if(_State.traits[j].code == 11) {
|
||
switch(_GetStr){
|
||
case "mhp":
|
||
break;
|
||
case "atk":
|
||
if(_State.traits[j].dataId == _Zoku._攻撃変化Par){
|
||
_RtnVar *= _State.traits[j].value;
|
||
}
|
||
break;
|
||
case "def":
|
||
if(_State.traits[j].dataId == _Zoku._防御変化Par){
|
||
_RtnVar *= _State.traits[j].value;
|
||
}
|
||
break;
|
||
case "_hit":
|
||
if(_State.traits[j].dataId == _Zoku._命中変化Par){
|
||
_RtnVar *= _State.traits[j].value;
|
||
}
|
||
break;
|
||
case "_avo":
|
||
if(_State.traits[j].dataId == _Zoku._回避変化Par){
|
||
_RtnVar *= _State.traits[j].value;
|
||
}
|
||
break;
|
||
case "_pre":
|
||
if(_State.traits[j].dataId == _Zoku._直感変化Par){
|
||
_RtnVar *= _State.traits[j].value;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return _RtnVar;
|
||
}
|
||
let NupuBtl_Game_Battler_initMembers = Game_Battler.prototype.initMembers;
|
||
Game_Battler.prototype.initMembers = function () {
|
||
NupuBtl_Game_Battler_initMembers.call(this);
|
||
this.Name = "";
|
||
this.Img = "";
|
||
this.actions;
|
||
this._hit = 0;
|
||
this._avo = 0;
|
||
this._pre = 0;
|
||
this._tp = 0;
|
||
this.Enst;
|
||
this.state = [];
|
||
this.stype = -1;
|
||
this.Skill;
|
||
this.Do_Arr = [0,0,0,0,0,0];
|
||
this.Do_Mp = 0;
|
||
this.Do_MaxMp = 20;
|
||
this.UseCost = 0;
|
||
this.UseCostRpts = 0;
|
||
this.UseTp = 0;
|
||
this.APos = new Pos2D(527, 152);
|
||
this.dbgArr = [0, 0];
|
||
this.EmFlg = true;
|
||
this.PsvArr = [];
|
||
this._回避成功 = false;
|
||
this.Live2D_Name = "";
|
||
}
|
||
class _State {
|
||
constructor(_No, _Turn) {
|
||
_Turn = typeof _Turn !== 'undefined' ? _Turn : -1;
|
||
this._No = _No;
|
||
this._Turn = _Turn;
|
||
}
|
||
}
|
||
const PN_bBack = 1;
|
||
const PN_bKBack = PN_bBack + 3;
|
||
const PN_bWaku = 9;
|
||
const PN_bTurn = PN_bWaku + 1;
|
||
const PN_bEmTatie = 13;
|
||
const PN_bPLTatie = PN_bEmTatie + 1;
|
||
const PN_bDataBtn = PN_bPLTatie + 1;
|
||
const PN_SpeedUp = PN_bDataBtn + 1;
|
||
const PN_StEmHpGage_Back = 247;
|
||
const PN_StEmHpGage = PN_StEmHpGage_Back + 1;
|
||
const PN_StEmWin = PN_StEmHpGage + 1;
|
||
const PN_StEmHpTxt = PN_StEmWin + 1;
|
||
const PN_bDoPoint = 207;
|
||
const PN_bDoPoint_Em = PN_bDoPoint + 20;
|
||
const PN_bEmBltWin = 158;
|
||
const Cnt_PN_bEmBltWin = 3;
|
||
const PN_bEmBltCost = PN_bEmBltWin + 6;
|
||
const PN_bEmBltTxt = PN_bEmBltCost + 6;
|
||
const PN_bEmBltHide = PN_bEmBltTxt + 6;
|
||
const PN_bPLBltWin = 177;
|
||
const Cnt_PN_bPLBltWin = 5;
|
||
const PN_BtlTHBlt = 255;
|
||
const PN_bKtdnBtn = PN_BtlTHBlt + 1;
|
||
const PN_bPLBltHikari = PN_bKtdnBtn + 1;
|
||
const PN_StGageBase = PN_bPLBltHikari + 2;
|
||
const PN_StHpGage = PN_StGageBase + 1;
|
||
const PN_StTpGage = PN_StHpGage + 1;
|
||
const PN_StSelTpGage = PN_StTpGage + 1;
|
||
const PN_StWin = PN_StSelTpGage + 1;
|
||
const PN_StHpTxt = PN_StWin + 1;
|
||
const PN_StTpTxt = PN_StHpTxt + 2;
|
||
const PN_StWinTop = PN_StTpTxt + 1;
|
||
const PN_BtlSrinder = PN_StWinTop + 2;
|
||
const PN_BtlSelUI = PN_BtlSrinder + 1 + (Cnt_PN_bPLBltWin * 3);
|
||
const PN_SetuWin = 309;
|
||
const PN_SetuTxt = PN_SetuWin + 1;
|
||
const PN_SetuHitTxt = PN_SetuTxt + 3;
|
||
const PN_TPPowUp = PN_SetuHitTxt + 2;
|
||
const PN_bDmgPop = 320;
|
||
const PN_bTHBack = 330;
|
||
const PN_bTHChara = PN_bTHBack + 1;
|
||
const PN_bFz = PN_bTHChara + 2;
|
||
const PN_bCmbTxt = PN_bFz + 2;
|
||
const PN_bPlState = PN_bCmbTxt + 3;
|
||
const PN_bPlStateTn = PN_bPlState + 7;
|
||
const PN_bEmState = PN_bPlStateTn + 7;
|
||
const PN_bEmStateTn = PN_bEmState + 7;
|
||
const PN_bIjoWin = PN_bEmStateTn + 8;
|
||
const PN_bIjoTxt = PN_bIjoWin + 1;
|
||
const PN_bsBack = 412;
|
||
const PN_bsV = PN_bsBack + 1;
|
||
const PN_bsS = PN_bsV + 1;
|
||
const PN_bsPlStTxt = PN_bsS + 1;
|
||
const PN_bsEmStTxt = PN_bsPlStTxt + 1;
|
||
const PN_bsCIn_B = PN_bsEmStTxt + 1;
|
||
const PN_bsCIn_T = PN_bsCIn_B + 3;
|
||
const PN_bsState = PN_bsCIn_T + 3;
|
||
const PN_bsCIn_BBar = PN_bsState + 1;
|
||
const PN_bsCIn_TBar = PN_bsCIn_BBar + 6;
|
||
const PN_bsCIn_BTxt = PN_bsCIn_TBar + 6;
|
||
const PN_bsCIn_TTxt = PN_bsCIn_BTxt + 6;
|
||
const PN_bRzBase = 411;
|
||
const PN_bRzChara = PN_bRzBase + 1;
|
||
const PN_bRzTxt_1 = PN_bRzChara + 1;
|
||
const PN_bRzTxt_2 = PN_bRzTxt_1 + 2;
|
||
const PN_bRzTxt_3 = PN_bRzTxt_2 + 2;
|
||
const PN_bRzTxt_4 = PN_bRzTxt_3 + 2;
|
||
const PN_bRzTxt_5 = PN_bRzTxt_4 + 2;
|
||
const PN_bRzRank = PN_bRzTxt_5 + 2;
|
||
const PN_RzExBack = 426;
|
||
const PN_RzExWin = PN_RzExBack + 1;
|
||
const PN_RzExYesBtn = PN_RzExWin + 1;
|
||
const PN_RzExNoBtn = PN_RzExYesBtn + 1;
|
||
const PN_RzExGoldTxt = PN_RzExNoBtn + 1;
|
||
const PN_RzExHpBar = PN_RzExGoldTxt + 1;
|
||
const PN_RzExHpTxt = PN_RzExHpBar + 1;
|
||
const PN_RzExSelecter = PN_RzExHpTxt + 1;
|
||
const PN_RzExBtlWin = PN_RzExSelecter + 1;
|
||
const PN_RzExBtlDice = PN_RzExBtlWin + 1;
|
||
const PN_RzExBtlDiceTxt = PN_RzExBtlDice + 4;
|
||
const PN_RzExBtlArw = PN_RzExBtlDiceTxt + 4;
|
||
const PN_RzExBtlLine = PN_RzExBtlArw + 4;
|
||
const PN_RzExBtlChaTxt = PN_RzExBtlLine + 4;
|
||
const PN_RzRensyoTxt = PN_RzExBtlChaTxt + 4;
|
||
const PN_JBase = 370;
|
||
const PN_jPLStart = PN_JBase + 1;
|
||
const PN_jEmStart = 410;
|
||
const PN_JEnd = 451;
|
||
const PN_bDataBtn_Close = PN_JEnd - 1;
|
||
const PN_jCutIn = 0;
|
||
const PN_jCNameTxt = PN_jCutIn + 1;
|
||
const PN_jStBar = PN_jCNameTxt + 1;
|
||
const PN_jStBarTop = PN_jStBar + 6;
|
||
const PN_jStTxt = PN_jStBarTop + 6;
|
||
const PN_jStBase = PN_jStTxt + 6;
|
||
const PN_jStateTxtA = PN_jStBase + 1;
|
||
const PN_jStateTxtB = PN_jStateTxtA + 7;
|
||
const PN_jPsvTxt = PN_jStateTxtB + 7;
|
||
const CN_BtlBef = 1;
|
||
const CN_毎ターンコモン = 139;
|
||
const CN_カットイン後 = 140;
|
||
const CN_倒した瞬間 = 141;
|
||
const CN_自分敗北時 = 142;
|
||
const CN_全行動終了時コモン = 147;
|
||
const CN_リザルト表示後 = 148;
|
||
const SW_野試合Flg = 10;
|
||
const SW_BtlCIn = 21;
|
||
const VN_FstMp = 11;
|
||
const VN_CInChaTNo = 21;
|
||
const VN_CInChaBNo = 22;
|
||
const VN_野試合勝利数 = 51;
|
||
const VN_敵強さ変化 = 55;
|
||
const VN_野試合賞金 = 56;
|
||
const VN_敵能力変数 = 322;
|
||
const PN_Ready = 470;
|
||
const _Blt拡大 = 85;
|
||
const _BltTxt拡大率 = _Blt拡大 / 100;
|
||
let _befBtlMap = -1;
|
||
const BattleMapID = 4;
|
||
const ReBattleMapID = 12;
|
||
const BtlPic = "pictures/Btl/";
|
||
const BtlKsnPic = "pictures/Btl/ksn/";
|
||
const Btl_CInPic = "pictures/Btl/Start/";
|
||
const BtlTatie_Pl = "pictures/Btl/Tatie_Pl/";
|
||
const BtlTatie_Em = "enemies/";
|
||
const BtlPicArr = [
|
||
"pictures/White", BtlPic + "PN_bFz_Sel"
|
||
];
|
||
const BtlL2D_Base = "";
|
||
let 戦闘ターン = 0;
|
||
let Rz_合計被ダメージ = 0;
|
||
let Rz_最大与ダメージ = 0;
|
||
let Rz_最大チェイン数 = 0;
|
||
let battleflg = false;
|
||
let btl_flame = 0;
|
||
let WinLoseFlg = -1;
|
||
let btlMode;
|
||
let _btlMode = {
|
||
Start: 1,
|
||
Select: 2,
|
||
Battle: 3,
|
||
End: 4
|
||
};
|
||
let NPlayer;
|
||
let NEnemy;
|
||
let TH_ModeFlg = false;
|
||
const SW_THMode = 8;
|
||
let Battleback1 = "";
|
||
let Battleback2 = "";
|
||
let set_branch = -1;
|
||
let _BtlBranch = {
|
||
Btl: -1,
|
||
Win: 0,
|
||
Esc: 1,
|
||
Lose: 2
|
||
};
|
||
let BtlTurn = 0;
|
||
let NoBtlCnt = 0;
|
||
Game_Interpreter.prototype.command301 = function () {
|
||
this.DelPict(PN_EnSpine);
|
||
_BtlVar_Resets();
|
||
if (!battleflg) {
|
||
if(!$gameSwitches.value(SW_野試合Flg)){
|
||
this.InstantSave();
|
||
} else {
|
||
if (NoBtlCnt == 0){
|
||
this.InstantSave();
|
||
NoBtlCnt++;
|
||
}
|
||
set_branch = -1;
|
||
let _Set健康 = Math.floor((NPlayer._hp / NPlayer.b_mhp) * 100);
|
||
$gameVariables.setValue(VN_PLKenko ,_Set健康);
|
||
_Btl_StopCmnFlg = false;
|
||
}
|
||
this.Talk_End();
|
||
Rz_合計被ダメージ = 0;
|
||
Rz_最大与ダメージ = 0;
|
||
Rz_最大チェイン数 = 0;
|
||
L2dAllFadeOut(10);
|
||
Adv_Stop = true;
|
||
Chain_Cnt = 0;
|
||
$gameTroop.setup(this._params[1]);
|
||
NEnemy = $gameTroop._enemies[0];
|
||
NEnemy.Name = $dataEnemies[NEnemy._enemyId].name;
|
||
NEnemy.Live2D_Name = MetaChecker($dataEnemies[NEnemy._enemyId] , "Live2D" , "");
|
||
NEnemy.Do_MaxMp = NEnemy.mmp;
|
||
NEnemy.Img = $dataEnemies[NEnemy._enemyId].battlerName;
|
||
NEnemy._hit = NEnemy.mdf;
|
||
NEnemy._avo = NEnemy.luk;
|
||
NEnemy._pre = NEnemy.agi;
|
||
NEnemy.actions = $dataEnemies[NEnemy._enemyId].actions;
|
||
_Brns_ブレイク数 = 0;
|
||
_Brns_ブレイクFlg = false;
|
||
NEnemy.Brns_基礎値 = Number(MetaChecker($dataEnemies[NEnemy._enemyId] , "バランス基礎値" , 6));
|
||
NEnemy.Brns = NEnemy.Brns_基礎値;
|
||
NEnemy.Brns_崩れ数 = Number(MetaChecker($dataEnemies[NEnemy._enemyId] , "バランス崩れ数" , 6));
|
||
if(MetaChecker($dataEnemies[NEnemy._enemyId] , "能力変数設定" , false) != false){
|
||
NEnemy.mhp = $gameVariables.value(VN_敵能力変数 + 0);
|
||
NEnemy._hp = $gameVariables.value(VN_敵能力変数 + 0);
|
||
NEnemy.atk = $gameVariables.value(VN_敵能力変数 + 1);
|
||
NEnemy.def = $gameVariables.value(VN_敵能力変数 + 2);
|
||
NEnemy._hit = $gameVariables.value(VN_敵能力変数 + 3);
|
||
NEnemy._avo = $gameVariables.value(VN_敵能力変数 + 4);
|
||
NEnemy._pre = $gameVariables.value(VN_敵能力変数 + 5);
|
||
NEnemy.Do_MaxMp = $gameVariables.value(VN_敵能力変数 + 6);
|
||
NEnemy.Brns_基礎値 = $gameVariables.value(VN_敵能力変数 + 7);
|
||
NEnemy.Brns = NEnemy.Brns_基礎値;
|
||
NEnemy.Brns_崩れ数 = $gameVariables.value(VN_敵能力変数 + 8);
|
||
}
|
||
NEnemy.PsvArr = [];
|
||
for (let i = 0; i <= $dataEnemies[NEnemy._enemyId].dropItems.length - 1; i++) {
|
||
if($dataEnemies[NEnemy._enemyId].dropItems[i].kind == 3) {
|
||
let _AmId = $dataEnemies[NEnemy._enemyId].dropItems[i].dataId;
|
||
if($dataArmors[_AmId].atypeId == _ArmorType._パッシブ ||
|
||
$dataArmors[_AmId].atypeId == _ArmorType._装飾) {
|
||
NEnemy.PsvArr.push(_AmId);
|
||
}
|
||
}
|
||
}
|
||
NEnemy.Do_Mp = NEnemy._mp;
|
||
WinLoseFlg = _BtlBranch.Btl;
|
||
BtlTurn = 1;
|
||
NPlayer = new _PL_Data();
|
||
this.BtlStart_Psv(NPlayer);
|
||
this.BtlStart_Psv(NEnemy);
|
||
if(!$gameSwitches.value(SW_野試合Flg)){
|
||
$gamePlayer.reserveTransfer(BattleMapID, 0, 0, 0, 2);
|
||
_befBtlMap = BattleMapID;
|
||
} else {
|
||
if(_befBtlMap == BattleMapID){
|
||
$gamePlayer.reserveTransfer(ReBattleMapID, 0, 0, 0, 2);
|
||
_befBtlMap = ReBattleMapID;
|
||
} else {
|
||
$gamePlayer.reserveTransfer(BattleMapID, 0, 0, 0, 2);
|
||
_befBtlMap = BattleMapID;
|
||
}
|
||
}
|
||
this._index = this._list.length;
|
||
this._list = null;
|
||
this.PreLoadArr(BtlPicArr);
|
||
this.N_BtlStart();
|
||
DoArr_Reset();
|
||
if ($gameVariables.value(VN_PL戦闘開始付与ステートID) != 0) {
|
||
this.State_Setting(NPlayer , $gameVariables.value(VN_PL戦闘開始付与ステートID) , 1 , false);
|
||
}
|
||
battleflg = true;
|
||
} else {
|
||
battleflg = false;
|
||
this._branch[this._indent] = set_branch;
|
||
set_branch = -1;
|
||
let _Set健康 = Math.floor((NPlayer._hp / NPlayer.b_mhp) * 100);
|
||
$gameVariables.setValue(VN_PLKenko ,_Set健康);
|
||
this.MovePict(PN_tGage , true, true, 10 , true , _Set健康);
|
||
this.DelPict(PN_EventBar);
|
||
this.DelPict(PN_EventTxt);
|
||
for (let i = 0; i <= _BtlSaveVNArr.length - 1; i++) {
|
||
$gameVariables.setValue(_BtlSaveVNArr[i] ,_BtlSaveMoveVarArr[i]);
|
||
}
|
||
}
|
||
return true;
|
||
};
|
||
let Other_Voice_OffFlg = false;
|
||
let _NVoice_Skip_Game = NVoice_isSkipFlg;
|
||
NVoice_isSkipFlg = function () {
|
||
return _NVoice_Skip_Game.call(this) && !battleflg && !Other_Voice_OffFlg;
|
||
}
|
||
let _BtlVar_Resets = function(){
|
||
戦闘ターン = 0;
|
||
Rz_合計被ダメージ = 0;
|
||
Rz_最大与ダメージ = 0;
|
||
Rz_最大チェイン数 = 0;
|
||
btl_flame = 0;
|
||
WinLoseFlg = -1;
|
||
_BefBackLogX = 0
|
||
_BefBackLogY = 0
|
||
btlStart_flame = 0;
|
||
KtdnPos = new Pos2D(944, 734);
|
||
PLTPos = new Pos2D(1180, 480);
|
||
PLStPos = new Pos2D(1150, 647);
|
||
DoPos_Pl = new Pos2D(450, 410);
|
||
DoTHPos = new Pos2D(DoPos_Pl._x , 700);
|
||
DoPos_Em = new Pos2D(DoPos_Pl._x - 410 * _BltTxt拡大率 - 20, DoPos_Pl._y);
|
||
DoPosB_PL = new Pos2D(379, DoPos_Pl._y + 48);
|
||
DoPosB_Em = new Pos2D(303, DoPos_Pl._y + 48);
|
||
SelectDoNo = 0;
|
||
Em_DoViewArr = [true, true, true, true, true, true];
|
||
DoHPos = new Pos2D(DoPos_Pl._x - 9, DoPos_Pl._y - 8);
|
||
BltPicArr = [];
|
||
_PL_DoArrDraw = false;
|
||
_PL_SelWillMp = 0;
|
||
_異常PlPicArr = [];
|
||
_異常EmPicArr = [];
|
||
SkillSelNo = 0;
|
||
SelectSkillArr = [];
|
||
SklPos = new Pos2D(645, DoPos_Pl._y - 55);
|
||
btlSelect_flame = 0;
|
||
_EnterFlame = 0;
|
||
btlSelect_PlTp = 0 ;
|
||
btlSelect_TpUse = [0,0,0,0,0,0];
|
||
Em_Skills = [];
|
||
_thFlame = 0; _ThFInFlm = 60
|
||
_ktdnBOverFlg = false;
|
||
_SelNoSave = 0;
|
||
_bwhlflame = 10;
|
||
_BSelMode = 0;
|
||
_Nowシリンダー角度 = 0;
|
||
_BSel_メニューFlg = false;
|
||
_BSel_ReadyFlg = false;
|
||
btlSelect_初期処理Flg = true;
|
||
BSelMenu_flame = 0;
|
||
N_Btl_Select_1_flame = 0;
|
||
_シリンダー角度 = 0;
|
||
BltSel_flame = 0;
|
||
_BtlNxt_flame = 0;
|
||
_Bef_PLDoNo = 0;
|
||
_Bef_PLDoTpCnt = 0;
|
||
_Blt_SelWaitFlame = 0;
|
||
_Btl_ReadyFlame = 0;
|
||
_EnterCnt = 0;
|
||
Em_DoViewArr_OpenBef = [];
|
||
btlBattle_flame = 0;
|
||
KsnTurn = 0;
|
||
_ksnMflame = 0;
|
||
_PlPosX = 0;
|
||
_EmPosX = 360;
|
||
_BltPlPosX = 500;
|
||
_BltEmPosX = 600;
|
||
_BtlUpSyoriNo = 0;
|
||
_Btl_StopCmnFlg = false;
|
||
_Btl_連続攻撃Cnt = 0;
|
||
_GoPlBltPs = new Pos2D(0,0);
|
||
_GoEmBltPs = new Pos2D(0,0);
|
||
Player_SkillNo = 0;
|
||
Enemy_SkillNo = 0;
|
||
PLAllMissFlg = false;
|
||
EnAllMissFlg = false;
|
||
Turn_DmgCnt = 0;
|
||
PL_SkillFlg = false;
|
||
}
|
||
Game_Interpreter.prototype.BtlStart_Psv = function (_AChara) {
|
||
_AChara.PsvArr.forEach( _AmmId => {
|
||
let _Armor = $dataArmors[_AmmId];
|
||
for (let i = 0; i <= _Armor.traits.length - 1; i++) {
|
||
if(_Armor.traits[i].code != 11) continue;
|
||
let _Var = Math.floor(_Armor.traits[i].value * 100) - 100;
|
||
switch(_Armor.traits[i].dataId){
|
||
case _Zoku._初期テンション変化:
|
||
_AChara._tp += _Var;
|
||
break;
|
||
}
|
||
}
|
||
});
|
||
}
|
||
Game_Interpreter.prototype.BtlPsv_ZokuCk = function (_AChara , _ZokuNo) {
|
||
let _RtnValue = false;
|
||
_AChara.PsvArr.forEach( _AmmId => {
|
||
let _Armor = $dataArmors[_AmmId];
|
||
for (let i = 0; i <= _Armor.traits.length - 1; i++) {
|
||
if(_Armor.traits[i].code != 11) continue;
|
||
if(_Armor.traits[i].dataId == _ZokuNo) {
|
||
_RtnValue = true;
|
||
}
|
||
}
|
||
});
|
||
return _RtnValue;
|
||
}
|
||
Game_Interpreter.prototype.command283 = function () {
|
||
$gameMap.changeBattleback(this._params[0], this._params[1]);
|
||
Battleback1 = this._params[0];
|
||
Battleback2 = this._params[1];
|
||
return true;
|
||
};
|
||
let _BefBackLogX = 0
|
||
let _BefBackLogY = 0
|
||
Game_Interpreter.prototype.N_BtlStart = function (){
|
||
_BefBackLogX = BLogX;
|
||
_BefBackLogY = BLogY;
|
||
BLogX = 508;
|
||
BLogY = 7;
|
||
//$gameSystem.PL_SkillArr.push(25); //THスキル
|
||
set_branch = _BtlBranch.Win;
|
||
this.SetCmnEventSc(CN_BtlBef);
|
||
btlMode = _btlMode.Start;
|
||
btl_flame = 0;
|
||
btlBattle_flame = 0;
|
||
btlStart_flame = 0;
|
||
_BSelMode = 0;
|
||
btlSelect_初期処理Flg = true;
|
||
戦闘ターン = 0;
|
||
}
|
||
let btlStart_flame = 0;
|
||
let KtdnPos = new Pos2D(944, 734);
|
||
let PLTPos = new Pos2D(1180, 480);
|
||
Game_Interpreter.prototype.N_Btl_StartUpdate = function () {
|
||
if ($gameSwitches.value(SW_BtlCIn)){
|
||
this.N_Btl_Start_CutInUpdate();
|
||
} else {
|
||
if (btlStart_flame == 30){
|
||
if($gameSystem._battleBgm != null){
|
||
AudioManager.playBgm($gameSystem._battleBgm);
|
||
}
|
||
}
|
||
if (btlStart_flame == 45) {
|
||
if (Battleback1 != "") {
|
||
this.SetSpriteC(PN_bBack, "battlebacks1/" + Battleback1, 720, 405);
|
||
}
|
||
if (Battleback2 != "") {
|
||
this.SetSpriteC(PN_bBack + 1, "battlebacks2/" + Battleback2, 720, 405);
|
||
}
|
||
this.N_Btl_TatieView();
|
||
}
|
||
if (btlStart_flame == 60) this.BattleWhiteDel();
|
||
if (btlStart_flame == 61) {
|
||
this.N_Btl_SelectCng();
|
||
}
|
||
}
|
||
btlStart_flame++;
|
||
btlBackFlame = 0;
|
||
}
|
||
let btlBackFlame = 0;
|
||
Game_Interpreter.prototype.BtlBackUpdate = function () {
|
||
btlBackFlame++;
|
||
let sinValue = Math.sin(btlBackFlame * Math.PI / 180);
|
||
let normalizedValue = (sinValue + 1) / 2;
|
||
var _拡大Mv = 1 + 0.1 * normalizedValue;
|
||
_拡大Mv *= 100;
|
||
if (Battleback1 != "")
|
||
this.SetSpriteC(PN_bBack, "battlebacks1/" + Battleback1, 720, 405 , 255 , _拡大Mv , _拡大Mv);
|
||
if (Battleback2 != "")
|
||
this.SetSpriteC(PN_bBack + 1, "battlebacks2/" + Battleback2, 720, 405 , 255 , _拡大Mv , _拡大Mv);
|
||
var moveX = btlBackFlame * 20 % 1440;
|
||
this.SetSprite(PN_bBack + 2, BtlPic + "PN_Sosasen", -moveX, 0 , 200);
|
||
this.SetSprite(PN_bBack + 3, BtlPic + "PN_Sosasen", -moveX + 1440, 0 , 200);
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_Start_CutInUpdate = function () {
|
||
if (btlStart_flame == 0) {
|
||
AudioManager.stopAll();
|
||
}
|
||
if (btlStart_flame == 45) {
|
||
D_Text_Cng_font = "Makinas";
|
||
this.SpriteStr(PN_bsCIn_BTxt + 0, "FontSetUp", 20, -100, -100, 0);
|
||
D_Text_Cng_font = "";
|
||
if (Battleback1 != "") {
|
||
this.SetSprite(PN_bBack, "battlebacks1/" + Battleback1, 0, 0);
|
||
}
|
||
if (Battleback2 != "") {
|
||
this.SetSprite(PN_bBack + 1, "battlebacks2/" + Battleback2, 0, 0);
|
||
}
|
||
this.N_Btl_TatieView();
|
||
this.SetSprite(PN_bsBack, Btl_CInPic + "PN_bsBack", 0, 0);
|
||
this.SetSpriteC(PN_bsV, Btl_CInPic + "PN_bsV", 633, 359, 255, 111, 111);
|
||
this.MoveSprite(PN_bsV,true,true,60);
|
||
this.SetSpriteC(PN_bsS, Btl_CInPic + "PN_bsS", 746, 455, 255, 111, 111);
|
||
this.MoveSprite(PN_bsS, true, true, 60);
|
||
}
|
||
if (btlStart_flame == 60){
|
||
this.BattleWhiteDel();
|
||
this.ALLDelPict([PN_Ensyutu]);
|
||
this.SetSprite(PN_bWaku, BtlPic + "PN_bWaku", 0, 0);
|
||
}
|
||
if (btlStart_flame == 90){
|
||
this.PlaySe("Ice4");
|
||
EasingStr = "easeOutQuad";
|
||
this.MoveSprite(PN_bsV, 196, true, 20);
|
||
this.MoveSprite(PN_bsS, 1249, true, 20);
|
||
this.SetSprite(PN_bsPlStTxt, Btl_CInPic + "PN_bsPlStTxt" , 0 , 0 , 0);
|
||
this.MoveSprite(PN_bsPlStTxt,true,true,20);
|
||
this.SetSprite(PN_bsEmStTxt , Btl_CInPic + "PN_bsEmStTxt" , 0 , 0 , 0);
|
||
this.MoveSprite(PN_bsEmStTxt,true,true,20);
|
||
ViewSpriteArr_Reset();
|
||
let _TCNo = $gameVariables.value(VN_CInChaTNo);
|
||
this.SetSprite(PN_bsCIn_B + 0, Btl_CInPic + "PN_bsCBack_T", 0, 0, 0);
|
||
this.SetSprite(PN_bsCIn_B + 1, Btl_CInPic + "PN_bsCBack_T_C" + _TCNo, 0, 0, 0);
|
||
this.SetSprite(PN_bsCIn_B + 2, Btl_CInPic + "PN_bsCBack_T_N" + _TCNo, 0, 0, 0);
|
||
let _BCNo = $gameVariables.value(VN_CInChaBNo);
|
||
this.SetSprite(PN_bsCIn_T + 0, Btl_CInPic + "PN_bsCBack_B", 0, 581, 0);
|
||
this.SetSprite(PN_bsCIn_T + 1, Btl_CInPic + "PN_bsCBack_B_C" + _BCNo, 0, 581, 0);
|
||
this.SetSprite(PN_bsCIn_T + 2, Btl_CInPic + "PN_bsCBack_B_N" + _BCNo, 0, 581, 0);
|
||
var maxValue = 0;
|
||
if (NPlayer.b_mhp > maxValue) maxValue = NPlayer.b_mhp
|
||
if (NPlayer.b_atk > maxValue) maxValue = NPlayer.b_atk
|
||
if (NPlayer.b_def > maxValue) maxValue = NPlayer.b_def
|
||
if (NPlayer.b_hit > maxValue) maxValue = NPlayer.b_hit
|
||
if (NPlayer.b_avo > maxValue) maxValue = NPlayer.b_avo
|
||
if (NPlayer.b_pre > maxValue) maxValue = NPlayer.b_pre
|
||
if (NEnemy.b_mhp > maxValue) maxValue = NEnemy.b_mhp
|
||
if (NEnemy.b_atk > maxValue) maxValue = NEnemy.b_atk
|
||
if (NEnemy.b_def > maxValue) maxValue = NEnemy.b_def
|
||
if (NEnemy.b_hit > maxValue) maxValue = NEnemy.b_hit
|
||
if (NEnemy.b_avo > maxValue) maxValue = NEnemy.b_avo
|
||
if (NEnemy.b_pre > maxValue) maxValue = NEnemy.b_pre
|
||
let f表示倍率X = 1;
|
||
if (maxValue > 145) f表示倍率X = 145 / maxValue;
|
||
this.SetSprite(PN_bsCIn_BBar + 0, Btl_CInPic + "PN_bsBar_hp", 775, 270 + (53 * 0), 0, NPlayer.b_mhp * f表示倍率X);
|
||
this.SetSprite(PN_bsCIn_BBar + 1, Btl_CInPic + "PN_bsBar_hp", 775, 270 + (53 * 1), 0, NPlayer.b_atk * f表示倍率X);
|
||
this.SetSprite(PN_bsCIn_BBar + 2, Btl_CInPic + "PN_bsBar_hp", 775, 270 + (53 * 2), 0, NPlayer.b_def * f表示倍率X);
|
||
this.SetSprite(PN_bsCIn_BBar + 3, Btl_CInPic + "PN_bsBar_hp", 775, 270 + (53 * 3), 0, NPlayer.b_hit * f表示倍率X);
|
||
this.SetSprite(PN_bsCIn_BBar + 4, Btl_CInPic + "PN_bsBar_hp", 775, 270 + (53 * 4), 0, NPlayer.b_avo * f表示倍率X);
|
||
this.SetSprite(PN_bsCIn_BBar + 5, Btl_CInPic + "PN_bsBar_hp", 775, 270 + (53 * 5), 0, NPlayer.b_pre * f表示倍率X);
|
||
let _OwStr = "\\oc[rgba(0,0,0)]";
|
||
let _txtY = 250;
|
||
let _tSize = 30;
|
||
let _pPsX = 777;
|
||
this.SpriteStr(PN_bsCIn_BTxt + 0, _OwStr + NPlayer.b_mhp, _tSize, _pPsX, _txtY + (53 * 0), 0);
|
||
this.SpriteStr(PN_bsCIn_BTxt + 1, _OwStr + NPlayer.b_atk, _tSize, _pPsX, _txtY + (53 * 1), 0);
|
||
this.SpriteStr(PN_bsCIn_BTxt + 2, _OwStr + NPlayer.b_def, _tSize, _pPsX, _txtY + (53 * 2), 0);
|
||
this.SpriteStr(PN_bsCIn_BTxt + 3, _OwStr + NPlayer.b_hit, _tSize, _pPsX, _txtY + (53 * 3), 0);
|
||
this.SpriteStr(PN_bsCIn_BTxt + 4, _OwStr + NPlayer.b_avo, _tSize, _pPsX, _txtY + (53 * 4), 0);
|
||
this.SpriteStr(PN_bsCIn_BTxt + 5, _OwStr + NPlayer.b_pre, _tSize, _pPsX, _txtY + (53 * 5), 0);
|
||
NEnemy._hp = NEnemy.b_mhp;
|
||
this.SetSprite(PN_bsCIn_TBar + 0, Btl_CInPic + "PN_bsBar_hp",
|
||
667, 270 + (53 * 0), 0, -NEnemy.b_mhp * f表示倍率X);
|
||
this.SetSprite(PN_bsCIn_TBar + 1, Btl_CInPic + "PN_bsBar_hp",
|
||
667, 270 + (53 * 1), 0, -NEnemy.b_atk * f表示倍率X);
|
||
this.SetSprite(PN_bsCIn_TBar + 2, Btl_CInPic + "PN_bsBar_hp",
|
||
667, 270 + (53 * 2), 0, -NEnemy.b_def * f表示倍率X);
|
||
this.SetSprite(PN_bsCIn_TBar + 3, Btl_CInPic + "PN_bsBar_hp",
|
||
667, 270 + (53 * 3), 0, -NEnemy.b_hit * f表示倍率X);
|
||
this.SetSprite(PN_bsCIn_TBar + 4, Btl_CInPic + "PN_bsBar_hp",
|
||
667, 270 + (53 * 4), 0, -NEnemy.b_avo * f表示倍率X);
|
||
this.SetSprite(PN_bsCIn_TBar + 5, Btl_CInPic + "PN_bsBar_hp",
|
||
667, 270 + (53 * 5), 0, -NEnemy.b_pre * f表示倍率X);
|
||
let _ePsX = 617;
|
||
this.SpriteStr(PN_bsCIn_TTxt + 0, _OwStr + _桁揃え(NEnemy.b_mhp), _tSize, _ePsX, _txtY + (53 * 0), 0);
|
||
this.SpriteStr(PN_bsCIn_TTxt + 1, _OwStr + _桁揃え(NEnemy.b_atk), _tSize, _ePsX, _txtY + (53 * 1), 0);
|
||
this.SpriteStr(PN_bsCIn_TTxt + 2, _OwStr + _桁揃え(NEnemy.b_def), _tSize, _ePsX, _txtY + (53 * 2), 0);
|
||
this.SpriteStr(PN_bsCIn_TTxt + 3, _OwStr + _桁揃え(NEnemy.b_hit), _tSize, _ePsX, _txtY + (53 * 3), 0);
|
||
this.SpriteStr(PN_bsCIn_TTxt + 4, _OwStr + _桁揃え(NEnemy.b_avo), _tSize, _ePsX, _txtY + (53 * 4), 0);
|
||
this.SpriteStr(PN_bsCIn_TTxt + 5, _OwStr + _桁揃え(NEnemy.b_pre), _tSize, _ePsX, _txtY + (53 * 5), 0);
|
||
this.SetSprite(PN_bsState, Btl_CInPic + "PN_bsState", 0, 0, 0);
|
||
for (let i = 0; i <= ViewSpriteArr.length - 1; i++) {
|
||
this.MoveSprite(ViewSpriteArr[i], true, true, 15, 255 , true);
|
||
}
|
||
EasingStr = "";
|
||
}
|
||
if (btlStart_flame > 120) {
|
||
if (TouchInput.isPressed() || Input.isTriggered('ok')) {
|
||
NPlayer._hp = Math.floor(NPlayer.b_mhp * ($gameVariables.value(VN_PLKenko) / 100)) ;
|
||
this.PlaySe("Battle2");
|
||
for (let i = PN_bsBack; i <= PN_bsCIn_TTxt + 5; i++) {
|
||
this.MoveSprite(i, true, true, 10, 0,true , true);
|
||
}
|
||
AudioManager.playBgm($gameSystem._battleBgm);
|
||
this.N_Btl_SelectCng();
|
||
}
|
||
}
|
||
}
|
||
let _桁揃え = function(_DNo){
|
||
if (_DNo < 100) return _DNo = " " + _DNo;
|
||
if (_DNo < 10) return _DNo = " " + _DNo;
|
||
return _DNo;
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_TatieView = function () {
|
||
if (TH_ModeFlg){
|
||
L2dFadeMdl("Leona_battle1","rightout",15,"",1,1,0,0);
|
||
L2dFadeMdl("Leona_battleTH","rightin",15,"1neutral",1,1,0,130);
|
||
L2dIdleStart("Leona_battleTH","1neutral");
|
||
L2dSetMotion("Leona_battleTH","1neutral");
|
||
L2dTop("Leona_battleTH");
|
||
} else {
|
||
//this.SetSpriteC(PN_bPLTatie, BtlTatie_Pl + "Btl_PL", PLTPos._x, PLTPos._y);
|
||
this.N_Btl_ReonaL2D_Nomal_On();
|
||
}
|
||
if(NEnemy.Live2D_Name != ""){
|
||
L2dFExp = "exp_1";
|
||
L2dFadeMdl(NEnemy.Live2D_Name,"centerin",15,"wait",1);
|
||
if(NEnemy.DO_Arr[0] == -1) {
|
||
L2dIdleStart(NEnemy.Live2D_Name,"break");
|
||
L2dSetMotion(NEnemy.Live2D_Name,"break");
|
||
} else {
|
||
L2dIdleStart(NEnemy.Live2D_Name,"wait");
|
||
L2dSetMotion(NEnemy.Live2D_Name,"wait");
|
||
}
|
||
} else {
|
||
this.SetSpriteC(PN_bEmTatie, BtlTatie_Em + NEnemy.Img, 300, 202);
|
||
if(NEnemy.DO_Arr[0] == -1) {
|
||
this.CngSprite(PN_bEmTatie , BtlTatie_Em + NEnemy.Img + "_break");
|
||
} else {
|
||
this._ブレイクモード終了確認();
|
||
}
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_ReonaL2D_Nomal_On = function () {
|
||
L2dFadeMdl("Leona_battleTH","rightout",15,"",1,1,0,0);
|
||
L2dFadeMdl("Leona_battle1","rightin" , 15 , "" , 1 , null , 0 , 130);
|
||
L2dIdleStart("Leona_battle1","4_slow_wide");
|
||
L2dSetMotion("Leona_battle1","4_slow_wide");
|
||
L2dTop("Leona_battle1");
|
||
}
|
||
Game_Interpreter.prototype._ブレイクモード終了確認 = function(){
|
||
if(NEnemy.Brns <= 0){
|
||
NEnemy.Brns = NEnemy.Brns_基礎値;
|
||
_Brns_ブレイクFlg = false;
|
||
this.BLogAdd(120 , SCol.Yel + "The enemy has recovered from their Break state.");
|
||
}
|
||
}
|
||
let PLStPos = new Pos2D(1150, 647);
|
||
Game_Interpreter.prototype.N_Btl_PlStView = function (_PosX, _PosY,_SetFlg) {
|
||
_PosX = typeof _PosX !== 'undefined' ? _PosX : PLStPos._x;
|
||
_PosY = typeof _PosY !== 'undefined' ? _PosY : PLStPos._y;
|
||
_SetFlg = typeof _SetFlg !== 'undefined' ? _SetFlg : false;
|
||
let _opi = 255;
|
||
if (_SetFlg) _opi = 0;
|
||
ViewSpriteArr_Reset();
|
||
if (NPlayer._tp >= 100) NPlayer._tp = 100;
|
||
if (NPlayer._tp <= 0) NPlayer._tp = 0;
|
||
this.SetSprite(PN_StWin, BtlPic + "PN_StWin", _PosX, _PosY, _opi);
|
||
D_Text_Cng_font = "Russo_One";
|
||
var hpTxtSize = 35;
|
||
if (NPlayer._hp > 999) hpTxtSize = 32;
|
||
this.SpriteStr(PN_StHpTxt + 0, SCol.Grn + "\\ow[5]\\oc[15]" + NPlayer._hp ,
|
||
hpTxtSize, _PosX + 216, _PosY + 43, _opi);
|
||
this.SpriteStr(PN_StTpTxt, SCol.Red + "\\ow[5]\\oc[15]" + NPlayer._tp + " %" ,
|
||
25, _PosX + 216, _PosY + 43 + 55, _opi);
|
||
for (let i = 0; i <= ViewSpriteArr.length - 1; i++) {
|
||
this.MoveSprite(ViewSpriteArr[i], true, true, 10, 255);
|
||
}
|
||
this.SetSprite(PN_StGageBase, BtlPic + "PN_StGageBase", _PosX + 138, _PosY + 57 , _opi);
|
||
this.MoveSprite(PN_StGageBase, true, true, 10, 255);
|
||
let _HpLng = (NPlayer._hp / NPlayer.b_mhp) * 100;
|
||
this.SetSprite(PN_StHpGage, BtlPic + "PN_StHpGage", _PosX + 138, _PosY + 57 , _opi, _HpLng);
|
||
this.MoveSprite(PN_StHpGage, true, true, 10, 255, _HpLng);
|
||
let _TpLng = NPlayer._tp;
|
||
this.SetSprite(PN_StTpGage, BtlPic + "PN_StTpGage", _PosX + 138, _PosY + 57 + 50, _opi, _TpLng);
|
||
this.MoveSprite(PN_StTpGage, true, true, 10, 255, _TpLng);
|
||
D_Text_Cng_font = "";
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_SelTpDraw = function () {
|
||
let _TpGageData = GetSpriteData(PN_StTpGage);
|
||
if(_TpGageData != null){
|
||
let _PsX = _TpGageData._x;
|
||
let _PsY = _TpGageData._y;
|
||
let _Width = _TpGageData.width;
|
||
let _Mx = _TpGageData._scaleX;
|
||
let _CkX = NPlayer._tp - btlSelect_PlTp;
|
||
let _STpStartX = _PsX + _Width * (_Mx / 100);
|
||
this.SetSprite(PN_StSelTpGage, BtlPic + "PN_StSelTpGage", _STpStartX + 1, _PsY, 255, -_CkX);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_PlStmove = function (_PosX , _PosY , _Flame) {
|
||
this.MoveSprite(PN_StWin, _PosX, _PosY, _Flame);
|
||
this.MoveSprite(PN_StHpTxt + 0, _PosX + 216, _PosY + 43, _Flame);
|
||
this.MoveSprite(PN_StTpTxt, _PosX + 216, _PosY + 43 + 55, _Flame);
|
||
this.MoveSprite(PN_StGageBase, _PosX + 138, _PosY + 57, _Flame, 255);
|
||
let _HpLng = (NPlayer._hp / NPlayer.b_mhp) * 100;
|
||
this.MoveSprite(PN_StHpGage, _PosX + 138, _PosY + 57, _Flame, 255, _HpLng);
|
||
let _TpLng = NPlayer._tp;
|
||
this.MoveSprite(PN_StTpGage, _PosX + 138, _PosY + 57 + 50, _Flame, 255, _TpLng);
|
||
}
|
||
Game_Interpreter.prototype.PL回復 = function (_par) {
|
||
this.PLHP変動(Math.floor((_par / 100) * NPlayer.b_mhp));
|
||
}
|
||
Game_Interpreter.prototype.EM回復 = function (_par) {
|
||
this.EMHP変動(Math.floor((_par / 100) * NEnemy.b_mhp));
|
||
}
|
||
Game_Interpreter.prototype.PLHP変動 = function (_value) {
|
||
NPlayer._hp += Math.floor(_value);
|
||
if (NPlayer._hp < 0) NPlayer._hp = 0;
|
||
if (NPlayer._hp > NPlayer.b_mhp) NPlayer._hp = NPlayer.b_mhp;
|
||
}
|
||
Game_Interpreter.prototype.EMHP変動 = function (_value) {
|
||
NEnemy._hp += Math.floor(_value);
|
||
if (NEnemy._hp < 0) NEnemy._hp = 0;
|
||
if (NEnemy._hp > NEnemy.b_mhp) NEnemy._hp = NEnemy.b_mhp;
|
||
}
|
||
let EmStPos = new Pos2D(38, 330);
|
||
Game_Interpreter.prototype.N_Btl_EmStView = function (_PosX, _PosY) {
|
||
_PosX = typeof _PosX !== 'undefined' ? _PosX : EmStPos._x;
|
||
_PosY = typeof _PosY !== 'undefined' ? _PosY : EmStPos._y;
|
||
D_Text_Cng_font = "Russo_One";
|
||
let _文字Str = _バランステキスト取得();
|
||
this.SpriteStrC(PN_StEmHpTxt + 0,SCol.Yel + _文字Str , 40 , _PosX + 35 , _PosY + 40);
|
||
this.SpriteStr(PN_StEmHpTxt + 1, SCol.Grn + "\\ow[5]\\oc[15]" + NEnemy._hp, 35, _PosX + 155, _PosY + 23);
|
||
let _HpLng = (NEnemy._hp / NEnemy.b_mhp) * 100;
|
||
this.SetSprite(PN_StEmWin, BtlPic + "PN_StEmWin", _PosX, _PosY);
|
||
this.SetSprite(PN_StEmHpGage_Back, BtlPic + "PN_StEmHpGage_Back", _PosX + 97, _PosY + 40, 255);
|
||
this.SetSprite(PN_StEmHpGage, BtlPic + "PN_StEmHpGage", _PosX + 97, _PosY + 40, 255, _HpLng);
|
||
D_Text_Cng_font = "";
|
||
}
|
||
Game_Interpreter.prototype.N_バランス描画 = function () {
|
||
if(NEnemy.Brns <= 0) NEnemy.Brns = 0;
|
||
let _Sprite = GetSpriteData(PN_StEmHpTxt + 0);
|
||
let _文字Str = _バランステキスト取得();
|
||
this.SpriteStrC(PN_StEmHpTxt + 0, _文字Str, 40, _Sprite._x, _Sprite._y);
|
||
}
|
||
let _バランステキスト取得 = function() {
|
||
let _AStr = "";
|
||
if(NEnemy.Brns == 0) _AStr = SCol.Red;
|
||
return " " + _AStr + NEnemy.Brns + " ";
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_EmStmove = function (_PosX, _PosY, _Flame) {
|
||
this.MoveSprite(PN_StEmWin, _PosX, _PosY, _Flame);
|
||
this.MoveSprite(PN_StEmHpGage_Back, _PosX + 97, _PosY + 40, _Flame);
|
||
this.MoveSprite(PN_StEmHpGage, _PosX + 97, _PosY + 40, _Flame , 255 , true);
|
||
this.MoveSprite(PN_StEmHpTxt + 0, _PosX + 35 , _PosY + 40, _Flame);
|
||
this.MoveSprite(PN_StEmHpTxt + 1, _PosX + 155, _PosY + 23, _Flame);
|
||
}
|
||
const DoP_Cnt = 20;
|
||
const _BsBltY差 = 59;
|
||
const _BltY差 = _BsBltY差 * _BltTxt拡大率;
|
||
let DoPos_Pl = new Pos2D(450, 410);
|
||
let DoTHPos = new Pos2D(DoPos_Pl._x , 700);
|
||
let DoPos_Em = new Pos2D(DoPos_Pl._x - 410 * _BltTxt拡大率 - 20, DoPos_Pl._y);
|
||
let DoPosB_PL = new Pos2D(379, DoPos_Pl._y + 48);
|
||
let DoPosB_Em = new Pos2D(303, DoPos_Pl._y + 48);
|
||
let SelectDoNo = 0;
|
||
let Em_DoViewArr = [true, true, true, true, true, true];
|
||
let DoHPos = new Pos2D(DoPos_Pl._x - 9, DoPos_Pl._y - 8);
|
||
let BltPicArr = [];
|
||
for (let i = 0; i <= 6 - 1; i++) {
|
||
BltPicArr.push(PN_bPLBltWin + (Cnt_PN_bPLBltWin * i));
|
||
}
|
||
DoArr_Reset = function () {
|
||
NPlayer.DO_Arr = [0, 0, 0, 0, 0, 0];
|
||
NEnemy.DO_Arr = [0, 0, 0, 0, 0, 0];
|
||
Em_DoViewArr = [true, true, true, true, true, true];
|
||
}
|
||
let _PL_DoArrDraw = false;
|
||
let _PL_SelWillMp = 0;
|
||
Game_Interpreter.prototype.N_Btl_DoView = function (_SetFlg) {
|
||
_SetFlg = typeof _SetFlg !== 'undefined' ? _SetFlg : false;
|
||
ViewSpriteArr_Reset();
|
||
let _opi = 255;
|
||
if (_SetFlg) _opi = 0;
|
||
let _PL_WillMp = NPlayer.Do_Mp;
|
||
let _opi155Arr = [];
|
||
for (let j = 0; j < NPlayer.DO_Arr.length; j++) {
|
||
if (isNaN(NPlayer.DO_Arr[j])) NPlayer.DO_Arr[j] = 0;
|
||
}
|
||
for (let i = 0; i <= NPlayer.DO_Arr.length - 1; i++) {
|
||
if(SelectDoNo == i){
|
||
_PL_SelWillMp = _PL_WillMp;
|
||
}
|
||
if(!_PL_DoArrDraw) {
|
||
if (NPlayer.DO_Arr[i] == 0){
|
||
let _PicNo = PN_bPLBltWin + (i * Cnt_PN_bPLBltWin);
|
||
let _PosX = DoPos_Pl._x;
|
||
let _PosY = DoPos_Pl._y + (_BltY差 * i);
|
||
this.N_Btl_Pl弾丸Draw(_PicNo , "" , "" , 0 , _PosX , _PosY , _opi , _Blt拡大);
|
||
continue;
|
||
}
|
||
}else{
|
||
if (NPlayer.DO_Arr[i] == 0) continue;
|
||
}
|
||
let _ckSkill = $dataSkills[NPlayer.DO_Arr[i]];
|
||
let _ColStr = "";
|
||
_ColStr = Skill相性Col(NPlayer.DO_Arr[i], NEnemy.DO_Arr[i]);
|
||
if (!Em_DoViewArr[i]) _ColStr = "";
|
||
if(_Skill_State存在Ck(NPlayer.DO_Arr[i] , _StateDt._コスト全消費)){
|
||
Draw_弾丸Cost = _PL_WillMp;
|
||
_PL_WillMp = 0;
|
||
} else {
|
||
if (_ckSkill.mpCost > 0) {
|
||
_PL_WillMp -= _ckSkill.mpCost;
|
||
if (_PL_WillMp < 0) _ColStr = SCol.Red;
|
||
} else if (_ckSkill.tpCost > 0) {
|
||
_PL_WillMp += _ckSkill.tpCost;
|
||
}
|
||
}
|
||
if(!_PL_DoArrDraw) {
|
||
let _PicNo = PN_bPLBltWin + (i * Cnt_PN_bPLBltWin);
|
||
let _PosX = DoPos_Pl._x;
|
||
let _PosY = DoPos_Pl._y + (_BltY差 * i);
|
||
let _SkillNo = NPlayer.DO_Arr[i];
|
||
let _HitStr = this._Txt命中被弾(i , _SkillNo);
|
||
this.N_Btl_Pl弾丸Draw(_PicNo , _ColStr , _HitStr , _SkillNo , _PosX , _PosY , _opi , _Blt拡大);
|
||
this.TpUse_PicColCng(_PicNo , i);
|
||
}
|
||
if (_PL_WillMp <= 0) _PL_WillMp = 0;
|
||
if (_PL_WillMp >= NPlayer.Do_MaxMp) _PL_WillMp = NPlayer.Do_MaxMp;
|
||
if (_PL_WillMp >= DoP_Cnt) _PL_WillMp = DoP_Cnt;
|
||
}
|
||
let _TPDrawSkip = false;
|
||
if(_Btl_TutorialNo != -1) {
|
||
if(_Btl_TutorialNo < 27) _TPDrawSkip = true;
|
||
}
|
||
if(NPlayer._tp >= 50 && !_TPDrawSkip && !TH_ModeFlg) {
|
||
this.SetSprite(PN_BtlTHBlt ,BtlPic + "PN_THBlt_1" , DoTHPos._x , DoTHPos._y);
|
||
if(btlSelect_PlTp >= 50){
|
||
this.SetSprite(PN_BtlTHBlt ,BtlPic + "PN_THBlt_1" , DoTHPos._x , DoTHPos._y);
|
||
} else {
|
||
this.SetSprite(PN_BtlTHBlt ,BtlPic + "PN_THBlt_1_Off" , DoTHPos._x , DoTHPos._y);
|
||
}
|
||
} else {
|
||
this.DelSprite(PN_BtlTHBlt);
|
||
}
|
||
let _SelHPsY = DoPos_Pl._y + (_BltY差 * SelectDoNo) - 7;
|
||
if (SelectDoNo == -1){
|
||
_SelHPsY = DoTHPos._y;
|
||
this.SetSprite(PN_bPLBltHikari ,BtlPic + "PN_bPLBltHikari" ,
|
||
DoPos_Pl._x - 8 , _SelHPsY - 7 , _opi);
|
||
} else {
|
||
this.SetSprite(PN_bPLBltHikari ,BtlPic + "PN_bPLBltHikari" ,
|
||
DoPos_Pl._x - 8 , _SelHPsY , _opi , _Blt拡大 , _Blt拡大);
|
||
}
|
||
if (_Btl_TutorialNo == -1)
|
||
this.SetSprite(PN_bDataBtn , BtlPic + "PN_bDataBtn" , 18 , 715 , _opi);
|
||
this.Btl_異常描画(_opi);
|
||
let _Em_WillMp = NEnemy.Do_Mp;
|
||
for (let i = 0; i <= NEnemy.DO_Arr.length - 1; i++) {
|
||
let _ckSkill = $dataSkills[NEnemy.DO_Arr[i]];
|
||
if(NEnemy.DO_Arr[i] != -1){
|
||
if(_Skill_State存在Ck(NEnemy.DO_Arr[i] , _StateDt._コスト全消費)){
|
||
Draw_弾丸Cost = _Em_WillMp;
|
||
_Em_WillMp = 0;
|
||
} else {
|
||
if (_ckSkill.mpCost > 0) {
|
||
_Em_WillMp -= _ckSkill.mpCost;
|
||
if (_Em_WillMp < 0) _ColStr = SCol.Red;
|
||
} else if (_ckSkill.tpCost > 0) {
|
||
_Em_WillMp += _ckSkill.tpCost;
|
||
}
|
||
}
|
||
}
|
||
let _PicNo = PN_bEmBltWin + (i * Cnt_PN_bEmBltWin);
|
||
let _相性Col = Skill相性Col(NEnemy.DO_Arr[i], NPlayer.DO_Arr[i]);
|
||
if (!Em_DoViewArr[i]) _相性Col = "";
|
||
let _PosX = DoPos_Em._x;
|
||
let _PosY = DoPos_Em._y + (_BltY差 * i);
|
||
if (_SetFlg) {
|
||
if (Em_DoViewArr[i]) {
|
||
this.N_Btl_Em弾丸Draw(_PicNo , _相性Col , NEnemy.DO_Arr[i] , _PosX , _PosY , _opi , _Blt拡大);
|
||
} else {
|
||
this.N_Btl_Em弾丸_不明Draw(_PicNo ,_PosX,_PosY , _opi , _Blt拡大);
|
||
}
|
||
}
|
||
if (_Em_WillMp <= 0) _Em_WillMp = 0;
|
||
if (_Em_WillMp >= DoP_Cnt) _Em_WillMp = DoP_Cnt;
|
||
}
|
||
for (let i = 0; i <= NPlayer.Do_MaxMp - 1; i++) {
|
||
let _setNo = "0";
|
||
let _ckMp = i + 1;
|
||
if (_PL_WillMp >= NPlayer.Do_Mp){
|
||
if (NPlayer.Do_Mp >= _ckMp) _setNo = "1";
|
||
if (NPlayer.Do_Mp < _ckMp && _PL_WillMp >= _ckMp) _setNo = "2";
|
||
}
|
||
if (_PL_WillMp < NPlayer.Do_Mp) {
|
||
if (_PL_WillMp >= _ckMp) _setNo = "1";
|
||
if (_PL_WillMp < _ckMp && NPlayer.Do_Mp >= _ckMp) _setNo = "3";
|
||
}
|
||
this.SetSprite(PN_bDoPoint + i, BtlPic + "PN_bDoPoint_" + _setNo,
|
||
DoPosB_PL._x, DoPosB_PL._y + (29 * 8) - (15 * i), _opi);
|
||
}
|
||
for (let i = 0; i <= NEnemy.Do_MaxMp - 1; i++) {
|
||
_setNo = "0";
|
||
_ckMp = i + 1;
|
||
if (_Em_WillMp >= NEnemy.Do_Mp) {
|
||
if (NEnemy.Do_Mp >= _ckMp) _setNo = "1";
|
||
if (NEnemy.Do_Mp < _ckMp && _Em_WillMp >= _ckMp) _setNo = "2";
|
||
}
|
||
if (_Em_WillMp < NEnemy.Do_Mp) {
|
||
if (_Em_WillMp >= _ckMp) _setNo = "1";
|
||
if (_Em_WillMp < _ckMp && NEnemy.Do_Mp >= _ckMp) _setNo = "3";
|
||
}
|
||
this.SetSprite(PN_bDoPoint_Em + i, BtlPic + "PN_bDoPoint_" + _setNo,
|
||
DoPosB_Em._x, DoPosB_Em._y + (29 * 8) - (15 * i), _opi);
|
||
}
|
||
for (let i = 0; i <= ViewSpriteArr.length - 1; i++) {
|
||
if (_opi155Arr.indexOf(ViewSpriteArr[i]) != -1) {
|
||
this.MoveSprite(ViewSpriteArr[i], true, true, 15, 155, true, true);
|
||
} else {
|
||
this.MoveSprite(ViewSpriteArr[i], true, true, 15, 255, true, true);
|
||
}
|
||
}
|
||
}
|
||
let _異常PlPicArr = [];
|
||
let _異常EmPicArr = [];
|
||
Game_Interpreter.prototype.Btl_異常描画 = function (_opi) {
|
||
_opi = typeof _opi !== 'undefined' ? _opi : 255;
|
||
this.DelSpriteSpan(PN_bPlState , PN_bEmStateTn + 6);
|
||
_異常PlPicArr = [];
|
||
for (let i = 0; i <= NPlayer.state.length - 1; i++) {
|
||
let _ckst = $dataStates[NPlayer.state[i]._No];
|
||
let _SetStr = " \\I[" + _ckst.iconIndex + "] ";
|
||
_異常PlPicArr.push(PN_bPlState + i);
|
||
let _PLIPs = new Pos2D(1400 , 650);
|
||
this.SpriteStrC(PN_bPlState + i , _SetStr , 25 , _PLIPs._x , _PLIPs._y + (-60 * i) , 255 , 150 , 150);
|
||
let _TurnStr = "\\oc[rgba(0,0,0,1)] " + NPlayer.state[i]._Turn + " ";
|
||
this.SpriteStrR(PN_bPlStateTn + i , _TurnStr , 25 , _PLIPs._x + 30 , _PLIPs._y + (-60 * i) , 255);
|
||
}
|
||
_異常EmPicArr = [];
|
||
for (let i = 0; i <= NEnemy.state.length - 1; i++) {
|
||
let _ckst = $dataStates[NEnemy.state[i]._No];
|
||
let _SetStr = " \\I[" + _ckst.iconIndex + "] ";
|
||
let _StPs = new Pos2D(63 , 61 + 67 - (56 * i));
|
||
this.SpriteStrC(PN_bEmState + i , _SetStr , 25 , _StPs._x , _StPs._y , _opi , 150 , 150);
|
||
_異常EmPicArr.push(PN_bEmState + i);
|
||
let _TurnStr = "\\oc[rgba(0,0,0,1)] " + NEnemy.state[i]._Turn + " ";
|
||
this.SpriteStrR(PN_bEmStateTn + i , _TurnStr , 25 , _StPs._x , _StPs._y, _opi);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_異常確認_Update = function () {
|
||
D_Text_Cng_font = "Makinas";
|
||
this.DelSpriteSpan(PN_bIjoWin , PN_bIjoTxt + 1);
|
||
let _CNo = overPointerSpCkArr(_異常PlPicArr);
|
||
let _PIjPs = new Pos2D(930 , 630);
|
||
if(_CNo != -1) {
|
||
_CNo -= PN_bPlState;
|
||
let _ZureY = (-60 * _CNo)
|
||
this.SetSprite(PN_bIjoWin , BtlPic + "PN_bIjoWin" , _PIjPs._x , _PIjPs._y + _ZureY);
|
||
let _CkState = $dataStates[NPlayer.state[_CNo]._No];
|
||
let _StVar = " \\I[" + _CkState.iconIndex + "] " + _CkState.name + ":残り" + NPlayer.state[_CNo]._Turn + "行動";
|
||
this.SpriteStr(PN_bIjoTxt + 0 , _StVar , 24 , _PIjPs._x + 28 , _PIjPs._y + 13 + _ZureY);
|
||
this.SpriteStr(PN_bIjoTxt + 1 , " " + _CkState.message1 , 24 , _PIjPs._x + 28 , _PIjPs._y + 13 + 41 + _ZureY);
|
||
}
|
||
_CNo = overPointerSpCkArr(_異常EmPicArr);
|
||
if(_CNo != -1){
|
||
_CNo -= PN_bEmState;
|
||
let _EmjPs = new Pos2D(86 , 256 - (56 * _CNo));
|
||
this.SetSprite(PN_bIjoWin , BtlPic + "PN_bIjoWin_Em" , _EmjPs._x , _EmjPs._y);
|
||
let _CkState = $dataStates[NEnemy.state[_CNo]._No];
|
||
let _StVar = " \\I[" + _CkState.iconIndex + "] " + _CkState.name + ":残り" + NEnemy.state[_CNo]._Turn + "行動";
|
||
this.SpriteStr(PN_bIjoTxt + 0 , _StVar , 24 , _EmjPs._x + 28 , _EmjPs._y + 13);
|
||
this.SpriteStr(PN_bIjoTxt + 1 , " " + _CkState.message1 , 24 , _EmjPs._x + 28 , _EmjPs._y + 13 + 41);
|
||
}
|
||
D_Text_Cng_font = "";
|
||
}
|
||
Game_Interpreter.prototype._Txt命中被弾 = function (_No , _ckSkillId) {
|
||
_ckSkillId = typeof _ckSkillId !== 'undefined' ? _ckSkillId : -1;
|
||
if (!Em_DoViewArr[_No]) return "Hit???% Recv???%";
|
||
let _PlSkillNo = NPlayer.DO_Arr[_No];
|
||
if (_ckSkillId != -1) {
|
||
NPlayer.Skill = $dataSkills[_ckSkillId];
|
||
} else {
|
||
NPlayer.Skill = $dataSkills[_PlSkillNo];
|
||
}
|
||
let _PLStSave = NPlayer.state.slice();
|
||
let _EmSkillNo = NEnemy.DO_Arr[_No];
|
||
NEnemy.Skill = $dataSkills[_EmSkillNo];
|
||
let _EmStSave = NEnemy.state.slice();
|
||
this.Skill_StateSet(NPlayer, 1 , false);
|
||
this.Skill_StateSet(NEnemy, 1 , false);
|
||
let _命中 = "---";
|
||
if (NPlayer.Skill != null) {
|
||
if (NPlayer.Skill.stypeId == _Stype._Atk) {
|
||
_命中 = Math.floor(HitKeisan(NPlayer, NEnemy));
|
||
}
|
||
}
|
||
let _被弾 = "---";
|
||
try {
|
||
if (NEnemy.Skill.stypeId == _Stype._Atk) {
|
||
_被弾 = Math.floor(HitKeisan(NEnemy, NPlayer));
|
||
}
|
||
} catch (e) {
|
||
let ss = 0;
|
||
}
|
||
NPlayer.state = _PLStSave;
|
||
NEnemy.state = _EmStSave;
|
||
return "Hit" + _命中 + "% " + "Recv" + _被弾 + "%";
|
||
}
|
||
Game_Interpreter.prototype._Txt特殊 = function (_ckSkillId) {
|
||
let _rtnTxt = "";
|
||
if (MetaChecker($dataSkills[_ckSkillId],"テンション消費") != "") {
|
||
_rtnTxt += "\\oc[rgba(0, 0, 0, 1)]"
|
||
_rtnTxt += SCol.Red + "テンション消費:" + MetaChecker($dataSkills[_ckSkillId], "テンション消費");
|
||
}
|
||
return _rtnTxt;
|
||
}
|
||
Game_Interpreter.prototype._直感判定 = function () {
|
||
let _主人公の直感 = NPlayer.b_pre;
|
||
let _敵の直感 = NEnemy.b_pre;
|
||
let _内部直感率 = ((_主人公の直感 / _敵の直感) / 0.02);
|
||
if (_内部直感率 < 10) _内部直感率 = 10;
|
||
if (_内部直感率 > 80) _内部直感率 = 80;
|
||
let _直感確率 = _内部直感率 + 10;
|
||
return Math.random() * 100 < _直感確率;
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_DoPDel = function () {
|
||
for (let i = PN_bDoPoint; i <= PN_bDoPoint_Em + (DoP_Cnt - 1); i++) {
|
||
this.DelSprite(i);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_DoPResetDraw = function () {
|
||
for (let i = 0; i <= NPlayer.Do_MaxMp - 1; i++) {
|
||
let _setNo = "0";
|
||
let _ckMp = i + 1;
|
||
if (NPlayer.Do_Mp >= _ckMp) _setNo = "1";
|
||
this.SetSprite(PN_bDoPoint + i, BtlPic + "PN_bDoPoint_" + _setNo,
|
||
DoPosB_PL._x, DoPosB_PL._y + (29 * 8) - (15 * i));
|
||
}
|
||
for (let i = 0; i <= NEnemy.Do_MaxMp - 1; i++) {
|
||
_setNo = "0";
|
||
_ckMp = i + 1;
|
||
if (NEnemy.Do_Mp >= _ckMp) _setNo = "1";
|
||
this.SetSprite(PN_bDoPoint_Em + i, BtlPic + "PN_bDoPoint_" + _setNo,
|
||
DoPosB_Em._x, DoPosB_Em._y + (29 * 8) - (15 * i));
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_DoPPicCng = function () {
|
||
for (let i = 0; i <= NPlayer.Do_MaxMp - 1; i++) {
|
||
let _setNo = "0";
|
||
let _ckMp = i + 1;
|
||
if (NPlayer.Do_Mp >= _ckMp) _setNo = "1";
|
||
this.CngSprite(PN_bDoPoint + i, BtlPic + "PN_bDoPoint_" + _setNo);
|
||
}
|
||
for (let i = 0; i <= NEnemy.Do_MaxMp - 1; i++) {
|
||
_setNo = "0";
|
||
_ckMp = i + 1;
|
||
if (NEnemy.Do_Mp >= _ckMp) _setNo = "1";
|
||
this.CngSprite(PN_bDoPoint_Em + i, BtlPic + "PN_bDoPoint_" + _setNo);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_PLDoMove = function (_PosX, _PosY , _Flame) {
|
||
for (let i = 0; i <= 6 - 1; i++) {
|
||
this.N_Btl_Pl弾丸Move(PN_bPLBltWin + (i * Cnt_PN_bPLBltWin) , _PosX, _PosY + (_BsBltY差 * i), _Flame , 255,100);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_PLDoPMove = function (_PosX, _PosY, _Flame) {
|
||
for (let i = 0; i <= NPlayer.Do_MaxMp - 1; i++) {
|
||
this.MoveSprite(PN_bDoPoint + i, _PosX, _PosY + (29 * 8) - (29 * i), _Flame);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_EmDoMove = function (_PosX, _PosY, _Flame) {
|
||
for (let i = 0; i <= 6 - 1; i++) {
|
||
this.N_Btl_Em弾丸Move(PN_bEmBltWin + (i * Cnt_PN_bEmBltWin), _PosX, _PosY + (_BsBltY差 * i), _Flame)
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_EmDoMoveRt = function (_PosX, _PosY, _Flame) {
|
||
for (let i = 0; i <= 6 - 1; i++) {
|
||
this.N_Btl_Em弾丸Move(PN_bEmBltWin + (i * Cnt_PN_bEmBltWin), _PosX, _PosY + (_BsBltY差 * 5) + (-_BsBltY差 * i), _Flame)
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_EmDoPMove = function (_PosX, _PosY, _Flame) {
|
||
for (let i = 0; i <= NEnemy.Do_MaxMp - 1; i++) {
|
||
this.MoveSprite(PN_bDoPoint_Em + i, _PosX, _PosY + (29 * 8) - (29 * i), _Flame);
|
||
}
|
||
}
|
||
let SkillSelNo = 0;
|
||
let SelectSkillArr = [];
|
||
let SklPos = new Pos2D(645, DoPos_Pl._y - 55);
|
||
Game_Interpreter.prototype.N_Btl_SkillView = function (_SetFlg) {
|
||
let _opi = 255;
|
||
if (_SetFlg) _opi = 0;
|
||
ViewSpriteArr_Reset();
|
||
SelectSkillArr = [];
|
||
for (let i = 0; i <= $gameSystem.PL_SkillArr.length - 1; i++) {
|
||
if($gameSystem.PL_SkillArr[i] == 0) continue;
|
||
let _ckSkill = $dataSkills[$gameSystem.PL_SkillArr[i]];
|
||
if (!TH_ModeFlg && _ckSkill.meta["THMode"]) continue;
|
||
SelectSkillArr.push($gameSystem.PL_SkillArr[i]);
|
||
}
|
||
if(TH_ModeFlg && NPlayer.DO_Arr.indexOf(SKN_THSkill + $gameVariables.value(VN_THSkLv)) == -1) {
|
||
this.TH_Skill_Add();
|
||
}
|
||
for (let i = 0; i <= SelectSkillArr.length - 1; i++) {
|
||
let _ckSkill = $dataSkills[SelectSkillArr[i]];
|
||
let _costStr = " 0";
|
||
if (_ckSkill.mpCost > 0) {
|
||
_costStr = "-" + _ckSkill.mpCost;
|
||
} else if (_ckSkill.tpCost > 0) {
|
||
_costStr = "+" + _ckSkill.tpCost;
|
||
}
|
||
let _相性Col = Skill相性Col(SelectSkillArr[i], NEnemy.DO_Arr[SelectDoNo]);
|
||
if (!Em_DoViewArr[i]) _相性Col = "";
|
||
let _IcStr = "";
|
||
if (_ckSkill.iconIndex != 0) {
|
||
_IcStr += "\\I[" + _ckSkill.iconIndex + "]";
|
||
}
|
||
}
|
||
for (let i = 0; i <= ViewSpriteArr.length - 1; i++) {
|
||
this.MoveSprite(ViewSpriteArr[i], true, true, 15, 255);
|
||
}
|
||
if(SelectDoNo == -1){
|
||
this.N_Btl_THSetuView(_DoSetuPosX + 30 , 695);
|
||
} else {
|
||
if(NPlayer.DO_Arr[SelectDoNo] != 0){
|
||
//this.N_Btl_SetuView(NPlayer.DO_Arr[SelectDoNo] , _DoSetuPosX , 402 + (_BltY差 * SelectDoNo));
|
||
} else {
|
||
let _DelMinPic = PN_BtlSelUI + (-3 * Cnt_PN_bPLBltWin);
|
||
let _DelMaxPic = PN_BtlSelUI + (+3 * Cnt_PN_bPLBltWin);
|
||
this.DelSpriteSpan(_DelMinPic , _DelMaxPic);
|
||
}
|
||
}
|
||
}
|
||
let Skill相性Col = function (_PLSkillNo, _EmSKillNo) {
|
||
switch(Skill相性Ck(_PLSkillNo, _EmSKillNo)){
|
||
case _相性結果.Win:
|
||
return SCol.Yel;
|
||
case _相性結果.Lose:
|
||
return SCol.Blu;
|
||
case _相性結果.Draw:
|
||
return "";
|
||
}
|
||
return "";
|
||
}
|
||
let _相性結果 = {
|
||
Win:1,
|
||
Lose:2,
|
||
Draw:3
|
||
};
|
||
let Skill相性Ck = function (_PLSkillNo, _EmSKillNo) {
|
||
if (_PLSkillNo == 0 || _PLSkillNo == undefined) return "";
|
||
if (_EmSKillNo == 0 || _EmSKillNo == undefined) return "";
|
||
if(_PLSkillNo == -1) return _相性結果.Lose;
|
||
if(_EmSKillNo == -1) return _相性結果.Win;
|
||
let _結果 = _相性結果.Draw;
|
||
let _plStype = $dataSkills[_PLSkillNo].stypeId;
|
||
let _emStype = $dataSkills[_EmSKillNo].stypeId;
|
||
switch (_plStype) {
|
||
case _Stype._Atk:
|
||
if (_emStype == _Stype._Taiki) _結果 = _相性結果.Win;
|
||
if (_emStype == _Stype._Def) _結果 = _相性結果.Lose;
|
||
break;
|
||
case _Stype._Def:
|
||
if (_emStype == _Stype._Atk) _結果 = _相性結果.Win;
|
||
if (_emStype == _Stype._Taiki) _結果 = _相性結果.Lose;
|
||
break;
|
||
case _Stype._Taiki:
|
||
if (_emStype == _Stype._Def) _結果 = _相性結果.Win;
|
||
if (_emStype == _Stype._Atk) _結果 = _相性結果.Lose;
|
||
break;
|
||
}
|
||
return _結果;
|
||
}
|
||
let SetuPos = new Pos2D(547, 243);
|
||
Game_Interpreter.prototype.N_Btl_SetuView = function (_SkillId , _posX , _PosY) {
|
||
_posX = typeof _posX !== 'undefined' ? _posX : SetuPos._x;
|
||
_PosY = typeof _PosY !== 'undefined' ? _PosY : SetuPos._y;
|
||
let _opi = 0;
|
||
ViewSpriteArr_Reset();
|
||
if(_SkillId == undefined) return;
|
||
let _ckSkill = $dataSkills[_SkillId];
|
||
if(_ckSkill == null) return;
|
||
if (_ckSkill.description != undefined) {
|
||
_CkDescArr = _Skill_SetuGetArr(_SkillId);
|
||
}
|
||
let _addStr = " Cost 0";
|
||
if (_ckSkill.mpCost > 0) {
|
||
_addStr = " Cost-" + _ckSkill.mpCost;
|
||
} else if (_ckSkill.tpCost > 0) {
|
||
_addStr = " Cost+" + _ckSkill.tpCost;
|
||
}
|
||
if(_Skill_State存在Ck(_SkillId , _StateDt._コスト全消費)){
|
||
_addStr = " \\C[10]Cost&TP All Used";
|
||
}
|
||
let _IcStr = "";
|
||
if (_ckSkill.iconIndex != 0) {
|
||
_IcStr += "\\I[" + _ckSkill.iconIndex + "]";
|
||
}
|
||
this.DelSpriteArr([PN_SetuTxt + 0, PN_SetuTxt + 1, PN_SetuTxt + 2]);
|
||
this.SetSprite(PN_SetuWin, BtlPic + "PN_SetuWin", _posX - 20, _PosY, _opi);
|
||
this.SpriteStr(PN_SetuTxt + 0, _IcStr + _ckSkill.name + _addStr, 22, _posX - 1, _PosY + 14, _opi);
|
||
for (let i = 0; i <= _CkDescArr.length - 1; i++) {
|
||
this.SpriteStr(PN_SetuTxt + 1 + i, _CkDescArr[i], 18, _posX + 2, _PosY + 48 + (i * 25), _opi);
|
||
}
|
||
for (let i = 0; i <= ViewSpriteArr.length - 1; i++) {
|
||
this.MoveSpriteAdd(ViewSpriteArr[i], 20, 0, 3, 255);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_THSetuView = function (_posX , _PosY) {
|
||
this.DelSpriteArr([PN_SetuTxt + 0, PN_SetuTxt + 1, PN_SetuTxt + 2]);
|
||
this.SetSprite(PN_SetuWin, BtlPic + "PN_SetuWin", _posX - 20, _PosY, 0);
|
||
this.SpriteStr(PN_SetuTxt + 0, "TH Mode Start", 22, _posX - 1, _PosY + 14, 0);
|
||
let _CkDescArr = [
|
||
"Enter TH Mode" , "Predict enemy actions again"
|
||
];
|
||
for (let i = 0; i <= _CkDescArr.length - 1; i++) {
|
||
this.SpriteStr(PN_SetuTxt + 1 + i, _CkDescArr[i], 18, _posX + 2, _PosY + 48 + (i * 25), 0);
|
||
}
|
||
for (let i = 0; i <= ViewSpriteArr.length - 1; i++) {
|
||
this.MoveSpriteAdd(ViewSpriteArr[i], 20, 0, 3, 255);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_SetuDel = function () {
|
||
for (let i = PN_SetuWin; i <= PN_SetuHitTxt + 1; i++) {
|
||
this.MoveSprite(i, true, true, 10, 0);
|
||
}
|
||
}
|
||
const BtlFast_Counter = 60;
|
||
let BtlFastCnter = 0;
|
||
Game_Interpreter.prototype.N_BtlUpdate = function () {
|
||
if (NPlayer.Do_Mp > NPlayer.Do_MaxMp) NPlayer.Do_Mp = NPlayer.Do_MaxMp;
|
||
if (NEnemy.Do_Mp > NEnemy.Do_MaxMp) NEnemy.Do_Mp = NEnemy.Do_MaxMp;
|
||
if (btlMode != _btlMode.Start) this.BtlBackUpdate();
|
||
this.Btl_UIUpdate();
|
||
switch (btlMode){
|
||
case _btlMode.Start:
|
||
this.N_Btl_StartUpdate();
|
||
break;
|
||
case _btlMode.Select:
|
||
this.N_Btl_SelectUpdate();
|
||
BtlFastCnter = 0;
|
||
break;
|
||
case _btlMode.Battle:
|
||
this.N_Btl_BattleUpdate();
|
||
if(isFastForward()) {
|
||
if(BtlFastCnter == 0) {
|
||
EasingStr = "easeInOutQuad";
|
||
this.SetSprite(PN_SpeedUp + 0 , BtlPic + "PN_SpeedUp" , 72 , 750);
|
||
this.MoveSprite(PN_SpeedUp + 0 , 472 , true , BtlFast_Counter);
|
||
EasingStr = "";
|
||
}
|
||
btl_flame++; this.N_Btl_BattleUpdate();
|
||
btl_flame++; this.N_Btl_BattleUpdate();
|
||
BtlFastCnter++;
|
||
if(BtlFastCnter == BtlFast_Counter + 1) BtlFastCnter = 0;
|
||
} else {
|
||
BtlFastCnter = 0;
|
||
this.DelSpriteSpan(PN_SpeedUp + 0 , PN_SpeedUp + 1);
|
||
}
|
||
break;
|
||
case _btlMode.End:
|
||
this.N_Btl_EndUpdate();
|
||
break;
|
||
}
|
||
btl_flame++;
|
||
}
|
||
let _BtlTurnPs = new Pos2D(1415 , 40);
|
||
Game_Interpreter.prototype.Btl_UIUpdate = function () {
|
||
if(btl_flame > 45) {
|
||
D_Text_Cng_font = "Russo_One";
|
||
this.SpriteStrC(PN_bTurn, SCol.Blk0 + " " + BtlTurn + " ", 40, _BtlTurnPs._x, _BtlTurnPs._y);
|
||
D_Text_Cng_font = "";
|
||
}
|
||
}
|
||
let _PsvWillMp = 0;
|
||
Game_Interpreter.prototype.N_Btl_TurnCng = function () {
|
||
_PsvWillMp = 0;
|
||
for (let i = 0; i <= NPlayer.PsvArr.length - 1; i++) {
|
||
let _AmId = NPlayer.PsvArr[i];
|
||
this.N_Btl_TurnCng_Psv(NPlayer , $dataArmors[_AmId]);
|
||
}
|
||
for (let i = 0; i <= NEnemy.PsvArr.length - 1; i++) {
|
||
let _AmId = NEnemy.PsvArr[i];
|
||
this.N_Btl_TurnCng_Psv(NEnemy , $dataArmors[_AmId]);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_TurnCng_Psv = function (_NChara , _Armor) {
|
||
if(_Armor.traits.length == 0) return;
|
||
for (let i = 0; i <= _Armor.traits.length - 1; i++) {
|
||
if(_Armor.traits[i].code != 11) continue;
|
||
let _Var = Math.floor(_Armor.traits[i].value * 100) - 100;
|
||
switch(_Armor.traits[i].dataId){
|
||
case _Zoku._ターン行動値変化:
|
||
_NChara.Do_Mp += _Var;
|
||
_PsvWillMp += _Var;
|
||
if(_NChara.Do_Mp < 0) _NChara.Do_Mp = 0;
|
||
if(_NChara.Do_Mp >= DoP_Cnt) _NChara.Do_Mp = DoP_Cnt;
|
||
break;
|
||
case _Zoku._ターン体力回復:
|
||
_NChara._hp += Math.floor(_NChara.mhp * (_Var / 100));
|
||
if(_NChara._hp > _NChara.mhp) _NChara._hp = _NChara.mhp;
|
||
if(_NChara._hp < 0) _NChara._hp = 0;
|
||
break;
|
||
case _Zoku._ターンTP回復:
|
||
_NChara._tp += _Var;
|
||
break;
|
||
}
|
||
}
|
||
for (let i = 0; i < _NChara.state.length; i++) {
|
||
let _ckst = $dataStates[_NChara.state[i]._No];
|
||
for (let j = 0; j < _ckst.traits.length; j++) {
|
||
switch (_ckst.traits[j].code) {
|
||
case 11:
|
||
switch (_ckst.traits[j].dataId) {
|
||
case _Zoku._ターン開始MP全回復:
|
||
_NChara.Do_Mp += 9999;
|
||
break;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
let THMode_End = function () {
|
||
TH_ModeFlg = false;
|
||
$gameSwitches.setValue(SW_THMode , TH_ModeFlg);
|
||
}
|
||
let btlSelect_flame = 0;
|
||
let _EnterFlame = 0;
|
||
let btlSelect_PlTp = 0 ;
|
||
let btlSelect_TpUse = [0,0,0,0,0,0];
|
||
let Em_Skills = [];
|
||
Game_Interpreter.prototype.N_Btl_SelectCng = function () {
|
||
this.N_Btl_TurnCng();
|
||
戦闘ターン++;
|
||
THMode_End();
|
||
btlMode = _btlMode.Select;
|
||
btlSelect_flame = 0;
|
||
SelectDoNo = 0;
|
||
NPlayer._tp += 10;
|
||
if(NPlayer._tp > 100) NPlayer._tp = 100;
|
||
btlSelect_PlTp = NPlayer._tp;
|
||
btlSelect_TpUse = [0,0,0,0,0,0];
|
||
this.N_Btl_DoPDel();
|
||
_EnterFlame = 0;
|
||
this.EnemySkillSet();
|
||
this.SetSprite(PN_bFz, BtlPic + "PN_bFz_Sel", 0, 0);
|
||
this.MoveSprite(PN_bFz, true, true, 25);
|
||
if (DbgFlg) {
|
||
this.DelSpriteArr([PN_TestStr, PN_TestStr + 1, PN_TestStr + 2, PN_TestStr + 3]);
|
||
}
|
||
this.DelSpriteSpan(PN_SpeedUp + 0 , PN_SpeedUp + 1);
|
||
}
|
||
Game_Interpreter.prototype.PLテンションUp = function (_cngVal) {
|
||
NPlayer._tp += _cngVal;
|
||
btlSelect_PlTp += _cngVal;
|
||
if (NPlayer._tp < 0) NPlayer._tp = 0;
|
||
if (NPlayer._tp > 100) NPlayer._tp = 100;
|
||
if (btlSelect_PlTp < 0) btlSelect_PlTp = 0;
|
||
if (btlSelect_PlTp > 100) btlSelect_PlTp = 100;
|
||
}
|
||
let _thFlame = 0; let _ThFInFlm = 60
|
||
let _Btl_TH演出終了 = false;
|
||
let _Btl_TH演出flame = 0;
|
||
let CN_THModeCmn = 502;
|
||
Game_Interpreter.prototype.N_Btl_THModeStart = function () {
|
||
TH_ModeFlg = true;
|
||
NPlayer.state.push(new _State(STN_THMode, 6));
|
||
$gameSwitches.setValue(SW_THMode , TH_ModeFlg);
|
||
_thFlame = _ThFInFlm;
|
||
let _dCnt = NPlayer._tp - btlSelect_PlTp;
|
||
NPlayer._tp -= 50;
|
||
btlSelect_PlTp = NPlayer._tp - _dCnt;
|
||
this.DelSprite(PN_BtlTHBlt);
|
||
this.N_Btl_PlStView(PLStPos._x, PLStPos._y, true);
|
||
this.N_Btl_TatieView();
|
||
this.N_Btl_SkillView(true);
|
||
this._再直感処理();
|
||
_Btl_TH演出flame = 0;
|
||
_Btl_TH演出終了 = true;
|
||
this.Btl_異常描画();
|
||
}
|
||
let Btl_TH演出終了 = function () {
|
||
_Btl_TH演出終了 = false;
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_THModeUpdate = function () {
|
||
if(_Btl_TH演出終了){
|
||
if(_Btl_TH演出flame == 0) {
|
||
this.SetCmnEvent(CN_THModeCmn);
|
||
}
|
||
_Btl_TH演出flame++;
|
||
}
|
||
if (!_Btl_TH演出終了 && _Btl_TH演出flame > 0) {
|
||
_THSelectFlg = true;
|
||
this.N_Btl_Select_1_Draw();
|
||
_Btl_TH演出flame = 0;
|
||
}
|
||
return _Btl_TH演出終了;
|
||
}
|
||
let _ktdnBOverFlg = false;
|
||
let _SelNoSave = 0;
|
||
let _bwhlflame = 10;
|
||
let _BSelMode = 0;
|
||
let _Nowシリンダー角度 = 0;
|
||
let _BSel_メニューFlg = false;
|
||
let _BSel_ReadyFlg = false;
|
||
const _DoSetuPosX = 680;
|
||
Game_Interpreter.prototype.N_Btl_SelectUpdate = function () {
|
||
if(_Btl_StopCmnFlg) return;
|
||
if(_BSel_ReadyFlg){
|
||
this.Btl_Ready_Update();
|
||
return;
|
||
}
|
||
if(_BSel_メニューFlg){
|
||
this.N_Btl_BSelMenu_Update();
|
||
return;
|
||
}
|
||
switch(_BSelMode) {
|
||
case 0:
|
||
this.N_Btl_SelectUpdate_0();
|
||
break;
|
||
case 1:
|
||
this.N_Btl_SelectUpdate_1();
|
||
break;
|
||
}
|
||
btlSelect_flame++;
|
||
}
|
||
let btlSelect_初期処理Flg = true;
|
||
const CN_戦闘コマンド回転時 = 507;
|
||
const CN_戦闘コマンド決定時 = 508;
|
||
Game_Interpreter.prototype.N_Btl_SelectUpdate_0 = function () {
|
||
if (_bwhlflame > 0){
|
||
TouchInput.wheelY = 0;
|
||
_bwhlflame--;
|
||
}
|
||
if (TouchInput.wheelY != 0) _bwhlflame = 20;
|
||
if (btlSelect_flame == 25) {
|
||
this.MoveSprite(PN_bFz, true, true, 25, 0);
|
||
if(btlSelect_初期処理Flg) {
|
||
_Btl_StopCmnFlg = true;
|
||
this.SetCmnEventSc(CN_カットイン後);
|
||
btlSelect_初期処理Flg = false;
|
||
} else {
|
||
_Btl_StopCmnFlg = true;
|
||
this.SetCmnEventSc(CN_毎ターンコモン);
|
||
}
|
||
}
|
||
if (btlSelect_flame == 45) {
|
||
this.N_Btl_DoView(true);
|
||
this.N_Btl_SkillView(true);
|
||
this.N_Btl_PlStView(PLStPos._x, PLStPos._y, true);
|
||
this.N_Btl_EmStView();
|
||
}
|
||
if (btlSelect_flame > 60 && _EnterFlame == 0) {
|
||
let _doCngFlg = false;
|
||
let _操作_UpFlg = false;
|
||
let _操作_DownFlg = false;
|
||
if(!this.Blt_TutorialUpdate()) {
|
||
_操作_UpFlg = (Input.isTriggered('up') || TouchInput.wheelY < 0);
|
||
_操作_DownFlg = Input.isTriggered('down') || TouchInput.wheelY > 0;
|
||
}
|
||
if (_操作_UpFlg) {
|
||
SelectDoNo--; _doCngFlg = true;
|
||
if (btlSelect_PlTp >= 50) {
|
||
if (SelectDoNo < -1) SelectDoNo = 5;
|
||
} else {
|
||
if (SelectDoNo < 0) SelectDoNo = 5;
|
||
}
|
||
this.Blt_SelectMove();
|
||
}
|
||
if (_操作_DownFlg) {
|
||
SelectDoNo++; _doCngFlg = true;
|
||
if (btlSelect_PlTp >= 50) {
|
||
if (SelectDoNo >= 6){
|
||
SelectDoNo = -1;
|
||
}
|
||
} else {
|
||
if (SelectDoNo >= 6) SelectDoNo = 0;
|
||
}
|
||
this.Blt_SelectMove();
|
||
}
|
||
if (_doCngFlg) {
|
||
this.N_Btl_SkillView();
|
||
}
|
||
if(TH_ModeFlg){
|
||
this.TH_Skill_Add();
|
||
for (let i = 0; i <= NPlayer.DO_Arr.length - 1; i++) {
|
||
if(i == SelectDoNo) continue;
|
||
if(NPlayer.DO_Arr[i] == SKN_THSkill + $gameVariables.value(VN_THSkLv)){
|
||
this.TH_Skill_Del();
|
||
if(SelectSkillArr.length <= SkillSelNo){
|
||
SkillSelNo = 0;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
_シリンダー角度 = _Nowシリンダー角度 = 0;
|
||
let _BltDt = new _BltImgData(0);
|
||
let _SlndX = _BltDt._PsX + 383;
|
||
let _SlndY = _BltDt._PsY + 23;
|
||
this.SetSpriteC(PN_BtlSrinder , BtlPic + "PN_BtlSrinder", _SlndX - 20 , _SlndY , 0);
|
||
this.MoveSprite(PN_BtlSrinder , _SlndX , _SlndY , 5 , _BltDt._透明度);
|
||
let tpBtnDrawSkipFlg = false;
|
||
if(_Btl_TutorialNo != -1) {
|
||
if(_Btl_TutorialNo != 26) tpBtnDrawSkipFlg = true;
|
||
}
|
||
this.DelSpriteSpan(PN_TPPowUp + 0 , PN_TPPowUp + 1);
|
||
if(!tpBtnDrawSkipFlg) {
|
||
if(btlSelect_TpUse[SelectDoNo] != 3 && btlSelect_PlTp >= 10){
|
||
this.SetSpriteC(PN_TPPowUp + 0 , BtlPic + "PN_TPPowUp",
|
||
TPUpPs._x - 10 , TPUpPs._y + (_BltY差 * SelectDoNo), 0);
|
||
this.MoveSprite(PN_TPPowUp + 0 , TPUpPs._x , true , 5 , 255);
|
||
if(btlSelect_PlTp < 10) this.DelSprite(PN_TPPowUp + 0);
|
||
}
|
||
if((btlSelect_TpUse[SelectDoNo] != 0)){
|
||
this.SetSpriteC(PN_TPPowUp + 1 , BtlPic + "PN_TPPowUp_Cancel",
|
||
TPUpPs._x - 57 - 10 , TPUpPs._y + 134 + (_BltY差 * SelectDoNo), 0);
|
||
this.MoveSprite(PN_TPPowUp + 1 , TPUpPs._x - 57 , true , 5 , 255);
|
||
}
|
||
}
|
||
_Bef_PLDoNo = NPlayer.DO_Arr[SelectDoNo];
|
||
_Bef_PLDoTpCnt = btlSelect_TpUse[SelectDoNo];
|
||
this.N_Btl_Select_1_Draw();
|
||
NPlayer.DO_Arr[SelectDoNo] = SelectSkillArr[SkillSelNo] + btlSelect_TpUse[SelectDoNo];
|
||
_PL_DoArrDraw = true;
|
||
this.N_Btl_DoView();
|
||
_PL_DoArrDraw = false;
|
||
}
|
||
if (_EnterFlame > 0){
|
||
this.Blt_EnterUpdate();
|
||
if(isFastForward()) {
|
||
this.Blt_EnterUpdate();
|
||
this.Blt_EnterUpdate();
|
||
}
|
||
this.DelSprite(PN_StSelTpGage);
|
||
} else {
|
||
this.N_Btl_SelTpDraw();
|
||
}
|
||
}
|
||
let LvSkipFlg = [130];
|
||
let Draw_弾丸Cost = false;
|
||
Game_Interpreter.prototype.N_Btl_Pl弾丸Draw = function (_PicNo , _ColStr , _HitStr , _DoNo , _PosX , _PosY , _Opi , _MSize) {
|
||
_Opi = typeof _Opi !== 'undefined' ? _Opi : 255;
|
||
_MSize = typeof _MSize !== 'undefined' ? _MSize : 100;
|
||
_HitStr = typeof _HitStr !== 'undefined' ? _HitStr : "";
|
||
let _MWari = _MSize / 100;
|
||
this.DelSpriteSpan(_PicNo , _PicNo + Cnt_PN_bPLBltWin - 1);
|
||
if (_DoNo == undefined) _DoNo = 0;
|
||
if (_DoNo == 0){
|
||
this.SetSprite(_PicNo + 0, BtlPic + "PN_bPLBltWin_brank",
|
||
_PosX, _PosY , _Opi , _MSize , _MSize);
|
||
this.SpriteStr(_PicNo + 2, "-Unassigned-", 22,
|
||
_PosX + (74 * _MWari) , _PosY + (13 * _MWari), _Opi , _MSize , _MSize);
|
||
this.SpriteStr(_PicNo + 3, "Hit---% Receive---% ", 15,
|
||
_PosX + 94, _PosY - 9, _Opi , _MSize , _MSize);
|
||
} else {
|
||
let _ckSkill = $dataSkills[_DoNo];
|
||
let _ckLv = _DoNo % 8;
|
||
if(_ckLv == 0) _ckLv = 8;
|
||
this.SetSprite(_PicNo + 0, BtlPic + "PN_bPLBltWin",
|
||
_PosX, _PosY , _Opi , _MSize , _MSize);
|
||
if (LvSkipFlg.indexOf(_DoNo) == -1) {
|
||
this.SetSprite(_PicNo + 4, BtlPic + "PN_bSkillLv_" + _ckLv,
|
||
_PosX, _PosY , _Opi , _MSize , _MSize);
|
||
}
|
||
let _astr = "";
|
||
let _SetStr = "PN_Cost_";
|
||
let _MpCost = _ckSkill.mpCost;
|
||
if(_ckSkill.tpCost > 0) _MpCost = -_ckSkill.tpCost
|
||
if (_Skill_State存在Ck(_DoNo , _StateDt._コスト全消費)) _MpCost = Draw_弾丸Cost;
|
||
Draw_弾丸Cost = false;
|
||
if (_MpCost > 0) {
|
||
_SetStr += "m" + _MpCost;
|
||
} else if (_MpCost < 0) {
|
||
_SetStr += "p" + -_MpCost;
|
||
}
|
||
if (_ckSkill.iconIndex != 0){
|
||
_astr += " \\I[" + _ckSkill.iconIndex + "]";
|
||
}
|
||
this.SetSprite(_PicNo + 1, BtlPic + _SetStr,
|
||
_PosX + (9 * _MWari), _PosY + (0 * _MWari) , _Opi , _MSize , _MSize);
|
||
_ColStr = _ColStr.replace( 'undefined', "" );
|
||
_astr = _ColStr + _astr;
|
||
this.SpriteStr(_PicNo + 2, _astr + _ckSkill.name, 22,
|
||
_PosX + (68 * _MWari), _PosY + (13 * _MWari), _Opi , _MSize , _MSize);
|
||
if(_HitStr != ""){
|
||
this.SpriteStr(_PicNo + 3, _HitStr, 15,
|
||
_PosX + (94 * _MWari), _PosY - (9 * _MWari), _Opi);
|
||
}
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_Pl弾丸Move = function(_PicNo , _PosX , _PosY , _Time , _Opi , _MSize){
|
||
if (_PosX == true) _PosX = GetSpriteData(_PicNo)._x;
|
||
if (_PosY == true) _PosY = GetSpriteData(_PicNo)._y;
|
||
_Opi = typeof _Opi !== 'undefined' ? _Opi : 255;
|
||
_MSize = typeof _MSize !== 'undefined' ? _MSize : true;
|
||
if(_MSize != true){
|
||
let _MWari = _MSize / 100;
|
||
this.MoveSprite(_PicNo + 0 , _PosX , _PosY , _Time, _Opi , _MSize , _MSize);
|
||
this.MoveSprite(_PicNo + 4 , _PosX , _PosY , _Time, _Opi , _MSize , _MSize);
|
||
this.MoveSprite(_PicNo + 1 , _PosX + (9 * _MWari), _PosY + (0 * _MWari) , _Time, _Opi , _MSize , _MSize);
|
||
this.MoveSprite(_PicNo + 2 , _PosX + (68 * _MWari), _PosY + (13 * _MWari) , _Time, _Opi , _MSize , _MSize);
|
||
this.MoveSprite(_PicNo + 3 , _PosX + (94 * _MWari), _PosY - (9 * _MWari) , _Time, _Opi , _MSize , _MSize);
|
||
} else {
|
||
if(GetSpriteData(_PicNo + 0) == null){
|
||
return;
|
||
}
|
||
let _MWari = GetSpriteData(_PicNo + 0)._scaleX / 100;
|
||
this.MoveSprite(_PicNo + 0 , _PosX , _PosY , _Time, _Opi , true , true);
|
||
this.MoveSprite(_PicNo + 4 , _PosX , _PosY , _Time, _Opi , true , true);
|
||
this.MoveSprite(_PicNo + 1 , _PosX + (9 * _MWari), _PosY + (0 * _MWari) , _Time, _Opi , true , true);
|
||
this.MoveSprite(_PicNo + 2 , _PosX + (68 * _MWari), _PosY + (13 * _MWari) , _Time, _Opi , true , true);
|
||
this.MoveSprite(_PicNo + 3 , _PosX + (94 * _MWari), _PosY - (9 * _MWari) , _Time, _Opi , true , true);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_Em弾丸Draw = function (_PicNo , _ColStr , _DoNo , _PosX , _PosY , _Opi , _MSize) {
|
||
_Opi = typeof _Opi !== 'undefined' ? _Opi : 255;
|
||
_MSize = typeof _MSize !== 'undefined' ? _MSize : 100;
|
||
let _MWari = _MSize / 100;
|
||
this.DelSpriteSpan(_PicNo, _PicNo + Cnt_PN_bEmBltWin - 1);
|
||
if(_DoNo == -1){
|
||
this.SetSprite(_PicNo, BtlPic + "PN_bEmBltWin_Brns", _PosX, _PosY , _Opi , _MSize , _MSize);
|
||
} else {
|
||
this.SetSprite(_PicNo, BtlPic + "PN_bEmBltWin", _PosX, _PosY , _Opi , _MSize , _MSize);
|
||
let _ckSkill = $dataSkills[_DoNo];
|
||
let _SetStr = "PN_Cost_";
|
||
let _astr = "";
|
||
_astr += _ColStr;
|
||
let _MpCost = _ckSkill.mpCost;
|
||
if(_ckSkill.tpCost > 0) _MpCost = -_ckSkill.tpCost;
|
||
if (Draw_弾丸Cost != false) _MpCost = Draw_弾丸Cost;
|
||
Draw_弾丸Cost = false;
|
||
if (_MpCost > 0) {
|
||
_SetStr += "m" + _MpCost;
|
||
} else if (_MpCost < 0) {
|
||
_SetStr += "p" + -_MpCost;
|
||
}
|
||
this.SetSprite(_PicNo + 1, BtlPic + _SetStr, _PosX + (177 * _MWari), _PosY , _Opi , _MSize , _MSize);
|
||
if (_ckSkill.iconIndex != 0) {
|
||
_astr += "\\I[" + _ckSkill.iconIndex + "]";
|
||
}
|
||
this.SpriteStr(_PicNo + 2, _astr + _ckSkill.name, 22,
|
||
_PosX + (14 * _MWari), _PosY + (13 * _MWari) , _Opi , _MSize , _MSize);
|
||
}
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_Em弾丸_不明Draw = function(_PicNo ,_PosX , _PosY , _Opi , _MSize){
|
||
_Opi = typeof _Opi !== 'undefined' ? _Opi : 255;
|
||
_MSize = typeof _MSize !== 'undefined' ? _MSize : 100;
|
||
let _MWari = _MSize / 100;
|
||
this.DelSpriteSpan(_PicNo, _PicNo + 2);
|
||
this.SetSprite(_PicNo, BtlPic + "PN_bEmBltWin_brank", _PosX, _PosY , _Opi , _MSize , _MSize);
|
||
this.SpriteStr(_PicNo + 2, "??????", 22,
|
||
_PosX + (14 * _MWari), _PosY + (13 * _MWari) , _Opi , _MSize , _MSize);
|
||
}
|
||
Game_Interpreter.prototype.N_Btl_Em弾丸Move = function(_PicNo , _PosX , _PosY , _Time , _Opi , _MSize){
|
||
_Opi = typeof _Opi !== 'undefined' ? _Opi : 255;
|
||
_MSize = typeof _MSize !== 'undefined' ? _MSize : true;
|
||
if(_MSize != true){
|
||
let _MWari = _MSize / 100;
|
||
this.MoveSprite(_PicNo + 0 , _PosX , _PosY , _Time, _Opi , _MSize , _MSize);
|
||
this.MoveSprite(_PicNo + 1 , _PosX + (177 * _MWari) , _PosY , _Time, _Opi , _MSize , _MSize);
|
||
this.MoveSprite(_PicNo + 2 , _PosX + (14 * _MWari), _PosY + (13 * _MWari) , _Time, _Opi , _MSize , _MSize);
|
||
} else {
|
||
if(GetSpriteData(_PicNo + 0) == null){
|
||
return;
|
||
}
|
||
let _MWari = GetSpriteData(_PicNo + 0)._scaleX / 100;
|
||
this.MoveSprite(_PicNo + 0 , _PosX , _PosY , _Time, _Opi , true , true);
|
||
this.MoveSprite(_PicNo + 1 , _PosX + (177 * _MWari) , _PosY , _Time, _Opi , true , true);
|
||
this.MoveSprite(_PicNo + 2 , _PosX + (14 * _MWari), _PosY + (13 * _MWari) , _Time, _Opi , true , true);
|
||
}
|
||
}
|