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
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
MyCard
ygopro-core
Commits
93d9406b
Commit
93d9406b
authored
Oct 14, 2018
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
6c9c73b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
28 deletions
+19
-28
field.h
field.h
+6
-6
operations.cpp
operations.cpp
+7
-16
processor.cpp
processor.cpp
+6
-6
No files found.
field.h
View file @
93d9406b
...
...
@@ -557,11 +557,11 @@ public:
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
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets
,
uint32
zone
);
int32
destroy
(
uint16
step
,
group
*
targets
,
card
*
target
,
uint8
battle
);
int32
destroy
_replace
(
uint16
step
,
group
*
targets
,
card
*
target
,
uint8
battle
);
int32
destroy
(
uint16
step
,
group
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
);
int32
release
(
uint16
step
,
group
*
targets
,
card
*
target
);
int32
release
_replace
(
uint16
step
,
group
*
targets
,
card
*
target
);
int32
release
(
uint16
step
,
group
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
);
int32
send_
to
(
uint16
step
,
group
*
targets
,
card
*
target
);
int32
send_
replace
(
uint16
step
,
group
*
targets
,
card
*
target
);
int32
send_to
(
uint16
step
,
group
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
);
int32
discard_deck
(
uint16
step
,
uint8
playerid
,
uint8
count
,
uint32
reason
);
int32
move_to_field
(
uint16
step
,
card
*
target
,
uint32
enable
,
uint32
ret
,
uint32
is_equip
,
uint32
zone
);
...
...
@@ -708,9 +708,9 @@ public:
#define PROCESSOR_MOVETOFIELD 53
#define PROCESSOR_CHANGEPOS 54
#define PROCESSOR_OPERATION_REPLACE 55
#define PROCESSOR_DESTROY_
STEP
56
#define PROCESSOR_RELEASE_
STEP
57
#define PROCESSOR_SENDTO_
STEP
58
#define PROCESSOR_DESTROY_
REPLACE
56
#define PROCESSOR_RELEASE_
REPLACE
57
#define PROCESSOR_SENDTO_
REPLACE
58
#define PROCESSOR_SUMMON_RULE 60
#define PROCESSOR_SPSUMMON_RULE 61
#define PROCESSOR_SPSUMMON 62
...
...
operations.cpp
View file @
93d9406b
...
...
@@ -3087,9 +3087,7 @@ int32 field::special_summon(uint16 step, effect* reason_effect, uint8 reason_pla
}
return
TRUE
;
}
// destroy: step version
// PROCESSOR_DESTROY_STEP goes here
int32
field
::
destroy
(
uint16
step
,
group
*
targets
,
card
*
target
,
uint8
battle
)
{
int32
field
::
destroy_replace
(
uint16
step
,
group
*
targets
,
card
*
target
,
uint8
battle
)
{
if
(
target
->
current
.
location
&
(
LOCATION_GRAVE
|
LOCATION_REMOVED
))
{
target
->
current
.
reason
=
target
->
temp
.
reason
;
target
->
current
.
reason_effect
=
target
->
temp
.
reason_effect
;
...
...
@@ -3112,7 +3110,6 @@ int32 field::destroy(uint16 step, group* targets, card* target, uint8 battle) {
}
return
TRUE
;
}
// PROCESSOR_DESTROY goes here
int32
field
::
destroy
(
uint16
step
,
group
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
)
{
switch
(
step
)
{
case
0
:
{
...
...
@@ -3250,7 +3247,7 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
}
case
1
:
{
for
(
auto
&
pcard
:
targets
->
container
)
{
add_process
(
PROCESSOR_DESTROY_
STEP
,
0
,
NULL
,
targets
,
0
,
0
,
0
,
0
,
pcard
);
add_process
(
PROCESSOR_DESTROY_
REPLACE
,
0
,
NULL
,
targets
,
0
,
0
,
0
,
0
,
pcard
);
}
return
FALSE
;
}
...
...
@@ -3432,7 +3429,7 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
}
case
11
:
{
for
(
auto
&
pcard
:
targets
->
container
)
{
add_process
(
PROCESSOR_DESTROY_
STEP
,
0
,
NULL
,
targets
,
0
,
TRUE
,
0
,
0
,
pcard
);
add_process
(
PROCESSOR_DESTROY_
REPLACE
,
0
,
NULL
,
targets
,
0
,
TRUE
,
0
,
0
,
pcard
);
}
return
FALSE
;
}
...
...
@@ -3445,8 +3442,7 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
}
return
TRUE
;
}
// PROCESSOR_RELEASE_STEP goes here
int32
field
::
release
(
uint16
step
,
group
*
targets
,
card
*
target
)
{
int32
field
::
release_replace
(
uint16
step
,
group
*
targets
,
card
*
target
)
{
if
(
!
(
target
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_HAND
)))
{
target
->
current
.
reason
=
target
->
temp
.
reason
;
target
->
current
.
reason_effect
=
target
->
temp
.
reason_effect
;
...
...
@@ -3465,7 +3461,6 @@ int32 field::release(uint16 step, group* targets, card* target) {
}
return
TRUE
;
}
// PROCESSOR_RELEASE goes here
int32
field
::
release
(
uint16
step
,
group
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
)
{
switch
(
step
)
{
case
0
:
{
...
...
@@ -3490,7 +3485,7 @@ int32 field::release(uint16 step, group * targets, effect * reason_effect, uint3
}
case
1
:
{
for
(
auto
&
pcard
:
targets
->
container
)
{
add_process
(
PROCESSOR_RELEASE_
STEP
,
0
,
NULL
,
targets
,
0
,
0
,
0
,
0
,
pcard
);
add_process
(
PROCESSOR_RELEASE_
REPLACE
,
0
,
NULL
,
targets
,
0
,
0
,
0
,
0
,
pcard
);
}
return
FALSE
;
}
...
...
@@ -3537,8 +3532,7 @@ int32 field::release(uint16 step, group * targets, effect * reason_effect, uint3
}
return
TRUE
;
}
// PROCESSOR_SENDTO_STEP goes here
int32
field
::
send_to
(
uint16
step
,
group
*
targets
,
card
*
target
)
{
int32
field
::
send_replace
(
uint16
step
,
group
*
targets
,
card
*
target
)
{
uint8
playerid
=
target
->
sendto_param
.
playerid
;
uint8
dest
=
target
->
sendto_param
.
location
;
if
(
targets
->
container
.
find
(
target
)
==
targets
->
container
.
end
())
...
...
@@ -3559,9 +3553,6 @@ int32 field::send_to(uint16 step, group * targets, card * target) {
}
return
TRUE
;
}
// PROCESSOR_SENDTO goes here
// step 1: call PROCESSOR_SENDTO_STEP
// step 6: move cards
int32
field
::
send_to
(
uint16
step
,
group
*
targets
,
effect
*
reason_effect
,
uint32
reason
,
uint8
reason_player
)
{
struct
exargs
{
group
*
targets
;
...
...
@@ -3599,7 +3590,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
}
case
1
:
{
for
(
auto
&
pcard
:
targets
->
container
)
{
add_process
(
PROCESSOR_SENDTO_
STEP
,
0
,
NULL
,
targets
,
0
,
0
,
0
,
0
,
pcard
);
add_process
(
PROCESSOR_SENDTO_
REPLACE
,
0
,
NULL
,
targets
,
0
,
0
,
0
,
0
,
pcard
);
}
return
FALSE
;
}
...
...
processor.cpp
View file @
93d9406b
...
...
@@ -310,22 +310,22 @@ int32 field::process() {
it
->
step
++
;
return
pduel
->
bufferlen
;
}
case
PROCESSOR_DESTROY_
STEP
:
{
if
(
destroy
(
it
->
step
,
it
->
ptarget
,
(
card
*
)
it
->
ptr1
,
it
->
arg2
))
case
PROCESSOR_DESTROY_
REPLACE
:
{
if
(
destroy
_replace
(
it
->
step
,
it
->
ptarget
,
(
card
*
)
it
->
ptr1
,
it
->
arg2
))
core
.
units
.
pop_front
();
else
it
->
step
++
;
return
pduel
->
bufferlen
;
}
case
PROCESSOR_RELEASE_
STEP
:
{
if
(
release
(
it
->
step
,
it
->
ptarget
,
(
card
*
)
it
->
ptr1
))
case
PROCESSOR_RELEASE_
REPLACE
:
{
if
(
release
_replace
(
it
->
step
,
it
->
ptarget
,
(
card
*
)
it
->
ptr1
))
core
.
units
.
pop_front
();
else
it
->
step
++
;
return
pduel
->
bufferlen
;
}
case
PROCESSOR_SENDTO_
STEP
:
{
if
(
send_
to
(
it
->
step
,
it
->
ptarget
,
(
card
*
)
it
->
ptr1
))
case
PROCESSOR_SENDTO_
REPLACE
:
{
if
(
send_
replace
(
it
->
step
,
it
->
ptarget
,
(
card
*
)
it
->
ptr1
))
core
.
units
.
pop_front
();
else
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