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
c65739fa
Commit
c65739fa
authored
Mar 10, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/extra-diff-from-main' into 'main'
修复偶现额外卡组和主卡组不一致的问题 See merge request
mycard/Neos!343
parents
66c3b776
0dd2c218
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4 additions
and
18 deletions
+4
-18
src/env.d.ts
src/env.d.ts
+0
-1
src/service/duel/start.ts
src/service/duel/start.ts
+3
-10
src/service/duel/updateData.ts
src/service/duel/updateData.ts
+1
-0
src/ui/Match/ReplayModal.tsx
src/ui/Match/ReplayModal.tsx
+0
-4
src/ui/Side/index.tsx
src/ui/Side/index.tsx
+0
-1
src/ui/WaitRoom/index.tsx
src/ui/WaitRoom/index.tsx
+0
-2
No files found.
src/env.d.ts
View file @
c65739fa
...
...
@@ -17,7 +17,6 @@ import { EventEmitter } from "eventemitter3";
/* eslint no-var: 0 */
declare
global
{
var
myExtraDeckCodes
:
number
[]
=
[];
interface
Console
{
color
:
(
color
:
string
,
...
...
src/service/duel/start.ts
View file @
c65739fa
import
{
flatten
}
from
"
lodash-es
"
;
import
{
v4
as
v4uuid
}
from
"
uuid
"
;
import
PlayerType
=
ygopro
.
StocGameMessage
.
MsgStart
.
PlayerType
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
sleep
}
from
"
@/infra
"
;
...
...
@@ -21,11 +21,6 @@ const TOKEN_SIZE = 13; // 每人场上最多就只可能有13个token
export
default
async
(
start
:
ygopro
.
StocGameMessage
.
MsgStart
)
=>
{
// 先初始化`matStore`
matStore
.
selfType
=
start
.
playerType
;
const
opponent
=
start
.
playerType
===
PlayerType
.
FirstStrike
||
start
.
playerType
===
PlayerType
.
Observer
?
1
:
0
;
if
(
sideStore
.
stage
!==
SideStage
.
NONE
)
{
// 更新Side状态
...
...
@@ -87,10 +82,8 @@ export default async (start: ygopro.StocGameMessage.MsgStart) => {
);
cardStore
.
inner
.
push
(...
cards
);
// 设置自己的额外卡组,信息是在waitroom之中拿到的
cardStore
.
at
(
ygopro
.
CardZone
.
EXTRA
,
1
-
opponent
)
.
forEach
((
card
)
=>
(
card
.
code
=
window
.
myExtraDeckCodes
?.
pop
()
??
0
));
// note: 额外卡组的卡会在对局开始后通过`UpdateData` msg更新
if
(
replayStore
.
isReplay
)
{
replayStart
();
...
...
src/service/duel/updateData.ts
View file @
c65739fa
...
...
@@ -4,6 +4,7 @@ import { callCardMove } from "@/ui/Duel/PlayMat/Card";
import
MsgUpdateData
=
ygopro
.
StocGameMessage
.
MsgUpdateData
;
import
{
TYPE_TOKEN
}
from
"
@/common
"
;
export
default
async
(
updateData
:
MsgUpdateData
)
=>
{
const
{
player
:
controller
,
zone
,
actions
}
=
updateData
;
if
(
controller
!==
undefined
&&
zone
!==
undefined
&&
actions
!==
undefined
)
{
...
...
src/ui/Match/ReplayModal.tsx
View file @
c65739fa
...
...
@@ -41,10 +41,6 @@ export const ReplayModal: React.FC = () => {
// 标记为回放模式
replayStore
.
isReplay
=
true
;
// 初始化额外卡组
// FIXME: 这样写应该不对,有空来修
window
.
myExtraDeckCodes
=
[];
await
connectSrvpro
({
ip
:
""
,
player
:
""
,
...
...
src/ui/Side/index.tsx
View file @
c65739fa
...
...
@@ -60,7 +60,6 @@ export const Component: React.FC = () => {
};
const
onSummit
=
()
=>
{
sendUpdateDeck
(
deck
);
window
.
myExtraDeckCodes
=
[...
deck
.
extra
];
};
useEffect
(()
=>
{
...
...
src/ui/WaitRoom/index.tsx
View file @
c65739fa
...
...
@@ -111,8 +111,6 @@ export const Component: React.FC = () => {
sendUpdateDeck
(
deck
);
// 设置side里面的卡组
sideStore
.
deck
=
deck
;
// 设置额外卡组数据
window
.
myExtraDeckCodes
=
[...
deck
.
extra
];
sendHsReady
();
}
else
{
message
.
error
(
"
请先选择卡组
"
);
...
...
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