Commit 2dc83131 authored by POLYMER's avatar POLYMER

fix

parent 9a6b24ee
...@@ -58,8 +58,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,8 +58,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToChain() then return end
if c:IsFacedown() or not c:IsRelateToChain() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.fusfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.fusfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -97,7 +96,7 @@ function s.eqfilter_gy(c) ...@@ -97,7 +96,7 @@ function s.eqfilter_gy(c)
return s.fusfilter(c) and c:IsFaceupEx() return s.fusfilter(c) and c:IsFaceupEx()
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() and c:GetEquipTarget()~=nil and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:GetEquipTarget()~=nil and c:IsAbleToGrave()
end end
function s.optg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.optg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then if chkc then
...@@ -123,14 +122,7 @@ function s.optg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -123,14 +122,7 @@ function s.optg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
else else
e:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) e:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e:SetProperty(EFFECT_FLAG_CARD_TARGET) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(cg,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
end end
function s.opop(e,tp,eg,ep,ev,re,r,rp) function s.opop(e,tp,eg,ep,ev,re,r,rp)
...@@ -158,8 +150,12 @@ function s.opop(e,tp,eg,ep,ev,re,r,rp) ...@@ -158,8 +150,12 @@ function s.opop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
else else
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if tc:IsRelateToChain() and tc:IsFaceup() and not tc:IsDisabled() then local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_SZONE,0,1,1,nil)
if Duel.SendtoGrave(cg,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if tc then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -175,7 +171,6 @@ function s.opop(e,tp,eg,ep,ev,re,r,rp) ...@@ -175,7 +171,6 @@ function s.opop(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
if tc:IsDisabled() then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
......
...@@ -101,7 +101,7 @@ end ...@@ -101,7 +101,7 @@ end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if 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
if c:IsPreviousLocation(LOCATION_ONFIELD) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then if c:IsPreviousLocation(LOCATION_ONFIELD) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2)) e1:SetDescription(aux.Stringid(id,2))
......
...@@ -52,12 +52,15 @@ function c28366277.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,12 +52,15 @@ function c28366277.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLP(tp)>3000 and 1 or 2 local ct=Duel.GetLP(tp)>3000 and 1 or 2
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28366277.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,ct,nil) local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28366277.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,ct,nil)
if #tg==0 or Duel.SendtoHand(tg,nil,REASON_EFFECT)==0 then return end if #tg==0 then return end
local hg=tg:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
if #hg~=0 then Duel.HintSelection(hg) end
if Duel.SendtoHand(tg,nil,REASON_EFFECT)==0 then return end
tg=tg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #tg==0 then return end
Duel.ConfirmCards(1-tp,tg) Duel.ConfirmCards(1-tp,tg)
ct=tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_MZONE,0,ct,ct,nil) local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_MZONE,0,#tg,#tg,nil)
Duel.HintSelection(dg) Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
end end
......
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