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
7c1a1ac1
Commit
7c1a1ac1
authored
Aug 14, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
0632b0a0
5ba39d79
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
libduel.cpp
libduel.cpp
+15
-0
processor.cpp
processor.cpp
+1
-1
scriptlib.h
scriptlib.h
+1
-0
No files found.
libduel.cpp
View file @
7c1a1ac1
...
...
@@ -2226,6 +2226,20 @@ int32 scriptlib::duel_get_first_target(lua_State *L) {
interpreter
::
card2value
(
L
,
pcard
);
return
(
int32
)
ch
->
target_cards
->
container
.
size
();
}
int32
scriptlib
::
duel_get_targets_relate_to_chain
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
group
*
pgroup
=
pduel
->
new_group
();
chain
*
ch
=
pduel
->
game_field
->
get_chain
(
0
);
if
(
ch
&&
ch
->
target_cards
&&
ch
->
target_cards
->
container
.
size
()
>
0
)
{
for
(
auto
&
pcard
:
ch
->
target_cards
->
container
)
{
if
(
pcard
->
is_has_relation
(
*
ch
))
{
pgroup
->
container
.
insert
(
pcard
);
}
}
}
interpreter
::
group2value
(
L
,
pgroup
);
return
1
;
}
int32
scriptlib
::
duel_get_current_phase
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushinteger
(
L
,
pduel
->
game_field
->
infos
.
phase
);
...
...
@@ -4675,6 +4689,7 @@ static const struct luaL_Reg duellib[] = {
{
"GetChainInfo"
,
scriptlib
::
duel_get_chain_info
},
{
"GetChainEvent"
,
scriptlib
::
duel_get_chain_event
},
{
"GetFirstTarget"
,
scriptlib
::
duel_get_first_target
},
{
"GetTargetsRelateToChain"
,
scriptlib
::
duel_get_targets_relate_to_chain
},
{
"GetCurrentPhase"
,
scriptlib
::
duel_get_current_phase
},
{
"SkipPhase"
,
scriptlib
::
duel_skip_phase
},
{
"IsDamageCalculated"
,
scriptlib
::
duel_is_damage_calculated
},
...
...
processor.cpp
View file @
7c1a1ac1
...
...
@@ -4187,7 +4187,6 @@ int32 field::add_chain(uint16 step) {
&&
phandler
->
is_has_relation
(
clit
)
&&
phandler
->
current
.
location
==
LOCATION_SZONE
&&
!
peffect
->
is_flag
(
EFFECT_FLAG_FIELD_ONLY
))
clit
.
flag
|=
CHAIN_CONTINUOUS_CARD
;
core
.
phase_action
=
TRUE
;
pduel
->
write_buffer8
(
MSG_CHAINED
);
pduel
->
write_buffer8
(
clit
.
chain_count
);
raise_event
(
phandler
,
EVENT_CHAINING
,
peffect
,
0
,
clit
.
triggering_player
,
clit
.
triggering_player
,
clit
.
chain_count
);
...
...
@@ -4305,6 +4304,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
auto
cait
=
core
.
current_chain
.
rbegin
();
switch
(
step
)
{
case
0
:
{
core
.
phase_action
=
TRUE
;
pduel
->
write_buffer8
(
MSG_CHAIN_SOLVING
);
pduel
->
write_buffer8
(
cait
->
chain_count
);
add_to_disable_check_list
(
cait
->
triggering_effect
->
get_handler
());
...
...
scriptlib.h
View file @
7c1a1ac1
...
...
@@ -478,6 +478,7 @@ public:
static
int32
duel_get_chain_info
(
lua_State
*
L
);
static
int32
duel_get_chain_event
(
lua_State
*
L
);
static
int32
duel_get_first_target
(
lua_State
*
L
);
static
int32
duel_get_targets_relate_to_chain
(
lua_State
*
L
);
static
int32
duel_get_current_phase
(
lua_State
*
L
);
static
int32
duel_skip_phase
(
lua_State
*
L
);
static
int32
duel_is_damage_calculated
(
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