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
d233210f
Commit
d233210f
authored
Dec 09, 2023
by
Uytrewq
Committed by
GitHub
Dec 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix check_tuner_material, select_synchro_material (#513)
parent
6d842e3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
16 deletions
+36
-16
field.cpp
field.cpp
+28
-12
operations.cpp
operations.cpp
+8
-4
No files found.
field.cpp
View file @
d233210f
...
...
@@ -2656,10 +2656,16 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
pduel
->
restore_assumes
();
return
FALSE
;
}
if
(
ptuner
&&
ptuner
->
target
)
{
pduel
->
lua
->
add_param
(
ptuner
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
smat
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
get_function_value
(
ptuner
->
target
,
2
))
{
if
(
ptuner
)
{
if
(
ptuner
->
target
)
{
pduel
->
lua
->
add_param
(
ptuner
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
smat
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
get_function_value
(
ptuner
->
target
,
2
))
{
pduel
->
restore_assumes
();
return
FALSE
;
}
}
if
(
ptuner
->
value
&&
!
(
smat
->
current
.
location
&
location
))
{
pduel
->
restore_assumes
();
return
FALSE
;
}
...
...
@@ -2701,10 +2707,16 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
pduel
->
restore_assumes
();
return
FALSE
;
}
if
(
ptuner
&&
ptuner
->
target
)
{
pduel
->
lua
->
add_param
(
ptuner
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
mcard
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
get_function_value
(
ptuner
->
target
,
2
))
{
if
(
ptuner
)
{
if
(
ptuner
->
target
)
{
pduel
->
lua
->
add_param
(
ptuner
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
mcard
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
get_function_value
(
ptuner
->
target
,
2
))
{
pduel
->
restore_assumes
();
return
FALSE
;
}
}
if
(
ptuner
->
value
&&
!
(
mcard
->
current
.
location
&
location
))
{
pduel
->
restore_assumes
();
return
FALSE
;
}
...
...
@@ -2720,10 +2732,14 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
for
(
auto
&
pm
:
mg
->
container
)
{
if
(
pm
==
tuner
||
pm
==
smat
||
must_list
.
find
(
pm
)
!=
must_list
.
end
()
||
!
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
continue
;
if
(
ptuner
&&
ptuner
->
target
)
{
pduel
->
lua
->
add_param
(
ptuner
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pm
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
get_function_value
(
ptuner
->
target
,
2
))
if
(
ptuner
)
{
if
(
ptuner
->
target
)
{
pduel
->
lua
->
add_param
(
ptuner
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pm
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
get_function_value
(
ptuner
->
target
,
2
))
continue
;
}
if
(
ptuner
->
value
&&
!
(
pm
->
current
.
location
&
location
))
continue
;
}
if
(
pcheck
)
...
...
operations.cpp
View file @
d233210f
...
...
@@ -5388,10 +5388,14 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
for
(
auto
&
pm
:
mg
->
container
)
{
if
(
pm
==
tuner
||
pm
==
smat
||
must_list
.
find
(
pm
)
!=
must_list
.
end
()
||
!
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
continue
;
if
(
ptuner
&&
ptuner
->
target
)
{
pduel
->
lua
->
add_param
(
ptuner
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pm
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
get_function_value
(
ptuner
->
target
,
2
))
if
(
ptuner
)
{
if
(
ptuner
->
target
)
{
pduel
->
lua
->
add_param
(
ptuner
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pm
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
get_function_value
(
ptuner
->
target
,
2
))
continue
;
}
if
(
ptuner
->
value
&&
!
(
pm
->
current
.
location
&
location
))
continue
;
}
if
(
pcheck
)
...
...
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