Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
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
srvpro
Commits
506deafa
Commit
506deafa
authored
Nov 28, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix counting flee
parent
94231f06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
ygopro-server.coffee
ygopro-server.coffee
+3
-2
ygopro-server.js
ygopro-server.js
+4
-2
No files found.
ygopro-server.coffee
View file @
506deafa
...
...
@@ -420,7 +420,7 @@ ROOM_player_get_score = (player)->
score
=
ROOM_players_scores
[
name
]
if
!
score
return
"
#{
player
.
name
}
${random_score_blank}"
total
=
score
.
win
+
score
.
lose
+
score
.
flee
total
=
score
.
win
+
score
.
lose
if
score
.
win
<
2
and
total
<
3
return
"
#{
player
.
name
}
${random_score_not_enough}"
if
score
.
combo
>=
2
...
...
@@ -1237,7 +1237,8 @@ class Room
@
scores
[
client
.
name_vpass
]
=
-
9
if
@
random_type
and
not
client
.
flee_free
and
(
!
settings
.
modules
.
reconnect
.
enabled
or
@
get_disconnected_count
()
==
0
)
ROOM_ban_player
(
client
.
name
,
client
.
ip
,
"${random_ban_reason_flee}"
)
ROOM_player_flee
(
client
.
name_vpass
)
if
settings
.
modules
.
random_duel
.
record_match_scores
and
@
random_type
==
'M'
ROOM_player_flee
(
client
.
name_vpass
)
if
@
players
.
length
and
!
(
@
windbot
and
client
.
is_host
)
and
!
(
@
arena
and
!
@
started
and
client
.
pos
<=
3
)
ygopro
.
stoc_send_chat_to_room
this
,
"
#{
client
.
name
}
${left_game}"
+
if
error
then
":
#{
error
}
"
else
''
roomlist
.
update
(
this
)
if
!
@
windbot
and
!
@
started
and
settings
.
modules
.
http
.
websocket_roomlist
...
...
ygopro-server.js
View file @
506deafa
...
...
@@ -517,7 +517,7 @@
if
(
!
score
)
{
return
player
.
name
+
"
${random_score_blank}
"
;
}
total
=
score
.
win
+
score
.
lose
+
score
.
flee
;
total
=
score
.
win
+
score
.
lose
;
if
(
score
.
win
<
2
&&
total
<
3
)
{
return
player
.
name
+
"
${random_score_not_enough}
"
;
}
...
...
@@ -1598,7 +1598,9 @@
this
.
scores
[
client
.
name_vpass
]
=
-
9
;
if
(
this
.
random_type
&&
!
client
.
flee_free
&&
(
!
settings
.
modules
.
reconnect
.
enabled
||
this
.
get_disconnected_count
()
===
0
))
{
ROOM_ban_player
(
client
.
name
,
client
.
ip
,
"
${random_ban_reason_flee}
"
);
ROOM_player_flee
(
client
.
name_vpass
);
if
(
settings
.
modules
.
random_duel
.
record_match_scores
&&
this
.
random_type
===
'
M
'
)
{
ROOM_player_flee
(
client
.
name_vpass
);
}
}
}
}
...
...
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