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
b705673e
Commit
b705673e
authored
Jun 20, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add field disabled adapter and srevice
parent
59ea8e52
Pipeline
#22330
passed with stages
in 12 minutes and 57 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
0 deletions
+91
-0
src/api/ocgcore/ocgAdapter/protoDecl.ts
src/api/ocgcore/ocgAdapter/protoDecl.ts
+1
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/fieldDisabled.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/fieldDisabled.ts
+73
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
+6
-0
src/service/duel/fieldDisabled.ts
src/service/duel/fieldDisabled.ts
+5
-0
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+6
-0
No files found.
src/api/ocgcore/ocgAdapter/protoDecl.ts
View file @
b705673e
...
...
@@ -65,3 +65,4 @@ export const MSG_ANNOUNCE_NUMBER = 143;
export
const
MSG_TOSS_COIN
=
130
;
export
const
MSG_TOSS_DICE
=
131
;
export
const
MSG_SHUFFLE_SET_CARD
=
36
;
export
const
MSG_FIELD_DISABLED
=
56
;
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/fieldDisabled.ts
0 → 100644
View file @
b705673e
import
{
ygopro
}
from
"
@/api/ocgcore/idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../../../../../rust-src/pkg/rust_src
"
;
import
MsgFieldDisabled
=
ygopro
.
StocGameMessage
.
MsgFieldDisabled
;
import
CardZone
=
ygopro
.
CardZone
;
/*
* Msg Field Disabled
* @param - TODO
*
* @usage - 区域禁用
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
);
const
flag
=
reader
.
readInt32
();
const
actions
=
[];
let
filter
=
0x1
;
for
(
let
i
=
0
;
i
<
5
;
i
++
,
filter
<<=
1
)
{
const
disabled
=
(
flag
&
filter
)
>
0
;
actions
.
push
(
new
MsgFieldDisabled
.
Action
({
controller
:
0
,
zone
:
CardZone
.
MZONE
,
sequence
:
i
,
disabled
,
})
);
}
filter
=
0x100
;
for
(
let
i
=
0
;
i
<
8
;
i
++
,
filter
<<=
1
)
{
const
disabled
=
(
flag
&
filter
)
>
0
;
actions
.
push
(
new
MsgFieldDisabled
.
Action
({
controller
:
0
,
zone
:
CardZone
.
SZONE
,
sequence
:
i
,
disabled
,
})
);
}
filter
=
0x10000
;
for
(
let
i
=
0
;
i
<
5
;
i
++
,
filter
<<=
1
)
{
const
disabled
=
(
flag
&
filter
)
>
0
;
actions
.
push
(
new
MsgFieldDisabled
.
Action
({
controller
:
1
,
zone
:
CardZone
.
MZONE
,
sequence
:
i
,
disabled
,
})
);
}
filter
=
0x1000000
;
for
(
let
i
=
0
;
i
<
8
;
i
++
,
filter
<<=
1
)
{
const
disabled
=
(
flag
&
filter
)
>
0
;
actions
.
push
(
new
MsgFieldDisabled
.
Action
({
controller
:
1
,
zone
:
CardZone
.
SZONE
,
sequence
:
i
,
disabled
,
})
);
}
return
new
MsgFieldDisabled
({
actions
,
});
};
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
View file @
b705673e
...
...
@@ -14,6 +14,7 @@ import MsgAnnounceRace from "./announceRace";
import
MsgAttack
from
"
./attack
"
;
import
MsgDamage
from
"
./damage
"
;
import
MsgDrawAdapter
from
"
./draw
"
;
import
MsgFieldDisabledAdapter
from
"
./fieldDisabled
"
;
import
MsgHintAdapter
from
"
./hint
"
;
import
MsgNewPhaseAdapter
from
"
./newPhase
"
;
import
MsgNewTurnAdapter
from
"
./newTurn
"
;
...
...
@@ -244,6 +245,11 @@ export default class GameMsgAdapter implements StocAdapter {
break
;
}
case
GAME_MSG
.
MSG_FIELD_DISABLED
:
{
gameMsg
.
field_disabled
=
MsgFieldDisabledAdapter
(
gameData
);
break
;
}
default
:
{
gameMsg
.
unimplemented
=
new
ygopro
.
StocGameMessage
.
MsgUnimplemented
({
command
:
func
,
...
...
src/service/duel/fieldDisabled.ts
0 → 100644
View file @
b705673e
import
{
ygopro
}
from
"
@/api
"
;
import
MsgFieldDisabled
=
ygopro
.
StocGameMessage
.
MsgFieldDisabled
;
export
default
(
fieldDisabled
:
MsgFieldDisabled
)
=>
{
console
.
log
(
fieldDisabled
);
};
src/service/duel/gameMsg.ts
View file @
b705673e
...
...
@@ -11,6 +11,7 @@ import onMsgChaining from "./chaining";
import
onMsgChainSolved
from
"
./chainSolved
"
;
import
onConfirmCards
from
"
./confirmCards
"
;
import
onMsgDraw
from
"
./draw
"
;
import
onMsgFieldDisabled
from
"
./fieldDisabled
"
;
import
onMsgFilpSummoned
from
"
./flipSummoned
"
;
import
onMsgFlipSummoning
from
"
./flipSummoning
"
;
import
onMsgHint
from
"
./hint
"
;
...
...
@@ -315,6 +316,11 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
case
"
field_disabled
"
:
{
onMsgFieldDisabled
(
msg
.
field_disabled
);
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