--灯火之指引 local m=28327031 local cm=_G["c"..m] Duel.LoadScript("c28327000.lua") function cm.initial_effect(c) aux.AddCodeList(c,28327000) aux.AddRitualProcGreater(c,cm.ritual_filter,nil,nil,cm.ritual_filter) --draw local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCountLimit(1,m) e3:SetCondition(aux.exccon) e3:SetCost(aux.bfgcost) e3:SetTarget(cm.drtg) e3:SetOperation(cm.drop) c:RegisterEffect(e3) end function cm.ritual_filter(c) return c:IsCode(28327000) end function cm.drfilter(c) return c:IsCode(28327000) and c:IsAbleToDeck() and not c:IsPublic() end function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(cm.drfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.SetTargetPlayer(tp) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) end function cm.drop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(p,cm.drfilter,p,LOCATION_HAND,0,1,63,nil) if g:GetCount()>0 then Duel.ConfirmCards(1-p,g) local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.ShuffleDeck(p) Duel.BreakEffect() Duel.Draw(p,ct,REASON_EFFECT) end end