--Sigil Island function c213355.initial_effect(c) --activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --boost local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetValue(c213355.atkval) c:RegisterEffect(e2) --draw local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(213355,0)) e3:SetCategory(CATEGORY_DRAW) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetRange(LOCATION_FZONE) e3:SetCountLimit(1,213355) e3:SetCondition(c213355.drcon) e3:SetTarget(c213355.drtg) e3:SetOperation(c213355.drop) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(213355,1)) e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_FZONE) e4:SetCountLimit(1,213356) e4:SetCost(c213355.cost1) e4:SetTarget(c213355.target1) e4:SetOperation(c213355.activate1) c:RegisterEffect(e4) local e5=e4:Clone() e5:SetDescription(aux.Stringid(213355,2)) e5:SetCost(c213355.cost2) e5:SetTarget(c213355.target2) e5:SetOperation(c213355.activate2) c:RegisterEffect(e5) end function c213355.atkval(e,c) return Duel.GetMatchingGroup(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE+LOCATION_GRAVE,0,nil,TYPE_MONSTER):GetClassCount(Card.GetRace)*200 end function c213355.cfilter(c,tp) return c:IsControler(tp) and aux.IsCodeListed(c,213355) and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL) end function c213355.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(c213355.cfilter,1,nil,tp) end function c213355.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function c213355.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) end function c213355.costfilter1(c) return bit.band(c:GetType(),0x81)==0x81 and c:IsLevel(1) and not c:IsPublic() end function c213355.cost1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c213355.costfilter1,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g=Duel.SelectMatchingCard(tp,c213355.costfilter1,tp,LOCATION_HAND,0,1,1,nil) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) end function c213355.thfilter1(c) return bit.band(c:GetType(),0x82)==0x82 and c:IsAbleToHand() end function c213355.target1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c213355.thfilter1,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c213355.activate1(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c213355.thfilter1,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function c213355.costfilter2(c) return bit.band(c:GetType(),0x82)==0x82 and not c:IsPublic() end function c213355.cost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c213355.costfilter2,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g=Duel.SelectMatchingCard(tp,c213355.costfilter2,tp,LOCATION_HAND,0,1,1,nil) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) end function c213355.thfilter2(c) return bit.band(c:GetType(),0x81)==0x81 and c:IsLevel(1) and c:IsAbleToHand() end function c213355.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c213355.thfilter2,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c213355.activate2(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c213355.thfilter2,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end