hi, i do it in 2 way
first, how you ask with ignition
secon a little over power[:thumbu:]
first
function c20000001.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,1)
c:EnableReviveLimit()
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetDescription(aux.Stringid(39272762,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,0x1e0)
e3:SetCost(c20000001.atcost)
e3:SetOperation(c20000001.operation)
c:RegisterEffect(e3)
end
function c20000001.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c20000001.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsDestructable()
end
function c20000001.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetOverlayGroup(tp,0,1)
c:IsRelateToEffect(e)
g:GetCount()
Duel.SendtoGrave(g,REASON_EFFECT)--send xyz material to grave
local g=Duel.GetMatchingGroup(c20000001.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function c20000001.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,1)
c:EnableReviveLimit()
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetDescription(aux.Stringid(39272762,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,0x1e0)
e3:SetCost(c20000001.atcost)
e3:SetOperation(c20000001.operation)
c:RegisterEffect(e3)
end
function c20000001.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c20000001.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsDestructable()
end
function c20000001.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetOverlayGroup(tp,0,1)
c:IsRelateToEffect(e)
g:GetCount()
Duel.Overlay(e:GetHandler(),g)--in più
local g=Duel.GetMatchingGroup(c20000001.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--With great power comes great responsibility
Edited by user
2015-12-25T17:40:32Z
|
Reason: Not specified