Commit 3009ec8d authored by DailyShana's avatar DailyShana

fix

parent e60544e9
......@@ -19,8 +19,11 @@ function c41855169.initial_effect(c)
e2:SetOperation(c41855169.operation)
c:RegisterEffect(e2)
end
function c41855169.cfilter(c)
return c:IsDiscardable() and c:IsAbleToGraveAsCost() and not c:IsHasEffect(81674782)
end
function c41855169.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c41855169.cfilter,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD)
......
......@@ -15,7 +15,19 @@ function c81674782.initial_effect(c)
e2:SetTargetRange(0xff,0xff)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(81674782)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetTargetRange(0xff,0xff)
e3:SetTarget(c81674782.checktg)
c:RegisterEffect(e3)
end
function c81674782.rmtarget(e,c)
return not c:IsLocation(0x80) and not c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c81674782.checktg(e,c)
return not c:IsPublic()
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment