Commit 2d9be2ac authored by mercury233's avatar mercury233

dont move card in grave and removed when them become target

parent 60e18710
...@@ -2831,15 +2831,11 @@ int32 scriptlib::duel_set_target_card(lua_State *L) { ...@@ -2831,15 +2831,11 @@ int32 scriptlib::duel_set_target_card(lua_State *L) {
} }
if(peffect->is_flag(EFFECT_FLAG_CARD_TARGET)) { if(peffect->is_flag(EFFECT_FLAG_CARD_TARGET)) {
if(pcard) { if(pcard) {
if(pcard->current.location & 0x30)
pduel->game_field->move_card(pcard->current.controler, pcard, pcard->current.location, 0);
pduel->write_buffer8(MSG_BECOME_TARGET); pduel->write_buffer8(MSG_BECOME_TARGET);
pduel->write_buffer8(1); pduel->write_buffer8(1);
pduel->write_buffer32(pcard->get_info_location()); pduel->write_buffer32(pcard->get_info_location());
} else { } else {
for(auto& pcard : pgroup->container) { for(auto& pcard : pgroup->container) {
if(pcard->current.location & 0x30)
pduel->game_field->move_card(pcard->current.controler, pcard, pcard->current.location, 0);
pduel->write_buffer8(MSG_BECOME_TARGET); pduel->write_buffer8(MSG_BECOME_TARGET);
pduel->write_buffer8(1); pduel->write_buffer8(1);
pduel->write_buffer32(pcard->get_info_location()); pduel->write_buffer32(pcard->get_info_location());
......
...@@ -76,8 +76,6 @@ void field::change_target(uint8 chaincount, group* targets) { ...@@ -76,8 +76,6 @@ void field::change_target(uint8 chaincount, group* targets) {
pcard->create_relation(core.current_chain[chaincount - 1]); pcard->create_relation(core.current_chain[chaincount - 1]);
if(te->is_flag(EFFECT_FLAG_CARD_TARGET)) { if(te->is_flag(EFFECT_FLAG_CARD_TARGET)) {
for(auto& pcard : ot->container) { for(auto& pcard : ot->container) {
if(pcard->current.location & 0x30)
move_card(pcard->current.controler, pcard, pcard->current.location, 0);
pduel->write_buffer8(MSG_BECOME_TARGET); pduel->write_buffer8(MSG_BECOME_TARGET);
pduel->write_buffer8(1); pduel->write_buffer8(1);
pduel->write_buffer32(pcard->get_info_location()); pduel->write_buffer32(pcard->get_info_location());
......
...@@ -771,8 +771,6 @@ int32 field::process() { ...@@ -771,8 +771,6 @@ int32 field::process() {
if((returns.bvalue[0] > 0) && peffect->is_flag(EFFECT_FLAG_CARD_TARGET)) { if((returns.bvalue[0] > 0) && peffect->is_flag(EFFECT_FLAG_CARD_TARGET)) {
for(int32 i = 0; i < returns.bvalue[0]; ++i) { for(int32 i = 0; i < returns.bvalue[0]; ++i) {
card* pcard = core.select_cards[returns.bvalue[i + 1]]; card* pcard = core.select_cards[returns.bvalue[i + 1]];
if(pcard->current.location & 0x30)
move_card(pcard->current.controler, pcard, pcard->current.location, 0);
pduel->write_buffer8(MSG_BECOME_TARGET); pduel->write_buffer8(MSG_BECOME_TARGET);
pduel->write_buffer8(1); pduel->write_buffer8(1);
pduel->write_buffer32(pcard->get_info_location()); pduel->write_buffer32(pcard->get_info_location());
......
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