mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08:00
Merge pull request #184 from N-Field/patch-lv5
improve Dais for Taiko Force Lv5
This commit is contained in:
commit
f53788ee27
@ -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 = {}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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]
|
||||
|
@ -46,6 +46,10 @@ class Settings{
|
||||
"video": 0,
|
||||
"drumSounds": true
|
||||
}
|
||||
},
|
||||
easierBigNotes: {
|
||||
type: "toggle",
|
||||
default: false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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: "기본값으로 재설정",
|
||||
|
Loading…
Reference in New Issue
Block a user