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
875d8b77
Commit
875d8b77
authored
Aug 05, 2017
by
mercury233
Committed by
GitHub
Aug 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update card::is_destructable_by_effect (#106)
parent
27240311
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
1 deletion
+44
-1
card.cpp
card.cpp
+44
-1
No files found.
card.cpp
View file @
875d8b77
...
...
@@ -3165,7 +3165,50 @@ effect* card::check_indestructable_by_effect(effect* peffect, uint8 playerid) {
return
0
;
}
int32
card
::
is_destructable_by_effect
(
effect
*
peffect
,
uint8
playerid
)
{
return
!
check_indestructable_by_effect
(
peffect
,
playerid
);
if
(
!
is_affect_by_effect
(
peffect
))
return
FALSE
;
if
(
check_indestructable_by_effect
(
peffect
,
playerid
))
return
FALSE
;
effect_set
eset
;
eset
.
clear
();
filter_effect
(
EFFECT_INDESTRUCTABLE
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
REASON_EFFECT
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
if
(
eset
[
i
]
->
check_value_condition
(
3
))
{
return
FALSE
;
break
;
}
}
eset
.
clear
();
filter_effect
(
EFFECT_INDESTRUCTABLE_COUNT
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
))
{
if
((
eset
[
i
]
->
reset_count
&
0xf00
)
==
0
)
continue
;
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
REASON_EFFECT
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
if
(
eset
[
i
]
->
check_value_condition
(
3
))
{
return
FALSE
;
break
;
}
}
else
{
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
REASON_EFFECT
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
int32
ct
;
if
(
ct
=
eset
[
i
]
->
get_value
(
3
))
{
auto
it
=
indestructable_effects
.
insert
(
std
::
make_pair
(
eset
[
i
]
->
id
,
0
));
if
(
it
.
first
->
second
+
1
<=
ct
)
{
return
FALSE
;
break
;
}
}
}
}
return
TRUE
;
}
int32
card
::
is_removeable
(
uint8
playerid
)
{
if
(
!
pduel
->
game_field
->
is_player_can_remove
(
playerid
,
this
))
...
...
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