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
24998446
Commit
24998446
authored
Apr 22, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: ts error and fmt
parent
81703784
Changes
47
Show whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
67 additions
and
68 deletions
+67
-68
src/api/index.ts
src/api/index.ts
+2
-2
src/reducers/duel/generic.ts
src/reducers/duel/generic.ts
+1
-1
src/reducers/duel/hintSlice.ts
src/reducers/duel/hintSlice.ts
+1
-1
src/reducers/duel/modal/checkCardModalSlice.ts
src/reducers/duel/modal/checkCardModalSlice.ts
+1
-1
src/reducers/duel/modal/checkCardModalV2Slice.ts
src/reducers/duel/modal/checkCardModalV2Slice.ts
+1
-1
src/reducers/duel/modal/checkCardModalV3Slice.ts
src/reducers/duel/modal/checkCardModalV3Slice.ts
+1
-1
src/reducers/duel/modal/mod.ts
src/reducers/duel/modal/mod.ts
+1
-1
src/reducers/duel/modal/sortCardModalSlice.ts
src/reducers/duel/modal/sortCardModalSlice.ts
+1
-1
src/reducers/duel/modal/yesNoModalSlice.ts
src/reducers/duel/modal/yesNoModalSlice.ts
+1
-1
src/reducers/duel/monstersSlice.ts
src/reducers/duel/monstersSlice.ts
+1
-1
src/service/duel/attack.ts
src/service/duel/attack.ts
+2
-2
src/service/duel/attackDisable.ts
src/service/duel/attackDisable.ts
+5
-2
src/service/duel/chaining.ts
src/service/duel/chaining.ts
+5
-2
src/service/duel/draw.ts
src/service/duel/draw.ts
+5
-2
src/service/duel/hint.ts
src/service/duel/hint.ts
+8
-4
src/service/duel/reloadField.ts
src/service/duel/reloadField.ts
+1
-2
src/service/duel/selectCard.ts
src/service/duel/selectCard.ts
+1
-1
src/service/duel/selectChain.ts
src/service/duel/selectChain.ts
+3
-4
src/service/duel/selectCounter.ts
src/service/duel/selectCounter.ts
+1
-1
src/service/duel/selectEffectYn.ts
src/service/duel/selectEffectYn.ts
+3
-4
src/service/duel/selectOption.ts
src/service/duel/selectOption.ts
+1
-1
src/service/duel/selectSum.ts
src/service/duel/selectSum.ts
+1
-1
src/service/duel/selectTribute.ts
src/service/duel/selectTribute.ts
+1
-2
src/service/duel/selectUnselectCard.ts
src/service/duel/selectUnselectCard.ts
+1
-2
src/service/duel/set.ts
src/service/duel/set.ts
+0
-1
src/service/duel/spSummoned.ts
src/service/duel/spSummoned.ts
+0
-1
src/service/duel/spSummoning.ts
src/service/duel/spSummoning.ts
+0
-1
src/service/duel/summoned.ts
src/service/duel/summoned.ts
+0
-1
src/service/duel/summoning.ts
src/service/duel/summoning.ts
+0
-1
src/service/duel/swap.ts
src/service/duel/swap.ts
+0
-1
src/service/duel/timeLimit.ts
src/service/duel/timeLimit.ts
+0
-1
src/service/duel/unimplemented.ts
src/service/duel/unimplemented.ts
+0
-1
src/service/duel/updateCounter.ts
src/service/duel/updateCounter.ts
+0
-1
src/service/duel/wait.ts
src/service/duel/wait.ts
+1
-2
src/service/duel/win.ts
src/service/duel/win.ts
+0
-1
src/valtioStores/matStore/index.ts
src/valtioStores/matStore/index.ts
+2
-2
src/valtioStores/matStore/methods/fetchCheckCardMeta.ts
src/valtioStores/matStore/methods/fetchCheckCardMeta.ts
+1
-1
src/valtioStores/matStore/methods/fetchHint.ts
src/valtioStores/matStore/methods/fetchHint.ts
+2
-2
src/valtioStores/matStore/methods/getCardByLocation.ts
src/valtioStores/matStore/methods/getCardByLocation.ts
+1
-1
src/valtioStores/matStore/store.ts
src/valtioStores/matStore/store.ts
+4
-3
src/valtioStores/matStore/types.ts
src/valtioStores/matStore/types.ts
+1
-1
src/valtioStores/messageStore/index.ts
src/valtioStores/messageStore/index.ts
+1
-1
src/valtioStores/messageStore/methods/fetchCheckCardMetasV2.ts
...altioStores/messageStore/methods/fetchCheckCardMetasV2.ts
+1
-1
src/valtioStores/messageStore/methods/fetchCheckCardMetasV3.ts
...altioStores/messageStore/methods/fetchCheckCardMetasV3.ts
+1
-1
src/valtioStores/messageStore/methods/index.ts
src/valtioStores/messageStore/methods/index.ts
+1
-1
src/valtioStores/messageStore/store.ts
src/valtioStores/messageStore/store.ts
+1
-0
src/valtioStores/messageStore/types.ts
src/valtioStores/messageStore/types.ts
+1
-1
No files found.
src/api/index.ts
View file @
24998446
export
*
from
"
./cards
"
;
export
*
from
"
./strings
"
;
export
*
from
"
./deck
"
;
export
*
from
"
./ocgcore/ocgHelper
"
;
export
*
from
"
./ocgcore/idl/ocgcore
"
;
export
*
from
"
./ocgcore/ocgHelper
"
;
export
*
from
"
./strings
"
;
src/reducers/duel/generic.ts
View file @
24998446
...
...
@@ -5,8 +5,8 @@ import {
PayloadAction
,
}
from
"
@reduxjs/toolkit
"
;
import
{
CardMeta
,
fetchCard
}
from
"
@/api/cards
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
CardMeta
,
fetchCard
}
from
"
@/api/cards
"
;
import
{
DuelState
}
from
"
./mod
"
;
import
ReloadFieldAction
=
ygopro
.
StocGameMessage
.
MsgReloadField
.
ZoneAction
;
...
...
src/reducers/duel/hintSlice.ts
View file @
24998446
import
{
ActionReducerMapBuilder
,
createAsyncThunk
}
from
"
@reduxjs/toolkit
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
DESCRIPTION_LIMIT
,
fetchStrings
,
getStrings
}
from
"
@/api/strings
"
;
import
{
RootState
}
from
"
@/store
"
;
...
...
src/reducers/duel/modal/checkCardModalSlice.ts
View file @
24998446
...
...
@@ -5,8 +5,8 @@ import {
PayloadAction
,
}
from
"
@reduxjs/toolkit
"
;
import
{
fetchCard
,
getCardStr
}
from
"
@/api/cards
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
,
getCardStr
}
from
"
@/api/cards
"
;
import
{
RootState
}
from
"
@/store
"
;
import
{
DuelState
}
from
"
../mod
"
;
...
...
src/reducers/duel/modal/checkCardModalV2Slice.ts
View file @
24998446
...
...
@@ -4,8 +4,8 @@ import {
createAsyncThunk
,
}
from
"
@reduxjs/toolkit
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
RootState
}
from
"
@/store
"
;
import
{
DuelReducer
}
from
"
../generic
"
;
...
...
src/reducers/duel/modal/checkCardModalV3Slice.ts
View file @
24998446
...
...
@@ -4,8 +4,8 @@ import {
createAsyncThunk
,
}
from
"
@reduxjs/toolkit
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
RootState
}
from
"
@/store
"
;
import
{
DuelReducer
}
from
"
../generic
"
;
...
...
src/reducers/duel/modal/mod.ts
View file @
24998446
import
{
CardMeta
}
from
"
@/api/cards
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
CardMeta
}
from
"
@/api/cards
"
;
type
CardLocation
=
ReturnType
<
typeof
ygopro
.
CardLocation
.
prototype
.
toObject
>
;
export
interface
ModalState
{
...
...
src/reducers/duel/modal/sortCardModalSlice.ts
View file @
24998446
...
...
@@ -4,8 +4,8 @@ import {
createAsyncThunk
,
}
from
"
@reduxjs/toolkit
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
RootState
}
from
"
@/store
"
;
import
{
DuelReducer
}
from
"
../generic
"
;
...
...
src/reducers/duel/modal/yesNoModalSlice.ts
View file @
24998446
...
...
@@ -5,8 +5,8 @@ import {
PayloadAction
,
}
from
"
@reduxjs/toolkit
"
;
import
{
CardMeta
,
fetchCard
}
from
"
@/api/cards
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
CardMeta
,
fetchCard
}
from
"
@/api/cards
"
;
import
{
fetchStrings
,
getStrings
}
from
"
@/api/strings
"
;
import
{
RootState
}
from
"
@/store
"
;
...
...
src/reducers/duel/monstersSlice.ts
View file @
24998446
...
...
@@ -5,8 +5,8 @@ import {
PayloadAction
,
}
from
"
@reduxjs/toolkit
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
RootState
}
from
"
@/store
"
;
import
{
...
...
src/service/duel/attack.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
matStore
}
from
"
@/valtioStores
"
;
import
{
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
}
from
"
@/valtioStores
"
;
export
default
(
attack
:
ygopro
.
StocGameMessage
.
MsgAttack
,
...
...
@@ -10,7 +10,7 @@ export default (
dispatch
(
fetchEsHintMeta
({
originMsg
:
"
「[?]」攻击时
"
,
location
:
attack
.
location
})
);
matStore
.
hint
.
fetchEsHintMeta
({
FIXME_
fetchEsHintMeta
({
originMsg
:
"
「[?]」攻击时
"
,
location
:
attack
.
location
,
});
...
...
src/service/duel/attackDisable.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
matStore
}
from
"
@/valtioStores
"
;
import
{
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
,
matStore
,
}
from
"
@/valtioStores
"
;
export
default
(
_
:
ygopro
.
StocGameMessage
.
MsgAttackDisabled
,
dispatch
:
AppDispatch
)
=>
{
dispatch
(
fetchEsHintMeta
({
originMsg
:
"
攻击被无效时
"
}));
matStore
.
hint
.
fetchEsHintMeta
({
originMsg
:
"
攻击被无效时
"
});
FIXME_
fetchEsHintMeta
({
originMsg
:
"
攻击被无效时
"
});
};
src/service/duel/chaining.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
matStore
}
from
"
@/valtioStores
"
;
import
{
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
,
matStore
,
}
from
"
@/valtioStores
"
;
export
default
(
chaining
:
ygopro
.
StocGameMessage
.
MsgChaining
,
dispatch
:
AppDispatch
...
...
@@ -9,7 +12,7 @@ export default (
dispatch
(
fetchEsHintMeta
({
originMsg
:
"
「[?]」被发动时
"
,
cardID
:
chaining
.
code
})
);
matStore
.
hint
.
fetchEsHintMeta
({
FIXME_
fetchEsHintMeta
({
originMsg
:
"
「[?]」被发动时
"
,
cardID
:
chaining
.
code
,
});
...
...
src/service/duel/draw.ts
View file @
24998446
...
...
@@ -2,7 +2,10 @@ import { ygopro } from "@/api";
import
{
fetchHandsMeta
}
from
"
@/reducers/duel/handsSlice
"
;
import
{
fetchEsHintMeta
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
matStore
}
from
"
@/valtioStores
"
;
import
{
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
,
matStore
,
}
from
"
@/valtioStores
"
;
export
default
(
draw
:
ygopro
.
StocGameMessage
.
MsgDraw
,
...
...
@@ -11,6 +14,6 @@ export default (
dispatch
(
fetchEsHintMeta
({
originMsg
:
"
玩家抽卡时
"
}));
dispatch
(
fetchHandsMeta
({
controler
:
draw
.
player
,
codes
:
draw
.
cards
}));
matStore
.
hint
.
fetchEsHintMeta
({
originMsg
:
"
玩家抽卡时
"
});
FIXME_
fetchEsHintMeta
({
originMsg
:
"
玩家抽卡时
"
});
matStore
.
hands
.
add
(
draw
.
player
,
draw
.
cards
);
};
src/service/duel/hint.ts
View file @
24998446
...
...
@@ -5,7 +5,11 @@ import {
fetchSelectHintMeta
,
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
matStore
}
from
"
@/valtioStores
"
;
import
{
fetchCommonHintMeta
as
FIXME_fetchCommonHintMeta
,
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
,
fetchSelectHintMeta
as
FIXME_fetchSelectHintMeta
,
}
from
"
@/valtioStores
"
;
import
MsgHint
=
ygopro
.
StocGameMessage
.
MsgHint
;
...
...
@@ -13,19 +17,19 @@ export default (hint: MsgHint, dispatch: AppDispatch) => {
switch
(
hint
.
hint_type
)
{
case
MsgHint
.
HintType
.
HINT_EVENT
:
{
dispatch
(
fetchEsHintMeta
({
originMsg
:
hint
.
hint_data
}));
matStore
.
hint
.
fetchEsHintMeta
({
originMsg
:
hint
.
hint_data
});
FIXME_
fetchEsHintMeta
({
originMsg
:
hint
.
hint_data
});
break
;
}
case
MsgHint
.
HintType
.
HINT_MESSAGE
:
{
dispatch
(
fetchCommonHintMeta
(
hint
.
hint_data
));
matStore
.
hint
.
fetchCommonHintMeta
(
hint
.
hint_data
);
FIXME_
fetchCommonHintMeta
(
hint
.
hint_data
);
break
;
}
case
MsgHint
.
HintType
.
HINT_SELECTMSG
:
{
dispatch
(
fetchSelectHintMeta
({
selectHintData
:
hint
.
hint_data
,
esHint
:
""
})
);
matStore
.
hint
.
fetchSelectHintMeta
({
FIXME_
fetchSelectHintMeta
({
selectHintData
:
hint
.
hint_data
,
esHint
:
""
,
});
...
...
src/service/duel/reloadField.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
reloadField
}
from
"
@/reducers/duel/mod
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
matStore
,
type
DuelFieldState
}
from
"
@/valtioStores
"
;
import
{
type
DuelFieldState
,
matStore
}
from
"
@/valtioStores
"
;
type
MsgReloadField
=
ygopro
.
StocGameMessage
.
MsgReloadField
;
...
...
src/service/duel/selectCard.ts
View file @
24998446
...
...
@@ -8,8 +8,8 @@ import { fetchCheckCardMeta } from "@/reducers/duel/modal/mod";
import
{
AppDispatch
}
from
"
@/store
"
;
import
MsgSelectCard
=
ygopro
.
StocGameMessage
.
MsgSelectCard
;
import
{
messageStore
,
fetchCheckCardMeta
as
FIXME_fetchCheckCardMeta
,
messageStore
,
}
from
"
@/valtioStores
"
;
import
{
CardZoneToChinese
}
from
"
./util
"
;
...
...
src/service/duel/selectChain.ts
View file @
24998446
...
...
@@ -10,15 +10,14 @@ import {
}
from
"
@/reducers/duel/mod
"
;
import
{
fetchCheckCardMeta
}
from
"
@/reducers/duel/modal/mod
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
CardZoneToChinese
}
from
"
./util
"
;
import
{
messageStore
,
fetchCheckCardMeta
as
FIXME_fetchCheckCardMeta
,
fetchSelectHintMeta
as
FIXME_fetchSelectHintMeta
,
messageStore
,
}
from
"
@/valtioStores
"
;
import
{
CardZoneToChinese
}
from
"
./util
"
;
type
MsgSelectChain
=
ygopro
.
StocGameMessage
.
MsgSelectChain
;
export
default
(
selectChain
:
MsgSelectChain
,
dispatch
:
AppDispatch
)
=>
{
const
player
=
selectChain
.
player
;
...
...
src/service/duel/selectCounter.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
setCheckCounter
}
from
"
@/reducers/duel/mod
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
messageStore
,
getCardByLocation
}
from
"
@/valtioStores
"
;
import
{
getCardByLocation
,
messageStore
}
from
"
@/valtioStores
"
;
type
MsgSelectCounter
=
ygopro
.
StocGameMessage
.
MsgSelectCounter
;
export
default
(
selectCounter
:
MsgSelectCounter
,
dispatch
:
AppDispatch
)
=>
{
...
...
src/service/duel/selectEffectYn.ts
View file @
24998446
import
{
CardMeta
,
fetchCard
}
from
"
@/api/cards
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
CardMeta
,
fetchCard
}
from
"
@/api/cards
"
;
import
{
fetchStrings
}
from
"
@/api/strings
"
;
import
{
setYesNoModalIsOpen
}
from
"
@/reducers/duel/mod
"
;
import
{
fetchYesNoMeta
}
from
"
@/reducers/duel/modal/mod
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
getCardByLocation
,
messageStore
}
from
"
@/valtioStores
"
;
import
{
CardZoneToChinese
}
from
"
./util
"
;
import
{
messageStore
,
getCardByLocation
}
from
"
@/valtioStores
"
;
import
{
fetchStrings
}
from
"
@/api/strings
"
;
type
MsgSelectEffectYn
=
ygopro
.
StocGameMessage
.
MsgSelectEffectYn
;
// 这里改成了 async 不知道有没有影响
...
...
src/service/duel/selectOption.ts
View file @
24998446
import
{
ygopro
,
fetchCard
,
getCardStr
}
from
"
@/api
"
;
import
{
fetchCard
,
getCardStr
,
ygopro
}
from
"
@/api
"
;
import
{
setOptionModalIsOpen
}
from
"
@/reducers/duel/mod
"
;
import
{
fetchOptionMeta
}
from
"
@/reducers/duel/modal/mod
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
...
...
src/service/duel/selectSum.ts
View file @
24998446
...
...
@@ -8,8 +8,8 @@ import {
import
{
fetchCheckCardMetasV3
}
from
"
@/reducers/duel/modal/checkCardModalV3Slice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
messageStore
,
fetchCheckCardMetasV3
as
FIXME_fetchCheckCardMetasV3
,
messageStore
,
}
from
"
@/valtioStores
"
;
type
MsgSelectSum
=
ygopro
.
StocGameMessage
.
MsgSelectSum
;
...
...
src/service/duel/selectTribute.ts
View file @
24998446
...
...
@@ -7,10 +7,9 @@ import {
}
from
"
@/reducers/duel/mod
"
;
import
{
fetchCheckCardMetasV3
}
from
"
@/reducers/duel/modal/checkCardModalV3Slice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
messageStore
,
fetchCheckCardMetasV3
as
FIXME_fetchCheckCardMetasV3
,
messageStore
,
}
from
"
@/valtioStores
"
;
type
MsgSelectTribute
=
ygopro
.
StocGameMessage
.
MsgSelectTribute
;
...
...
src/service/duel/selectUnselectCard.ts
View file @
24998446
...
...
@@ -8,10 +8,9 @@ import {
}
from
"
@/reducers/duel/mod
"
;
import
{
fetchCheckCardMetasV2
}
from
"
@/reducers/duel/modal/checkCardModalV2Slice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
messageStore
,
fetchCheckCardMetasV2
as
FIXME_fetchCheckCardMetasV2
,
messageStore
,
}
from
"
@/valtioStores
"
;
type
MsgSelectUnselectCard
=
ygopro
.
StocGameMessage
.
MsgSelectUnselectCard
;
...
...
src/service/duel/set.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
}
from
"
@/valtioStores
"
;
export
default
(
_set
:
ygopro
.
StocGameMessage
.
MsgSet
,
dispatch
:
AppDispatch
)
=>
{
...
...
src/service/duel/spSummoned.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
}
from
"
@/valtioStores
"
;
export
default
(
...
...
src/service/duel/spSummoning.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
}
from
"
@/valtioStores
"
;
export
default
(
spSummoning
:
ygopro
.
StocGameMessage
.
MsgSpSummoning
,
...
...
src/service/duel/summoned.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
}
from
"
@/valtioStores
"
;
export
default
(
...
...
src/service/duel/summoning.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
}
from
"
@/valtioStores
"
;
export
default
(
...
...
src/service/duel/swap.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
fetchEsHintMeta
as
FIXME_fetchEsHintMeta
}
from
"
@/valtioStores
"
;
export
default
(
...
...
src/service/duel/timeLimit.ts
View file @
24998446
...
...
@@ -2,7 +2,6 @@ import { ygopro } from "@/api";
import
{
sendTimeConfirm
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
{
updateTimeLimit
}
from
"
@/reducers/duel/mod
"
;
import
{
store
}
from
"
@/store
"
;
import
{
matStore
}
from
"
@/valtioStores
"
;
export
default
function
handleTimeLimit
(
timeLimit
:
ygopro
.
StocTimeLimit
)
{
...
...
src/service/duel/unimplemented.ts
View file @
24998446
...
...
@@ -2,7 +2,6 @@ import { ygopro } from "@/api";
import
{
useConfig
}
from
"
@/config
"
;
import
{
setUnimplemented
}
from
"
@/reducers/duel/mod
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
matStore
}
from
"
@/valtioStores
"
;
const
NeosConfig
=
useConfig
();
...
...
src/service/duel/updateCounter.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
updateMonsterCounters
}
from
"
@/reducers/duel/mod
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
getCardByLocation
}
from
"
@/valtioStores
"
;
type
MsgUpdateCounter
=
ygopro
.
StocGameMessage
.
MsgUpdateCounter
;
...
...
src/service/duel/wait.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
clearAllIdleInteractivities
,
setWaiting
}
from
"
@/reducers/duel/mod
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
matStore
,
clearAllIdleInteractivities
as
FIXME_clearAllIdleInteractivities
,
matStore
,
}
from
"
@/valtioStores
"
;
export
default
(
...
...
src/service/duel/win.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
setResult
}
from
"
@/reducers/duel/mod
"
;
import
{
AppDispatch
}
from
"
@/store
"
;
import
{
matStore
}
from
"
@/valtioStores
"
;
export
default
(
win
:
ygopro
.
StocGameMessage
.
MsgWin
,
dispatch
:
AppDispatch
)
=>
{
...
...
src/valtioStores/matStore/index.ts
View file @
24998446
export
*
from
"
./types
"
;
export
*
from
"
./store
"
;
export
*
from
"
./methods
"
;
export
*
from
"
./store
"
;
export
*
from
"
./types
"
;
src/valtioStores/matStore/methods/fetchCheckCardMeta.ts
View file @
24998446
import
{
ygopro
}
from
"
@/api
"
;
import
{
matStore
,
messageStore
}
from
"
@/valtioStores
"
;
import
{
fetchCard
,
getCardStr
}
from
"
@/api/cards
"
;
import
{
matStore
,
messageStore
}
from
"
@/valtioStores
"
;
function
CardZoneToChinese
(
zone
:
ygopro
.
CardZone
):
string
{
switch
(
zone
)
{
...
...
src/valtioStores/matStore/methods/fetchHint.ts
View file @
24998446
import
{
matStore
}
from
"
@/valtioStores
"
;
import
type
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
DESCRIPTION_LIMIT
,
fetchStrings
,
getStrings
}
from
"
@/api/strings
"
;
import
type
{
ygopro
}
from
"
@/api
"
;
import
{
matStore
}
from
"
@/valtioStores
"
;
const
{
hint
}
=
matStore
;
...
...
src/valtioStores/matStore/methods/getCardByLocation.ts
View file @
24998446
import
{
matStore
}
from
"
@/valtioStores
"
;
import
type
{
ygopro
}
from
"
@/api
"
;
import
{
matStore
}
from
"
@/valtioStores
"
;
export
const
getCardByLocation
=
(
location
:
ygopro
.
CardLocation
)
=>
{
return
matStore
.
getZone
(
location
.
location
).
at
(
location
.
controler
)[
...
...
src/valtioStores/matStore/store.ts
View file @
24998446
import
{
proxy
}
from
"
valtio
"
;
import
{
cloneDeep
}
from
"
lodash-es
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
{
proxy
}
from
"
valtio
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchCard
}
from
"
@/api/cards
"
;
import
type
{
BothSide
,
...
...
@@ -194,7 +195,7 @@ const getZone = (zone: ygopro.CardZone) => {
const
{
SZONE
,
MZONE
,
GRAVE
,
REMOVED
,
HAND
,
DECK
,
EXTRA
}
=
ygopro
.
CardZone
;
/**
* 💡 决斗盘状态仓库,本文件核心,
* 具体介绍可以点进`
Play
MatState`去看
* 具体介绍可以点进`MatState`去看
*/
export
const
matStore
:
MatState
=
proxy
<
MatState
>
({
magics
:
wrap
(
genDuel
(
genBlock
(
SZONE
,
6
)),
SZONE
),
...
...
src/valtioStores/matStore/types.ts
View file @
24998446
import
type
{
CardMeta
}
from
"
@/api/cards
"
;
import
type
{
ygopro
}
from
"
@/api
"
;
import
type
{
CardMeta
}
from
"
@/api/cards
"
;
// >>> play mat state >>>
...
...
src/valtioStores/messageStore/index.ts
View file @
24998446
export
*
from
"
./store
"
;
export
*
from
"
./methods
"
;
export
*
from
"
./store
"
;
src/valtioStores/messageStore/methods/fetchCheckCardMetasV2.ts
View file @
24998446
import
{
type
ygopro
,
fetchCard
}
from
"
@/api
"
;
import
{
fetchCard
,
type
ygopro
}
from
"
@/api
"
;
import
{
getCardByLocation
,
messageStore
}
from
"
@/valtioStores
"
;
export
const
fetchCheckCardMetasV2
=
async
({
...
...
src/valtioStores/messageStore/methods/fetchCheckCardMetasV3.ts
View file @
24998446
import
{
type
ygopro
,
fetchCard
}
from
"
@/api
"
;
import
{
fetchCard
,
type
ygopro
}
from
"
@/api
"
;
import
{
getCardByLocation
,
messageStore
}
from
"
@/valtioStores
"
;
export
const
fetchCheckCardMetasV3
=
async
({
...
...
src/valtioStores/messageStore/methods/index.ts
View file @
24998446
export
*
from
"
./clearAllIdleInteractivities
"
;
export
*
from
"
./fetchCheckCardMetasV2
"
;
export
*
from
"
./fetchCheckCardMetasV3
"
;
export
*
from
"
./clearAllIdleInteractivities
"
;
src/valtioStores/messageStore/store.ts
View file @
24998446
import
{
proxy
}
from
"
valtio
"
;
import
type
{
ModalState
}
from
"
./types
"
;
export
const
messageStore
=
proxy
<
ModalState
>
({
...
...
src/valtioStores/messageStore/types.ts
View file @
24998446
import
type
{
CardMeta
,
ygopro
}
from
"
@/api
"
;
type
CardLocation
=
ygopro
.
CardLocation
;
type
CardLocation
=
ReturnType
<
typeof
ygopro
.
CardLocation
.
prototype
.
toObject
>
;
export
interface
ModalState
{
// 卡牌弹窗
...
...
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