Commit 43714e6a authored by fallenstardust's avatar fallenstardust

fix

parent 3a3dcc67
...@@ -28,7 +28,8 @@ function s.initial_effect(c) ...@@ -28,7 +28,8 @@ function s.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id+o) e3:SetCountLimit(1,id+o)
...@@ -40,15 +41,18 @@ end ...@@ -40,15 +41,18 @@ end
function s.filter(c) function s.filter(c)
return c:IsSetCard(0x1a4) return c:IsSetCard(0x1a4)
end end
function s.filter1(c,tp)
return c:IsAbleToRemove(tp,POS_FACEDOWN)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,0,LOCATION_GRAVE,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.filter1,tp,0,LOCATION_GRAVE,1,1,nil,tp)
if #g>0 then if #g>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end end
...@@ -61,11 +65,11 @@ function s.recon(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,11 +65,11 @@ function s.recon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk) function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroupCount(s.filter1,tp,0,LOCATION_GRAVE,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,g,1-tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,g,1-tp,LOCATION_GRAVE)
end end
function s.reop(e,tp,eg,ep,ev,re,r,rp) function s.reop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroupCount(s.filter1,tp,0,LOCATION_GRAVE,nil,tp)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end end
function s.thfilter(c) function s.thfilter(c)
......
...@@ -39,7 +39,7 @@ function s.cfilter(c) ...@@ -39,7 +39,7 @@ function s.cfilter(c)
end end
function s.cpcon(e,tp,eg,ep,ev,re,r,rp) function s.cpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return ep==1-tp and re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER) return rp==1-tp and re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
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