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
57584ef1
Commit
57584ef1
authored
May 20, 2024
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix timing of playEffect on summon and super summon
parent
6b369c71
Pipeline
#27220
passed with stages
in 8 minutes and 8 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
26 deletions
+29
-26
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/move.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/move.ts
+1
-1
src/service/duel/move.ts
src/service/duel/move.ts
+18
-14
src/service/duel/set.ts
src/service/duel/set.ts
+0
-2
src/service/duel/spSummoned.ts
src/service/duel/spSummoned.ts
+7
-0
src/service/duel/spSummoning.ts
src/service/duel/spSummoning.ts
+1
-9
src/service/duel/summoned.ts
src/service/duel/summoned.ts
+2
-0
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/move.ts
View file @
57584ef1
...
...
@@ -21,6 +21,6 @@ export default (data: Uint8Array) => {
code
,
from
:
fromLocation
,
to
:
toLocation
,
reason
:
reader
.
inner
.
readUint
8
(),
reason
:
reader
.
inner
.
readUint
32
(),
});
};
src/service/duel/move.ts
View file @
57584ef1
...
...
@@ -6,7 +6,9 @@ import { callCardMove } from "@/ui/Duel/PlayMat/Card";
import
{
REASON_DESTROY
,
REASON_MATERIAL
,
TYPE_TOKEN
}
from
"
../../common
"
;
type
MsgMove
=
ygopro
.
StocGameMessage
.
MsgMove
;
const
{
HAND
,
GRAVE
,
REMOVED
,
DECK
,
EXTRA
,
MZONE
,
TZONE
}
=
ygopro
.
CardZone
;
const
{
HAND
,
GRAVE
,
REMOVED
,
DECK
,
EXTRA
,
MZONE
,
SZONE
,
TZONE
}
=
ygopro
.
CardZone
;
const
{
FACEDOWN
,
FACEDOWN_ATTACK
,
FACEDOWN_DEFENSE
}
=
ygopro
.
CardPosition
;
const
overlayStack
:
ygopro
.
CardLocation
[]
=
[];
...
...
@@ -48,18 +50,6 @@ export default async (move: MsgMove) => {
}
}
switch
(
to
.
zone
)
{
case
REMOVED
:
playEffect
(
AudioActionType
.
SOUND_BANISHED
);
break
;
default
:
break
;
}
if
(
reason
&
REASON_DESTROY
)
{
playEffect
(
AudioActionType
.
SOUND_DESTROYED
);
}
// log出来看看
console
.
color
(
"
green
"
)(
`
${
meta
.
text
.
name
}
${
ygopro
.
CardZone
[
from
.
zone
]}
:
${
from
.
sequence
}${
...
...
@@ -174,7 +164,21 @@ export default async (move: MsgMove) => {
target
.
code
=
code
;
target
.
location
=
to
;
// 维护完了之后,开始动画
// 维护完了之后,开始播放音效和动画
if
(
to
.
zone
===
REMOVED
)
{
playEffect
(
AudioActionType
.
SOUND_BANISHED
);
}
else
if
(
(
to
.
zone
===
MZONE
||
to
.
zone
===
SZONE
)
&&
(
to
.
position
===
FACEDOWN
||
to
.
position
===
FACEDOWN_ATTACK
||
to
.
position
===
FACEDOWN_DEFENSE
)
)
{
playEffect
(
AudioActionType
.
SOUND_SET
);
}
else
if
(
reason
===
REASON_DESTROY
)
{
playEffect
(
AudioActionType
.
SOUND_DESTROYED
);
}
const
p
=
callCardMove
(
target
.
uuid
,
{
fromZone
:
from
.
zone
});
// 如果from或者to是手卡,那么需要刷新除了这张卡之外,这个玩家的所有手卡
if
([
from
.
zone
,
to
.
zone
].
includes
(
HAND
))
{
...
...
src/service/duel/set.ts
View file @
57584ef1
import
{
ygopro
}
from
"
@/api
"
;
import
{
AudioActionType
,
playEffect
}
from
"
@/infra/audio
"
;
import
{
fetchEsHintMeta
}
from
"
@/stores
"
;
export
default
(
_set
:
ygopro
.
StocGameMessage
.
MsgSet
)
=>
{
playEffect
(
AudioActionType
.
SOUND_SET
);
fetchEsHintMeta
({
originMsg
:
1601
});
};
src/service/duel/spSummoned.ts
View file @
57584ef1
import
{
ygopro
}
from
"
@/api
"
;
import
{
AudioActionType
,
playEffect
}
from
"
@/infra/audio
"
;
import
{
fetchEsHintMeta
}
from
"
@/stores
"
;
export
default
(
_
:
ygopro
.
StocGameMessage
.
MsgSpSummoned
)
=>
{
// 这里服务器没有传特殊召唤的怪兽的ID,
// 所以如果要判断是否是衍生物召唤的话,需要从`MsgSpSummoning`中获取
// 并保存,在处理这个消息的时候再取出来进行判断。
//
// 这里暂时在所有情况下都播放`SOUND_SPECIAL_SUMMON`
playEffect
(
AudioActionType
.
SOUND_SPECIAL_SUMMON
);
fetchEsHintMeta
({
originMsg
:
1606
});
};
src/service/duel/spSummoning.ts
View file @
57584ef1
import
{
fetchCard
,
ygopro
}
from
"
@/api
"
;
import
{
TYPE_TOKEN
}
from
"
@/common
"
;
import
{
AudioActionType
,
playEffect
}
from
"
@/infra/audio
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
fetchEsHintMeta
}
from
"
@/stores
"
;
export
default
(
spSummoning
:
ygopro
.
StocGameMessage
.
MsgSpSummoning
)
=>
{
const
card
=
fetchCard
(
spSummoning
.
code
);
if
(
card
.
data
.
type
&&
card
.
data
.
type
&
TYPE_TOKEN
)
{
playEffect
(
AudioActionType
.
SOUND_TOKEN
);
}
else
{
playEffect
(
AudioActionType
.
SOUND_SPECIAL_SUMMON
);
}
fetchEsHintMeta
({
originMsg
:
"
「[?]」特殊召唤宣言时
"
,
cardID
:
spSummoning
.
code
,
...
...
src/service/duel/summoned.ts
View file @
57584ef1
import
{
ygopro
}
from
"
@/api
"
;
import
{
AudioActionType
,
playEffect
}
from
"
@/infra/audio
"
;
import
{
fetchEsHintMeta
}
from
"
@/stores
"
;
export
default
(
_
:
ygopro
.
StocGameMessage
.
MsgSummoned
)
=>
{
playEffect
(
AudioActionType
.
SOUND_SUMMON
);
fetchEsHintMeta
({
originMsg
:
1604
});
};
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