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
a863a19d
Commit
a863a19d
authored
Aug 07, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core
parents
8394ad37
3b8bde1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
9 deletions
+18
-9
effect.cpp
effect.cpp
+6
-1
effect.h
effect.h
+1
-0
libcard.cpp
libcard.cpp
+2
-1
operations.cpp
operations.cpp
+9
-7
No files found.
effect.cpp
View file @
a863a19d
...
...
@@ -57,6 +57,11 @@ int32 effect::is_disable_related() {
return
TRUE
;
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
()
{
uint32
ctr
=
code
&
0xf0000
;
if
(
is_flag
(
EFFECT_FLAG_CANNOT_DISABLE
)
&&
!
is_flag
(
EFFECT_FLAG_CANNOT_NEGATE
))
...
...
@@ -269,7 +274,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
return
FALSE
;
}
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
))
return
FALSE
;
if
((
code
<
1134
||
code
>
1136
)
&&
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE_CAL
&&
!
is_flag
(
EFFECT_FLAG_DAMAGE_CAL
))
...
...
effect.h
View file @
a863a19d
...
...
@@ -66,6 +66,7 @@ public:
~
effect
()
=
default
;
int32
is_disable_related
();
int32
is_self_destroy_related
();
int32
is_can_be_forbidden
();
int32
is_available
();
int32
check_count_limit
(
uint8
playerid
);
...
...
libcard.cpp
View file @
a863a19d
...
...
@@ -1321,7 +1321,8 @@ int32 scriptlib::card_enable_dual_state(lua_State *L) {
deffect
->
owner
=
pcard
;
deffect
->
code
=
EFFECT_DUAL_STATUS
;
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
;
pcard
->
add_effect
(
deffect
);
return
0
;
...
...
operations.cpp
View file @
a863a19d
...
...
@@ -4741,12 +4741,14 @@ int32 field::operation_replace(uint16 step, effect* replace_effect, group* targe
}
case
1
:
{
if
(
returns
.
ivalue
[
0
])
{
targets
->
container
.
erase
(
target
);
target
->
current
.
reason
=
target
->
temp
.
reason
;
target
->
current
.
reason_effect
=
target
->
temp
.
reason_effect
;
target
->
current
.
reason_player
=
target
->
temp
.
reason_player
;
if
(
is_destroy
)
core
.
destroy_canceled
.
insert
(
target
);
if
(
!
target
->
current
.
reason_effect
->
is_self_destroy_related
())
{
targets
->
container
.
erase
(
target
);
target
->
current
.
reason
=
target
->
temp
.
reason
;
target
->
current
.
reason_effect
=
target
->
temp
.
reason_effect
;
target
->
current
.
reason_player
=
target
->
temp
.
reason_player
;
if
(
is_destroy
)
core
.
destroy_canceled
.
insert
(
target
);
}
replace_effect
->
dec_count
(
replace_effect
->
get_handler_player
());
}
else
core
.
units
.
begin
()
->
step
=
2
;
...
...
@@ -4805,7 +4807,7 @@ int32 field::operation_replace(uint16 step, effect* replace_effect, group* targe
if
(
returns
.
ivalue
[
0
])
{
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();)
{
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_effect
=
(
*
rm
)
->
temp
.
reason_effect
;
(
*
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