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
aae57da1
Commit
aae57da1
authored
Jan 03, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into tcg_random
parents
418ff149
85d8b76d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
ygopro-server.coffee
ygopro-server.coffee
+5
-3
ygopro-server.js
ygopro-server.js
+7
-4
No files found.
ygopro-server.coffee
View file @
aae57da1
...
...
@@ -1254,7 +1254,7 @@ class Room
if
(
param
=
rule
.
match
/(^|,|,)(DUELRULE|MR)(\d+)(,|,|$)/
)
duel_rule
=
parseInt
(
param
[
3
])
if
duel_rule
and
duel_rule
>
0
and
duel_rule
<=
4
if
duel_rule
and
duel_rule
>
0
and
duel_rule
<=
5
@
hostinfo
.
duel_rule
=
duel_rule
if
(
rule
.
match
/(^|,|,)(NOWATCH|NW)(,|,|$)/
)
...
...
@@ -1558,6 +1558,8 @@ class Room
else
for
player
in
@
players
when
player
.
pos
!=
7
@
scores
[
player
.
name_vpass
]
=
-
5
if
@
players
.
length
==
2
@
scores
[
client
.
name_vpass
]
=
-
9
@
arena_score_handled
=
true
index
=
_
.
indexOf
(
@
players
,
client
)
@
players
.
splice
(
index
,
1
)
unless
index
==
-
1
...
...
@@ -2601,8 +2603,6 @@ ygopro.stoc_follow 'GAME_MSG', true, (buffer, info, client, server, datas)->
if
ygopro
.
constants
.
MSG
[
msg
]
==
'START'
playertype
=
buffer
.
readUInt8
(
1
)
client
.
is_first
=
!
(
playertype
&
0xf
)
if
client
.
is_first
and
(
room
.
hostinfo
.
mode
!=
2
or
client
.
pos
==
0
or
client
.
pos
==
2
)
room
.
first_list
[
room
.
duel_count
-
1
]
=
client
.
name_vpass
client
.
lp
=
room
.
hostinfo
.
start_lp
client
.
card_count
=
0
if
room
.
hostinfo
.
mode
!=
2
room
.
duel_stage
=
ygopro
.
constants
.
DUEL_STAGE
.
DUELING
...
...
@@ -2614,6 +2614,8 @@ ygopro.stoc_follow 'GAME_MSG', true, (buffer, info, client, server, datas)->
ygopro
.
stoc_send_chat_to_room
(
room
,
"${death_start_final}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
else
ygopro
.
stoc_send_chat_to_room
(
room
,
"${death_start_extra}"
,
ygopro
.
constants
.
COLORS
.
BABYBLUE
)
if
client
.
is_first
and
(
room
.
hostinfo
.
mode
!=
2
or
client
.
pos
==
0
or
client
.
pos
==
2
)
room
.
first_list
.
push
(
client
.
name_vpass
)
if
settings
.
modules
.
retry_handle
.
enabled
client
.
retry_count
=
0
client
.
last_game_msg
=
null
...
...
ygopro-server.js
View file @
aae57da1
...
...
@@ -1613,7 +1613,7 @@
}
if
((
param
=
rule
.
match
(
/
(
^|,|,
)(
DUELRULE|MR
)(\d
+
)(
,|,|$
)
/
)))
{
duel_rule
=
parseInt
(
param
[
3
]);
if
(
duel_rule
&&
duel_rule
>
0
&&
duel_rule
<=
4
)
{
if
(
duel_rule
&&
duel_rule
>
0
&&
duel_rule
<=
5
)
{
this
.
hostinfo
.
duel_rule
=
duel_rule
;
}
}
...
...
@@ -2042,6 +2042,9 @@
this
.
scores
[
player
.
name_vpass
]
=
-
5
;
}
}
if
(
this
.
players
.
length
===
2
)
{
this
.
scores
[
client
.
name_vpass
]
=
-
9
;
}
}
this
.
arena_score_handled
=
true
;
}
...
...
@@ -3270,9 +3273,6 @@
if
(
ygopro
.
constants
.
MSG
[
msg
]
===
'
START
'
)
{
playertype
=
buffer
.
readUInt8
(
1
);
client
.
is_first
=
!
(
playertype
&
0xf
);
if
(
client
.
is_first
&&
(
room
.
hostinfo
.
mode
!==
2
||
client
.
pos
===
0
||
client
.
pos
===
2
))
{
room
.
first_list
[
room
.
duel_count
-
1
]
=
client
.
name_vpass
;
}
client
.
lp
=
room
.
hostinfo
.
start_lp
;
if
(
room
.
hostinfo
.
mode
!==
2
)
{
client
.
card_count
=
0
;
...
...
@@ -3289,6 +3289,9 @@
}
}
}
if
(
client
.
is_first
&&
(
room
.
hostinfo
.
mode
!==
2
||
client
.
pos
===
0
||
client
.
pos
===
2
))
{
room
.
first_list
.
push
(
client
.
name_vpass
);
}
if
(
settings
.
modules
.
retry_handle
.
enabled
)
{
client
.
retry_count
=
0
;
client
.
last_game_msg
=
null
;
...
...
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