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
xiaoye
ygopro-core
Commits
fcce7dc6
Commit
fcce7dc6
authored
Jul 08, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:moecube/ygopro-core
parents
41256536
3011093f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
24 deletions
+52
-24
card.cpp
card.cpp
+2
-2
field.cpp
field.cpp
+8
-0
libduel.cpp
libduel.cpp
+30
-18
operations.cpp
operations.cpp
+12
-4
No files found.
card.cpp
View file @
fcce7dc6
...
@@ -3014,8 +3014,8 @@ int32 card::is_fusion_summonable_card(uint32 summon_type) {
...
@@ -3014,8 +3014,8 @@ int32 card::is_fusion_summonable_card(uint32 summon_type) {
effect_set
eset
;
effect_set
eset
;
filter_effect
(
EFFECT_SPSUMMON_CONDITION
,
&
eset
);
filter_effect
(
EFFECT_SPSUMMON_CONDITION
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
(
void
*
)
0
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pduel
->
game_field
->
core
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
(
void
*
)
0
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
pduel
->
game_field
->
core
.
reason_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
summon_type
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
summon_type
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_INT
);
...
...
field.cpp
View file @
fcce7dc6
...
@@ -2790,6 +2790,14 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 lv, int32 min,
...
@@ -2790,6 +2790,14 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 lv, int32 min,
if
(
ft
<=
0
)
if
(
ft
<=
0
)
return
FALSE
;
return
FALSE
;
}
}
int32
mzone_limit
=
get_mzone_limit
(
playerid
,
playerid
,
LOCATION_REASON_TOFIELD
);
if
(
mzone_limit
<=
0
)
{
int32
ft
=
-
mzone_limit
+
1
;
if
(
ft
>
min
)
min
=
ft
;
if
(
min
>
max
)
return
FALSE
;
}
effect_set
eset
;
effect_set
eset
;
filter_player_effect
(
playerid
,
EFFECT_MUST_BE_XMATERIAL
,
&
eset
);
filter_player_effect
(
playerid
,
EFFECT_MUST_BE_XMATERIAL
,
&
eset
);
card_set
mcset
;
card_set
mcset
;
...
...
libduel.cpp
View file @
fcce7dc6
...
@@ -498,9 +498,11 @@ int32 scriptlib::duel_summon(lua_State *L) {
...
@@ -498,9 +498,11 @@ int32 scriptlib::duel_summon(lua_State *L) {
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_special_summon_rule
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_special_summon_rule
(
lua_State
*
L
)
{
...
@@ -519,9 +521,11 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
...
@@ -519,9 +521,11 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
sumtype
=
(
uint32
)
lua_tointeger
(
L
,
3
);
sumtype
=
(
uint32
)
lua_tointeger
(
L
,
3
);
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
sumtype
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
sumtype
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_synchro_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_synchro_summon
(
lua_State
*
L
)
{
...
@@ -561,9 +565,11 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
...
@@ -561,9 +565,11 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
pduel
->
game_field
->
core
.
limit_syn_maxc
=
maxc
;
pduel
->
game_field
->
core
.
limit_syn_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_SYNCHRO
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_SYNCHRO
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_xyz_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_xyz_summon
(
lua_State
*
L
)
{
...
@@ -595,9 +601,11 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
...
@@ -595,9 +601,11 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_link_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_link_summon
(
lua_State
*
L
)
{
...
@@ -637,9 +645,11 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
...
@@ -637,9 +645,11 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
pduel
->
game_field
->
core
.
limit_link_maxc
=
maxc
;
pduel
->
game_field
->
core
.
limit_link_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_LINK
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_LINK
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_setm
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_setm
(
lua_State
*
L
)
{
...
@@ -667,9 +677,11 @@ int32 scriptlib::duel_setm(lua_State *L) {
...
@@ -667,9 +677,11 @@ int32 scriptlib::duel_setm(lua_State *L) {
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
mset
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
pduel
->
game_field
->
mset
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_sets
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_sets
(
lua_State
*
L
)
{
...
...
operations.cpp
View file @
fcce7dc6
...
@@ -5554,6 +5554,14 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5554,6 +5554,14 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
core
.
operated_set
.
clear
();
core
.
operated_set
.
clear
();
int32
mzone_limit
=
get_mzone_limit
(
playerid
,
playerid
,
LOCATION_REASON_TOFIELD
);
if
(
mzone_limit
<=
0
)
{
int32
ft
=
-
mzone_limit
+
1
;
if
(
ft
>
min
)
{
min
=
ft
;
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
}
}
effect_set
eset
;
effect_set
eset
;
filter_player_effect
(
playerid
,
EFFECT_MUST_BE_XMATERIAL
,
&
eset
);
filter_player_effect
(
playerid
,
EFFECT_MUST_BE_XMATERIAL
,
&
eset
);
core
.
select_cards
.
clear
();
core
.
select_cards
.
clear
();
...
@@ -5599,7 +5607,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5599,7 +5607,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
min
-=
returns
.
bvalue
[
0
];
min
-=
returns
.
bvalue
[
0
];
if
(
min
<
0
)
if
(
min
<
0
)
min
=
0
;
min
=
0
;
if
(
(
int32
)
core
.
operated_set
.
size
()
<
pv
)
if
(
pv
-
(
int32
)
core
.
operated_set
.
size
()
>
min
)
min
=
pv
-
(
int32
)
core
.
operated_set
.
size
();
min
=
pv
-
(
int32
)
core
.
operated_set
.
size
();
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
if
(
min
==
0
)
{
if
(
min
==
0
)
{
...
@@ -5763,7 +5771,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5763,7 +5771,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
}
}
if
(
min
>
0
)
if
(
min
>
0
)
min
--
;
min
--
;
if
(
(
int32
)
core
.
operated_set
.
size
()
<
pv
)
if
(
pv
-
(
int32
)
core
.
operated_set
.
size
()
>
min
)
min
=
pv
-
(
int32
)
core
.
operated_set
.
size
();
min
=
pv
-
(
int32
)
core
.
operated_set
.
size
();
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
if
(
min
==
0
)
{
if
(
min
==
0
)
{
...
@@ -5844,7 +5852,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5844,7 +5852,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
return
TRUE
;
return
TRUE
;
}
}
min
=
0
;
min
=
0
;
if
(
(
int32
)
core
.
operated_set
.
size
()
<
pv
)
if
(
pv
-
(
int32
)
core
.
operated_set
.
size
()
>
min
)
min
=
pv
-
(
int32
)
core
.
operated_set
.
size
();
min
=
pv
-
(
int32
)
core
.
operated_set
.
size
();
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
if
(
min
==
0
)
{
if
(
min
==
0
)
{
...
@@ -5951,7 +5959,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -5951,7 +5959,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
}
}
if
(
min
>
0
)
if
(
min
>
0
)
min
--
;
min
--
;
if
(
(
int32
)
core
.
operated_set
.
size
()
<
pv
)
if
(
pv
-
(
int32
)
core
.
operated_set
.
size
()
>
min
)
min
=
pv
-
(
int32
)
core
.
operated_set
.
size
();
min
=
pv
-
(
int32
)
core
.
operated_set
.
size
();
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
core
.
units
.
begin
()
->
arg3
=
selectable
;
core
.
units
.
begin
()
->
arg3
=
selectable
;
...
...
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