Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
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
赤子奈落
YGOProUnity_V2
Commits
c5909e9e
Commit
c5909e9e
authored
Jun 30, 2021
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update ocgcore
parent
7958581b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
12 deletions
+29
-12
AI_core_vs2017solution/ocgcore/libcard.cpp
AI_core_vs2017solution/ocgcore/libcard.cpp
+13
-8
AI_core_vs2017solution/ocgcore/libduel.cpp
AI_core_vs2017solution/ocgcore/libduel.cpp
+7
-3
AI_core_vs2017solution/ocgcore/playerop.cpp
AI_core_vs2017solution/ocgcore/playerop.cpp
+8
-1
AI_core_vs2017solution/ocgcore/scriptlib.h
AI_core_vs2017solution/ocgcore/scriptlib.h
+1
-0
Assets/Plugins/x64/ocgcore.dll
Assets/Plugins/x64/ocgcore.dll
+0
-0
Assets/Plugins/x86/ocgcore.dll
Assets/Plugins/x86/ocgcore.dll
+0
-0
No files found.
AI_core_vs2017solution/ocgcore/libcard.cpp
View file @
c5909e9e
...
@@ -757,6 +757,14 @@ int32 scriptlib::card_get_previous_controler(lua_State *L) {
...
@@ -757,6 +757,14 @@ int32 scriptlib::card_get_previous_controler(lua_State *L) {
lua_pushinteger
(
L
,
pcard
->
previous
.
controler
);
lua_pushinteger
(
L
,
pcard
->
previous
.
controler
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_set_reason
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
reason
=
(
uint32
)
lua_tointeger
(
L
,
2
);
pcard
->
current
.
reason
=
reason
;
return
0
;
}
int32
scriptlib
::
card_get_reason
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_reason
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
@@ -1724,22 +1732,18 @@ int32 scriptlib::card_is_has_effect(lua_State *L) {
...
@@ -1724,22 +1732,18 @@ int32 scriptlib::card_is_has_effect(lua_State *L) {
}
}
effect_set
eset
;
effect_set
eset
;
pcard
->
filter_effect
(
code
,
&
eset
);
pcard
->
filter_effect
(
code
,
&
eset
);
int32
size
=
eset
.
size
();
if
(
!
size
)
{
lua_pushnil
(
L
);
return
1
;
}
int32
check_player
=
PLAYER_NONE
;
int32
check_player
=
PLAYER_NONE
;
if
(
lua_gettop
(
L
)
>=
3
)
{
if
(
lua_gettop
(
L
)
>=
3
)
{
check_player
=
(
int32
)
lua_tointeger
(
L
,
3
);
check_player
=
(
int32
)
lua_tointeger
(
L
,
3
);
if
(
check_player
>
PLAYER_NONE
)
if
(
check_player
>
PLAYER_NONE
)
check_player
=
PLAYER_NONE
;
check_player
=
PLAYER_NONE
;
}
}
int32
size
=
0
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
check_player
==
PLAYER_NONE
||
eset
[
i
]
->
check_count_limit
(
check_player
))
if
(
check_player
==
PLAYER_NONE
||
eset
[
i
]
->
check_count_limit
(
check_player
))
{
interpreter
::
effect2value
(
L
,
eset
[
i
]);
interpreter
::
effect2value
(
L
,
eset
[
i
]);
else
size
++
;
size
--
;
}
}
}
if
(
!
size
)
{
if
(
!
size
)
{
lua_pushnil
(
L
);
lua_pushnil
(
L
);
...
@@ -3292,6 +3296,7 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -3292,6 +3296,7 @@ static const struct luaL_Reg cardlib[] = {
{
"GetOwner"
,
scriptlib
::
card_get_owner
},
{
"GetOwner"
,
scriptlib
::
card_get_owner
},
{
"GetControler"
,
scriptlib
::
card_get_controler
},
{
"GetControler"
,
scriptlib
::
card_get_controler
},
{
"GetPreviousControler"
,
scriptlib
::
card_get_previous_controler
},
{
"GetPreviousControler"
,
scriptlib
::
card_get_previous_controler
},
{
"SetReason"
,
scriptlib
::
card_set_reason
},
{
"GetReason"
,
scriptlib
::
card_get_reason
},
{
"GetReason"
,
scriptlib
::
card_get_reason
},
{
"GetReasonCard"
,
scriptlib
::
card_get_reason_card
},
{
"GetReasonCard"
,
scriptlib
::
card_get_reason_card
},
{
"GetReasonPlayer"
,
scriptlib
::
card_get_reason_player
},
{
"GetReasonPlayer"
,
scriptlib
::
card_get_reason_player
},
...
...
AI_core_vs2017solution/ocgcore/libduel.cpp
View file @
c5909e9e
...
@@ -3951,13 +3951,17 @@ int32 scriptlib::duel_is_player_affected_by_effect(lua_State *L) {
...
@@ -3951,13 +3951,17 @@ int32 scriptlib::duel_is_player_affected_by_effect(lua_State *L) {
int32
code
=
(
int32
)
lua_tointeger
(
L
,
2
);
int32
code
=
(
int32
)
lua_tointeger
(
L
,
2
);
effect_set
eset
;
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
code
,
&
eset
);
pduel
->
game_field
->
filter_player_effect
(
playerid
,
code
,
&
eset
);
int32
size
=
eset
.
size
();
int32
size
=
0
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
eset
[
i
]
->
check_count_limit
(
playerid
))
{
interpreter
::
effect2value
(
L
,
eset
[
i
]);
size
++
;
}
}
if
(
!
size
)
{
if
(
!
size
)
{
lua_pushnil
(
L
);
lua_pushnil
(
L
);
return
1
;
return
1
;
}
}
for
(
int32
i
=
0
;
i
<
size
;
++
i
)
interpreter
::
effect2value
(
L
,
eset
[
i
]);
return
size
;
return
size
;
}
}
int32
scriptlib
::
duel_is_player_can_draw
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_draw
(
lua_State
*
L
)
{
...
...
AI_core_vs2017solution/ocgcore/playerop.cpp
View file @
c5909e9e
...
@@ -432,16 +432,23 @@ int32 field::select_place(uint16 step, uint8 playerid, uint32 flag, uint8 count)
...
@@ -432,16 +432,23 @@ int32 field::select_place(uint16 step, uint8 playerid, uint32 flag, uint8 count)
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
uint8
pt
=
0
;
uint8
pt
=
0
;
uint32
selected
=
0
;
for
(
int8
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int8
i
=
0
;
i
<
count
;
++
i
)
{
uint8
p
=
returns
.
bvalue
[
pt
];
uint8
p
=
returns
.
bvalue
[
pt
];
uint8
l
=
returns
.
bvalue
[
pt
+
1
];
uint8
l
=
returns
.
bvalue
[
pt
+
1
];
uint8
s
=
returns
.
bvalue
[
pt
+
2
];
uint8
s
=
returns
.
bvalue
[
pt
+
2
];
uint32
sel
=
0x1u
<<
(
s
+
(
p
==
playerid
?
0
:
16
)
+
(
l
==
LOCATION_MZONE
?
0
:
8
));
if
((
p
!=
0
&&
p
!=
1
)
if
((
p
!=
0
&&
p
!=
1
)
||
((
l
!=
LOCATION_MZONE
)
&&
(
l
!=
LOCATION_SZONE
))
||
((
l
!=
LOCATION_MZONE
)
&&
(
l
!=
LOCATION_SZONE
))
||
(
(
0x1u
<<
s
)
&
(
flag
>>
(((
p
==
playerid
)
?
0
:
16
)
+
((
l
==
LOCATION_MZONE
)
?
0
:
8
)))
))
{
||
(
sel
&
flag
)
||
(
sel
&
selected
))
{
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
}
}
if
(
sel
&
(
0x1
<<
5
))
sel
|=
0x1
<<
(
16
+
6
);
if
(
sel
&
(
0x1
<<
6
))
sel
|=
0x1
<<
(
16
+
5
);
selected
|=
sel
;
pt
+=
3
;
pt
+=
3
;
}
}
return
TRUE
;
return
TRUE
;
...
...
AI_core_vs2017solution/ocgcore/scriptlib.h
View file @
c5909e9e
...
@@ -88,6 +88,7 @@ public:
...
@@ -88,6 +88,7 @@ public:
static
int32
card_get_owner
(
lua_State
*
L
);
static
int32
card_get_owner
(
lua_State
*
L
);
static
int32
card_get_controler
(
lua_State
*
L
);
static
int32
card_get_controler
(
lua_State
*
L
);
static
int32
card_get_previous_controler
(
lua_State
*
L
);
static
int32
card_get_previous_controler
(
lua_State
*
L
);
static
int32
card_set_reason
(
lua_State
*
L
);
static
int32
card_get_reason
(
lua_State
*
L
);
static
int32
card_get_reason
(
lua_State
*
L
);
static
int32
card_get_reason_card
(
lua_State
*
L
);
static
int32
card_get_reason_card
(
lua_State
*
L
);
static
int32
card_get_reason_player
(
lua_State
*
L
);
static
int32
card_get_reason_player
(
lua_State
*
L
);
...
...
Assets/Plugins/x64/ocgcore.dll
View file @
c5909e9e
No preview for this file type
Assets/Plugins/x86/ocgcore.dll
View file @
c5909e9e
No preview for this file type
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