Commit 4916c325 authored by nekrozar's avatar nekrozar Committed by mercury233

update (#902)

parent de72fd8e
...@@ -14,13 +14,15 @@ end ...@@ -14,13 +14,15 @@ end
function c51091138.condition(e,tp,eg,ep,ev,re,r,rp) function c51091138.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_SZONE) return e:GetHandler():IsLocation(LOCATION_SZONE)
end end
function c51091138.filter(c,g)
return g:IsContains(c)
end
function c51091138.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c51091138.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local cg=e:GetHandler():GetColumnGroup()
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and aux.checksamecolumn(chkc,c) end if chkc then return chkc:IsOnField() and c51091138.filter(chkc,cg) end
if chk==0 then return Duel.IsExistingTarget(aux.checksamecolumn,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c) end if chk==0 then return Duel.IsExistingTarget(c51091138.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,cg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.checksamecolumn,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c,c) local g=Duel.SelectTarget(tp,c51091138.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,cg)
e:SetLabel(seq)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c51091138.activate(e,tp,eg,ep,ev,re,r,rp) function c51091138.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,18 +28,20 @@ function c79176962.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,18 +28,20 @@ function c79176962.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c79176962.thfilter(c,hc) function c79176962.thfilter(c,g)
return c:IsAbleToHand() and aux.checksamecolumn(c,hc) return c:IsAbleToHand() and g:IsContains(c)
end end
function c79176962.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c79176962.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c79176962.thfilter,tp,0,LOCATION_ONFIELD,nil,e:GetHandler()) local cg=e:GetHandler():GetColumnGroup()
if chk==0 then return g:GetCount()>0 end if chk==0 then return Duel.IsExistingMatchingCard(c79176962.thfilter,tp,0,LOCATION_ONFIELD,1,nil,cg) end
local g=Duel.GetMatchingGroup(c79176962.thfilter,tp,0,LOCATION_ONFIELD,nil,cg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c79176962.thop(e,tp,eg,ep,ev,re,r,rp) function c79176962.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local cg=c:GetColumnGroup()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local g=Duel.GetMatchingGroup(c79176962.thfilter,tp,0,LOCATION_ONFIELD,nil,c) local g=Duel.GetMatchingGroup(c79176962.thfilter,tp,0,LOCATION_ONFIELD,nil,cg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
......
...@@ -12,8 +12,7 @@ function c88086137.initial_effect(c) ...@@ -12,8 +12,7 @@ function c88086137.initial_effect(c)
end end
function c88086137.condition(e,tp,eg,ep,ev,re,r,rp) function c88086137.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() return c:GetColumnGroup():IsContains(re:GetHandler()) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
return aux.checksamecolumn(c,rc) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end end
function c88086137.target(e,tp,eg,ep,ev,re,r,rp,chk) function c88086137.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true 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