diff --git a/js/data/strings_en.json b/js/data/strings_en.json index 4192f350..b8777a7b 100644 --- a/js/data/strings_en.json +++ b/js/data/strings_en.json @@ -234,6 +234,8 @@ "air_softcap": "Air Soft-Cap", "support_softcap": "Support Soft-Cap", "use_default_w6_air_raid": "Use default World 6 costs for Air Raid", + "enable_anti_sub_raid": "Enable Anti-Sub Air Raid", + "enable_anti_sub_raid_desc": "Used only in event maps, disable if simulating normal world maps", "bucket_count_use": "Count use if HP \u2264 {inp_hp}% OR repair time > {inp_time} hours", "bucket_do_not_count_use": "Do not count if repair time < {inp_time} hours (regardless of above)", "carry_over_ship_hp": "Carry over ship HP between sims unless {img_bucket} conditions (not including \"Do not count if repair time <\")", diff --git a/js/data/strings_ja.json b/js/data/strings_ja.json index 79757570..212d37f5 100644 --- a/js/data/strings_ja.json +++ b/js/data/strings_ja.json @@ -234,6 +234,8 @@ "air_softcap": "航空戦キャップ", "support_softcap": "支援(砲撃)キャップ", "use_default_w6_air_raid": "6面の空襲マスでデフォルトのコストを消費する", + "enable_anti_sub_raid": "空襲マスにおける自艦隊潜水艦への攻撃", + "enable_anti_sub_raid_desc": "2022年春イベ以降のイベント海域では空襲マスにおいて対潜哨戒機を装備した敵艦による自艦隊潜水艦への攻撃が発生します", "bucket_count_use": "HPが {inp_hp}%以下、または入渠が {inp_time} 時間以上でバケツを使用する", "bucket_do_not_count_use": "入渠が {inp_time} 時間未満なら使用しない(上記とは関係なく)", "carry_over_ship_hp": "{img_bucket} の使用条件に合致しない限りHPを持ち越す(不使用条件は含まない)", diff --git a/js/simulator-ui/ui-main.js b/js/simulator-ui/ui-main.js index 56b5b61c..3925c5e2 100644 --- a/js/simulator-ui/ui-main.js +++ b/js/simulator-ui/ui-main.js @@ -43,7 +43,7 @@ var MECHANICS_LIST = [ { key: 'eqBonusASW', name: 'ASW Use Equipment Bonus' }, { key: 'ffReroll', name: 'Friend Fleet Flagship Reroll' }, { key: 'eqBonusAA', name: 'Anti-Air Use Equipment Bonus' }, - { key: 'antiSubRaid', name: 'Anti-Sub Air Raid' }, + { key: 'antiSubRaid', name: 'Anti-Sub Air Raid', hide: true }, { key: 'enable_ASWPlaneAir', name: 'Autogyro/Liaison Air Battle' }, { key: 'enable_AACIRework', name: 'AACI Rework (Sequential Roll + New Priority)' }, ]; @@ -234,7 +234,7 @@ var UI_MAIN = Vue.createApp({ } } for (let obj of MECHANICS_LIST) { - this.settings.mechanics.push({ key: obj.key, name: obj.name, enabled: true }); + this.settings.mechanics.push({ key: obj.key, name: obj.name, enabled: true, hide: !!obj.hide }); } this.addNewBattle(); @@ -321,6 +321,7 @@ var UI_MAIN = Vue.createApp({ dataReplay = dataHash; dataSave = CONVERT.replayToSave(dataReplay); this.settings.airRaidCostW6 = dataReplay.world == 6; + this.enableAntiSubRaid = !(dataReplay.world < 20); if (localStorage.sim2 && !CONVERT.saveIsEmpty(JSON.parse(localStorage.sim2))) { let style = document.createElement('style'); style.innerText = '#divMain > *, #divOther { display: none; }'; @@ -429,6 +430,11 @@ var UI_MAIN = Vue.createApp({ resultsUnderwayTPPer: function() { return Math.round(1000*this.results.perTPRes*this.results.underwayTP)/1000; }, + + enableAntiSubRaid: { + get() { return !!this.settings.mechanics.length && this.settings.mechanics.find(m => m.key == 'antiSubRaid').enabled }, + set(v) { this.settings.mechanics.find(m => m.key == 'antiSubRaid').enabled = v }, + }, }, methods: { addNewBattle: function(indAt) { diff --git a/simulator.html b/simulator.html index eac84e55..7bd4adbf 100644 --- a/simulator.html +++ b/simulator.html @@ -169,7 +169,8 @@

{{$t('settings')}}

- +
+
@@ -193,7 +194,7 @@

{{$t('settings')}}

- +