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
b431b512
Commit
b431b512
authored
Mar 28, 2023
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:moecube/ygopro-core
parents
76ec64f7
aa17eed5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
93 additions
and
31 deletions
+93
-31
card.cpp
card.cpp
+30
-4
effect.h
effect.h
+2
-2
field.cpp
field.cpp
+37
-12
field.h
field.h
+1
-0
libduel.cpp
libduel.cpp
+12
-0
operations.cpp
operations.cpp
+10
-13
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
b431b512
...
@@ -674,6 +674,7 @@ std::pair<int32, int32> card::get_atk_def() {
...
@@ -674,6 +674,7 @@ std::pair<int32, int32> card::get_atk_def() {
effect_set
eset
;
effect_set
eset
;
effect_set
effects_atk_final
,
effects_atk_wicked
,
effects_atk_option
;
effect_set
effects_atk_final
,
effects_atk_wicked
,
effects_atk_option
;
effect_set
effects_def_final
,
effects_def_wicked
,
effects_def_option
;
effect_set
effects_def_final
,
effects_def_wicked
,
effects_def_option
;
effect_set
effects_repeat_update_atk
,
effects_repeat_update_def
;
int32
batk
=
data
.
attack
;
int32
batk
=
data
.
attack
;
if
(
batk
<
0
)
if
(
batk
<
0
)
batk
=
0
;
batk
=
0
;
...
@@ -727,7 +728,9 @@ std::pair<int32, int32> card::get_atk_def() {
...
@@ -727,7 +728,9 @@ std::pair<int32, int32> card::get_atk_def() {
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
switch
(
eset
[
i
]
->
code
)
{
switch
(
eset
[
i
]
->
code
)
{
case
EFFECT_UPDATE_ATTACK
:
case
EFFECT_UPDATE_ATTACK
:
if
((
eset
[
i
]
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
if
(
eset
[
i
]
->
is_flag
(
EFFECT_FLAG2_REPEAT_UPDATE
))
effects_repeat_update_atk
.
add_item
(
eset
[
i
]);
else
if
((
eset
[
i
]
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
up_atk
+=
eset
[
i
]
->
get_value
(
this
);
up_atk
+=
eset
[
i
]
->
get_value
(
this
);
else
else
upc_atk
+=
eset
[
i
]
->
get_value
(
this
);
upc_atk
+=
eset
[
i
]
->
get_value
(
this
);
...
@@ -758,7 +761,9 @@ std::pair<int32, int32> card::get_atk_def() {
...
@@ -758,7 +761,9 @@ std::pair<int32, int32> card::get_atk_def() {
break
;
break
;
// def
// def
case
EFFECT_UPDATE_DEFENSE
:
case
EFFECT_UPDATE_DEFENSE
:
if
((
eset
[
i
]
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
if
(
eset
[
i
]
->
is_flag
(
EFFECT_FLAG2_REPEAT_UPDATE
))
effects_repeat_update_def
.
add_item
(
eset
[
i
]);
else
if
((
eset
[
i
]
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
up_def
+=
eset
[
i
]
->
get_value
(
this
);
up_def
+=
eset
[
i
]
->
get_value
(
this
);
else
else
upc_def
+=
eset
[
i
]
->
get_value
(
this
);
upc_def
+=
eset
[
i
]
->
get_value
(
this
);
...
@@ -804,6 +809,16 @@ std::pair<int32, int32> card::get_atk_def() {
...
@@ -804,6 +809,16 @@ std::pair<int32, int32> card::get_atk_def() {
if
(
temp
.
defense
<
0
)
if
(
temp
.
defense
<
0
)
temp
.
defense
=
0
;
temp
.
defense
=
0
;
}
}
for
(
int32
i
=
0
;
i
<
effects_repeat_update_atk
.
size
();
++
i
)
{
temp
.
attack
+=
effects_repeat_update_atk
[
i
]
->
get_value
(
this
);
if
(
temp
.
attack
<
0
)
temp
.
attack
=
0
;
}
for
(
int32
i
=
0
;
i
<
effects_repeat_update_def
.
size
();
++
i
)
{
temp
.
defense
+=
effects_repeat_update_def
[
i
]
->
get_value
(
this
);
if
(
temp
.
defense
<
0
)
temp
.
defense
=
0
;
}
for
(
int32
i
=
0
;
i
<
effects_atk_final
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
effects_atk_final
.
size
();
++
i
)
{
atk
=
effects_atk_final
[
i
]
->
get_value
(
this
);
atk
=
effects_atk_final
[
i
]
->
get_value
(
this
);
if
(
atk
<
0
)
if
(
atk
<
0
)
...
@@ -4020,8 +4035,6 @@ int32 card::is_can_be_synchro_material(card* scard, card* tuner) {
...
@@ -4020,8 +4035,6 @@ int32 card::is_can_be_synchro_material(card* scard, card* tuner) {
return
FALSE
;
return
FALSE
;
if
(
!
(
get_synchro_type
()
&
TYPE_MONSTER
))
if
(
!
(
get_synchro_type
()
&
TYPE_MONSTER
))
return
FALSE
;
return
FALSE
;
if
(
scard
&&
current
.
location
==
LOCATION_MZONE
&&
current
.
controler
!=
scard
->
current
.
controler
&&
!
is_affected_by_effect
(
EFFECT_SYNCHRO_MATERIAL
))
return
FALSE
;
if
(
is_status
(
STATUS_FORBIDDEN
))
if
(
is_status
(
STATUS_FORBIDDEN
))
return
FALSE
;
return
FALSE
;
//special fix for scrap chimera, not perfect yet
//special fix for scrap chimera, not perfect yet
...
@@ -4034,6 +4047,19 @@ int32 card::is_can_be_synchro_material(card* scard, card* tuner) {
...
@@ -4034,6 +4047,19 @@ int32 card::is_can_be_synchro_material(card* scard, card* tuner) {
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
if
(
eset
[
i
]
->
get_value
(
scard
))
if
(
eset
[
i
]
->
get_value
(
scard
))
return
FALSE
;
return
FALSE
;
if
(
scard
&&
!
(
current
.
location
==
LOCATION_MZONE
&&
current
.
controler
==
scard
->
current
.
controler
))
{
eset
.
clear
();
filter_effect
(
EFFECT_EXTRA_SYNCHRO_MATERIAL
,
&
eset
);
if
(
eset
.
size
())
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
check_count_limit
(
scard
->
current
.
controler
))
continue
;
if
(
eset
[
i
]
->
get_value
(
scard
))
return
TRUE
;
}
return
FALSE
;
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
card
::
is_can_be_ritual_material
(
card
*
scard
)
{
int32
card
::
is_can_be_ritual_material
(
card
*
scard
)
{
...
...
effect.h
View file @
b431b512
...
@@ -221,7 +221,7 @@ enum effect_flag : uint32 {
...
@@ -221,7 +221,7 @@ enum effect_flag : uint32 {
EFFECT_FLAG_IMMEDIATELY_APPLY
=
0x80000000
,
EFFECT_FLAG_IMMEDIATELY_APPLY
=
0x80000000
,
};
};
enum
effect_flag2
:
uint32
{
enum
effect_flag2
:
uint32
{
// EFFECT_FLAG2_MILLENNIUM_RESTRICT
= 0x0001,
EFFECT_FLAG2_REPEAT_UPDATE
=
0x0001
,
EFFECT_FLAG2_COF
=
0x0002
,
EFFECT_FLAG2_COF
=
0x0002
,
EFFECT_FLAG2_WICKED
=
0x0004
,
EFFECT_FLAG2_WICKED
=
0x0004
,
EFFECT_FLAG2_OPTION
=
0x0008
,
EFFECT_FLAG2_OPTION
=
0x0008
,
...
@@ -403,7 +403,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
...
@@ -403,7 +403,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_TOSS_DICE_REPLACE 221
#define EFFECT_TOSS_DICE_REPLACE 221
#define EFFECT_FUSION_MATERIAL 230
#define EFFECT_FUSION_MATERIAL 230
#define EFFECT_CHAIN_MATERIAL 231
#define EFFECT_CHAIN_MATERIAL 231
#define EFFECT_
SYNCHRO_MATERIAL
232
#define EFFECT_
EXTRA_SYNCHRO_MATERIAL
232
#define EFFECT_XYZ_MATERIAL 233
#define EFFECT_XYZ_MATERIAL 233
#define EFFECT_FUSION_SUBSTITUTE 234
#define EFFECT_FUSION_SUBSTITUTE 234
#define EFFECT_CANNOT_BE_FUSION_MATERIAL 235
#define EFFECT_CANNOT_BE_FUSION_MATERIAL 235
...
...
field.cpp
View file @
b431b512
...
@@ -2533,6 +2533,36 @@ int32 field::check_must_material(group* mg, uint8 playerid, uint32 limit) {
...
@@ -2533,6 +2533,36 @@ int32 field::check_must_material(group* mg, uint8 playerid, uint32 limit) {
return
FALSE
;
return
FALSE
;
return
TRUE
;
return
TRUE
;
}
}
void
field
::
get_synchro_material
(
uint8
playerid
,
card_set
*
material
,
effect
*
ptuner
)
{
if
(
ptuner
&&
ptuner
->
value
)
{
int32
location
=
ptuner
->
value
;
if
(
location
&
LOCATION_MZONE
)
{
for
(
auto
&
pcard
:
player
[
playerid
].
list_mzone
)
{
if
(
pcard
)
material
->
insert
(
pcard
);
}
}
if
(
location
&
LOCATION_HAND
)
{
for
(
auto
&
pcard
:
player
[
playerid
].
list_hand
)
{
if
(
pcard
)
material
->
insert
(
pcard
);
}
}
}
else
{
for
(
auto
&
pcard
:
player
[
playerid
].
list_mzone
)
{
if
(
pcard
)
material
->
insert
(
pcard
);
}
for
(
auto
&
pcard
:
player
[
1
-
playerid
].
list_mzone
)
{
if
(
pcard
&&
pcard
->
is_affected_by_effect
(
EFFECT_EXTRA_SYNCHRO_MATERIAL
))
material
->
insert
(
pcard
);
}
for
(
auto
&
pcard
:
player
[
playerid
].
list_hand
)
{
if
(
pcard
&&
pcard
->
is_affected_by_effect
(
EFFECT_EXTRA_SYNCHRO_MATERIAL
))
material
->
insert
(
pcard
);
}
}
}
int32
field
::
check_synchro_material
(
card
*
pcard
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
,
card
*
smat
,
group
*
mg
)
{
int32
field
::
check_synchro_material
(
card
*
pcard
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
,
card
*
smat
,
group
*
mg
)
{
if
(
mg
)
{
if
(
mg
)
{
for
(
auto
&
tuner
:
mg
->
container
)
{
for
(
auto
&
tuner
:
mg
->
container
)
{
...
@@ -2540,11 +2570,11 @@ int32 field::check_synchro_material(card* pcard, int32 findex1, int32 findex2, i
...
@@ -2540,11 +2570,11 @@ int32 field::check_synchro_material(card* pcard, int32 findex1, int32 findex2, i
return
TRUE
;
return
TRUE
;
}
}
}
else
{
}
else
{
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
card_set
material
;
for
(
auto
&
tuner
:
player
[
p
].
list_mzone
)
{
get_synchro_material
(
pcard
->
current
.
controler
,
&
material
);
if
(
check_tuner_material
(
pcard
,
tuner
,
findex1
,
findex2
,
min
,
max
,
smat
,
mg
))
for
(
auto
&
tuner
:
material
)
{
return
TRUE
;
if
(
check_tuner_material
(
pcard
,
tuner
,
findex1
,
findex2
,
min
,
max
,
smat
,
mg
))
}
return
TRUE
;
}
}
}
}
return
FALSE
;
return
FALSE
;
...
@@ -2717,13 +2747,8 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
...
@@ -2717,13 +2747,8 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
}
}
}
else
{
}
else
{
card_vector
cv
;
card_set
cv
;
if
(
location
&
LOCATION_MZONE
)
{
get_synchro_material
(
playerid
,
&
cv
,
ptuner
);
cv
.
insert
(
cv
.
end
(),
player
[
0
].
list_mzone
.
begin
(),
player
[
0
].
list_mzone
.
end
());
cv
.
insert
(
cv
.
end
(),
player
[
1
].
list_mzone
.
begin
(),
player
[
1
].
list_mzone
.
end
());
}
if
(
location
&
LOCATION_HAND
)
cv
.
insert
(
cv
.
end
(),
player
[
playerid
].
list_hand
.
begin
(),
player
[
playerid
].
list_hand
.
end
());
for
(
auto
&
pm
:
cv
)
{
for
(
auto
&
pm
:
cv
)
{
if
(
!
pm
||
pm
==
tuner
||
pm
==
smat
||
must_list
.
find
(
pm
)
!=
must_list
.
end
()
||
!
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
if
(
!
pm
||
pm
==
tuner
||
pm
==
smat
||
must_list
.
find
(
pm
)
!=
must_list
.
end
()
||
!
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
continue
;
continue
;
...
...
field.h
View file @
b431b512
...
@@ -482,6 +482,7 @@ public:
...
@@ -482,6 +482,7 @@ public:
void
attack_all_target_check
();
void
attack_all_target_check
();
int32
get_must_material_list
(
uint8
playerid
,
uint32
limit
,
card_set
*
must_list
);
int32
get_must_material_list
(
uint8
playerid
,
uint32
limit
,
card_set
*
must_list
);
int32
check_must_material
(
group
*
mg
,
uint8
playerid
,
uint32
limit
);
int32
check_must_material
(
group
*
mg
,
uint8
playerid
,
uint32
limit
);
void
get_synchro_material
(
uint8
playerid
,
card_set
*
material
,
effect
*
ptuner
=
0
);
int32
check_synchro_material
(
card
*
pcard
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
,
card
*
smat
,
group
*
mg
);
int32
check_synchro_material
(
card
*
pcard
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
,
card
*
smat
,
group
*
mg
);
int32
check_tuner_material
(
card
*
pcard
,
card
*
tuner
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
,
card
*
smat
,
group
*
mg
);
int32
check_tuner_material
(
card
*
pcard
,
card
*
tuner
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
,
card
*
smat
,
group
*
mg
);
int32
check_other_synchro_material
(
const
card_vector
&
nsyn
,
int32
lv
,
int32
min
,
int32
max
,
int32
mcount
);
int32
check_other_synchro_material
(
const
card_vector
&
nsyn
,
int32
lv
,
int32
min
,
int32
max
,
int32
mcount
);
...
...
libduel.cpp
View file @
b431b512
...
@@ -3239,6 +3239,17 @@ int32 scriptlib::duel_set_synchro_material(lua_State *L) {
...
@@ -3239,6 +3239,17 @@ int32 scriptlib::duel_set_synchro_material(lua_State *L) {
pduel
->
game_field
->
core
.
synchro_materials
=
pgroup
->
container
;
pduel
->
game_field
->
core
.
synchro_materials
=
pgroup
->
container
;
return
0
;
return
0
;
}
}
int32
scriptlib
::
duel_get_synchro_material
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
group
*
pgroup
=
pduel
->
new_group
();
pduel
->
game_field
->
get_synchro_material
(
playerid
,
&
pgroup
->
container
);
interpreter
::
group2value
(
L
,
pgroup
);
return
1
;
}
int32
scriptlib
::
duel_select_synchro_material
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_select_synchro_material
(
lua_State
*
L
)
{
check_param_count
(
L
,
6
);
check_param_count
(
L
,
6
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
...
@@ -4978,6 +4989,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -4978,6 +4989,7 @@ static const struct luaL_Reg duellib[] = {
{
"SelectFusionMaterial"
,
scriptlib
::
duel_select_fusion_material
},
{
"SelectFusionMaterial"
,
scriptlib
::
duel_select_fusion_material
},
{
"SetFusionMaterial"
,
scriptlib
::
duel_set_fusion_material
},
{
"SetFusionMaterial"
,
scriptlib
::
duel_set_fusion_material
},
{
"SetSynchroMaterial"
,
scriptlib
::
duel_set_synchro_material
},
{
"SetSynchroMaterial"
,
scriptlib
::
duel_set_synchro_material
},
{
"GetSynchroMaterial"
,
scriptlib
::
duel_get_synchro_material
},
{
"SelectSynchroMaterial"
,
scriptlib
::
duel_select_synchro_material
},
{
"SelectSynchroMaterial"
,
scriptlib
::
duel_select_synchro_material
},
{
"CheckSynchroMaterial"
,
scriptlib
::
duel_check_synchro_material
},
{
"CheckSynchroMaterial"
,
scriptlib
::
duel_check_synchro_material
},
{
"SelectTunerMaterial"
,
scriptlib
::
duel_select_tuner_material
},
{
"SelectTunerMaterial"
,
scriptlib
::
duel_select_tuner_material
},
...
...
operations.cpp
View file @
b431b512
...
@@ -4198,6 +4198,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -4198,6 +4198,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
core
.
sub_solving_event
.
push_back
(
e
);
core
.
sub_solving_event
.
push_back
(
e
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
param
->
predirect
,
0
,
pcard
->
current
.
controler
,
0
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
param
->
predirect
,
0
,
pcard
->
current
.
controler
,
0
);
}
}
pcard
->
sendto_param
.
playerid
|=
0x1u
<<
5
;
++
param
->
cvit
;
++
param
->
cvit
;
core
.
units
.
begin
()
->
step
=
4
;
core
.
units
.
begin
()
->
step
=
4
;
return
FALSE
;
return
FALSE
;
...
@@ -4278,7 +4279,8 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -4278,7 +4279,8 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
card_set
equipings
,
overlays
;
card_set
equipings
,
overlays
;
for
(
auto
&
pcard
:
targets
->
container
)
{
for
(
auto
&
pcard
:
targets
->
container
)
{
uint8
nloc
=
pcard
->
current
.
location
;
uint8
nloc
=
pcard
->
current
.
location
;
if
(
pcard
->
equiping_target
)
uint8
cb_redirected
=
pcard
->
sendto_param
.
playerid
>>
5
;
if
(
pcard
->
equiping_target
&&
!
cb_redirected
)
pcard
->
unequip
();
pcard
->
unequip
();
if
(
pcard
->
equiping_cards
.
size
())
{
if
(
pcard
->
equiping_cards
.
size
())
{
for
(
auto
csit
=
pcard
->
equiping_cards
.
begin
();
csit
!=
pcard
->
equiping_cards
.
end
();)
{
for
(
auto
csit
=
pcard
->
equiping_cards
.
begin
();
csit
!=
pcard
->
equiping_cards
.
end
();)
{
...
@@ -5250,11 +5252,11 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
...
@@ -5250,11 +5252,11 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
core
.
select_cards
.
push_back
(
pm
);
core
.
select_cards
.
push_back
(
pm
);
}
}
}
else
{
}
else
{
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
card_set
material
;
for
(
auto
&
tuner
:
player
[
p
].
list_mzone
)
{
get_synchro_material
(
playerid
,
&
material
);
if
(
check_tuner_material
(
pcard
,
tuner
,
-
3
,
-
2
,
min
,
max
,
smat
,
mg
))
for
(
auto
&
tuner
:
material
)
{
core
.
select_cards
.
push_back
(
tuner
);
if
(
check_tuner_material
(
pcard
,
tuner
,
-
3
,
-
2
,
min
,
max
,
smat
,
mg
))
}
core
.
select_cards
.
push_back
(
tuner
);
}
}
}
}
if
(
core
.
select_cards
.
size
()
==
0
)
if
(
core
.
select_cards
.
size
()
==
0
)
...
@@ -5396,13 +5398,8 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
...
@@ -5396,13 +5398,8 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
}
}
}
else
{
}
else
{
card_vector
cv
;
card_set
cv
;
if
(
location
&
LOCATION_MZONE
)
{
get_synchro_material
(
playerid
,
&
cv
,
ptuner
);
cv
.
insert
(
cv
.
end
(),
player
[
0
].
list_mzone
.
begin
(),
player
[
0
].
list_mzone
.
end
());
cv
.
insert
(
cv
.
end
(),
player
[
1
].
list_mzone
.
begin
(),
player
[
1
].
list_mzone
.
end
());
}
if
(
location
&
LOCATION_HAND
)
cv
.
insert
(
cv
.
end
(),
player
[
playerid
].
list_hand
.
begin
(),
player
[
playerid
].
list_hand
.
end
());
for
(
auto
&
pm
:
cv
)
{
for
(
auto
&
pm
:
cv
)
{
if
(
!
pm
||
pm
==
tuner
||
pm
==
smat
||
must_list
.
find
(
pm
)
!=
must_list
.
end
()
||
!
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
if
(
!
pm
||
pm
==
tuner
||
pm
==
smat
||
must_list
.
find
(
pm
)
!=
must_list
.
end
()
||
!
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
continue
;
continue
;
...
...
scriptlib.h
View file @
b431b512
...
@@ -542,6 +542,7 @@ public:
...
@@ -542,6 +542,7 @@ public:
static
int32
duel_select_fusion_material
(
lua_State
*
L
);
static
int32
duel_select_fusion_material
(
lua_State
*
L
);
static
int32
duel_set_fusion_material
(
lua_State
*
L
);
static
int32
duel_set_fusion_material
(
lua_State
*
L
);
static
int32
duel_set_synchro_material
(
lua_State
*
L
);
static
int32
duel_set_synchro_material
(
lua_State
*
L
);
static
int32
duel_get_synchro_material
(
lua_State
*
L
);
static
int32
duel_select_synchro_material
(
lua_State
*
L
);
static
int32
duel_select_synchro_material
(
lua_State
*
L
);
static
int32
duel_check_synchro_material
(
lua_State
*
L
);
static
int32
duel_check_synchro_material
(
lua_State
*
L
);
static
int32
duel_select_tuner_material
(
lua_State
*
L
);
static
int32
duel_select_tuner_material
(
lua_State
*
L
);
...
...
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