Commit 6bf8969c authored by wind2009's avatar wind2009

Fix ライク・ザ・ディアベル

parent c805fc9d
Pipeline #30834 passed with stages
in 3 minutes
...@@ -24,13 +24,11 @@ function s.initial_effect(c) ...@@ -24,13 +24,11 @@ function s.initial_effect(c)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.cfilter(c,re,tp) function s.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsReason(REASON_EFFECT)
and c:IsReason(REASON_EFFECT)
and (not c:IsPreviousLocation(LOCATION_ONFIELD) or bit.band(c:GetPreviousTypeOnField(),TYPE_SPELL+TYPE_TRAP)~=0)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,re,tp) return eg:IsExists(s.cfilter,1,nil)
end end
function s.setfilter(c,tp,ex) function s.setfilter(c,tp,ex)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
...@@ -58,11 +56,12 @@ function s.rmfilter(c) ...@@ -58,11 +56,12 @@ function s.rmfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() local c=e:GetHandler()
and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_GRAVE,0,2,e:GetHandler()) end if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_GRAVE,0,2,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_GRAVE,0,2,2,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_GRAVE,0,2,2,c)
g:AddCard(e:GetHandler()) g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,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