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
255aa6df
Commit
255aa6df
authored
May 24, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'optimize/chain' into 'main'
optimize chain effect See merge request
mycard/Neos!207
parents
381e6fb9
aaf2a7ee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
5 deletions
+17
-5
src/service/duel/chainSolved.ts
src/service/duel/chainSolved.ts
+2
-2
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+1
-1
src/service/duel/move.ts
src/service/duel/move.ts
+2
-2
src/stores/matStore/store.ts
src/stores/matStore/store.ts
+10
-0
src/stores/matStore/types.ts
src/stores/matStore/types.ts
+2
-0
No files found.
src/service/duel/chainSolved.ts
View file @
255aa6df
...
...
@@ -9,12 +9,12 @@ import { matStore } from "@/stores";
// 对于这三种情况`service`层的逻辑是一致的,但是UI展示应该有区别,
// 因为现在还没实现连锁处理的动画,因此暂时先都一致处理,
// 体现在 `penetrage.json`文件中三个一样的配置。
export
default
(
chainSolved
:
ygopro
.
StocGameMessage
.
MsgChainSolved
)
=>
{
export
default
async
(
chainSolved
:
ygopro
.
StocGameMessage
.
MsgChainSolved
)
=>
{
const
location
=
matStore
.
chains
.
splice
(
chainSolved
.
solved_index
-
1
,
1
)
.
at
(
0
);
if
(
location
)
{
// 设置被连锁状态为空
// 设置被连锁状态为空
,解除连锁
matStore
.
setChained
(
location
,
undefined
);
}
else
{
console
.
warn
(
...
...
src/service/duel/gameMsg.ts
View file @
255aa6df
...
...
@@ -231,7 +231,7 @@ export default async function handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
case
"
chain_solved
"
:
{
onMsgChainSolved
(
msg
.
chain_solved
);
await
onMsgChainSolved
(
msg
.
chain_solved
);
break
;
}
...
...
src/service/duel/move.ts
View file @
255aa6df
...
...
@@ -102,7 +102,7 @@ export default async (move: MsgMove) => {
chainIndex
;
await
sleep
(
NeosConfig
.
ui
.
moveDelay
);
matStore
.
in
(
to
.
location
).
of
(
to
.
controler
)[
to
.
sequence
].
focus
=
false
;
matStore
.
setFocus
(
to
,
false
)
;
break
;
}
case
ygopro
.
CardZone
.
REMOVED
:
...
...
@@ -132,7 +132,7 @@ export default async (move: MsgMove) => {
);
await
sleep
(
NeosConfig
.
ui
.
moveDelay
);
matStore
.
in
(
to
.
location
).
of
(
to
.
controler
)[
to
.
sequence
].
focus
=
false
;
matStore
.
setFocus
(
to
,
false
)
;
}
break
;
}
...
...
src/stores/matStore/store.ts
View file @
255aa6df
...
...
@@ -297,6 +297,16 @@ export const matStore: MatState = proxy<MatState>({
console
.
warn
(
`target is null in setChained, location=
${
location
}
`
);
}
},
setFocus
(
location
,
focus
)
{
const
target
=
this
.
in
(
location
.
location
)
.
of
(
location
.
controler
)
.
at
(
location
.
sequence
);
if
(
target
)
{
target
.
focus
=
focus
;
}
else
{
console
.
warn
(
`target is null in setFocus, location=
${
location
}
`
);
}
},
});
// @ts-ignore 挂到全局,便于调试
...
...
src/stores/matStore/types.ts
View file @
255aa6df
...
...
@@ -112,6 +112,8 @@ export interface MatState {
)
=>
Promise
<
void
>
;
// 添加被连锁状态
setChained
:
(
location
:
ygopro
.
CardLocation
,
chainIndex
?:
number
)
=>
void
;
// 设置聚焦状态
setFocus
:
(
location
:
ygopro
.
CardLocation
,
focus
:
boolean
)
=>
void
;
}
export
interface
InitInfo
{
...
...
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