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
0c25de0d
Commit
0c25de0d
authored
May 25, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add lpUpdate
parent
298a37f1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
0 deletions
+22
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
+7
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
+1
-0
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+6
-0
src/service/duel/lpUpdate.ts
src/service/duel/lpUpdate.ts
+8
-0
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
View file @
0c25de0d
...
...
@@ -125,5 +125,12 @@
"76"
:
{
"protoType"
:
"chain_solved"
,
"fields"
:
[{
"fieldName"
:
"solved_index"
,
"fieldType"
:
"uint8"
}]
},
"94"
:
{
"protoType"
:
"lp_update"
,
"fields"
:
[
{
"fieldName"
:
"player"
,
"fieldType"
:
"uint8"
},
{
"fieldName"
:
"new_lp"
,
"fieldType"
:
"uint32"
}
]
}
}
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
View file @
0c25de0d
...
...
@@ -32,6 +32,7 @@ const MsgConstructorMap: Map<string, Constructor> = new Map([
[
"
attack_disable
"
,
ygopro
.
StocGameMessage
.
MsgAttackDisabled
],
[
"
chain_solved
"
,
ygopro
.
StocGameMessage
.
MsgChainSolved
],
[
"
chain_end
"
,
ygopro
.
StocGameMessage
.
MsgChainEnd
],
[
"
lp_update
"
,
ygopro
.
StocGameMessage
.
MsgLpUpdate
],
]);
export
interface
penetrateType
{
...
...
src/service/duel/gameMsg.ts
View file @
0c25de0d
...
...
@@ -11,6 +11,7 @@ import onMsgDraw from "./draw";
import
onMsgFilpSummoned
from
"
./flipSummoned
"
;
import
onMsgFlipSummoning
from
"
./flipSummoning
"
;
import
onMsgHint
from
"
./hint
"
;
import
onLpUpdate
from
"
./lpUpdate
"
;
import
onMsgMove
from
"
./move
"
;
import
onMsgNewPhase
from
"
./newPhase
"
;
import
onMsgNewTurn
from
"
./newTurn
"
;
...
...
@@ -276,6 +277,11 @@ export default async function handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
case
"
lp_udpate
"
:
{
onLpUpdate
(
msg
.
lp_udpate
);
break
;
}
case
"
unimplemented
"
:
{
onUnimplemented
(
msg
.
unimplemented
);
...
...
src/service/duel/lpUpdate.ts
0 → 100644
View file @
0c25de0d
import
{
ygopro
}
from
"
@/api
"
;
import
{
matStore
}
from
"
@/stores
"
;
export
default
(
lpUpdate
:
ygopro
.
StocGameMessage
.
MsgLpUpdate
)
=>
{
const
player
=
lpUpdate
.
player
;
const
newLp
=
lpUpdate
.
new_lp
;
matStore
.
initInfo
.
of
(
player
).
life
=
newLp
;
};
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