Commit 4514f832 authored by Tachibana's avatar Tachibana

ndyd

parent 05cd4688
...@@ -23,8 +23,7 @@ end ...@@ -23,8 +23,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD,0,2,2,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD,0,2,2,e:GetHandler())
local tc=g:GetFirst() if g and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.Draw(tp,2,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -52,15 +52,15 @@ function cm.initial_effect(c) ...@@ -52,15 +52,15 @@ function cm.initial_effect(c)
e6:SetOperation(cm.addc) e6:SetOperation(cm.addc)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--activate cost --activate cost
local c7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
c7:SetType(EFFECT_TYPE_FIELD) e7:SetType(EFFECT_TYPE_FIELD)
c7:SetCode(EFFECT_ACTIVATE_COST) e7:SetCode(EFFECT_ACTIVATE_COST)
c7:SetRange(LOCATION_MZONE) e7:SetRange(LOCATION_MZONE)
c7:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
c7:SetTargetRange(0,1) e7:SetTargetRange(0,1)
c7:SetCost(cm.costchk) e7:SetCost(cm.costchk)
c7:SetOperation(cm.costop) e7:SetOperation(cm.costop)
c:RegisterEffect(c7) c:RegisterEffect(e7)
--accumulate --accumulate
local e8=Effect.CreateEffect(c) local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD) e8:SetType(EFFECT_TYPE_FIELD)
...@@ -70,6 +70,7 @@ function cm.initial_effect(c) ...@@ -70,6 +70,7 @@ function cm.initial_effect(c)
e8:SetTargetRange(0,1) e8:SetTargetRange(0,1)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
cm.Armageddon=1
function cm.acop(e,tp,eg,ep,ev,re,r,rp) function cm.acop(e,tp,eg,ep,ev,re,r,rp)
local ct=math.floor(ev/1000) local ct=math.floor(ev/1000)
if ct>0 then if ct>0 then
...@@ -115,21 +116,18 @@ function cm.addc(e,tp,eg,ep,ev,re,r,rp) ...@@ -115,21 +116,18 @@ function cm.addc(e,tp,eg,ep,ev,re,r,rp)
c:AddCounter(0x7f3,d) c:AddCounter(0x7f3,d)
end end
end end
function cm.damfilter(c,tp) function cm.damfilter(c)
return c:GetCounter(0x7f3)>0 and c:IsHasEffect(17061230,tp) return c:GetCounter(0x7f3)>0 and c.Armageddon==1
end end
function cm.costchk(e,te_or_c,tp) function cm.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,17061230) local sg=Duel.GetMatchingGroup(cm.damfilter,tp,0,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(cm.damfilter,tp,LOCATION_ONFIELD,nil,nil,tp) local tc=sg:GetFirst()
local tc=g:GetFirst() local count=0
local sum=0
while tc do while tc do
local sct=tc:GetCounter(0x7f3) count=count+tc:GetCounter(0x7f3)
tc:RemoveCounter(tp,0x7f3,sct,0) tc=sg:GetNext()
sum=sum+sct
tc=g:GetNext()
end end
return Duel.CheckLPCost(tp,sum*300) return Duel.CheckLPCost(tp,count*300)
end end
function cm.costop(e,tp,eg,ep,ev,re,r,rp) function cm.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,17061230) Duel.Hint(HINT_CARD,0,17061230)
......
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