diff --git a/unofficial/c511027047.lua b/unofficial/c511027047.lua new file mode 100644 index 0000000000..6c9610e484 --- /dev/null +++ b/unofficial/c511027047.lua @@ -0,0 +1,28 @@ +--クリムゾン・ヘル・セキュア (Anime) +--Scarlet Security (Anime) +local s,id=GetID() +function s.initial_effect(c) + --Destroy all face-up Spell and Trap Cards your opponent controls + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCondition(s.condition) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} +function s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_RED_DRAGON_ARCHFIEND),tp,LOCATION_ONFIELD,0,1,nil) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end + local sg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,e:GetHandler()) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local sg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,e:GetHandler()) + Duel.Destroy(sg,REASON_EFFECT) +end \ No newline at end of file