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
7a36b504
Commit
7a36b504
authored
Dec 05, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Card struct
parent
a1abc554
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
src/reducers/duel/handsSlice.ts
src/reducers/duel/handsSlice.ts
+1
-1
src/reducers/duel/util.ts
src/reducers/duel/util.ts
+22
-0
No files found.
src/reducers/duel/handsSlice.ts
View file @
7a36b504
...
@@ -39,7 +39,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -39,7 +39,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
const
selfType
=
state
.
selfType
;
const
selfType
=
state
.
selfType
;
const
cards
=
hands
.
map
((
meta
)
=>
{
const
cards
=
hands
.
map
((
meta
)
=>
{
return
{
meta
,
transform
:
{}
};
return
{
meta
,
transform
:
{}
,
interactivities
:
[]
};
});
});
if
(
judgeSelf
(
player
,
selfType
))
{
if
(
judgeSelf
(
player
,
selfType
))
{
if
(
state
.
meHands
)
{
if
(
state
.
meHands
)
{
...
...
src/reducers/duel/util.ts
View file @
7a36b504
...
@@ -30,6 +30,7 @@ export function judgeSelf(
...
@@ -30,6 +30,7 @@ export function judgeSelf(
export
interface
Card
{
export
interface
Card
{
meta
:
CardMeta
;
meta
:
CardMeta
;
transform
:
CardTransform
;
transform
:
CardTransform
;
interactivities
:
Interactivity
[];
}
}
interface
CardTransform
{
interface
CardTransform
{
...
@@ -44,3 +45,24 @@ interface CardTransform {
...
@@ -44,3 +45,24 @@ interface CardTransform {
z
:
number
;
z
:
number
;
};
};
}
}
export
enum
InteractType
{
// 可普通召唤
SUMMON
,
// 可特殊召唤
SP_SUMMON
,
// 可改变表示形式
POS_CHANGE
,
// 可前场放置
MSET
,
// 可后场放置
SSET
,
// 可发动效果
ACTIVATE
,
}
interface
Interactivity
{
interactType
:
InteractType
;
// 如果`interactType`是`ACTIVATE`,这个字段是对应的效果编号
activateIndex
:
number
;
}
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