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
4
Merge Requests
4
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
bce1c2f5
Commit
bce1c2f5
authored
Jan 23, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt exclusion
parent
fa4add3a
Pipeline
#19766
passed with stages
in 3 minutes and 3 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
0 deletions
+29
-0
src/reducers/duel/exclusionSlice.ts
src/reducers/duel/exclusionSlice.ts
+18
-0
src/reducers/duel/mod.ts
src/reducers/duel/mod.ts
+3
-0
src/service/duel/selectIdleCmd.ts
src/service/duel/selectIdleCmd.ts
+6
-0
src/ui/Duel/singleSlot.tsx
src/ui/Duel/singleSlot.tsx
+2
-0
No files found.
src/reducers/duel/exclusionSlice.ts
View file @
bce1c2f5
...
...
@@ -13,6 +13,9 @@ import {
extendState
,
extendMeta
,
removeCard
,
DuelReducer
,
Interactivity
,
extendIdleInteractivities
,
}
from
"
./generic
"
;
export
interface
ExclusionState
extends
DuelFieldState
{}
...
...
@@ -81,6 +84,21 @@ export const removeExclusionImpl: CaseReducer<
removeCard
(
exclusion
,
action
.
payload
.
sequence
);
};
export
const
addExclusionIdleInteractivitiesImpl
:
DuelReducer
<
{
player
:
number
;
sequence
:
number
;
interactivity
:
Interactivity
<
number
>
;
}
>
=
(
state
,
action
)
=>
{
const
exclusion
=
judgeSelf
(
action
.
payload
.
player
,
state
)
?
state
.
meExclusion
:
state
.
opExclusion
;
extendIdleInteractivities
(
exclusion
,
action
.
payload
.
sequence
,
action
.
payload
.
interactivity
);
};
export
const
selectMeExclusion
=
(
state
:
RootState
)
=>
state
.
duel
.
meExclusion
||
{
inner
:
[]
};
export
const
selectopExclusion
=
(
state
:
RootState
)
=>
...
...
src/reducers/duel/mod.ts
View file @
bce1c2f5
...
...
@@ -88,6 +88,7 @@ import {
initExclusionImpl
,
removeExclusionImpl
,
exclusionCase
,
addExclusionIdleInteractivitiesImpl
,
}
from
"
./exclusionSlice
"
;
import
{
DeckState
,
initDeckImpl
}
from
"
./deckSlice
"
;
import
{
...
...
@@ -193,6 +194,7 @@ const duelSlice = createSlice({
// 除外区相关`Reducer`
initExclusion
:
initExclusionImpl
,
removeExclusion
:
removeExclusionImpl
,
addExclusionIdleInteractivities
:
addExclusionIdleInteractivitiesImpl
,
// 卡组相关`Reducer`
initDeck
:
initDeckImpl
,
...
...
@@ -297,6 +299,7 @@ export const {
initDeck
,
initExclusion
,
removeExclusion
,
addExclusionIdleInteractivities
,
setCheckCardModalV2IsOpen
,
setCheckCardModalV2MinMax
,
setCheckCardModalV2CancelAble
,
...
...
src/service/duel/selectIdleCmd.ts
View file @
bce1c2f5
...
...
@@ -9,6 +9,7 @@ import {
setEnableEp
,
addCemeteryIdleInteractivities
,
clearAllIdleInteractivities
,
addExclusionIdleInteractivities
,
}
from
"
../../reducers/duel/mod
"
;
import
MsgSelectIdleCmd
=
ygopro
.
StocGameMessage
.
MsgSelectIdleCmd
;
import
{
ActionCreatorWithPayload
}
from
"
@reduxjs/toolkit
"
;
...
...
@@ -85,6 +86,11 @@ export default (selectIdleCmd: MsgSelectIdleCmd, dispatch: AppDispatch) => {
break
;
}
case
ygopro
.
CardZone
.
REMOVED
:
{
dispatcher
(
data
,
interactType
,
addExclusionIdleInteractivities
);
break
;
}
default
:
{
console
.
log
(
`Unhandled zone type:
${
cardInfo
.
location
}
`
);
}
...
...
src/ui/Duel/singleSlot.tsx
View file @
bce1c2f5
...
...
@@ -25,6 +25,7 @@ const SingleSlot = (props: {
item
===
undefined
?
false
:
item
.
idleInteractivities
.
length
>
0
)
!==
undefined
;
const
edgesWidth
=
2.0
;
const
edgesColor
=
BABYLON
.
Color4
.
FromColor3
(
BABYLON
.
Color3
.
Yellow
());
useClick
(
(
_event
)
=>
{
...
...
@@ -72,6 +73,7 @@ const SingleSlot = (props: {
rotation={props.rotation}
enableEdgesRendering
edgesWidth={edgeRender ? edgesWidth : 0}
edgesColor={edgesColor}
>
<standardMaterial
name="single-slot-mat"
...
...
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