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
11c76618
Commit
11c76618
authored
Jun 22, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add lua_State* to get_xyz_material
parent
bfbd9ded
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
field.cpp
field.cpp
+6
-6
field.h
field.h
+2
-2
libduel.cpp
libduel.cpp
+3
-3
No files found.
field.cpp
View file @
11c76618
...
...
@@ -1932,13 +1932,13 @@ void field::ritual_release(card_set* material) {
release
(
&
rel
,
core
.
reason_effect
,
REASON_RITUAL
+
REASON_EFFECT
+
REASON_MATERIAL
,
core
.
reason_player
);
send_to
(
&
rem
,
core
.
reason_effect
,
REASON_RITUAL
+
REASON_EFFECT
+
REASON_MATERIAL
,
core
.
reason_player
,
PLAYER_NONE
,
LOCATION_REMOVED
,
0
,
POS_FACEUP
);
}
void
field
::
get_xyz_material
(
card
*
scard
,
int32
findex
,
uint32
lv
,
int32
maxc
,
group
*
mg
)
{
void
field
::
get_xyz_material
(
lua_State
*
L
,
card
*
scard
,
int32
findex
,
uint32
lv
,
int32
maxc
,
group
*
mg
)
{
core
.
xmaterial_lst
.
clear
();
uint32
xyz_level
;
if
(
mg
)
{
for
(
auto
&
pcard
:
mg
->
container
)
{
if
(
pcard
->
is_can_be_xyz_material
(
scard
)
&&
(
xyz_level
=
pcard
->
check_xyz_level
(
scard
,
lv
))
&&
(
findex
==
0
||
pduel
->
lua
->
check_
matching
(
pcard
,
findex
,
0
)))
&&
(
findex
==
0
||
pduel
->
lua
->
check_
filter
(
L
,
pcard
,
findex
,
0
)))
core
.
xmaterial_lst
.
emplace
((
xyz_level
>>
12
)
&
0xf
,
pcard
);
}
}
else
{
...
...
@@ -1946,13 +1946,13 @@ void field::get_xyz_material(card* scard, int32 findex, uint32 lv, int32 maxc, g
for
(
auto
&
pcard
:
player
[
playerid
].
list_mzone
)
{
if
(
pcard
&&
pcard
->
is_position
(
POS_FACEUP
)
&&
!
pcard
->
is_treated_as_not_on_field
()
&&
pcard
->
is_can_be_xyz_material
(
scard
)
&&
(
xyz_level
=
pcard
->
check_xyz_level
(
scard
,
lv
))
&&
(
findex
==
0
||
pduel
->
lua
->
check_
matching
(
pcard
,
findex
,
0
)))
&&
(
findex
==
0
||
pduel
->
lua
->
check_
filter
(
L
,
pcard
,
findex
,
0
)))
core
.
xmaterial_lst
.
emplace
((
xyz_level
>>
12
)
&
0xf
,
pcard
);
}
for
(
auto
&
pcard
:
player
[
1
-
playerid
].
list_mzone
)
{
if
(
pcard
&&
pcard
->
is_position
(
POS_FACEUP
)
&&
!
pcard
->
is_treated_as_not_on_field
()
&&
pcard
->
is_can_be_xyz_material
(
scard
)
&&
(
xyz_level
=
pcard
->
check_xyz_level
(
scard
,
lv
))
&&
pcard
->
is_affected_by_effect
(
EFFECT_XYZ_MATERIAL
)
&&
(
findex
==
0
||
pduel
->
lua
->
check_
matching
(
pcard
,
findex
,
0
)))
&&
pcard
->
is_affected_by_effect
(
EFFECT_XYZ_MATERIAL
)
&&
(
findex
==
0
||
pduel
->
lua
->
check_
filter
(
L
,
pcard
,
findex
,
0
)))
core
.
xmaterial_lst
.
emplace
((
xyz_level
>>
12
)
&
0xf
,
pcard
);
}
}
...
...
@@ -2916,8 +2916,8 @@ int32 field::check_with_sum_greater_limit_m(const card_vector& mats, int32 acc,
return
TRUE
;
return
FALSE
;
}
int32
field
::
check_xyz_material
(
card
*
scard
,
int32
findex
,
int32
lv
,
int32
min
,
int32
max
,
group
*
mg
)
{
get_xyz_material
(
scard
,
findex
,
lv
,
max
,
mg
);
int32
field
::
check_xyz_material
(
lua_State
*
L
,
card
*
scard
,
int32
findex
,
int32
lv
,
int32
min
,
int32
max
,
group
*
mg
)
{
get_xyz_material
(
L
,
scard
,
findex
,
lv
,
max
,
mg
);
int32
playerid
=
scard
->
current
.
controler
;
int32
ct
=
get_spsummonable_count
(
scard
,
playerid
);
card_set
handover_zone_cards
;
...
...
field.h
View file @
11c76618
...
...
@@ -445,7 +445,7 @@ public:
void
get_ritual_material
(
uint8
playerid
,
effect
*
peffect
,
card_set
*
material
,
uint8
no_level
=
FALSE
);
void
get_fusion_material
(
uint8
playerid
,
card_set
*
material_all
,
card_set
*
material_base
,
uint32
location
);
void
ritual_release
(
card_set
*
material
);
void
get_xyz_material
(
card
*
scard
,
int32
findex
,
uint32
lv
,
int32
maxc
,
group
*
mg
);
void
get_xyz_material
(
lua_State
*
L
,
card
*
scard
,
int32
findex
,
uint32
lv
,
int32
maxc
,
group
*
mg
);
void
get_overlay_group
(
uint8
self
,
uint8
s
,
uint8
o
,
card_set
*
pset
);
int32
get_overlay_count
(
uint8
self
,
uint8
s
,
uint8
o
);
void
update_disable_check_list
(
effect
*
peffect
);
...
...
@@ -485,7 +485,7 @@ public:
static
int32
check_with_sum_limit_m
(
const
card_vector
&
mats
,
int32
acc
,
int32
index
,
int32
min
,
int32
max
,
int32
opmin
,
int32
must_count
);
static
int32
check_with_sum_greater_limit
(
const
card_vector
&
mats
,
int32
acc
,
int32
index
,
int32
opmin
);
static
int32
check_with_sum_greater_limit_m
(
const
card_vector
&
mats
,
int32
acc
,
int32
index
,
int32
opmin
,
int32
must_count
);
int32
check_xyz_material
(
card
*
pcard
,
int32
findex
,
int32
lv
,
int32
min
,
int32
max
,
group
*
mg
);
int32
check_xyz_material
(
lua_State
*
L
,
card
*
pcard
,
int32
findex
,
int32
lv
,
int32
min
,
int32
max
,
group
*
mg
);
int32
is_player_can_draw
(
uint8
playerid
);
int32
is_player_can_discard_deck
(
uint8
playerid
,
int32
count
);
...
...
libduel.cpp
View file @
11c76618
...
...
@@ -3581,7 +3581,7 @@ int32 scriptlib::duel_check_xyz_material(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_GROUP
,
6
);
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
6
);
}
lua_pushboolean
(
L
,
scard
->
pduel
->
game_field
->
check_xyz_material
(
scard
,
findex
,
lv
,
minc
,
maxc
,
mg
));
lua_pushboolean
(
L
,
scard
->
pduel
->
game_field
->
check_xyz_material
(
L
,
scard
,
findex
,
lv
,
minc
,
maxc
,
mg
));
return
1
;
}
int32
scriptlib
::
duel_select_xyz_material
(
lua_State
*
L
)
{
...
...
@@ -3604,9 +3604,9 @@ int32 scriptlib::duel_select_xyz_material(lua_State *L) {
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
7
);
}
duel
*
pduel
=
scard
->
pduel
;
if
(
!
pduel
->
game_field
->
check_xyz_material
(
scard
,
findex
,
lv
,
minc
,
maxc
,
mg
))
if
(
!
pduel
->
game_field
->
check_xyz_material
(
L
,
scard
,
findex
,
lv
,
minc
,
maxc
,
mg
))
return
0
;
pduel
->
game_field
->
get_xyz_material
(
scard
,
findex
,
lv
,
maxc
,
mg
);
pduel
->
game_field
->
get_xyz_material
(
L
,
scard
,
findex
,
lv
,
maxc
,
mg
);
scard
->
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_XMATERIAL
,
0
,
0
,
(
group
*
)
scard
,
playerid
+
(
lv
<<
16
),
minc
+
(
maxc
<<
16
));
return
lua_yield
(
L
,
0
);
}
...
...
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