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
c31b247b
Commit
c31b247b
authored
Aug 15, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: eqeqeq
parent
017477e5
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
37 additions
and
37 deletions
+37
-37
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/attack.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/attack.ts
+3
-3
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectBattleCmd.ts
...pi/ocgcore/ocgAdapter/stoc/stocGameMsg/selectBattleCmd.ts
+3
-3
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectCard.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectCard.ts
+1
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectChain.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectChain.ts
+1
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
+10
-10
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectTribute.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectTribute.ts
+1
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectUnselectCard.ts
...ocgcore/ocgAdapter/stoc/stocGameMsg/selectUnselectCard.ts
+2
-2
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/updateData.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/updateData.ts
+2
-2
src/api/ocgcore/ocgAdapter/stoc/stocTypeChange.ts
src/api/ocgcore/ocgAdapter/stoc/stocTypeChange.ts
+1
-1
src/api/ocgcore/ocgAdapter/util.ts
src/api/ocgcore/ocgAdapter/util.ts
+1
-1
src/service/duel/selectChain.ts
src/service/duel/selectChain.ts
+2
-2
src/service/duel/selectPlace.ts
src/service/duel/selectPlace.ts
+1
-1
src/service/duel/shuffleSetCard.ts
src/service/duel/shuffleSetCard.ts
+2
-2
src/service/duel/updateData.ts
src/service/duel/updateData.ts
+1
-1
src/service/utils/fetchCheckCardMeta.ts
src/service/utils/fetchCheckCardMeta.ts
+1
-1
src/stores/matStore/store.ts
src/stores/matStore/store.ts
+1
-1
src/ui/BuildDeck/DeckSelect.tsx
src/ui/BuildDeck/DeckSelect.tsx
+1
-1
src/ui/Duel/Message/AnnounceModal.tsx
src/ui/Duel/Message/AnnounceModal.tsx
+1
-1
src/ui/Duel/PlayMat/Card/springs/focus.ts
src/ui/Duel/PlayMat/Card/springs/focus.ts
+2
-2
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/attack.ts
View file @
c31b247b
...
@@ -17,9 +17,9 @@ export default (data: Uint8Array) => {
...
@@ -17,9 +17,9 @@ export default (data: Uint8Array) => {
const
target_location
=
reader
.
readCardLocation
();
const
target_location
=
reader
.
readCardLocation
();
if
(
if
(
target_location
.
controller
==
0
&&
target_location
.
controller
==
=
0
&&
target_location
.
zone
==
0
&&
target_location
.
zone
==
=
0
&&
target_location
.
sequence
==
0
target_location
.
sequence
==
=
0
)
{
)
{
// 全零表示直接攻击玩家
// 全零表示直接攻击玩家
return
new
MsgAttack
({
return
new
MsgAttack
({
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectBattleCmd.ts
View file @
c31b247b
...
@@ -44,7 +44,7 @@ export default (data: Uint8Array) => {
...
@@ -44,7 +44,7 @@ export default (data: Uint8Array) => {
const
directAttackAble
=
reader
.
inner
.
readUint8
();
const
directAttackAble
=
reader
.
inner
.
readUint8
();
const
attackData
=
new
MsgSelectBattleCmd
.
BattleCmd
.
BattleData
({
const
attackData
=
new
MsgSelectBattleCmd
.
BattleCmd
.
BattleData
({
card_info
:
cardInfo
,
card_info
:
cardInfo
,
direct_attackable
:
directAttackAble
==
1
,
direct_attackable
:
directAttackAble
==
=
1
,
response
:
(
i
<<
16
)
+
1
,
response
:
(
i
<<
16
)
+
1
,
});
});
attackCmd
.
battle_datas
.
push
(
attackData
);
attackCmd
.
battle_datas
.
push
(
attackData
);
...
@@ -53,9 +53,9 @@ export default (data: Uint8Array) => {
...
@@ -53,9 +53,9 @@ export default (data: Uint8Array) => {
msg
.
battle_cmds
=
[
activateCmd
,
attackCmd
];
msg
.
battle_cmds
=
[
activateCmd
,
attackCmd
];
// 是否可进入M2阶段
// 是否可进入M2阶段
msg
.
enable_m2
=
reader
.
inner
.
readUint8
()
==
1
;
msg
.
enable_m2
=
reader
.
inner
.
readUint8
()
==
=
1
;
//时是否可结束回合
//时是否可结束回合
msg
.
enable_ep
=
reader
.
inner
.
readUint8
()
==
1
;
msg
.
enable_ep
=
reader
.
inner
.
readUint8
()
==
=
1
;
return
msg
;
return
msg
;
};
};
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectCard.ts
View file @
c31b247b
...
@@ -13,7 +13,7 @@ export default (data: Uint8Array) => {
...
@@ -13,7 +13,7 @@ export default (data: Uint8Array) => {
const
reader
=
new
BufferReaderExt
(
data
);
const
reader
=
new
BufferReaderExt
(
data
);
const
player
=
reader
.
inner
.
readUint8
();
const
player
=
reader
.
inner
.
readUint8
();
const
cancelable
=
reader
.
inner
.
readUint8
()
!=
0
;
const
cancelable
=
reader
.
inner
.
readUint8
()
!=
=
0
;
const
min
=
reader
.
inner
.
readUint8
();
const
min
=
reader
.
inner
.
readUint8
();
const
max
=
reader
.
inner
.
readUint8
();
const
max
=
reader
.
inner
.
readUint8
();
const
count
=
reader
.
inner
.
readUint8
();
const
count
=
reader
.
inner
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectChain.ts
View file @
c31b247b
...
@@ -17,7 +17,7 @@ export default (data: Uint8Array) => {
...
@@ -17,7 +17,7 @@ export default (data: Uint8Array) => {
const
player
=
reader
.
inner
.
readUint8
();
const
player
=
reader
.
inner
.
readUint8
();
const
count
=
reader
.
inner
.
readUint8
();
const
count
=
reader
.
inner
.
readUint8
();
const
spCount
=
reader
.
inner
.
readUint8
();
const
spCount
=
reader
.
inner
.
readUint8
();
const
forced
=
reader
.
inner
.
readUint8
()
!=
0
;
const
forced
=
reader
.
inner
.
readUint8
()
!=
=
0
;
const
hint0
=
reader
.
inner
.
readUint32
();
const
hint0
=
reader
.
inner
.
readUint32
();
const
hint1
=
reader
.
inner
.
readUint32
();
const
hint1
=
reader
.
inner
.
readUint32
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
View file @
c31b247b
...
@@ -19,7 +19,7 @@ export default (data: Uint8Array) => {
...
@@ -19,7 +19,7 @@ export default (data: Uint8Array) => {
const
_field
=
~
reader
.
readUint32
();
const
_field
=
~
reader
.
readUint32
();
// TODO: 暂时和`ygopro2`一样不支持取消操作,后续需要再考虑加上
// TODO: 暂时和`ygopro2`一样不支持取消操作,后续需要再考虑加上
if
(
count
==
0
)
{
if
(
count
==
=
0
)
{
count
=
1
;
count
=
1
;
}
}
...
@@ -30,16 +30,16 @@ export default (data: Uint8Array) => {
...
@@ -30,16 +30,16 @@ export default (data: Uint8Array) => {
});
});
for
(
let
i
=
0
;
i
<
2
;
i
++
)
{
for
(
let
i
=
0
;
i
<
2
;
i
++
)
{
const
controller
=
i
==
0
?
player
:
1
-
player
;
const
controller
=
i
==
=
0
?
player
:
1
-
player
;
const
field
=
i
==
0
?
_field
&
0xffff
:
_field
>>
16
;
const
field
=
i
==
=
0
?
_field
&
0xffff
:
_field
>>
16
;
if
((
field
&
0x7f
)
!=
0
)
{
if
((
field
&
0x7f
)
!=
=
0
)
{
// 怪兽区
// 怪兽区
const
zone
=
ygopro
.
CardZone
.
MZONE
;
const
zone
=
ygopro
.
CardZone
.
MZONE
;
const
filter
=
field
&
0x7f
;
const
filter
=
field
&
0x7f
;
for
(
let
sequence
=
0
;
sequence
<
7
;
sequence
++
)
{
for
(
let
sequence
=
0
;
sequence
<
7
;
sequence
++
)
{
if
((
filter
&
(
1
<<
sequence
))
!=
0
)
{
if
((
filter
&
(
1
<<
sequence
))
!=
=
0
)
{
msg
.
places
.
push
(
msg
.
places
.
push
(
new
MsgSelectPlace
.
SelectAblePlace
({
new
MsgSelectPlace
.
SelectAblePlace
({
controller
,
controller
,
...
@@ -51,13 +51,13 @@ export default (data: Uint8Array) => {
...
@@ -51,13 +51,13 @@ export default (data: Uint8Array) => {
}
}
}
}
if
((
field
&
0x1f00
)
!=
0
)
{
if
((
field
&
0x1f00
)
!=
=
0
)
{
// 魔法陷阱区
// 魔法陷阱区
const
zone
=
ygopro
.
CardZone
.
SZONE
;
const
zone
=
ygopro
.
CardZone
.
SZONE
;
const
filter
=
(
field
>>
8
)
&
0x1f
;
const
filter
=
(
field
>>
8
)
&
0x1f
;
for
(
let
sequence
=
0
;
sequence
<
5
;
sequence
++
)
{
for
(
let
sequence
=
0
;
sequence
<
5
;
sequence
++
)
{
if
((
filter
&
(
1
<<
sequence
))
!=
0
)
{
if
((
filter
&
(
1
<<
sequence
))
!=
=
0
)
{
msg
.
places
.
push
(
msg
.
places
.
push
(
new
MsgSelectPlace
.
SelectAblePlace
({
new
MsgSelectPlace
.
SelectAblePlace
({
controller
,
controller
,
...
@@ -69,12 +69,12 @@ export default (data: Uint8Array) => {
...
@@ -69,12 +69,12 @@ export default (data: Uint8Array) => {
}
}
}
}
if
((
field
&
0xc000
)
!=
0
)
{
if
((
field
&
0xc000
)
!=
=
0
)
{
// 灵摆区?
// 灵摆区?
const
zone
=
ygopro
.
CardZone
.
SZONE
;
const
zone
=
ygopro
.
CardZone
.
SZONE
;
const
filter
=
(
field
>>
14
)
&
0x3
;
const
filter
=
(
field
>>
14
)
&
0x3
;
if
((
filter
&
0x1
)
!=
0
)
{
if
((
filter
&
0x1
)
!=
=
0
)
{
msg
.
places
.
push
(
msg
.
places
.
push
(
new
MsgSelectPlace
.
SelectAblePlace
({
new
MsgSelectPlace
.
SelectAblePlace
({
controller
,
controller
,
...
@@ -84,7 +84,7 @@ export default (data: Uint8Array) => {
...
@@ -84,7 +84,7 @@ export default (data: Uint8Array) => {
);
);
}
}
if
((
filter
&
0x2
)
!=
0
)
{
if
((
filter
&
0x2
)
!=
=
0
)
{
msg
.
places
.
push
(
msg
.
places
.
push
(
new
MsgSelectPlace
.
SelectAblePlace
({
new
MsgSelectPlace
.
SelectAblePlace
({
controller
,
controller
,
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectTribute.ts
View file @
c31b247b
...
@@ -13,7 +13,7 @@ export default (data: Uint8Array) => {
...
@@ -13,7 +13,7 @@ export default (data: Uint8Array) => {
const
reader
=
new
BufferReaderExt
(
data
);
const
reader
=
new
BufferReaderExt
(
data
);
const
player
=
reader
.
inner
.
readUint8
();
const
player
=
reader
.
inner
.
readUint8
();
const
cancelable
=
reader
.
inner
.
readUint8
()
!=
0
;
const
cancelable
=
reader
.
inner
.
readUint8
()
!=
=
0
;
const
min
=
reader
.
inner
.
readUint8
();
const
min
=
reader
.
inner
.
readUint8
();
const
max
=
reader
.
inner
.
readUint8
();
const
max
=
reader
.
inner
.
readUint8
();
const
count
=
reader
.
inner
.
readUint8
();
const
count
=
reader
.
inner
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectUnselectCard.ts
View file @
c31b247b
...
@@ -13,8 +13,8 @@ export default (data: Uint8Array) => {
...
@@ -13,8 +13,8 @@ export default (data: Uint8Array) => {
const
reader
=
new
BufferReaderExt
(
data
);
const
reader
=
new
BufferReaderExt
(
data
);
const
player
=
reader
.
inner
.
readUint8
();
const
player
=
reader
.
inner
.
readUint8
();
const
finishable
=
reader
.
inner
.
readUint8
()
!=
0
;
const
finishable
=
reader
.
inner
.
readUint8
()
!=
=
0
;
const
cancelable
=
reader
.
inner
.
readUint8
()
!=
0
;
const
cancelable
=
reader
.
inner
.
readUint8
()
!=
=
0
;
const
min
=
reader
.
inner
.
readUint8
();
const
min
=
reader
.
inner
.
readUint8
();
const
max
=
reader
.
inner
.
readUint8
();
const
max
=
reader
.
inner
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/updateData.ts
View file @
c31b247b
...
@@ -50,7 +50,7 @@ export default (data: Uint8Array) => {
...
@@ -50,7 +50,7 @@ export default (data: Uint8Array) => {
try
{
try
{
while
(
true
)
{
while
(
true
)
{
const
len
=
reader
.
inner
.
readInt32
();
const
len
=
reader
.
inner
.
readInt32
();
if
(
len
==
4
)
continue
;
if
(
len
==
=
4
)
continue
;
const
pos
=
reader
.
inner
.
offset
();
const
pos
=
reader
.
inner
.
offset
();
const
action
=
_readUpdateAction
(
reader
);
const
action
=
_readUpdateAction
(
reader
);
if
(
action
)
{
if
(
action
)
{
...
@@ -69,7 +69,7 @@ function _readUpdateAction(
...
@@ -69,7 +69,7 @@ function _readUpdateAction(
reader
:
BufferReaderExt
,
reader
:
BufferReaderExt
,
):
MsgUpdateData
.
Action
|
undefined
{
):
MsgUpdateData
.
Action
|
undefined
{
const
flag
=
reader
.
inner
.
readInt32
();
const
flag
=
reader
.
inner
.
readInt32
();
if
(
flag
==
0
)
return
undefined
;
if
(
flag
==
=
0
)
return
undefined
;
const
mask
=
-
1
;
const
mask
=
-
1
;
let
code
=
mask
;
let
code
=
mask
;
...
...
src/api/ocgcore/ocgAdapter/stoc/stocTypeChange.ts
View file @
c31b247b
...
@@ -17,7 +17,7 @@ export default class TypeChangeAdapter implements StocAdapter {
...
@@ -17,7 +17,7 @@ export default class TypeChangeAdapter implements StocAdapter {
upcast
():
ygopro
.
YgoStocMsg
{
upcast
():
ygopro
.
YgoStocMsg
{
const
type_
=
new
DataView
(
this
.
packet
.
exData
.
buffer
).
getUint8
(
0
);
const
type_
=
new
DataView
(
this
.
packet
.
exData
.
buffer
).
getUint8
(
0
);
const
isHost
=
((
type_
>>
4
)
&
0xf
)
!=
0
;
const
isHost
=
((
type_
>>
4
)
&
0xf
)
!=
=
0
;
let
selfType
=
ygopro
.
StocTypeChange
.
SelfType
.
UNKNOWN
;
let
selfType
=
ygopro
.
StocTypeChange
.
SelfType
.
UNKNOWN
;
switch
(
type_
&
0xf
)
{
switch
(
type_
&
0xf
)
{
...
...
src/api/ocgcore/ocgAdapter/util.ts
View file @
c31b247b
...
@@ -218,7 +218,7 @@ const chunkItems = <T>(items: T[]) =>
...
@@ -218,7 +218,7 @@ const chunkItems = <T>(items: T[]) =>
export
function
_cutoff_name
(
data
:
Uint8Array
):
Uint8Array
{
export
function
_cutoff_name
(
data
:
Uint8Array
):
Uint8Array
{
let
res
:
number
[]
=
[];
let
res
:
number
[]
=
[];
for
(
const
char
of
chunkItems
(
Array
.
from
(
data
)))
{
for
(
const
char
of
chunkItems
(
Array
.
from
(
data
)))
{
if
(
!
char
.
every
((
item
)
=>
item
==
0
))
{
if
(
!
char
.
every
((
item
)
=>
item
==
=
0
))
{
res
=
res
.
concat
(
char
);
res
=
res
.
concat
(
char
);
}
else
{
}
else
{
break
;
break
;
...
...
src/service/duel/selectChain.ts
View file @
c31b247b
...
@@ -13,7 +13,7 @@ export default async (selectChain: MsgSelectChain) => {
...
@@ -13,7 +13,7 @@ export default async (selectChain: MsgSelectChain) => {
const
chains
=
selectChain
.
chains
;
const
chains
=
selectChain
.
chains
;
const
chainSetting
=
matStore
.
chainSetting
;
const
chainSetting
=
matStore
.
chainSetting
;
if
(
chainSetting
==
ChainSetting
.
CHAIN_IGNORE
)
{
if
(
chainSetting
==
=
ChainSetting
.
CHAIN_IGNORE
)
{
// 如果玩家配置了忽略连锁,直接回应后端并返回
// 如果玩家配置了忽略连锁,直接回应后端并返回
sendSelectSingleResponse
(
-
1
);
sendSelectSingleResponse
(
-
1
);
return
;
return
;
...
@@ -28,7 +28,7 @@ export default async (selectChain: MsgSelectChain) => {
...
@@ -28,7 +28,7 @@ export default async (selectChain: MsgSelectChain) => {
// 直接回答
// 直接回答
handle_flag
=
0
;
handle_flag
=
0
;
}
else
{
}
else
{
if
(
chainSetting
==
ChainSetting
.
CHAIN_ALL
)
{
if
(
chainSetting
==
=
ChainSetting
.
CHAIN_ALL
)
{
// 配置了全部连锁,则处理多张
// 配置了全部连锁,则处理多张
handle_flag
=
2
;
handle_flag
=
2
;
}
else
{
}
else
{
...
...
src/service/duel/selectPlace.ts
View file @
c31b247b
...
@@ -4,7 +4,7 @@ import { InteractType, placeStore } from "@/stores";
...
@@ -4,7 +4,7 @@ import { InteractType, placeStore } from "@/stores";
type
MsgSelectPlace
=
ygopro
.
StocGameMessage
.
MsgSelectPlace
;
type
MsgSelectPlace
=
ygopro
.
StocGameMessage
.
MsgSelectPlace
;
export
default
(
selectPlace
:
MsgSelectPlace
)
=>
{
export
default
(
selectPlace
:
MsgSelectPlace
)
=>
{
if
(
selectPlace
.
count
!=
1
)
{
if
(
selectPlace
.
count
!=
=
1
)
{
console
.
warn
(
`Unhandled case:
${
selectPlace
}
`
);
console
.
warn
(
`Unhandled case:
${
selectPlace
}
`
);
return
;
return
;
}
}
...
...
src/service/duel/shuffleSetCard.ts
View file @
c31b247b
...
@@ -7,11 +7,11 @@ import MsgShuffleSetCard = ygopro.StocGameMessage.MsgShuffleSetCard;
...
@@ -7,11 +7,11 @@ import MsgShuffleSetCard = ygopro.StocGameMessage.MsgShuffleSetCard;
export
default
async
(
shuffleSetCard
:
MsgShuffleSetCard
)
=>
{
export
default
async
(
shuffleSetCard
:
MsgShuffleSetCard
)
=>
{
const
from_locations
=
shuffleSetCard
.
from_locations
;
const
from_locations
=
shuffleSetCard
.
from_locations
;
const
overlay_locations
=
shuffleSetCard
.
overlay_locations
;
const
overlay_locations
=
shuffleSetCard
.
overlay_locations
;
if
(
from_locations
.
length
==
0
)
{
if
(
from_locations
.
length
==
=
0
)
{
console
.
error
(
"
<ShuffleSetCard>from_locations is empty
"
);
console
.
error
(
"
<ShuffleSetCard>from_locations is empty
"
);
return
;
return
;
}
}
if
(
from_locations
.
length
!=
overlay_locations
.
length
)
{
if
(
from_locations
.
length
!=
=
overlay_locations
.
length
)
{
console
.
error
(
console
.
error
(
"
<ShuffleSetCard>length of from_locations and overlay_locations not matched
"
,
"
<ShuffleSetCard>length of from_locations and overlay_locations not matched
"
,
);
);
...
...
src/service/duel/updateData.ts
View file @
c31b247b
...
@@ -23,7 +23,7 @@ export default async (updateData: MsgUpdateData) => {
...
@@ -23,7 +23,7 @@ export default async (updateData: MsgUpdateData) => {
const
meta
=
target
.
meta
;
const
meta
=
target
.
meta
;
if
(
action
.
location
!==
undefined
)
{
if
(
action
.
location
!==
undefined
)
{
if
(
target
.
location
.
position
!=
action
.
location
.
position
)
{
if
(
target
.
location
.
position
!=
=
action
.
location
.
position
)
{
// Currently only update position
// Currently only update position
target
.
location
.
position
=
action
.
location
.
position
;
target
.
location
.
position
=
action
.
location
.
position
;
// animation
// animation
...
...
src/service/utils/fetchCheckCardMeta.ts
View file @
c31b247b
...
@@ -27,7 +27,7 @@ const helper = async (
...
@@ -27,7 +27,7 @@ const helper = async (
)
=>
{
)
=>
{
const
controller
=
location
.
controller
;
const
controller
=
location
.
controller
;
const
newID
=
const
newID
=
code
!=
0
code
!=
=
0
?
code
?
code
:
cardStore
.
at
(
location
.
zone
,
controller
,
location
.
sequence
)?.
code
||
0
;
:
cardStore
.
at
(
location
.
zone
,
controller
,
location
.
sequence
)?.
code
||
0
;
const
meta
=
await
fetchCard
(
newID
);
const
meta
=
await
fetchCard
(
newID
);
...
...
src/stores/matStore/store.ts
View file @
c31b247b
...
@@ -28,7 +28,7 @@ export const isMe = (controller: number): boolean => {
...
@@ -28,7 +28,7 @@ export const isMe = (controller: number): boolean => {
default
:
default
:
// 自己是观战者
// 自己是观战者
// 这里假设偶数方的玩家是自己
// 这里假设偶数方的玩家是自己
return
controller
%
2
==
0
;
return
controller
%
2
==
=
0
;
}
}
};
};
...
...
src/ui/BuildDeck/DeckSelect.tsx
View file @
c31b247b
...
@@ -186,7 +186,7 @@ const DeckUploader: React.FC<{ onLoaded: (deck: IDeck) => void }> = ({
...
@@ -186,7 +186,7 @@ const DeckUploader: React.FC<{ onLoaded: (deck: IDeck) => void }> = ({
name
:
"
file
"
,
name
:
"
file
"
,
multiple
:
true
,
multiple
:
true
,
onChange
(
info
)
{
onChange
(
info
)
{
if
(
uploadState
!=
"
ERROR
"
)
{
if
(
uploadState
!=
=
"
ERROR
"
)
{
info
.
file
.
status
=
"
done
"
;
info
.
file
.
status
=
"
done
"
;
}
}
},
},
...
...
src/ui/Duel/Message/AnnounceModal.tsx
View file @
c31b247b
...
@@ -35,7 +35,7 @@ export const AnnounceModal = () => {
...
@@ -35,7 +35,7 @@ export const AnnounceModal = () => {
open=
{
isOpen
}
open=
{
isOpen
}
footer=
{
footer=
{
<
Button
<
Button
disabled=
{
selected
.
length
!=
min
}
disabled=
{
selected
.
length
!=
=
min
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
let
response
=
selected
.
reduce
((
res
,
current
)
=>
res
|
current
,
0
);
// 多个选择求或
let
response
=
selected
.
reduce
((
res
,
current
)
=>
res
|
current
,
0
);
// 多个选择求或
sendSelectOptionResponse
(
response
);
sendSelectOptionResponse
(
response
);
...
...
src/ui/Duel/PlayMat/Card/springs/focus.ts
View file @
c31b247b
...
@@ -8,8 +8,8 @@ import { asyncStart } from "./utils";
...
@@ -8,8 +8,8 @@ import { asyncStart } from "./utils";
export
const
focus
=
async
(
props
:
{
card
:
CardType
;
api
:
SpringApi
})
=>
{
export
const
focus
=
async
(
props
:
{
card
:
CardType
;
api
:
SpringApi
})
=>
{
const
{
card
,
api
}
=
props
;
const
{
card
,
api
}
=
props
;
if
(
if
(
card
.
location
.
zone
==
ygopro
.
CardZone
.
HAND
||
card
.
location
.
zone
==
=
ygopro
.
CardZone
.
HAND
||
card
.
location
.
zone
==
ygopro
.
CardZone
.
DECK
card
.
location
.
zone
==
=
ygopro
.
CardZone
.
DECK
)
{
)
{
const
current
=
{
...
api
.
current
[
0
].
get
()
};
const
current
=
{
...
api
.
current
[
0
].
get
()
};
await
asyncStart
(
api
)({
await
asyncStart
(
api
)({
...
...
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