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
66bd0a97
Commit
66bd0a97
authored
Mar 31, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
b052428d
Pipeline
#26168
passed with stages
in 8 minutes and 4 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
18 deletions
+37
-18
src/ui/Duel/PlayMat/Bg/Chain/index.module.scss
src/ui/Duel/PlayMat/Bg/Chain/index.module.scss
+3
-0
src/ui/Duel/PlayMat/Bg/Chain/index.tsx
src/ui/Duel/PlayMat/Bg/Chain/index.tsx
+1
-1
src/ui/Duel/PlayMat/Bg/index.tsx
src/ui/Duel/PlayMat/Bg/index.tsx
+33
-17
No files found.
src/ui/Duel/PlayMat/Bg/Chain/index.module.scss
View file @
66bd0a97
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
z-index
:
2
;
}
}
.chain
{
.chain
{
...
@@ -23,8 +24,10 @@
...
@@ -23,8 +24,10 @@
.text
{
.text
{
position
:
absolute
;
position
:
absolute
;
font-size
:
2rem
;
font-size
:
2rem
;
font-weight
:
bold
;
top
:
50%
;
top
:
50%
;
left
:
50%
;
left
:
50%
;
-webkit-text-stroke
:
1px
black
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
}
}
...
...
src/ui/Duel/PlayMat/Bg/Chain/index.tsx
View file @
66bd0a97
...
@@ -9,7 +9,7 @@ export const BgChain: React.FC<{ chains: readonly number[] }> = ({
...
@@ -9,7 +9,7 @@ export const BgChain: React.FC<{ chains: readonly number[] }> = ({
})
=>
(
})
=>
(
<
div
className=
{
styles
.
container
}
>
<
div
className=
{
styles
.
container
}
>
{
chains
.
map
((
chain
)
=>
(
{
chains
.
map
((
chain
)
=>
(
<
div
className=
{
styles
.
chain
}
>
<
div
className=
{
styles
.
chain
}
key=
{
chain
}
>
<
img
src=
{
`${assetsPath}/chain.png`
}
/>
<
img
src=
{
`${assetsPath}/chain.png`
}
/>
<
div
className=
{
styles
.
text
}
>
{
chain
}
</
div
>
<
div
className=
{
styles
.
text
}
>
{
chain
}
</
div
>
</
div
>
</
div
>
...
...
src/ui/Duel/PlayMat/Bg/index.tsx
View file @
66bd0a97
...
@@ -13,7 +13,8 @@ import {
...
@@ -13,7 +13,8 @@ import {
import
{
BgChain
}
from
"
./Chain
"
;
import
{
BgChain
}
from
"
./Chain
"
;
import
styles
from
"
./index.module.scss
"
;
import
styles
from
"
./index.module.scss
"
;
// TODO: 展示连锁图标
const
{
MZONE
,
SZONE
,
EXTRA
,
GRAVE
,
REMOVED
}
=
ygopro
.
CardZone
;
const
BgBlock
:
React
.
FC
<
const
BgBlock
:
React
.
FC
<
React
.
HTMLProps
<
HTMLDivElement
>
&
{
React
.
HTMLProps
<
HTMLDivElement
>
&
{
disabled
?:
boolean
;
disabled
?:
boolean
;
...
@@ -58,7 +59,7 @@ const BgExtraRow: React.FC<{
...
@@ -58,7 +59,7 @@ const BgExtraRow: React.FC<{
}
}
}
}
disabled=
{
meSnap
[
i
].
disabled
||
opSnap
[
i
].
disabled
}
disabled=
{
meSnap
[
i
].
disabled
||
opSnap
[
i
].
disabled
}
highlight=
{
!!
meSnap
[
i
].
interactivity
||
!!
opSnap
[
i
].
interactivity
}
highlight=
{
!!
meSnap
[
i
].
interactivity
||
!!
opSnap
[
i
].
interactivity
}
chains=
{
meSnap
[
i
].
chainIndex
}
chains=
{
meSnap
[
i
].
chainIndex
.
concat
(
opSnap
[
i
].
chainIndex
)
}
/>
/>
))
}
))
}
</
div
>
</
div
>
...
@@ -84,7 +85,6 @@ const BgRow: React.FC<{
...
@@ -84,7 +85,6 @@ const BgRow: React.FC<{
</
div
>
</
div
>
);
);
// TODO: chain
const
BgOtherBlocks
:
React
.
FC
<
{
op
?:
boolean
}
>
=
({
op
})
=>
{
const
BgOtherBlocks
:
React
.
FC
<
{
op
?:
boolean
}
>
=
({
op
})
=>
{
useSnapshot
(
cardStore
);
useSnapshot
(
cardStore
);
const
meController
=
isMe
(
0
)
?
0
:
1
;
const
meController
=
isMe
(
0
)
?
0
:
1
;
...
@@ -92,27 +92,43 @@ const BgOtherBlocks: React.FC<{ op?: boolean }> = ({ op }) => {
...
@@ -92,27 +92,43 @@ const BgOtherBlocks: React.FC<{ op?: boolean }> = ({ op }) => {
!!
cardStore
!!
cardStore
.
at
(
zone
,
meController
)
.
at
(
zone
,
meController
)
.
reduce
((
sum
,
c
)
=>
(
sum
+=
c
.
idleInteractivities
.
length
),
0
);
.
reduce
((
sum
,
c
)
=>
(
sum
+=
c
.
idleInteractivities
.
length
),
0
);
const
glowingExtra
=
judgeGlowing
(
ygopro
.
CardZone
.
EXTRA
);
const
glowingExtra
=
judgeGlowing
(
EXTRA
);
const
glowingGraveyard
=
judgeGlowing
(
ygopro
.
CardZone
.
GRAVE
);
const
glowingGraveyard
=
judgeGlowing
(
GRAVE
);
const
glowingBanish
=
judgeGlowing
(
ygopro
.
CardZone
.
REMOVED
);
const
glowingBanish
=
judgeGlowing
(
REMOVED
);
const
snap
=
useSnapshot
(
placeStore
.
inner
);
const
snap
=
useSnapshot
(
placeStore
.
inner
);
const
field
=
op
const
field
=
op
?
snap
[
SZONE
].
op
[
5
]
:
snap
[
SZONE
].
me
[
5
];
?
snap
[
ygopro
.
CardZone
.
SZONE
].
op
[
5
]
:
snap
[
ygopro
.
CardZone
.
SZONE
].
me
[
5
];
const
genChains
=
(
states
:
Snapshot
<
BlockState
[]
>
)
=>
{
const
chains
:
number
[]
=
states
.
flatMap
((
state
)
=>
state
.
chainIndex
);
chains
.
sort
();
return
chains
;
};
return
(
return
(
<
div
className=
{
classnames
(
styles
[
"
other-blocks
"
],
{
[
styles
.
op
]:
op
})
}
>
<
div
className=
{
classnames
(
styles
[
"
other-blocks
"
],
{
[
styles
.
op
]:
op
})
}
>
<
BgBlock
className=
{
styles
.
banish
}
glowing=
{
!
op
&&
glowingBanish
}
/>
<
BgBlock
<
BgBlock
className=
{
styles
.
graveyard
}
glowing=
{
!
op
&&
glowingGraveyard
}
/>
className=
{
styles
.
banish
}
glowing=
{
!
op
&&
glowingBanish
}
chains=
{
genChains
(
op
?
snap
[
REMOVED
].
op
:
snap
[
REMOVED
].
me
)
}
/>
<
BgBlock
className=
{
styles
.
graveyard
}
glowing=
{
!
op
&&
glowingGraveyard
}
chains=
{
genChains
(
op
?
snap
[
GRAVE
].
op
:
snap
[
GRAVE
].
me
)
}
/>
<
BgBlock
<
BgBlock
className=
{
styles
.
field
}
className=
{
styles
.
field
}
onClick=
{
()
=>
onBlockClick
(
field
.
interactivity
)
}
onClick=
{
()
=>
onBlockClick
(
field
.
interactivity
)
}
disabled=
{
field
.
disabled
}
disabled=
{
field
.
disabled
}
highlight=
{
!!
field
.
interactivity
}
highlight=
{
!!
field
.
interactivity
}
chains=
{
field
.
chainIndex
}
/>
/>
<
BgBlock
className=
{
styles
.
deck
}
/>
<
BgBlock
className=
{
styles
.
deck
}
/>
<
BgBlock
<
BgBlock
className=
{
classnames
(
styles
.
deck
,
styles
[
"
extra-deck
"
])
}
className=
{
classnames
(
styles
.
deck
,
styles
[
"
extra-deck
"
])
}
glowing=
{
!
op
&&
glowingExtra
}
glowing=
{
!
op
&&
glowingExtra
}
chains=
{
genChains
(
op
?
snap
[
EXTRA
].
op
:
snap
[
EXTRA
].
me
)
}
/>
/>
</
div
>
</
div
>
);
);
...
@@ -122,14 +138,14 @@ export const Bg: React.FC = () => {
...
@@ -122,14 +138,14 @@ export const Bg: React.FC = () => {
const
snap
=
useSnapshot
(
placeStore
.
inner
);
const
snap
=
useSnapshot
(
placeStore
.
inner
);
return
(
return
(
<
div
className=
{
styles
[
"
mat-bg
"
]
}
>
<
div
className=
{
styles
[
"
mat-bg
"
]
}
>
<
BgRow
snap=
{
snap
[
ygopro
.
CardZone
.
SZONE
].
op
}
szone
opponent
/>
<
BgRow
snap=
{
snap
[
SZONE
].
op
}
szone
opponent
/>
<
BgRow
snap=
{
snap
[
ygopro
.
CardZone
.
MZONE
].
op
}
opponent
/>
<
BgRow
snap=
{
snap
[
MZONE
].
op
}
opponent
/>
<
BgExtraRow
<
BgExtraRow
meSnap=
{
snap
[
ygopro
.
CardZone
.
MZONE
].
me
.
slice
(
5
,
7
)
}
meSnap=
{
snap
[
MZONE
].
me
.
slice
(
5
,
7
)
}
opSnap=
{
snap
[
ygopro
.
CardZone
.
MZONE
].
op
.
slice
(
5
,
7
)
}
opSnap=
{
snap
[
MZONE
].
op
.
slice
(
5
,
7
)
}
/>
/>
<
BgRow
snap=
{
snap
[
ygopro
.
CardZone
.
MZONE
].
me
}
/>
<
BgRow
snap=
{
snap
[
MZONE
].
me
}
/>
<
BgRow
snap=
{
snap
[
ygopro
.
CardZone
.
SZONE
].
me
}
szone
/>
<
BgRow
snap=
{
snap
[
SZONE
].
me
}
szone
/>
<
BgOtherBlocks
/>
<
BgOtherBlocks
/>
<
BgOtherBlocks
op
/>
<
BgOtherBlocks
op
/>
</
div
>
</
div
>
...
...
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