-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathc6859683.lua
More file actions
26 lines (26 loc) · 924 Bytes
/
c6859683.lua
File metadata and controls
26 lines (26 loc) · 924 Bytes
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
--成功確率0%
function c6859683.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c6859683.target)
e1:SetOperation(c6859683.operation)
c:RegisterEffect(e1)
end
function c6859683.filter(c)
return (c:IsFacedown() or c:IsType(TYPE_FUSION)) and c:IsAbleToGrave()
end
function c6859683.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if chk==0 then return g:FilterCount(c6859683.filter,nil)>=2 end
end
function c6859683.operation(e,tp,eg,ep,ev,re,r,rp)
local cg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if cg:FilterCount(c6859683.filter,nil)<2 then return end
Duel.ConfirmCards(tp,cg)
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_EXTRA,0,nil,TYPE_FUSION)
if g:GetCount()<2 then return end
local rg=g:RandomSelect(tp,2)
Duel.SendtoGrave(rg,REASON_EFFECT)
end