Commit 93d9406b authored by DailyShana's avatar DailyShana

rename

parent 6c9c73b1
......@@ -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
......
......@@ -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;
}
......
......@@ -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++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment