Commit 9c5031aa authored by nanahira's avatar nanahira

add exile

parent 598538d5
...@@ -27,6 +27,16 @@ local function grantDecktop(e) ...@@ -27,6 +27,16 @@ local function grantDecktop(e)
Duel.RegisterEffect(e3,0) Duel.RegisterEffect(e3,0)
end end
local function exile(g)
if Auxiliary.GetValueType(g)=="Card" then
g=Group.FromCards(g)
end
for tc in Auxiliary.Next(g) do
Duel.SendtoGrave(tc:GetOverlayGroup(),REASON_RULE)
end
Duel.Exile(g,REASON_RULE)
end
local function fieldEffectTemplate(r,notg) local function fieldEffectTemplate(r,notg)
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
...@@ -124,6 +134,15 @@ function Auxiliary.PreloadUds() ...@@ -124,6 +134,15 @@ function Auxiliary.PreloadUds()
end end
end) end)
grantDecktop(e1) grantDecktop(e1)
local e1=deckEffectTemplate()
e1:SetDescription(1101)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,0x7f,0,1,99,nil)
if #g>0 then
exile(g)
end
end)
grantDecktop(e1)
--deck effects for global --deck effects for global
local e1=deckEffectTemplate() local e1=deckEffectTemplate()
e1:SetDescription(1297) e1:SetDescription(1297)
...@@ -307,6 +326,17 @@ function Auxiliary.PreloadUds() ...@@ -307,6 +326,17 @@ function Auxiliary.PreloadUds()
end) end)
grantAll(e1,nil,loc) grantAll(e1,nil,loc)
local loc=LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED
local e1=fieldEffectTemplate(loc)
e1:SetDescription(1101)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(e:GetHandler())
if #g>0 then
exile(g)
end
end)
grantAll(e1,nil,loc)
--spells and traps --spells and traps
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetDescription(65) e1:SetDescription(65)
......
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