Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
9dafd063
Commit
9dafd063
authored
Sep 14, 2023
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
958d5ef6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
Classes/ocgcore/interpreter.cpp
Classes/ocgcore/interpreter.cpp
+1
-0
Classes/ocgcore/libduel.cpp
Classes/ocgcore/libduel.cpp
+5
-2
Classes/ocgcore/operations.cpp
Classes/ocgcore/operations.cpp
+13
-0
No files found.
Classes/ocgcore/interpreter.cpp
View file @
9dafd063
...
@@ -40,6 +40,7 @@ interpreter::interpreter(duel* pd): coroutines(256) {
...
@@ -40,6 +40,7 @@ interpreter::interpreter(duel* pd): coroutines(256) {
//extra scripts
//extra scripts
load_script
(
"./script/constant.lua"
);
load_script
(
"./script/constant.lua"
);
load_script
(
"./script/utility.lua"
);
load_script
(
"./script/utility.lua"
);
load_script
(
"./script/procedure.lua"
);
}
}
interpreter
::~
interpreter
()
{
interpreter
::~
interpreter
()
{
lua_close
(
lua_state
);
lua_close
(
lua_state
);
...
...
Classes/ocgcore/libduel.cpp
View file @
9dafd063
...
@@ -613,10 +613,13 @@ int32 scriptlib::duel_sendto_hand(lua_State *L) {
...
@@ -613,10 +613,13 @@ int32 scriptlib::duel_sendto_hand(lua_State *L) {
if
(
lua_isnil
(
L
,
2
)
||
(
playerid
!=
0
&&
playerid
!=
1
))
if
(
lua_isnil
(
L
,
2
)
||
(
playerid
!=
0
&&
playerid
!=
1
))
playerid
=
PLAYER_NONE
;
playerid
=
PLAYER_NONE
;
uint32
reason
=
(
uint32
)
lua_tointeger
(
L
,
3
);
uint32
reason
=
(
uint32
)
lua_tointeger
(
L
,
3
);
uint32
reason_player
=
pduel
->
game_field
->
core
.
reason_player
;
if
(
lua_gettop
(
L
)
>=
4
)
reason_player
=
(
uint32
)
lua_tointeger
(
L
,
4
);
if
(
pcard
)
if
(
pcard
)
pduel
->
game_field
->
send_to
(
pcard
,
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
pduel
->
game_field
->
core
.
reason_player
,
playerid
,
LOCATION_HAND
,
0
,
POS_FACEUP
);
pduel
->
game_field
->
send_to
(
pcard
,
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
reason_player
,
playerid
,
LOCATION_HAND
,
0
,
POS_FACEUP
);
else
else
pduel
->
game_field
->
send_to
(
&
(
pgroup
->
container
),
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
pduel
->
game_field
->
core
.
reason_player
,
playerid
,
LOCATION_HAND
,
0
,
POS_FACEUP
);
pduel
->
game_field
->
send_to
(
&
(
pgroup
->
container
),
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
reason_player
,
playerid
,
LOCATION_HAND
,
0
,
POS_FACEUP
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
duel
*
pduel
=
(
duel
*
)
ctx
;
duel
*
pduel
=
(
duel
*
)
ctx
;
lua_pushinteger
(
L
,
pduel
->
game_field
->
returns
.
ivalue
[
0
]);
lua_pushinteger
(
L
,
pduel
->
game_field
->
returns
.
ivalue
[
0
]);
...
...
Classes/ocgcore/operations.cpp
View file @
9dafd063
...
@@ -500,6 +500,19 @@ int32 field::damage(uint16 step, effect* reason_effect, uint32 reason, uint8 rea
...
@@ -500,6 +500,19 @@ int32 field::damage(uint16 step, effect* reason_effect, uint32 reason, uint8 rea
if
(
val
==
0
)
if
(
val
==
0
)
return
TRUE
;
return
TRUE
;
}
}
eset
.
clear
();
filter_player_effect
(
playerid
,
EFFECT_REPLACE_DAMAGE
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
val
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
reason_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
reason_card
,
PARAM_TYPE_CARD
);
val
=
eset
[
i
]
->
get_value
(
5
);
returns
.
ivalue
[
0
]
=
val
;
if
(
val
==
0
)
return
TRUE
;
}
core
.
units
.
begin
()
->
arg3
=
val
;
core
.
units
.
begin
()
->
arg3
=
val
;
if
(
is_step
)
{
if
(
is_step
)
{
core
.
units
.
begin
()
->
step
=
9
;
core
.
units
.
begin
()
->
step
=
9
;
...
...
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