Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
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
love_飞影
Neos
Commits
7bc9f266
Commit
7bc9f266
authored
May 19, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/move' into 'main'
fix small See merge request
mycard/Neos!199
parents
05f29ab5
186a49c7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
13 deletions
+9
-13
src/infra/stream.ts
src/infra/stream.ts
+0
-2
src/service/duel/draw.ts
src/service/duel/draw.ts
+7
-6
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+1
-1
src/service/duel/move.ts
src/service/duel/move.ts
+1
-4
No files found.
src/infra/stream.ts
View file @
7bc9f266
import
handleSocketMessage
from
"
@/service/onSocketMessage
"
;
import
{
sleep
}
from
"
./sleep
"
;
const
SLEEP_INTERVAL
=
200
;
...
...
src/service/duel/draw.ts
View file @
7bc9f266
import
{
ygopro
}
from
"
@/api
"
;
import
{
sleep
}
from
"
@/infra
"
;
import
{
fetchEsHintMeta
,
matStore
}
from
"
@/stores
"
;
import
{
zip
}
from
"
@/ui/Duel/utils
"
;
export
default
(
draw
:
ygopro
.
StocGameMessage
.
MsgDraw
)
=>
{
export
default
async
(
draw
:
ygopro
.
StocGameMessage
.
MsgDraw
)
=>
{
fetchEsHintMeta
({
originMsg
:
"
玩家抽卡时
"
});
const
deckLength
=
matStore
.
decks
.
of
(
draw
.
player
).
length
;
...
...
@@ -19,9 +20,9 @@ export default (draw: ygopro.StocGameMessage.MsgDraw) => {
.
of
(
draw
.
player
)
.
add
(
data
,
ygopro
.
CardPosition
.
FACEUP_ATTACK
,
true
);
setTimeout
(()
=>
{
for
(
const
hand
of
matStore
.
hands
.
of
(
draw
.
player
))
{
hand
.
focus
=
false
;
}
}
,
500
);
await
sleep
(
500
);
for
(
const
hand
of
matStore
.
hands
.
of
(
draw
.
player
))
{
hand
.
focus
=
false
;
}
};
src/service/duel/gameMsg.ts
View file @
7bc9f266
...
...
@@ -70,7 +70,7 @@ export default async function handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
case
"
draw
"
:
{
onMsgDraw
(
msg
.
draw
);
await
onMsgDraw
(
msg
.
draw
);
break
;
}
...
...
src/service/duel/move.ts
View file @
7bc9f266
...
...
@@ -110,10 +110,7 @@ export default async (move: MsgMove) => {
);
await
sleep
(
NeosConfig
.
ui
.
moveDelay
);
// 因为手牌可能会洗牌,sequence就对不上了,所以这里把所有手牌的focus字段都设置成false
for
(
const
hand
of
matStore
.
in
(
to
.
location
).
of
(
to
.
controler
))
{
hand
.
focus
=
false
;
}
matStore
.
in
(
to
.
location
).
of
(
to
.
controler
)[
to
.
sequence
].
focus
=
false
;
}
break
;
}
...
...
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