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
b7d038b3
Commit
b7d038b3
authored
Jun 04, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix block in move
parent
16155b29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
src/service/duel/move.ts
src/service/duel/move.ts
+6
-8
No files found.
src/service/duel/move.ts
View file @
b7d038b3
...
@@ -156,17 +156,15 @@ export default async (move: MsgMove) => {
...
@@ -156,17 +156,15 @@ export default async (move: MsgMove) => {
target
.
location
=
to
;
target
.
location
=
to
;
// 维护完了之后,开始动画
// 维护完了之后,开始动画
const
promises
:
Promise
<
unknown
>
[]
=
[];
await
eventbus
.
call
(
Task
.
Move
,
target
.
uuid
);
promises
.
push
(
eventbus
.
call
(
Task
.
Move
,
target
.
uuid
));
// 如果from或者to是手卡,那么需要刷新除了这张卡之外,这个玩家的所有手卡
// 如果from或者to是手卡,那么需要刷新除了这张卡之外,这个玩家的所有手卡
if
([
from
.
zone
,
to
.
zone
].
includes
(
HAND
))
{
if
([
from
.
zone
,
to
.
zone
].
includes
(
HAND
))
{
cardStore
.
at
(
HAND
,
target
.
location
.
controller
).
forEach
((
card
)
=>
{
for
(
const
card
of
cardStore
.
at
(
HAND
,
target
.
location
.
controller
))
{
if
(
card
.
uuid
!==
target
.
uuid
)
if
(
card
.
uuid
!==
target
.
uuid
)
{
promises
.
push
(
eventbus
.
call
(
Task
.
Move
,
card
.
uuid
));
await
eventbus
.
call
(
Task
.
Move
,
card
.
uuid
);
});
}
}
}
}
// FIXME: 当和AI联机对战,且AI先手时,下面这个`await`会block住
await
Promise
.
all
(
promises
);
// 超量素材位置跟随超量怪兽移动
// 超量素材位置跟随超量怪兽移动
if
(
from
.
zone
==
MZONE
&&
!
from
.
is_overlay
)
{
if
(
from
.
zone
==
MZONE
&&
!
from
.
is_overlay
)
{
...
...
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