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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
MyCard
Neos
Commits
eb51fd10
Commit
eb51fd10
authored
May 19, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix small
parent
05f29ab5
Pipeline
#21740
passed with stages
in 13 minutes and 45 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
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/service/duel/draw.ts
View file @
eb51fd10
import
{
ygopro
}
from
"
@/api
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
sleep
}
from
"
@/infra
"
;
import
{
fetchEsHintMeta
,
matStore
}
from
"
@/stores
"
;
import
{
fetchEsHintMeta
,
matStore
}
from
"
@/stores
"
;
import
{
zip
}
from
"
@/ui/Duel/utils
"
;
import
{
zip
}
from
"
@/ui/Duel/utils
"
;
export
default
(
draw
:
ygopro
.
StocGameMessage
.
MsgDraw
)
=>
{
export
default
async
(
draw
:
ygopro
.
StocGameMessage
.
MsgDraw
)
=>
{
fetchEsHintMeta
({
originMsg
:
"
玩家抽卡时
"
});
fetchEsHintMeta
({
originMsg
:
"
玩家抽卡时
"
});
const
deckLength
=
matStore
.
decks
.
of
(
draw
.
player
).
length
;
const
deckLength
=
matStore
.
decks
.
of
(
draw
.
player
).
length
;
...
@@ -19,9 +20,9 @@ export default (draw: ygopro.StocGameMessage.MsgDraw) => {
...
@@ -19,9 +20,9 @@ export default (draw: ygopro.StocGameMessage.MsgDraw) => {
.
of
(
draw
.
player
)
.
of
(
draw
.
player
)
.
add
(
data
,
ygopro
.
CardPosition
.
FACEUP_ATTACK
,
true
);
.
add
(
data
,
ygopro
.
CardPosition
.
FACEUP_ATTACK
,
true
);
setTimeout
(()
=>
{
await
sleep
(
500
);
for
(
const
hand
of
matStore
.
hands
.
of
(
draw
.
player
))
{
hand
.
focus
=
false
;
for
(
const
hand
of
matStore
.
hands
.
of
(
draw
.
player
))
{
}
hand
.
focus
=
false
;
}
,
500
);
}
};
};
src/service/duel/gameMsg.ts
View file @
eb51fd10
...
@@ -70,7 +70,7 @@ export default async function handleGameMsg(pb: ygopro.YgoStocMsg) {
...
@@ -70,7 +70,7 @@ export default async function handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
break
;
}
}
case
"
draw
"
:
{
case
"
draw
"
:
{
onMsgDraw
(
msg
.
draw
);
await
onMsgDraw
(
msg
.
draw
);
break
;
break
;
}
}
...
...
src/service/duel/move.ts
View file @
eb51fd10
...
@@ -110,10 +110,7 @@ export default async (move: MsgMove) => {
...
@@ -110,10 +110,7 @@ export default async (move: MsgMove) => {
);
);
await
sleep
(
NeosConfig
.
ui
.
moveDelay
);
await
sleep
(
NeosConfig
.
ui
.
moveDelay
);
// 因为手牌可能会洗牌,sequence就对不上了,所以这里把所有手牌的focus字段都设置成false
matStore
.
in
(
to
.
location
).
of
(
to
.
controler
)[
to
.
sequence
].
focus
=
false
;
for
(
const
hand
of
matStore
.
in
(
to
.
location
).
of
(
to
.
controler
))
{
hand
.
focus
=
false
;
}
}
}
break
;
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