Commit 98623a88 authored by Tachibana's avatar Tachibana

得得得得得

parent 62a0d43e
Pipeline #13379 passed with stages
in 29 minutes and 55 seconds
......@@ -65,9 +65,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spsumfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local grav=g:GetFirst():IsLocation(LOCATION_GRAVE)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if grav then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end
end
end
--grave to hand
......
......@@ -30,6 +30,9 @@ end
function cm.filter(c)
return c:IsFacedown()
end
function cm.ckfilter2(c,tp)
return c:GetOwner()==tp
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......@@ -39,8 +42,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
local dg=Duel.GetOperatedGroup()
local s1=dg:Filter(Card.GetOwner,nil,tp):GetCount()
local s2=dg:Filter(Card.GetOwner,nil,1-tp):GetCount()
local s1=dg:Filter(cm.ckfilter2,nil,tp):GetCount()
local s2=dg:Filter(cm.ckfilter2,nil,1-tp):GetCount()
Duel.Damage(tp,s1*500,REASON_EFFECT)
Duel.Damage(1-tp,s2*500,REASON_EFFECT)
end
......@@ -2,7 +2,7 @@
local m=92369048
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsFaceup),LOCATION_MZONE)
c:SetUniqueOnField(1,0,cm.unifilter,LOCATION_MZONE)
--activate from hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -57,6 +57,9 @@ c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsFaceup),LOCATION_MZONE)
e11:SetValue(cm.splimit)
c:RegisterEffect(e11)
end
function cm.unifilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
......@@ -89,8 +92,8 @@ end
function cm.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(nil,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
return Duel.IsExistingMatchingCard(nil,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function cm.splimit(e,se,sp,st,spos,tgp)
return not Duel.IsExistingMatchingCard(nil,tgp,LOCATION_ONFIELD,0,1,nil)
return not Duel.IsExistingMatchingCard(nil,tgp,LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
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