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
e3420498
Commit
e3420498
authored
Jan 31, 2024
by
salix5
Committed by
GitHub
Jan 31, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: summon in Chain 1 (#544)
parent
ec29fc0e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
29 deletions
+45
-29
field.h
field.h
+12
-5
libduel.cpp
libduel.cpp
+12
-6
operations.cpp
operations.cpp
+10
-9
processor.cpp
processor.cpp
+11
-9
No files found.
field.h
View file @
e3420498
...
@@ -174,7 +174,8 @@ struct processor {
...
@@ -174,7 +174,8 @@ struct processor {
processor_list
units
;
processor_list
units
;
processor_list
subunits
;
processor_list
subunits
;
processor_unit
reserved
;
processor_unit
damage_step_reserved
;
processor_unit
summon_reserved
;
card_vector
select_cards
;
card_vector
select_cards
;
card_vector
unselect_cards
;
card_vector
unselect_cards
;
card_vector
summonable_cards
;
card_vector
summonable_cards
;
...
@@ -569,6 +570,12 @@ public:
...
@@ -569,6 +570,12 @@ public:
void
operation_replace
(
int32
type
,
int32
step
,
group
*
targets
);
void
operation_replace
(
int32
type
,
int32
step
,
group
*
targets
);
void
select_tribute_cards
(
card
*
target
,
uint8
playerid
,
uint8
cancelable
,
int32
min
,
int32
max
,
uint8
toplayer
,
uint32
zone
);
void
select_tribute_cards
(
card
*
target
,
uint8
playerid
,
uint8
cancelable
,
int32
min
,
int32
max
,
uint8
toplayer
,
uint32
zone
);
// summon
int32
summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
,
uint32
action_type
);
int32
mset
(
uint16
step
,
uint8
setplayer
,
card
*
ptarget
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
,
uint32
action_type
);
int32
flip_summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
uint32
action_type
);
int32
special_summon_rule
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
uint32
summon_type
,
uint32
action_type
);
int32
remove_counter
(
uint16
step
,
uint32
reason
,
card
*
pcard
,
uint8
rplayer
,
uint8
s
,
uint8
o
,
uint16
countertype
,
uint16
count
);
int32
remove_counter
(
uint16
step
,
uint32
reason
,
card
*
pcard
,
uint8
rplayer
,
uint8
s
,
uint8
o
,
uint16
countertype
,
uint16
count
);
int32
remove_overlay_card
(
uint16
step
,
uint32
reason
,
card
*
pcard
,
uint8
rplayer
,
uint8
s
,
uint8
o
,
uint16
min
,
uint16
max
);
int32
remove_overlay_card
(
uint16
step
,
uint32
reason
,
card
*
pcard
,
uint8
rplayer
,
uint8
s
,
uint8
o
,
uint16
min
,
uint16
max
);
int32
get_control
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets
,
uint8
playerid
,
uint16
reset_phase
,
uint8
reset_count
,
uint32
zone
);
int32
get_control
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets
,
uint8
playerid
,
uint16
reset_phase
,
uint8
reset_count
,
uint32
zone
);
...
@@ -579,12 +586,8 @@ public:
...
@@ -579,12 +586,8 @@ public:
int32
draw
(
uint16
step
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
,
uint8
playerid
,
int32
count
);
int32
draw
(
uint16
step
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
,
uint8
playerid
,
int32
count
);
int32
damage
(
uint16
step
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
,
card
*
reason_card
,
uint8
playerid
,
int32
amount
,
uint32
is_step
);
int32
damage
(
uint16
step
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
,
card
*
reason_card
,
uint8
playerid
,
int32
amount
,
uint32
is_step
);
int32
recover
(
uint16
step
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
,
uint8
playerid
,
int32
amount
,
uint32
is_step
);
int32
recover
(
uint16
step
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
,
uint8
playerid
,
int32
amount
,
uint32
is_step
);
int32
summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
);
int32
flip_summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
);
int32
mset
(
uint16
step
,
uint8
setplayer
,
card
*
ptarget
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
);
int32
sset
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
card
*
ptarget
,
effect
*
reason_effect
);
int32
sset
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
card
*
ptarget
,
effect
*
reason_effect
);
int32
sset_g
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
group
*
ptarget
,
uint8
confirm
,
effect
*
reason_effect
);
int32
sset_g
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
group
*
ptarget
,
uint8
confirm
,
effect
*
reason_effect
);
int32
special_summon_rule
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
uint32
summon_type
);
int32
special_summon_step
(
uint16
step
,
group
*
targets
,
card
*
target
,
uint32
zone
);
int32
special_summon_step
(
uint16
step
,
group
*
targets
,
card
*
target
,
uint32
zone
);
int32
special_summon
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets
,
uint32
zone
);
int32
special_summon
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets
,
uint32
zone
);
int32
destroy_replace
(
uint16
step
,
group
*
targets
,
card
*
target
,
uint8
battle
);
int32
destroy_replace
(
uint16
step
,
group
*
targets
,
card
*
target
,
uint8
battle
);
...
@@ -705,6 +708,10 @@ public:
...
@@ -705,6 +708,10 @@ public:
#define GLOBALFLAG_ACTIVATION_COUNT 0x800
#define GLOBALFLAG_ACTIVATION_COUNT 0x800
//
//
//summon action type
#define SUMMON_IN_IDLE 0
#define SUMMON_IN_CHAIN 1
#define PROCESSOR_ADJUST 1
#define PROCESSOR_ADJUST 1
#define PROCESSOR_HINT 2
#define PROCESSOR_HINT 2
#define PROCESSOR_TURN 3
#define PROCESSOR_TURN 3
...
...
libduel.cpp
View file @
e3420498
...
@@ -301,7 +301,8 @@ int32 scriptlib::duel_summon(lua_State *L) {
...
@@ -301,7 +301,8 @@ int32 scriptlib::duel_summon(lua_State *L) {
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
.
arg3
=
SUMMON_IN_CHAIN
;
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
}
...
@@ -324,7 +325,8 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
...
@@ -324,7 +325,8 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
sumtype
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
sumtype
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
.
arg3
=
SUMMON_IN_CHAIN
;
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
}
...
@@ -368,7 +370,8 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
...
@@ -368,7 +370,8 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_SYNCHRO
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_SYNCHRO
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
.
arg3
=
SUMMON_IN_CHAIN
;
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
}
...
@@ -404,7 +407,8 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
...
@@ -404,7 +407,8 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
.
arg3
=
SUMMON_IN_CHAIN
;
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
}
...
@@ -448,7 +452,8 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
...
@@ -448,7 +452,8 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_LINK
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_LINK
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
.
arg3
=
SUMMON_IN_CHAIN
;
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
}
...
@@ -480,7 +485,8 @@ int32 scriptlib::duel_setm(lua_State *L) {
...
@@ -480,7 +485,8 @@ int32 scriptlib::duel_setm(lua_State *L) {
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
mset
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
pduel
->
game_field
->
mset
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
summon_reserved
.
arg3
=
SUMMON_IN_CHAIN
;
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
}
}
...
...
operations.cpp
View file @
e3420498
...
@@ -1451,7 +1451,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
...
@@ -1451,7 +1451,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
)
{
int32
field
::
summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
,
uint32
action_type
)
{
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
if
(
!
target
->
is_summonable_card
())
if
(
!
target
->
is_summonable_card
())
...
@@ -1951,7 +1951,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1951,7 +1951,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
process_single_event
();
process_single_event
();
raise_event
(
target
,
EVENT_SUMMON_SUCCESS
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
target
,
EVENT_SUMMON_SUCCESS
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
process_instant_event
();
if
(
core
.
current_chain
.
size
()
==
0
)
{
if
(
action_type
==
SUMMON_IN_IDLE
)
{
adjust_all
();
adjust_all
();
core
.
hint_timing
[
sumplayer
]
|=
TIMING_SUMMON
;
core
.
hint_timing
[
sumplayer
]
|=
TIMING_SUMMON
;
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
...
@@ -1961,7 +1961,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1961,7 +1961,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
flip_summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
)
{
int32
field
::
flip_summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
uint32
action_type
)
{
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
if
(
target
->
current
.
location
!=
LOCATION_MZONE
)
if
(
target
->
current
.
location
!=
LOCATION_MZONE
)
...
@@ -2047,7 +2047,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
...
@@ -2047,7 +2047,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
raise_event
(
target
,
EVENT_CHANGE_POS
,
0
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
target
,
EVENT_CHANGE_POS
,
0
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
process_instant_event
();
adjust_all
();
adjust_all
();
if
(
core
.
current_chain
.
size
()
==
0
)
{
if
(
action_type
==
SUMMON_IN_IDLE
)
{
core
.
hint_timing
[
sumplayer
]
|=
TIMING_FLIPSUMMON
;
core
.
hint_timing
[
sumplayer
]
|=
TIMING_FLIPSUMMON
;
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
}
}
...
@@ -2056,7 +2056,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
...
@@ -2056,7 +2056,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
mset
(
uint16
step
,
uint8
setplayer
,
card
*
target
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
)
{
int32
field
::
mset
(
uint16
step
,
uint8
setplayer
,
card
*
target
,
effect
*
proc
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
,
uint32
action_type
)
{
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
if
(
!
target
->
is_summonable_card
())
if
(
!
target
->
is_summonable_card
())
...
@@ -2384,7 +2384,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
...
@@ -2384,7 +2384,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
adjust_instant
();
adjust_instant
();
raise_event
(
target
,
EVENT_MSET
,
proc
,
0
,
setplayer
,
setplayer
,
0
);
raise_event
(
target
,
EVENT_MSET
,
proc
,
0
,
setplayer
,
setplayer
,
0
);
process_instant_event
();
process_instant_event
();
if
(
core
.
current_chain
.
size
()
==
0
)
{
if
(
action_type
==
SUMMON_IN_IDLE
)
{
adjust_all
();
adjust_all
();
core
.
hint_timing
[
setplayer
]
|=
TIMING_MSET
;
core
.
hint_timing
[
setplayer
]
|=
TIMING_MSET
;
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
FALSE
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
FALSE
);
...
@@ -2664,7 +2664,7 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
...
@@ -2664,7 +2664,7 @@ int32 field::sset_g(uint16 step, uint8 setplayer, uint8 toplayer, group* ptarget
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
special_summon_rule
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
uint32
summon_type
)
{
int32
field
::
special_summon_rule
(
uint16
step
,
uint8
sumplayer
,
card
*
target
,
uint32
summon_type
,
uint32
action_type
)
{
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
effect_set
eset
;
effect_set
eset
;
...
@@ -2948,7 +2948,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2948,7 +2948,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
process_single_event
();
process_single_event
();
raise_event
(
target
,
EVENT_SPSUMMON_SUCCESS
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
target
,
EVENT_SPSUMMON_SUCCESS
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
process_instant_event
();
if
(
core
.
current_chain
.
size
()
==
0
)
{
if
(
action_type
==
SUMMON_IN_IDLE
)
{
adjust_all
();
adjust_all
();
core
.
hint_timing
[
sumplayer
]
|=
TIMING_SPSUMMON
;
core
.
hint_timing
[
sumplayer
]
|=
TIMING_SPSUMMON
;
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
...
@@ -2956,6 +2956,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2956,6 +2956,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
return
TRUE
;
return
TRUE
;
}
}
case
20
:
{
case
20
:
{
// EFFECT_SPSUMMON_PROC_G (Pendulum Summon)
effect
*
peffect
=
core
.
units
.
begin
()
->
peffect
;
effect
*
peffect
=
core
.
units
.
begin
()
->
peffect
;
core
.
units
.
begin
()
->
ptarget
=
pduel
->
new_group
();
core
.
units
.
begin
()
->
ptarget
=
pduel
->
new_group
();
if
(
peffect
->
operation
)
{
if
(
peffect
->
operation
)
{
...
@@ -3142,7 +3143,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -3142,7 +3143,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
process_single_event
();
process_single_event
();
raise_event
(
&
pgroup
->
container
,
EVENT_SPSUMMON_SUCCESS
,
core
.
units
.
begin
()
->
peffect
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
&
pgroup
->
container
,
EVENT_SPSUMMON_SUCCESS
,
core
.
units
.
begin
()
->
peffect
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
process_instant_event
();
if
(
core
.
current_chain
.
size
()
==
0
)
{
if
(
action_type
==
SUMMON_IN_IDLE
)
{
adjust_all
();
adjust_all
();
core
.
hint_timing
[
sumplayer
]
|=
TIMING_SPSUMMON
;
core
.
hint_timing
[
sumplayer
]
|=
TIMING_SPSUMMON
;
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
...
...
processor.cpp
View file @
e3420498
...
@@ -364,14 +364,14 @@ uint32 field::process() {
...
@@ -364,14 +364,14 @@ uint32 field::process() {
return
pduel
->
message_buffer
.
size
();
return
pduel
->
message_buffer
.
size
();
}
}
case
PROCESSOR_SUMMON_RULE
:
{
case
PROCESSOR_SUMMON_RULE
:
{
if
(
summon
(
it
->
step
,
it
->
arg1
&
0xff
,
(
card
*
)
it
->
ptarget
,
it
->
peffect
,
(
it
->
arg1
>>
8
)
&
0xff
,
(
it
->
arg1
>>
16
)
&
0xff
,
(
it
->
arg1
>>
24
)
&
0xff
))
if
(
summon
(
it
->
step
,
it
->
arg1
&
0xff
,
(
card
*
)
it
->
ptarget
,
it
->
peffect
,
(
it
->
arg1
>>
8
)
&
0xff
,
(
it
->
arg1
>>
16
)
&
0xff
,
(
it
->
arg1
>>
24
)
&
0xff
,
it
->
arg3
))
core
.
units
.
pop_front
();
core
.
units
.
pop_front
();
else
else
++
it
->
step
;
++
it
->
step
;
return
pduel
->
message_buffer
.
size
();
return
pduel
->
message_buffer
.
size
();
}
}
case
PROCESSOR_SPSUMMON_RULE
:
{
case
PROCESSOR_SPSUMMON_RULE
:
{
if
(
special_summon_rule
(
it
->
step
,
it
->
arg1
,
(
card
*
)
it
->
ptarget
,
it
->
arg2
))
if
(
special_summon_rule
(
it
->
step
,
it
->
arg1
,
(
card
*
)
it
->
ptarget
,
it
->
arg2
,
it
->
arg3
))
core
.
units
.
pop_front
();
core
.
units
.
pop_front
();
else
else
++
it
->
step
;
++
it
->
step
;
...
@@ -385,14 +385,14 @@ uint32 field::process() {
...
@@ -385,14 +385,14 @@ uint32 field::process() {
return
pduel
->
message_buffer
.
size
();
return
pduel
->
message_buffer
.
size
();
}
}
case
PROCESSOR_FLIP_SUMMON
:
{
case
PROCESSOR_FLIP_SUMMON
:
{
if
(
flip_summon
(
it
->
step
,
it
->
arg1
,
(
card
*
)(
it
->
ptarget
)))
if
(
flip_summon
(
it
->
step
,
it
->
arg1
,
(
card
*
)(
it
->
ptarget
)
,
it
->
arg3
))
core
.
units
.
pop_front
();
core
.
units
.
pop_front
();
else
else
++
it
->
step
;
++
it
->
step
;
return
pduel
->
message_buffer
.
size
();
return
pduel
->
message_buffer
.
size
();
}
}
case
PROCESSOR_MSET
:
{
case
PROCESSOR_MSET
:
{
if
(
mset
(
it
->
step
,
it
->
arg1
&
0xff
,
(
card
*
)
it
->
ptarget
,
it
->
peffect
,
(
it
->
arg1
>>
8
)
&
0xff
,
(
it
->
arg1
>>
16
)
&
0xff
,
(
it
->
arg1
>>
24
)
&
0xff
))
if
(
mset
(
it
->
step
,
it
->
arg1
&
0xff
,
(
card
*
)
it
->
ptarget
,
it
->
peffect
,
(
it
->
arg1
>>
8
)
&
0xff
,
(
it
->
arg1
>>
16
)
&
0xff
,
(
it
->
arg1
>>
24
)
&
0xff
,
it
->
arg3
))
core
.
units
.
pop_front
();
core
.
units
.
pop_front
();
else
else
++
it
->
step
;
++
it
->
step
;
...
@@ -3120,7 +3120,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3120,7 +3120,7 @@ int32 field::process_battle_command(uint16 step) {
process_single_event
();
process_single_event
();
process_instant_event
();
process_instant_event
();
if
(
core
.
effect_damage_step
)
{
if
(
core
.
effect_damage_step
)
{
core
.
reserved
.
ptr1
=
core
.
units
.
begin
()
->
ptarget
;
core
.
damage_step_
reserved
.
ptr1
=
core
.
units
.
begin
()
->
ptarget
;
return
TRUE
;
return
TRUE
;
}
}
core
.
units
.
begin
()
->
step
=
32
;
core
.
units
.
begin
()
->
step
=
32
;
...
@@ -3305,7 +3305,7 @@ int32 field::process_damage_step(uint16 step, uint32 new_attack) {
...
@@ -3305,7 +3305,7 @@ int32 field::process_damage_step(uint16 step, uint32 new_attack) {
infos
.
phase
=
PHASE_DAMAGE_CAL
;
infos
.
phase
=
PHASE_DAMAGE_CAL
;
add_process
(
PROCESSOR_BATTLE_COMMAND
,
26
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_BATTLE_COMMAND
,
26
,
0
,
0
,
0
,
0
);
core
.
units
.
begin
()
->
step
=
2
;
core
.
units
.
begin
()
->
step
=
2
;
core
.
reserved
=
core
.
units
.
front
();
core
.
damage_step_
reserved
=
core
.
units
.
front
();
return
TRUE
;
return
TRUE
;
}
}
case
2
:
{
case
2
:
{
...
@@ -4487,7 +4487,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
...
@@ -4487,7 +4487,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
return
FALSE
;
return
FALSE
;
}
}
if
(
core
.
summoning_card
)
if
(
core
.
summoning_card
)
core
.
subunits
.
push_back
(
core
.
reserved
);
core
.
subunits
.
push_back
(
core
.
summon_
reserved
);
core
.
summoning_card
=
0
;
core
.
summoning_card
=
0
;
core
.
units
.
begin
()
->
step
=
-
1
;
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
return
FALSE
;
...
@@ -4511,8 +4511,10 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
...
@@ -4511,8 +4511,10 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
core
.
chain_limit_p
.
clear
();
core
.
chain_limit_p
.
clear
();
core
.
effect_count_code_chain
.
clear
();
core
.
effect_count_code_chain
.
clear
();
reset_chain
();
reset_chain
();
if
(
core
.
summoning_card
||
core
.
effect_damage_step
==
1
)
if
(
core
.
summoning_card
)
core
.
subunits
.
push_back
(
core
.
reserved
);
core
.
subunits
.
push_back
(
core
.
summon_reserved
);
if
(
core
.
effect_damage_step
==
1
)
core
.
subunits
.
push_back
(
core
.
damage_step_reserved
);
core
.
summoning_card
=
0
;
core
.
summoning_card
=
0
;
return
FALSE
;
return
FALSE
;
}
}
...
...
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