Skip to content

Commit 41f1378

Browse files
Add Scarlet Security (Anime)
1 parent 0871420 commit 41f1378

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

unofficial/c511027047.lua

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
--クリムゾン・ヘル・セキュア (Anime)
2+
--Scarlet Security (Anime)
3+
local s,id=GetID()
4+
function s.initial_effect(c)
5+
--Destroy all face-up Spell and Trap Cards your opponent controls
6+
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
8+
e1:SetCategory(CATEGORY_DESTROY)
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCode(EVENT_FREE_CHAIN)
11+
e1:SetCondition(s.condition)
12+
e1:SetTarget(s.target)
13+
e1:SetOperation(s.activate)
14+
c:RegisterEffect(e1)
15+
end
16+
s.listed_names={CARD_RED_DRAGON_ARCHFIEND}
17+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
18+
return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_RED_DRAGON_ARCHFIEND),tp,LOCATION_ONFIELD,0,1,nil)
19+
end
20+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
21+
if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
22+
local sg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,e:GetHandler())
23+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0)
24+
end
25+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
26+
local sg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,e:GetHandler())
27+
Duel.Destroy(sg,REASON_EFFECT)
28+
end

0 commit comments

Comments
 (0)