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
ad36ec4f
Commit
ad36ec4f
authored
Aug 11, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Duel.DisableActionCheck
parent
00bfdd04
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
29 deletions
+40
-29
ocgcore/card.cpp
ocgcore/card.cpp
+24
-28
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+4
-0
ocgcore/interpreter.h
ocgcore/interpreter.h
+2
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+7
-0
ocgcore/scriptlib.cpp
ocgcore/scriptlib.cpp
+2
-1
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
No files found.
ocgcore/card.cpp
View file @
ad36ec4f
...
@@ -1378,40 +1378,36 @@ uint32 card::get_column_zone(int32 loc1, int32 left, int32 right) {
...
@@ -1378,40 +1378,36 @@ uint32 card::get_column_zone(int32 loc1, int32 left, int32 right) {
zones
|=
(
1u
<<
1
)
|
(
1u
<<
(
16
+
3
));
zones
|=
(
1u
<<
1
)
|
(
1u
<<
(
16
+
3
));
if
(
s
==
6
)
if
(
s
==
6
)
zones
|=
(
1u
<<
3
)
|
(
1u
<<
(
16
+
1
));
zones
|=
(
1u
<<
3
)
|
(
1u
<<
(
16
+
1
));
for
(
int32
i
=
1
;
i
<=
left
;
++
i
)
{
for
(
int32
i
=
1
;
i
<=
left
;
++
i
)
{
int32
seq
=
s
-
i
;
int32
seq
=
s
-
i
;
if
(
seq
>=
0
)
{
if
(
s
==
5
)
if
(
seq
<=
4
)
{
seq
=
1
-
i
;
zones
|=
1u
<<
seq
|
1u
<<
(
16
+
(
4
-
seq
));
if
(
s
==
6
)
if
(
loc1
&
LOCATION_MZONE
)
{
seq
=
3
-
i
;
if
(
seq
==
1
)
if
(
seq
>=
0
&&
seq
<=
4
)
{
zones
|=
(
1u
<<
5
)
|
(
1u
<<
(
16
+
6
));
zones
|=
1u
<<
seq
|
1u
<<
(
16
+
(
4
-
seq
));
if
(
seq
==
3
)
if
(
loc1
&
LOCATION_MZONE
)
{
zones
|=
(
1u
<<
6
)
|
(
1u
<<
(
16
+
5
));
if
(
seq
==
1
)
}
zones
|=
(
1u
<<
5
)
|
(
1u
<<
(
16
+
6
));
if
(
seq
==
3
)
zones
|=
(
1u
<<
6
)
|
(
1u
<<
(
16
+
5
));
}
}
if
(
seq
==
5
)
zones
|=
(
1u
<<
1
)
|
(
1u
<<
(
16
+
3
));
if
(
seq
==
6
)
zones
|=
(
1u
<<
3
)
|
(
1u
<<
(
16
+
1
));
}
}
}
}
for
(
int32
i
=
1
;
i
<=
right
;
++
i
)
{
for
(
int32
i
=
1
;
i
<=
right
;
++
i
)
{
int32
seq
=
s
+
i
;
int32
seq
=
s
+
i
;
if
(
seq
<=
6
)
{
if
(
s
==
5
)
if
(
seq
<=
4
)
{
seq
=
1
+
i
;
zones
|=
1u
<<
seq
|
1u
<<
(
16
+
(
4
-
seq
));
if
(
s
==
6
)
if
(
loc1
&
LOCATION_MZONE
)
{
seq
=
3
+
i
;
if
(
seq
==
1
)
if
(
seq
>=
0
&&
seq
<=
4
)
{
zones
|=
(
1u
<<
5
)
|
(
1u
<<
(
16
+
6
));
zones
|=
1u
<<
seq
|
1u
<<
(
16
+
(
4
-
seq
));
if
(
seq
==
3
)
if
(
loc1
&
LOCATION_MZONE
)
{
zones
|=
(
1u
<<
6
)
|
(
1u
<<
(
16
+
5
));
if
(
seq
==
1
)
}
zones
|=
(
1u
<<
5
)
|
(
1u
<<
(
16
+
6
));
if
(
seq
==
3
)
zones
|=
(
1u
<<
6
)
|
(
1u
<<
(
16
+
5
));
}
}
if
(
seq
==
5
)
zones
|=
(
1u
<<
1
)
|
(
1u
<<
(
16
+
3
));
if
(
seq
==
6
)
zones
|=
(
1u
<<
3
)
|
(
1u
<<
(
16
+
1
));
}
}
}
}
return
zones
;
return
zones
;
...
...
ocgcore/interpreter.cpp
View file @
ad36ec4f
...
@@ -355,6 +355,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -355,6 +355,7 @@ static const struct luaL_Reg duellib[] = {
{
"FilterPlayerEffect"
,
scriptlib
::
duel_filter_player_effect
},
{
"FilterPlayerEffect"
,
scriptlib
::
duel_filter_player_effect
},
{
"ReadCard"
,
scriptlib
::
duel_read_card
},
{
"ReadCard"
,
scriptlib
::
duel_read_card
},
{
"Exile"
,
scriptlib
::
duel_exile
},
{
"Exile"
,
scriptlib
::
duel_exile
},
{
"DisableActionCheck"
,
scriptlib
::
duel_disable_action_check
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
...
@@ -579,6 +580,9 @@ interpreter::interpreter(duel* pd): coroutines(256) {
...
@@ -579,6 +580,9 @@ interpreter::interpreter(duel* pd): coroutines(256) {
pduel
=
pd
;
pduel
=
pd
;
no_action
=
0
;
no_action
=
0
;
call_depth
=
0
;
call_depth
=
0
;
//222DIY
disable_action_check
=
0
;
set_duel_info
(
lua_state
,
pd
);
set_duel_info
(
lua_state
,
pd
);
//Initial
//Initial
luaL_openlibs
(
lua_state
);
luaL_openlibs
(
lua_state
);
...
...
ocgcore/interpreter.h
View file @
ad36ec4f
...
@@ -43,6 +43,8 @@ public:
...
@@ -43,6 +43,8 @@ public:
coroutine_map
coroutines
;
coroutine_map
coroutines
;
int32
no_action
;
int32
no_action
;
int32
call_depth
;
int32
call_depth
;
//222DIY
int32
disable_action_check
;
explicit
interpreter
(
duel
*
pd
);
explicit
interpreter
(
duel
*
pd
);
~
interpreter
();
~
interpreter
();
...
...
ocgcore/libduel.cpp
View file @
ad36ec4f
...
@@ -147,6 +147,13 @@ int32 scriptlib::duel_exile(lua_State *L) {
...
@@ -147,6 +147,13 @@ int32 scriptlib::duel_exile(lua_State *L) {
pduel
->
game_field
->
core
.
subunits
.
back
().
type
=
PROCESSOR_SENDTO_S
;
pduel
->
game_field
->
core
.
subunits
.
back
().
type
=
PROCESSOR_SENDTO_S
;
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_exile
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
int32
dis
=
lua_toboolean
(
L
,
1
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
pduel
->
lua
->
disable_action_check
=
dis
;
return
0
;
}
int32
scriptlib
::
duel_enable_global_flag
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_enable_global_flag
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
...
...
ocgcore/scriptlib.cpp
View file @
ad36ec4f
...
@@ -63,9 +63,10 @@ int32 scriptlib::check_param_count(lua_State* L, int32 count) {
...
@@ -63,9 +63,10 @@ int32 scriptlib::check_param_count(lua_State* L, int32 count) {
luaL_error
(
L
,
"%d Parameters are needed."
,
count
);
luaL_error
(
L
,
"%d Parameters are needed."
,
count
);
return
TRUE
;
return
TRUE
;
}
}
//222DIY
int32
scriptlib
::
check_action_permission
(
lua_State
*
L
)
{
int32
scriptlib
::
check_action_permission
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
if
(
pduel
->
lua
->
no_action
)
if
(
pduel
->
lua
->
no_action
&&
!
pduel
->
lua
->
disable_action_check
)
luaL_error
(
L
,
"Action is not allowed here."
);
luaL_error
(
L
,
"Action is not allowed here."
);
return
TRUE
;
return
TRUE
;
}
}
ocgcore/scriptlib.h
View file @
ad36ec4f
...
@@ -26,6 +26,7 @@ public:
...
@@ -26,6 +26,7 @@ public:
static
int32
duel_filter_player_effect
(
lua_State
*
L
);
static
int32
duel_filter_player_effect
(
lua_State
*
L
);
static
int32
duel_read_card
(
lua_State
*
L
);
static
int32
duel_read_card
(
lua_State
*
L
);
static
int32
duel_exile
(
lua_State
*
L
);
static
int32
duel_exile
(
lua_State
*
L
);
static
int32
duel_disable_action_check
(
lua_State
*
L
);
//card lib
//card lib
static
int32
card_get_code
(
lua_State
*
L
);
static
int32
card_get_code
(
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