Commit b8aec001 authored by nanahira's avatar nanahira

eratta

parent 86f4af59
No preview for this file type
...@@ -61,7 +61,7 @@ function cm.initial_effect(c) ...@@ -61,7 +61,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.spfilter(c) function cm.spfilter(c)
return c.Senya_desc_with_nanahira and c:IsType(TYPE_TRAP) and c:IsAbleToGraveAsCost() return c.Senya_desc_with_nanahira and c:IsType(TYPE_TRAP) and c:IsRelesable()
end end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
...@@ -71,9 +71,9 @@ function cm.spcon(e,c) ...@@ -71,9 +71,9 @@ function cm.spcon(e,c)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
local g=Senya.SelectGroup(tp,HINTMSG_TOGRAVE,g,Senya.CheckFieldFilter,nil,3,3,tp,c) local g=Senya.SelectGroup(tp,HINTMSG_RELEASE,g,Senya.CheckFieldFilter,nil,3,3,tp,c)
c:SetMaterial(g) c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function cm.desccost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.desccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -52,7 +52,19 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,19 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
cm[tc]=e1 local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UNRELEASABLE_NONSUM)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
cm[tc]={e1,e2,e3}
if e:GetHandler():IsFaceup() and e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsFaceup() and e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():SetCardTarget(tc) e:GetHandler():SetCardTarget(tc)
end end
...@@ -73,8 +85,13 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,8 +85,13 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local te=cm[tc] local eset=cm[tc]
if te then te:Reset() end if eset then
for _,te in ipairs(tc) do
te:Reset()
end
cm[tc]=nil
end
if c:IsHasCardTarget(tc) then c:CancelCardTarget(tc) end if c:IsHasCardTarget(tc) then c:CancelCardTarget(tc) end
end end
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