Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
a43d4924
Commit
a43d4924
authored
Jul 23, 2015
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EFFECT_CANNOT_TO_DECK
parent
fef642dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
ocgcore/card.cpp
ocgcore/card.cpp
+5
-1
ocgcore/effect.cpp
ocgcore/effect.cpp
+2
-0
ocgcore/field.cpp
ocgcore/field.cpp
+1
-5
No files found.
ocgcore/card.cpp
View file @
a43d4924
...
...
@@ -2203,6 +2203,8 @@ int32 card::is_capable_send_to_grave(uint8 playerid) {
int32
card
::
is_capable_send_to_hand
(
uint8
playerid
)
{
if
(
is_status
(
STATUS_LEAVE_CONFIRMED
))
return
FALSE
;
if
((
current
.
location
==
LOCATION_EXTRA
)
&&
(
data
.
type
&
(
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
)))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_TO_HAND
))
return
FALSE
;
if
(
!
pduel
->
game_field
->
is_player_can_send_to_hand
(
playerid
,
this
))
...
...
@@ -2212,6 +2214,8 @@ int32 card::is_capable_send_to_hand(uint8 playerid) {
int32
card
::
is_capable_send_to_deck
(
uint8
playerid
)
{
if
(
is_status
(
STATUS_LEAVE_CONFIRMED
))
return
FALSE
;
if
((
current
.
location
==
LOCATION_EXTRA
)
&&
(
data
.
type
&
(
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
)))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_TO_DECK
))
return
FALSE
;
if
(
!
pduel
->
game_field
->
is_player_can_send_to_deck
(
playerid
,
this
))
...
...
@@ -2219,7 +2223,7 @@ int32 card::is_capable_send_to_deck(uint8 playerid) {
return
TRUE
;
}
int32
card
::
is_capable_send_to_extra
(
uint8
playerid
)
{
if
(
!
(
data
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
)))
if
(
!
(
data
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_PENDULUM
)))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_TO_DECK
))
return
FALSE
;
...
...
ocgcore/effect.cpp
View file @
a43d4924
...
...
@@ -463,6 +463,8 @@ int32 effect::is_chainable(uint8 tp) {
}
return
TRUE
;
}
//return: this can be reset or not
//RESET_CODE can only reset single effect
int32
effect
::
reset
(
uint32
reset_level
,
uint32
reset_type
)
{
switch
(
reset_type
)
{
case
RESET_EVENT
:
{
...
...
ocgcore/field.cpp
View file @
a43d4924
...
...
@@ -151,7 +151,7 @@ void field::add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence
pcard
->
operation_param
=
(
pcard
->
operation_param
&
0x00ffffff
)
|
(
POS_FACEDOWN_DEFENCE
<<
24
);
}
if
((
pcard
->
data
.
type
&
TYPE_PENDULUM
)
&&
(
location
==
LOCATION_GRAVE
)
&&
!
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_TO_DECK
)
&&
is_player_can_send_to_deck
(
playerid
,
pcard
)
&&
pcard
->
is_capable_send_to_extra
(
playerid
)
&&
(((
pcard
->
previous
.
location
==
LOCATION_MZONE
)
&&
!
pcard
->
is_status
(
STATUS_SUMMON_DISABLED
))
||
((
pcard
->
previous
.
location
==
LOCATION_SZONE
)
&&
!
pcard
->
is_status
(
STATUS_ACTIVATE_DISABLED
))))
{
location
=
LOCATION_EXTRA
;
...
...
@@ -2154,8 +2154,6 @@ int32 field::is_player_can_send_to_grave(uint8 playerid, card * pcard) {
}
int32
field
::
is_player_can_send_to_hand
(
uint8
playerid
,
card
*
pcard
)
{
effect_set
eset
;
if
((
pcard
->
current
.
location
==
LOCATION_EXTRA
)
&&
(
pcard
->
data
.
type
&
(
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
)))
return
FALSE
;
filter_player_effect
(
playerid
,
EFFECT_CANNOT_TO_HAND
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
target
)
...
...
@@ -2170,8 +2168,6 @@ int32 field::is_player_can_send_to_hand(uint8 playerid, card * pcard) {
}
int32
field
::
is_player_can_send_to_deck
(
uint8
playerid
,
card
*
pcard
)
{
effect_set
eset
;
if
((
pcard
->
current
.
location
==
LOCATION_EXTRA
)
&&
(
pcard
->
data
.
type
&
(
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
)))
return
FALSE
;
filter_player_effect
(
playerid
,
EFFECT_CANNOT_TO_DECK
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
target
)
...
...
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