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)
end
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
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
function cm.filter(c,e,tp)
return c:IsSetCard(0x3fa6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -96,7 +96,7 @@ end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
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)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -33,9 +33,20 @@ function c20100600.initial_effect(c)
C9.RegisterEffect_Batch(c,e1,e2,e3)
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)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
local g=Duel.GetMatchingGroup(cm.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
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
function cm.thfilter(c)
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)
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()))
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)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
local g=Duel.GetMatchingGroup(cm.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
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
function cm.operation2(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
......
......@@ -29,14 +29,28 @@ function cm.filter(c)
return c:IsSetCard(0x9c92) and not c:IsPublic()
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)
local g=Duel.GetMatchingGroup(cm.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
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 chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) and gc>0 end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
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
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)
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.ShuffleHand(tp)
e:SetLabel(#cg)
......
......@@ -37,12 +37,23 @@ function cm.cfilter(c)
return c:IsSetCard(0x9c92) and c:IsDiscardable()
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)
local g=Duel.GetMatchingGroup(cm.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
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)
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)
end
......
......@@ -29,10 +29,22 @@ function cm.initial_effect(c)
C9.RegisterEffect_Batch(c,e1,e2)
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)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
local g=Duel.GetMatchingGroup(cm.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
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
function cm.thfilter(c)
return c:IsSetCard(0x9c92) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
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