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
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
ygopro-core
Commits
eb18a5c6
Commit
eb18a5c6
authored
Apr 20, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tomain for synchros
parent
e8544068
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
field.cpp
field.cpp
+4
-0
operations.cpp
operations.cpp
+8
-0
No files found.
field.cpp
View file @
eb18a5c6
...
@@ -2459,6 +2459,8 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
...
@@ -2459,6 +2459,8 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
card_set
linked_cards
;
card_set
linked_cards
;
if
(
ct
<=
0
)
{
if
(
ct
<=
0
)
{
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
if
(
is_player_affected_by_effect
(
playerid
,
EFFECT_EXTRA_TOMAIN_KOISHI
)
||
pcard
->
is_affected_by_effect
(
EFFECT_EXTRA_TOMAIN_KOISHI
))
linked_zone
=
0x7f
;
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
++
;
...
@@ -2755,6 +2757,8 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 lv, int32 min,
...
@@ -2755,6 +2757,8 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 lv, int32 min,
if
(
ct
<=
0
)
{
if
(
ct
<=
0
)
{
int32
ft
=
ct
;
int32
ft
=
ct
;
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
if
(
is_player_affected_by_effect
(
playerid
,
EFFECT_EXTRA_TOMAIN_KOISHI
)
||
scard
->
is_affected_by_effect
(
EFFECT_EXTRA_TOMAIN_KOISHI
))
linked_zone
=
0x7f
;
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
;
...
...
operations.cpp
View file @
eb18a5c6
...
@@ -5106,6 +5106,8 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
...
@@ -5106,6 +5106,8 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
}
}
card_set
linked_cards
;
card_set
linked_cards
;
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
if
(
is_player_affected_by_effect
(
playerid
,
EFFECT_EXTRA_TOMAIN_KOISHI
)
||
pcard
->
is_affected_by_effect
(
EFFECT_EXTRA_TOMAIN_KOISHI
))
linked_zone
=
0x7f
;
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
++
;
...
@@ -5334,6 +5336,8 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5334,6 +5336,8 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
card_set
linked_cards
;
card_set
linked_cards
;
if
(
ct
<=
0
)
{
if
(
ct
<=
0
)
{
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
if
(
is_player_affected_by_effect
(
playerid
,
EFFECT_EXTRA_TOMAIN_KOISHI
)
||
scard
->
is_affected_by_effect
(
EFFECT_EXTRA_TOMAIN_KOISHI
))
linked_zone
=
0x7f
;
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
)
{
...
@@ -5419,6 +5423,8 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5419,6 +5423,8 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
}
}
card_set
linked_cards
;
card_set
linked_cards
;
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
if
(
is_player_affected_by_effect
(
playerid
,
EFFECT_EXTRA_TOMAIN_KOISHI
)
||
scard
->
is_affected_by_effect
(
EFFECT_EXTRA_TOMAIN_KOISHI
))
linked_zone
=
0x7f
;
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
();
});
...
@@ -5602,6 +5608,8 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5602,6 +5608,8 @@ 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
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
uint32
linked_zone
=
core
.
duel_rule
>=
4
?
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
if
(
is_player_affected_by_effect
(
playerid
,
EFFECT_EXTRA_TOMAIN_KOISHI
)
||
scard
->
is_affected_by_effect
(
EFFECT_EXTRA_TOMAIN_KOISHI
))
linked_zone
=
0x7f
;
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