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
4bedd847
Commit
4bedd847
authored
Jun 27, 2020
by
salix5
Committed by
GitHub
Jun 27, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #316 from Fluorohydride/union
Card.CheckUnionTarget()
parents
da5bd916
6dee9cc2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
effect.h
effect.h
+1
-0
libcard.cpp
libcard.cpp
+15
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
effect.h
View file @
4bedd847
...
...
@@ -275,6 +275,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_DUAL_STATUS 75 //
#define EFFECT_EQUIP_LIMIT 76 //
#define EFFECT_DUAL_SUMMONABLE 77 //
#define EFFECT_UNION_LIMIT 78 //
#define EFFECT_REVERSE_DAMAGE 80 //
#define EFFECT_REVERSE_RECOVER 81 //
#define EFFECT_CHANGE_DAMAGE 82 //
...
...
libcard.cpp
View file @
4bedd847
...
...
@@ -1303,6 +1303,20 @@ int32 scriptlib::card_check_equip_target(lua_State *L) {
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
card_check_union_target
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
target
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
if
(
pcard
->
is_affected_by_effect
(
EFFECT_UNION_LIMIT
,
target
)
&&
((
!
pcard
->
is_affected_by_effect
(
EFFECT_OLDUNION_STATUS
)
||
target
->
get_union_count
()
==
0
)
&&
(
!
pcard
->
is_affected_by_effect
(
EFFECT_UNION_STATUS
)
||
target
->
get_old_union_count
()
==
0
)))
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
card_get_union_count
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
@@ -3221,6 +3235,7 @@ static const struct luaL_Reg cardlib[] = {
{
"GetEquipTarget"
,
scriptlib
::
card_get_equip_target
},
{
"GetPreviousEquipTarget"
,
scriptlib
::
card_get_pre_equip_target
},
{
"CheckEquipTarget"
,
scriptlib
::
card_check_equip_target
},
{
"CheckUnionTarget"
,
scriptlib
::
card_check_union_target
},
{
"GetUnionCount"
,
scriptlib
::
card_get_union_count
},
{
"GetOverlayGroup"
,
scriptlib
::
card_get_overlay_group
},
{
"GetOverlayCount"
,
scriptlib
::
card_get_overlay_count
},
...
...
scriptlib.h
View file @
4bedd847
...
...
@@ -138,6 +138,7 @@ public:
static
int32
card_get_equip_target
(
lua_State
*
L
);
static
int32
card_get_pre_equip_target
(
lua_State
*
L
);
static
int32
card_check_equip_target
(
lua_State
*
L
);
static
int32
card_check_union_target
(
lua_State
*
L
);
static
int32
card_get_union_count
(
lua_State
*
L
);
static
int32
card_get_overlay_group
(
lua_State
*
L
);
static
int32
card_get_overlay_count
(
lua_State
*
L
);
...
...
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