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
2b5eac4d
Commit
2b5eac4d
authored
Sep 29, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add constant EFFECT_TYPES_CHAIN_LINK
parent
bca4aaeb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
6 deletions
+7
-6
card.cpp
card.cpp
+1
-1
effect.cpp
effect.cpp
+1
-1
effect.h
effect.h
+2
-1
libeffect.cpp
libeffect.cpp
+2
-2
operations.cpp
operations.cpp
+1
-1
No files found.
card.cpp
View file @
2b5eac4d
...
@@ -2526,7 +2526,7 @@ void card::set_special_summon_status(effect* peffect) {
...
@@ -2526,7 +2526,7 @@ void card::set_special_summon_status(effect* peffect) {
}
}
card
*
pcard
=
peffect
->
get_handler
();
card
*
pcard
=
peffect
->
get_handler
();
auto
cait
=
pduel
->
game_field
->
core
.
current_chain
.
rbegin
();
auto
cait
=
pduel
->
game_field
->
core
.
current_chain
.
rbegin
();
if
(
!
(
peffect
->
type
&
0x7f0
)
||
(
pcard
->
is_has_relation
(
*
cait
)
&&
!
(
pcard
->
get_type
()
&
TYPE_TRAPMONSTER
)))
{
if
(
!
(
peffect
->
type
&
EFFECT_TYPES_CHAIN_LINK
)
||
(
pcard
->
is_has_relation
(
*
cait
)
&&
!
(
pcard
->
get_type
()
&
TYPE_TRAPMONSTER
)))
{
spsummon
.
code
=
pcard
->
get_code
();
spsummon
.
code
=
pcard
->
get_code
();
spsummon
.
code2
=
pcard
->
get_another_code
();
spsummon
.
code2
=
pcard
->
get_another_code
();
spsummon
.
type
=
pcard
->
get_type
();
spsummon
.
type
=
pcard
->
get_type
();
...
...
effect.cpp
View file @
2b5eac4d
...
@@ -841,7 +841,7 @@ void effect::set_active_type() {
...
@@ -841,7 +841,7 @@ void effect::set_active_type() {
active_type
&=
~
TYPE_TRAP
;
active_type
&=
~
TYPE_TRAP
;
}
}
uint32
effect
::
get_active_type
(
uint8
uselast
)
{
uint32
effect
::
get_active_type
(
uint8
uselast
)
{
if
(
type
&
0x7f0
)
{
if
(
type
&
EFFECT_TYPES_CHAIN_LINK
)
{
if
(
active_type
&&
uselast
)
if
(
active_type
&&
uselast
)
return
active_type
;
return
active_type
;
else
if
((
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
get_handler
()
->
data
.
type
&
TYPE_PENDULUM
))
else
if
((
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
get_handler
()
->
data
.
type
&
TYPE_PENDULUM
))
...
...
effect.h
View file @
2b5eac4d
...
@@ -171,7 +171,8 @@ public:
...
@@ -171,7 +171,8 @@ public:
#define EFFECT_TYPE_GRANT 0x2000 //
#define EFFECT_TYPE_GRANT 0x2000 //
#define EFFECT_TYPE_TARGET 0x4000 //
#define EFFECT_TYPE_TARGET 0x4000 //
#define EFFECT_TYPES_TRIGGER_LIKE (EFFECT_TYPE_ACTIVATE | EFFECT_TYPE_TRIGGER_O | EFFECT_TYPE_TRIGGER_F | EFFECT_TYPE_QUICK_O | EFFECT_TYPE_QUICK_F)
constexpr
uint32
EFFECT_TYPES_TRIGGER_LIKE
=
EFFECT_TYPE_ACTIVATE
|
EFFECT_TYPE_TRIGGER_O
|
EFFECT_TYPE_TRIGGER_F
|
EFFECT_TYPE_QUICK_O
|
EFFECT_TYPE_QUICK_F
;
constexpr
uint32
EFFECT_TYPES_CHAIN_LINK
=
EFFECT_TYPES_TRIGGER_LIKE
|
EFFECT_TYPE_FLIP
|
EFFECT_TYPE_IGNITION
;
//========== Flags ==========
//========== Flags ==========
enum
effect_flag
:
uint32
{
enum
effect_flag
:
uint32
{
...
...
libeffect.cpp
View file @
2b5eac4d
...
@@ -147,7 +147,7 @@ int32 scriptlib::effect_set_type(lua_State *L) {
...
@@ -147,7 +147,7 @@ int32 scriptlib::effect_set_type(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
uint32
v
=
(
uint32
)
lua_tointeger
(
L
,
2
);
uint32
v
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(
v
&
0x0ff0
)
if
(
v
&
(
EFFECT_TYPES_CHAIN_LINK
|
EFFECT_TYPE_CONTINUOUS
)
)
v
|=
EFFECT_TYPE_ACTIONS
;
v
|=
EFFECT_TYPE_ACTIONS
;
else
else
v
&=
~
EFFECT_TYPE_ACTIONS
;
v
&=
~
EFFECT_TYPE_ACTIONS
;
...
@@ -518,7 +518,7 @@ int32 scriptlib::effect_is_activated(lua_State *L) {
...
@@ -518,7 +518,7 @@ int32 scriptlib::effect_is_activated(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
lua_pushboolean
(
L
,
(
peffect
->
type
&
0x7f0
));
lua_pushboolean
(
L
,
(
peffect
->
type
&
EFFECT_TYPES_CHAIN_LINK
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
effect_is_cost_checked
(
lua_State
*
L
)
{
int32
scriptlib
::
effect_is_cost_checked
(
lua_State
*
L
)
{
...
...
operations.cpp
View file @
2b5eac4d
...
@@ -4915,7 +4915,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
...
@@ -4915,7 +4915,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
flips
.
insert
(
pcard
);
flips
.
insert
(
pcard
);
}
}
if
(
enable
)
{
if
(
enable
)
{
if
(
!
reason_effect
||
!
(
reason_effect
->
type
&
0x7f0
)
||
pcard
->
current
.
location
!=
LOCATION_MZONE
)
if
(
!
reason_effect
||
!
(
reason_effect
->
type
&
EFFECT_TYPES_CHAIN_LINK
)
||
pcard
->
current
.
location
!=
LOCATION_MZONE
)
pcard
->
enable_field_effect
(
true
);
pcard
->
enable_field_effect
(
true
);
else
else
core
.
delayed_enable_set
.
insert
(
pcard
);
core
.
delayed_enable_set
.
insert
(
pcard
);
...
...
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