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
xiaoye
ygopro-core
Commits
944dca8f
Commit
944dca8f
authored
Nov 16, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove duplicate thing
parent
112630ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
52 deletions
+0
-52
libduel.cpp
libduel.cpp
+0
-52
No files found.
libduel.cpp
View file @
944dca8f
...
...
@@ -13,57 +13,6 @@
#include "group.h"
#include "ocgapi.h"
int32
scriptlib
::
duel_select_field
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
4
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
uint32
flag1
=
lua_tointeger
(
L
,
2
);
uint32
flag2
=
lua_tointeger
(
L
,
3
);
uint32
count
=
lua_tointeger
(
L
,
4
);
if
(
count
==
0
)
return
0
;
uint32
flag
=
(
flag1
&
0xffff
)
|
(
flag2
<<
16
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
if
(
pduel
->
game_field
->
core
.
duel_rule
>=
4
)
{
flag
=
(
flag
|
(
0xffffffff
-
0x3f7f3f7f
));
card
*
pcard_1
=
pduel
->
game_field
->
get_field_card
(
1
-
playerid
,
LOCATION_MZONE
,
6
);
card
*
pcard_2
=
pduel
->
game_field
->
get_field_card
(
1
-
playerid
,
LOCATION_MZONE
,
5
);
if
(
pcard_1
&&
pcard_2
)
{
flag
=
(
flag
|
(
0xffffffff
-
0xff7fff1f
));
}
else
if
(
!
pcard_1
&&
pcard_2
)
{
flag
=
(
flag
|
(
0xffffffff
-
0xff5fff3f
));
}
else
if
(
pcard_1
&&
!
pcard_2
)
{
flag
=
(
flag
|
(
0xffffffff
-
0xff3fff5f
));
}
else
{
flag
=
(
flag
|
(
0xffffffff
-
0xff1fff7f
));
}
}
else
{
flag
=
(
flag
|
(
0xffffffff
-
0xff1fff1f
));
}
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_DISFIELD
,
0
,
0
,
0
,
playerid
,
flag
,
count
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
duel
*
pduel
=
(
duel
*
)
ctx
;
int32
playerid
=
lua_tointeger
(
L
,
1
);
uint32
count
=
lua_tointeger
(
L
,
2
);
int32
dfflag
=
0
;
uint8
pa
=
0
;
for
(
uint32
i
=
0
;
i
<
count
;
++
i
)
{
uint8
p
=
pduel
->
game_field
->
returns
.
bvalue
[
pa
];
uint8
l
=
pduel
->
game_field
->
returns
.
bvalue
[
pa
+
1
];
uint8
s
=
pduel
->
game_field
->
returns
.
bvalue
[
pa
+
2
];
dfflag
|=
0x1u
<<
(
s
+
(
p
==
playerid
?
0
:
16
)
+
(
l
==
LOCATION_MZONE
?
0
:
8
));
pa
+=
3
;
}
if
(
dfflag
&
(
0x1
<<
5
))
dfflag
|=
0x1
<<
(
16
+
6
);
if
(
dfflag
&
(
0x1
<<
6
))
dfflag
|=
0x1
<<
(
16
+
5
);
lua_pushinteger
(
L
,
dfflag
);
return
1
;
});
}
int32
scriptlib
::
duel_get_master_rule
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushinteger
(
L
,
pduel
->
game_field
->
core
.
duel_rule
);
...
...
@@ -4760,7 +4709,6 @@ int32 scriptlib::duel_majestic_copy(lua_State *L) {
}
static
const
struct
luaL_Reg
duellib
[]
=
{
{
"SelectField"
,
scriptlib
::
duel_select_field
},
{
"GetMasterRule"
,
scriptlib
::
duel_get_master_rule
},
{
"ReadCard"
,
scriptlib
::
duel_read_card
},
{
"Exile"
,
scriptlib
::
duel_exile
},
...
...
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