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
nanahira
ygopro-core
Commits
a3640355
Commit
a3640355
authored
Jan 29, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Duel.NegateSummon
parent
75c8695e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
libduel.cpp
libduel.cpp
+18
-5
No files found.
libduel.cpp
View file @
a3640355
...
@@ -1822,27 +1822,40 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
...
@@ -1822,27 +1822,40 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
}
else
}
else
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint8
sumplayer
=
PLAYER_NONE
;
uint8
sumplayer
=
PLAYER_NONE
;
uint32
sumtype
=
0
;
if
(
pduel
->
game_field
->
check_event
(
EVENT_SUMMON
))
{
if
(
pduel
->
game_field
->
core
.
is_gemini_summoning
)
sumtype
=
SUMMON_TYPE_DUAL
;
else
sumtype
=
SUMMON_TYPE_NORMAL
;
}
else
if
(
pduel
->
game_field
->
check_event
(
EVENT_FLIP_SUMMON
))
sumtype
=
SUMMON_TYPE_FLIP
;
else
if
(
pduel
->
game_field
->
check_event
(
EVENT_SPSUMMON
))
sumtype
=
SUMMON_TYPE_SPECIAL
;
else
return
0
;
if
(
pcard
)
{
if
(
pcard
)
{
sumplayer
=
pcard
->
summon_player
;
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
if
(
!
match_all
(
pcard
->
summon_info
,
SUMMON_TYPE_FLIP
)
&&
!
match_all
(
pcard
->
summon_info
,
SUMMON_TYPE_DUAL
))
if
(
!
match_all
(
sumtype
,
SUMMON_TYPE_FLIP
)
&&
!
match_all
(
sumtype
,
SUMMON_TYPE_DUAL
))
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
}
else
{
}
else
{
for
(
auto
&
pcard
:
pgroup
->
container
)
{
for
(
auto
&
pcard
:
pgroup
->
container
)
{
sumplayer
=
pcard
->
summon_player
;
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
if
(
!
match_all
(
pcard
->
summon_info
,
SUMMON_TYPE_FLIP
)
&&
!
match_all
(
pcard
->
summon_info
,
SUMMON_TYPE_DUAL
))
if
(
!
match_all
(
sumtype
,
SUMMON_TYPE_FLIP
)
&&
!
match_all
(
sumtype
,
SUMMON_TYPE_DUAL
))
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
}
}
}
}
uint32
event_code
=
0
;
uint32
event_code
=
0
;
if
(
pduel
->
game_field
->
check_event
(
EVENT_SUMMON
)
)
if
(
sumtype
&
SUMMON_TYPE_NORMAL
)
event_code
=
EVENT_SUMMON_NEGATED
;
event_code
=
EVENT_SUMMON_NEGATED
;
else
if
(
pduel
->
game_field
->
check_event
(
EVENT_FLIP_SUMMON
)
)
else
if
(
sumtype
&
SUMMON_TYPE_FLIP
)
event_code
=
EVENT_FLIP_SUMMON_NEGATED
;
event_code
=
EVENT_FLIP_SUMMON_NEGATED
;
else
if
(
pduel
->
game_field
->
check_event
(
EVENT_SPSUMMON
)
)
else
if
(
sumtype
&
SUMMON_TYPE_SPECIAL
)
event_code
=
EVENT_SPSUMMON_NEGATED
;
event_code
=
EVENT_SPSUMMON_NEGATED
;
effect
*
reason_effect
=
pduel
->
game_field
->
core
.
reason_effect
;
effect
*
reason_effect
=
pduel
->
game_field
->
core
.
reason_effect
;
uint8
reason_player
=
pduel
->
game_field
->
core
.
reason_player
;
uint8
reason_player
=
pduel
->
game_field
->
core
.
reason_player
;
...
...
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