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
456e3b98
Commit
456e3b98
authored
Aug 07, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add set history
parent
041b09fc
Pipeline
#28962
passed with stages
in 17 minutes and 13 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
4 deletions
+32
-4
neos-assets/set.png
neos-assets/set.png
+0
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
+10
-1
src/service/duel/move.ts
src/service/duel/move.ts
+4
-1
src/service/duel/set.ts
src/service/duel/set.ts
+4
-2
src/stores/historyStore.ts
src/stores/historyStore.ts
+10
-0
src/ui/Duel/Message/ActionHistory/index.tsx
src/ui/Duel/Message/ActionHistory/index.tsx
+4
-0
No files found.
neos-assets/set.png
0 → 100644
View file @
456e3b98
4.52 KB
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
View file @
456e3b98
...
...
@@ -52,7 +52,16 @@
},
"54"
:
{
"protoType"
:
"set"
,
"fields"
:
[]
"fields"
:
[
{
"fieldName"
:
"code"
,
"fieldType"
:
"uint32"
},
{
"fieldName"
:
"location"
,
"fieldType"
:
"CardLocation"
}
]
},
"55"
:
{
"protoType"
:
"swap"
,
...
...
src/service/duel/move.ts
View file @
456e3b98
...
...
@@ -175,7 +175,10 @@ export default async (container: Container, move: MsgMove) => {
target
.
targeted
=
false
;
}
if
(
to
.
zone
!==
MZONE
)
if
(
(
to
.
zone
!==
MZONE
&&
to
.
zone
!==
SZONE
)
||
(
to
.
zone
===
MZONE
&&
reason
!==
0
)
)
context
.
historyStore
.
putMove
(
context
,
code
,
from
,
to
.
zone
);
// 维护完了之后,开始播放音效和动画
...
...
src/service/duel/set.ts
View file @
456e3b98
...
...
@@ -3,6 +3,8 @@ import { Container } from "@/container";
import
{
fetchEsHintMeta
}
from
"
./util
"
;
export
default
(
container
:
Container
,
_set
:
ygopro
.
StocGameMessage
.
MsgSet
)
=>
{
fetchEsHintMeta
({
context
:
container
.
context
,
originMsg
:
1601
});
export
default
(
container
:
Container
,
set
:
ygopro
.
StocGameMessage
.
MsgSet
)
=>
{
const
context
=
container
.
context
;
context
.
historyStore
.
putSet
(
context
,
set
.
code
,
set
.
location
);
fetchEsHintMeta
({
context
:
context
,
originMsg
:
1601
});
};
src/stores/historyStore.ts
View file @
456e3b98
...
...
@@ -14,6 +14,7 @@ export enum HistoryOp {
SUMMON
=
6
,
SP_SUMMON
=
7
,
FLIP_SUMMON
=
8
,
SET
=
9
,
}
export
interface
History
{
...
...
@@ -94,6 +95,15 @@ export class HistoryStore implements NeosStore {
});
}
putSet
(
context
:
Context
,
card
:
number
,
location
:
ygopro
.
CardLocation
)
{
this
.
historys
.
push
({
card
,
opponent
:
!
context
.
matStore
.
isMe
(
location
.
controller
),
operation
:
HistoryOp
.
SET
,
target
:
location
.
zone
,
});
}
reset
():
void
{
this
.
historys
=
[];
}
...
...
src/ui/Duel/Message/ActionHistory/index.tsx
View file @
456e3b98
...
...
@@ -73,6 +73,8 @@ const HistoryItem: React.FC<History> = ({
/>
)
:
operation
===
HistoryOp
.
ATTACK
?
(
<
img
src=
{
`${assetsPath}/attack.png`
}
className=
{
styles
[
"
op-icon
"
]
}
/>
)
:
operation
===
HistoryOp
.
SET
?
(
<
img
src=
{
`${assetsPath}/set.png`
}
className=
{
styles
[
"
op-icon
"
]
}
/>
)
:
(
<
img
src=
{
`${assetsPath}/summon.png`
}
className=
{
styles
[
"
op-icon
"
]
}
/>
)
}
...
...
@@ -104,6 +106,8 @@ function Op2Text(op: HistoryOp): string {
return
fetchStrings
(
Region
.
System
,
1152
);
case
HistoryOp
.
FLIP_SUMMON
:
return
fetchStrings
(
Region
.
System
,
1154
);
case
HistoryOp
.
SET
:
return
fetchStrings
(
Region
.
System
,
1153
);
}
}
...
...
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