Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
Commits
d15cdb16
Commit
d15cdb16
authored
Dec 28, 2016
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix CheckSelectSum()
parent
75068c1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
gframe/client_field.cpp
gframe/client_field.cpp
+17
-14
ocgcore
ocgcore
+1
-1
script
script
+1
-1
No files found.
gframe/client_field.cpp
View file @
d15cdb16
...
...
@@ -1207,28 +1207,31 @@ bool ClientField::CheckSelectSum() {
}
return
ret
;
}
else
{
int
op1
,
op2
,
mm
=
-
1
,
ms
,
m
,
max
=
0
,
sumc
=
0
,
sums
;
int
mm
=
-
1
,
mx
=
-
1
,
max
=
0
,
sumc
=
0
;
bool
ret
=
false
;
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
{
op1
=
selected_cards
[
i
]
->
opParam
&
0xffff
;
op2
=
selected_cards
[
i
]
->
opParam
>>
16
;
m
=
(
op2
>
0
&&
op1
>
op2
)
?
op2
:
op1
;
max
+=
op2
>
op1
?
op2
:
op1
;
if
(
mm
==
-
1
||
m
<
mm
)
mm
=
m
;
sumc
+=
m
;
int
op1
=
selected_cards
[
i
]
->
opParam
&
0xffff
;
int
op2
=
selected_cards
[
i
]
->
opParam
>>
16
;
int
opmin
=
(
op2
>
0
&&
op1
>
op2
)
?
op2
:
op1
;
int
opmax
=
op2
>
op1
?
op2
:
op1
;
if
(
mm
==
-
1
||
opmin
<
mm
)
mm
=
opmin
;
if
(
mx
==
-
1
||
opmax
<
mx
)
mx
=
opmax
;
sumc
+=
opmin
;
max
+=
opmax
;
}
if
(
select_sumval
<=
sumc
)
return
true
;
if
(
select_sumval
<=
max
)
if
(
select_sumval
<=
max
&&
select_sumval
>
max
-
mx
)
ret
=
true
;
for
(
sit
=
selable
.
begin
();
sit
!=
selable
.
end
();
++
sit
)
{
op1
=
(
*
sit
)
->
opParam
&
0xffff
;
op2
=
(
*
sit
)
->
opParam
>>
16
;
m
=
op1
;
sums
=
sumc
;
int
op1
=
(
*
sit
)
->
opParam
&
0xffff
;
int
op2
=
(
*
sit
)
->
opParam
>>
16
;
int
m
=
op1
;
int
sums
=
sumc
;
sums
+=
m
;
ms
=
mm
;
int
ms
=
mm
;
if
(
ms
==
-
1
||
m
<
ms
)
ms
=
m
;
if
(
sums
>=
select_sumval
)
{
...
...
ocgcore
@
f524c6bf
Subproject commit
96bbbedb6e828f4a227cf5405ed8e284b0def2cc
Subproject commit
f524c6bfe7055405efba5ea98ac8bc688b1ecad4
script
@
83adfae3
Subproject commit
5485784eac297306878f20f2c6cd4a0a51698653
Subproject commit
83adfae3f0e9da818082db24e055a6077d8b7c6b
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