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
c8a18d35
Commit
c8a18d35
authored
Apr 05, 2024
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add card::is_treated_as_not_on_field
parent
d4e635f4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
16 deletions
+20
-16
card.cpp
card.cpp
+6
-4
card.h
card.h
+1
-0
effect.cpp
effect.cpp
+1
-1
field.cpp
field.cpp
+5
-5
libcard.cpp
libcard.cpp
+7
-6
No files found.
card.cpp
View file @
c8a18d35
...
@@ -1286,8 +1286,7 @@ int32 card::is_link_marker(uint32 dir) {
...
@@ -1286,8 +1286,7 @@ int32 card::is_link_marker(uint32 dir) {
return
(
int32
)(
get_link_marker
()
&
dir
);
return
(
int32
)(
get_link_marker
()
&
dir
);
}
}
uint32
card
::
get_linked_zone
()
{
uint32
card
::
get_linked_zone
()
{
if
(
!
(
data
.
type
&
TYPE_LINK
)
||
current
.
location
!=
LOCATION_MZONE
if
(
!
(
data
.
type
&
TYPE_LINK
)
||
current
.
location
!=
LOCATION_MZONE
||
is_treated_as_not_on_field
())
||
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_SPSUMMON_STEP
))
return
0
;
return
0
;
int32
zones
=
0
;
int32
zones
=
0
;
int32
s
=
current
.
sequence
;
int32
s
=
current
.
sequence
;
...
@@ -1343,8 +1342,7 @@ void card::get_linked_cards(card_set* cset) {
...
@@ -1343,8 +1342,7 @@ void card::get_linked_cards(card_set* cset) {
pduel
->
game_field
->
get_cards_in_zone
(
cset
,
linked_zone
>>
16
,
1
-
p
,
LOCATION_MZONE
);
pduel
->
game_field
->
get_cards_in_zone
(
cset
,
linked_zone
>>
16
,
1
-
p
,
LOCATION_MZONE
);
}
}
uint32
card
::
get_mutual_linked_zone
()
{
uint32
card
::
get_mutual_linked_zone
()
{
if
(
!
(
data
.
type
&
TYPE_LINK
)
||
current
.
location
!=
LOCATION_MZONE
if
(
!
(
data
.
type
&
TYPE_LINK
)
||
current
.
location
!=
LOCATION_MZONE
||
is_treated_as_not_on_field
())
||
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_SPSUMMON_STEP
))
return
0
;
return
0
;
int32
zones
=
0
;
int32
zones
=
0
;
int32
p
=
current
.
controler
;
int32
p
=
current
.
controler
;
...
@@ -1507,6 +1505,10 @@ int32 card::is_all_column() {
...
@@ -1507,6 +1505,10 @@ int32 card::is_all_column() {
return
TRUE
;
return
TRUE
;
return
FALSE
;
return
FALSE
;
}
}
int32
card
::
is_treated_as_not_on_field
()
{
return
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
|
STATUS_SPSUMMON_STEP
);
}
void
card
::
equip
(
card
*
target
,
uint32
send_msg
)
{
void
card
::
equip
(
card
*
target
,
uint32
send_msg
)
{
if
(
equiping_target
)
if
(
equiping_target
)
return
;
return
;
...
...
card.h
View file @
c8a18d35
...
@@ -268,6 +268,7 @@ public:
...
@@ -268,6 +268,7 @@ public:
uint32
get_column_zone
(
int32
location
);
uint32
get_column_zone
(
int32
location
);
void
get_column_cards
(
card_set
*
cset
);
void
get_column_cards
(
card_set
*
cset
);
int32
is_all_column
();
int32
is_all_column
();
int32
is_treated_as_not_on_field
();
void
equip
(
card
*
target
,
uint32
send_msg
=
TRUE
);
void
equip
(
card
*
target
,
uint32
send_msg
=
TRUE
);
void
unequip
();
void
unequip
();
...
...
effect.cpp
View file @
c8a18d35
...
@@ -473,7 +473,7 @@ int32 effect::is_target(card* pcard) {
...
@@ -473,7 +473,7 @@ int32 effect::is_target(card* pcard) {
&&
!
pcard
->
is_position
(
POS_FACEUP
))
&&
!
pcard
->
is_position
(
POS_FACEUP
))
return
FALSE
;
return
FALSE
;
if
(
!
is_flag
(
EFFECT_FLAG_IGNORE_RANGE
))
{
if
(
!
is_flag
(
EFFECT_FLAG_IGNORE_RANGE
))
{
if
(
pcard
->
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
|
STATUS_SPSUMMON_STEP
))
if
(
pcard
->
is_treated_as_not_on_field
(
))
return
FALSE
;
return
FALSE
;
if
(
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
if
(
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
return
FALSE
;
return
FALSE
;
...
...
field.cpp
View file @
c8a18d35
...
@@ -1446,7 +1446,7 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui
...
@@ -1446,7 +1446,7 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui
for
(
uint32
p
=
0
;
p
<
2
;
++
p
)
{
for
(
uint32
p
=
0
;
p
<
2
;
++
p
)
{
if
(
location
&
LOCATION_MZONE
)
{
if
(
location
&
LOCATION_MZONE
)
{
for
(
auto
&
pcard
:
player
[
self
].
list_mzone
)
{
for
(
auto
&
pcard
:
player
[
self
].
list_mzone
)
{
if
(
pcard
&&
!
pcard
->
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_SPSUMMON_STEP
)
if
(
pcard
&&
!
pcard
->
is_treated_as_not_on_field
(
)
&&
pcard
!=
pexception
&&
!
(
pexgroup
&&
pexgroup
->
has_card
(
pcard
))
&&
pcard
!=
pexception
&&
!
(
pexgroup
&&
pexgroup
->
has_card
(
pcard
))
&&
pduel
->
lua
->
check_matching
(
pcard
,
findex
,
extraargs
)
&&
pduel
->
lua
->
check_matching
(
pcard
,
findex
,
extraargs
)
&&
(
!
is_target
||
pcard
->
is_capable_be_effect_target
(
core
.
reason_effect
,
core
.
reason_player
)))
{
&&
(
!
is_target
||
pcard
->
is_capable_be_effect_target
(
core
.
reason_effect
,
core
.
reason_player
)))
{
...
@@ -1465,7 +1465,7 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui
...
@@ -1465,7 +1465,7 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui
}
}
if
(
location
&
LOCATION_SZONE
)
{
if
(
location
&
LOCATION_SZONE
)
{
for
(
auto
&
pcard
:
player
[
self
].
list_szone
)
{
for
(
auto
&
pcard
:
player
[
self
].
list_szone
)
{
if
(
pcard
&&
!
pcard
->
is_
status
(
STATUS_ACTIVATE_DISABLED
)
if
(
pcard
&&
!
pcard
->
is_
treated_as_not_on_field
(
)
&&
pcard
!=
pexception
&&
!
(
pexgroup
&&
pexgroup
->
has_card
(
pcard
))
&&
pcard
!=
pexception
&&
!
(
pexgroup
&&
pexgroup
->
has_card
(
pcard
))
&&
pduel
->
lua
->
check_matching
(
pcard
,
findex
,
extraargs
)
&&
pduel
->
lua
->
check_matching
(
pcard
,
findex
,
extraargs
)
&&
(
!
is_target
||
pcard
->
is_capable_be_effect_target
(
core
.
reason_effect
,
core
.
reason_player
)))
{
&&
(
!
is_target
||
pcard
->
is_capable_be_effect_target
(
core
.
reason_effect
,
core
.
reason_player
)))
{
...
@@ -1484,7 +1484,7 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui
...
@@ -1484,7 +1484,7 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui
}
}
if
(
location
&
LOCATION_FZONE
)
{
if
(
location
&
LOCATION_FZONE
)
{
card
*
pcard
=
player
[
self
].
list_szone
[
5
];
card
*
pcard
=
player
[
self
].
list_szone
[
5
];
if
(
pcard
&&
!
pcard
->
is_
status
(
STATUS_ACTIVATE_DISABLED
)
if
(
pcard
&&
!
pcard
->
is_
treated_as_not_on_field
(
)
&&
pcard
!=
pexception
&&
!
(
pexgroup
&&
pexgroup
->
has_card
(
pcard
))
&&
pcard
!=
pexception
&&
!
(
pexgroup
&&
pexgroup
->
has_card
(
pcard
))
&&
pduel
->
lua
->
check_matching
(
pcard
,
findex
,
extraargs
)
&&
pduel
->
lua
->
check_matching
(
pcard
,
findex
,
extraargs
)
&&
(
!
is_target
||
pcard
->
is_capable_be_effect_target
(
core
.
reason_effect
,
core
.
reason_player
)))
{
&&
(
!
is_target
||
pcard
->
is_capable_be_effect_target
(
core
.
reason_effect
,
core
.
reason_player
)))
{
...
@@ -1503,7 +1503,7 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui
...
@@ -1503,7 +1503,7 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui
if
(
location
&
LOCATION_PZONE
)
{
if
(
location
&
LOCATION_PZONE
)
{
for
(
int32
i
=
0
;
i
<
2
;
++
i
)
{
for
(
int32
i
=
0
;
i
<
2
;
++
i
)
{
card
*
pcard
=
player
[
self
].
list_szone
[
core
.
duel_rule
>=
4
?
i
*
4
:
i
+
6
];
card
*
pcard
=
player
[
self
].
list_szone
[
core
.
duel_rule
>=
4
?
i
*
4
:
i
+
6
];
if
(
pcard
&&
pcard
->
current
.
pzone
&&
!
pcard
->
is_
status
(
STATUS_ACTIVATE_DISABLED
)
if
(
pcard
&&
pcard
->
current
.
pzone
&&
!
pcard
->
is_
treated_as_not_on_field
(
)
&&
pcard
!=
pexception
&&
!
(
pexgroup
&&
pexgroup
->
has_card
(
pcard
))
&&
pcard
!=
pexception
&&
!
(
pexgroup
&&
pexgroup
->
has_card
(
pcard
))
&&
pduel
->
lua
->
check_matching
(
pcard
,
findex
,
extraargs
)
&&
pduel
->
lua
->
check_matching
(
pcard
,
findex
,
extraargs
)
&&
(
!
is_target
||
pcard
->
is_capable_be_effect_target
(
core
.
reason_effect
,
core
.
reason_player
)))
{
&&
(
!
is_target
||
pcard
->
is_capable_be_effect_target
(
core
.
reason_effect
,
core
.
reason_player
)))
{
...
@@ -1895,7 +1895,7 @@ void field::get_ritual_material(uint8 playerid, effect* peffect, card_set* mater
...
@@ -1895,7 +1895,7 @@ void field::get_ritual_material(uint8 playerid, effect* peffect, card_set* mater
void
field
::
get_fusion_material
(
uint8
playerid
,
card_set
*
material_all
,
card_set
*
material_base
,
uint32
location
)
{
void
field
::
get_fusion_material
(
uint8
playerid
,
card_set
*
material_all
,
card_set
*
material_base
,
uint32
location
)
{
if
(
location
&
LOCATION_MZONE
)
{
if
(
location
&
LOCATION_MZONE
)
{
for
(
auto
&
pcard
:
player
[
playerid
].
list_mzone
)
{
for
(
auto
&
pcard
:
player
[
playerid
].
list_mzone
)
{
if
(
pcard
&&
!
pcard
->
is_
status
(
STATUS_SUMMONING
))
if
(
pcard
&&
!
pcard
->
is_
treated_as_not_on_field
(
))
material_base
->
insert
(
pcard
);
material_base
->
insert
(
pcard
);
}
}
}
}
...
...
libcard.cpp
View file @
c8a18d35
...
@@ -824,7 +824,7 @@ int32 scriptlib::card_get_location(lua_State *L) {
...
@@ -824,7 +824,7 @@ int32 scriptlib::card_get_location(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
pcard
->
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
|
STATUS_SPSUMMON_STEP
))
if
(
pcard
->
is_treated_as_not_on_field
(
))
lua_pushinteger
(
L
,
0
);
lua_pushinteger
(
L
,
0
);
else
else
lua_pushinteger
(
L
,
pcard
->
current
.
location
);
lua_pushinteger
(
L
,
pcard
->
current
.
location
);
...
@@ -2613,8 +2613,7 @@ int32 scriptlib::card_is_onfield(lua_State *L) {
...
@@ -2613,8 +2613,7 @@ int32 scriptlib::card_is_onfield(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
((
pcard
->
current
.
location
&
LOCATION_ONFIELD
)
if
((
pcard
->
current
.
location
&
LOCATION_ONFIELD
)
&&
!
pcard
->
is_treated_as_not_on_field
())
&&
!
pcard
->
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
|
STATUS_SPSUMMON_STEP
))
lua_pushboolean
(
L
,
1
);
lua_pushboolean
(
L
,
1
);
else
else
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
...
@@ -2625,13 +2624,15 @@ int32 scriptlib::card_is_location(lua_State *L) {
...
@@ -2625,13 +2624,15 @@ int32 scriptlib::card_is_location(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
loc
=
(
uint32
)
lua_tointeger
(
L
,
2
);
uint32
loc
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(
pcard
->
current
.
location
==
LOCATION_MZONE
)
{
if
(
pcard
->
is_treated_as_not_on_field
())
{
if
((
loc
&
LOCATION_MZONE
)
&&
!
pcard
->
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_SPSUMMON_STEP
))
lua_pushboolean
(
L
,
0
);
}
else
if
(
pcard
->
current
.
location
==
LOCATION_MZONE
)
{
if
(
loc
&
LOCATION_MZONE
)
lua_pushboolean
(
L
,
1
);
lua_pushboolean
(
L
,
1
);
else
else
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
}
else
if
(
pcard
->
current
.
location
==
LOCATION_SZONE
)
{
}
else
if
(
pcard
->
current
.
location
==
LOCATION_SZONE
)
{
if
(
pcard
->
current
.
is_location
(
loc
)
&&
!
pcard
->
is_status
(
STATUS_ACTIVATE_DISABLED
)
)
if
(
pcard
->
current
.
is_location
(
loc
))
lua_pushboolean
(
L
,
1
);
lua_pushboolean
(
L
,
1
);
else
else
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
...
...
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