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
56dc3686
Commit
56dc3686
authored
Apr 29, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix start.ts
parent
df627b17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
src/service/duel/start.ts
src/service/duel/start.ts
+25
-4
No files found.
src/service/duel/start.ts
View file @
56dc3686
...
...
@@ -7,6 +7,10 @@ const { matStore } = store;
export
default
(
start
:
ygopro
.
StocGameMessage
.
MsgStart
)
=>
{
matStore
.
selfType
=
start
.
playerType
;
const
opponent
=
start
.
playerType
==
ygopro
.
StocGameMessage
.
MsgStart
.
PlayerType
.
FirstStrike
?
1
:
0
;
matStore
.
initInfo
.
set
(
0
,
{
life
:
start
.
life1
,
...
...
@@ -25,7 +29,7 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
matStore
.
magics
.
of
(
1
).
forEach
((
x
)
=>
(
x
.
location
.
controler
=
1
));
for
(
let
i
=
0
;
i
<
start
.
deckSize1
;
i
++
)
{
matStore
.
decks
.
of
(
0
)
.
push
({
matStore
.
decks
.
me
.
push
({
uuid
:
v4uuid
(),
occupant
:
{
id
:
0
,
...
...
@@ -33,7 +37,7 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
text
:
{},
},
location
:
{
controler
:
0
,
controler
:
1
-
opponent
,
zone
:
ygopro
.
CardZone
.
DECK
,
},
counters
:
{},
...
...
@@ -41,7 +45,7 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
});
}
for
(
let
i
=
0
;
i
<
start
.
deckSize2
;
i
++
)
{
matStore
.
decks
.
o
f
(
1
)
.
push
({
matStore
.
decks
.
o
p
.
push
({
uuid
:
v4uuid
(),
occupant
:
{
id
:
0
,
...
...
@@ -49,11 +53,28 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
text
:
{},
},
location
:
{
controler
:
0
,
controler
:
opponent
,
zone
:
ygopro
.
CardZone
.
DECK
,
},
counters
:
{},
idleInteractivities
:
[],
});
}
// 初始化对手的额外卡组
for
(
let
i
=
0
;
i
<
start
.
extraSize2
;
i
++
)
{
matStore
.
extraDecks
.
op
.
push
({
uuid
:
v4uuid
(),
occupant
:
{
id
:
0
,
data
:
{},
text
:
{},
},
location
:
{
controler
:
opponent
,
zone
:
ygopro
.
CardZone
.
EXTRA
,
},
counters
:
{},
idleInteractivities
:
[],
});
}
};
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