-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathc54304344.lua
More file actions
34 lines (34 loc) · 1.23 KB
/
Copy pathc54304344.lua
File metadata and controls
34 lines (34 loc) · 1.23 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
--Ramuh, Eleanor's Servant
function c54304344.initial_effect(c)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65192027,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c54304344.effcon)
e3:SetTarget(c54304344.target)
e3:SetOperation(c54304344.activate)
c:RegisterEffect(e3)
end
function c54304344.filter2(c)
return c:IsCode(77366257) and c:IsFaceup()
end
function c54304344.effcon(e)
return Duel.IsExistingMatchingCard(c54304344.filter2,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil)
end
function c54304344.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c54304344.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end