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
eb7e9e8b
Commit
eb7e9e8b
authored
Jul 17, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core
parents
fcce7dc6
cc6a9a5a
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
107 additions
and
91 deletions
+107
-91
card.cpp
card.cpp
+3
-15
effect.cpp
effect.cpp
+2
-0
field.cpp
field.cpp
+27
-24
field.h
field.h
+2
-2
libcard.cpp
libcard.cpp
+62
-39
libgroup.cpp
libgroup.cpp
+2
-2
operations.cpp
operations.cpp
+4
-4
playerop.cpp
playerop.cpp
+5
-5
No files found.
card.cpp
View file @
eb7e9e8b
...
...
@@ -2332,8 +2332,7 @@ int32 card::get_counter(uint16 countertype) {
void
card
::
set_material
(
card_set
*
materials
)
{
if
(
!
materials
)
{
material_cards
.
clear
();
return
;
}
}
else
material_cards
=
*
materials
;
for
(
auto
&
pcard
:
material_cards
)
pcard
->
current
.
reason_card
=
this
;
...
...
@@ -2960,7 +2959,7 @@ void card::get_unique_target(card_set* cset, int32 controler, card* icard) {
const
auto
&
player
=
pduel
->
game_field
->
player
[
controler
^
p
];
if
(
unique_location
&
LOCATION_MZONE
)
{
for
(
auto
&
pcard
:
player
.
list_mzone
)
{
if
(
pcard
&&
(
pcard
!=
icard
)
&&
pcard
->
is_position
(
POS_FACEUP
)
&&
!
pcard
->
get_status
(
STATUS_
BATTLE_DESTROYED
|
STATUS_
SPSUMMON_STEP
)
if
(
pcard
&&
(
pcard
!=
icard
)
&&
pcard
->
is_position
(
POS_FACEUP
)
&&
!
pcard
->
get_status
(
STATUS_SPSUMMON_STEP
)
&&
check_unique_code
(
pcard
))
cset
->
insert
(
pcard
);
}
...
...
@@ -3234,17 +3233,6 @@ int32 card::is_special_summonable(uint8 playerid, uint32 summon_type) {
}
effect_set
eset
;
filter_spsummon_procedure
(
playerid
,
&
eset
,
summon_type
);
pduel
->
game_field
->
core
.
limit_tuner
=
0
;
pduel
->
game_field
->
core
.
limit_syn
=
0
;
pduel
->
game_field
->
core
.
limit_syn_minc
=
0
;
pduel
->
game_field
->
core
.
limit_syn_maxc
=
0
;
pduel
->
game_field
->
core
.
limit_xyz
=
0
;
pduel
->
game_field
->
core
.
limit_xyz_minc
=
0
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
0
;
pduel
->
game_field
->
core
.
limit_link
=
0
;
pduel
->
game_field
->
core
.
limit_link_card
=
0
;
pduel
->
game_field
->
core
.
limit_link_minc
=
0
;
pduel
->
game_field
->
core
.
limit_link_maxc
=
0
;
pduel
->
game_field
->
restore_lp_cost
();
return
eset
.
size
();
}
...
...
effect.cpp
View file @
eb7e9e8b
...
...
@@ -459,6 +459,8 @@ int32 effect::is_target(card* pcard) {
if
(
!
is_flag
(
EFFECT_FLAG_IGNORE_RANGE
))
{
if
(
pcard
->
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
|
STATUS_SPSUMMON_STEP
))
return
FALSE
;
if
(
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
return
FALSE
;
if
(
is_flag
(
EFFECT_FLAG_ABSOLUTE_TARGET
))
{
if
(
pcard
->
current
.
controler
==
0
)
{
if
(
!
pcard
->
current
.
is_location
(
s_range
))
...
...
field.cpp
View file @
eb7e9e8b
...
...
@@ -1348,7 +1348,8 @@ void field::filter_field_effect(uint32 code, effect_set* eset, uint8 sort) {
eset
->
sort
();
}
void
field
::
filter_affected_cards
(
effect
*
peffect
,
card_set
*
cset
)
{
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIONS
)
||
!
(
peffect
->
type
&
EFFECT_TYPE_FIELD
)
||
peffect
->
is_flag
(
EFFECT_FLAG_PLAYER_TARGET
))
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIONS
)
||
!
(
peffect
->
type
&
EFFECT_TYPE_FIELD
)
||
peffect
->
is_flag
(
EFFECT_FLAG_PLAYER_TARGET
|
EFFECT_FLAG_SPSUM_PARAM
))
return
;
uint8
self
=
peffect
->
get_handler_player
();
if
(
self
==
PLAYER_NONE
)
...
...
@@ -1381,7 +1382,7 @@ void field::filter_affected_cards(effect* peffect, card_set* cset) {
}
}
void
field
::
filter_inrange_cards
(
effect
*
peffect
,
card_set
*
cset
)
{
if
(
peffect
->
is_flag
(
EFFECT_FLAG_PLAYER_TARGET
))
if
(
peffect
->
is_flag
(
EFFECT_FLAG_PLAYER_TARGET
|
EFFECT_FLAG_SPSUM_PARAM
))
return
;
uint8
self
=
peffect
->
get_handler_player
();
if
(
self
==
PLAYER_NONE
)
...
...
@@ -1840,12 +1841,12 @@ int32 field::get_draw_count(uint8 playerid) {
}
void
field
::
get_ritual_material
(
uint8
playerid
,
effect
*
peffect
,
card_set
*
material
)
{
for
(
auto
&
pcard
:
player
[
playerid
].
list_mzone
)
{
if
(
pcard
&&
(
pcard
->
get_level
()
||
pcard
->
is_affected_by_effect
(
EFFECT_MINIATURE_GARDEN_GIRL
))
&&
pcard
->
is_affect_by_effect
(
peffect
)
if
(
pcard
&&
pcard
->
is_affect_by_effect
(
peffect
)
&&
pcard
->
is_releasable_by_nonsummon
(
playerid
)
&&
pcard
->
is_releasable_by_effect
(
playerid
,
peffect
))
material
->
insert
(
pcard
);
}
for
(
auto
&
pcard
:
player
[
1
-
playerid
].
list_mzone
)
{
if
(
pcard
&&
(
pcard
->
get_level
()
||
pcard
->
is_affected_by_effect
(
EFFECT_MINIATURE_GARDEN_GIRL
))
&&
pcard
->
is_affect_by_effect
(
peffect
)
if
(
pcard
&&
pcard
->
is_affect_by_effect
(
peffect
)
&&
(
pcard
->
is_affected_by_effect
(
EFFECT_EXTRA_RELEASE
)
||
is_player_affected_by_effect
(
playerid
,
EFFECT_SEA_PULSE
))
&&
pcard
->
is_releasable_by_nonsummon
(
playerid
)
&&
pcard
->
is_releasable_by_effect
(
playerid
,
peffect
))
material
->
insert
(
pcard
);
...
...
@@ -1969,13 +1970,13 @@ void field::adjust_disable_check_list() {
effects
.
disable_check_list
.
pop_front
();
effects
.
disable_check_set
.
erase
(
checking
);
checked
.
insert
(
checking
);
if
(
checking
->
is_status
(
STATUS_TO_ENABLE
|
STATUS_TO_DISABLE
))
if
(
checking
->
is_status
(
STATUS_TO_ENABLE
|
STATUS_TO_DISABLE
))
// prevent loop
continue
;
int32
pre_disable
=
checking
->
get_status
(
STATUS_DISABLED
|
STATUS_FORBIDDEN
);
checking
->
refresh_disable_status
();
int32
new_disable
=
checking
->
get_status
(
STATUS_DISABLED
|
STATUS_FORBIDDEN
);
if
(
pre_disable
!=
new_disable
&&
checking
->
is_status
(
STATUS_EFFECT_ENABLED
))
{
checking
->
filter_disable_related_cards
();
checking
->
filter_disable_related_cards
();
// change effects.disable_check_list
if
(
pre_disable
)
checking
->
set_status
(
STATUS_TO_ENABLE
,
TRUE
);
else
...
...
@@ -2492,10 +2493,12 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
if
(
ptuner
)
{
if
(
ptuner
->
value
)
location
=
ptuner
->
value
;
if
(
ptuner
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
if
(
ptuner
->
s_range
&&
ptuner
->
s_range
>
min
)
min
=
ptuner
->
s_range
;
if
(
ptuner
->
o_range
&&
ptuner
->
o_range
<
max
)
max
=
ptuner
->
o_range
;
}
if
(
min
>
max
)
{
pduel
->
restore_assumes
();
return
FALSE
;
...
...
@@ -2545,7 +2548,7 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
ct
++
;
}
if
(
min
==
0
)
{
if
(
ct
>
0
&&
check_with_sum_limit_m
(
nsyn
,
lv
,
0
,
0
,
0
,
2
))
{
if
(
ct
>
0
&&
check_with_sum_limit_m
(
nsyn
,
lv
,
0
,
0
,
0
,
0xffff
,
2
))
{
pduel
->
restore_assumes
();
return
TRUE
;
}
...
...
@@ -2625,7 +2628,7 @@ int32 field::check_tuner_material(card* pcard, card* tuner, int32 findex1, int32
}
int32
field
::
check_other_synchro_material
(
const
card_vector
&
nsyn
,
int32
lv
,
int32
min
,
int32
max
,
int32
mcount
)
{
if
(
!
(
core
.
global_flag
&
GLOBALFLAG_SCRAP_CHIMERA
))
{
if
(
check_with_sum_limit_m
(
nsyn
,
lv
,
0
,
min
,
max
,
mcount
))
{
if
(
check_with_sum_limit_m
(
nsyn
,
lv
,
0
,
min
,
max
,
0xffff
,
mcount
))
{
return
TRUE
;
}
return
FALSE
;
...
...
@@ -2637,7 +2640,7 @@ int32 field::check_other_synchro_material(const card_vector& nsyn, int32 lv, int
break
;
}
if
(
!
pscrap
)
{
if
(
check_with_sum_limit_m
(
nsyn
,
lv
,
0
,
min
,
max
,
mcount
))
{
if
(
check_with_sum_limit_m
(
nsyn
,
lv
,
0
,
min
,
max
,
0xffff
,
mcount
))
{
return
TRUE
;
}
return
FALSE
;
...
...
@@ -2648,7 +2651,7 @@ int32 field::check_other_synchro_material(const card_vector& nsyn, int32 lv, int
nsyn_filtered
.
push_back
(
pm
);
}
if
(
nsyn_filtered
.
size
()
==
nsyn
.
size
())
{
if
(
check_with_sum_limit_m
(
nsyn
,
lv
,
0
,
min
,
max
,
mcount
))
{
if
(
check_with_sum_limit_m
(
nsyn
,
lv
,
0
,
min
,
max
,
0xffff
,
mcount
))
{
return
TRUE
;
}
}
else
{
...
...
@@ -2657,7 +2660,7 @@ int32 field::check_other_synchro_material(const card_vector& nsyn, int32 lv, int
if
(
pscrap
->
get_value
(
nsyn
[
i
]))
mfiltered
=
false
;
}
if
(
mfiltered
&&
check_with_sum_limit_m
(
nsyn_filtered
,
lv
,
0
,
min
,
max
,
mcount
))
{
if
(
mfiltered
&&
check_with_sum_limit_m
(
nsyn_filtered
,
lv
,
0
,
min
,
max
,
0xffff
,
mcount
))
{
return
TRUE
;
}
for
(
int32
i
=
0
;
i
<
mcount
;
++
i
)
{
...
...
@@ -2670,7 +2673,7 @@ int32 field::check_other_synchro_material(const card_vector& nsyn, int32 lv, int
if
(
!
pm
->
is_affected_by_effect
(
EFFECT_SCRAP_CHIMERA
))
nsyn_removed
.
push_back
(
pm
);
}
if
(
check_with_sum_limit_m
(
nsyn_removed
,
lv
,
0
,
min
,
max
,
mcount
))
{
if
(
check_with_sum_limit_m
(
nsyn_removed
,
lv
,
0
,
min
,
max
,
0xffff
,
mcount
))
{
return
TRUE
;
}
}
...
...
@@ -2711,34 +2714,34 @@ int32 field::check_tribute(card* pcard, int32 min, int32 max, group* mg, uint8 t
return
FALSE
;
return
TRUE
;
}
int32
field
::
check_with_sum_limit
(
const
card_vector
&
mats
,
int32
acc
,
int32
index
,
int32
count
,
int32
min
,
int32
max
)
{
int32
field
::
check_with_sum_limit
(
const
card_vector
&
mats
,
int32
acc
,
int32
index
,
int32
count
,
int32
min
,
int32
max
,
int32
opmin
)
{
if
(
count
>
max
)
return
FALSE
;
while
(
index
<
(
int32
)
mats
.
size
())
{
int32
op1
=
mats
[
index
]
->
sum_param
&
0xffff
;
int32
op2
=
(
mats
[
index
]
->
sum_param
>>
16
)
&
0xffff
;
if
((
op1
==
acc
||
op2
==
acc
)
&&
count
>=
min
)
if
((
(
op1
==
acc
&&
acc
+
opmin
>
op1
)
||
(
op2
&&
op2
==
acc
&&
acc
+
opmin
>
op2
)
)
&&
count
>=
min
)
return
TRUE
;
index
++
;
if
(
acc
>
op1
&&
check_with_sum_limit
(
mats
,
acc
-
op1
,
index
,
count
+
1
,
min
,
max
))
if
(
acc
>
op1
&&
check_with_sum_limit
(
mats
,
acc
-
op1
,
index
,
count
+
1
,
min
,
max
,
std
::
min
(
opmin
,
op1
)
))
return
TRUE
;
if
(
op2
&&
acc
>
op2
&&
check_with_sum_limit
(
mats
,
acc
-
op2
,
index
,
count
+
1
,
min
,
max
))
if
(
op2
&&
acc
>
op2
&&
check_with_sum_limit
(
mats
,
acc
-
op2
,
index
,
count
+
1
,
min
,
max
,
std
::
min
(
opmin
,
op2
)
))
return
TRUE
;
}
return
FALSE
;
}
int32
field
::
check_with_sum_limit_m
(
const
card_vector
&
mats
,
int32
acc
,
int32
index
,
int32
min
,
int32
max
,
int32
must_count
)
{
int32
field
::
check_with_sum_limit_m
(
const
card_vector
&
mats
,
int32
acc
,
int32
index
,
int32
min
,
int32
max
,
int32
opmin
,
int32
must_count
)
{
if
(
acc
==
0
)
return
index
==
must_count
&&
0
>=
min
&&
0
<=
max
;
if
(
index
==
must_count
)
return
check_with_sum_limit
(
mats
,
acc
,
index
,
1
,
min
,
max
);
return
check_with_sum_limit
(
mats
,
acc
,
index
,
1
,
min
,
max
,
opmin
);
if
(
index
>=
(
int32
)
mats
.
size
())
return
FALSE
;
int32
op1
=
mats
[
index
]
->
sum_param
&
0xffff
;
int32
op2
=
(
mats
[
index
]
->
sum_param
>>
16
)
&
0xffff
;
if
(
acc
>=
op1
&&
check_with_sum_limit_m
(
mats
,
acc
-
op1
,
index
+
1
,
min
,
max
,
must_count
))
if
(
acc
>=
op1
&&
check_with_sum_limit_m
(
mats
,
acc
-
op1
,
index
+
1
,
min
,
max
,
std
::
min
(
opmin
,
op1
),
must_count
))
return
TRUE
;
if
(
op2
&&
acc
>=
op2
&&
check_with_sum_limit_m
(
mats
,
acc
-
op2
,
index
+
1
,
min
,
max
,
must_count
))
if
(
op2
&&
acc
>=
op2
&&
check_with_sum_limit_m
(
mats
,
acc
-
op2
,
index
+
1
,
min
,
max
,
std
::
min
(
opmin
,
op2
),
must_count
))
return
TRUE
;
return
FALSE
;
}
...
...
field.h
View file @
eb7e9e8b
...
...
@@ -449,8 +449,8 @@ public:
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_tribute
(
card
*
pcard
,
int32
min
,
int32
max
,
group
*
mg
,
uint8
toplayer
,
uint32
zone
=
0x1f
,
uint32
releasable
=
0xff00ff
,
uint32
pos
=
0x1
);
static
int32
check_with_sum_limit
(
const
card_vector
&
mats
,
int32
acc
,
int32
index
,
int32
count
,
int32
min
,
int32
max
);
static
int32
check_with_sum_limit_m
(
const
card_vector
&
mats
,
int32
acc
,
int32
index
,
int32
min
,
int32
max
,
int32
must_count
);
static
int32
check_with_sum_limit
(
const
card_vector
&
mats
,
int32
acc
,
int32
index
,
int32
count
,
int32
min
,
int32
max
,
int32
opmin
);
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
);
...
...
libcard.cpp
View file @
eb7e9e8b
This diff is collapsed.
Click to expand it.
libgroup.cpp
View file @
eb7e9e8b
...
...
@@ -443,7 +443,7 @@ int32 scriptlib::group_check_with_sum_equal(lua_State *L) {
pduel
->
game_field
->
core
.
must_select_cards
.
clear
();
for
(
auto
&
pcard
:
cv
)
pcard
->
sum_param
=
pduel
->
lua
->
get_operation_value
(
pcard
,
2
,
extraargs
);
lua_pushboolean
(
L
,
field
::
check_with_sum_limit_m
(
cv
,
acc
,
0
,
min
,
max
,
mcount
));
lua_pushboolean
(
L
,
field
::
check_with_sum_limit_m
(
cv
,
acc
,
0
,
min
,
max
,
0xffff
,
mcount
));
return
1
;
}
int32
scriptlib
::
group_select_with_sum_equal
(
lua_State
*
L
)
{
...
...
@@ -474,7 +474,7 @@ int32 scriptlib::group_select_with_sum_equal(lua_State *L) {
cv
.
insert
(
cv
.
end
(),
pduel
->
game_field
->
core
.
select_cards
.
begin
(),
pduel
->
game_field
->
core
.
select_cards
.
end
());
for
(
auto
&
pcard
:
cv
)
pcard
->
sum_param
=
pduel
->
lua
->
get_operation_value
(
pcard
,
3
,
extraargs
);
if
(
!
field
::
check_with_sum_limit_m
(
cv
,
acc
,
0
,
min
,
max
,
mcount
))
{
if
(
!
field
::
check_with_sum_limit_m
(
cv
,
acc
,
0
,
min
,
max
,
0xffff
,
mcount
))
{
pduel
->
game_field
->
core
.
must_select_cards
.
clear
();
group
*
empty_group
=
pduel
->
new_group
();
interpreter
::
group2value
(
L
,
empty_group
);
...
...
operations.cpp
View file @
eb7e9e8b
...
...
@@ -5269,7 +5269,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
case
3
:
{
card
*
tuner
=
core
.
limit_tuner
;
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
)
min
=
ptuner
->
s_range
;
if
(
ptuner
->
o_range
&&
ptuner
->
o_range
<
max
)
...
...
@@ -5298,7 +5298,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
nsyn
.
push_back
(
smat
);
tuner
->
sum_param
=
tuner
->
get_synchro_level
(
pcard
);
smat
->
sum_param
=
smat
->
get_synchro_level
(
pcard
);
if
(
check_with_sum_limit_m
(
nsyn
,
lv
,
0
,
0
,
0
,
2
))
if
(
check_with_sum_limit_m
(
nsyn
,
lv
,
0
,
0
,
0
,
0xffff
,
2
))
core
.
units
.
begin
()
->
step
=
8
;
}
return
FALSE
;
...
...
@@ -5472,8 +5472,8 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
if
(
nsyn
[
i
]
->
is_affected_by_effect
(
EFFECT_SCRAP_CHIMERA
))
mremoved
=
false
;
}
if
(
mfiltered
&&
check_with_sum_limit_m
(
nsyn_filtered
,
lv
,
0
,
min
,
max
,
mcount
))
{
if
(
mremoved
&&
check_with_sum_limit_m
(
nsyn_removed
,
lv
,
0
,
min
,
max
,
mcount
))
{
if
(
mfiltered
&&
check_with_sum_limit_m
(
nsyn_filtered
,
lv
,
0
,
min
,
max
,
0xffff
,
mcount
))
{
if
(
mremoved
&&
check_with_sum_limit_m
(
nsyn_removed
,
lv
,
0
,
min
,
max
,
0xffff
,
mcount
))
{
add_process
(
PROCESSOR_SELECT_YESNO
,
0
,
0
,
0
,
playerid
,
peffect
->
description
);
core
.
units
.
begin
()
->
step
=
9
;
return
FALSE
;
...
...
playerop.cpp
View file @
eb7e9e8b
...
...
@@ -599,15 +599,15 @@ int32 field::select_counter(uint16 step, uint8 playerid, uint16 countertype, uin
}
return
TRUE
;
}
static
int32
select_sum_check1
(
const
int32
*
oparam
,
int32
size
,
int32
index
,
int32
acc
)
{
static
int32
select_sum_check1
(
const
int32
*
oparam
,
int32
size
,
int32
index
,
int32
acc
,
int32
opmin
)
{
if
(
acc
==
0
||
index
==
size
)
return
FALSE
;
int32
o1
=
oparam
[
index
]
&
0xffff
;
int32
o2
=
oparam
[
index
]
>>
16
;
if
(
index
==
size
-
1
)
return
acc
==
o1
||
acc
==
o2
;
return
(
acc
>
o1
&&
select_sum_check1
(
oparam
,
size
,
index
+
1
,
acc
-
o1
))
||
(
o2
>
0
&&
acc
>
o2
&&
select_sum_check1
(
oparam
,
size
,
index
+
1
,
acc
-
o2
));
return
(
acc
==
o1
&&
acc
+
opmin
>
o1
)
||
(
o2
&&
acc
==
o2
&&
acc
+
opmin
>
o2
)
;
return
(
acc
>
o1
&&
select_sum_check1
(
oparam
,
size
,
index
+
1
,
acc
-
o1
,
std
::
min
(
o1
,
opmin
)
))
||
(
o2
>
0
&&
acc
>
o2
&&
select_sum_check1
(
oparam
,
size
,
index
+
1
,
acc
-
o2
,
std
::
min
(
o2
,
opmin
)
));
}
int32
field
::
select_with_sum_limit
(
int16
step
,
uint8
playerid
,
int32
acc
,
int32
min
,
int32
max
)
{
if
(
step
==
0
)
{
...
...
@@ -664,7 +664,7 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
c
[
v
]
=
1
;
oparam
[
i
]
=
core
.
select_cards
[
v
]
->
sum_param
;
}
if
(
!
select_sum_check1
(
oparam
,
returns
.
bvalue
[
0
],
0
,
acc
))
{
if
(
!
select_sum_check1
(
oparam
,
returns
.
bvalue
[
0
],
0
,
acc
,
0xffff
))
{
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
}
...
...
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