--created & coded by Lyris, art by 7AHO of DeviantArt --機氷竜の風 local s,id,o=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e1:SetCondition(function(_,tp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end) e1:SetCost(s.cost) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) if not s.global_check then s.global_check=true s[0]={} s[1]={} local race=1 while race0 then local rc=1 while rc0 then return false end local tp=sump if targetp then tp=targetp end return s[tp][c:GetRace()] and s[tp][c:GetRace()]>1 end function s.rfilter(c) return c:IsSetCard(0xd76) and not c:IsPublic() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local c=e:GetHandler() local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_HAND,0,nil) if not (#g>0 and Duel.SelectEffectYesNo(tp,c)) then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetDescription(66) e1:SetCode(EFFECT_PUBLIC) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) g:Select(tp,1,1,nil):GetFirst():RegisterEffect(e1) e:SetLabel(1) end function s.filter(c) return c:IsSetCard(0xd76) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then e:SetLabel(0) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.sfilter(c,e,tp) return c:IsSetCard(0xd76) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.op(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if Duel.GetFlagEffect(tp,id)==0 then local rc=1 while rc0 and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,1152) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp),0,tp,tp,false,false,POS_FACEUP) end end