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
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-core
Commits
3ee63201
Commit
3ee63201
authored
Sep 30, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
b2071620
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
operations.cpp
operations.cpp
+23
-6
No files found.
operations.cpp
View file @
3ee63201
...
...
@@ -1045,28 +1045,45 @@ int32 field::control_adjust(uint16 step) {
int32
field
::
self_destroy
(
uint16
step
)
{
switch
(
step
)
{
case
0
:
{
if
(
core
.
self_destroy_set
.
empty
())
{
core
.
units
.
begin
()
->
step
=
1
;
return
FALSE
;
}
card_set
cset
;
for
(
auto
cit
=
core
.
self_destroy_set
.
begin
();
cit
!=
core
.
self_destroy_set
.
end
();)
{
auto
rm
=
cit
++
;
card
*
pcard
=
*
rm
;
if
(
pcard
->
current
.
reason_effect
->
code
==
EFFECT_UNIQUE_CHECK
)
{
cset
.
insert
(
pcard
);
core
.
self_destroy_set
.
erase
(
rm
);
}
}
if
(
!
cset
.
empty
())
destroy
(
&
cset
,
0
,
REASON_RULE
,
5
);
return
FALSE
;
}
case
1
:
{
core
.
operated_set
.
clear
();
if
(
!
core
.
self_destroy_set
.
empty
())
destroy
(
&
core
.
self_destroy_set
,
0
,
REASON_EFFECT
,
5
);
else
returns
.
ivalue
[
0
]
=
0
;
return
FALSE
;
}
case
1
:
{
case
2
:
{
core
.
self_destroy_set
.
clear
();
core
.
operated_set
.
clear
();
returns
.
ivalue
[
0
]
=
0
;
if
(
!
(
core
.
global_flag
&
GLOBALFLAG_SELF_TOGRAVE
))
return
TRUE
;
core
.
units
.
begin
()
->
arg1
=
returns
.
ivalue
[
0
];
if
(
!
core
.
self_tograve_set
.
empty
())
send_to
(
&
core
.
self_tograve_set
,
0
,
REASON_EFFECT
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
else
return
TRUE
;
return
FALSE
;
}
case
2
:
{
case
3
:
{
core
.
self_tograve_set
.
clear
();
core
.
operated_set
.
clear
();
returns
.
ivalue
[
0
]
+=
core
.
units
.
begin
()
->
arg1
;
returns
.
ivalue
[
0
]
=
0
;
return
TRUE
;
}
}
...
...
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