Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
nanahira
ygopro-core
Commits
c51e8c17
Commit
c51e8c17
authored
Apr 28, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
57845f7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
field.cpp
field.cpp
+17
-12
No files found.
field.cpp
View file @
c51e8c17
...
@@ -593,24 +593,27 @@ int32 field::get_useable_count_fromex(card* pcard, uint8 playerid, uint8 uplayer
...
@@ -593,24 +593,27 @@ int32 field::get_useable_count_fromex(card* pcard, uint8 playerid, uint8 uplayer
}
}
int32
field
::
get_spsummonable_count_fromex
(
card
*
pcard
,
uint8
playerid
,
uint32
zone
,
uint32
*
list
)
{
int32
field
::
get_spsummonable_count_fromex
(
card
*
pcard
,
uint8
playerid
,
uint32
zone
,
uint32
*
list
)
{
uint32
flag
=
player
[
playerid
].
disabled_location
|
player
[
playerid
].
used_location
;
uint32
flag
=
player
[
playerid
].
disabled_location
|
player
[
playerid
].
used_location
;
uint32
linked_zone
=
get_linked_zone
(
playerid
);
uint32
linked_zone
=
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
);
flag
=
(
flag
|
~
zone
|
~
linked_zone
)
&
0x1f
;
flag
=
flag
|
~
zone
|
~
linked_zone
;
int32
count
=
6
-
field_used_count
[
flag
];
if
(
player
[
playerid
].
list_mzone
[
5
]
&&
is_location_useable
(
playerid
,
LOCATION_MZONE
,
6
)
if
(
player
[
playerid
].
list_mzone
[
5
]
&&
is_location_useable
(
playerid
,
LOCATION_MZONE
,
6
)
&&
(
zone
&
(
1u
<<
6
))
&&
pcard
&&
check_extra_link
(
playerid
,
pcard
,
6
))
{
&&
check_extra_link
(
playerid
,
pcard
,
6
))
{
flag
|=
1u
<<
5
;
flag
|=
1u
<<
5
;
}
else
if
(
player
[
playerid
].
list_mzone
[
6
]
&&
is_location_useable
(
playerid
,
LOCATION_MZONE
,
5
)
}
else
if
(
player
[
playerid
].
list_mzone
[
6
]
&&
is_location_useable
(
playerid
,
LOCATION_MZONE
,
5
)
&&
(
zone
&
(
1u
<<
5
))
&&
pcard
&&
check_extra_link
(
playerid
,
pcard
,
5
))
{
&&
check_extra_link
(
playerid
,
pcard
,
5
))
{
flag
|=
1u
<<
6
;
flag
|=
1u
<<
6
;
}
else
if
(
player
[
playerid
].
list_mzone
[
5
]
||
player
[
playerid
].
list_mzone
[
6
]
||
!
(
zone
&
((
1u
<<
5
)
|
(
1u
<<
6
)))
)
{
}
else
if
(
player
[
playerid
].
list_mzone
[
5
]
||
player
[
playerid
].
list_mzone
[
6
])
{
flag
|=
(
1u
<<
5
)
|
(
1u
<<
6
);
flag
|=
(
1u
<<
5
)
|
(
1u
<<
6
);
count
--
;
}
else
{
}
else
if
(
player
[
1
-
playerid
].
list_mzone
[
5
]
||
!
is_location_useable
(
playerid
,
LOCATION_MZONE
,
6
)
||
!
(
zone
&
(
1u
<<
6
)))
if
(
!
is_location_useable
(
playerid
,
LOCATION_MZONE
,
5
))
flag
|=
1u
<<
6
;
flag
|=
1u
<<
5
;
else
if
(
player
[
1
-
playerid
].
list_mzone
[
6
]
||
!
is_location_useable
(
playerid
,
LOCATION_MZONE
,
5
)
||
!
(
zone
&
(
1u
<<
5
)))
if
(
!
is_location_useable
(
playerid
,
LOCATION_MZONE
,
6
))
flag
|=
1u
<<
5
;
flag
|=
1u
<<
6
;
}
if
(
list
)
if
(
list
)
*
list
=
flag
;
*
list
=
flag
&
0x7f
;
int32
count
=
5
-
field_used_count
[
flag
&
0x1f
];
if
(
~
flag
&
((
1u
<<
5
)
|
(
1u
<<
6
)))
count
++
;
return
count
;
return
count
;
}
}
int32
field
::
get_mzone_limit
(
uint8
playerid
,
uint8
uplayer
,
uint32
reason
)
{
int32
field
::
get_mzone_limit
(
uint8
playerid
,
uint8
uplayer
,
uint32
reason
)
{
...
@@ -740,6 +743,8 @@ int32 field::check_extra_link(int32 playerid) {
...
@@ -740,6 +743,8 @@ int32 field::check_extra_link(int32 playerid) {
return
FALSE
;
return
FALSE
;
}
}
int32
field
::
check_extra_link
(
int32
playerid
,
card
*
pcard
,
int32
sequence
)
{
int32
field
::
check_extra_link
(
int32
playerid
,
card
*
pcard
,
int32
sequence
)
{
if
(
!
pcard
)
return
FALSE
;
if
(
player
[
playerid
].
list_mzone
[
sequence
])
if
(
player
[
playerid
].
list_mzone
[
sequence
])
return
FALSE
;
return
FALSE
;
uint8
cur_controler
=
pcard
->
current
.
controler
;
uint8
cur_controler
=
pcard
->
current
.
controler
;
...
...
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