--La Dianaceleste Progenitrice, Osservatrice Temporale, Darivia --Scripted by: XGlitchy30 local s,id=GetID() function s.initial_effect(c) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_WARRIOR),3) c:EnableReviveLimit() --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) e1:SetCondition(aux.LinkSummonedCond) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --bounce local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCode(EVENT_REMOVE) e2:SetCountLimit(1,id+100) e2:SetCost(s.cost) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end function s.counterfilter(c) return c:IsRace(RACE_WARRIOR) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) return not s.counterfilter(c) end function s.cfilter(c) return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemoveAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) if chk==0 then return true end end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local g=c:GetMaterial() if chk==0 then if e:GetLabel()~=1 then return false end e:SetLabel(0) return e:IsActivated() and g and #g>0 and g:IsExists(s.cfilter,1,nil) and s.cost(e,tp,eg,ep,ev,re,r,rp,0) end e:SetLabel(0) s.cost(e,tp,eg,ep,ev,re,r,rp,1) local atk=0 local cg=g:Filter(s.cfilter,nil) if #cg>0 then Duel.Remove(cg,POS_FACEUP,REASON_COST) atk=cg:GetSum(Card.GetAttack) e:SetLabel(atk) end Duel.SetCustomOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,0,atk) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToChain(0) or not c:IsFaceup() then return end local atk=e:GetLabel() c:UpdateATK(atk,RESET_PHASE+PHASE_END) end function s.filter(c) return c:IsMonster() and c:IsSetCard(0x223,0x2a7,0x528,0xd0a1,0xd0a2) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.Search(g,tp) end end