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
xiaoye
ygopro-core
Commits
0283bb6d
Commit
0283bb6d
authored
Dec 25, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
16deeda4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
18 deletions
+15
-18
field.cpp
field.cpp
+10
-13
field.h
field.h
+1
-1
operations.cpp
operations.cpp
+4
-4
No files found.
field.cpp
View file @
0283bb6d
...
@@ -708,11 +708,7 @@ int32 field::get_spsummonable_count_fromex_rule4(card* pcard, uint8 playerid, ui
...
@@ -708,11 +708,7 @@ int32 field::get_spsummonable_count_fromex_rule4(card* pcard, uint8 playerid, ui
if
(
!
is_location_useable
(
playerid
,
LOCATION_MZONE
,
6
))
if
(
!
is_location_useable
(
playerid
,
LOCATION_MZONE
,
6
))
flag
|=
1u
<<
6
;
flag
|=
1u
<<
6
;
}
}
uint32
linked_zone
=
0
;
uint32
linked_zone
=
get_rule_zone_fromex
(
playerid
,
pcard
);
if
(
core
.
duel_rule
>=
5
&&
pcard
&&
(
pcard
->
get_type
()
&
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
)
&&
pcard
->
is_position
(
POS_FACEDOWN
))
linked_zone
=
0x7f007f
;
else
linked_zone
=
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
);
flag
=
flag
|
~
zone
|
~
linked_zone
;
flag
=
flag
|
~
zone
|
~
linked_zone
;
if
(
list
)
if
(
list
)
*
list
=
flag
&
0x7f
;
*
list
=
flag
&
0x7f
;
...
@@ -777,13 +773,14 @@ uint32 field::get_linked_zone(int32 playerid) {
...
@@ -777,13 +773,14 @@ uint32 field::get_linked_zone(int32 playerid) {
}
}
return
zones
;
return
zones
;
}
}
uint32
field
::
get_fsx_zone_fromex_rule5
(
int32
playerid
)
{
uint32
field
::
get_rule_zone_fromex
(
int32
playerid
,
card
*
pcard
)
{
if
(
core
.
duel_rule
<=
3
)
{
if
(
core
.
duel_rule
>=
4
)
{
return
0x1f
;
if
(
core
.
duel_rule
>=
5
&&
pcard
&&
pcard
->
is_position
(
POS_FACEDOWN
)
&&
(
pcard
->
data
.
type
&
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
))
}
else
if
(
core
.
duel_rule
==
4
)
{
return
0x7f
;
return
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
);
else
return
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
);
}
else
{
}
else
{
return
0x
7
f
;
return
0x
1
f
;
}
}
}
}
void
field
::
get_linked_cards
(
uint8
self
,
uint8
s
,
uint8
o
,
card_set
*
cset
)
{
void
field
::
get_linked_cards
(
uint8
self
,
uint8
s
,
uint8
o
,
card_set
*
cset
)
{
...
@@ -2408,7 +2405,7 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
...
@@ -2408,7 +2405,7 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
int32
ct
=
get_spsummonable_count
(
pcard
,
playerid
);
int32
ct
=
get_spsummonable_count
(
pcard
,
playerid
);
card_set
linked_cards
;
card_set
linked_cards
;
if
(
ct
<=
0
)
{
if
(
ct
<=
0
)
{
uint32
linked_zone
=
get_
fsx_zone_fromex_rule5
(
playeri
d
);
uint32
linked_zone
=
get_
rule_zone_fromex
(
playerid
,
pcar
d
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
if
(
linked_cards
.
find
(
tuner
)
!=
linked_cards
.
end
())
if
(
linked_cards
.
find
(
tuner
)
!=
linked_cards
.
end
())
ct
++
;
ct
++
;
...
@@ -2704,7 +2701,7 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 lv, int32 min,
...
@@ -2704,7 +2701,7 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 lv, int32 min,
card_set
linked_cards
;
card_set
linked_cards
;
if
(
ct
<=
0
)
{
if
(
ct
<=
0
)
{
int32
ft
=
ct
;
int32
ft
=
ct
;
uint32
linked_zone
=
get_
fsx_zone_fromex_rule5
(
playeri
d
);
uint32
linked_zone
=
get_
rule_zone_fromex
(
playerid
,
scar
d
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
for
(
auto
cit
=
core
.
xmaterial_lst
.
begin
();
cit
!=
core
.
xmaterial_lst
.
end
();
++
cit
)
{
for
(
auto
cit
=
core
.
xmaterial_lst
.
begin
();
cit
!=
core
.
xmaterial_lst
.
end
();
++
cit
)
{
card
*
pcard
=
cit
->
second
;
card
*
pcard
=
cit
->
second
;
...
...
field.h
View file @
0283bb6d
...
@@ -378,7 +378,7 @@ public:
...
@@ -378,7 +378,7 @@ public:
int32
get_mzone_limit
(
uint8
playerid
,
uint8
uplayer
,
uint32
reason
);
int32
get_mzone_limit
(
uint8
playerid
,
uint8
uplayer
,
uint32
reason
);
int32
get_szone_limit
(
uint8
playerid
,
uint8
uplayer
,
uint32
reason
);
int32
get_szone_limit
(
uint8
playerid
,
uint8
uplayer
,
uint32
reason
);
uint32
get_linked_zone
(
int32
playerid
);
uint32
get_linked_zone
(
int32
playerid
);
uint32
get_
fsx_zone_fromex_rule5
(
int32
playeri
d
);
uint32
get_
rule_zone_fromex
(
int32
playerid
,
card
*
pcar
d
);
void
get_linked_cards
(
uint8
self
,
uint8
s
,
uint8
o
,
card_set
*
cset
);
void
get_linked_cards
(
uint8
self
,
uint8
s
,
uint8
o
,
card_set
*
cset
);
int32
check_extra_link
(
int32
playerid
);
int32
check_extra_link
(
int32
playerid
);
int32
check_extra_link
(
int32
playerid
,
card
*
pcard
,
int32
sequence
);
int32
check_extra_link
(
int32
playerid
,
card
*
pcard
,
int32
sequence
);
...
...
operations.cpp
View file @
0283bb6d
...
@@ -5167,7 +5167,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
...
@@ -5167,7 +5167,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
return
FALSE
;
return
FALSE
;
}
}
card_set
linked_cards
;
card_set
linked_cards
;
uint32
linked_zone
=
get_
zone_fromex_rule5
(
playeri
d
);
uint32
linked_zone
=
get_
rule_zone_fromex
(
playerid
,
pcar
d
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
if
(
linked_cards
.
find
(
tuner
)
!=
linked_cards
.
end
())
if
(
linked_cards
.
find
(
tuner
)
!=
linked_cards
.
end
())
ct
++
;
ct
++
;
...
@@ -5395,7 +5395,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5395,7 +5395,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
int32
ct
=
get_spsummonable_count
(
scard
,
playerid
);
int32
ct
=
get_spsummonable_count
(
scard
,
playerid
);
card_set
linked_cards
;
card_set
linked_cards
;
if
(
ct
<=
0
)
{
if
(
ct
<=
0
)
{
uint32
linked_zone
=
get_
zone_fromex_rule5
(
playeri
d
);
uint32
linked_zone
=
get_
rule_zone_fromex
(
playerid
,
scar
d
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
}
}
for
(
auto
&
pcard
:
core
.
operated_set
)
{
for
(
auto
&
pcard
:
core
.
operated_set
)
{
...
@@ -5480,7 +5480,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5480,7 +5480,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
return
FALSE
;
return
FALSE
;
}
}
card_set
linked_cards
;
card_set
linked_cards
;
uint32
linked_zone
=
get_
zone_fromex_rule5
(
playeri
d
);
uint32
linked_zone
=
get_
rule_zone_fromex
(
playerid
,
scar
d
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
int32
ft
=
ct
+
std
::
count_if
(
core
.
operated_set
.
begin
(),
core
.
operated_set
.
end
(),
int32
ft
=
ct
+
std
::
count_if
(
core
.
operated_set
.
begin
(),
core
.
operated_set
.
end
(),
[
=
](
card
*
pcard
)
{
return
linked_cards
.
find
(
pcard
)
!=
linked_cards
.
end
();
});
[
=
](
card
*
pcard
)
{
return
linked_cards
.
find
(
pcard
)
!=
linked_cards
.
end
();
});
...
@@ -5663,7 +5663,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5663,7 +5663,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
if
(
ct
>
0
)
if
(
ct
>
0
)
return
FALSE
;
return
FALSE
;
card_set
linked_cards
;
card_set
linked_cards
;
uint32
linked_zone
=
get_
zone_fromex_rule5
(
playeri
d
);
uint32
linked_zone
=
get_
rule_zone_fromex
(
playerid
,
scar
d
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
,
LOCATION_MZONE
);
int32
ft
=
ct
+
std
::
count_if
(
core
.
operated_set
.
begin
(),
core
.
operated_set
.
end
(),
int32
ft
=
ct
+
std
::
count_if
(
core
.
operated_set
.
begin
(),
core
.
operated_set
.
end
(),
[
=
](
card
*
pcard
)
{
return
linked_cards
.
find
(
pcard
)
!=
linked_cards
.
end
();
});
[
=
](
card
*
pcard
)
{
return
linked_cards
.
find
(
pcard
)
!=
linked_cards
.
end
();
});
...
...
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