diff --git a/public/src/js/controller.js b/public/src/js/controller.js index cb20acd..ca7e0c3 100644 --- a/public/src/js/controller.js +++ b/public/src/js/controller.js @@ -60,6 +60,11 @@ class Controller{ this.view = new View(this) this.mekadon = new Mekadon(this, this.game) this.keyboard = new GameInput(this) + if(!autoPlayEnabled && this.multiplayer !== 2){ + this.easierBigNotes = settings.getItem("easierBigNotes") || this.keyboard.keyboard.TaikoForceLv5 + }else{ + this.easierBigNotes = false + } this.drumSounds = settings.getItem("latency").drumSounds this.playedSounds = {} diff --git a/public/src/js/game.js b/public/src/js/game.js index bb790ba..60c02da 100644 --- a/public/src/js/game.js +++ b/public/src/js/game.js @@ -104,7 +104,9 @@ class Game{ circle.beatMSCopied = true } } - if(ms > endTime){ + if(circle.daiFailed && (ms >= circle.daiFailed.ms + this.rules.daiLeniency || ms > endTime)){ + this.checkScore(circle, circle.daiFailed.check) + }else if(ms > endTime){ if(!this.controller.autoPlayEnabled){ if(drumrollNotes){ if(circle.section && circle.timesHit === 0){ @@ -314,7 +316,7 @@ class Game{ var typeDai = type === "daiDon" || type === "daiKa" var keyTime = this.controller.getKeyTime() - var currentTime = keysDon ? keyTime["don"] : keyTime["ka"] + var currentTime = circle.daiFailed ? circle.daiFailed.ms : keysDon ? keyTime["don"] : keyTime["ka"] var relative = currentTime - circle.ms - this.controller.audioLatency if(relative >= this.rules.ok){ @@ -330,14 +332,6 @@ class Game{ } var score = 0 if(keysDon && typeDon || keysKa && typeKa){ - if(typeDai && !keyDai){ - if(!circle.daiFailed){ - circle.daiFailed = ms - return false - }else if(ms < circle.daiFailed + this.rules.daiLeniency){ - return false - } - } var circleStatus = -1 relative = Math.abs(relative) if(relative < this.rules.good){ @@ -347,6 +341,23 @@ class Game{ }else if(relative < this.rules.bad){ circleStatus = 0 } + if(typeDai && !keyDai){ + if(this.controller.easierBigNotes){ + // Taiko Force Lv5 can't hit both Dons at the same time, so dai offered + keyDai = true + }else if(!circle.daiFailed){ + circle.daiFailed = { + ms: ms, + status: circleStatus, + check: check + } + return false + }else if(ms < circle.daiFailed.ms + this.rules.daiLeniency){ + return false + }else{ + circleStatus = circle.daiFailed.status + } + } if(circleStatus === 230 || circleStatus === 450){ score = circleStatus } diff --git a/public/src/js/keyboard.js b/public/src/js/keyboard.js index 949673b..d13ab7a 100644 --- a/public/src/js/keyboard.js +++ b/public/src/js/keyboard.js @@ -14,12 +14,18 @@ class Keyboard{ "altgr": "altgraph" } this.btn = {} + this.TaikoForceLv5 = false; this.update() pageEvents.keyAdd(this, "all", "both", this.keyEvent.bind(this)) pageEvents.blurAdd(this, this.blurEvent.bind(this)) } + isTaikoForceLv5(kbdSettings){ + // the key of Taiko Force Lv5's PC module looks like this + return (kbdSettings.ka_l[0] === "f") && (kbdSettings.ka_r[0] === "e") && (kbdSettings.don_l[0] === "i") && (kbdSettings.don_r[0] === "j"); + } update(){ var kbdSettings = settings.getItem("keyboardSettings") + this.TaikoForceLv5 = this.isTaikoForceLv5(kbdSettings) var drumKeys = {} for(var name in kbdSettings){ var keys = kbdSettings[name] diff --git a/public/src/js/settings.js b/public/src/js/settings.js index b2deaef..c52dcd1 100644 --- a/public/src/js/settings.js +++ b/public/src/js/settings.js @@ -46,6 +46,10 @@ class Settings{ "video": 0, "drumSounds": true } + }, + easierBigNotes: { + type: "toggle", + default: false } } diff --git a/public/src/js/strings.js b/public/src/js/strings.js index 4ff9367..2b76c46 100644 --- a/public/src/js/strings.js +++ b/public/src/js/strings.js @@ -151,6 +151,9 @@ video: "Video", drumSounds: "Drum Sounds" }, + easierBigNotes: { + name: "簡単な大きな音符" + }, on: "オン", off: "オフ", default: "既定値にリセット", @@ -343,6 +346,9 @@ function StringsEn(){ video: "Video", drumSounds: "Drum Sounds" }, + easierBigNotes: { + name: "Easier Big Notes" + }, on: "On", off: "Off", default: "Reset to Defaults", @@ -535,6 +541,9 @@ function StringsCn(){ video: "Video", drumSounds: "Drum Sounds" }, + easierBigNotes: { + name: "简单的大音符" + }, on: "开", off: "关", default: "重置为默认值", @@ -727,6 +736,9 @@ function StringsTw(){ video: "Video", drumSounds: "Drum Sounds" }, + easierBigNotes: { + name: "簡單的大音符" + }, on: "開", off: "關", default: "重置為默認值", @@ -919,6 +931,9 @@ function StringsKo(){ video: "Video", drumSounds: "Drum Sounds" }, + easierBigNotes: { + name: "쉬운 큰 음표" + }, on: "온", off: "오프", default: "기본값으로 재설정",