Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
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
赤子奈落
YGOProUnity_V2
Commits
33cad6e7
Commit
33cad6e7
authored
Feb 08, 2021
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix select monster and spell zone at same time
parent
e30e62d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
84 deletions
+29
-84
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+29
-84
No files found.
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
33cad6e7
...
...
@@ -3971,7 +3971,7 @@ public class Ocgcore : ServantWithCardDescription
min
=
r
.
ReadByte
();
//TODO: can cancel
if
(
min
==
0
)
min
=
1
;
int
_field
=
~
r
.
Read
Int32
();
uint
_field
=
~
r
.
ReadU
Int32
();
if
(
Program
.
I
().
setting
.
setting
.
hand
.
value
==
true
||
Program
.
I
().
setting
.
setting
.
handm
.
value
==
true
)
{
...
...
@@ -3979,34 +3979,13 @@ public class Ocgcore : ServantWithCardDescription
for
(
int
i
=
0
;
i
<
min
;
i
++)
{
byte
[]
resp
=
new
byte
[
3
];
bool
pendulumZone
=
false
;
int
filter
;
uint
filter
;
/*if ((field & 0x7f0000) != 0)
{
resp[0] = (byte)(1 - player);
resp[1] = 0x4;
filter = (field >> 16) & 0x7f;
}
else if ((field & 0x1f000000) != 0)
{
resp[0] = (byte)(1 - player);
resp[1] = 0x8;
filter = (field >> 24) & 0x1f;
}
else if ((field & 0xc0000000) != 0)
{
resp[0] = (byte)(1 - player);
resp[1] = 0x8;
filter = (field >> 30) & 0x3;
pendulumZone = true;
}*/
for
(
int
j
=
0
;
j
<
2
;
j
++)
{
resp
=
new
byte
[
3
];
pendulumZone
=
false
;
filter
=
0
;
int
field
;
u
int
field
;
if
(
j
==
0
)
{
...
...
@@ -4021,67 +4000,34 @@ public class Ocgcore : ServantWithCardDescription
if
((
field
&
0x7f
)
!=
0
)
{
resp
[
1
]
=
0x4
;
resp
[
1
]
=
(
byte
)
CardLocation
.
MonsterZone
;
filter
=
field
&
0x7f
;
}
else
if
((
field
&
0x1f00
)
!=
0
)
{
resp
[
1
]
=
0x8
;
filter
=
(
field
>>
8
)
&
0x1f
;
}
else
if
((
field
&
0xc000
)
!=
0
)
{
resp
[
1
]
=
0x8
;
filter
=
(
field
>>
14
)
&
0x3
;
pendulumZone
=
true
;
}
if
(
filter
==
0
)
continue
;
if
(!
pendulumZone
)
{
if
((
filter
&
0x4
)
!=
0
)
{
resp
[
2
]
=
2
;
createPlaceSelector
(
resp
);
}
if
((
filter
&
0x2
)
!=
0
)
{
resp
[
2
]
=
1
;
createPlaceSelector
(
resp
);
}
if
((
filter
&
0x8
)
!=
0
)
for
(
int
k
=
0
;
k
<
6
;
k
++)
{
resp
[
2
]
=
3
;
createPlaceSelector
(
resp
);
}
if
((
filter
&
0x1
)
!=
0
)
{
resp
[
2
]
=
0
;
createPlaceSelector
(
resp
);
}
if
((
filter
&
0x10
)
!=
0
)
{
resp
[
2
]
=
4
;
createPlaceSelector
(
resp
);
}
if
(
resp
[
1
]
==
0x4
)
{
if
((
filter
&
0x20
)
!=
0
)
if
((
filter
&
(
1u
<<
k
))
!=
0
)
{
resp
[
2
]
=
5
;
resp
[
2
]
=
(
byte
)
k
;
createPlaceSelector
(
resp
);
}
if
((
filter
&
0x40
)
!=
0
)
}
}
if
((
field
&
0x1f00
)
!=
0
)
{
resp
[
1
]
=
(
byte
)
CardLocation
.
SpellZone
;
filter
=
(
field
>>
8
)
&
0x1f
;
for
(
int
k
=
0
;
k
<
5
;
k
++)
{
if
((
filter
&
(
1u
<<
k
))
!=
0
)
{
resp
[
2
]
=
6
;
resp
[
2
]
=
(
byte
)
k
;
createPlaceSelector
(
resp
);
}
}
}
else
if
((
field
&
0xc000
)
!=
0
)
{
resp
[
1
]
=
(
byte
)
CardLocation
.
SpellZone
;
filter
=
(
field
>>
14
)
&
0x3
;
if
((
filter
&
0x2
)
!=
0
)
{
resp
[
2
]
=
7
;
...
...
@@ -4093,7 +4039,6 @@ public class Ocgcore : ServantWithCardDescription
createPlaceSelector
(
resp
);
}
}
}
}
...
...
@@ -4111,48 +4056,48 @@ public class Ocgcore : ServantWithCardDescription
}
else
{
int
field
=
_field
;
u
int
field
=
_field
;
for
(
int
i
=
0
;
i
<
min
;
i
++)
{
byte
[]
resp
=
new
byte
[
3
];
bool
pendulumZone
=
false
;
int
filter
;
u
int
filter
;
if
((
field
&
0x7f0000
)
!=
0
)
{
resp
[
0
]
=
(
byte
)(
1
-
player
);
resp
[
1
]
=
0x4
;
resp
[
1
]
=
(
byte
)
CardLocation
.
MonsterZone
;
filter
=
(
field
>>
16
)
&
0x7f
;
}
else
if
((
field
&
0x1f000000
)
!=
0
)
{
resp
[
0
]
=
(
byte
)(
1
-
player
);
resp
[
1
]
=
0x8
;
resp
[
1
]
=
(
byte
)
CardLocation
.
SpellZone
;
filter
=
(
field
>>
24
)
&
0x1f
;
}
else
if
((
field
&
0xc0000000
)
!=
0
)
{
resp
[
0
]
=
(
byte
)(
1
-
player
);
resp
[
1
]
=
0x8
;
resp
[
1
]
=
(
byte
)
CardLocation
.
SpellZone
;
filter
=
(
field
>>
30
)
&
0x3
;
pendulumZone
=
true
;
}
else
if
((
field
&
0x7f
)
!=
0
)
{
resp
[
0
]
=
(
byte
)
player
;
resp
[
1
]
=
0x4
;
resp
[
1
]
=
(
byte
)
CardLocation
.
MonsterZone
;
filter
=
field
&
0x7f
;
}
else
if
((
field
&
0x1f00
)
!=
0
)
{
resp
[
0
]
=
(
byte
)
player
;
resp
[
1
]
=
0x8
;
resp
[
1
]
=
(
byte
)
CardLocation
.
SpellZone
;
filter
=
(
field
>>
8
)
&
0x1f
;
}
else
{
resp
[
0
]
=
(
byte
)
player
;
resp
[
1
]
=
0x8
;
resp
[
1
]
=
(
byte
)
CardLocation
.
SpellZone
;
filter
=
(
field
>>
14
)
&
0x3
;
pendulumZone
=
true
;
}
...
...
@@ -4166,7 +4111,7 @@ public class Ocgcore : ServantWithCardDescription
else
if
((
filter
&
0x10
)
!=
0
)
resp
[
2
]
=
4
;
else
{
if
(
resp
[
1
]
==
0x4
)
if
(
resp
[
1
]
==
(
byte
)
CardLocation
.
MonsterZone
)
{
if
((
filter
&
0x20
)
!=
0
)
resp
[
2
]
=
5
;
else
if
((
filter
&
0x40
)
!=
0
)
resp
[
2
]
=
6
;
...
...
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