Commit d85938c2 authored by mercury233's avatar mercury233

fix

parent 3ccc451b
...@@ -28,14 +28,17 @@ end ...@@ -28,14 +28,17 @@ end
function c15256925.condition(e,tp,eg,ep,ev,re,r,rp) function c15256925.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c15256925.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c15256925.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c15256925.rmfilter(c)
return c:IsAbleToRemove() and not c:IsType(TYPE_TOKEN)
end
function c15256925.target(e,tp,eg,ep,ev,re,r,rp,chk) function c15256925.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c15256925.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(c15256925.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c15256925.activate(e,tp,eg,ep,ev,re,r,rp) function c15256925.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c15256925.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
......
...@@ -32,9 +32,12 @@ function c36970611.initial_effect(c) ...@@ -32,9 +32,12 @@ function c36970611.initial_effect(c)
e3:SetOperation(c36970611.thop) e3:SetOperation(c36970611.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c36970611.rmfilter(c)
return c:IsAbleToRemove() and not c:IsType(TYPE_TOKEN)
end
function c36970611.cfilter(c) function c36970611.cfilter(c)
return c:IsSetCard(0xc1) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xc1) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(Card.IsAbleToRemove,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and Duel.IsExistingTarget(c36970611.rmfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end end
function c36970611.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36970611.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c36970611.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end if chkc then return c36970611.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
...@@ -61,7 +64,7 @@ function c36970611.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -61,7 +64,7 @@ function c36970611.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,c36970611.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c36970611.operation(e,tp,eg,ep,ev,re,r,rp) function c36970611.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -12,7 +12,8 @@ function c58297729.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -12,7 +12,8 @@ function c58297729.target(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if chk==0 then return d and a:GetControler()~=d:GetControler() if chk==0 then return d and a:GetControler()~=d:GetControler()
and a:IsAbleToRemove() and d:IsAbleToRemove() end and a:IsAbleToRemove() and d:IsAbleToRemove()
and not a:IsType(TYPE_TOKEN) and not d:IsType(TYPE_TOKEN) end
end end
function c58297729.activate(e,tp,eg,ep,ev,re,r,rp) function c58297729.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
......
...@@ -58,18 +58,21 @@ function c63845230.initial_effect(c) ...@@ -58,18 +58,21 @@ function c63845230.initial_effect(c)
ea:SetOperation(c63845230.rmop) ea:SetOperation(c63845230.rmop)
c:RegisterEffect(ea) c:RegisterEffect(ea)
end end
function c63845230.cfilter(c)
return c:IsAbleToRemoveAsCost() and not c:IsType(TYPE_TOKEN)
end
function c63845230.spcon(e,c) function c63845230.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1 local ct=-ft+1
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,c) local g=Duel.GetMatchingGroup(c63845230.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,c)
return g:GetCount()>=5 and (ft>0 or g:IsExists(Card.IsLocation,ct,nil,LOCATION_MZONE)) return g:GetCount()>=5 and (ft>0 or g:IsExists(Card.IsLocation,ct,nil,LOCATION_MZONE))
end end
function c63845230.spop(e,tp,eg,ep,ev,re,r,rp,c) function c63845230.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1 local ct=-ft+1
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,c) local g=Duel.GetMatchingGroup(c63845230.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,c)
local rg=nil local rg=nil
if ft<=0 then if ft<=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
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