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
277c93c4
Commit
277c93c4
authored
Jun 17, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
2549ef0e
Pipeline
#22279
passed with stages
in 16 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
src/service/duel/toss.ts
src/service/duel/toss.ts
+12
-3
No files found.
src/service/duel/toss.ts
View file @
277c93c4
import
{
fetchStrings
,
ygopro
}
from
"
@/api
"
;
import
{
fetchStrings
,
ygopro
}
from
"
@/api
"
;
import
{
sleep
}
from
"
@/infra
"
;
import
{
matStore
}
from
"
@/stores
"
;
import
{
matStore
}
from
"
@/stores
"
;
import
MsgToss
=
ygopro
.
StocGameMessage
.
MsgToss
;
import
MsgToss
=
ygopro
.
StocGameMessage
.
MsgToss
;
export
default
(
toss
:
MsgToss
)
=>
{
export
default
async
(
toss
:
MsgToss
)
=>
{
const
player
=
toss
.
player
;
const
tossType
=
toss
.
toss_type
;
const
tossType
=
toss
.
toss_type
;
const
prefix
=
fetchStrings
(
"
!system
"
,
matStore
.
isMe
(
player
)
?
102
:
103
);
for
(
const
x
of
toss
.
res
)
{
for
(
const
x
of
toss
.
res
)
{
if
(
tossType
==
MsgToss
.
TossType
.
DICE
)
{
if
(
tossType
==
MsgToss
.
TossType
.
DICE
)
{
matStore
.
tossResult
=
fetchStrings
(
"
!system
"
,
1624
)
+
x
;
matStore
.
tossResult
=
prefix
+
fetchStrings
(
"
!system
"
,
1624
)
+
x
;
}
else
if
(
tossType
==
MsgToss
.
TossType
.
COIN
)
{
}
else
if
(
tossType
==
MsgToss
.
TossType
.
COIN
)
{
matStore
.
tossResult
=
matStore
.
tossResult
=
fetchStrings
(
"
!system
"
,
1623
)
+
fetchStrings
(
"
!system
"
,
60
+
x
);
prefix
+
fetchStrings
(
"
!system
"
,
1623
)
+
fetchStrings
(
"
!system
"
,
61
-
x
);
}
else
{
}
else
{
console
.
log
(
`Unknown tossType =
${
tossType
}
`
);
console
.
log
(
`Unknown tossType =
${
tossType
}
`
);
}
}
// 等待1s,不然多个结果刷新太快了
await
sleep
(
1000
);
}
}
};
};
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