Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
YGOPRO-520DIY
ygopro
Commits
73f8d03d
Commit
73f8d03d
authored
Apr 22, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
1d7b766f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
19 deletions
+32
-19
ocgcore/field.cpp
ocgcore/field.cpp
+27
-19
ocgcore/operations.cpp
ocgcore/operations.cpp
+5
-0
No files found.
ocgcore/field.cpp
View file @
73f8d03d
...
...
@@ -1604,23 +1604,6 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
return
TRUE
;
}
}
else
{
card_vector
nsyn
;
card
*
pm
;
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
int32
i
=
0
;
i
<
5
;
++
i
)
{
pm
=
player
[
p
].
list_mzone
[
i
];
if
(
mg
&&
!
mg
->
has_card
(
pm
))
continue
;
if
(
pm
&&
pm
!=
tuner
&&
pm
->
is_position
(
POS_FACEUP
)
&&
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
{
if
(
pcheck
)
pcheck
->
get_value
(
pm
);
if
(
!
pduel
->
lua
->
check_matching
(
pm
,
findex2
,
0
))
continue
;
nsyn
.
push_back
(
pm
);
pm
->
operation_param
=
pm
->
get_synchro_level
(
pcard
);
}
}
}
int32
l
=
tuner
->
get_synchro_level
(
pcard
);
int32
l1
=
l
&
0xffff
;
//int32 l2 = l >> 16;
...
...
@@ -1631,19 +1614,44 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
return
FALSE
;
}
if
(
smat
)
{
if
(
pcheck
)
pcheck
->
get_value
(
smat
);
if
(
!
pduel
->
lua
->
check_matching
(
smat
,
findex2
,
0
))
{
pduel
->
restore_assumes
();
return
FALSE
;
}
l
=
smat
->
get_synchro_level
(
pcard
);
l1
=
l
&
0xffff
;
lv
-=
l1
;
min
--
;
max
--
;
pduel
->
restore_assumes
();
if
(
lv
<=
0
)
{
pduel
->
restore_assumes
();
if
(
lv
==
0
&&
min
==
0
)
return
TRUE
;
return
FALSE
;
}
if
(
max
==
0
)
if
(
max
==
0
)
{
pduel
->
restore_assumes
();
return
FALSE
;
}
}
card_vector
nsyn
;
card
*
pm
;
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
int32
i
=
0
;
i
<
5
;
++
i
)
{
pm
=
player
[
p
].
list_mzone
[
i
];
if
(
mg
&&
!
mg
->
has_card
(
pm
))
continue
;
if
(
pm
&&
pm
!=
tuner
&&
pm
!=
smat
&&
pm
->
is_position
(
POS_FACEUP
)
&&
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
{
if
(
pcheck
)
pcheck
->
get_value
(
pm
);
if
(
!
pduel
->
lua
->
check_matching
(
pm
,
findex2
,
0
))
continue
;
nsyn
.
push_back
(
pm
);
pm
->
operation_param
=
pm
->
get_synchro_level
(
pcard
);
}
}
}
if
(
check_with_sum_limit
(
&
nsyn
,
lv
,
0
,
1
,
min
,
max
))
{
pduel
->
restore_assumes
();
...
...
ocgcore/operations.cpp
View file @
73f8d03d
...
...
@@ -3786,6 +3786,8 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
if
(
lv
<=
0
)
continue
;
if
(
smat
)
{
if
(
pcheck
)
pcheck
->
get_value
(
smat
);
l
=
smat
->
get_synchro_level
(
pcard
);
l1
=
l
&
0xffff
;
lv
-=
l1
;
...
...
@@ -3862,6 +3864,9 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
}
case
3
:
{
card
*
tuner
=
(
card
*
)
core
.
units
.
begin
()
->
ptarget
;
effect
*
pcheck
=
tuner
->
is_affected_by_effect
(
EFFECT_SYNCHRO_CHECK
);
if
(
pcheck
)
pcheck
->
get_value
(
tuner
);
int32
l
=
tuner
->
get_synchro_level
(
pcard
);
int32
l1
=
l
&
0xffff
;
//int32 l2 = l >> 16;
...
...
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