Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
8ac4b603
Commit
8ac4b603
authored
Feb 05, 2024
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
cfb614bc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
33 deletions
+45
-33
Classes/ocgcore/field.h
Classes/ocgcore/field.h
+13
-13
Classes/ocgcore/libduel.cpp
Classes/ocgcore/libduel.cpp
+24
-12
Classes/ocgcore/operations.cpp
Classes/ocgcore/operations.cpp
+6
-6
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+2
-2
No files found.
Classes/ocgcore/field.h
View file @
8ac4b603
...
@@ -22,6 +22,10 @@
...
@@ -22,6 +22,10 @@
#define MAX_COIN_COUNT 20
#define MAX_COIN_COUNT 20
//summon action type
#define SUMMON_IN_IDLE 0
#define SUMMON_IN_CHAIN 1
class
card
;
class
card
;
struct
card_data
;
struct
card_data
;
class
duel
;
class
duel
;
...
@@ -552,9 +556,9 @@ public:
...
@@ -552,9 +556,9 @@ public:
void
draw
(
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
,
int32
count
);
void
draw
(
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
,
int32
count
);
void
damage
(
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
card
*
reason_card
,
uint32
playerid
,
int32
amount
,
uint32
is_step
=
FALSE
);
void
damage
(
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
card
*
reason_card
,
uint32
playerid
,
int32
amount
,
uint32
is_step
=
FALSE
);
void
recover
(
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
,
int32
amount
,
uint32
is_step
=
FALSE
);
void
recover
(
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
,
int32
amount
,
uint32
is_step
=
FALSE
);
void
summon
(
uint32
sumplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
=
0x1f
);
void
summon
(
uint32
sumplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
=
0x1f
,
uint32
action_type
=
SUMMON_IN_IDLE
);
void
mset
(
uint32
setplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
=
0x1f
);
void
mset
(
uint32
setplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
=
0x1f
,
uint32
action_type
=
SUMMON_IN_IDLE
);
void
special_summon_rule
(
uint32
sumplayer
,
card
*
target
,
uint32
summon_type
);
void
special_summon_rule
(
uint32
sumplayer
,
card
*
target
,
uint32
summon_type
,
uint32
action_type
=
SUMMON_IN_IDLE
);
void
special_summon
(
card_set
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
);
void
special_summon
(
card_set
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
);
void
special_summon_step
(
card
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
);
void
special_summon_step
(
card
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
);
void
special_summon_complete
(
effect
*
reason_effect
,
uint8
reason_player
);
void
special_summon_complete
(
effect
*
reason_effect
,
uint8
reason_player
);
...
@@ -708,10 +712,6 @@ public:
...
@@ -708,10 +712,6 @@ 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
...
@@ -755,17 +755,17 @@ public:
...
@@ -755,17 +755,17 @@ public:
#define PROCESSOR_DESTROY_REPLACE 56
#define PROCESSOR_DESTROY_REPLACE 56
#define PROCESSOR_RELEASE_REPLACE 57
#define PROCESSOR_RELEASE_REPLACE 57
#define PROCESSOR_SENDTO_REPLACE 58
#define PROCESSOR_SENDTO_REPLACE 58
#define PROCESSOR_SUMMON_RULE 60
#define PROCESSOR_SUMMON_RULE 60
//arg1: arguments, arg2: max, arg3: releasable, arg4: arguments
#define PROCESSOR_SPSUMMON_RULE 61
#define PROCESSOR_SPSUMMON_RULE 61
//arg1: arguments, arg2: arguments, arg3: arguments
#define PROCESSOR_SPSUMMON 62
#define PROCESSOR_SPSUMMON 62
#define PROCESSOR_FLIP_SUMMON 63
#define PROCESSOR_FLIP_SUMMON 63
//arg1: arguments, arg2: arguments
#define PROCESSOR_MSET 64
#define PROCESSOR_MSET 64
//arg1: arguments, arg2: max, arg3: arguments
#define PROCESSOR_SSET 65
#define PROCESSOR_SSET 65
#define PROCESSOR_SPSUMMON_STEP 66
#define PROCESSOR_SPSUMMON_STEP 66
#define PROCESSOR_SSET_G 67
#define PROCESSOR_SSET_G 67
#define PROCESSOR_DRAW 70
#define PROCESSOR_DRAW 70
#define PROCESSOR_DAMAGE 71
#define PROCESSOR_DAMAGE 71
//arg1: arguments, arg2: arguments, arg3: arguments
#define PROCESSOR_RECOVER 72
#define PROCESSOR_RECOVER 72
//arg1: arguments, arg2: arguments, arg3: arguments
#define PROCESSOR_EQUIP 73
#define PROCESSOR_EQUIP 73
#define PROCESSOR_GET_CONTROL 74
#define PROCESSOR_GET_CONTROL 74
#define PROCESSOR_SWAP_CONTROL 75
#define PROCESSOR_SWAP_CONTROL 75
...
...
Classes/ocgcore/libduel.cpp
View file @
8ac4b603
...
@@ -299,13 +299,15 @@ int32 scriptlib::duel_summon(lua_State *L) {
...
@@ -299,13 +299,15 @@ int32 scriptlib::duel_summon(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
6
)
if
(
lua_gettop
(
L
)
>=
6
)
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
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
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
,
SUMMON_IN_CHAIN
);
pduel
->
game_field
->
core
.
summon_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
;
}
}
else
{
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
,
SUMMON_IN_IDLE
);
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_special_summon_rule
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_special_summon_rule
(
lua_State
*
L
)
{
...
@@ -323,13 +325,15 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
...
@@ -323,13 +325,15 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
3
)
if
(
lua_gettop
(
L
)
>=
3
)
sumtype
=
(
uint32
)
lua_tointeger
(
L
,
3
);
sumtype
=
(
uint32
)
lua_tointeger
(
L
,
3
);
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
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
->
special_summon_rule
(
playerid
,
pcard
,
sumtype
,
SUMMON_IN_CHAIN
);
pduel
->
game_field
->
core
.
summon_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
;
}
}
else
{
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
sumtype
,
SUMMON_IN_IDLE
);
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_synchro_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_synchro_summon
(
lua_State
*
L
)
{
...
@@ -368,13 +372,15 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
...
@@ -368,13 +372,15 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
pduel
->
game_field
->
core
.
limit_syn_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_syn_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_syn_maxc
=
maxc
;
pduel
->
game_field
->
core
.
limit_syn_maxc
=
maxc
;
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
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_SYNCHRO
,
SUMMON_IN_CHAIN
);
pduel
->
game_field
->
core
.
summon_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
;
}
}
else
{
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_SYNCHRO
,
SUMMON_IN_IDLE
);
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_xyz_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_xyz_summon
(
lua_State
*
L
)
{
...
@@ -405,13 +411,15 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
...
@@ -405,13 +411,15 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
pduel
->
game_field
->
core
.
limit_xyz_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_xyz_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
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
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
,
SUMMON_IN_CHAIN
);
pduel
->
game_field
->
core
.
summon_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
;
}
}
else
{
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
,
SUMMON_IN_IDLE
);
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_link_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_link_summon
(
lua_State
*
L
)
{
...
@@ -450,13 +458,15 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
...
@@ -450,13 +458,15 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
pduel
->
game_field
->
core
.
limit_link_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_link_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_link_maxc
=
maxc
;
pduel
->
game_field
->
core
.
limit_link_maxc
=
maxc
;
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
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_LINK
,
SUMMON_IN_CHAIN
);
pduel
->
game_field
->
core
.
summon_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
;
}
}
else
{
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_LINK
,
SUMMON_IN_IDLE
);
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_setm
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_setm
(
lua_State
*
L
)
{
...
@@ -483,13 +493,15 @@ int32 scriptlib::duel_setm(lua_State *L) {
...
@@ -483,13 +493,15 @@ int32 scriptlib::duel_setm(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
6
)
if
(
lua_gettop
(
L
)
>=
6
)
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
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
);
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
pduel
->
game_field
->
mset
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
,
SUMMON_IN_CHAIN
);
pduel
->
game_field
->
core
.
summon_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
;
}
}
else
{
pduel
->
game_field
->
mset
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
,
SUMMON_IN_IDLE
);
}
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_sets
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_sets
(
lua_State
*
L
)
{
...
...
Classes/ocgcore/operations.cpp
View file @
8ac4b603
...
@@ -152,14 +152,14 @@ void field::damage(effect* reason_effect, uint32 reason, uint32 reason_player, c
...
@@ -152,14 +152,14 @@ void field::damage(effect* reason_effect, uint32 reason, uint32 reason_player, c
void
field
::
recover
(
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
,
int32
amount
,
uint32
is_step
)
{
void
field
::
recover
(
effect
*
reason_effect
,
uint32
reason
,
uint32
reason_player
,
uint32
playerid
,
int32
amount
,
uint32
is_step
)
{
add_process
(
PROCESSOR_RECOVER
,
0
,
reason_effect
,
0
,
reason
,
(
is_step
<<
4
)
+
(
reason_player
<<
2
)
+
(
playerid
),
amount
);
add_process
(
PROCESSOR_RECOVER
,
0
,
reason_effect
,
0
,
reason
,
(
is_step
<<
4
)
+
(
reason_player
<<
2
)
+
(
playerid
),
amount
);
}
}
void
field
::
summon
(
uint32
sumplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
)
{
void
field
::
summon
(
uint32
sumplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
,
uint32
action_type
)
{
add_process
(
PROCESSOR_SUMMON_RULE
,
0
,
proc
,
(
group
*
)
target
,
sumplayer
+
(
ignore_count
<<
8
)
+
(
min_tribute
<<
16
)
+
(
zone
<<
24
),
0
);
add_process
(
PROCESSOR_SUMMON_RULE
,
0
,
proc
,
(
group
*
)
target
,
sumplayer
+
(
ignore_count
<<
8
)
+
(
min_tribute
<<
16
)
+
(
zone
<<
24
),
0
,
0
,
action_type
);
}
}
void
field
::
mset
(
uint32
setplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
)
{
void
field
::
mset
(
uint32
setplayer
,
card
*
target
,
effect
*
proc
,
uint32
ignore_count
,
uint32
min_tribute
,
uint32
zone
,
uint32
action_type
)
{
add_process
(
PROCESSOR_MSET
,
0
,
proc
,
(
group
*
)
target
,
setplayer
+
(
ignore_count
<<
8
)
+
(
min_tribute
<<
16
)
+
(
zone
<<
24
),
0
);
add_process
(
PROCESSOR_MSET
,
0
,
proc
,
(
group
*
)
target
,
setplayer
+
(
ignore_count
<<
8
)
+
(
min_tribute
<<
16
)
+
(
zone
<<
24
),
0
,
action_type
);
}
}
void
field
::
special_summon_rule
(
uint32
sumplayer
,
card
*
target
,
uint32
summon_type
)
{
void
field
::
special_summon_rule
(
uint32
sumplayer
,
card
*
target
,
uint32
summon_type
,
uint32
action_type
)
{
add_process
(
PROCESSOR_SPSUMMON_RULE
,
0
,
0
,
(
group
*
)
target
,
sumplayer
,
summon_type
);
add_process
(
PROCESSOR_SPSUMMON_RULE
,
0
,
0
,
(
group
*
)
target
,
sumplayer
,
summon_type
,
action_type
);
}
}
void
field
::
special_summon
(
card_set
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
)
{
void
field
::
special_summon
(
card_set
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
)
{
if
((
positions
&
POS_FACEDOWN
)
&&
is_player_affected_by_effect
(
sumplayer
,
EFFECT_DIVINE_LIGHT
))
if
((
positions
&
POS_FACEDOWN
)
&&
is_player_affected_by_effect
(
sumplayer
,
EFFECT_DIVINE_LIGHT
))
...
...
Classes/ocgcore/processor.cpp
View file @
8ac4b603
...
@@ -364,7 +364,7 @@ uint32 field::process() {
...
@@ -364,7 +364,7 @@ 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
,
it
->
arg
3
))
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
->
arg
4
))
core
.
units
.
pop_front
();
core
.
units
.
pop_front
();
else
else
++
it
->
step
;
++
it
->
step
;
...
@@ -385,7 +385,7 @@ uint32 field::process() {
...
@@ -385,7 +385,7 @@ 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
),
it
->
arg
3
))
if
(
flip_summon
(
it
->
step
,
it
->
arg1
,
(
card
*
)(
it
->
ptarget
),
it
->
arg
2
))
core
.
units
.
pop_front
();
core
.
units
.
pop_front
();
else
else
++
it
->
step
;
++
it
->
step
;
...
...
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