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
2cc1a638
Commit
2cc1a638
authored
Jan 23, 2020
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix control effect check when RESET_TURN_SET
parent
8cca9304
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
50 deletions
+2
-50
card.cpp
card.cpp
+2
-49
card.h
card.h
+0
-1
No files found.
card.cpp
View file @
2cc1a638
...
@@ -1911,7 +1911,8 @@ void card::reset(uint32 id, uint32 reset_type) {
...
@@ -1911,7 +1911,8 @@ void card::reset(uint32 id, uint32 reset_type) {
}
}
}
}
if
(
id
&
RESET_TURN_SET
)
{
if
(
id
&
RESET_TURN_SET
)
{
if
(
effect
*
peffect
=
check_control_effect
())
{
effect
*
peffect
=
std
::
get
<
effect
*>
(
refresh_control_status
());
if
(
peffect
&&
(
!
(
peffect
->
type
&
EFFECT_TYPE_SINGLE
)
||
peffect
->
condition
))
{
effect
*
new_effect
=
pduel
->
new_effect
();
effect
*
new_effect
=
pduel
->
new_effect
();
new_effect
->
id
=
peffect
->
id
;
new_effect
->
id
=
peffect
->
id
;
new_effect
->
owner
=
this
;
new_effect
->
owner
=
this
;
...
@@ -2724,54 +2725,6 @@ effect* card::is_affected_by_effect(int32 code, card* target) {
...
@@ -2724,54 +2725,6 @@ effect* card::is_affected_by_effect(int32 code, card* target) {
}
}
return
0
;
return
0
;
}
}
effect
*
card
::
check_control_effect
()
{
effect
*
ret_effect
=
0
;
for
(
auto
&
pcard
:
equiping_cards
)
{
auto
rg
=
pcard
->
equip_effect
.
equal_range
(
EFFECT_SET_CONTROL
);
for
(;
rg
.
first
!=
rg
.
second
;
++
rg
.
first
)
{
effect
*
peffect
=
rg
.
first
->
second
;
if
(
!
ret_effect
||
peffect
->
id
>
ret_effect
->
id
)
ret_effect
=
peffect
;
}
}
for
(
auto
&
pcard
:
effect_target_owner
)
{
auto
rg
=
pcard
->
target_effect
.
equal_range
(
EFFECT_SET_CONTROL
);
for
(;
rg
.
first
!=
rg
.
second
;
++
rg
.
first
)
{
effect
*
peffect
=
rg
.
first
->
second
;
if
(
!
ret_effect
||
peffect
->
is_target
(
pcard
)
&&
peffect
->
id
>
ret_effect
->
id
)
ret_effect
=
peffect
;
}
}
for
(
auto
&
pcard
:
xyz_materials
)
{
auto
rg
=
pcard
->
xmaterial_effect
.
equal_range
(
EFFECT_SET_CONTROL
);
for
(;
rg
.
first
!=
rg
.
second
;
++
rg
.
first
)
{
effect
*
peffect
=
rg
.
first
->
second
;
if
(
peffect
->
type
&
EFFECT_TYPE_FIELD
)
continue
;
if
(
!
ret_effect
||
peffect
->
id
>
ret_effect
->
id
)
ret_effect
=
peffect
;
}
}
auto
rg
=
single_effect
.
equal_range
(
EFFECT_SET_CONTROL
);
for
(;
rg
.
first
!=
rg
.
second
;
++
rg
.
first
)
{
effect
*
peffect
=
rg
.
first
->
second
;
if
(
!
peffect
->
condition
)
continue
;
if
(
!
ret_effect
||
peffect
->
id
>
ret_effect
->
id
)
ret_effect
=
peffect
;
}
/*
rg = pduel->game_field->effects.aura_effect.equal_range(EFFECT_SET_CONTROL);
for(; rg.first != rg.second; ++rg.first) {
effect* peffect = rg.first->second;
if(peffect->is_flag(EFFECT_FLAG_PLAYER_TARGET) || !peffect->is_target(this))
continue;
if(!ret_effect || peffect->id > ret_effect->id)
ret_effect = peffect;
}
*/
return
ret_effect
;
}
int32
card
::
fusion_check
(
group
*
fusion_m
,
card
*
cg
,
uint32
chkf
,
uint8
not_material
)
{
int32
card
::
fusion_check
(
group
*
fusion_m
,
card
*
cg
,
uint32
chkf
,
uint8
not_material
)
{
group
*
matgroup
=
0
;
group
*
matgroup
=
0
;
if
(
fusion_m
&&
!
not_material
)
{
if
(
fusion_m
&&
!
not_material
)
{
...
...
card.h
View file @
2cc1a638
...
@@ -295,7 +295,6 @@ public:
...
@@ -295,7 +295,6 @@ public:
void
filter_spsummon_procedure_g
(
uint8
playerid
,
effect_set
*
eset
);
void
filter_spsummon_procedure_g
(
uint8
playerid
,
effect_set
*
eset
);
effect
*
is_affected_by_effect
(
int32
code
);
effect
*
is_affected_by_effect
(
int32
code
);
effect
*
is_affected_by_effect
(
int32
code
,
card
*
target
);
effect
*
is_affected_by_effect
(
int32
code
,
card
*
target
);
effect
*
check_control_effect
();
int32
fusion_check
(
group
*
fusion_m
,
card
*
cg
,
uint32
chkf
,
uint8
not_material
);
int32
fusion_check
(
group
*
fusion_m
,
card
*
cg
,
uint32
chkf
,
uint8
not_material
);
void
fusion_select
(
uint8
playerid
,
group
*
fusion_m
,
card
*
cg
,
uint32
chkf
,
uint8
not_material
);
void
fusion_select
(
uint8
playerid
,
group
*
fusion_m
,
card
*
cg
,
uint32
chkf
,
uint8
not_material
);
int32
check_fusion_substitute
(
card
*
fcard
);
int32
check_fusion_substitute
(
card
*
fcard
);
...
...
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