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
01016149
Commit
01016149
authored
Jun 24, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push pcard in check_tuner_material
parent
21fa706f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
12 deletions
+24
-12
field.cpp
field.cpp
+24
-8
libduel.cpp
libduel.cpp
+0
-4
No files found.
field.cpp
View file @
01016149
...
@@ -2625,9 +2625,14 @@ int32 field::check_tuner_material(lua_State* L, card* pcard, card* tuner, int32
...
@@ -2625,9 +2625,14 @@ int32 field::check_tuner_material(lua_State* L, card* pcard, card* tuner, int32
if
(
smat
)
{
if
(
smat
)
{
if
(
pcheck
)
if
(
pcheck
)
pcheck
->
get_value
(
smat
);
pcheck
->
get_value
(
smat
);
if
((
smat
->
current
.
location
==
LOCATION_MZONE
&&
!
smat
->
is_position
(
POS_FACEUP
))
if
((
smat
->
current
.
location
==
LOCATION_MZONE
&&
!
smat
->
is_position
(
POS_FACEUP
))
||
!
smat
->
is_can_be_synchro_material
(
pcard
,
tuner
))
{
||
!
smat
->
is_can_be_synchro_material
(
pcard
,
tuner
)
pduel
->
restore_assumes
();
||
!
pduel
->
lua
->
check_filter
(
L
,
smat
,
findex2
,
1
))
{
return
FALSE
;
}
interpreter
::
card2value
(
L
,
pcard
);
auto
res
=
pduel
->
lua
->
check_filter
(
L
,
smat
,
findex2
,
1
);
lua_pop
(
L
,
1
);
if
(
!
res
)
{
pduel
->
restore_assumes
();
pduel
->
restore_assumes
();
return
FALSE
;
return
FALSE
;
}
}
...
@@ -2678,9 +2683,14 @@ int32 field::check_tuner_material(lua_State* L, card* pcard, card* tuner, int32
...
@@ -2678,9 +2683,14 @@ int32 field::check_tuner_material(lua_State* L, card* pcard, card* tuner, int32
continue
;
continue
;
if
(
pcheck
)
if
(
pcheck
)
pcheck
->
get_value
(
mcard
);
pcheck
->
get_value
(
mcard
);
if
((
mcard
->
current
.
location
==
LOCATION_MZONE
&&
!
mcard
->
is_position
(
POS_FACEUP
))
if
((
mcard
->
current
.
location
==
LOCATION_MZONE
&&
!
mcard
->
is_position
(
POS_FACEUP
))
||
!
mcard
->
is_can_be_synchro_material
(
pcard
,
tuner
))
{
||
!
mcard
->
is_can_be_synchro_material
(
pcard
,
tuner
)
pduel
->
restore_assumes
();
||
!
pduel
->
lua
->
check_filter
(
L
,
mcard
,
findex2
,
1
))
{
return
FALSE
;
}
interpreter
::
card2value
(
L
,
pcard
);
auto
res
=
pduel
->
lua
->
check_filter
(
L
,
mcard
,
findex2
,
1
);
lua_pop
(
L
,
1
);
if
(
!
res
)
{
pduel
->
restore_assumes
();
pduel
->
restore_assumes
();
return
FALSE
;
return
FALSE
;
}
}
...
@@ -2723,7 +2733,10 @@ int32 field::check_tuner_material(lua_State* L, card* pcard, card* tuner, int32
...
@@ -2723,7 +2733,10 @@ int32 field::check_tuner_material(lua_State* L, card* pcard, card* tuner, int32
pcheck
->
get_value
(
pm
);
pcheck
->
get_value
(
pm
);
if
(
pm
->
current
.
location
==
LOCATION_MZONE
&&
!
pm
->
is_position
(
POS_FACEUP
))
if
(
pm
->
current
.
location
==
LOCATION_MZONE
&&
!
pm
->
is_position
(
POS_FACEUP
))
continue
;
continue
;
if
(
!
pduel
->
lua
->
check_filter
(
L
,
pm
,
findex2
,
1
))
interpreter
::
card2value
(
L
,
pcard
);
auto
res
=
pduel
->
lua
->
check_filter
(
L
,
pm
,
findex2
,
1
);
lua_pop
(
L
,
1
);
if
(
!
res
)
continue
;
continue
;
nsyn
.
push_back
(
pm
);
nsyn
.
push_back
(
pm
);
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
...
@@ -2744,7 +2757,10 @@ int32 field::check_tuner_material(lua_State* L, card* pcard, card* tuner, int32
...
@@ -2744,7 +2757,10 @@ int32 field::check_tuner_material(lua_State* L, card* pcard, card* tuner, int32
pcheck
->
get_value
(
pm
);
pcheck
->
get_value
(
pm
);
if
(
pm
->
current
.
location
==
LOCATION_MZONE
&&
!
pm
->
is_position
(
POS_FACEUP
))
if
(
pm
->
current
.
location
==
LOCATION_MZONE
&&
!
pm
->
is_position
(
POS_FACEUP
))
continue
;
continue
;
if
(
!
pduel
->
lua
->
check_filter
(
L
,
pm
,
findex2
,
1
))
interpreter
::
card2value
(
L
,
pcard
);
auto
res
=
pduel
->
lua
->
check_filter
(
L
,
pm
,
findex2
,
1
);
lua_pop
(
L
,
1
);
if
(
!
res
)
continue
;
continue
;
nsyn
.
push_back
(
pm
);
nsyn
.
push_back
(
pm
);
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
...
...
libduel.cpp
View file @
01016149
...
@@ -3251,7 +3251,6 @@ int32 scriptlib::duel_check_synchro_material(lua_State *L) {
...
@@ -3251,7 +3251,6 @@ int32 scriptlib::duel_check_synchro_material(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_GROUP
,
7
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
7
);
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
7
);
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
7
);
}
}
lua_pushvalue
(
L
,
1
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
check_synchro_material
(
L
,
pcard
,
2
,
3
,
min
,
max
,
smat
,
mg
));
lua_pushboolean
(
L
,
pduel
->
game_field
->
check_synchro_material
(
L
,
pcard
,
2
,
3
,
min
,
max
,
smat
,
mg
));
return
1
;
return
1
;
}
}
...
@@ -3276,10 +3275,8 @@ int32 scriptlib::duel_select_tuner_material(lua_State *L) {
...
@@ -3276,10 +3275,8 @@ int32 scriptlib::duel_select_tuner_material(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_GROUP
,
8
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
8
);
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
8
);
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
8
);
}
}
lua_pushvalue
(
L
,
2
);
if
(
!
pduel
->
game_field
->
check_tuner_material
(
L
,
pcard
,
tuner
,
4
,
5
,
min
,
max
,
0
,
mg
))
if
(
!
pduel
->
game_field
->
check_tuner_material
(
L
,
pcard
,
tuner
,
4
,
5
,
min
,
max
,
0
,
mg
))
return
0
;
return
0
;
lua_pop
(
L
,
1
);
pduel
->
game_field
->
core
.
select_cards
.
clear
();
pduel
->
game_field
->
core
.
select_cards
.
clear
();
pduel
->
game_field
->
core
.
select_cards
.
push_back
(
tuner
);
pduel
->
game_field
->
core
.
select_cards
.
push_back
(
tuner
);
pduel
->
game_field
->
returns
.
bvalue
[
1
]
=
0
;
pduel
->
game_field
->
returns
.
bvalue
[
1
]
=
0
;
...
@@ -3308,7 +3305,6 @@ int32 scriptlib::duel_check_tuner_material(lua_State *L) {
...
@@ -3308,7 +3305,6 @@ int32 scriptlib::duel_check_tuner_material(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_GROUP
,
7
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
7
);
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
7
);
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
7
);
}
}
lua_pushvalue
(
L
,
1
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
check_tuner_material
(
L
,
pcard
,
tuner
,
3
,
4
,
min
,
max
,
0
,
mg
));
lua_pushboolean
(
L
,
pduel
->
game_field
->
check_tuner_material
(
L
,
pcard
,
tuner
,
3
,
4
,
min
,
max
,
0
,
mg
));
return
1
;
return
1
;
}
}
...
...
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