Commit b0db9ea5 authored by Tachibana's avatar Tachibana

eme

parent 36b87553
Pipeline #6893 passed with stages
in 25 minutes and 39 seconds
......@@ -107,7 +107,7 @@ end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.costfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.costfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SendtoDeck(g,nil,2,REASON_COST)
g:KeepAlive()
e:SetLabelObject(g)
......@@ -116,15 +116,13 @@ function cm.spfilter(c,e,tp,mc)
return aux.IsCodeListed(c,mc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetLabelObject()
if chk==0 then return g and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,g:GetFirst())
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject(g)
local g=e:GetLabelObject()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not g then return end
local sc=Duel.GetFirstMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp,g:GetFirst())
local sc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,g:GetFirst())
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
......@@ -134,7 +132,7 @@ function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and rp==1-tp and Duel.IsChainNegatable(ev)
end
function cm.cfilter(c,race)
return c:IsRace(race) and c:IsAbleToRemoveAsCost()
return c.elm and bit.band(c.elm,race)==race and c:IsAbleToRemoveAsCost()
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local race=re:GetHandler():GetRace()
......
......@@ -3,7 +3,7 @@ local m=12089034
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
function cm.initial_effect(c)
aux.AddCodeList(c,12089004)
aux.AddCodeList(c,12089005)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.costfilter(c)
return c:IsCode(12089004) and c:IsAbleToGraveAsCost()
return c:IsCode(12089005) and c:IsAbleToGraveAsCost()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -87,7 +87,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(c,nil,1,REASON_EFFECT)
end
end
function cm.spfilter(c,e,tp)
function cm.spfilter1(c,e,tp)
return c:IsSetCard(0xcfa0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -95,11 +95,11 @@ function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,e,tp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter1),tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,e,tp)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil)
......
......@@ -35,7 +35,7 @@ function cm.initial_effect(c)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.thcon)
e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,LOCATION_GRAVE,e:GetHandler())
local mg=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,e:GetHandler())
if chk==0 then return mg:GetCount()>=5 end
local g=mg:Select(tp,5,5,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
......
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