Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
7ecfd29c
Commit
7ecfd29c
authored
Jun 14, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
c5ec8e32
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
8 deletions
+21
-8
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+13
-2
Classes/ocgcore/effect.h
Classes/ocgcore/effect.h
+1
-1
Classes/ocgcore/field.cpp
Classes/ocgcore/field.cpp
+4
-4
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+3
-1
No files found.
Classes/ocgcore/card.cpp
View file @
7ecfd29c
...
@@ -2431,8 +2431,10 @@ void card::filter_immune_effect() {
...
@@ -2431,8 +2431,10 @@ void card::filter_immune_effect() {
immune_effect
.
sort
();
immune_effect
.
sort
();
}
}
// for all disable-related peffect of this,
// for all disable-related peffect of this,
// 1. put all cards in the target of peffect into effects.disable_check_set, effects.disable_check_list
// 1. Insert all cards in the target of peffect into effects.disable_check_list.
// 2. add equiping_target of peffect into effects.disable_check_set, effects.disable_check_list
// 2. Insert equiping_target of peffect into it.
// 3. Insert overlay_target of peffect into it.
// 4. Insert continuous target of this into it.
void
card
::
filter_disable_related_cards
()
{
void
card
::
filter_disable_related_cards
()
{
for
(
auto
&
it
:
indexer
)
{
for
(
auto
&
it
:
indexer
)
{
effect
*
peffect
=
it
.
first
;
effect
*
peffect
=
it
.
first
;
...
@@ -2445,6 +2447,15 @@ void card::filter_disable_related_cards() {
...
@@ -2445,6 +2447,15 @@ void card::filter_disable_related_cards() {
pduel
->
game_field
->
add_to_disable_check_list
(
overlay_target
);
pduel
->
game_field
->
add_to_disable_check_list
(
overlay_target
);
}
}
}
}
for
(
auto
pcard
:
effect_target_cards
)
{
for
(
auto
it
=
pcard
->
single_effect
.
begin
();
it
!=
pcard
->
single_effect
.
end
();
++
it
)
{
effect
*
peffect
=
it
->
second
;
if
(
peffect
->
is_disable_related
()
&&
peffect
->
is_flag
(
EFFECT_FLAG_OWNER_RELATE
)){
pduel
->
game_field
->
add_to_disable_check_list
(
pcard
);
break
;
}
}
}
}
}
// put all summon procedures except ordinay summon in peset (see is_can_be_summoned())
// put all summon procedures except ordinay summon in peset (see is_can_be_summoned())
// return value:
// return value:
...
...
Classes/ocgcore/effect.h
View file @
7ecfd29c
...
@@ -186,7 +186,7 @@ enum effect_flag : uint32 {
...
@@ -186,7 +186,7 @@ enum effect_flag : uint32 {
EFFECT_FLAG_OWNER_RELATE
=
0x1000000
,
EFFECT_FLAG_OWNER_RELATE
=
0x1000000
,
EFFECT_FLAG_CANNOT_INACTIVATE
=
0x2000000
,
EFFECT_FLAG_CANNOT_INACTIVATE
=
0x2000000
,
EFFECT_FLAG_CLIENT_HINT
=
0x4000000
,
EFFECT_FLAG_CLIENT_HINT
=
0x4000000
,
// EFFECT_FLAG_CHAIN_UNIQUE
= 0x8000000,
EFFECT_FLAG_CONTINUOUS_TARGET
=
0x8000000
,
EFFECT_FLAG_LIMIT_ZONE
=
0x10000000
,
EFFECT_FLAG_LIMIT_ZONE
=
0x10000000
,
// EFFECT_FLAG_COF = 0x20000000,
// EFFECT_FLAG_COF = 0x20000000,
// EFFECT_FLAG_CVAL_CHECK = 0x40000000,
// EFFECT_FLAG_CVAL_CHECK = 0x40000000,
...
...
Classes/ocgcore/field.cpp
View file @
7ecfd29c
...
@@ -1872,7 +1872,7 @@ int32 field::get_overlay_count(uint8 self, uint8 s, uint8 o) {
...
@@ -1872,7 +1872,7 @@ int32 field::get_overlay_count(uint8 self, uint8 s, uint8 o) {
}
}
return
count
;
return
count
;
}
}
// put all cards in the target of peffect into effects.disable_check_
set, effects.disable_check_
list
// put all cards in the target of peffect into effects.disable_check_list
void
field
::
update_disable_check_list
(
effect
*
peffect
)
{
void
field
::
update_disable_check_list
(
effect
*
peffect
)
{
card_set
cset
;
card_set
cset
;
filter_affected_cards
(
peffect
,
&
cset
);
filter_affected_cards
(
peffect
,
&
cset
);
...
@@ -1880,9 +1880,9 @@ void field::update_disable_check_list(effect* peffect) {
...
@@ -1880,9 +1880,9 @@ void field::update_disable_check_list(effect* peffect) {
add_to_disable_check_list
(
pcard
);
add_to_disable_check_list
(
pcard
);
}
}
void
field
::
add_to_disable_check_list
(
card
*
pcard
)
{
void
field
::
add_to_disable_check_list
(
card
*
pcard
)
{
if
(
effects
.
disable_check_set
.
find
(
pcard
)
!=
effects
.
disable_check_set
.
end
())
auto
result
=
effects
.
disable_check_set
.
insert
(
pcard
);
return
;
if
(
!
result
.
second
)
effects
.
disable_check_set
.
insert
(
pcard
);
return
effects
.
disable_check_list
.
push_back
(
pcard
);
effects
.
disable_check_list
.
push_back
(
pcard
);
}
}
void
field
::
adjust_disable_check_list
()
{
void
field
::
adjust_disable_check_list
()
{
...
...
Classes/ocgcore/processor.cpp
View file @
7ecfd29c
...
@@ -4546,7 +4546,9 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
...
@@ -4546,7 +4546,9 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
}
}
adjust_instant
();
adjust_instant
();
}
}
if
(
is_chain_disablable
(
cait
->
chain_count
))
{
// creating continuous target: peffect->is_flag(EFFECT_FLAG_CONTINUOUS_TARGET) && !cait->replace_op
// operation function creating continuous target should be executed even when disabled
if
(
is_chain_disablable
(
cait
->
chain_count
)
&&
(
!
peffect
->
is_flag
(
EFFECT_FLAG_CONTINUOUS_TARGET
)
||
cait
->
replace_op
))
{
if
(
is_chain_disabled
(
cait
->
chain_count
)
||
(
pcard
->
get_status
(
STATUS_DISABLED
|
STATUS_FORBIDDEN
)
&&
pcard
->
is_has_relation
(
*
cait
)))
{
if
(
is_chain_disabled
(
cait
->
chain_count
)
||
(
pcard
->
get_status
(
STATUS_DISABLED
|
STATUS_FORBIDDEN
)
&&
pcard
->
is_has_relation
(
*
cait
)))
{
if
(
!
(
cait
->
flag
&
CHAIN_DISABLE_EFFECT
))
{
if
(
!
(
cait
->
flag
&
CHAIN_DISABLE_EFFECT
))
{
pduel
->
write_buffer8
(
MSG_CHAIN_DISABLED
);
pduel
->
write_buffer8
(
MSG_CHAIN_DISABLED
);
...
...
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