Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
6c4d2008
Commit
6c4d2008
authored
Nov 18, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updc
parent
80380e11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+13
-5
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+10
-4
No files found.
ocgcore/libcard.cpp
View file @
6c4d2008
...
@@ -1364,11 +1364,20 @@ int32 scriptlib::card_is_has_effect(lua_State *L) {
...
@@ -1364,11 +1364,20 @@ int32 scriptlib::card_is_has_effect(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
code
=
lua_tointeger
(
L
,
2
);
uint32
code
=
lua_tointeger
(
L
,
2
);
if
(
pcard
)
if
(
!
pcard
)
{
interpreter
::
effect2value
(
L
,
pcard
->
is_affected_by_effect
(
code
));
else
lua_pushnil
(
L
);
lua_pushnil
(
L
);
return
1
;
return
1
;
}
effect_set
eset
;
pcard
->
filter_effect
(
code
,
&
eset
);
int32
size
=
eset
.
size
();
if
(
!
size
)
{
lua_pushnil
(
L
);
return
1
;
}
for
(
int32
i
=
0
;
i
<
size
;
++
i
)
interpreter
::
effect2value
(
L
,
eset
[
i
]);
return
size
;
}
}
int32
scriptlib
::
card_reset_effect
(
lua_State
*
L
)
{
int32
scriptlib
::
card_reset_effect
(
lua_State
*
L
)
{
check_param_count
(
L
,
3
);
check_param_count
(
L
,
3
);
...
@@ -1793,7 +1802,6 @@ int32 scriptlib::card_is_can_be_special_summoned(lua_State *L) {
...
@@ -1793,7 +1802,6 @@ int32 scriptlib::card_is_can_be_special_summoned(lua_State *L) {
uint32
sumpos
=
POS_FACEUP
;
uint32
sumpos
=
POS_FACEUP
;
uint32
toplayer
=
sumplayer
;
uint32
toplayer
=
sumplayer
;
uint32
zone
=
0xff
;
uint32
zone
=
0xff
;
uint32
nozoneusedcheck
=
0
;
if
(
lua_gettop
(
L
)
>=
7
)
if
(
lua_gettop
(
L
)
>=
7
)
sumpos
=
lua_tointeger
(
L
,
7
);
sumpos
=
lua_tointeger
(
L
,
7
);
if
(
lua_gettop
(
L
)
>=
8
)
if
(
lua_gettop
(
L
)
>=
8
)
...
...
ocgcore/libduel.cpp
View file @
6c4d2008
...
@@ -3284,9 +3284,16 @@ int32 scriptlib::duel_is_player_affected_by_effect(lua_State *L) {
...
@@ -3284,9 +3284,16 @@ int32 scriptlib::duel_is_player_affected_by_effect(lua_State *L) {
return
1
;
return
1
;
}
}
int32
code
=
lua_tointeger
(
L
,
2
);
int32
code
=
lua_tointeger
(
L
,
2
);
effect
*
peffect
=
pduel
->
game_field
->
is_player_affected_by_effect
(
playerid
,
code
);
effect_set
eset
;
interpreter
::
effect2value
(
L
,
peffect
);
pduel
->
game_field
->
filter_player_effect
(
playerid
,
code
,
&
eset
);
return
1
;
int32
size
=
eset
.
size
();
if
(
!
size
)
{
lua_pushnil
(
L
);
return
1
;
}
for
(
int32
i
=
0
;
i
<
size
;
++
i
)
interpreter
::
effect2value
(
L
,
eset
[
i
]);
return
size
;
}
}
int32
scriptlib
::
duel_is_player_can_draw
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_draw
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
...
@@ -3801,7 +3808,6 @@ int32 scriptlib::duel_majestic_copy(lua_State *L) {
...
@@ -3801,7 +3808,6 @@ int32 scriptlib::duel_majestic_copy(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
ccard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
ccard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
for
(
auto
eit
=
ccard
->
single_effect
.
begin
();
eit
!=
ccard
->
field_effect
.
end
();
++
eit
)
{
for
(
auto
eit
=
ccard
->
single_effect
.
begin
();
eit
!=
ccard
->
field_effect
.
end
();
++
eit
)
{
if
(
eit
==
ccard
->
single_effect
.
end
())
{
if
(
eit
==
ccard
->
single_effect
.
end
())
{
eit
=
ccard
->
field_effect
.
begin
();
eit
=
ccard
->
field_effect
.
begin
();
...
...
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