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
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
MyCard
ygopro-core
Commits
24b2e755
Commit
24b2e755
authored
Jul 12, 2020
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_FLAG_SPSUM_PARAM for unusual usage of target_range
in EFFECT_TUNER_MATERIAL_LIMIT and EFFECT_HAND_SYNCHRO
parent
9f6248b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
17 deletions
+25
-17
field.cpp
field.cpp
+6
-4
libcard.cpp
libcard.cpp
+18
-12
operations.cpp
operations.cpp
+1
-1
No files found.
field.cpp
View file @
24b2e755
...
@@ -2457,10 +2457,12 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
...
@@ -2457,10 +2457,12 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
if
(
ptuner
)
{
if
(
ptuner
)
{
if
(
ptuner
->
value
)
if
(
ptuner
->
value
)
location
=
ptuner
->
value
;
location
=
ptuner
->
value
;
if
(
ptuner
->
s_range
&&
ptuner
->
s_range
>
min
)
if
(
ptuner
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
min
=
ptuner
->
s_range
;
if
(
ptuner
->
s_range
&&
ptuner
->
s_range
>
min
)
if
(
ptuner
->
o_range
&&
ptuner
->
o_range
<
max
)
min
=
ptuner
->
s_range
;
max
=
ptuner
->
o_range
;
if
(
ptuner
->
o_range
&&
ptuner
->
o_range
<
max
)
max
=
ptuner
->
o_range
;
}
if
(
min
>
max
)
{
if
(
min
>
max
)
{
pduel
->
restore_assumes
();
pduel
->
restore_assumes
();
return
FALSE
;
return
FALSE
;
...
...
libcard.cpp
View file @
24b2e755
...
@@ -1569,10 +1569,12 @@ int32 scriptlib::card_get_tuner_limit(lua_State *L) {
...
@@ -1569,10 +1569,12 @@ int32 scriptlib::card_get_tuner_limit(lua_State *L) {
lua_pushnil
(
L
);
lua_pushnil
(
L
);
uint16
min
=
0
;
uint16
min
=
0
;
uint16
max
=
99
;
uint16
max
=
99
;
if
(
peffect
->
s_range
&&
peffect
->
s_range
>
min
)
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
min
=
peffect
->
s_range
;
if
(
peffect
->
s_range
&&
peffect
->
s_range
>
min
)
if
(
peffect
->
o_range
&&
peffect
->
o_range
<
max
)
min
=
peffect
->
s_range
;
max
=
peffect
->
o_range
;
if
(
peffect
->
o_range
&&
peffect
->
o_range
<
max
)
max
=
peffect
->
o_range
;
}
lua_pushinteger
(
L
,
min
);
lua_pushinteger
(
L
,
min
);
lua_pushinteger
(
L
,
max
);
lua_pushinteger
(
L
,
max
);
return
5
;
return
5
;
...
@@ -1594,10 +1596,12 @@ int32 scriptlib::card_get_hand_synchro(lua_State *L) {
...
@@ -1594,10 +1596,12 @@ int32 scriptlib::card_get_hand_synchro(lua_State *L) {
lua_pushnil
(
L
);
lua_pushnil
(
L
);
uint16
min
=
0
;
uint16
min
=
0
;
uint16
max
=
99
;
uint16
max
=
99
;
if
(
peffect
->
s_range
&&
peffect
->
s_range
>
min
)
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
min
=
peffect
->
s_range
;
if
(
peffect
->
s_range
&&
peffect
->
s_range
>
min
)
if
(
peffect
->
o_range
&&
peffect
->
o_range
<
max
)
min
=
peffect
->
s_range
;
max
=
peffect
->
o_range
;
if
(
peffect
->
o_range
&&
peffect
->
o_range
<
max
)
max
=
peffect
->
o_range
;
}
lua_pushinteger
(
L
,
min
);
lua_pushinteger
(
L
,
min
);
lua_pushinteger
(
L
,
max
);
lua_pushinteger
(
L
,
max
);
return
4
;
return
4
;
...
@@ -1611,10 +1615,12 @@ int32 scriptlib::card_get_hand_synchro(lua_State *L) {
...
@@ -1611,10 +1615,12 @@ int32 scriptlib::card_get_hand_synchro(lua_State *L) {
lua_pushnil
(
L
);
lua_pushnil
(
L
);
uint16
min
=
0
;
uint16
min
=
0
;
uint16
max
=
99
;
uint16
max
=
99
;
if
(
peffect
->
s_range
&&
peffect
->
s_range
>
min
)
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
min
=
peffect
->
s_range
;
if
(
peffect
->
s_range
&&
peffect
->
s_range
>
min
)
if
(
peffect
->
o_range
&&
peffect
->
o_range
<
max
)
min
=
peffect
->
s_range
;
max
=
peffect
->
o_range
;
if
(
peffect
->
o_range
&&
peffect
->
o_range
<
max
)
max
=
peffect
->
o_range
;
}
lua_pushinteger
(
L
,
min
);
lua_pushinteger
(
L
,
min
);
lua_pushinteger
(
L
,
max
);
lua_pushinteger
(
L
,
max
);
return
4
;
return
4
;
...
...
operations.cpp
View file @
24b2e755
...
@@ -5213,7 +5213,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
...
@@ -5213,7 +5213,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
case
3
:
{
case
3
:
{
card
*
tuner
=
core
.
limit_tuner
;
card
*
tuner
=
core
.
limit_tuner
;
effect
*
ptuner
=
tuner
->
is_affected_by_effect
(
EFFECT_TUNER_MATERIAL_LIMIT
);
effect
*
ptuner
=
tuner
->
is_affected_by_effect
(
EFFECT_TUNER_MATERIAL_LIMIT
);
if
(
ptuner
)
{
if
(
ptuner
&&
ptuner
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
)
)
{
if
(
ptuner
->
s_range
&&
ptuner
->
s_range
>
min
)
if
(
ptuner
->
s_range
&&
ptuner
->
s_range
>
min
)
min
=
ptuner
->
s_range
;
min
=
ptuner
->
s_range
;
if
(
ptuner
->
o_range
&&
ptuner
->
o_range
<
max
)
if
(
ptuner
->
o_range
&&
ptuner
->
o_range
<
max
)
...
...
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