Commit 91d597dc authored by 花桃白音's avatar 花桃白音

fix 0004-01

parent 4947dd35
......@@ -52,4 +52,31 @@ function c4204001.initial_effect(c)
return not e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) end)
e4:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e4)
--set
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end)
e5:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c4204001.stfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c4204001.stfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c4204001.stfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end)
e5:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end)
c:RegisterEffect(e5)
end
function c4204001.stfilter(c)
return c:IsType(TYPE_QUICKPLAY) and c:IsSSetable()
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