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
3b29e94c
Commit
3b29e94c
authored
Jan 31, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add STATUS_FLIP_SUMMONING
parent
6b971a56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
26 deletions
+43
-26
operations.cpp
operations.cpp
+43
-26
No files found.
operations.cpp
View file @
3b29e94c
...
@@ -1884,7 +1884,14 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1884,7 +1884,14 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
return
FALSE
;
return
FALSE
;
}
}
case
13
:
{
case
13
:
{
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
if
(
core
.
is_gemini_summoning
)
{
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMONING
,
TRUE
);
}
else
{
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
}
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
raise_event
(
target
,
EVENT_SUMMON
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
target
,
EVENT_SUMMON
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
process_instant_event
();
...
@@ -1892,26 +1899,29 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1892,26 +1899,29 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
return
FALSE
;
return
FALSE
;
}
}
case
14
:
{
case
14
:
{
if
(
target
->
is_status
(
STATUS_SUMMONING
))
{
if
(
core
.
is_gemini_summoning
&&
target
->
is_status
(
STATUS_FLIP_SUMMONING
)
||
!
core
.
is_gemini_summoning
&&
target
->
is_status
(
STATUS_SUMMONING
))
{
core
.
units
.
begin
()
->
step
=
14
;
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
return
FALSE
;
}
}
core
.
is_gemini_summoning
=
false
;
if
(
core
.
is_summon_negated
)
{
if
(
proc
)
{
if
(
proc
)
{
remove_oath_effect
(
proc
);
remove_oath_effect
(
proc
);
if
(
proc
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
)
&&
(
proc
->
count_code
&
EFFECT_COUNT_CODE_OATH
))
{
if
(
proc
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
)
&&
(
proc
->
count_code
&
EFFECT_COUNT_CODE_OATH
))
{
dec_effect_code
(
proc
->
count_code
,
sumplayer
);
dec_effect_code
(
proc
->
count_code
,
sumplayer
);
}
}
}
if
(
effect_set
*
peset
=
(
effect_set
*
)
core
.
units
.
begin
()
->
ptr2
)
{
for
(
int32
i
=
0
;
i
<
peset
->
size
();
++
i
)
remove_oath_effect
(
peset
->
at
(
i
));
delete
peset
;
core
.
units
.
begin
()
->
ptr2
=
0
;
}
if
(
target
->
is_status
(
STATUS_SUMMON_DISABLED
)
&&
target
->
current
.
location
==
LOCATION_MZONE
)
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
adjust_instant
();
}
}
if
(
effect_set
*
peset
=
(
effect_set
*
)
core
.
units
.
begin
()
->
ptr2
)
{
core
.
is_gemini_summoning
=
false
;
for
(
int32
i
=
0
;
i
<
peset
->
size
();
++
i
)
core
.
is_summon_negated
=
false
;
remove_oath_effect
(
peset
->
at
(
i
));
delete
peset
;
core
.
units
.
begin
()
->
ptr2
=
0
;
}
if
(
target
->
is_status
(
STATUS_SUMMON_DISABLED
)
&&
target
->
current
.
location
==
LOCATION_MZONE
)
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
adjust_instant
();
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -1927,6 +1937,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1927,6 +1937,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
core
.
units
.
begin
()
->
ptr2
=
0
;
core
.
units
.
begin
()
->
ptr2
=
0
;
}
}
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
target
->
enable_field_effect
(
true
);
target
->
enable_field_effect
(
true
);
if
(
target
->
is_status
(
STATUS_DISABLED
))
if
(
target
->
is_status
(
STATUS_DISABLED
))
...
@@ -2001,7 +2012,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
...
@@ -2001,7 +2012,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_FLIP_SUMMON
))
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_FLIP_SUMMON
))
core
.
units
.
begin
()
->
step
=
2
;
core
.
units
.
begin
()
->
step
=
2
;
else
{
else
{
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_
FLIP_
SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
raise_event
(
target
,
EVENT_FLIP_SUMMON
,
0
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
target
,
EVENT_FLIP_SUMMON
,
0
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
process_instant_event
();
...
@@ -2010,16 +2021,19 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
...
@@ -2010,16 +2021,19 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
return
FALSE
;
return
FALSE
;
}
}
case
2
:
{
case
2
:
{
if
(
target
->
is_status
(
STATUS_SUMMONING
))
if
(
target
->
is_status
(
STATUS_
FLIP_
SUMMONING
))
return
FALSE
;
return
FALSE
;
if
(
effect_set
*
peset
=
(
effect_set
*
)
core
.
units
.
begin
()
->
ptr1
)
{
if
(
core
.
is_summon_negated
)
{
for
(
int32
i
=
0
;
i
<
peset
->
size
();
++
i
)
if
(
effect_set
*
peset
=
(
effect_set
*
)
core
.
units
.
begin
()
->
ptr1
)
{
remove_oath_effect
(
peset
->
at
(
i
));
for
(
int32
i
=
0
;
i
<
peset
->
size
();
++
i
)
delete
peset
;
remove_oath_effect
(
peset
->
at
(
i
));
core
.
units
.
begin
()
->
ptr1
=
0
;
delete
peset
;
core
.
units
.
begin
()
->
ptr1
=
0
;
}
if
(
target
->
is_status
(
STATUS_SUMMON_DISABLED
)
&&
target
->
current
.
location
==
LOCATION_MZONE
)
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
}
}
if
(
target
->
is_status
(
STATUS_SUMMON_DISABLED
)
&&
target
->
current
.
location
==
LOCATION_MZONE
)
core
.
is_summon_negated
=
false
;
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -2030,7 +2044,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
...
@@ -2030,7 +2044,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
delete
peset
;
delete
peset
;
core
.
units
.
begin
()
->
ptr1
=
0
;
core
.
units
.
begin
()
->
ptr1
=
0
;
}
}
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_
FLIP_
SUMMONING
,
FALSE
);
target
->
enable_field_effect
(
true
);
target
->
enable_field_effect
(
true
);
if
(
target
->
is_status
(
STATUS_DISABLED
))
if
(
target
->
is_status
(
STATUS_DISABLED
))
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
...
@@ -4139,6 +4153,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -4139,6 +4153,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
if
((
core
.
deck_reversed
&&
pcard
->
current
.
location
==
LOCATION_DECK
)
||
(
pcard
->
current
.
position
==
POS_FACEUP_DEFENSE
))
if
((
core
.
deck_reversed
&&
pcard
->
current
.
location
==
LOCATION_DECK
)
||
(
pcard
->
current
.
position
==
POS_FACEUP_DEFENSE
))
param
->
show_decktop
[
pcard
->
current
.
controler
]
=
true
;
param
->
show_decktop
[
pcard
->
current
.
controler
]
=
true
;
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pcard
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
previous
.
location
=
0
;
pcard
->
previous
.
location
=
0
;
...
@@ -4187,6 +4202,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -4187,6 +4202,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pcard
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
previous
.
location
=
0
;
pcard
->
previous
.
location
=
0
;
...
@@ -4900,6 +4916,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
...
@@ -4900,6 +4916,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
trapmonster
=
true
;
trapmonster
=
true
;
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
pcard
->
reset
(
RESET_TURN_SET
,
RESET_EVENT
);
pcard
->
reset
(
RESET_TURN_SET
,
RESET_EVENT
);
pcard
->
clear_card_target
();
pcard
->
clear_card_target
();
pcard
->
set_status
(
STATUS_SET_TURN
,
TRUE
);
pcard
->
set_status
(
STATUS_SET_TURN
,
TRUE
);
...
...
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