danoniplus 32.3.0 → 32.4.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.
@@ -4,7 +4,7 @@
4
4
  本体cssファイル
5
5
 
6
6
  Created : 2018/10/08
7
- Revised : 2022/10/16 (v28.3.1)
7
+ Revised : 2023/06/09 (v32.4.0)
8
8
 
9
9
  https://github.com/cwtickle/danoniplus
10
10
  ------------------------------------------ */
@@ -295,12 +295,13 @@ input[type="color"] {
295
295
 
296
296
  .settings_gaugeDivCover {
297
297
  border: 1px #666666 solid;
298
- width: 280px;
298
+ width: 305px;
299
+ line-height: 14px;
299
300
  }
300
301
 
301
302
  .settings_gaugeDivTable {
302
303
  display: table;
303
- width: 279px;
304
+ width: 304px;
304
305
  }
305
306
 
306
307
  .settings_gaugeDivTableCol {
@@ -313,7 +314,7 @@ input[type="color"] {
313
314
  }
314
315
 
315
316
  .settings_gaugeEtc {
316
- width: 65px;
317
+ width: 55px;
317
318
  }
318
319
 
319
320
  /* ライフゲージボーダー */
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 : 2023/06/02
7
+ * Revised : 2023/06/09
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 32.3.0`;
12
- const g_revisedDate = `2023/06/02`;
11
+ const g_version = `Ver 32.4.0`;
12
+ const g_revisedDate = `2023/06/09`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -5503,22 +5503,42 @@ const gaugeChange = _gaugeNum => {
5503
5503
 
5504
5504
  /**
5505
5505
  * ゲージ設定の詳細表示を整形
5506
+ * @param {string} _mode
5507
+ * @param {number} _border
5508
+ * @param {number} _rcv
5509
+ * @param {number} _dmg
5510
+ * @param {number} _init
5511
+ * @param {string} _lifeValFlg
5512
+ * @returns
5506
5513
  */
5507
5514
  const gaugeFormat = (_mode, _border, _rcv, _dmg, _init, _lifeValFlg) => {
5508
5515
  const initVal = g_headerObj.maxLifeVal * _init / 100;
5509
- const borderVal = (_mode === C_LFE_BORDER && _border !== 0 ?
5510
- Math.round(g_headerObj.maxLifeVal * _border / 100) : `-`);
5516
+ const borderVal = g_headerObj.maxLifeVal * _border / 100;
5517
+
5518
+ // 整形用にライフ初期値を整数、回復・ダメージ量を小数第1位で丸める
5519
+ const init = Math.round(initVal);
5520
+ const borderText = (_mode === C_LFE_BORDER && _border !== 0 ? Math.round(borderVal) : `-`);
5521
+ const toFixed2 = _val => Math.round(_val * 100) / 100;
5522
+
5523
+ let rcvText = toFixed2(_rcv), dmgText = toFixed2(_dmg);
5524
+ let realRcv = _rcv, realDmg = _dmg;
5525
+ const allCnt = sumData(g_detailObj.arrowCnt[g_stateObj.scoreId]) +
5526
+ (g_headerObj.frzStartjdgUse ? 2 : 1) * sumData(g_detailObj.frzCnt[g_stateObj.scoreId]);
5511
5527
 
5512
- let lifeValCss = ``;
5513
5528
  if (_lifeValFlg === C_FLG_ON) {
5514
- lifeValCss = ` settings_lifeVal`;
5529
+ rcvText = ``, dmgText = ``;
5530
+ if (allCnt > 0) {
5531
+ realRcv = Math.min(calcLifeVal(_rcv, allCnt), g_headerObj.maxLifeVal);
5532
+ realDmg = Math.min(calcLifeVal(_dmg, allCnt), g_headerObj.maxLifeVal);
5533
+ rcvText = `${toFixed2(realRcv)}<br>`;
5534
+ dmgText = `${toFixed2(realDmg)}<br>`;
5535
+ }
5536
+ rcvText += `<span class="settings_lifeVal">(${toFixed2(_rcv)})</span>`;
5537
+ dmgText += `<span class="settings_lifeVal">(${toFixed2(_dmg)})</span>`;
5515
5538
  }
5516
5539
 
5517
- // 整形用にライフ初期値を整数、回復・ダメージ量を小数第1位で丸める
5518
- const init = Math.round(initVal);
5519
- const border = (borderVal !== `-` ? borderVal : `-`);
5520
- const rcv = Math.round(_rcv * 100) / 100;
5521
- const dmg = Math.round(_dmg * 100) / 100;
5540
+ // 達成率(Accuracy)・許容ミス数の計算
5541
+ const [rateText, allowableCntsText] = getAccuracy(borderVal, realRcv, realDmg, initVal, allCnt);
5522
5542
 
5523
5543
  return `<div id="gaugeDivCover" class="settings_gaugeDivCover">
5524
5544
  <div id="lblGaugeDivTable" class="settings_gaugeDivTable">
@@ -5534,25 +5554,57 @@ const gaugeFormat = (_mode, _border, _rcv, _dmg, _init, _lifeValFlg) => {
5534
5554
  <div id="lblGaugeDamage" class="settings_gaugeDivTableCol settings_gaugeEtc">
5535
5555
  ${g_lblNameObj.g_damage}
5536
5556
  </div>
5557
+ <div id="lblGaugeRate" class="settings_gaugeDivTableCol settings_gaugeEtc">
5558
+ ${g_lblNameObj.g_rate}
5559
+ </div>
5537
5560
  </div>
5538
5561
  <div id="dataGaugeDivTable" class="settings_gaugeDivTable">
5539
5562
  <div id="dataGaugeStart" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeStart">
5540
5563
  ${init}/${g_headerObj.maxLifeVal}
5541
5564
  </div>
5542
5565
  <div id="dataGaugeBorder" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc">
5543
- ${border}
5566
+ ${borderText}
5544
5567
  </div>
5545
- <div id="dataGaugeRecovery" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc${lifeValCss}">
5546
- ${rcv}
5568
+ <div id="dataGaugeRecovery" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc">
5569
+ ${rcvText}
5547
5570
  </div>
5548
- <div id="dataGaugeDamage" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc${lifeValCss}">
5549
- ${dmg}
5571
+ <div id="dataGaugeDamage" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc">
5572
+ ${dmgText}
5573
+ </div>
5574
+ <div id="dataGaugeRate" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc" title="${allowableCntsText}">
5575
+ ${rateText}
5550
5576
  </div>
5551
5577
  </div>
5552
5578
  </div>
5553
5579
  `;
5554
5580
  };
5555
5581
 
5582
+ /**
5583
+ * 達成率、許容ミス数の取得
5584
+ * @param {number} _border
5585
+ * @param {number} _rcv
5586
+ * @param {number} _dmg
5587
+ * @param {number} _init
5588
+ * @param {number} _allCnt
5589
+ * @returns
5590
+ */
5591
+ const getAccuracy = (_border, _rcv, _dmg, _init, _allCnt) => {
5592
+ const justPoint = _rcv + _dmg > 0 ? Math.max(_border - _init + _dmg * _allCnt, 0) / (_rcv + _dmg) : 0;
5593
+ const minRecovery = (_border === 0 ? Math.floor(justPoint + 1) : Math.ceil(justPoint));
5594
+ const rate = Math.max(minRecovery / _allCnt * 100, 0);
5595
+ let rateText = _allCnt > 0 ? (rate <= 100 ? `${rate.toFixed(2)}%` : `<span class="settings_lifeVal">${rate.toFixed(2)}%</span>`) : `----`;
5596
+
5597
+ // 許容ミス数の計算
5598
+ const allowableCnts = Math.min(_allCnt - minRecovery, _allCnt);
5599
+ let allowableCntsText = _allCnt > 0 ? (allowableCnts >= 0 ? `${allowableCnts}miss↓` : `Impossible (${allowableCnts}miss)`) : ``;
5600
+
5601
+ if ((_rcv === 0 && _dmg === 0) || _rcv < 0 || _dmg < 0) {
5602
+ rateText = `----`;
5603
+ allowableCntsText = ``;
5604
+ }
5605
+ return [rateText, allowableCntsText];
5606
+ };
5607
+
5556
5608
  /**
5557
5609
  * 保存済みキーコンフィグ取得処理
5558
5610
  * @param {object} _localStorage 保存先のローカルストレージ名
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2023/06/02 (v32.3.0)
8
+ * Revised : 2023/06/09 (v32.4.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -256,7 +256,7 @@ const updateWindowSiz = _ => {
256
256
  x: 160, y: 0, w: 90, h: 21, siz: g_limitObj.difSelectorSiz, borderStyle: `solid`,
257
257
  },
258
258
  lblGauge2: {
259
- x: g_limitObj.setLblLeft - 35, y: g_limitObj.setLblHeight,
259
+ x: g_limitObj.setLblLeft - 55, y: g_limitObj.setLblHeight,
260
260
  w: g_limitObj.setLblWidth + 60, h: g_limitObj.setLblHeight * 2, siz: 11,
261
261
  },
262
262
  lnkFadein: {
@@ -2632,6 +2632,7 @@ const g_lblNameObj = {
2632
2632
  g_border: `Border`,
2633
2633
  g_recovery: `Recovery`,
2634
2634
  g_damage: `Damage`,
2635
+ g_rate: `Accuracy`,
2635
2636
 
2636
2637
  s_speed: `Speed`,
2637
2638
  s_boost: `Boost`,
@@ -2868,7 +2869,7 @@ const g_lang_msgObj = {
2868
2869
  scroll: `各レーンのスクロール方向をパターンに沿って設定します。\nReverse:ONでスクロール方向を反転します。`,
2869
2870
  shuffle: `譜面を左右反転したり、ランダムにします。\nランダムにした場合は別譜面扱いとなり、ハイスコアは保存されません。`,
2870
2871
  autoPlay: `オートプレイや一部キーを自動で打たせる設定を行います。\nオートプレイ時はハイスコアを保存しません。`,
2871
- gauge: `クリア条件を設定します。\n[Start] ゲージ初期値, [Border] クリア条件(ハイフン時は0),\n[Recovery] 回復量, [Damage] ダメージ量`,
2872
+ gauge: `クリア条件を設定します。\n[Start] ゲージ初期値, [Border] クリア条件(ハイフン時は0),\n[Recovery] 回復量, [Damage] ダメージ量, [Accuracy] クリアに必要な正確率(オンマウスで許容ミス数表示)`,
2872
2873
  adjustment: `曲とのタイミングにズレを感じる場合、\n数値を変えることでフレーム単位のズレを直すことができます。\n外側のボタンは5f刻み、真ん中は1f刻み、内側は0.5f刻みで調整できます。`,
2873
2874
  fadein: `譜面を途中から再生します。\n途中から開始した場合はハイスコアを保存しません。`,
2874
2875
  volume: `ゲーム内の音量を設定します。`,
@@ -2924,7 +2925,7 @@ const g_lang_msgObj = {
2924
2925
  scroll: `Set the scroll direction for each lane according to the pattern.\nIf "Reverse:ON" sets, reverse the scroll direction.`,
2925
2926
  shuffle: `Flip the chart left and right or make it random.\nIf you make it random, it will be treated as other charts and the high score will not be saved.`,
2926
2927
  autoPlay: `Set to auto play and to hit some keys automatically.\nHigh score is not saved during auto play.`,
2927
- gauge: `Set the clear condition.\n[Start] initial value, [Border] borderline value (hyphen means zero),\n[Recovery] recovery amount, [Damage] damage amount`,
2928
+ gauge: `Set the clear condition.\n[Start] initial value, [Border] borderline value (hyphen means zero),\n[Recovery] recovery amount, [Damage] damage amount,\n[Accuracy] accuracy required to clear (mouseover to see the number of allowed mistakes)`,
2928
2929
  adjustment: `If you feel that the timing is out of sync with the music, \nyou can correct the shift in frame units by changing the value.\nThe outer button can be adjusted in 5 frame increments, the middle in 1 frame increments, \nand the inner button in 0.5 frame increments.`,
2929
2930
  fadein: `Plays the chart from the middle.\nIf you start in the middle, the high score will not be saved.`,
2930
2931
  volume: `Set the in-game volume.`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "32.3.0",
3
+ "version": "32.4.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {