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
b889a23c
Commit
b889a23c
authored
Apr 07, 2021
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove PROCESSOR_CONTROL_ADJUST
parent
45b84dfc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
142 deletions
+1
-142
field.h
field.h
+1
-2
operations.cpp
operations.cpp
+0
-133
processor.cpp
processor.cpp
+0
-7
No files found.
field.h
View file @
b889a23c
...
@@ -595,7 +595,6 @@ public:
...
@@ -595,7 +595,6 @@ public:
int32
remove_overlay_card
(
uint16
step
,
uint32
reason
,
card
*
pcard
,
uint8
rplayer
,
uint8
s
,
uint8
o
,
uint16
min
,
uint16
max
);
int32
remove_overlay_card
(
uint16
step
,
uint32
reason
,
card
*
pcard
,
uint8
rplayer
,
uint8
s
,
uint8
o
,
uint16
min
,
uint16
max
);
int32
get_control
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets
,
uint8
playerid
,
uint16
reset_phase
,
uint8
reset_count
,
uint32
zone
);
int32
get_control
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets
,
uint8
playerid
,
uint16
reset_phase
,
uint8
reset_count
,
uint32
zone
);
int32
swap_control
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets1
,
group
*
targets2
,
uint16
reset_phase
,
uint8
reset_count
);
int32
swap_control
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets1
,
group
*
targets2
,
uint16
reset_phase
,
uint8
reset_count
);
int32
control_adjust
(
uint16
step
);
int32
self_destroy
(
uint16
step
,
card
*
ucard
,
int32
p
);
int32
self_destroy
(
uint16
step
,
card
*
ucard
,
int32
p
);
int32
trap_monster_adjust
(
uint16
step
);
int32
trap_monster_adjust
(
uint16
step
);
int32
equip
(
uint16
step
,
uint8
equip_player
,
card
*
equip_card
,
card
*
target
,
uint32
up
,
uint32
is_step
);
int32
equip
(
uint16
step
,
uint8
equip_player
,
card
*
equip_card
,
card
*
target
,
uint32
up
,
uint32
is_step
);
...
@@ -787,7 +786,7 @@ public:
...
@@ -787,7 +786,7 @@ public:
#define PROCESSOR_EQUIP 73
#define PROCESSOR_EQUIP 73
#define PROCESSOR_GET_CONTROL 74
#define PROCESSOR_GET_CONTROL 74
#define PROCESSOR_SWAP_CONTROL 75
#define PROCESSOR_SWAP_CONTROL 75
#define PROCESSOR_CONTROL_ADJUST 76
//
#define PROCESSOR_CONTROL_ADJUST 76
#define PROCESSOR_SELF_DESTROY 77
#define PROCESSOR_SELF_DESTROY 77
#define PROCESSOR_TRAP_MONSTER_ADJUST 78
#define PROCESSOR_TRAP_MONSTER_ADJUST 78
#define PROCESSOR_PAY_LPCOST 80
#define PROCESSOR_PAY_LPCOST 80
...
...
operations.cpp
View file @
b889a23c
...
@@ -1119,139 +1119,6 @@ int32 field::swap_control(uint16 step, effect* reason_effect, uint8 reason_playe
...
@@ -1119,139 +1119,6 @@ int32 field::swap_control(uint16 step, effect* reason_effect, uint8 reason_playe
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
control_adjust
(
uint16
step
)
{
switch
(
step
)
{
case
0
:
{
card_set
*
destroy_set
=
new
card_set
;
core
.
units
.
begin
()
->
peffect
=
(
effect
*
)
destroy_set
;
uint32
b0
=
get_useable_count
(
NULL
,
0
,
LOCATION_MZONE
,
0
,
LOCATION_REASON_CONTROL
);
uint32
b1
=
get_useable_count
(
NULL
,
1
,
LOCATION_MZONE
,
1
,
LOCATION_REASON_CONTROL
);
for
(
auto
&
pcard
:
core
.
control_adjust_set
[
0
])
pcard
->
filter_disable_related_cards
();
for
(
auto
&
pcard
:
core
.
control_adjust_set
[
1
])
pcard
->
filter_disable_related_cards
();
if
(
core
.
control_adjust_set
[
0
].
size
()
>
core
.
control_adjust_set
[
1
].
size
())
{
if
(
core
.
control_adjust_set
[
0
].
size
()
-
core
.
control_adjust_set
[
1
].
size
()
>
b1
)
{
if
(
core
.
control_adjust_set
[
1
].
size
()
==
0
&&
b1
==
0
)
{
destroy_set
->
swap
(
core
.
control_adjust_set
[
0
]);
core
.
units
.
begin
()
->
step
=
4
;
}
else
{
core
.
units
.
begin
()
->
arg1
=
0
;
uint32
count
=
(
uint32
)
core
.
control_adjust_set
[
0
].
size
()
-
(
uint32
)
core
.
control_adjust_set
[
1
].
size
()
-
b1
;
core
.
select_cards
.
clear
();
for
(
auto
&
pcard
:
core
.
control_adjust_set
[
0
])
core
.
select_cards
.
push_back
(
pcard
);
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
infos
.
turn_player
);
pduel
->
write_buffer32
(
502
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
1
,
count
+
(
count
<<
16
));
}
}
else
core
.
units
.
begin
()
->
step
=
1
;
}
else
if
(
core
.
control_adjust_set
[
0
].
size
()
<
core
.
control_adjust_set
[
1
].
size
())
{
if
(
core
.
control_adjust_set
[
1
].
size
()
-
core
.
control_adjust_set
[
0
].
size
()
>
b0
)
{
if
(
core
.
control_adjust_set
[
0
].
size
()
==
0
&&
b0
==
0
)
{
destroy_set
->
swap
(
core
.
control_adjust_set
[
1
]);
core
.
units
.
begin
()
->
step
=
4
;
}
else
{
core
.
units
.
begin
()
->
arg1
=
1
;
uint32
count
=
(
uint32
)
core
.
control_adjust_set
[
1
].
size
()
-
(
uint32
)
core
.
control_adjust_set
[
0
].
size
()
-
b0
;
core
.
select_cards
.
clear
();
for
(
auto
&
pcard
:
core
.
control_adjust_set
[
1
])
core
.
select_cards
.
push_back
(
pcard
);
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
infos
.
turn_player
);
pduel
->
write_buffer32
(
502
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
0
,
count
+
(
count
<<
16
));
}
}
else
core
.
units
.
begin
()
->
step
=
1
;
}
else
core
.
units
.
begin
()
->
step
=
1
;
return
FALSE
;
}
case
1
:
{
card_set
*
destroy_set
=
(
card_set
*
)
core
.
units
.
begin
()
->
peffect
;
int32
adjp
=
(
int32
)
core
.
units
.
begin
()
->
arg1
;
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
destroy_set
->
insert
(
pcard
);
core
.
control_adjust_set
[
adjp
].
erase
(
pcard
);
}
return
FALSE
;
}
case
2
:
{
for
(
auto
&
pcard
:
core
.
control_adjust_set
[
0
])
{
if
(
pcard
->
unique_code
&&
(
pcard
->
unique_location
&
LOCATION_MZONE
))
remove_unique_card
(
pcard
);
}
for
(
auto
&
pcard
:
core
.
control_adjust_set
[
1
])
{
if
(
pcard
->
unique_code
&&
(
pcard
->
unique_location
&
LOCATION_MZONE
))
remove_unique_card
(
pcard
);
}
auto
cit1
=
core
.
control_adjust_set
[
0
].
begin
();
auto
cit2
=
core
.
control_adjust_set
[
1
].
begin
();
while
(
cit1
!=
core
.
control_adjust_set
[
0
].
end
()
&&
cit2
!=
core
.
control_adjust_set
[
1
].
end
())
{
card
*
pcard1
=
*
cit1
++
;
card
*
pcard2
=
*
cit2
++
;
swap_card
(
pcard1
,
pcard2
);
pcard1
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
pcard2
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
}
card_set
*
adjust_set
=
new
card_set
;
core
.
units
.
begin
()
->
ptarget
=
(
group
*
)
adjust_set
;
adjust_set
->
insert
(
cit1
,
core
.
control_adjust_set
[
0
].
end
());
adjust_set
->
insert
(
cit2
,
core
.
control_adjust_set
[
1
].
end
());
return
FALSE
;
}
case
3
:
{
card_set
*
adjust_set
=
(
card_set
*
)
core
.
units
.
begin
()
->
ptarget
;
if
(
adjust_set
->
empty
())
return
FALSE
;
auto
cit
=
adjust_set
->
begin
();
card
*
pcard
=
*
cit
;
adjust_set
->
erase
(
cit
);
pcard
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
move_to_field
(
pcard
,
1
-
pcard
->
current
.
controler
,
1
-
pcard
->
current
.
controler
,
LOCATION_MZONE
,
pcard
->
current
.
position
);
core
.
units
.
begin
()
->
step
=
2
;
return
FALSE
;
}
case
4
:
{
card_set
*
adjust_set
=
(
card_set
*
)
core
.
units
.
begin
()
->
ptarget
;
delete
adjust_set
;
core
.
control_adjust_set
[
0
].
insert
(
core
.
control_adjust_set
[
1
].
begin
(),
core
.
control_adjust_set
[
1
].
end
());
for
(
auto
cit
=
core
.
control_adjust_set
[
0
].
begin
();
cit
!=
core
.
control_adjust_set
[
0
].
end
();
)
{
card
*
pcard
=
*
cit
++
;
if
(
!
(
pcard
->
current
.
location
&
LOCATION_ONFIELD
))
{
core
.
control_adjust_set
[
0
].
erase
(
pcard
);
continue
;
}
pcard
->
filter_disable_related_cards
();
if
(
pcard
->
unique_code
&&
(
pcard
->
unique_location
&
LOCATION_MZONE
))
add_unique_card
(
pcard
);
raise_single_event
(
pcard
,
0
,
EVENT_CONTROL_CHANGED
,
0
,
REASON_RULE
,
0
,
pcard
->
current
.
controler
,
0
);
raise_single_event
(
pcard
,
0
,
EVENT_MOVE
,
0
,
REASON_RULE
,
0
,
pcard
->
current
.
controler
,
0
);
}
if
(
core
.
control_adjust_set
[
0
].
size
())
{
raise_event
(
&
core
.
control_adjust_set
[
0
],
EVENT_CONTROL_CHANGED
,
0
,
0
,
0
,
0
,
0
);
raise_event
(
&
core
.
control_adjust_set
[
0
],
EVENT_MOVE
,
0
,
0
,
0
,
0
,
0
);
}
process_single_event
();
process_instant_event
();
return
FALSE
;
}
case
5
:
{
card_set
*
destroy_set
=
(
card_set
*
)
core
.
units
.
begin
()
->
peffect
;
if
(
destroy_set
->
size
())
destroy
(
destroy_set
,
0
,
REASON_RULE
,
PLAYER_NONE
);
delete
destroy_set
;
return
TRUE
;
}
}
return
TRUE
;
}
int32
field
::
self_destroy
(
uint16
step
,
card
*
ucard
,
int32
p
)
{
int32
field
::
self_destroy
(
uint16
step
,
card
*
ucard
,
int32
p
)
{
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
...
...
processor.cpp
View file @
b889a23c
...
@@ -476,13 +476,6 @@ int32 field::process() {
...
@@ -476,13 +476,6 @@ int32 field::process() {
it
->
step
++
;
it
->
step
++
;
return
pduel
->
bufferlen
;
return
pduel
->
bufferlen
;
}
}
case
PROCESSOR_CONTROL_ADJUST
:
{
if
(
control_adjust
(
it
->
step
))
{
core
.
units
.
pop_front
();
}
else
it
->
step
++
;
return
pduel
->
bufferlen
;
}
case
PROCESSOR_SELF_DESTROY
:
{
case
PROCESSOR_SELF_DESTROY
:
{
if
(
self_destroy
(
it
->
step
,
(
card
*
)
it
->
ptr1
,
it
->
arg1
))
{
if
(
self_destroy
(
it
->
step
,
(
card
*
)
it
->
ptr1
,
it
->
arg1
))
{
core
.
units
.
pop_front
();
core
.
units
.
pop_front
();
...
...
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