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
b219de78
Commit
b219de78
authored
Jan 05, 2017
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check EFFECT_CANNOT_DISEFFECT in Duel.IsChainDisablable when chain solving
parent
0551fce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
libduel.cpp
libduel.cpp
+13
-12
No files found.
libduel.cpp
View file @
b219de78
...
@@ -1355,7 +1355,6 @@ int32 scriptlib::duel_negate_effect(lua_State *L) {
...
@@ -1355,7 +1355,6 @@ int32 scriptlib::duel_negate_effect(lua_State *L) {
lua_pushboolean
(
L
,
pduel
->
game_field
->
disable_chain
(
c
));
lua_pushboolean
(
L
,
pduel
->
game_field
->
disable_chain
(
c
));
return
1
;
return
1
;
}
}
// negate the effects activated on field
int32
scriptlib
::
duel_negate_related_chain
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_negate_related_chain
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
@@ -1363,7 +1362,7 @@ int32 scriptlib::duel_negate_related_chain(lua_State *L) {
...
@@ -1363,7 +1362,7 @@ int32 scriptlib::duel_negate_related_chain(lua_State *L) {
uint32
reset_flag
=
lua_tointeger
(
L
,
2
);
uint32
reset_flag
=
lua_tointeger
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
()
<
2
)
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
()
<
2
)
return
FALSE
;
return
0
;
if
(
!
pcard
->
is_affect_by_effect
(
pduel
->
game_field
->
core
.
reason_effect
))
if
(
!
pcard
->
is_affect_by_effect
(
pduel
->
game_field
->
core
.
reason_effect
))
return
0
;
return
0
;
for
(
auto
it
=
pduel
->
game_field
->
core
.
current_chain
.
rbegin
();
it
!=
pduel
->
game_field
->
core
.
current_chain
.
rend
();
++
it
)
{
for
(
auto
it
=
pduel
->
game_field
->
core
.
current_chain
.
rbegin
();
it
!=
pduel
->
game_field
->
core
.
current_chain
.
rend
();
++
it
)
{
...
@@ -3182,9 +3181,9 @@ int32 scriptlib::duel_is_chain_negatable(lua_State * L) {
...
@@ -3182,9 +3181,9 @@ int32 scriptlib::duel_is_chain_negatable(lua_State * L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
int32
chaincount
=
lua_tointeger
(
L
,
1
);
int32
chaincount
=
lua_tointeger
(
L
,
1
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
int32
re
t
=
0
;
int32
re
s
=
0
;
if
(
chaincount
<
0
||
chaincount
>
(
int32
)
pduel
->
game_field
->
core
.
current_chain
.
size
())
if
(
chaincount
<
0
||
chaincount
>
(
int32
)
pduel
->
game_field
->
core
.
current_chain
.
size
())
re
t
=
FALSE
;
re
s
=
FALSE
;
else
{
else
{
effect
*
peffect
;
effect
*
peffect
;
if
(
chaincount
==
0
)
if
(
chaincount
==
0
)
...
@@ -3192,20 +3191,20 @@ int32 scriptlib::duel_is_chain_negatable(lua_State * L) {
...
@@ -3192,20 +3191,20 @@ int32 scriptlib::duel_is_chain_negatable(lua_State * L) {
else
else
peffect
=
pduel
->
game_field
->
core
.
current_chain
[
chaincount
-
1
].
triggering_effect
;
peffect
=
pduel
->
game_field
->
core
.
current_chain
[
chaincount
-
1
].
triggering_effect
;
if
(
peffect
->
is_flag
(
EFFECT_FLAG2_NAGA
))
if
(
peffect
->
is_flag
(
EFFECT_FLAG2_NAGA
))
re
t
=
FALSE
;
re
s
=
FALSE
;
else
else
re
t
=
TRUE
;
re
s
=
TRUE
;
}
}
lua_pushboolean
(
L
,
re
t
);
lua_pushboolean
(
L
,
re
s
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_chain_disablable
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_chain_disablable
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
int32
chaincount
=
lua_tointeger
(
L
,
1
);
int32
chaincount
=
lua_tointeger
(
L
,
1
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
int32
re
t
=
0
;
int32
re
s
=
0
;
if
(
chaincount
<
0
||
chaincount
>
(
int32
)
pduel
->
game_field
->
core
.
current_chain
.
size
())
if
(
chaincount
<
0
||
chaincount
>
(
int32
)
pduel
->
game_field
->
core
.
current_chain
.
size
())
re
t
=
FALSE
;
re
s
=
FALSE
;
else
{
else
{
effect
*
peffect
;
effect
*
peffect
;
if
(
chaincount
==
0
)
if
(
chaincount
==
0
)
...
@@ -3213,11 +3212,13 @@ int32 scriptlib::duel_is_chain_disablable(lua_State * L) {
...
@@ -3213,11 +3212,13 @@ int32 scriptlib::duel_is_chain_disablable(lua_State * L) {
else
else
peffect
=
pduel
->
game_field
->
core
.
current_chain
[
chaincount
-
1
].
triggering_effect
;
peffect
=
pduel
->
game_field
->
core
.
current_chain
[
chaincount
-
1
].
triggering_effect
;
if
(
peffect
->
is_flag
(
EFFECT_FLAG2_NAGA
))
if
(
peffect
->
is_flag
(
EFFECT_FLAG2_NAGA
))
re
t
=
FALSE
;
re
s
=
FALSE
;
else
else
ret
=
TRUE
;
res
=
TRUE
;
if
(
pduel
->
game_field
->
core
.
chain_solving
)
res
=
pduel
->
game_field
->
is_chain_disablable
(
chaincount
);
}
}
lua_pushboolean
(
L
,
re
t
);
lua_pushboolean
(
L
,
re
s
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_check_chain_target
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_check_chain_target
(
lua_State
*
L
)
{
...
...
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