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
7c9cf56a
Commit
7c9cf56a
authored
Aug 06, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
1590f304
3b8bde1f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
20 deletions
+19
-20
card.cpp
card.cpp
+0
-9
effect.cpp
effect.cpp
+6
-1
effect.h
effect.h
+1
-0
libcard.cpp
libcard.cpp
+2
-1
libduel.cpp
libduel.cpp
+1
-2
operations.cpp
operations.cpp
+9
-7
No files found.
card.cpp
View file @
7c9cf56a
...
@@ -2449,15 +2449,6 @@ void card::filter_disable_related_cards() {
...
@@ -2449,15 +2449,6 @@ 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:
...
...
effect.cpp
View file @
7c9cf56a
...
@@ -57,6 +57,11 @@ int32 effect::is_disable_related() {
...
@@ -57,6 +57,11 @@ int32 effect::is_disable_related() {
return
TRUE
;
return
TRUE
;
return
FALSE
;
return
FALSE
;
}
}
int32
effect
::
is_self_destroy_related
()
{
if
(
code
==
EFFECT_UNIQUE_CHECK
||
code
==
EFFECT_SELF_DESTROY
||
code
==
EFFECT_SELF_TOGRAVE
)
return
TRUE
;
return
FALSE
;
}
int32
effect
::
is_can_be_forbidden
()
{
int32
effect
::
is_can_be_forbidden
()
{
uint32
ctr
=
code
&
0xf0000
;
uint32
ctr
=
code
&
0xf0000
;
if
(
is_flag
(
EFFECT_FLAG_CANNOT_DISABLE
)
&&
!
is_flag
(
EFFECT_FLAG_CANNOT_NEGATE
))
if
(
is_flag
(
EFFECT_FLAG_CANNOT_DISABLE
)
&&
!
is_flag
(
EFFECT_FLAG_CANNOT_NEGATE
))
...
@@ -266,7 +271,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
...
@@ -266,7 +271,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
return
FALSE
;
return
FALSE
;
}
}
if
(
!
(
type
&
(
EFFECT_TYPE_FLIP
|
EFFECT_TYPE_TRIGGER_F
))
if
(
!
(
type
&
(
EFFECT_TYPE_FLIP
|
EFFECT_TYPE_TRIGGER_F
))
&&
!
((
type
&
EFFECT_TYPE_SINGLE
)
&&
(
code
==
EVENT_TO_GRAVE
||
code
==
EVENT_DESTROYED
||
code
==
EVENT_SPSUMMON_SUCCESS
||
code
==
EVENT_TO_HAND
||
code
==
EVENT_REMOVE
)))
{
&&
!
((
type
&
EFFECT_TYPE_SINGLE
)
&&
(
code
==
EVENT_TO_GRAVE
||
code
==
EVENT_DESTROYED
||
code
==
EVENT_SPSUMMON_SUCCESS
||
code
==
EVENT_TO_HAND
||
code
==
EVENT_REMOVE
||
code
==
EVENT_FLIP
)))
{
if
((
code
<
1132
||
code
>
1149
)
&&
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE
&&
!
is_flag
(
EFFECT_FLAG_DAMAGE_STEP
))
if
((
code
<
1132
||
code
>
1149
)
&&
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE
&&
!
is_flag
(
EFFECT_FLAG_DAMAGE_STEP
))
return
FALSE
;
return
FALSE
;
if
((
code
<
1134
||
code
>
1136
)
&&
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE_CAL
&&
!
is_flag
(
EFFECT_FLAG_DAMAGE_CAL
))
if
((
code
<
1134
||
code
>
1136
)
&&
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE_CAL
&&
!
is_flag
(
EFFECT_FLAG_DAMAGE_CAL
))
...
...
effect.h
View file @
7c9cf56a
...
@@ -66,6 +66,7 @@ public:
...
@@ -66,6 +66,7 @@ public:
~
effect
()
=
default
;
~
effect
()
=
default
;
int32
is_disable_related
();
int32
is_disable_related
();
int32
is_self_destroy_related
();
int32
is_can_be_forbidden
();
int32
is_can_be_forbidden
();
int32
is_available
();
int32
is_available
();
int32
check_count_limit
(
uint8
playerid
);
int32
check_count_limit
(
uint8
playerid
);
...
...
libcard.cpp
View file @
7c9cf56a
...
@@ -1198,7 +1198,8 @@ int32 scriptlib::card_enable_dual_state(lua_State *L) {
...
@@ -1198,7 +1198,8 @@ int32 scriptlib::card_enable_dual_state(lua_State *L) {
deffect
->
owner
=
pcard
;
deffect
->
owner
=
pcard
;
deffect
->
code
=
EFFECT_DUAL_STATUS
;
deffect
->
code
=
EFFECT_DUAL_STATUS
;
deffect
->
type
=
EFFECT_TYPE_SINGLE
;
deffect
->
type
=
EFFECT_TYPE_SINGLE
;
deffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
deffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
|
EFFECT_FLAG_CLIENT_HINT
;
deffect
->
description
=
64
;
deffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
deffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
pcard
->
add_effect
(
deffect
);
pcard
->
add_effect
(
deffect
);
return
0
;
return
0
;
...
...
libduel.cpp
View file @
7c9cf56a
...
@@ -3266,8 +3266,7 @@ int32 scriptlib::duel_overlay(lua_State *L) {
...
@@ -3266,8 +3266,7 @@ int32 scriptlib::duel_overlay(lua_State *L) {
target
->
xyz_overlay
(
&
cset
);
target
->
xyz_overlay
(
&
cset
);
}
else
}
else
target
->
xyz_overlay
(
&
pgroup
->
container
);
target
->
xyz_overlay
(
&
pgroup
->
container
);
if
(
target
->
current
.
location
==
LOCATION_MZONE
)
target
->
pduel
->
game_field
->
adjust_all
();
target
->
pduel
->
game_field
->
adjust_all
();
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_get_overlay_group
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_get_overlay_group
(
lua_State
*
L
)
{
...
...
operations.cpp
View file @
7c9cf56a
...
@@ -4688,12 +4688,14 @@ int32 field::operation_replace(uint16 step, effect* replace_effect, group* targe
...
@@ -4688,12 +4688,14 @@ int32 field::operation_replace(uint16 step, effect* replace_effect, group* targe
}
}
case
1
:
{
case
1
:
{
if
(
returns
.
ivalue
[
0
])
{
if
(
returns
.
ivalue
[
0
])
{
targets
->
container
.
erase
(
target
);
if
(
!
target
->
current
.
reason_effect
->
is_self_destroy_related
())
{
target
->
current
.
reason
=
target
->
temp
.
reason
;
targets
->
container
.
erase
(
target
);
target
->
current
.
reason_effect
=
target
->
temp
.
reason_effect
;
target
->
current
.
reason
=
target
->
temp
.
reason
;
target
->
current
.
reason_player
=
target
->
temp
.
reason_player
;
target
->
current
.
reason_effect
=
target
->
temp
.
reason_effect
;
if
(
is_destroy
)
target
->
current
.
reason_player
=
target
->
temp
.
reason_player
;
core
.
destroy_canceled
.
insert
(
target
);
if
(
is_destroy
)
core
.
destroy_canceled
.
insert
(
target
);
}
replace_effect
->
dec_count
(
replace_effect
->
get_handler_player
());
replace_effect
->
dec_count
(
replace_effect
->
get_handler_player
());
}
else
}
else
core
.
units
.
begin
()
->
step
=
2
;
core
.
units
.
begin
()
->
step
=
2
;
...
@@ -4752,7 +4754,7 @@ int32 field::operation_replace(uint16 step, effect* replace_effect, group* targe
...
@@ -4752,7 +4754,7 @@ int32 field::operation_replace(uint16 step, effect* replace_effect, group* targe
if
(
returns
.
ivalue
[
0
])
{
if
(
returns
.
ivalue
[
0
])
{
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();)
{
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();)
{
auto
rm
=
cit
++
;
auto
rm
=
cit
++
;
if
(
replace_effect
->
get_value
(
*
rm
))
{
if
(
replace_effect
->
get_value
(
*
rm
)
&&
!
(
*
rm
)
->
current
.
reason_effect
->
is_self_destroy_related
()
)
{
(
*
rm
)
->
current
.
reason
=
(
*
rm
)
->
temp
.
reason
;
(
*
rm
)
->
current
.
reason
=
(
*
rm
)
->
temp
.
reason
;
(
*
rm
)
->
current
.
reason_effect
=
(
*
rm
)
->
temp
.
reason_effect
;
(
*
rm
)
->
current
.
reason_effect
=
(
*
rm
)
->
temp
.
reason_effect
;
(
*
rm
)
->
current
.
reason_player
=
(
*
rm
)
->
temp
.
reason_player
;
(
*
rm
)
->
current
.
reason_player
=
(
*
rm
)
->
temp
.
reason_player
;
...
...
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