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
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
nanahira
ygopro-core
Commits
b46cf159
Commit
b46cf159
authored
Jul 21, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
negate relate chain
parent
9e590892
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
10 deletions
+32
-10
effect.h
effect.h
+1
-1
field.cpp
field.cpp
+17
-0
field.h
field.h
+1
-0
libduel.cpp
libduel.cpp
+11
-6
processor.cpp
processor.cpp
+2
-3
No files found.
effect.h
View file @
b46cf159
...
@@ -393,7 +393,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
...
@@ -393,7 +393,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_ADD_SETCODE 334
#define EFFECT_ADD_SETCODE 334
#define EFFECT_NO_EFFECT_DAMAGE 335
#define EFFECT_NO_EFFECT_DAMAGE 335
#define EFFECT_UNSUMMONABLE_CARD 336
#define EFFECT_UNSUMMONABLE_CARD 336
#define EFFECT_DISABLE_CHAIN_FIELD 337
//
#define EFFECT_DISABLE_CHAIN_FIELD 337
#define EFFECT_DISCARD_COST_CHANGE 338
#define EFFECT_DISCARD_COST_CHANGE 338
#define EFFECT_HAND_SYNCHRO 339
#define EFFECT_HAND_SYNCHRO 339
#define EFFECT_ADD_FUSION_CODE 340
#define EFFECT_ADD_FUSION_CODE 340
...
...
field.cpp
View file @
b46cf159
...
@@ -2588,6 +2588,23 @@ int32 field::is_chain_disablable(uint8 chaincount, uint8 naga_check) {
...
@@ -2588,6 +2588,23 @@ int32 field::is_chain_disablable(uint8 chaincount, uint8 naga_check) {
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
is_chain_disabled
(
uint8
chaincount
)
{
if
(
chaincount
<
0
||
chaincount
>
core
.
current_chain
.
size
())
return
FALSE
;
chain
*
pchain
;
if
(
chaincount
==
0
)
pchain
=
&
core
.
current_chain
.
back
();
else
pchain
=
&
core
.
current_chain
[
chaincount
-
1
];
if
(
pchain
->
flag
&
CHAIN_DISABLE_EFFECT
)
return
TRUE
;
card
*
pcard
=
pchain
->
triggering_effect
->
handler
;
effect_set
eset
;
pcard
->
filter_effect
(
EFFECT_DISABLE_CHAIN
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
return
eset
[
i
]
->
get_value
()
==
pchain
->
chain_id
;
return
FALSE
;
}
int32
field
::
check_chain_target
(
uint8
chaincount
,
card
*
pcard
)
{
int32
field
::
check_chain_target
(
uint8
chaincount
,
card
*
pcard
)
{
if
(
chaincount
<
0
||
chaincount
>
core
.
current_chain
.
size
())
if
(
chaincount
<
0
||
chaincount
>
core
.
current_chain
.
size
())
return
FALSE
;
return
FALSE
;
...
...
field.h
View file @
b46cf159
...
@@ -423,6 +423,7 @@ public:
...
@@ -423,6 +423,7 @@ public:
int32
is_player_can_remove
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_remove
(
uint8
playerid
,
card
*
pcard
);
int32
is_chain_negatable
(
uint8
chaincount
,
uint8
naga_check
=
FALSE
);
int32
is_chain_negatable
(
uint8
chaincount
,
uint8
naga_check
=
FALSE
);
int32
is_chain_disablable
(
uint8
chaincount
,
uint8
naga_check
=
FALSE
);
int32
is_chain_disablable
(
uint8
chaincount
,
uint8
naga_check
=
FALSE
);
int32
is_chain_disabled
(
uint8
chaincount
);
int32
check_chain_target
(
uint8
chaincount
,
card
*
pcard
);
int32
check_chain_target
(
uint8
chaincount
,
card
*
pcard
);
int32
is_able_to_enter_bp
();
int32
is_able_to_enter_bp
();
...
...
libduel.cpp
View file @
b46cf159
...
@@ -1345,12 +1345,17 @@ int32 scriptlib::duel_negate_related_chain(lua_State *L) {
...
@@ -1345,12 +1345,17 @@ int32 scriptlib::duel_negate_related_chain(lua_State *L) {
return
FALSE
;
return
FALSE
;
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
;
effect
*
negeff
=
pduel
->
new_effect
();
for
(
auto
it
=
pduel
->
game_field
->
core
.
current_chain
.
rbegin
();
it
!=
pduel
->
game_field
->
core
.
current_chain
.
rend
();
++
it
)
{
negeff
->
owner
=
pduel
->
game_field
->
core
.
reason_effect
->
handler
;
if
(
it
->
triggering_effect
->
handler
==
pcard
&&
pcard
->
is_has_relation
(
*
it
))
{
negeff
->
type
=
EFFECT_TYPE_SINGLE
;
effect
*
negeff
=
pduel
->
new_effect
();
negeff
->
code
=
EFFECT_DISABLE_CHAIN_FIELD
;
negeff
->
owner
=
pduel
->
game_field
->
core
.
reason_effect
->
handler
;
negeff
->
reset_flag
=
RESET_CHAIN
|
RESET_EVENT
|
reset_flag
;
negeff
->
type
=
EFFECT_TYPE_SINGLE
;
pcard
->
add_effect
(
negeff
);
negeff
->
code
=
EFFECT_DISABLE_CHAIN
;
negeff
->
value
=
it
->
chain_id
;
negeff
->
reset_flag
=
RESET_CHAIN
|
RESET_EVENT
|
reset_flag
;
pcard
->
add_effect
(
negeff
);
}
}
return
0
;
return
0
;
}
}
int32
scriptlib
::
duel_disable_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_disable_summon
(
lua_State
*
L
)
{
...
...
processor.cpp
View file @
b46cf159
...
@@ -4259,6 +4259,7 @@ int32 field::add_chain(uint16 step) {
...
@@ -4259,6 +4259,7 @@ int32 field::add_chain(uint16 step) {
negeff
->
owner
=
deffect
->
owner
;
negeff
->
owner
=
deffect
->
owner
;
negeff
->
type
=
EFFECT_TYPE_SINGLE
;
negeff
->
type
=
EFFECT_TYPE_SINGLE
;
negeff
->
code
=
EFFECT_DISABLE_CHAIN
;
negeff
->
code
=
EFFECT_DISABLE_CHAIN
;
negeff
->
value
=
clit
.
chain_id
;
negeff
->
reset_flag
=
RESET_CHAIN
|
RESET_EVENT
|
deffect
->
get_value
();
negeff
->
reset_flag
=
RESET_CHAIN
|
RESET_EVENT
|
deffect
->
get_value
();
phandler
->
add_effect
(
negeff
);
phandler
->
add_effect
(
negeff
);
}
}
...
@@ -4538,9 +4539,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
...
@@ -4538,9 +4539,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
core
.
spsummon_state_count_tmp
[
1
]
=
core
.
spsummon_state_count
[
1
];
core
.
spsummon_state_count_tmp
[
1
]
=
core
.
spsummon_state_count
[
1
];
card
*
pcard
=
cait
->
triggering_effect
->
handler
;
card
*
pcard
=
cait
->
triggering_effect
->
handler
;
if
(
is_chain_disablable
(
cait
->
chain_count
))
{
if
(
is_chain_disablable
(
cait
->
chain_count
))
{
if
((
cait
->
flag
&
CHAIN_DISABLE_EFFECT
)
||
pcard
->
is_affected_by_effect
(
EFFECT_DISABLE_CHAIN
)
if
(
is_chain_disabled
(
cait
->
chain_count
)
||
(
pcard
->
get_status
(
STATUS_DISABLED
|
STATUS_FORBIDDEN
)
&&
pcard
->
is_has_relation
(
*
cait
)))
{
||
((
cait
->
triggering_location
&
LOCATION_ONFIELD
)
&&
pcard
->
is_affected_by_effect
(
EFFECT_DISABLE_CHAIN_FIELD
))
||
(
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
);
pduel
->
write_buffer8
(
cait
->
chain_count
);
pduel
->
write_buffer8
(
cait
->
chain_count
);
...
...
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