-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathc37926346.lua
More file actions
37 lines (37 loc) · 1.22 KB
/
c37926346.lua
File metadata and controls
37 lines (37 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--Steelswarm Roach
function c37926346.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetDescription(aux.Stringid(37926346,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCondition(c37926346.condition)
e1:SetCost(c37926346.cost)
e1:SetTarget(c37926346.target)
e1:SetOperation(c37926346.operation)
c:RegisterEffect(e1)
end
function c37926346.filter(c)
return c:IsLevelAbove(5)
end
function c37926346.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and eg:IsExists(c37926346.filter,1,nil)
end
function c37926346.cost(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 c37926346.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c37926346.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end