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
fb6f13bf
Commit
fb6f13bf
authored
Apr 18, 2017
by
nekrozar
Committed by
VanillaSalt
Apr 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Card.CheckMZoneFromEX (#90)
parent
f3dcd54e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
interpreter.cpp
interpreter.cpp
+1
-0
libcard.cpp
libcard.cpp
+15
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
interpreter.cpp
View file @
fb6f13bf
...
...
@@ -232,6 +232,7 @@ static const struct luaL_Reg cardlib[] = {
{
"ResetNegateEffect"
,
scriptlib
::
card_reset_negate_effect
},
{
"AssumeProperty"
,
scriptlib
::
card_assume_prop
},
{
"SetSPSummonOnce"
,
scriptlib
::
card_set_spsummon_once
},
{
"CheckMZoneFromEX"
,
scriptlib
::
card_check_mzone_from_ex
},
{
NULL
,
NULL
}
};
...
...
libcard.cpp
View file @
fb6f13bf
...
...
@@ -2452,3 +2452,18 @@ int32 scriptlib::card_set_spsummon_once(lua_State *L) {
pcard
->
pduel
->
game_field
->
core
.
global_flag
|=
GLOBALFLAG_SPSUMMON_ONCE
;
return
0
;
}
int32
scriptlib
::
card_check_mzone_from_ex
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
::
card_set
linked_cards
;
for
(
int32
playerid
=
0
;
playerid
<
2
;
++
playerid
)
{
uint32
linked_zone
=
pcard
->
pduel
->
game_field
->
core
.
duel_rule
>=
4
?
pcard
->
pduel
->
game_field
->
get_linked_zone
(
playerid
)
|
(
1u
<<
5
)
|
(
1u
<<
6
)
:
0x1f
;
pcard
->
pduel
->
game_field
->
get_cards_in_zone
(
&
linked_cards
,
linked_zone
,
playerid
);
if
(
linked_cards
.
find
(
pcard
)
!=
linked_cards
.
end
())
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
}
return
1
;
}
scriptlib.h
View file @
fb6f13bf
...
...
@@ -234,6 +234,7 @@ public:
static
int32
card_reset_negate_effect
(
lua_State
*
L
);
static
int32
card_assume_prop
(
lua_State
*
L
);
static
int32
card_set_spsummon_once
(
lua_State
*
L
);
static
int32
card_check_mzone_from_ex
(
lua_State
*
L
);
//Effect functions
static
int32
effect_new
(
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