Commit 98623a88 authored by Tachibana's avatar Tachibana

得得得得得

parent 62a0d43e
...@@ -65,9 +65,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,9 +65,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) 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) 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 if g:GetCount()>0 then
local grav=g:GetFirst():IsLocation(LOCATION_GRAVE)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if grav then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end
end end
end end
--grave to hand --grave to hand
......
...@@ -30,6 +30,9 @@ end ...@@ -30,6 +30,9 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsFacedown() return c:IsFacedown()
end end
function cm.ckfilter2(c,tp)
return c:GetOwner()==tp
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 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) 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) ...@@ -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) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
local dg=Duel.GetOperatedGroup() local dg=Duel.GetOperatedGroup()
local s1=dg:Filter(Card.GetOwner,nil,tp):GetCount() local s1=dg:Filter(cm.ckfilter2,nil,tp):GetCount()
local s2=dg:Filter(Card.GetOwner,nil,1-tp):GetCount() local s2=dg:Filter(cm.ckfilter2,nil,1-tp):GetCount()
Duel.Damage(tp,s1*500,REASON_EFFECT) Duel.Damage(tp,s1*500,REASON_EFFECT)
Duel.Damage(1-tp,s2*500,REASON_EFFECT) Duel.Damage(1-tp,s2*500,REASON_EFFECT)
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=92369048 local m=92369048
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) 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 --activate from hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -57,6 +57,9 @@ c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsFaceup),LOCATION_MZONE) ...@@ -57,6 +57,9 @@ c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsFaceup),LOCATION_MZONE)
e11:SetValue(cm.splimit) e11:SetValue(cm.splimit)
c:RegisterEffect(e11) c:RegisterEffect(e11)
end 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) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
...@@ -89,8 +92,8 @@ end ...@@ -89,8 +92,8 @@ end
function cm.excon(e) function cm.excon(e)
local c=e:GetHandler() 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 end
function cm.splimit(e,se,sp,st,spos,tgp) 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 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