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
1db16596
Commit
1db16596
authored
Apr 10, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_TUNER_MATERIAL_LIMIT
parent
ff62da1f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
222 additions
and
144 deletions
+222
-144
effect.h
effect.h
+1
-0
field.cpp
field.cpp
+170
-124
operations.cpp
operations.cpp
+51
-20
No files found.
effect.h
View file @
1db16596
...
@@ -415,6 +415,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
...
@@ -415,6 +415,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
//#define EFFECT_REMOVE_FUSION_ATTRIBUTE 350
//#define EFFECT_REMOVE_FUSION_ATTRIBUTE 350
#define EFFECT_CHANGE_FUSION_ATTRIBUTE 351
#define EFFECT_CHANGE_FUSION_ATTRIBUTE 351
#define EFFECT_EXTRA_FUSION_MATERIAL 352
#define EFFECT_EXTRA_FUSION_MATERIAL 352
#define EFFECT_TUNER_MATERIAL_LIMIT 353
#define EVENT_STARTUP 1000
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
#define EVENT_FLIP 1001
...
...
field.cpp
View file @
1db16596
This diff is collapsed.
Click to expand it.
operations.cpp
View file @
1db16596
...
@@ -4602,9 +4602,21 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
...
@@ -4602,9 +4602,21 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
return
FALSE
;
return
FALSE
;
}
}
case
4
:
{
case
4
:
{
card
*
tuner
=
core
.
limit_tuner
;
int32
playerid
=
pcard
->
current
.
controler
;
//int32 ct = get_useable_count(pcard, playerid, LOCATION_MZONE, playerid, LOCATION_REASON_TOFIELD);
int32
location
=
LOCATION_MZONE
;
effect
*
ptuner
=
tuner
->
is_affected_by_effect
(
EFFECT_TUNER_MATERIAL_LIMIT
);
if
(
ptuner
)
{
if
(
ptuner
->
value
)
location
=
ptuner
->
value
;
if
(
ptuner
->
s_range
&&
ptuner
->
s_range
>
min
)
min
=
ptuner
->
s_range
;
if
(
ptuner
->
o_range
&&
ptuner
->
o_range
<
max
)
max
=
ptuner
->
o_range
;
}
int32
lv
=
pcard
->
get_level
();
int32
lv
=
pcard
->
get_level
();
int32
mcount
=
1
;
int32
mcount
=
1
;
card
*
tuner
=
core
.
limit_tuner
;
effect
*
pcheck
=
tuner
->
is_affected_by_effect
(
EFFECT_SYNCHRO_CHECK
);
effect
*
pcheck
=
tuner
->
is_affected_by_effect
(
EFFECT_SYNCHRO_CHECK
);
core
.
must_select_cards
.
clear
();
core
.
must_select_cards
.
clear
();
core
.
must_select_cards
.
push_back
(
tuner
);
core
.
must_select_cards
.
push_back
(
tuner
);
...
@@ -4620,30 +4632,49 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
...
@@ -4620,30 +4632,49 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
if
(
mg
)
{
if
(
mg
)
{
for
(
auto
cit
=
mg
->
container
.
begin
();
cit
!=
mg
->
container
.
end
();
++
cit
)
{
for
(
auto
cit
=
mg
->
container
.
begin
();
cit
!=
mg
->
container
.
end
();
++
cit
)
{
card
*
pm
=
*
cit
;
card
*
pm
=
*
cit
;
if
(
pm
!=
tuner
&&
pm
!=
smat
&&
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
{
if
(
pm
==
tuner
||
pm
==
smat
||
!
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
if
(
pcheck
)
continue
;
pcheck
->
get_value
(
pm
);
if
(
ptuner
&&
ptuner
->
target
)
{
if
(
pm
->
current
.
location
==
LOCATION_MZONE
&&
!
pm
->
is_position
(
POS_FACEUP
))
pduel
->
lua
->
add_param
(
ptuner
,
PARAM_TYPE_EFFECT
);
continue
;
pduel
->
lua
->
add_param
(
pm
,
PARAM_TYPE_CARD
)
;
if
(
!
pduel
->
lua
->
check_matching
(
pm
,
-
1
,
0
))
if
(
!
pduel
->
lua
->
get_function_value
(
ptuner
->
target
,
2
))
continue
;
continue
;
core
.
select_cards
.
push_back
(
pm
);
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
}
}
if
(
pcheck
)
pcheck
->
get_value
(
pm
);
if
(
pm
->
current
.
location
==
LOCATION_MZONE
&&
!
pm
->
is_position
(
POS_FACEUP
))
continue
;
if
(
!
pduel
->
lua
->
check_matching
(
pm
,
-
1
,
0
))
continue
;
core
.
select_cards
.
push_back
(
pm
);
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
}
}
}
else
{
}
else
{
for
(
uint8
np
=
0
;
np
<
2
;
++
np
)
{
card_vector
cv
;
for
(
auto
cit
=
player
[
np
].
list_mzone
.
begin
();
cit
!=
player
[
np
].
list_mzone
.
end
();
++
cit
)
{
if
(
location
&
LOCATION_MZONE
)
{
card
*
pm
=
*
cit
;
cv
.
insert
(
cv
.
end
(),
player
[
0
].
list_mzone
.
begin
(),
player
[
0
].
list_mzone
.
end
());
if
(
pm
&&
pm
!=
tuner
&&
pm
!=
smat
&&
pm
->
is_position
(
POS_FACEUP
)
&&
pm
->
is_can_be_synchro_material
(
pcard
,
tuner
))
{
cv
.
insert
(
cv
.
end
(),
player
[
1
].
list_mzone
.
begin
(),
player
[
1
].
list_mzone
.
end
());
if
(
pcheck
)
}
pcheck
->
get_value
(
pm
);
if
(
location
&
LOCATION_HAND
)
if
(
!
pduel
->
lua
->
check_matching
(
pm
,
-
1
,
0
))
cv
.
insert
(
cv
.
end
(),
player
[
playerid
].
list_hand
.
begin
(),
player
[
playerid
].
list_hand
.
end
());
continue
;
for
(
auto
cit
=
cv
.
begin
();
cit
!=
cv
.
end
();
++
cit
)
{
core
.
select_cards
.
push_back
(
pm
);
card
*
pm
=
*
cit
;
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
if
(
!
pm
||
pm
==
tuner
||
pm
==
smat
||
!
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
))
continue
;
}
}
if
(
pcheck
)
pcheck
->
get_value
(
pm
);
if
(
pm
->
current
.
location
==
LOCATION_MZONE
&&
!
pm
->
is_position
(
POS_FACEUP
))
continue
;
if
(
!
pduel
->
lua
->
check_matching
(
pm
,
-
1
,
0
))
continue
;
core
.
select_cards
.
push_back
(
pm
);
pm
->
sum_param
=
pm
->
get_synchro_level
(
pcard
);
}
}
}
}
if
(
core
.
global_flag
&
GLOBALFLAG_SCRAP_CHIMERA
)
{
if
(
core
.
global_flag
&
GLOBALFLAG_SCRAP_CHIMERA
)
{
...
...
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