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
463345c1
Commit
463345c1
authored
May 10, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/animation/attack' into 'main'
sync neos-protobuf See merge request
!188
parents
d08944ea
0d920d58
Pipeline
#21593
passed with stages
in 14 minutes and 39 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
22 deletions
+91
-22
neos-protobuf
neos-protobuf
+1
-1
src/api/ocgcore/idl/ocgcore.ts
src/api/ocgcore/idl/ocgcore.ts
+89
-20
src/service/duel/attack.ts
src/service/duel/attack.ts
+1
-1
No files found.
neos-protobuf
@
30d0ceb9
Subproject commit
be66d514be6d1224163f55bca85dc361d0c9fe6a
Subproject commit
30d0ceb9d06259c09f3dfd36c3872bd1e9c02b88
src/api/ocgcore/idl/ocgcore.ts
View file @
463345c1
...
...
@@ -16757,7 +16757,9 @@ export namespace ygopro {
data
?:
|
any
[]
|
{
location
?:
CardLocation
;
direct_attack
?:
boolean
;
attacker_location
?:
CardLocation
;
target_location
?:
CardLocation
;
}
)
{
super
();
...
...
@@ -16770,39 +16772,89 @@ export namespace ygopro {
this
.
#
one_of_decls
);
if
(
!
Array
.
isArray
(
data
)
&&
typeof
data
==
"
object
"
)
{
if
(
"
location
"
in
data
&&
data
.
location
!=
undefined
)
{
this
.
location
=
data
.
location
;
if
(
"
direct_attack
"
in
data
&&
data
.
direct_attack
!=
undefined
)
{
this
.
direct_attack
=
data
.
direct_attack
;
}
if
(
"
attacker_location
"
in
data
&&
data
.
attacker_location
!=
undefined
)
{
this
.
attacker_location
=
data
.
attacker_location
;
}
if
(
"
target_location
"
in
data
&&
data
.
target_location
!=
undefined
)
{
this
.
target_location
=
data
.
target_location
;
}
}
}
get
location
()
{
get
direct_attack
()
{
return
pb_1
.
Message
.
getFieldWithDefault
(
this
,
1
,
false
)
as
boolean
;
}
set
direct_attack
(
value
:
boolean
)
{
pb_1
.
Message
.
setField
(
this
,
1
,
value
);
}
get
attacker_location
()
{
return
pb_1
.
Message
.
getWrapperField
(
this
,
CardLocation
,
1
2
)
as
CardLocation
;
}
set
location
(
value
:
CardLocation
)
{
pb_1
.
Message
.
setWrapperField
(
this
,
1
,
value
);
set
attacker_
location
(
value
:
CardLocation
)
{
pb_1
.
Message
.
setWrapperField
(
this
,
2
,
value
);
}
get
has_location
()
{
return
pb_1
.
Message
.
getField
(
this
,
1
)
!=
null
;
get
has_attacker_location
()
{
return
pb_1
.
Message
.
getField
(
this
,
2
)
!=
null
;
}
get
target_location
()
{
return
pb_1
.
Message
.
getWrapperField
(
this
,
CardLocation
,
3
)
as
CardLocation
;
}
set
target_location
(
value
:
CardLocation
)
{
pb_1
.
Message
.
setWrapperField
(
this
,
3
,
value
);
}
get
has_target_location
()
{
return
pb_1
.
Message
.
getField
(
this
,
3
)
!=
null
;
}
static
fromObject
(
data
:
{
location
?:
ReturnType
<
typeof
CardLocation
.
prototype
.
toObject
>
;
direct_attack
?:
boolean
;
attacker_location
?:
ReturnType
<
typeof
CardLocation
.
prototype
.
toObject
>
;
target_location
?:
ReturnType
<
typeof
CardLocation
.
prototype
.
toObject
>
;
}):
MsgAttack
{
const
message
=
new
MsgAttack
({});
if
(
data
.
location
!=
null
)
{
message
.
location
=
CardLocation
.
fromObject
(
data
.
location
);
if
(
data
.
direct_attack
!=
null
)
{
message
.
direct_attack
=
data
.
direct_attack
;
}
if
(
data
.
attacker_location
!=
null
)
{
message
.
attacker_location
=
CardLocation
.
fromObject
(
data
.
attacker_location
);
}
if
(
data
.
target_location
!=
null
)
{
message
.
target_location
=
CardLocation
.
fromObject
(
data
.
target_location
);
}
return
message
;
}
toObject
()
{
const
data
:
{
location
?:
ReturnType
<
typeof
CardLocation
.
prototype
.
toObject
>
;
direct_attack
?:
boolean
;
attacker_location
?:
ReturnType
<
typeof
CardLocation
.
prototype
.
toObject
>
;
target_location
?:
ReturnType
<
typeof
CardLocation
.
prototype
.
toObject
>
;
}
=
{};
if
(
this
.
location
!=
null
)
{
data
.
location
=
this
.
location
.
toObject
();
if
(
this
.
direct_attack
!=
null
)
{
data
.
direct_attack
=
this
.
direct_attack
;
}
if
(
this
.
attacker_location
!=
null
)
{
data
.
attacker_location
=
this
.
attacker_location
.
toObject
();
}
if
(
this
.
target_location
!=
null
)
{
data
.
target_location
=
this
.
target_location
.
toObject
();
}
return
data
;
}
...
...
@@ -16810,9 +16862,15 @@ export namespace ygopro {
serialize
(
w
:
pb_1
.
BinaryWriter
):
void
;
serialize
(
w
?:
pb_1
.
BinaryWriter
):
Uint8Array
|
void
{
const
writer
=
w
||
new
pb_1
.
BinaryWriter
();
if
(
this
.
has_location
)
writer
.
writeMessage
(
1
,
this
.
location
,
()
=>
this
.
location
.
serialize
(
writer
)
if
(
this
.
direct_attack
!=
false
)
writer
.
writeBool
(
1
,
this
.
direct_attack
);
if
(
this
.
has_attacker_location
)
writer
.
writeMessage
(
2
,
this
.
attacker_location
,
()
=>
this
.
attacker_location
.
serialize
(
writer
)
);
if
(
this
.
has_target_location
)
writer
.
writeMessage
(
3
,
this
.
target_location
,
()
=>
this
.
target_location
.
serialize
(
writer
)
);
if
(
!
w
)
return
writer
.
getResultBuffer
();
}
...
...
@@ -16826,9 +16884,20 @@ export namespace ygopro {
if
(
reader
.
isEndGroup
())
break
;
switch
(
reader
.
getFieldNumber
())
{
case
1
:
message
.
direct_attack
=
reader
.
readBool
();
break
;
case
2
:
reader
.
readMessage
(
message
.
location
,
()
=>
(
message
.
location
=
CardLocation
.
deserialize
(
reader
))
message
.
attacker_location
,
()
=>
(
message
.
attacker_location
=
CardLocation
.
deserialize
(
reader
))
);
break
;
case
3
:
reader
.
readMessage
(
message
.
target_location
,
()
=>
(
message
.
target_location
=
CardLocation
.
deserialize
(
reader
))
);
break
;
default
:
...
...
src/service/duel/attack.ts
View file @
463345c1
...
...
@@ -4,6 +4,6 @@ import { fetchEsHintMeta } from "@/stores";
export
default
(
attack
:
ygopro
.
StocGameMessage
.
MsgAttack
)
=>
{
fetchEsHintMeta
({
originMsg
:
"
「[?]」攻击时
"
,
location
:
attack
.
location
,
location
:
attack
.
attacker_
location
,
});
};
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