danoniplus 28.6.1 → 29.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js/danoni_main.js CHANGED
@@ -4,12 +4,12 @@
4
4
  *
5
5
  * Source by tickle
6
6
  * Created : 2018/10/08
7
- * Revised : 2022/11/04
7
+ * Revised : 2022/11/05
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 28.6.1`;
12
- const g_revisedDate = `2022/11/04`;
11
+ const g_version = `Ver 29.1.0`;
12
+ const g_revisedDate = `2022/11/05`;
13
13
  const g_alphaVersion = ``;
14
14
 
15
15
  // カスタム用バージョン (danoni_custom.js 等で指定可)
@@ -1809,7 +1809,7 @@ const initialControl = async () => {
1809
1809
  });
1810
1810
 
1811
1811
  // デフォルトのカラー・シャッフルグループ設定を退避
1812
- [`color`, `shuffle`].forEach(type => {
1812
+ g_keycons.groups.forEach(type => {
1813
1813
  const tmpName = Object.keys(g_keyObj).filter(val => val.startsWith(type));
1814
1814
  tmpName.forEach(property => g_keyObj[`${property}d`] = structuredClone(g_keyObj[property]));
1815
1815
  });
@@ -2485,8 +2485,9 @@ const headerConvert = _dosObj => {
2485
2485
  obj.artistNames = [];
2486
2486
  obj.musicNos = [];
2487
2487
 
2488
- if (hasVal(_dosObj.musicTitle)) {
2489
- const musicData = splitLF2(_dosObj.musicTitle);
2488
+ const dosMusicTitle = _dosObj[`musicTitle${g_localeObj.val}`] ?? _dosObj.musicTitle;
2489
+ if (hasVal(dosMusicTitle)) {
2490
+ const musicData = splitLF2(dosMusicTitle);
2490
2491
 
2491
2492
  if (hasVal(_dosObj.musicNo)) {
2492
2493
  obj.musicNos = _dosObj.musicNo.split(`$`);
@@ -2766,7 +2767,7 @@ const headerConvert = _dosObj => {
2766
2767
  }
2767
2768
 
2768
2769
  // ハッシュタグ
2769
- obj.hashTag = setVal(_dosObj.hashTag, ``);
2770
+ obj.hashTag = _dosObj.hashTag ?? ``;
2770
2771
 
2771
2772
  // 自動プリロードの設定
2772
2773
  obj.autoPreload = setBoolVal(_dosObj.autoPreload, true);
@@ -3317,15 +3318,8 @@ const getGaugeSetting = (_dosObj, _name, _difLength, { scoreId = 0 } = {}) => {
3317
3318
  gaugeCreateFlg = setGaugeDetails(scoreId, _dosObj[`gauge${_name}`].split(`,`));
3318
3319
  } else {
3319
3320
  const gauges = splitLF2(_dosObj[`gauge${_name}`]);
3320
- const gHeaderLen = gauges.length;
3321
- for (let j = 0; j < gHeaderLen; j++) {
3322
- gaugeCreateFlg = setGaugeDetails(j, getGaugeDetailList(j, gauges[j].split(`,`)));
3323
- }
3324
- if (gHeaderLen < _difLength) {
3325
- const defaultGaugeList = gauges[0].split(`,`);
3326
- for (let j = gHeaderLen; j < _difLength; j++) {
3327
- gaugeCreateFlg = setGaugeDetails(j, getGaugeDetailList(j, defaultGaugeList));
3328
- }
3321
+ for (let j = 0; j < _difLength; j++) {
3322
+ gaugeCreateFlg = setGaugeDetails(j, getGaugeDetailList(j, (gauges[j] ?? gauges[0]).split(`,`)));
3329
3323
  }
3330
3324
  }
3331
3325
 
@@ -5018,7 +5012,7 @@ const createOptionWindow = _sprite => {
5018
5012
  const keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`;
5019
5013
 
5020
5014
  // カラーグループ、シャッフルグループの設定
5021
- [`color`, `shuffle`].forEach(type => {
5015
+ g_keycons.groups.forEach(type => {
5022
5016
  resetGroupList(type, keyCtrlPtn);
5023
5017
  if (g_keyObj.currentPtn === -1) {
5024
5018
  const storageKeyName = storageObj[`${type}${addKey}`] || storageObj[`${type}${g_keyObj.currentKey}_-1_-1`];
@@ -5315,7 +5309,7 @@ const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
5315
5309
  g_keyObj[`${header}${copyPtn}`] = g_keyObj[`${header}${basePtn}`];
5316
5310
  });
5317
5311
 
5318
- [`color`, `shuffle`].forEach(type => {
5312
+ g_keycons.groups.forEach(type => {
5319
5313
  let maxPtn = 0;
5320
5314
  while (g_keyObj[`${type}${basePtn}_${maxPtn}`] !== undefined) {
5321
5315
  maxPtn++;
@@ -6166,7 +6160,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6166
6160
  g_keyObj.currentPtn = searchPattern(g_keyObj.currentPtn, _sign, g_headerObj.transKeyUse);
6167
6161
 
6168
6162
  // カラーグループ、シャッフルグループの再設定
6169
- [`color`, `shuffle`].forEach(type => resetGroupList(type, `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`));
6163
+ g_keycons.groups.forEach(type => resetGroupList(type, `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`));
6170
6164
 
6171
6165
  // キーコンフィグ画面を再呼び出し
6172
6166
  keyConfigInit();
@@ -8044,7 +8038,7 @@ const getArrowSettings = _ => {
8044
8038
  resetColorType({ _to: g_keycons.colorSelf });
8045
8039
  }
8046
8040
 
8047
- [`color`, `shuffle`].forEach(type => {
8041
+ g_keycons.groups.forEach(type => {
8048
8042
  const groupNum = g_keycons[`${type}GroupNum`];
8049
8043
  storageObj[`${type}${addKey}`] = structuredClone(g_keyObj[`${type}${keyCtrlPtn}_${groupNum}`]);
8050
8044
  g_keyObj[`${type}${g_keyObj.currentKey}_-1_${groupNum}`] = structuredClone(g_keyObj[`${type}${keyCtrlPtn}_${groupNum}d`]);
@@ -8555,8 +8549,10 @@ const mainInit = _ => {
8555
8549
  g_audio.pause();
8556
8550
  clearTimeout(g_timeoutEvtId);
8557
8551
  if (keyIsDown(g_kCdNameObj.shiftKey)) {
8558
- g_gameOverFlg = true;
8559
- g_finishFlg = false;
8552
+ if (g_currentArrows !== g_fullArrows || g_stateObj.lifeMode === C_LFE_BORDER && g_workObj.lifeVal < g_workObj.lifeBorder) {
8553
+ g_gameOverFlg = true;
8554
+ g_finishFlg = false;
8555
+ }
8560
8556
  resultInit();
8561
8557
  } else {
8562
8558
  titleInit();
@@ -9536,7 +9532,7 @@ const judgeArrow = _j => {
9536
9532
  if (_difCnt <= g_judgObj.arrowJ[g_judgPosObj.uwan]) {
9537
9533
  const [resultFunc, resultJdg] = checkJudgment(_difCnt);
9538
9534
  resultFunc(_difFrame);
9539
- countFastSlow(_difFrame, g_headerObj.justFrames);
9535
+ countFastSlow(_difFrame);
9540
9536
 
9541
9537
  const stepDivHit = document.querySelector(`#stepHit${_j}`);
9542
9538
  stepDivHit.style.top = `${g_attrObj[arrowName].prevY - parseFloat($id(`stepRoot${_j}`).top) - 15}px`;
@@ -9554,15 +9550,23 @@ const judgeArrow = _j => {
9554
9550
 
9555
9551
  const judgeTargetFrzArrow = _difFrame => {
9556
9552
  const _difCnt = Math.abs(_difFrame);
9557
- if (_difCnt <= g_judgObj.frzJ[g_judgPosObj.sfsf] && !g_attrObj[frzName].judgEndFlg) {
9558
- if (g_headerObj.frzStartjdgUse &&
9559
- (g_workObj.judgFrzHitCnt[_j] === undefined || g_workObj.judgFrzHitCnt[_j] <= fcurrentNo)) {
9553
+ if (_difCnt <= g_judgObj.frzJ[g_judgPosObj.iknai] && !g_attrObj[frzName].judgEndFlg
9554
+ && g_workObj.judgFrzHitCnt[_j] <= fcurrentNo) {
9555
+
9556
+ if (g_headerObj.frzStartjdgUse) {
9560
9557
  const [resultFunc] = checkJudgment(_difCnt);
9561
9558
  resultFunc(_difFrame);
9562
- countFastSlow(_difFrame, g_headerObj.justFrames);
9563
- g_workObj.judgFrzHitCnt[_j] = fcurrentNo + 1;
9559
+ } else {
9560
+ displayDiff(_difFrame, `F`);
9561
+ }
9562
+ countFastSlow(_difFrame);
9563
+
9564
+ if (_difCnt <= g_judgObj.frzJ[g_judgPosObj.sfsf]) {
9565
+ changeHitFrz(_j, fcurrentNo, `frz`);
9566
+ } else {
9567
+ changeFailedFrz(_j, fcurrentNo);
9564
9568
  }
9565
- changeHitFrz(_j, fcurrentNo, `frz`);
9569
+ g_workObj.judgFrzHitCnt[_j] = fcurrentNo + 1;
9566
9570
  return true;
9567
9571
  }
9568
9572
  return false;
@@ -9584,9 +9588,10 @@ const judgeArrow = _j => {
9584
9588
  /**
9585
9589
  * タイミングズレを表示
9586
9590
  * @param {number} _difFrame
9591
+ * @param {string} _fjdg
9587
9592
  * @param {number} _justFrames
9588
9593
  */
9589
- const displayDiff = (_difFrame, _justFrames = 0) => {
9594
+ const displayDiff = (_difFrame, _fjdg = ``, _justFrames = g_headerObj.justFrames) => {
9590
9595
  let diffJDisp = ``;
9591
9596
  g_workObj.diffList.push(_difFrame);
9592
9597
  const difCnt = Math.abs(_difFrame);
@@ -9595,7 +9600,7 @@ const displayDiff = (_difFrame, _justFrames = 0) => {
9595
9600
  } else if (_difFrame < _justFrames * (-1)) {
9596
9601
  diffJDisp = `<span class="common_shobon">Slow ${difCnt} Frames</span>`;
9597
9602
  }
9598
- diffJ.innerHTML = diffJDisp;
9603
+ document.getElementById(`diff${_fjdg}J`).innerHTML = diffJDisp;
9599
9604
  };
9600
9605
 
9601
9606
  /**
@@ -9603,7 +9608,7 @@ const displayDiff = (_difFrame, _justFrames = 0) => {
9603
9608
  * @param {number} _difFrame
9604
9609
  * @param {number} _justFrames
9605
9610
  */
9606
- const countFastSlow = (_difFrame, _justFrames = 0) => {
9611
+ const countFastSlow = (_difFrame, _justFrames = g_headerObj.justFrames) => {
9607
9612
  if (_difFrame > _justFrames) {
9608
9613
  g_resultObj.fast++;
9609
9614
  } else if (_difFrame < _justFrames * (-1)) {
@@ -9658,13 +9663,13 @@ const lifeDamage = _ => {
9658
9663
  * 判定キャラクタの表示、判定済矢印数・判定数のカウンタ
9659
9664
  * @param {string} _name
9660
9665
  * @param {string} _character
9661
- * @param {string} _freezeFlg
9666
+ * @param {string} _fjdg
9662
9667
  */
9663
- const changeJudgeCharacter = (_name, _character, _freezeFlg = ``) => {
9668
+ const changeJudgeCharacter = (_name, _character, _fjdg = ``) => {
9664
9669
  g_resultObj[_name]++;
9665
9670
  g_currentArrows++;
9666
- document.querySelector(`#chara${_freezeFlg}J`).innerHTML = `<span class="common_${_name}">${_character}</span>`;
9667
- document.querySelector(`#chara${_freezeFlg}J`).setAttribute(`cnt`, C_FRM_JDGMOTION);
9671
+ document.querySelector(`#chara${_fjdg}J`).innerHTML = `<span class="common_${_name}">${_character}</span>`;
9672
+ document.querySelector(`#chara${_fjdg}J`).setAttribute(`cnt`, C_FRM_JDGMOTION);
9668
9673
  document.querySelector(`#lbl${toCapitalize(_name)}`).textContent = g_resultObj[_name];
9669
9674
  };
9670
9675
 
@@ -9688,7 +9693,7 @@ const judgeRecovery = (_name, _difFrame) => {
9688
9693
  changeJudgeCharacter(_name, g_lblNameObj[`j_${_name}`]);
9689
9694
 
9690
9695
  updateCombo();
9691
- displayDiff(_difFrame, g_headerObj.justFrames);
9696
+ displayDiff(_difFrame);
9692
9697
 
9693
9698
  lifeRecovery();
9694
9699
  finishViewing();
@@ -9730,7 +9735,7 @@ const judgeMatari = _difFrame => {
9730
9735
  changeJudgeCharacter(`matari`, g_lblNameObj.j_matari);
9731
9736
  comboJ.textContent = ``;
9732
9737
 
9733
- displayDiff(_difFrame, g_headerObj.justFrames);
9738
+ displayDiff(_difFrame);
9734
9739
  finishViewing();
9735
9740
 
9736
9741
  g_customJsObj.judg_matari.forEach(func => func(_difFrame));
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2022/10/20 (v28.4.0)
8
+ * Revised : 2022/11/05 (v29.0.1)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -845,6 +845,8 @@ const g_keycons = {
845
845
  shuffleGroups: [0],
846
846
  shuffleGroupNum: 0,
847
847
  groupSelf: `S`,
848
+
849
+ groups: [`color`, `shuffle`],
848
850
  };
849
851
 
850
852
  let g_displays = [`stepZone`, `judgment`, `fastSlow`, `lifeGauge`, `score`, `musicInfo`, `filterLine`,
@@ -2566,7 +2568,7 @@ const g_keyObj = {
2566
2568
  const keyCtrlName = Object.keys(g_keyObj).filter(val => val.startsWith(`keyCtrl`));
2567
2569
  keyCtrlName.forEach(property => g_keyObj[`${property}d`] = copyArray2d(g_keyObj[property]));
2568
2570
 
2569
- [`color`, `shuffle`].forEach(type => {
2571
+ g_keycons.groups.forEach(type => {
2570
2572
  const tmpName = Object.keys(g_keyObj).filter(val => val.startsWith(type) && val.endsWith(`_0`));
2571
2573
  tmpName.forEach(property => g_keyObj[`${property.slice(0, -2)}`] = g_keyObj[property].concat());
2572
2574
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "28.6.1",
3
+ "version": "29.1.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {