Game: Improve gauge

This commit is contained in:
LoveEevee
2020-03-05 18:58:49 +03:00
parent 09c212df8b
commit 41afc2a905
7 changed files with 94 additions and 42 deletions

View File

@@ -18,7 +18,51 @@ class GameRules{
this.bad = 13 / 2 * frame
break
}
switch(this.difficulty){
case "easy":
this.gaugeClear = 30 / 50
break
case "normal":
case "hard":
this.gaugeClear = 35 / 50
break
case "oni":
case "ura":
this.gaugeClear = 40 / 50
break
}
this.daiLeniency = 2 * frame
}
soulPoints(combo){
var good, ok, bad
switch(this.difficulty){
case "easy":
good = Math.floor(10000 / combo * 1.575)
ok = Math.floor(good * 0.75)
bad = Math.ceil(good * -2)
break
case "normal":
good = Math.floor(10000 / combo / 0.7)
ok = Math.floor(good * 0.75)
bad = Math.ceil(good / -0.75)
break
case "hard":
good = Math.floor(10000 / combo * 1.5)
ok = Math.floor(good * 0.75)
bad = Math.ceil(good / -0.8)
break
case "oni":
case "ura":
good = Math.floor(10000 / combo / 0.7)
ok = Math.floor(good * 0.5)
bad = Math.ceil(good * -1.6)
break
}
return {good: good, ok: ok, bad: bad}
}
clearReached(gauge){
var gaugePercent = Math.round(gauge / 200) / 50
return gaugePercent >= this.gaugeClear
}
}