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
7994199e
Commit
7994199e
authored
Aug 03, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update chains
parent
733c252f
Pipeline
#23243
passed with stages
in 11 minutes and 53 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
src/service/duel/chainEnd.ts
src/service/duel/chainEnd.ts
+7
-7
src/service/duel/chainSolved.ts
src/service/duel/chainSolved.ts
+5
-5
src/service/duel/chaining.ts
src/service/duel/chaining.ts
+7
-2
No files found.
src/service/duel/chainEnd.ts
View file @
7994199e
import
{
ygopro
}
from
"
@/api
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
cardStore
,
matStore
}
from
"
@/stores
"
;
import
{
cardStore
,
matStore
,
placeStore
}
from
"
@/stores
"
;
export
default
(
_chainEnd
:
ygopro
.
StocGameMessage
.
MsgChainEnd
)
=>
{
export
default
(
_chainEnd
:
ygopro
.
StocGameMessage
.
MsgChainEnd
)
=>
{
while
(
true
)
{
while
(
true
)
{
...
@@ -8,12 +8,12 @@ export default (_chainEnd: ygopro.StocGameMessage.MsgChainEnd) => {
...
@@ -8,12 +8,12 @@ export default (_chainEnd: ygopro.StocGameMessage.MsgChainEnd) => {
break
;
break
;
}
}
// const target = cardStore.find
(chain);
const
block
=
placeStore
.
of
(
chain
);
// if (target
) {
if
(
block
)
{
// target.chainIndex = undefined
;
block
.
chainIndex
.
pop
()
;
//
} else {
}
else
{
// console.warn(`<ChainEnd>target
from ${chain} is null`);
console
.
warn
(
`<ChainEnd>block
from
${
chain
}
is null`
);
//
}
}
}
}
// 目前selected字段只会涉及连锁过程某些卡成为效果对象,
// 目前selected字段只会涉及连锁过程某些卡成为效果对象,
...
...
src/service/duel/chainSolved.ts
View file @
7994199e
import
{
ygopro
}
from
"
@/api
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
cardStore
,
mat
Store
}
from
"
@/stores
"
;
import
{
matStore
,
place
Store
}
from
"
@/stores
"
;
// FIXME: 处理连锁会存在三种结果:
// FIXME: 处理连锁会存在三种结果:
// 1. Solved - 已处理;
// 1. Solved - 已处理;
...
@@ -15,11 +15,11 @@ export default async (chainSolved: ygopro.StocGameMessage.MsgChainSolved) => {
...
@@ -15,11 +15,11 @@ export default async (chainSolved: ygopro.StocGameMessage.MsgChainSolved) => {
.
at
(
0
);
.
at
(
0
);
if
(
location
)
{
if
(
location
)
{
// 设置被连锁状态为空,解除连锁
// 设置被连锁状态为空,解除连锁
const
target
=
cardStore
.
find
(
location
);
const
block
=
placeStore
.
of
(
location
);
if
(
target
)
{
if
(
block
)
{
// target.chainIndex = undefined
;
block
.
chainIndex
.
pop
()
;
}
else
{
}
else
{
console
.
warn
(
`<ChainSolved>
target
from
${
location
}
is null`
);
console
.
warn
(
`<ChainSolved>
block
from
${
location
}
is null`
);
}
}
}
else
{
}
else
{
console
.
warn
(
console
.
warn
(
...
...
src/service/duel/chaining.ts
View file @
7994199e
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
cardStore
,
fetchEsHintMeta
,
matStore
}
from
"
@/stores
"
;
import
{
cardStore
,
fetchEsHintMeta
,
matStore
,
placeStore
}
from
"
@/stores
"
;
import
{
callCardFocus
}
from
"
@/ui/Duel/PlayMat/Card
"
;
import
{
callCardFocus
}
from
"
@/ui/Duel/PlayMat/Card
"
;
export
default
async
(
chaining
:
ygopro
.
StocGameMessage
.
MsgChaining
)
=>
{
export
default
async
(
chaining
:
ygopro
.
StocGameMessage
.
MsgChaining
)
=>
{
...
@@ -16,7 +16,12 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
...
@@ -16,7 +16,12 @@ export default async (chaining: ygopro.StocGameMessage.MsgChaining) => {
const
target
=
cardStore
.
find
(
location
);
const
target
=
cardStore
.
find
(
location
);
if
(
target
)
{
if
(
target
)
{
// 设置连锁序号
// 设置连锁序号
// target.chainIndex = matStore.chains.length;
const
block
=
placeStore
.
of
(
location
);
if
(
block
)
{
block
.
chainIndex
.
push
(
matStore
.
chains
.
length
);
}
else
{
console
.
warn
(
`<Chaining>block from
${
location
}
is null`
);
}
const
meta
=
fetchCard
(
chaining
.
code
);
const
meta
=
fetchCard
(
chaining
.
code
);
// 这里不能设置`code`,因为存在一个场景:
// 这里不能设置`code`,因为存在一个场景:
...
...
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