Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Taiko Web
Commits
3b5d49ba
Commit
3b5d49ba
authored
May 04, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add score in AC16 as SCOREMODE:3
parent
84e04813
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
52 deletions
+109
-52
public/src/js/autoscore.js
public/src/js/autoscore.js
+85
-39
public/src/js/game.js
public/src/js/game.js
+21
-11
public/src/js/mekadon.js
public/src/js/mekadon.js
+3
-2
No files found.
public/src/js/autoscore.js
View file @
3b5d49ba
...
@@ -70,6 +70,11 @@ class AutoScore {
...
@@ -70,6 +70,11 @@ class AutoScore {
this
.
ScoreInit
=
0
;
this
.
ScoreInit
=
0
;
var
max_init
=
this
.
GetMaxPossibleInit
(
target
);
var
max_init
=
this
.
GetMaxPossibleInit
(
target
);
var
min_init
=
0
;
var
min_init
=
0
;
if
(
this
.
scoremode
===
3
)
{
this
.
ScoreDiff
=
0
;
this
.
ScoreInit
=
max_init
;
return
;
}
while
(
true
)
{
while
(
true
)
{
this
.
ScoreInit
=
(
max_init
+
min_init
)
/
2
;
this
.
ScoreInit
=
(
max_init
+
min_init
)
/
2
;
this
.
ScoreDiff
=
Math
.
round
(
this
.
ScoreInit
/
4
);
this
.
ScoreDiff
=
Math
.
round
(
this
.
ScoreInit
/
4
);
...
@@ -113,15 +118,15 @@ class AutoScore {
...
@@ -113,15 +118,15 @@ class AutoScore {
}
}
if
(
this
.
IsCommonCircle
(
circle
))
{
if
(
this
.
IsCommonCircle
(
circle
))
{
combo
++
;
combo
++
;
if
(
combo
%
100
===
0
&&
this
.
scoremode
!==
1
)
{
if
(
combo
%
100
===
0
&&
this
.
scoremode
===
2
)
{
score
+=
10000
;
score
+=
10000
;
}
}
}
}
var
diff_mul
=
0
;
var
diff_mul
=
0
;
var
multiplier
=
circle
.
gogoTime
?
1.2
:
1
;
var
multiplier
=
(
this
.
scoremode
!==
3
&&
circle
.
gogoTime
)
?
1.2
:
1
;
if
(
this
.
scoremode
===
1
)
{
if
(
this
.
scoremode
===
1
)
{
diff_mul
=
Math
.
max
(
0
,
Math
.
floor
((
Math
.
min
(
combo
,
100
)
-
1
)
/
10
));
diff_mul
=
Math
.
max
(
0
,
Math
.
floor
((
Math
.
min
(
combo
,
100
)
-
1
)
/
10
));
}
else
{
}
else
if
(
this
.
scoremode
===
2
)
{
if
(
combo
>=
100
)
{
if
(
combo
>=
100
)
{
diff_mul
=
8
;
diff_mul
=
8
;
}
else
if
(
combo
>=
50
)
{
}
else
if
(
combo
>=
50
)
{
...
@@ -132,23 +137,42 @@ class AutoScore {
...
@@ -132,23 +137,42 @@ class AutoScore {
diff_mul
=
1
;
diff_mul
=
1
;
}
}
}
}
switch
(
circle
.
type
)
{
if
(
this
.
scoremode
===
3
)
{
case
"
don
"
:
switch
(
circle
.
type
)
{
case
"
ka
"
:
{
case
"
don
"
:
score
+=
Math
.
floor
((
init
+
diff
*
diff_mul
)
*
multiplier
/
10
)
*
10
;
case
"
ka
"
:
break
;
case
"
daiDon
"
:
case
"
daiKa
"
:
{
score
+=
Math
.
floor
(
init
/
10
)
*
10
;
break
;
}
case
"
balloon
"
:
{
score
+=
100
*
circle
.
requiredHits
;
break
;
}
default
:
{
break
;
}
}
}
case
"
daiDon
"
:
}
else
{
case
"
daiKa
"
:
{
switch
(
circle
.
type
)
{
score
+=
Math
.
floor
((
init
+
diff
*
diff_mul
)
*
multiplier
/
5
)
*
10
;
case
"
don
"
:
break
;
case
"
ka
"
:
{
}
score
+=
Math
.
floor
((
init
+
diff
*
diff_mul
)
*
multiplier
/
10
)
*
10
;
case
"
balloon
"
:
{
break
;
score
+=
(
5000
+
300
*
circle
.
requiredHits
)
*
multiplier
;
}
break
;
case
"
daiDon
"
:
}
case
"
daiKa
"
:
{
default
:
{
score
+=
Math
.
floor
((
init
+
diff
*
diff_mul
)
*
multiplier
/
5
)
*
10
;
break
;
break
;
}
case
"
balloon
"
:
{
score
+=
(
5000
+
300
*
(
circle
.
requiredHits
-
1
))
*
multiplier
;
break
;
}
default
:
{
break
;
}
}
}
}
}
}
}
...
@@ -156,6 +180,9 @@ class AutoScore {
...
@@ -156,6 +180,9 @@ class AutoScore {
}
}
GetTargetScore
(
difficulty
,
level
)
{
GetTargetScore
(
difficulty
,
level
)
{
//console.log(difficulty, level)
//console.log(difficulty, level)
if
(
this
.
scoremode
===
3
)
{
return
1000000
;
}
var
ret
=
this
.
basic_max_score_list
[
difficulty
][
level
];
var
ret
=
this
.
basic_max_score_list
[
difficulty
][
level
];
if
(
!
ret
)
{
if
(
!
ret
)
{
ret
=
this
.
basic_max_score_list
[
difficulty
][
0
];
ret
=
this
.
basic_max_score_list
[
difficulty
][
0
];
...
@@ -167,40 +194,59 @@ class AutoScore {
...
@@ -167,40 +194,59 @@ class AutoScore {
for
(
var
circle
of
this
.
circles
)
{
for
(
var
circle
of
this
.
circles
)
{
//alert(this.IsCommonCircle(circle));
//alert(this.IsCommonCircle(circle));
if
(
this
.
IsCommonCircle
(
circle
)
&&
(
!
circle
.
branch
||
circle
.
branch
.
name
===
"
master
"
))
{
if
(
this
.
IsCommonCircle
(
circle
)
&&
(
!
circle
.
branch
||
circle
.
branch
.
name
===
"
master
"
))
{
combo
++
;
++
combo
;
}
}
}
}
return
combo
;
return
combo
;
}
}
GetMaxPossibleInit
(
target
)
{
GetMaxPossibleInit
(
target
)
{
var
basic_score
=
0
;
var
basic_score
=
0
;
if
(
this
.
scoremode
!==
1
)
{
if
(
this
.
scoremode
===
2
)
{
const
max_combo
=
this
.
GetMaxCombo
();
const
max_combo
=
this
.
GetMaxCombo
();
basic_score
+=
Math
.
floor
(
max_combo
/
100
);
basic_score
+=
Math
.
floor
(
max_combo
/
100
)
*
10000
;
}
}
var
combo
=
0
;
var
combo
=
0
;
for
(
var
circle
of
this
.
circles
)
{
for
(
var
circle
of
this
.
circles
)
{
if
(
circle
.
branch
&&
circle
.
branch
.
name
!==
"
master
"
)
{
if
(
circle
.
branch
&&
circle
.
branch
.
name
!==
"
master
"
)
{
continue
;
continue
;
}
}
var
multiplier
=
circle
.
gogoTime
?
1.2
:
1
;
var
multiplier
=
(
circle
.
gogoTime
&&
this
.
scoremode
!==
3
)
?
1.2
:
1
;
switch
(
circle
.
type
)
{
if
(
this
.
scoremode
===
3
)
{
case
"
don
"
:
switch
(
circle
.
type
)
{
case
"
ka
"
:
{
case
"
don
"
:
combo
+=
(
1
*
multiplier
);
case
"
ka
"
:
break
;
case
"
daiDon
"
:
}
case
"
daiKa
"
:
{
case
"
daiDon
"
:
++
combo
;
case
"
daiKa
"
:
{
break
;
combo
+=
(
2
*
multiplier
);
}
break
;
case
"
balloon
"
:
{
basic_score
+=
100
*
this
.
requiredHits
;
break
;
}
default
:
{
break
;
}
}
}
case
"
balloon
"
:
{
}
else
{
basic_score
+=
(
5000
+
300
*
circle
.
requiredHits
)
*
multiplier
;
switch
(
circle
.
type
)
{
break
;
case
"
don
"
:
}
case
"
ka
"
:
{
default
:
{
combo
+=
(
1
*
multiplier
);
break
;
break
;
}
case
"
daiDon
"
:
case
"
daiKa
"
:
{
combo
+=
(
2
*
multiplier
);
break
;
}
case
"
balloon
"
:
{
basic_score
+=
(
5000
+
300
*
(
circle
.
requiredHits
-
1
))
*
multiplier
;
break
;
}
default
:
{
break
;
}
}
}
}
}
}
}
...
...
public/src/js/game.js
View file @
3b5d49ba
...
@@ -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,7 +370,7 @@ class Game{
...
@@ -370,7 +370,7 @@ class Game{
this
.
controller
.
displayScore
(
score
,
true
,
false
)
this
.
controller
.
displayScore
(
score
,
true
,
false
)
}
}
this
.
updateCombo
(
score
)
this
.
updateCombo
(
score
)
this
.
updateGlobalScore
(
score
,
typeDai
&&
keyDai
?
2
:
1
,
circle
.
gogoTime
)
this
.
updateGlobalScore
(
score
,
typeDai
,
keyDai
,
circle
.
gogoTime
);
this
.
updateCurrentCircle
()
this
.
updateCurrentCircle
()
if
(
circle
.
section
){
if
(
circle
.
section
){
this
.
resetSection
()
this
.
resetSection
()
...
@@ -405,9 +405,10 @@ class Game{
...
@@ -405,9 +405,10 @@ class Game{
}
}
return
true
return
true
}
}
checkBalloon
(
circle
){
checkBalloon
(
circle
)
{
var
score
;
if
(
circle
.
timesHit
>=
circle
.
requiredHits
-
1
){
if
(
circle
.
timesHit
>=
circle
.
requiredHits
-
1
){
var
score
=
5000
score
=
this
.
songData
.
scoremode
===
3
?
100
:
5000
;
this
.
updateCurrentCircle
()
this
.
updateCurrentCircle
()
circle
.
hit
()
circle
.
hit
()
circle
.
played
(
score
)
circle
.
played
(
score
)
...
@@ -417,7 +418,7 @@ class Game{
...
@@ -417,7 +418,7 @@ class Game{
})
})
}
}
}
else
{
}
else
{
var
score
=
300
score
=
this
.
songData
.
scoremode
===
3
?
100
:
300
;
circle
.
hit
()
circle
.
hit
()
}
}
this
.
globalScore
.
drumroll
++
this
.
globalScore
.
drumroll
++
...
@@ -453,7 +454,7 @@ class Game{
...
@@ -453,7 +454,7 @@ class Game{
this
.
view
.
drumroll
.
push
(
circleAnim
)
this
.
view
.
drumroll
.
push
(
circleAnim
)
this
.
globalScore
.
drumroll
++
this
.
globalScore
.
drumroll
++
this
.
sectionDrumroll
++
this
.
sectionDrumroll
++
this
.
globalScore
.
points
+=
score
*
(
dai
?
2
:
1
)
this
.
globalScore
.
points
+=
score
*
(
(
dai
&&
this
.
songData
.
scoremode
!==
3
)
?
2
:
1
)
this
.
view
.
setDarkBg
(
false
)
this
.
view
.
setDarkBg
(
false
)
}
}
getLastCircle
(
circles
){
getLastCircle
(
circles
){
...
@@ -638,7 +639,7 @@ class Game{
...
@@ -638,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
:
...
@@ -683,12 +684,21 @@ class Game{
...
@@ -683,12 +684,21 @@ class Game{
diff_mul
=
1
;
diff_mul
=
1
;
}
}
score
+=
this
.
songData
.
scorediff
*
diff_mul
;
score
+=
this
.
songData
.
scorediff
*
diff_mul
;
}
else
{
}
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
){
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
}
}
...
...
public/src/js/mekadon.js
View file @
3b5d49ba
...
@@ -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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment