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
4f98e0e9
Commit
4f98e0e9
authored
Feb 01, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core into develop
parents
89aa51d9
3c1f5f3c
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
55 deletions
+89
-55
card.h
card.h
+10
-4
effect.h
effect.h
+8
-1
field.h
field.h
+12
-5
libcard.cpp
libcard.cpp
+2
-2
libduel.cpp
libduel.cpp
+12
-6
operations.cpp
operations.cpp
+32
-26
processor.cpp
processor.cpp
+13
-11
No files found.
card.h
View file @
4f98e0e9
...
@@ -385,10 +385,9 @@ public:
...
@@ -385,10 +385,9 @@ public:
int32
is_can_be_link_material
(
card
*
scard
);
int32
is_can_be_link_material
(
card
*
scard
);
};
};
//Summon Type
//Summon Type
in summon_info
#define SUMMON_TYPE_NORMAL 0x10000000
#define SUMMON_TYPE_NORMAL 0x10000000
#define SUMMON_TYPE_ADVANCE 0x11000000
#define SUMMON_TYPE_ADVANCE 0x11000000
#define SUMMON_TYPE_DUAL 0x12000000
#define SUMMON_TYPE_FLIP 0x20000000
#define SUMMON_TYPE_FLIP 0x20000000
#define SUMMON_TYPE_SPECIAL 0x40000000
#define SUMMON_TYPE_SPECIAL 0x40000000
#define SUMMON_TYPE_FUSION 0x43000000
#define SUMMON_TYPE_FUSION 0x43000000
...
@@ -398,8 +397,15 @@ public:
...
@@ -398,8 +397,15 @@ public:
#define SUMMON_TYPE_PENDULUM 0x4a000000
#define SUMMON_TYPE_PENDULUM 0x4a000000
#define SUMMON_TYPE_LINK 0x4c000000
#define SUMMON_TYPE_LINK 0x4c000000
#define SUMMON_TYPE_MAIN 0xf0000000
//Gemini Summon
#define SUMMON_TYPE_LOCATION 0x00ff0000
#define SUMMON_TYPE_DUAL 0x12000000
//bitfield blocks
#define SUMMON_VALUE_MAIN_TYPE 0xf0000000
#define SUMMON_VALUE_SUB_TYPE 0x0f000000
#define SUMMON_VALUE_LOCATION 0x00ff0000
#define SUMMON_VALUE_CUSTOM_TYPE 0x0000ffff
constexpr
uint32
DEFAULT_SUMMON_TYPE
=
SUMMON_VALUE_MAIN_TYPE
|
SUMMON_VALUE_SUB_TYPE
|
SUMMON_VALUE_CUSTOM_TYPE
;
//Counter
//Counter
#define COUNTER_WITHOUT_PERMIT 0x1000
#define COUNTER_WITHOUT_PERMIT 0x1000
...
...
effect.h
View file @
4f98e0e9
...
@@ -518,6 +518,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
...
@@ -518,6 +518,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EVENT_SUMMON_NEGATED 1114
#define EVENT_SUMMON_NEGATED 1114
#define EVENT_FLIP_SUMMON_NEGATED 1115
#define EVENT_FLIP_SUMMON_NEGATED 1115
#define EVENT_SPSUMMON_NEGATED 1116
#define EVENT_SPSUMMON_NEGATED 1116
#define EVENT_SPSUMMON_SUCCESS_G_P 1117
#define EVENT_CONTROL_CHANGED 1120
#define EVENT_CONTROL_CHANGED 1120
#define EVENT_EQUIP 1121
#define EVENT_EQUIP 1121
#define EVENT_ATTACK_ANNOUNCE 1130
#define EVENT_ATTACK_ANNOUNCE 1130
...
@@ -561,7 +562,13 @@ constexpr int32 HALF_DAMAGE = 0x80000001;
...
@@ -561,7 +562,13 @@ constexpr int32 HALF_DAMAGE = 0x80000001;
#define CODE_PHASE 3 // header + phase_id (12 bits)
#define CODE_PHASE 3 // header + phase_id (12 bits)
#define CODE_VALUE 4 // numeric value, max = 4095
#define CODE_VALUE 4 // numeric value, max = 4095
const
std
::
unordered_set
<
uint32
>
continuous_event
({
EVENT_ADJUST
,
EVENT_BREAK_EFFECT
,
EVENT_TURN_END
});
const
std
::
unordered_set
<
uint32
>
continuous_event
{
EVENT_ADJUST
,
EVENT_BREAK_EFFECT
,
EVENT_TURN_END
,
EVENT_PRE_BATTLE_DAMAGE
,
EVENT_SPSUMMON_SUCCESS_G_P
,
};
bool
is_continuous_event
(
uint32
code
);
bool
is_continuous_event
(
uint32
code
);
#endif
/* EFFECT_H_ */
#endif
/* EFFECT_H_ */
field.h
View file @
4f98e0e9
...
@@ -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
...
...
libcard.cpp
View file @
4f98e0e9
...
@@ -855,7 +855,7 @@ int32 scriptlib::card_get_summon_type(lua_State *L) {
...
@@ -855,7 +855,7 @@ int32 scriptlib::card_get_summon_type(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
pcard
->
summon_info
&
0xff00ffff
);
lua_pushinteger
(
L
,
pcard
->
summon_info
&
DEFAULT_SUMMON_TYPE
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_get_summon_location
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_summon_location
(
lua_State
*
L
)
{
...
@@ -1281,7 +1281,7 @@ int32 scriptlib::card_is_summon_type(lua_State *L) {
...
@@ -1281,7 +1281,7 @@ int32 scriptlib::card_is_summon_type(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
ttype
=
(
uint32
)
lua_tointeger
(
L
,
2
);
uint32
ttype
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(((
pcard
->
summon_info
&
0xff00ffff
)
&
ttype
)
==
ttype
)
if
(((
pcard
->
summon_info
&
DEFAULT_SUMMON_TYPE
)
&
ttype
)
==
ttype
)
lua_pushboolean
(
L
,
1
);
lua_pushboolean
(
L
,
1
);
else
else
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
...
...
libduel.cpp
View file @
4f98e0e9
...
@@ -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 @
4f98e0e9
This diff is collapsed.
Click to expand it.
processor.cpp
View file @
4f98e0e9
...
@@ -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
;
...
@@ -1638,8 +1638,8 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
...
@@ -1638,8 +1638,8 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
chain
newchain
;
chain
newchain
;
if
(
core
.
ignition_priority_chains
.
size
())
if
(
core
.
ignition_priority_chains
.
size
())
core
.
select_chains
.
swap
(
core
.
ignition_priority_chains
);
core
.
select_chains
.
swap
(
core
.
ignition_priority_chains
);
for
(
const
auto
*
ev_list
:
{
&
core
.
point_event
,
&
core
.
instant_event
})
{
for
(
const
auto
&
ev_list
:
{
core
.
point_event
,
core
.
instant_event
})
{
for
(
const
auto
&
ev
:
*
ev_list
)
{
for
(
const
auto
&
ev
:
ev_list
)
{
auto
pr
=
effects
.
activate_effect
.
equal_range
(
ev
.
event_code
);
auto
pr
=
effects
.
activate_effect
.
equal_range
(
ev
.
event_code
);
for
(
auto
eit
=
pr
.
first
;
eit
!=
pr
.
second
;)
{
for
(
auto
eit
=
pr
.
first
;
eit
!=
pr
.
second
;)
{
effect
*
peffect
=
eit
->
second
;
effect
*
peffect
=
eit
->
second
;
...
@@ -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