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
3e13bed8
Commit
3e13bed8
authored
Jul 14, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fmt
parent
e597a650
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
20 additions
and
21 deletions
+20
-21
src/service/duel/move.ts
src/service/duel/move.ts
+1
-1
src/service/duel/posChange.ts
src/service/duel/posChange.ts
+0
-1
src/service/duel/swapGraveDeck.ts
src/service/duel/swapGraveDeck.ts
+0
-1
src/service/duel/updateData.ts
src/service/duel/updateData.ts
+1
-2
src/ui/Duel/PlayMat/Card/index.tsx
src/ui/Duel/PlayMat/Card/index.tsx
+2
-3
src/ui/Duel/PlayMat/Card/springs/attack.ts
src/ui/Duel/PlayMat/Card/springs/attack.ts
+2
-3
src/ui/Duel/PlayMat/Card/springs/index.ts
src/ui/Duel/PlayMat/Card/springs/index.ts
+1
-1
src/ui/Duel/PlayMat/Card/springs/move.ts
src/ui/Duel/PlayMat/Card/springs/move.ts
+3
-2
src/ui/Duel/PlayMat/Card/springs/moveToDeck.ts
src/ui/Duel/PlayMat/Card/springs/moveToDeck.ts
+1
-1
src/ui/Duel/PlayMat/Card/springs/moveToGround.ts
src/ui/Duel/PlayMat/Card/springs/moveToGround.ts
+1
-1
src/ui/Duel/PlayMat/Card/springs/moveToHand.ts
src/ui/Duel/PlayMat/Card/springs/moveToHand.ts
+1
-1
src/ui/Duel/PlayMat/Card/springs/moveToOutside.ts
src/ui/Duel/PlayMat/Card/springs/moveToOutside.ts
+1
-1
src/ui/Duel/PlayMat/Card/springs/moveToToken.ts
src/ui/Duel/PlayMat/Card/springs/moveToToken.ts
+1
-1
src/ui/Duel/PlayMat/Card/springs/types.ts
src/ui/Duel/PlayMat/Card/springs/types.ts
+5
-2
No files found.
src/service/duel/move.ts
View file @
3e13bed8
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
cardStore
,
CardType
}
from
"
@/stores
"
;
import
{
callCardMove
}
from
"
@/ui/Duel/PlayMat/Card
"
;
import
{
REASON_MATERIAL
,
TYPE_TOKEN
}
from
"
../../common
"
;
import
{
callCardMove
}
from
"
@/ui/Duel/PlayMat/Card
"
;
type
MsgMove
=
ygopro
.
StocGameMessage
.
MsgMove
;
const
{
HAND
,
GRAVE
,
REMOVED
,
DECK
,
EXTRA
,
MZONE
,
TZONE
}
=
ygopro
.
CardZone
;
...
...
src/service/duel/posChange.ts
View file @
3e13bed8
import
{
ygopro
}
from
"
@/api
"
;
import
MsgPosChange
=
ygopro
.
StocGameMessage
.
MsgPosChange
;
import
{
cardStore
,
fetchEsHintMeta
}
from
"
@/stores
"
;
import
{
callCardMove
}
from
"
@/ui/Duel/PlayMat/Card
"
;
export
default
async
(
posChange
:
MsgPosChange
)
=>
{
...
...
src/service/duel/swapGraveDeck.ts
View file @
3e13bed8
import
{
ygopro
}
from
"
@/api
"
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
cardStore
}
from
"
@/stores
"
;
import
{
callCardMove
}
from
"
@/ui/Duel/PlayMat/Card
"
;
import
MsgSwapGraveDeck
=
ygopro
.
StocGameMessage
.
MsgSwapGraveDeck
;
...
...
src/service/duel/updateData.ts
View file @
3e13bed8
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
callCardMove
}
from
"
@/ui/Duel/PlayMat/Card
"
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
cardStore
}
from
"
@/stores
"
;
import
{
callCardMove
}
from
"
@/ui/Duel/PlayMat/Card
"
;
import
MsgUpdateData
=
ygopro
.
StocGameMessage
.
MsgUpdateData
;
export
default
async
(
updateData
:
MsgUpdateData
)
=>
{
...
...
src/ui/Duel/PlayMat/Card/index.tsx
View file @
3e13bed8
...
...
@@ -26,16 +26,15 @@ import {
import
{
interactTypeToString
}
from
"
../../utils
"
;
import
{
attack
,
type
AttackOptions
,
focus
,
move
,
type
MoveOptions
,
type
AttackOptions
,
}
from
"
./springs
"
;
import
type
{
SpringApiProps
}
from
"
./springs/types
"
;
import
{
preloadCardImage
}
from
"
./springs/utils
"
;
const
{
HAND
,
GRAVE
,
REMOVED
,
DECK
,
EXTRA
,
MZONE
,
SZONE
,
TZONE
}
=
ygopro
.
CardZone
;
const
{
HAND
,
GRAVE
,
REMOVED
,
EXTRA
,
MZONE
,
SZONE
,
TZONE
}
=
ygopro
.
CardZone
;
export
const
Card
:
React
.
FC
<
{
idx
:
number
}
>
=
React
.
memo
(({
idx
})
=>
{
const
card
=
cardStore
.
inner
[
idx
];
...
...
src/ui/Duel/PlayMat/Card/springs/attack.ts
View file @
3e13bed8
// 暂时先简单实现攻击动画,后面有时间再慢慢优化
import
{
easings
}
from
"
@react-spring/web
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
CardType
,
isMe
}
from
"
@/stores
"
;
import
{
isMe
}
from
"
@/stores
"
;
import
{
matConfig
}
from
"
@/ui/Shared
"
;
import
type
{
SpringApi
,
AttackFunc
}
from
"
./types
"
;
import
type
{
AttackFunc
}
from
"
./types
"
;
import
{
asyncStart
}
from
"
./utils
"
;
const
{
BLOCK_WIDTH
,
BLOCK_HEIGHT_M
,
BLOCK_HEIGHT_S
,
COL_GAP
,
ROW_GAP
}
=
...
...
src/ui/Duel/PlayMat/Card/springs/index.ts
View file @
3e13bed8
export
*
from
"
./attack
"
;
export
*
from
"
./focus
"
;
export
*
from
"
./move
"
;
export
*
from
"
./utils
"
;
export
*
from
"
./types
"
;
export
*
from
"
./utils
"
;
src/ui/Duel/PlayMat/Card/springs/move.ts
View file @
3e13bed8
import
{
ygopro
}
from
"
@/api
"
;
import
type
{
MoveFunc
}
from
"
./types
"
;
import
{
moveToDeck
}
from
"
./moveToDeck
"
;
import
{
moveToGround
}
from
"
./moveToGround
"
;
import
{
moveToHand
}
from
"
./moveToHand
"
;
import
{
moveToDeck
}
from
"
./moveToDeck
"
;
import
{
moveToOutside
}
from
"
./moveToOutside
"
;
import
{
moveToToken
}
from
"
./moveToToken
"
;
import
type
{
MoveFunc
}
from
"
./types
"
;
const
{
HAND
,
GRAVE
,
REMOVED
,
DECK
,
EXTRA
,
MZONE
,
SZONE
,
TZONE
}
=
ygopro
.
CardZone
;
...
...
src/ui/Duel/PlayMat/Card/springs/moveToDeck.ts
View file @
3e13bed8
...
...
@@ -2,8 +2,8 @@ import { ygopro } from "@/api";
import
{
isMe
}
from
"
@/stores
"
;
import
{
matConfig
}
from
"
@/ui/Shared
"
;
import
{
asyncStart
}
from
"
./utils
"
;
import
type
{
MoveFunc
}
from
"
./types
"
;
import
{
asyncStart
}
from
"
./utils
"
;
const
{
BLOCK_WIDTH
,
...
...
src/ui/Duel/PlayMat/Card/springs/moveToGround.ts
View file @
3e13bed8
...
...
@@ -4,8 +4,8 @@ import { ygopro } from "@/api";
import
{
isMe
}
from
"
@/stores
"
;
import
{
matConfig
}
from
"
@/ui/Shared
"
;
import
{
asyncStart
}
from
"
./utils
"
;
import
type
{
MoveFunc
}
from
"
./types
"
;
import
{
asyncStart
}
from
"
./utils
"
;
const
{
BLOCK_WIDTH
,
...
...
src/ui/Duel/PlayMat/Card/springs/moveToHand.ts
View file @
3e13bed8
...
...
@@ -2,8 +2,8 @@ import { ygopro } from "@/api";
import
{
cardStore
,
isMe
}
from
"
@/stores
"
;
import
{
matConfig
}
from
"
@/ui/Shared
"
;
import
{
asyncStart
}
from
"
./utils
"
;
import
type
{
MoveFunc
}
from
"
./types
"
;
import
{
asyncStart
}
from
"
./utils
"
;
const
{
BLOCK_HEIGHT_M
,
...
...
src/ui/Duel/PlayMat/Card/springs/moveToOutside.ts
View file @
3e13bed8
...
...
@@ -2,8 +2,8 @@ import { ygopro } from "@/api";
import
{
isMe
}
from
"
@/stores
"
;
import
{
matConfig
}
from
"
@/ui/Shared
"
;
import
{
asyncStart
}
from
"
./utils
"
;
import
type
{
MoveFunc
}
from
"
./types
"
;
import
{
asyncStart
}
from
"
./utils
"
;
const
{
BLOCK_WIDTH
,
...
...
src/ui/Duel/PlayMat/Card/springs/moveToToken.ts
View file @
3e13bed8
import
{
asyncStart
}
from
"
./utils
"
;
import
type
{
MoveFunc
}
from
"
./types
"
;
import
{
asyncStart
}
from
"
./utils
"
;
export
const
moveToToken
:
MoveFunc
=
async
(
props
)
=>
{
const
{
api
}
=
props
;
...
...
src/ui/Duel/PlayMat/Card/springs/types.ts
View file @
3e13bed8
import
type
{
SpringRef
}
from
"
@react-spring/web
"
;
import
type
{
ygopro
}
from
"
@/api
"
;
import
type
{
CardType
}
from
"
@/stores
"
;
import
type
{
SpringRef
}
from
"
@react-spring/web
"
;
export
interface
SpringApiProps
{
x
:
number
;
...
...
@@ -29,7 +30,9 @@ type OptionsToFunc<Options> = (props: {
options
?:
Options
;
})
=>
Promise
<
void
>
;
export
type
MoveOptions
=
{
fromZone
?:
ygopro
.
CardZone
};
export
interface
MoveOptions
{
fromZone
?:
ygopro
.
CardZone
;
}
export
type
MoveFunc
=
OptionsToFunc
<
MoveOptions
>
;
export
type
AttackOptions
=
...
...
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