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
051fc7f6
Commit
051fc7f6
authored
Aug 03, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove chainIndex in CardState
parent
2f59f2df
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
10 deletions
+8
-10
src/service/duel/chainEnd.ts
src/service/duel/chainEnd.ts
+6
-6
src/service/duel/chainSolved.ts
src/service/duel/chainSolved.ts
+1
-1
src/service/duel/chaining.ts
src/service/duel/chaining.ts
+1
-1
src/stores/cardStore.ts
src/stores/cardStore.ts
+0
-2
No files found.
src/service/duel/chainEnd.ts
View file @
051fc7f6
...
...
@@ -8,12 +8,12 @@ export default (_chainEnd: ygopro.StocGameMessage.MsgChainEnd) => {
break
;
}
const
target
=
cardStore
.
find
(
chain
);
if
(
target
)
{
target
.
chainIndex
=
undefined
;
}
else
{
console
.
warn
(
`<ChainEnd>target from
${
chain
}
is null`
);
}
//
const target = cardStore.find(chain);
//
if (target) {
//
target.chainIndex = undefined;
//
} else {
//
console.warn(`<ChainEnd>target from ${chain} is null`);
//
}
}
// 目前selected字段只会涉及连锁过程某些卡成为效果对象,
...
...
src/service/duel/chainSolved.ts
View file @
051fc7f6
...
...
@@ -17,7 +17,7 @@ export default async (chainSolved: ygopro.StocGameMessage.MsgChainSolved) => {
// 设置被连锁状态为空,解除连锁
const
target
=
cardStore
.
find
(
location
);
if
(
target
)
{
target
.
chainIndex
=
undefined
;
//
target.chainIndex = undefined;
}
else
{
console
.
warn
(
`<ChainSolved>target from
${
location
}
is null`
);
}
...
...
src/service/duel/chaining.ts
View file @
051fc7f6
...
...
@@ -16,7 +16,7 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
const
target
=
cardStore
.
find
(
location
);
if
(
target
)
{
// 设置连锁序号
target
.
chainIndex
=
matStore
.
chains
.
length
;
//
target.chainIndex = matStore.chains.length;
const
meta
=
fetchCard
(
chaining
.
code
);
// 这里不能设置`code`,因为存在一个场景:
...
...
src/stores/cardStore.ts
View file @
051fc7f6
...
...
@@ -22,8 +22,6 @@ export interface CardType {
}
>
;
// 选择位置状态下的互动信息
counters
:
{
[
type
:
number
]:
number
};
// 指示器
isToken
:
boolean
;
// 是否是token
chainIndex
?:
number
/*连锁的序号,如果为空表示不在连锁
TODO: 目前是妥协的设计,因为其实一张卡是可以在同一个连锁链中被连锁多次的,这里为了避免太过复杂只保存最后的连锁序号*/
;
selected
:
boolean
;
// 当前卡是否被选择成为效果的对象
}
...
...
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