Commit 334b43e5 authored by Tachibana's avatar Tachibana

eme

parent f16cc30d
Pipeline #7141 passed with stages
in 43 minutes and 22 seconds
No preview for this file type
...@@ -36,7 +36,7 @@ function cm.costfilter(c) ...@@ -36,7 +36,7 @@ function cm.costfilter(c)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsSetCard(0x3fa6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3fa6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -96,7 +96,7 @@ end ...@@ -96,7 +96,7 @@ end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp) function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -33,9 +33,20 @@ function c20100600.initial_effect(c) ...@@ -33,9 +33,20 @@ function c20100600.initial_effect(c)
C9.RegisterEffect_Batch(c,e1,e2,e3) C9.RegisterEffect_Batch(c,e1,e2,e3)
end end
function cm.excostfilter(c,tp)
return c:IsAbleToRemoveAsCost() and c:IsHasEffect(20100614,tp)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end local g=Duel.GetMatchingGroup(cm.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) if chk==0 then return e:GetHandler():IsDiscardable() or #g>0 end
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(20100614,0)) then
local tc=g:GetFirst()
if #g>1 then tc=g:Select(tp,1,1,nil) end
Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsSetCard(0x9c92) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x9c92) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
......
...@@ -34,10 +34,23 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,10 +34,23 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return d~=nil and d:IsFaceup() and ((a:GetControler()==tp and a:IsSetCard(0x9c92) and a:IsRelateToBattle()) return d~=nil and d:IsFaceup() and ((a:GetControler()==tp and a:IsSetCard(0x9c92) and a:IsRelateToBattle())
or (d:GetControler()==tp and d:IsAttribute(ATTRIBUTE_LIGHT) and d:IsRelateToBattle())) or (d:GetControler()==tp and d:IsAttribute(ATTRIBUTE_LIGHT) and d:IsRelateToBattle()))
end end
function cm.excostfilter(c,tp)
return c:IsAbleToRemoveAsCost() and c:IsHasEffect(20100614,tp)
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end local g=Duel.GetMatchingGroup(cm.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) if chk==0 then return e:GetHandler():IsDiscardable() or #g>0 end
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(20100614,0)) then
local tc=g:GetFirst()
if #g>1 then tc=g:Select(tp,1,1,nil) end
Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
end end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.operation2(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()
......
...@@ -29,14 +29,28 @@ function cm.filter(c) ...@@ -29,14 +29,28 @@ function cm.filter(c)
return c:IsSetCard(0x9c92) and not c:IsPublic() return c:IsSetCard(0x9c92) and not c:IsPublic()
end end
function cm.excostfilter(c,tp)
return c:IsAbleToHandAsCost() and c:IsHasEffect(20100614,tp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
local c=e:GetHandler() local c=e:GetHandler()
local gc=Duel.GetMatchingGroupCount(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil) local gc=Duel.GetMatchingGroupCount(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil) --好孩子不要这么写检测哟
if gc>2 then gc=2 end if gc>2 then gc=2 end
if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) and gc>0 end if chk==0 then return (c:IsDiscardable() or #g>0) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,c) and gc>0 end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(20100614,0)) then
local tc=g:GetFirst()
if #g>1 then tc=g:Select(tp,1,1,nil) end
Duel.SendtoHand(tc,nil,REASON_COST+REASON_REPLACE)
else
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
local g1=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND,0,c)
local max=math.min(#g1,gc)
if max>2 then max=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,gc,nil) local cg=g1:Select(tp,1,max,c)
Duel.ConfirmCards(1-tp,cg) Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
e:SetLabel(#cg) e:SetLabel(#cg)
......
...@@ -37,12 +37,23 @@ function cm.cfilter(c) ...@@ -37,12 +37,23 @@ function cm.cfilter(c)
return c:IsSetCard(0x9c92) and c:IsDiscardable() return c:IsSetCard(0x9c92) and c:IsDiscardable()
end end
function cm.excostfilter(c,tp)
return c:IsAbleToRemoveAsCost() and c:IsHasEffect(20100614,tp)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,c) end if chk==0 then return (c:IsDiscardable() or #g>0) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,c) local sg=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,c)
sg:AddCard(c) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(20100614,0)) then
local tc=g:GetFirst()
if #g>1 then tc=g:Select(tp,1,1,nil) end
Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else
sg:AddCard(c)
end
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end end
......
...@@ -29,10 +29,22 @@ function cm.initial_effect(c) ...@@ -29,10 +29,22 @@ function cm.initial_effect(c)
C9.RegisterEffect_Batch(c,e1,e2) C9.RegisterEffect_Batch(c,e1,e2)
end end
function cm.excostfilter(c,tp)
return c:IsAbleToRemoveAsCost() and c:IsHasEffect(20100614,tp)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end local g=Duel.GetMatchingGroup(cm.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) if chk==0 then return e:GetHandler():IsDiscardable() or #g>0 end
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(20100614,0)) then
local tc=g:GetFirst()
if #g>1 then tc=g:Select(tp,1,1,nil) end
Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsSetCard(0x9c92) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x9c92) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
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