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
deft
Neos
Commits
6ab710fe
Commit
6ab710fe
authored
May 13, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize
parent
9eea2046
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
6 deletions
+25
-6
neos.config.json
neos.config.json
+3
-1
neos.config.prod.json
neos.config.prod.json
+3
-1
src/service/duel/chaining.ts
src/service/duel/chaining.ts
+3
-1
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+10
-2
src/stores/matStore/store.ts
src/stores/matStore/store.ts
+1
-0
src/stores/matStore/types.ts
src/stores/matStore/types.ts
+2
-0
src/ui/Duel/PlayMat/Card.tsx
src/ui/Duel/PlayMat/Card.tsx
+3
-1
No files found.
neos.config.json
View file @
6ab710fe
...
...
@@ -71,7 +71,9 @@
"hint"
:{
"waitingDuration"
:
1.5
,
"maxCount"
:
1
}
},
"moveDelay"
:
500
,
"chainingDelay"
:
800
},
"unimplementedWhiteList"
:[
1
,
...
...
neos.config.prod.json
View file @
6ab710fe
...
...
@@ -71,7 +71,9 @@
"hint"
:{
"waitingDuration"
:
1.5
,
"maxCount"
:
1
}
},
"moveDelay"
:
500
,
"chainingDelay"
:
800
},
"unimplementedWhiteList"
:[
1
,
...
...
src/service/duel/chaining.ts
View file @
6ab710fe
import
{
ygopro
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
fetchEsHintMeta
,
matStore
}
from
"
@/stores
"
;
export
default
(
chaining
:
ygopro
.
StocGameMessage
.
MsgChaining
)
=>
{
fetchEsHintMeta
({
originMsg
:
"
「[?]」被发动时
"
,
...
...
@@ -11,5 +13,5 @@ export default (chaining: ygopro.StocGameMessage.MsgChaining) => {
setTimeout
(()
=>
{
matStore
.
setChaining
(
chaining
.
location
,
chaining
.
code
,
false
);
// TODO: set chained
},
500
);
},
useConfig
().
ui
.
chainingDelay
);
};
src/service/duel/gameMsg.ts
View file @
6ab710fe
import
{
ygopro
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
matStore
}
from
"
@/stores
"
;
import
onMsgAttack
from
"
./attack
"
;
...
...
@@ -56,7 +57,7 @@ const ActiveList = [
"
select_yes_no
"
,
];
const
TIME_GAP
=
200
;
const
NeosConfig
=
useConfig
()
;
export
default
function
handleGameMsg
(
pb
:
ygopro
.
YgoStocMsg
)
{
// 防止MSG更新太频繁,做下控频
...
...
@@ -69,6 +70,9 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
matStore
.
waiting
=
false
;
}
// 先重置`delay`
matStore
.
delay
=
0
;
switch
(
msg
.
gameMsg
)
{
case
"
start
"
:
{
onMsgStart
(
msg
.
start
);
...
...
@@ -108,6 +112,8 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
case
"
move
"
:
{
onMsgMove
(
msg
.
move
);
matStore
.
delay
=
NeosConfig
.
ui
.
moveDelay
;
break
;
}
case
"
select_card
"
:
{
...
...
@@ -233,6 +239,8 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
case
"
chaining
"
:
{
onMsgChaining
(
msg
.
chaining
);
matStore
.
delay
=
NeosConfig
.
ui
.
chainingDelay
;
break
;
}
case
"
chain_solved
"
:
{
...
...
@@ -279,5 +287,5 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
}
},
TIME_GAP
);
},
matStore
.
delay
);
}
src/stores/matStore/store.ts
View file @
6ab710fe
...
...
@@ -255,6 +255,7 @@ export const matStore: MatState = proxy<MatState>({
result
:
ygopro
.
StocGameMessage
.
MsgWin
.
ActionType
.
UNKNOWN
,
waiting
:
false
,
unimplemented
:
0
,
delay
:
0
,
// methods
in
:
getZone
,
isMe
,
...
...
src/stores/matStore/types.ts
View file @
6ab710fe
...
...
@@ -94,6 +94,8 @@ export interface MatState {
unimplemented
:
number
;
// 未处理的`Message`
delay
:
number
;
// MSG处理的延迟时间,目的时为了让一些动画处理完后再开始处理下一个MSG
// >>> methods >>>
/** 根据zone获取hands/masters/magics... */
in
:
(
zone
:
ygopro
.
CardZone
)
=>
BothSide
<
DuelFieldState
>
;
...
...
src/ui/Duel/PlayMat/Card.tsx
View file @
6ab710fe
...
...
@@ -59,7 +59,9 @@ export const Card: React.FC<{
"
--shadow
"
:
hight
>
0
?
1
:
0
,
"
--opponent-deg
"
:
opponent
?
"
180deg
"
:
"
0deg
"
,
"
--vertical
"
:
vertical
?
1
:
0
,
"
--trans-time
"
:
`${transTime}s`
,
"
--trans-time
"
:
`${
chaining ? NeosConfig.ui.chainingDelay / 1000 : transTime
}s`
,
"
--highlight-on
"
:
highlight
?
1
:
0
,
"
--scale-focus
"
:
focus
?
FOCUS_SCALE
:
1
,
"
--card-img
"
:
facedown
...
...
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