Commit e1ef38bc authored by VanillaSalt's avatar VanillaSalt

fix

parent dd9b0820
...@@ -1246,10 +1246,6 @@ int32 card::destination_redirect(uint8 destination, uint32 reason) { ...@@ -1246,10 +1246,6 @@ int32 card::destination_redirect(uint8 destination, uint32 reason) {
uint32 redirect; uint32 redirect;
if(data.type & TYPE_TOKEN) if(data.type & TYPE_TOKEN)
return 0; return 0;
if((data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ)) && destination == LOCATION_HAND)
destination = LOCATION_DECK;
if((data.type & TYPE_PENDULUM) && destination == LOCATION_GRAVE && (current.location & LOCATION_ONFIELD) && !is_status(STATUS_SUMMON_DISABLED))
destination = LOCATION_DECK;
if(destination == LOCATION_HAND) if(destination == LOCATION_HAND)
filter_effect(EFFECT_TO_HAND_REDIRECT, &es); filter_effect(EFFECT_TO_HAND_REDIRECT, &es);
else if(destination == LOCATION_DECK) else if(destination == LOCATION_DECK)
......
...@@ -18,7 +18,7 @@ function c11975962.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,7 +18,7 @@ function c11975962.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c11975962.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11975962.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
......
...@@ -65,7 +65,7 @@ function c16550875.thfilter(c) ...@@ -65,7 +65,7 @@ function c16550875.thfilter(c)
return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x56) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c16550875.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c16550875.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16550875.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c16550875.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16550875.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c16550875.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c16550875.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c16550875.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
......
...@@ -14,10 +14,10 @@ function c16719802.filter(c) ...@@ -14,10 +14,10 @@ function c16719802.filter(c)
return c:IsFaceup() and c:GetLevel()>0 return c:IsFaceup() and c:GetLevel()>0
end end
function c16719802.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c16719802.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16719802.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16719802.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c16719802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c16719802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c16719802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) Duel.SelectTarget(tp,c16719802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
end end
function c16719802.op(e,tp,eg,ep,ev,re,r,rp) function c16719802.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -26,7 +26,7 @@ function c17259470.filter(c,e,tp) ...@@ -26,7 +26,7 @@ function c17259470.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c17259470.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c17259470.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c17259470.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c17259470.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c17259470.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end and Duel.IsExistingTarget(c17259470.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -19,7 +19,7 @@ function c19439119.filter(c,e,tp) ...@@ -19,7 +19,7 @@ function c19439119.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x35) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsSetCard(0x35) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c19439119.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c19439119.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19439119.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19439119.filter(chkc,e,tp) and chkc~=e:GetHandler() end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c19439119.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) local g=Duel.SelectTarget(tp,c19439119.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
......
...@@ -20,6 +20,7 @@ function c19827717.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,6 +20,7 @@ function c19827717.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetDescription(aux.Stringid(19827717,0)) e1:SetDescription(aux.Stringid(19827717,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c19827717.retcon) e1:SetCondition(c19827717.retcon)
e1:SetTarget(c19827717.rettg) e1:SetTarget(c19827717.rettg)
...@@ -36,7 +37,7 @@ function c19827717.retcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +37,7 @@ function c19827717.retcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c19827717.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c19827717.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tid=Duel.GetTurnCount() local tid=Duel.GetTurnCount()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c19827717.filter(chkc,tid) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19827717.filter(chkc,tid) end
if chk==0 then return Duel.IsExistingTarget(c19827717.filter,tp,LOCATION_GRAVE,0,1,nil,tid) end if chk==0 then return Duel.IsExistingTarget(c19827717.filter,tp,LOCATION_GRAVE,0,1,nil,tid) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c19827717.filter,tp,LOCATION_GRAVE,0,1,1,nil,tid) local g=Duel.SelectTarget(tp,c19827717.filter,tp,LOCATION_GRAVE,0,1,1,nil,tid)
......
...@@ -66,7 +66,7 @@ function c19891310.thfilter(c) ...@@ -66,7 +66,7 @@ function c19891310.thfilter(c)
return c:IsSetCard(0x72) and c:IsAbleToHand() return c:IsSetCard(0x72) and c:IsAbleToHand()
end end
function c19891310.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c19891310.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19891310.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c19891310.thfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c19891310.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c19891310.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c19891310.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,c19891310.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
......
...@@ -15,7 +15,7 @@ function c20138923.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c20138923.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_QUICKPLAY) return ep~=tp and re:IsActiveType(TYPE_QUICKPLAY)
end end
function c20138923.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c20138923.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
......
...@@ -20,7 +20,7 @@ function c72429240.filter(c) ...@@ -20,7 +20,7 @@ function c72429240.filter(c)
return c:IsFaceup() and c:IsDestructable() return c:IsFaceup() and c:IsDestructable()
end end
function c72429240.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c72429240.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsDestructable() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c72429240.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c72429240.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c72429240.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c72429240.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c72429240.filter,tp,0,LOCATION_MZONE,1,1,nil)
......
...@@ -40,7 +40,8 @@ function c8091563.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,8 @@ function c8091563.sumop(e,tp,eg,ep,ev,re,r,rp)
end end
function c8091563.spcon(e,tp,eg,ep,ev,re,r,rp) function c8091563.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
return eg:GetCount()==1 and tc:IsPreviousLocation(LOCATION_GRAVE) and (tc:IsSetCard(0x85) or tc:IsCode(71071546)) return eg:GetCount()==1 and (tc:IsSetCard(0x85) or tc:IsCode(71071546))
and tc:IsControler(tp) and tc:GetPreviousControler()==tp and tc:IsPreviousLocation(LOCATION_GRAVE)
end end
function c8091563.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c8091563.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
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