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
aada13bd
Commit
aada13bd
authored
Jun 25, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refresh STATUS_FORBIDDEN in deck
parent
c65d1874
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
14 deletions
+28
-14
card.cpp
card.cpp
+11
-11
effect.cpp
effect.cpp
+2
-2
field.cpp
field.cpp
+15
-1
No files found.
card.cpp
View file @
aada13bd
...
...
@@ -2227,7 +2227,7 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
if
(
!
ignore_count
&&
(
pduel
->
game_field
->
core
.
extra_summon
[
playerid
]
||
!
is_affected_by_effect
(
EFFECT_EXTRA_SUMMON_COUNT
))
&&
pduel
->
game_field
->
core
.
summon_count
[
playerid
]
>=
pduel
->
game_field
->
get_summon_count_limit
(
playerid
))
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
pduel
->
game_field
->
save_lp_cost
();
effect_set
eset
;
...
...
@@ -2338,7 +2338,7 @@ int32 card::is_can_be_flip_summoned(uint8 playerid) {
return
FALSE
;
if
(
!
pduel
->
game_field
->
is_player_can_flipsummon
(
playerid
,
this
))
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_FLIP_SUMMON
))
return
FALSE
;
...
...
@@ -2366,7 +2366,7 @@ int32 card::is_special_summonable(uint8 playerid, uint32 summon_type) {
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_SPECIAL_SUMMON
))
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
pduel
->
game_field
->
save_lp_cost
();
effect_set
eset
;
...
...
@@ -2412,7 +2412,7 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_SPECIAL_SUMMON
))
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
pduel
->
game_field
->
save_lp_cost
();
effect_set
eset
;
...
...
@@ -2455,7 +2455,7 @@ int32 card::is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect
return
FALSE
;
if
(
current
.
location
!=
LOCATION_HAND
)
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_MSET
))
return
FALSE
;
...
...
@@ -2498,7 +2498,7 @@ int32 card::is_setable_szone(uint8 playerid, uint8 ignore_fd) {
return
FALSE
;
if
(
data
.
type
&
TYPE_MONSTER
&&
!
is_affected_by_effect
(
EFFECT_MONSTER_SSET
))
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_SSET
))
return
FALSE
;
...
...
@@ -2753,7 +2753,7 @@ int32 card::is_capable_cost_to_extra(uint8 playerid) {
int32
card
::
is_capable_attack
()
{
if
(
!
is_position
(
POS_FACEUP_ATTACK
)
&&
!
(
is_position
(
POS_FACEUP_DEFENSE
)
&&
is_affected_by_effect
(
EFFECT_DEFENSE_ATTACK
)))
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_ATTACK
))
return
FALSE
;
...
...
@@ -2789,7 +2789,7 @@ int32 card::is_capable_change_position(uint8 playerid) {
return
FALSE
;
if
(
announce_count
>
0
)
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_CHANGE_POSITION
))
return
FALSE
;
...
...
@@ -2857,7 +2857,7 @@ int32 card::is_capable_be_effect_target(effect* peffect, uint8 playerid) {
int32
card
::
is_can_be_fusion_material
(
card
*
fcard
,
uint8
ignore_mon
)
{
if
(
!
ignore_mon
&&
!
(
get_type
()
&
TYPE_MONSTER
))
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
effect_set
eset
;
filter_effect
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
,
&
eset
);
...
...
@@ -2873,7 +2873,7 @@ int32 card::is_can_be_synchro_material(card* scard, card* tuner) {
return
FALSE
;
if
(
scard
&&
current
.
location
==
LOCATION_MZONE
&&
current
.
controler
!=
scard
->
current
.
controler
&&
!
is_affected_by_effect
(
EFFECT_SYNCHRO_MATERIAL
))
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
//special fix for scrap chimera, not perfect yet
if
(
tuner
&&
(
pduel
->
game_field
->
core
.
global_flag
&
GLOBALFLAG_SCRAP_CHIMERA
))
{
...
...
@@ -2905,7 +2905,7 @@ int32 card::is_can_be_xyz_material(card* scard) {
return
FALSE
;
if
(
!
(
get_type
()
&
TYPE_MONSTER
))
return
FALSE
;
if
(
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
effect_set
eset
;
filter_effect
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
,
&
eset
);
...
...
effect.cpp
View file @
aada13bd
...
...
@@ -227,7 +227,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
(
!
available
)
return
FALSE
;
}
if
(
handler
->
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
handler
->
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
if
(
handler
->
is_affected_by_effect
(
EFFECT_CANNOT_TRIGGER
))
return
FALSE
;
...
...
@@ -253,7 +253,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
return
FALSE
;
if
((
type
&
EFFECT_TYPE_FIELD
)
&&
(
handler
->
current
.
controler
!=
playerid
)
&&
!
is_flag
(
EFFECT_FLAG_BOTH_SIDE
))
return
FALSE
;
if
(
handler
->
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
handler
->
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
if
(
handler
->
is_affected_by_effect
(
EFFECT_CANNOT_TRIGGER
))
return
FALSE
;
...
...
field.cpp
View file @
aada13bd
...
...
@@ -907,6 +907,20 @@ void field::filter_affected_cards(effect* peffect, card_set* cset) {
cset
->
insert
(
pcard
);
}
}
if
(
range
&
LOCATION_DECK
)
{
for
(
auto
it
=
player
[
self
].
list_main
.
begin
();
it
!=
player
[
self
].
list_main
.
end
();
++
it
)
{
card
*
pcard
=
*
it
;
if
(
peffect
->
is_target
(
pcard
))
cset
->
insert
(
pcard
);
}
}
if
(
range
&
LOCATION_EXTRA
)
{
for
(
auto
it
=
player
[
self
].
list_extra
.
begin
();
it
!=
player
[
self
].
list_extra
.
end
();
++
it
)
{
card
*
pcard
=
*
it
;
if
(
peffect
->
is_target
(
pcard
))
cset
->
insert
(
pcard
);
}
}
range
=
peffect
->
o_range
;
self
=
1
-
self
;
}
...
...
@@ -2141,7 +2155,7 @@ int32 field::is_player_can_spsummon(effect * peffect, uint32 sumtype, uint8 sump
effect_set
eset
;
if
(
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_SPECIAL_SUMMON
))
return
FALSE
;
if
(
pcard
->
is_
affected_by_effect
(
EFFECT
_FORBIDDEN
))
if
(
pcard
->
is_
status
(
STATUS
_FORBIDDEN
))
return
FALSE
;
sumtype
|=
SUMMON_TYPE_SPECIAL
;
if
(
sumpos
&
POS_FACEDOWN
&&
is_player_affected_by_effect
(
playerid
,
EFFECT_DEVINE_LIGHT
))
...
...
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