mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 15:31:51 +08:00
improve Dais for Taiko Force Lv5
This commit is contained in:
parent
09c212df8b
commit
2ab0de9644
@ -60,6 +60,7 @@ class Controller{
|
|||||||
this.view = new View(this)
|
this.view = new View(this)
|
||||||
this.mekadon = new Mekadon(this, this.game)
|
this.mekadon = new Mekadon(this, this.game)
|
||||||
this.keyboard = new GameInput(this)
|
this.keyboard = new GameInput(this)
|
||||||
|
this.TaikoForceLv5 = this.keyboard.keyboard.TaikoForceLv5 && !autoPlayEnabled && (this.multiplayer !== 2);
|
||||||
|
|
||||||
this.drumSounds = settings.getItem("latency").drumSounds
|
this.drumSounds = settings.getItem("latency").drumSounds
|
||||||
this.playedSounds = {}
|
this.playedSounds = {}
|
||||||
|
@ -330,8 +330,10 @@ class Game{
|
|||||||
}
|
}
|
||||||
var score = 0
|
var score = 0
|
||||||
if(keysDon && typeDon || keysKa && typeKa){
|
if(keysDon && typeDon || keysKa && typeKa){
|
||||||
if(typeDai && !keyDai){
|
if (typeDai && !keyDai) {
|
||||||
if(!circle.daiFailed){
|
if (this.controller.TaikoForceLv5) { // Taiko Force Lv5 can't hit both Dons at the same time, so dai offered
|
||||||
|
keyDai = true;
|
||||||
|
} else if(!circle.daiFailed){
|
||||||
circle.daiFailed = ms
|
circle.daiFailed = ms
|
||||||
return false
|
return false
|
||||||
}else if(ms < circle.daiFailed + this.rules.daiLeniency){
|
}else if(ms < circle.daiFailed + this.rules.daiLeniency){
|
||||||
|
@ -14,12 +14,19 @@ class Keyboard{
|
|||||||
"altgr": "altgraph"
|
"altgr": "altgraph"
|
||||||
}
|
}
|
||||||
this.btn = {}
|
this.btn = {}
|
||||||
|
this.TaikoForceLv5 = false;
|
||||||
this.update()
|
this.update()
|
||||||
pageEvents.keyAdd(this, "all", "both", this.keyEvent.bind(this))
|
pageEvents.keyAdd(this, "all", "both", this.keyEvent.bind(this))
|
||||||
pageEvents.blurAdd(this, this.blurEvent.bind(this))
|
pageEvents.blurAdd(this, this.blurEvent.bind(this))
|
||||||
}
|
}
|
||||||
|
isTaikoForceLv5(kbdSettings) { // the key of Taiko Force Lv5's PC module looks like this
|
||||||
|
//console.log(kbdSettings);
|
||||||
|
return (kbdSettings.ka_l[0] === "f") && (kbdSettings.ka_r[0] === "e") && (kbdSettings.don_l[0] === "i") && (kbdSettings.don_r[0] === "j");
|
||||||
|
}
|
||||||
update(){
|
update(){
|
||||||
var kbdSettings = settings.getItem("keyboardSettings")
|
var kbdSettings = settings.getItem("keyboardSettings")
|
||||||
|
this.TaikoForceLv5 = this.isTaikoForceLv5(kbdSettings);
|
||||||
|
//console.log("Taiko Force Lv5", this.TaikoForceLv5);
|
||||||
var drumKeys = {}
|
var drumKeys = {}
|
||||||
for(var name in kbdSettings){
|
for(var name in kbdSettings){
|
||||||
var keys = kbdSettings[name]
|
var keys = kbdSettings[name]
|
||||||
|
Loading…
Reference in New Issue
Block a user