--Qwei, Hollohom Wanderer local ref,id=GetID() xpcall(function() require("expansions/script/Hollohom") end,function() require("script/Hollohom") end) function ref.initial_effect(c) aux.EnablePendulumAttribute(c) --Search local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_PZONE) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) e1:SetCountLimit(1,id) e1:SetTarget(ref.thtg) e1:SetOperation(ref.thop) c:RegisterEffect(e1) end --Search function ref.thfilter(c) return Hollohom.Is(c) and c:IsAbleToHand() and not c:IsCode(id) end function ref.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(ref.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0) local cat=CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK if Hollohom.FieldCheck(tp) then cat=cat+CATEGORY_SPECIAL_SUMMON end e:SetCategory(cat) end function ref.ssfilter(c,e,tp) return Hollohom.Is(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function ref.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) and c:IsAbleToDeck() then return false end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,ref.thfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT) then Duel.ConfirmCards(1-tp,g) Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Hollohom.FieldCheck(tp) and Duel.IsExistingMatchingCard(ref.ssfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(tp,ref.ssfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end end end