Commit 5fb06614 authored by argon.sun's avatar argon.sun

fix

parent 8d9733f9
...@@ -553,8 +553,8 @@ int32 scriptlib::duel_return_to_field(lua_State *L) { ...@@ -553,8 +553,8 @@ int32 scriptlib::duel_return_to_field(lua_State *L) {
duel* pduel = pcard->pduel; duel* pduel = pcard->pduel;
pcard->enable_field_effect(FALSE); pcard->enable_field_effect(FALSE);
pduel->game_field->adjust_instant(); pduel->game_field->adjust_instant();
pduel->game_field->move_to_field(pcard, pcard->previous.controler, pcard->previous.controler, pduel->game_field->refresh_location_info_instant();
pcard->previous.location, pos, TRUE, TRUE); pduel->game_field->move_to_field(pcard, pcard->previous.controler, pcard->previous.controler, pcard->previous.location, pos, TRUE, 1);
pduel->game_field->core.subunits.begin()->type = PROCESSOR_MOVETOFIELD_S; pduel->game_field->core.subunits.begin()->type = PROCESSOR_MOVETOFIELD_S;
return lua_yield(L, 0); return lua_yield(L, 0);
} }
......
...@@ -2891,19 +2891,23 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret ...@@ -2891,19 +2891,23 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret
switch(step) { switch(step) {
case 0: { case 0: {
returns.ivalue[0] = FALSE; returns.ivalue[0] = FALSE;
if(ret && (!(target->current.reason & REASON_TEMPORARY) || (target->current.reason_effect->owner != core.reason_effect->owner))) if((ret == 1) && (!(target->current.reason & REASON_TEMPORARY) || (target->current.reason_effect->owner != core.reason_effect->owner)))
return TRUE; return TRUE;
if(!(location == LOCATION_SZONE && (target->data.type & TYPE_FIELD) && (target->data.type & TYPE_SPELL))) { if(!(location == LOCATION_SZONE && (target->data.type & TYPE_FIELD) && (target->data.type & TYPE_SPELL))) {
uint32 flag; uint32 flag;
uint32 lreason = (target->current.location == LOCATION_MZONE) ? LOCATION_REASON_CONTROL : LOCATION_REASON_TOFIELD; uint32 lreason = (target->current.location == LOCATION_MZONE) ? LOCATION_REASON_CONTROL : LOCATION_REASON_TOFIELD;
uint32 ct = get_useable_count(playerid, location, move_player, lreason, &flag); uint32 ct = get_useable_count(playerid, location, move_player, lreason, &flag);
if(ret && (ct <= 0 || !(target->data.type & TYPE_MONSTER))) { if((ret == 1) && (ct <= 0 || !(target->data.type & TYPE_MONSTER))) {
core.units.begin()->step = 3; core.units.begin()->step = 3;
send_to(target, core.reason_effect, REASON_EFFECT, core.reason_player, PLAYER_NONE, LOCATION_GRAVE, 0, 0); send_to(target, core.reason_effect, REASON_EFFECT, core.reason_player, PLAYER_NONE, LOCATION_GRAVE, 0, 0);
return FALSE; return FALSE;
} }
if(!ct) if(!ct)
return TRUE; return TRUE;
if(ret && is_location_useable(playerid, location, target->previous.sequence)) {
returns.bvalue[2] = target->previous.sequence;
return FALSE;
}
if(move_player == playerid) { if(move_player == playerid) {
if(location == LOCATION_SZONE) if(location == LOCATION_SZONE)
flag = ((flag << 8) & 0xff00) | 0xffff00ff; flag = ((flag << 8) & 0xff00) | 0xffff00ff;
...@@ -2929,7 +2933,7 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret ...@@ -2929,7 +2933,7 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret
uint32 seq = returns.bvalue[2]; uint32 seq = returns.bvalue[2];
if(location == LOCATION_SZONE && (target->data.type & TYPE_FIELD) && (target->data.type & TYPE_SPELL)) if(location == LOCATION_SZONE && (target->data.type & TYPE_FIELD) && (target->data.type & TYPE_SPELL))
seq = 5; seq = 5;
if(!ret) { if(ret != 1) {
if(location != target->current.location) { if(location != target->current.location) {
uint32 resetflag = 0; uint32 resetflag = 0;
if(location & LOCATION_ONFIELD) if(location & LOCATION_ONFIELD)
...@@ -3016,7 +3020,7 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret ...@@ -3016,7 +3020,7 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret
} }
if((target->previous.location == LOCATION_SZONE) && target->equiping_target) if((target->previous.location == LOCATION_SZONE) && target->equiping_target)
target->unequip(); target->unequip();
if(enable || ret) if(enable || ((ret == 1) && target->is_position(POS_FACEUP)))
target->enable_field_effect(TRUE); target->enable_field_effect(TRUE);
adjust_instant(); adjust_instant();
return FALSE; return FALSE;
...@@ -3087,7 +3091,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec ...@@ -3087,7 +3091,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
} }
bool trapmonster = false; bool trapmonster = false;
if((opos & POS_FACEUP) && (npos & POS_FACEDOWN)) { if((opos & POS_FACEUP) && (npos & POS_FACEDOWN)) {
if(pcard->get_type()&TYPE_TRAPMONSTER) if(pcard->get_type() & TYPE_TRAPMONSTER)
trapmonster = true; trapmonster = true;
pcard->reset(RESET_TURN_SET, RESET_EVENT); pcard->reset(RESET_TURN_SET, RESET_EVENT);
pcard->set_status(STATUS_SET_TURN, TRUE); pcard->set_status(STATUS_SET_TURN, TRUE);
...@@ -3105,7 +3109,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec ...@@ -3105,7 +3109,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
pcard->unequip(); pcard->unequip();
if(trapmonster) { if(trapmonster) {
refresh_location_info_instant(); refresh_location_info_instant();
move_to_field(pcard, pcard->current.controler, pcard->current.controler, LOCATION_SZONE, POS_FACEDOWN); move_to_field(pcard, pcard->current.controler, pcard->current.controler, LOCATION_SZONE, POS_FACEDOWN, FALSE, 2);
} }
} }
} }
......
...@@ -23,6 +23,7 @@ end ...@@ -23,6 +23,7 @@ end
function c22959079.operation(e,tp,eg,ep,ev,re,r,rp) function c22959079.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local seq=tc:GetSequence() local seq=tc:GetSequence()
if tc:IsControler(1-tp) then seq=seq+16 end
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -48,12 +48,12 @@ function c41753322.otcon(e,c) ...@@ -48,12 +48,12 @@ function c41753322.otcon(e,c)
if c==nil then return true end if c==nil then return true end
local g=Duel.GetTributeGroup(c) local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(Card.IsRace,1,nil,RACE_PLANT) and g:IsExists(Card.IsRace,1,nil,RACE_DINOSAUR)
end end
function c41753322.otop(e,tp,eg,ep,ev,re,r,rp,c) function c41753322.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c) local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsRace,1,1,nil,RACE_PLANT) local sg=g:FilterSelect(tp,Card.IsRace,1,1,nil,RACE_DINOSAUR)
c:SetMaterial(sg) c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end end
......
...@@ -37,7 +37,7 @@ function c73445448.filter(c) ...@@ -37,7 +37,7 @@ function c73445448.filter(c)
return c:IsFaceup() and not c:IsDisabled() and not c:IsType(TYPE_NORMAL) return c:IsFaceup() and not c:IsDisabled() and not c:IsType(TYPE_NORMAL)
end end
function c73445448.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c73445448.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c73445448.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c73445448.filter(chkc) end
if chk==0 then return e:GetHandler():IsAttackPos() if chk==0 then return e:GetHandler():IsAttackPos()
and Duel.IsExistingTarget(c73445448.filter,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(c73445448.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
......
...@@ -18,6 +18,7 @@ end ...@@ -18,6 +18,7 @@ end
function c90502999.target(e,tp,eg,ep,ev,re,r,rp,chk) function c90502999.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 end
local dis=Duel.SelectDisableField(tp,2,LOCATION_MZONE,LOCATION_MZONE,0) local dis=Duel.SelectDisableField(tp,2,LOCATION_MZONE,LOCATION_MZONE,0)
Debug.Message(dis)
e:SetLabel(dis) e:SetLabel(dis)
end end
function c90502999.disop(e,tp) function c90502999.disop(e,tp)
......
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