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
aa85d993
Commit
aa85d993
authored
Mar 12, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix overlay
parent
b1e467cb
Pipeline
#20610
passed with stages
in 6 minutes and 57 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
src/common.ts
src/common.ts
+29
-0
src/service/duel/move.ts
src/service/duel/move.ts
+4
-3
No files found.
src/common.ts
View file @
aa85d993
...
...
@@ -167,3 +167,32 @@ export const Race2StringCodeMap: Map<number, number> = new Map([
[
RACE_WYRM
,
1043
],
[
RACE_CYBERSE
,
1044
],
]);
// const REASON_DESTROY = 0x1; //
// const REASON_RELEASE = 0x2; //
// const REASON_TEMPORARY = 0x4; //
export
const
REASON_MATERIAL
=
0x8
;
//
// const REASON_SUMMON = 0x10; //
// const REASON_BATTLE = 0x20; //
// const REASON_EFFECT = 0x40; //
// const REASON_COST = 0x80; //
// const REASON_ADJUST = 0x100; //
// const REASON_LOST_TARGET = 0x200; //
// const REASON_RULE = 0x400; //
// const REASON_SPSUMMON = 0x800; //
// const REASON_DISSUMMON = 0x1000; //
// const REASON_FLIP = 0x2000; //
// const REASON_DISCARD = 0x4000; //
// const REASON_RDAMAGE = 0x8000; //
// const REASON_RRECOVER = 0x10000; //
// const REASON_RETURN = 0x20000; //
// const REASON_FUSION = 0x40000; //
// const REASON_SYNCHRO = 0x80000; //
// const REASON_RITUAL = 0x100000; //
// const REASON_XYZ = 0x200000; //
// const REASON_REPLACE = 0x1000000; //
// const REASON_DRAW = 0x2000000; //
// const REASON_REDIRECT = 0x4000000; //
// const REASON_REVEAL = 0x8000000; //
// const REASON_LINK = 0x10000000; //
// const REASON_LOST_OVERLAY = 0x20000000; //
src/service/duel/move.ts
View file @
aa85d993
...
...
@@ -19,6 +19,7 @@ import { fetchCemeteryMeta } from "../../reducers/duel/cemeretySlice";
import
{
insertHandMeta
}
from
"
../../reducers/duel/handsSlice
"
;
import
{
fetchExclusionMeta
}
from
"
../../reducers/duel/exclusionSlice
"
;
import
{
fetchExtraDeckMeta
}
from
"
../../reducers/duel/extraDeckSlice
"
;
import
{
REASON_MATERIAL
}
from
"
../../common
"
;
const
OVERLAY_STACK
:
{
code
:
number
;
sequence
:
number
}[]
=
[];
...
...
@@ -26,7 +27,7 @@ export default (move: MsgMove, dispatch: AppDispatch) => {
const
code
=
move
.
code
;
const
from
=
move
.
from
;
const
to
=
move
.
to
;
// TODO: reason
const
reason
=
move
.
reason
;
switch
(
from
.
location
)
{
case
ygopro
.
CardZone
.
HAND
:
{
...
...
@@ -165,8 +166,8 @@ export default (move: MsgMove, dispatch: AppDispatch) => {
break
;
}
case
ygopro
.
CardZone
.
OVERLAY
:
{
if
(
to
.
sequence
>
6
)
{
// 超量素材在进行超量召唤时,若玩家未选择超量怪兽的位置,会“沉到决斗盘下面”,
这时候素材们的sequence会暂时大于6
if
(
reason
==
REASON_MATERIAL
)
{
// 超量素材在进行超量召唤时,若玩家未选择超量怪兽的位置,会“沉到决斗盘下面”,
`reason`字段值是`REASON_MATERIAL`
// 这时候将它们放到一个栈中,待超量怪兽的Move消息到来时从栈中获取超量素材补充到状态中
OVERLAY_STACK
.
push
({
code
,
sequence
:
to
.
overlay_sequence
});
}
else
{
...
...
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