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
e585e471
Commit
e585e471
authored
Jun 30, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compile error
parent
fd39976c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
18 deletions
+43
-18
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
+0
-14
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
+0
-1
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+3
-3
src/service/duel/shuffleHandExtra.ts
src/service/duel/shuffleHandExtra.ts
+40
-0
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
View file @
e585e471
...
@@ -20,20 +20,6 @@
...
@@ -20,20 +20,6 @@
}
}
]
]
},
},
"33"
:
{
"protoType"
:
"shuffle_hand"
,
"fields"
:
[
{
"fieldName"
:
"player"
,
"fieldType"
:
"uint8"
},
{
"fieldName"
:
"hands"
,
"fieldType"
:
"repeated"
,
"repeatedType"
:
"uint32"
}
]
},
"53"
:
{
"53"
:
{
"protoType"
:
"pos_change"
,
"protoType"
:
"pos_change"
,
"fields"
:
[
"fields"
:
[
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
View file @
e585e471
...
@@ -17,7 +17,6 @@ const ReadFieldHandlerMap: Map<string, readFieldHandler> = new Map([
...
@@ -17,7 +17,6 @@ const ReadFieldHandlerMap: Map<string, readFieldHandler> = new Map([
]);
]);
const
MsgConstructorMap
:
Map
<
string
,
Constructor
>
=
new
Map
([
const
MsgConstructorMap
:
Map
<
string
,
Constructor
>
=
new
Map
([
[
"
move
"
,
ygopro
.
StocGameMessage
.
MsgMove
as
Constructor
],
[
"
move
"
,
ygopro
.
StocGameMessage
.
MsgMove
as
Constructor
],
[
"
shuffle_hand
"
,
ygopro
.
StocGameMessage
.
MsgShuffleHand
],
[
"
pos_change
"
,
ygopro
.
StocGameMessage
.
MsgPosChange
],
[
"
pos_change
"
,
ygopro
.
StocGameMessage
.
MsgPosChange
],
[
"
select_yes_no
"
,
ygopro
.
StocGameMessage
.
MsgSelectYesNo
],
[
"
select_yes_no
"
,
ygopro
.
StocGameMessage
.
MsgSelectYesNo
],
[
"
set
"
,
ygopro
.
StocGameMessage
.
MsgSet
],
[
"
set
"
,
ygopro
.
StocGameMessage
.
MsgSet
],
...
...
src/service/duel/gameMsg.ts
View file @
e585e471
...
@@ -38,7 +38,7 @@ import onMsgSelectUnselectCard from "./selectUnselectCard";
...
@@ -38,7 +38,7 @@ import onMsgSelectUnselectCard from "./selectUnselectCard";
import
onMsgSelectYesNo
from
"
./selectYesNo
"
;
import
onMsgSelectYesNo
from
"
./selectYesNo
"
;
import
onMsgSet
from
"
./set
"
;
import
onMsgSet
from
"
./set
"
;
import
onMsgShuffleDeck
from
"
./shuffleDeck
"
;
import
onMsgShuffleDeck
from
"
./shuffleDeck
"
;
import
onMsgShuffleHand
from
"
./shuffleHand
"
;
import
onMsgShuffleHand
Extra
from
"
./shuffleHandExtra
"
;
import
onMsgShuffleSetCard
from
"
./shuffleSetCard
"
;
import
onMsgShuffleSetCard
from
"
./shuffleSetCard
"
;
import
onMsgSortCard
from
"
./sortCard
"
;
import
onMsgSortCard
from
"
./sortCard
"
;
import
onMsgSpSummoned
from
"
./spSummoned
"
;
import
onMsgSpSummoned
from
"
./spSummoned
"
;
...
@@ -149,8 +149,8 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
...
@@ -149,8 +149,8 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
break
;
}
}
case
"
shuffle_hand
"
:
{
case
"
shuffle_hand
_extra
"
:
{
await
onMsgShuffleHand
(
msg
.
shuffle_hand
);
await
onMsgShuffleHand
Extra
(
msg
.
shuffle_hand_extra
);
break
;
break
;
}
}
...
...
src/service/duel/shuffleHand.ts
→
src/service/duel/shuffleHand
Extra
.ts
View file @
e585e471
...
@@ -2,37 +2,37 @@ import { ygopro } from "@/api";
...
@@ -2,37 +2,37 @@ import { ygopro } from "@/api";
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
cardStore
}
from
"
@/stores
"
;
import
{
cardStore
}
from
"
@/stores
"
;
type
MsgShuffleHand
=
ygopro
.
StocGameMessage
.
MsgShuffleHand
;
type
MsgShuffleHand
Extra
=
ygopro
.
StocGameMessage
.
MsgShuffleHandExtra
;
export
default
async
(
shuffleHand
:
MsgShuffleHand
)
=>
{
export
default
async
(
shuffleHand
Extra
:
MsgShuffleHandExtra
)
=>
{
const
{
hands
:
codes
,
player
:
controller
}
=
shuffleHand
;
const
{
cards
:
codes
,
player
:
controller
,
zone
}
=
shuffleHandExtra
;
// 本质上是要将手卡的sequence变成和codes一样的顺序
// 本质上是要将手卡
/额外卡组
的sequence变成和codes一样的顺序
const
hands
=
cardStore
.
at
(
ygopro
.
CardZone
.
HAND
,
controller
);
const
cards
=
cardStore
.
at
(
zone
,
controller
);
const
hash
=
new
Map
(
codes
.
map
((
code
)
=>
[
code
,
new
Array
()]));
const
hash
=
new
Map
(
codes
.
map
((
code
)
=>
[
code
,
new
Array
()]));
codes
.
forEach
((
code
,
sequence
)
=>
{
codes
.
forEach
((
code
,
sequence
)
=>
{
hash
.
get
(
code
)?.
push
(
sequence
);
hash
.
get
(
code
)?.
push
(
sequence
);
});
});
for
(
const
hand
of
han
ds
)
{
for
(
const
card
of
car
ds
)
{
const
sequences
=
hash
.
get
(
han
d
.
code
);
const
sequences
=
hash
.
get
(
car
d
.
code
);
if
(
sequences
!==
undefined
)
{
if
(
sequences
!==
undefined
)
{
const
sequence
=
sequences
.
pop
();
const
sequence
=
sequences
.
pop
();
if
(
sequence
!==
undefined
)
{
if
(
sequence
!==
undefined
)
{
han
d
.
location
.
sequence
=
sequence
;
car
d
.
location
.
sequence
=
sequence
;
hash
.
set
(
han
d
.
code
,
sequences
);
hash
.
set
(
car
d
.
code
,
sequences
);
// 触发动画
// 触发动画
await
eventbus
.
call
(
Task
.
Move
,
han
d
.
uuid
);
await
eventbus
.
call
(
Task
.
Move
,
car
d
.
uuid
);
}
else
{
}
else
{
console
.
warn
(
console
.
warn
(
`<ShuffleHand
>sequence poped is none, controller=
${
controller
}
, code=
${
han
d
.
code
}
, sequence=
${
sequence
}
`
`<ShuffleHand
Extra>sequence poped is none, controller=
${
controller
}
, code=
${
car
d
.
code
}
, sequence=
${
sequence
}
`
);
);
}
}
}
else
{
}
else
{
console
.
warn
(
console
.
warn
(
`<ShuffleHand
>target from records is null, controller=
${
controller
}
, hands=
${
han
ds
.
map
(
`<ShuffleHand
Extra>target from records is null, controller=
${
controller
}
, cards=
${
car
ds
.
map
(
(
hand
)
=>
han
d
.
code
(
card
)
=>
car
d
.
code
)}
, codes=
${
codes
}
`
)}
, codes=
${
codes
}
`
);
);
}
}
...
...
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