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
6b971a56
Commit
6b971a56
authored
Jan 29, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Duel.NegateSummon
parent
09111e8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
10 deletions
+34
-10
common.h
common.h
+1
-1
field.h
field.h
+1
-0
libduel.cpp
libduel.cpp
+32
-9
No files found.
common.h
View file @
6b971a56
...
...
@@ -200,7 +200,7 @@ struct card_sort {
#define STATUS_SUMMON_DISABLED 0x20000
#define STATUS_ACTIVATE_DISABLED 0x40000
#define STATUS_EFFECT_REPLACED 0x80000
//#define STATUS_FUTURE_FUSION
0x100000
#define STATUS_FLIP_SUMMONING
0x100000
#define STATUS_ATTACK_CANCELED 0x200000
#define STATUS_INITIALIZING 0x400000
#define STATUS_TO_HAND_WITHOUT_CONFIRM 0x800000
...
...
field.h
View file @
6b971a56
...
...
@@ -301,6 +301,7 @@ struct processor {
int32
coin_count
{
0
};
bool
is_target_ready
{
false
};
bool
is_gemini_summoning
{
false
};
bool
is_summon_negated
{
false
};
uint8
to_bp
{
FALSE
};
uint8
to_m2
{
FALSE
};
...
...
libduel.cpp
View file @
6b971a56
...
...
@@ -1821,7 +1821,6 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
pduel
=
pgroup
->
pduel
;
}
else
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint8
sumplayer
=
PLAYER_NONE
;
uint32
sumtype
=
0
;
if
(
pduel
->
game_field
->
check_event
(
EVENT_SUMMON
))
{
if
(
pduel
->
game_field
->
core
.
is_gemini_summoning
)
...
...
@@ -1835,21 +1834,46 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
sumtype
=
SUMMON_TYPE_SPECIAL
;
else
return
0
;
if
(
pcard
)
{
if
(
sumtype
&
SUMMON_TYPE_NORMAL
||
sumtype
&
SUMMON_TYPE_FLIP
)
{
if
(
pgroup
&&
pgroup
->
container
.
size
()
!=
1
)
return
0
;
if
(
!
pcard
)
pcard
=
*
pgroup
->
container
.
begin
();
}
uint8
sumplayer
=
PLAYER_NONE
;
effect
*
reason_effect
=
pduel
->
game_field
->
core
.
reason_effect
;
field
::
card_set
negated_cards
;
if
(
sumtype
==
SUMMON_TYPE_DUAL
||
sumtype
&
SUMMON_TYPE_FLIP
)
{
if
(
!
pcard
->
is_summon_negatable
(
sumtype
,
reason_effect
))
return
0
;
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_
FLIP_
SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
if
(
!
match_all
(
sumtype
,
SUMMON_TYPE_FLIP
)
&&
!
match_all
(
sumtype
,
SUMMON_TYPE_DUAL
))
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
}
else
{
for
(
auto
&
pcard
:
pgroup
->
container
)
{
}
else
{
if
(
pcard
)
{
if
(
!
pcard
->
is_summon_negatable
(
sumtype
,
reason_effect
))
return
0
;
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
if
(
!
match_all
(
sumtype
,
SUMMON_TYPE_FLIP
)
&&
!
match_all
(
sumtype
,
SUMMON_TYPE_DUAL
))
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
}
else
{
for
(
auto
&
pcard
:
pgroup
->
container
)
{
if
(
!
pcard
->
is_summon_negatable
(
sumtype
,
reason_effect
))
continue
;
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
negated_cards
.
insert
(
pcard
);
}
if
(
!
negated_cards
.
size
())
return
0
;
}
}
pduel
->
game_field
->
core
.
is_summon_negated
=
true
;
uint32
event_code
=
0
;
if
(
sumtype
&
SUMMON_TYPE_NORMAL
)
event_code
=
EVENT_SUMMON_NEGATED
;
...
...
@@ -1857,7 +1881,6 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
event_code
=
EVENT_FLIP_SUMMON_NEGATED
;
else
if
(
sumtype
&
SUMMON_TYPE_SPECIAL
)
event_code
=
EVENT_SPSUMMON_NEGATED
;
effect
*
reason_effect
=
pduel
->
game_field
->
core
.
reason_effect
;
uint8
reason_player
=
pduel
->
game_field
->
core
.
reason_player
;
if
(
pcard
)
pduel
->
game_field
->
raise_event
(
pcard
,
event_code
,
reason_effect
,
REASON_EFFECT
,
reason_player
,
sumplayer
,
0
);
...
...
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