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
c4c87b0b
Commit
c4c87b0b
authored
Jun 19, 2025
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e4385b59
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
12 deletions
+5
-12
field.cpp
field.cpp
+1
-1
field.h
field.h
+1
-0
playerop.cpp
playerop.cpp
+3
-11
No files found.
field.cpp
View file @
c4c87b0b
...
@@ -2887,7 +2887,7 @@ int32_t field::check_tribute(card* pcard, int32_t min, int32_t max, group* mg, u
...
@@ -2887,7 +2887,7 @@ int32_t field::check_tribute(card* pcard, int32_t min, int32_t max, group* mg, u
return
FALSE
;
return
FALSE
;
return
TRUE
;
return
TRUE
;
}
}
static
void
get_sum_params
(
uint32_t
sum_param
,
int32_t
&
op1
,
int32_t
&
op2
)
{
void
field
::
get_sum_params
(
uint32_t
sum_param
,
int32_t
&
op1
,
int32_t
&
op2
)
{
op1
=
sum_param
&
0xffff
;
op1
=
sum_param
&
0xffff
;
op2
=
(
sum_param
>>
16
)
&
0xffff
;
op2
=
(
sum_param
>>
16
)
&
0xffff
;
if
(
op2
&
0x8000
)
{
if
(
op2
&
0x8000
)
{
...
...
field.h
View file @
c4c87b0b
...
@@ -474,6 +474,7 @@ public:
...
@@ -474,6 +474,7 @@ public:
int32_t
check_tuner_material
(
lua_State
*
L
,
card
*
pcard
,
card
*
tuner
,
int32_t
findex1
,
int32_t
findex2
,
int32_t
min
,
int32_t
max
,
card
*
smat
,
group
*
mg
);
int32_t
check_tuner_material
(
lua_State
*
L
,
card
*
pcard
,
card
*
tuner
,
int32_t
findex1
,
int32_t
findex2
,
int32_t
min
,
int32_t
max
,
card
*
smat
,
group
*
mg
);
int32_t
check_other_synchro_material
(
const
card_vector
&
nsyn
,
int32_t
lv
,
int32_t
min
,
int32_t
max
,
int32_t
mcount
);
int32_t
check_other_synchro_material
(
const
card_vector
&
nsyn
,
int32_t
lv
,
int32_t
min
,
int32_t
max
,
int32_t
mcount
);
int32_t
check_tribute
(
card
*
pcard
,
int32_t
min
,
int32_t
max
,
group
*
mg
,
uint8_t
toplayer
,
uint32_t
zone
=
0x1f
,
uint32_t
releasable
=
0xff00ff
,
uint32_t
pos
=
0x1
);
int32_t
check_tribute
(
card
*
pcard
,
int32_t
min
,
int32_t
max
,
group
*
mg
,
uint8_t
toplayer
,
uint32_t
zone
=
0x1f
,
uint32_t
releasable
=
0xff00ff
,
uint32_t
pos
=
0x1
);
static
void
get_sum_params
(
uint32_t
sum_param
,
int32_t
&
op1
,
int32_t
&
op2
);
static
int32_t
check_with_sum_limit
(
const
card_vector
&
mats
,
int32_t
acc
,
int32_t
index
,
int32_t
count
,
int32_t
min
,
int32_t
max
,
int32_t
opmin
);
static
int32_t
check_with_sum_limit
(
const
card_vector
&
mats
,
int32_t
acc
,
int32_t
index
,
int32_t
count
,
int32_t
min
,
int32_t
max
,
int32_t
opmin
);
static
int32_t
check_with_sum_limit_m
(
const
card_vector
&
mats
,
int32_t
acc
,
int32_t
index
,
int32_t
min
,
int32_t
max
,
int32_t
opmin
,
int32_t
must_count
);
static
int32_t
check_with_sum_limit_m
(
const
card_vector
&
mats
,
int32_t
acc
,
int32_t
index
,
int32_t
min
,
int32_t
max
,
int32_t
opmin
,
int32_t
must_count
);
static
int32_t
check_with_sum_greater_limit
(
const
card_vector
&
mats
,
int32_t
acc
,
int32_t
index
,
int32_t
opmin
);
static
int32_t
check_with_sum_greater_limit
(
const
card_vector
&
mats
,
int32_t
acc
,
int32_t
index
,
int32_t
opmin
);
...
...
playerop.cpp
View file @
c4c87b0b
...
@@ -630,19 +630,11 @@ int32_t field::select_counter(uint16_t step, uint8_t playerid, uint16_t countert
...
@@ -630,19 +630,11 @@ int32_t field::select_counter(uint16_t step, uint8_t playerid, uint16_t countert
}
}
return
TRUE
;
return
TRUE
;
}
}
static
void
get_sum_params
(
uint32_t
sum_param
,
int32_t
&
op1
,
int32_t
&
op2
)
{
op1
=
sum_param
&
0xffff
;
op2
=
(
sum_param
>>
16
)
&
0xffff
;
if
(
op2
&
0x8000
)
{
op1
=
sum_param
&
0x7fffffff
;
op2
=
0
;
}
}
static
int32_t
select_sum_check1
(
const
uint32_t
*
oparam
,
int32_t
size
,
int32_t
index
,
int32_t
acc
,
int32_t
opmin
)
{
static
int32_t
select_sum_check1
(
const
uint32_t
*
oparam
,
int32_t
size
,
int32_t
index
,
int32_t
acc
,
int32_t
opmin
)
{
if
(
acc
==
0
||
index
==
size
)
if
(
acc
==
0
||
index
==
size
)
return
FALSE
;
return
FALSE
;
int32_t
o1
,
o2
;
int32_t
o1
,
o2
;
get_sum_params
(
oparam
[
index
],
o1
,
o2
);
field
::
get_sum_params
(
oparam
[
index
],
o1
,
o2
);
if
(
index
==
size
-
1
)
if
(
index
==
size
-
1
)
return
(
acc
==
o1
&&
acc
+
opmin
>
o1
)
||
(
o2
&&
acc
==
o2
&&
acc
+
opmin
>
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
)))
return
(
acc
>
o1
&&
select_sum_check1
(
oparam
,
size
,
index
+
1
,
acc
-
o1
,
std
::
min
(
o1
,
opmin
)))
...
@@ -720,7 +712,7 @@ int32_t field::select_with_sum_limit(int16_t step, uint8_t playerid, int32_t acc
...
@@ -720,7 +712,7 @@ int32_t field::select_with_sum_limit(int16_t step, uint8_t playerid, int32_t acc
int32_t
sum
=
0
,
mx
=
0
,
mn
=
0x7fffffff
;
int32_t
sum
=
0
,
mx
=
0
,
mn
=
0x7fffffff
;
for
(
int32_t
i
=
0
;
i
<
mcount
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
mcount
;
++
i
)
{
int32_t
o1
,
o2
;
int32_t
o1
,
o2
;
get_sum_params
(
core
.
must_select_cards
[
i
]
->
sum_param
,
o1
,
o2
);
field
::
get_sum_params
(
core
.
must_select_cards
[
i
]
->
sum_param
,
o1
,
o2
);
int32_t
ms
=
(
o2
&&
o2
<
o1
)
?
o2
:
o1
;
int32_t
ms
=
(
o2
&&
o2
<
o1
)
?
o2
:
o1
;
sum
+=
ms
;
sum
+=
ms
;
mx
+=
std
::
max
(
o1
,
o2
);
mx
+=
std
::
max
(
o1
,
o2
);
...
@@ -736,7 +728,7 @@ int32_t field::select_with_sum_limit(int16_t step, uint8_t playerid, int32_t acc
...
@@ -736,7 +728,7 @@ int32_t field::select_with_sum_limit(int16_t step, uint8_t playerid, int32_t acc
}
}
c
.
insert
(
v
);
c
.
insert
(
v
);
int32_t
o1
,
o2
;
int32_t
o1
,
o2
;
get_sum_params
(
core
.
select_cards
[
v
]
->
sum_param
,
o1
,
o2
);
field
::
get_sum_params
(
core
.
select_cards
[
v
]
->
sum_param
,
o1
,
o2
);
int32_t
ms
=
(
o2
&&
o2
<
o1
)
?
o2
:
o1
;
int32_t
ms
=
(
o2
&&
o2
<
o1
)
?
o2
:
o1
;
sum
+=
ms
;
sum
+=
ms
;
mx
+=
std
::
max
(
o1
,
o2
);
mx
+=
std
::
max
(
o1
,
o2
);
...
...
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