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
ab9650d4
Commit
ab9650d4
authored
Aug 15, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix unique on field
parent
b100ac4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
field.cpp
field.cpp
+3
-2
No files found.
field.cpp
View file @
ab9650d4
...
...
@@ -1442,7 +1442,7 @@ void field::adjust_self_destroy_set() {
effect
*
peffect
;
for
(
auto
cit
=
cset
.
begin
();
cit
!=
cset
.
end
();
++
cit
)
{
card
*
pcard
=
*
cit
;
if
((
!
pcard
->
get_status
(
STATUS_DISABLED
|
STATUS_FORBIDDEN
)
&&
(
peffect
=
check_unique_onfield
(
pcard
,
pcard
->
current
.
controler
,
pcard
->
current
.
location
)
))
if
((
peffect
=
check_unique_onfield
(
pcard
,
pcard
->
current
.
controler
,
pcard
->
current
.
location
))
||
(
peffect
=
pcard
->
is_affected_by_effect
(
EFFECT_SELF_DESTROY
))
&&
!
pcard
->
is_status
(
STATUS_BATTLE_DESTROYED
))
{
core
.
self_destroy_set
.
insert
(
pcard
);
pcard
->
temp
.
reason_effect
=
pcard
->
current
.
reason_effect
;
...
...
@@ -1492,7 +1492,8 @@ effect* field::check_unique_onfield(card* pcard, uint8 controler, uint8 location
card
*
ucard
=
*
iter
;
if
((
ucard
!=
pcard
)
&&
ucard
->
is_position
(
POS_FACEUP
)
&&
ucard
->
get_status
(
STATUS_EFFECT_ENABLED
)
&&
(
ucard
->
unique_code
==
pcard
->
unique_code
)
&&
(
ucard
->
unique_location
&
location
)
&&
(
!
(
pcard
->
current
.
location
&
ucard
->
unique_location
)
||
pcard
->
is_position
(
POS_FACEDOWN
)
||
(
ucard
->
unique_uid
<
pcard
->
unique_uid
)))
&&
(
!
(
pcard
->
current
.
location
&
ucard
->
unique_location
)
||
pcard
->
is_position
(
POS_FACEDOWN
)
||
((
!
pcard
->
get_status
(
STATUS_DISABLED
|
STATUS_FORBIDDEN
)
||
!
ucard
->
get_status
(
STATUS_DISABLED
|
STATUS_FORBIDDEN
))
&&
ucard
->
unique_uid
<
pcard
->
unique_uid
)))
return
pcard
->
unique_effect
;
}
return
0
;
...
...
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