Commit 0f903247 authored by salix5's avatar salix5

ret in move_to_field()

parent 37165af5
......@@ -487,7 +487,7 @@ public:
void release(card* target, effect* reason_effect, uint32 reason, uint32 reason_player);
void send_to(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence, uint32 position);
void send_to(card* target, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence, uint32 position);
void move_to_field(card* target, uint32 move_player, uint32 playerid, uint32 destination, uint32 positions, uint32 enable = FALSE, uint32 ret = FALSE, uint32 is_equip = FALSE);
void move_to_field(card* target, uint32 move_player, uint32 playerid, uint32 destination, uint32 positions, uint32 enable = FALSE, uint32 ret = 0, uint32 is_equip = FALSE);
void change_position(card_set* targets, effect* reason_effect, uint32 reason_player, uint32 au, uint32 ad, uint32 du, uint32 dd, uint32 flag, uint32 enable = FALSE);
void change_position(card* target, effect* reason_effect, uint32 reason_player, uint32 npos, uint32 flag, uint32 enable = FALSE);
......
......@@ -1192,7 +1192,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
if(get_useable_count(equip_player, LOCATION_SZONE, equip_player, LOCATION_REASON_TOFIELD) <= 0)
return TRUE;
equip_card->enable_field_effect(false);
move_to_field(equip_card, equip_player, equip_player, LOCATION_SZONE, (up || equip_card->is_position(POS_FACEUP)) ? POS_FACEUP : POS_FACEDOWN, FALSE, FALSE, TRUE);
move_to_field(equip_card, equip_player, equip_player, LOCATION_SZONE, (up || equip_card->is_position(POS_FACEUP)) ? POS_FACEUP : POS_FACEDOWN, FALSE, 0, TRUE);
return FALSE;
}
case 1: {
......@@ -3437,6 +3437,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
return FALSE;
}
case 7: {
// crystal beast redirection
exargs* param = (exargs*)targets;
card* pcard = *param->cvit;
uint32 flag;
......@@ -3752,6 +3753,7 @@ int32 field::discard_deck(uint16 step, uint8 playerid, uint8 count, uint32 reaso
return TRUE;
}
// move a card from anywhere to field, including sp_summon, Duel.MoveToField(), Duel.ReturnToField()
// ret: 0 = default, 1 = return after temporarily banished, 2 = trap_monster return to LOCATION_SZONE
// call move_card() in step 2
int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret, uint32 is_equip) {
uint32 move_player = (target->to_field_param >> 24) & 0xff;
......@@ -3826,7 +3828,7 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret
resetflag |= RESET_LEAVE;
effect* peffect = target->is_affected_by_effect(EFFECT_PRE_MONSTER);
if((location & LOCATION_ONFIELD) && (target->current.location & LOCATION_ONFIELD)
&& !(peffect && (peffect->value & TYPE_TRAP)) && !(ret == 2 && (target->get_type() & TYPE_TRAPMONSTER)))
&& !(peffect && (peffect->value & TYPE_TRAP)) && ret != 2)
resetflag |= RESET_MSCHANGE;
target->reset(resetflag, RESET_EVENT);
}
......
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