Commit 5673cf1a authored by nanahira's avatar nanahira

fix dai handle

parent 9793e51a
...@@ -240,7 +240,7 @@ class Game{ ...@@ -240,7 +240,7 @@ class Game{
this.sectionNotes.push(0) this.sectionNotes.push(0)
this.controller.displayScore(0, true) this.controller.displayScore(0, true)
this.updateCombo(0) this.updateCombo(0)
this.updateGlobalScore(0, 1) this.updateGlobalScore(0, false, false, false);
if(this.controller.multiplayer === 1){ if(this.controller.multiplayer === 1){
p2.send("note", { p2.send("note", {
score: -1 score: -1
...@@ -370,11 +370,7 @@ class Game{ ...@@ -370,11 +370,7 @@ class Game{
this.controller.displayScore(score, true, false) this.controller.displayScore(score, true, false)
} }
this.updateCombo(score) this.updateCombo(score)
var mul = typeDai && keyDai ? 2 : 1; this.updateGlobalScore(score, typeDai, keyDai, circle.gogoTime);
if (this.songData.scoremode === 3 && typeDai) {
mul *= 0.5;
}
this.updateGlobalScore(score, mul, circle.gogoTime);
this.updateCurrentCircle() this.updateCurrentCircle()
if(circle.section){ if(circle.section){
this.resetSection() this.resetSection()
...@@ -643,7 +639,7 @@ class Game{ ...@@ -643,7 +639,7 @@ class Game{
getGlobalScore(){ getGlobalScore(){
return this.globalScore return this.globalScore
} }
updateGlobalScore(score, multiplier, gogoTime){ updateGlobalScore(score, typeDai, keyDai, gogoTime){
// Circle score // Circle score
switch(score){ switch(score){
case 450: case 450:
...@@ -691,9 +687,18 @@ class Game{ ...@@ -691,9 +687,18 @@ class Game{
} else if (this.songData.scoremode == 1) { } else if (this.songData.scoremode == 1) {
score += Math.max(0, Math.floor((Math.min(this.combo, 100) - 1) / 10) * (this.songData.scoremode ? this.songData.scorediff : 100)); score += Math.max(0, Math.floor((Math.min(this.combo, 100) - 1) / 10) * (this.songData.scoremode ? this.songData.scorediff : 100));
} }
let multiplier = 1;
if(gogoTime && this.songData.scoremode !== 3){ if (this.songData.scoremode === 3) {
multiplier *= 1.2 if (typeDai && !keyDai){
multiplier = 0.5;
}
} else {
if (typeDai && keyDai){
multiplier = 2;
}
if(gogoTime){
multiplier *= 1.2;
}
} }
this.globalScore.points += Math.floor(score * multiplier / 10) * 10 this.globalScore.points += Math.floor(score * multiplier / 10) * 10
} }
......
...@@ -44,13 +44,14 @@ class Mekadon{ ...@@ -44,13 +44,14 @@ class Mekadon{
this.controller.displayScore(0, true) this.controller.displayScore(0, true)
this.game.updateCurrentCircle() this.game.updateCurrentCircle()
this.game.updateCombo(0) this.game.updateCombo(0)
this.game.updateGlobalScore(0, 1, circle.gogoTime) this.game.updateGlobalScore(0, false, false, circle.gogoTime)
this.game.sectionNotes.push(0) this.game.sectionNotes.push(0)
return true return true
} }
} }
playNow(circle, score, dai, reverse){ playNow(circle, score, dai, reverse){
var type = circle.type var type = circle.type
var typeDai = type === "daiDon" || type === "daiKa";
var keyDai = false var keyDai = false
var playDai = !dai || dai === 2 var playDai = !dai || dai === 2
var drumrollNotes = type === "balloon" || type === "drumroll" || type === "daiDrumroll" var drumrollNotes = type === "balloon" || type === "drumroll" || type === "daiDrumroll"
...@@ -95,7 +96,7 @@ class Mekadon{ ...@@ -95,7 +96,7 @@ class Mekadon{
}else{ }else{
this.controller.displayScore(score, false, keyDai) this.controller.displayScore(score, false, keyDai)
this.game.updateCombo(score) this.game.updateCombo(score)
this.game.updateGlobalScore(score, keyDai ? 2 : 1, circle.gogoTime) this.game.updateGlobalScore(score, typeDai, keyDai, circle.gogoTime)
this.game.updateCurrentCircle() this.game.updateCurrentCircle()
circle.played(score, keyDai) circle.played(score, keyDai)
if(circle.section){ if(circle.section){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment