--created & coded by Lyris, art found by DiegoGisbertLlorens of DeviantArt --機氷竜インドラ local s,id,o=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetOperation(s.op) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_TO_GRAVE) e3:SetCountLimit(1,id) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetTarget(s.tg) e3:SetOperation(s.thop) c:RegisterEffect(e3) 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.op(e,tp,eg,ep,ev,re,r,rp) Duel.GetMatchingGroup(aux.AND(Card.IsFaceup,Card.IsSetCard),tp,LOCATION_MZONE,LOCATION_MZONE,nil,0xd76):ForEach(function(tc) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(500) tc:RegisterEffect(e1) end) end function s.filter(c,chk) return c:IsSetCard(0xd76) and c:IsAbleToHand() and (chk and c:IsType(TYPE_MONSTER) or c:IsType(TYPE_SPELL+TYPE_TRAP)) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) local chkn=Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(aux.NOT(Card.IsStatus),tp,0,LOCATION_MZONE,1,nil,STATUS_JUST_POS) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,chkn) end if chkn then e:SetLabel(1) else e:SetLabel(0) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetFlagEffect(tp,id)==0 then local rc=1 while rc0) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end