Commit 5673cf1a authored by nanahira's avatar nanahira

fix dai handle

parent 9793e51a
......@@ -240,7 +240,7 @@ class Game{
this.sectionNotes.push(0)
this.controller.displayScore(0, true)
this.updateCombo(0)
this.updateGlobalScore(0, 1)
this.updateGlobalScore(0, false, false, false);
if(this.controller.multiplayer === 1){
p2.send("note", {
score: -1
......@@ -370,11 +370,7 @@ class Game{
this.controller.displayScore(score, true, false)
}
this.updateCombo(score)
var mul = typeDai && keyDai ? 2 : 1;
if (this.songData.scoremode === 3 && typeDai) {
mul *= 0.5;
}
this.updateGlobalScore(score, mul, circle.gogoTime);
this.updateGlobalScore(score, typeDai, keyDai, circle.gogoTime);
this.updateCurrentCircle()
if(circle.section){
this.resetSection()
......@@ -643,7 +639,7 @@ class Game{
getGlobalScore(){
return this.globalScore
}
updateGlobalScore(score, multiplier, gogoTime){
updateGlobalScore(score, typeDai, keyDai, gogoTime){
// Circle score
switch(score){
case 450:
......@@ -691,9 +687,18 @@ class Game{
} 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));
}
if(gogoTime && this.songData.scoremode !== 3){
multiplier *= 1.2
let multiplier = 1;
if (this.songData.scoremode === 3) {
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
}
......
......@@ -44,13 +44,14 @@ class Mekadon{
this.controller.displayScore(0, true)
this.game.updateCurrentCircle()
this.game.updateCombo(0)
this.game.updateGlobalScore(0, 1, circle.gogoTime)
this.game.updateGlobalScore(0, false, false, circle.gogoTime)
this.game.sectionNotes.push(0)
return true
}
}
playNow(circle, score, dai, reverse){
var type = circle.type
var typeDai = type === "daiDon" || type === "daiKa";
var keyDai = false
var playDai = !dai || dai === 2
var drumrollNotes = type === "balloon" || type === "drumroll" || type === "daiDrumroll"
......@@ -95,7 +96,7 @@ class Mekadon{
}else{
this.controller.displayScore(score, false, keyDai)
this.game.updateCombo(score)
this.game.updateGlobalScore(score, keyDai ? 2 : 1, circle.gogoTime)
this.game.updateGlobalScore(score, typeDai, keyDai, circle.gogoTime)
this.game.updateCurrentCircle()
circle.played(score, keyDai)
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