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
3
Merge Requests
3
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
b86e3fcf
Commit
b86e3fcf
authored
May 26, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/confirm_deck_top' into 'main'
Feat/confirm deck top See merge request
!210
parents
bf60d17a
6d5c9dc7
Pipeline
#21852
passed with stages
in 14 minutes and 43 seconds
Changes
6
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
311 additions
and
5 deletions
+311
-5
neos-protobuf
neos-protobuf
+1
-1
src/api/ocgcore/idl/ocgcore.ts
src/api/ocgcore/idl/ocgcore.ts
+257
-4
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
+14
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
+1
-0
src/service/duel/confirmDeskTop.ts
src/service/duel/confirmDeskTop.ts
+32
-0
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+6
-0
No files found.
neos-protobuf
@
e7729f2c
Subproject commit
0993b418f4ae7be10af05ca5360315656bfe2690
Subproject commit
e7729f2ca07b8d4704806e37d05f896d5cefafdd
src/api/ocgcore/idl/ocgcore.ts
View file @
b86e3fcf
This diff is collapsed.
Click to expand it.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
View file @
b86e3fcf
...
...
@@ -132,5 +132,19 @@
{
"fieldName"
:
"player"
,
"fieldType"
:
"uint8"
},
{
"fieldName"
:
"new_lp"
,
"fieldType"
:
"uint32"
}
]
},
"30"
:
{
"protoType"
:
"confirm_desktop"
,
"fields"
:
[
{
"fieldName"
:
"player"
,
"fieldType"
:
"uint8"
},
{
"fieldName"
:
"cards"
,
"fieldType"
:
"repeated"
,
"repeatedType"
:
"CardInfo"
}
]
}
}
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
View file @
b86e3fcf
...
...
@@ -33,6 +33,7 @@ const MsgConstructorMap: Map<string, Constructor> = new Map([
[
"
chain_solved
"
,
ygopro
.
StocGameMessage
.
MsgChainSolved
],
[
"
chain_end
"
,
ygopro
.
StocGameMessage
.
MsgChainEnd
],
[
"
lp_update
"
,
ygopro
.
StocGameMessage
.
MsgLpUpdate
],
[
"
confirm_desktop
"
,
ygopro
.
StocGameMessage
.
MsgConfirmDeskTop
],
]);
export
interface
penetrateType
{
...
...
src/service/duel/confirmDeskTop.ts
0 → 100644
View file @
b86e3fcf
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
sleep
}
from
"
@/infra
"
;
import
{
matStore
}
from
"
@/stores
"
;
export
default
async
(
confirmDeskTop
:
ygopro
.
StocGameMessage
.
MsgConfirmDeskTop
)
=>
{
const
cards
=
confirmDeskTop
.
cards
;
for
(
const
card
of
cards
)
{
const
target
=
matStore
.
in
(
card
.
location
)
.
of
(
card
.
controler
)
.
at
(
card
.
sequence
);
if
(
target
)
{
// 设置`occupant`
const
meta
=
await
fetchCard
(
card
.
code
);
target
.
occupant
=
meta
;
// 设置`position`,否则会横放
target
.
location
.
position
=
ygopro
.
CardPosition
.
ATTACK
;
// 聚焦1s
target
.
focus
=
true
;
await
sleep
(
1000
);
target
.
focus
=
false
;
await
sleep
(
200
);
}
else
{
console
.
warn
(
`card of
${
card
}
is null`
);
}
}
};
src/service/duel/gameMsg.ts
View file @
b86e3fcf
...
...
@@ -7,6 +7,7 @@ import onMsgAttackDisable from "./attackDisable";
import
onMsgChainEnd
from
"
./chainEnd
"
;
import
onMsgChaining
from
"
./chaining
"
;
import
onMsgChainSolved
from
"
./chainSolved
"
;
import
onConfirmDeskTop
from
"
./confirmDeskTop
"
;
import
onMsgDraw
from
"
./draw
"
;
import
onMsgFilpSummoned
from
"
./flipSummoned
"
;
import
onMsgFlipSummoning
from
"
./flipSummoning
"
;
...
...
@@ -282,6 +283,11 @@ export default async function handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
case
"
confirm_desktop
"
:
{
await
onConfirmDeskTop
(
msg
.
confirm_desktop
);
break
;
}
case
"
unimplemented
"
:
{
onUnimplemented
(
msg
.
unimplemented
);
...
...
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