Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
eff85782
Commit
eff85782
authored
Jul 09, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
04bd958a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
ocgcore/field.cpp
ocgcore/field.cpp
+4
-3
ocgcore/operations.cpp
ocgcore/operations.cpp
+17
-12
No files found.
ocgcore/field.cpp
View file @
eff85782
...
@@ -1310,9 +1310,10 @@ void field::get_xyz_material(card* scard, int32 findex, uint32 lv, int32 maxc) {
...
@@ -1310,9 +1310,10 @@ void field::get_xyz_material(card* scard, int32 findex, uint32 lv, int32 maxc) {
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
((
xyz_level
>>
12
)
&
0xf
,
pcard
));
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
((
xyz_level
>>
12
)
&
0xf
,
pcard
));
}
}
if
(
core
.
global_flag
&
GLOBALFLAG_XMAT_COUNT_LIMIT
)
{
if
(
core
.
global_flag
&
GLOBALFLAG_XMAT_COUNT_LIMIT
)
{
auto
iter
=
core
.
xmaterial_lst
.
begin
();
if
(
maxc
>
(
int32
)
core
.
xmaterial_lst
.
size
())
while
((
iter
!=
core
.
xmaterial_lst
.
end
())
&&
((
iter
->
first
>
(
int32
)
core
.
xmaterial_lst
.
size
())
||
(
iter
->
first
>
maxc
)))
maxc
=
(
int32
)
core
.
xmaterial_lst
.
size
();
core
.
xmaterial_lst
.
erase
(
iter
++
);
auto
iter
=
core
.
xmaterial_lst
.
lower_bound
(
maxc
);
core
.
xmaterial_lst
.
erase
(
core
.
xmaterial_lst
.
begin
(),
iter
);
}
}
}
}
void
field
::
get_overlay_group
(
uint8
self
,
uint8
s
,
uint8
o
,
card_set
*
pset
)
{
void
field
::
get_overlay_group
(
uint8
self
,
uint8
s
,
uint8
o
,
card_set
*
pset
)
{
...
...
ocgcore/operations.cpp
View file @
eff85782
...
@@ -4305,28 +4305,31 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -4305,28 +4305,31 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
513
);
pduel
->
write_buffer32
(
513
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
0x10001
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
min
+
(
min
<<
16
)
);
return
FALSE
;
return
FALSE
;
}
}
case
3
:
{
case
3
:
{
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
1
]];
core
.
operated_set
.
insert
(
pcard
);
int32
pv
=
0
;
int32
pv
=
0
;
for
(
auto
iter
=
core
.
xmaterial_lst
.
begin
();
iter
!=
core
.
xmaterial_lst
.
end
();
++
iter
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
if
(
iter
->
second
==
pcard
)
{
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
pv
=
iter
->
first
;
core
.
operated_set
.
insert
(
pcard
);
core
.
xmaterial_lst
.
erase
(
iter
);
for
(
auto
iter
=
core
.
xmaterial_lst
.
begin
();
iter
!=
core
.
xmaterial_lst
.
end
();
++
iter
)
{
break
;
if
(
iter
->
second
==
pcard
)
{
if
(
pv
<
iter
->
first
)
pv
=
iter
->
first
;
core
.
xmaterial_lst
.
erase
(
iter
);
break
;
}
}
}
}
}
min
--
;
max
-=
returns
.
bvalue
[
0
];
max
--
;
if
(
max
==
0
||
core
.
xmaterial_lst
.
size
()
==
0
)
{
if
(
max
==
0
||
core
.
xmaterial_lst
.
size
()
==
0
)
{
group
*
pgroup
=
pduel
->
new_group
(
core
.
operated_set
);
group
*
pgroup
=
pduel
->
new_group
(
core
.
operated_set
);
pduel
->
lua
->
add_param
(
pgroup
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
pgroup
,
PARAM_TYPE_GROUP
);
return
TRUE
;
return
TRUE
;
}
}
if
(
min
+
(
int32
)
core
.
operated_set
.
size
()
<
pv
)
min
=
0
;
if
((
int32
)
core
.
operated_set
.
size
()
<
pv
)
min
=
pv
-
core
.
operated_set
.
size
();
min
=
pv
-
core
.
operated_set
.
size
();
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
core
.
units
.
begin
()
->
arg2
=
min
+
(
max
<<
16
);
if
(
min
==
0
)
{
if
(
min
==
0
)
{
...
@@ -4350,10 +4353,12 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -4350,10 +4353,12 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
513
);
pduel
->
write_buffer32
(
513
);
if
(
min
==
0
)
min
=
1
;
if
(
min
+
(
int32
)
core
.
operated_set
.
size
()
>=
maxv
)
if
(
min
+
(
int32
)
core
.
operated_set
.
size
()
>=
maxv
)
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
min
+
(
max
<<
16
));
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
min
+
(
max
<<
16
));
else
{
else
{
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
0x10001
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
min
+
(
min
<<
16
)
);
core
.
units
.
begin
()
->
step
=
2
;
core
.
units
.
begin
()
->
step
=
2
;
}
}
return
FALSE
;
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