--Nato dalla Dianaceleste sotto la Stella Silente, Roland Zorael --Scripted by: XGlitchy30 local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddXyzProcedureLevelFree(c,s.mfilter,s.xyzcheck,2,2) --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_EQUIP) 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.XyzSummonedCond) e1:SetCost(s.cost) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) --bounce local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+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) --add to hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,3)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id+100) e3:SetCost(s.dtrcost) e3:SetTarget(s.dtrtg) e3:SetOperation(s.dtrop) c:RegisterEffect(e3) 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.mfilter(c,xyzc) return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,4) and c:IsRace(RACE_WARRIOR) end function s.includemat(c) return c:IsXyzType(TYPE_MONSTER) and c:IsSetCard(0x223,0xd0a1) end function s.xyzcheck(g) return g:IsExists(s.includemat,1,nil) end function s.eqsfilter(c,tp,ec) return c:GetType()&(TYPE_SPELL+TYPE_EQUIP)==TYPE_SPELL+TYPE_EQUIP and c:IsSetCard(0xd0a2) and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.eqsfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_DECK+LOCATION_GRAVE) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFacedown() or not c:IsRelateToChain(0) then return end local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqsfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,tp,c) if #g==0 then return end local ft=math.min(Duel.GetLocationCount(tp,LOCATION_SZONE),3) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local sg=g:Select(tp,1,ft,nil) if #sg>0 then for tc in aux.Next(sg) do Duel.Equip(tp,tc,c,true,true) end Duel.EquipComplete() end end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,PLAYER_ALL,LOCATION_ONFIELD) end function s.thop(e) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToChain(0) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end function s.cfilter(c) return c:IsMonster() and c:IsSetCard(0x223) and c:IsAbleToRemoveAsCost() end function s.dtrcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil) and s.cost(e,tp,eg,ep,ev,re,r,rp,0) end s.cost(e,tp,eg,ep,ev,re,r,rp,1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g1=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) if #g1>0 then Duel.Remove(g1,POS_FACEUP,REASON_COST) end end function s.tgfilter1(c,tp) return c:IsMonster() and c:IsSetCard(0xd0a1) and c:IsAbleToHand() and Duel.IsExistingTarget(s.tgfilter2,tp,LOCATION_GRAVE,0,1,c) end function s.tgfilter2(c) return c:GetType()&(TYPE_SPELL+TYPE_EQUIP)==TYPE_SPELL+TYPE_EQUIP and c:IsSetCard(0xd0a2) and c:IsAbleToHand() end function s.dtrtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingTarget(s.tgfilter1,tp,LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g1=Duel.SelectTarget(tp,s.tgfilter1,tp,LOCATION_GRAVE,0,1,1,nil,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g2=Duel.SelectTarget(tp,s.tgfilter2,tp,LOCATION_GRAVE,0,1,1,g1:GetFirst()) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,#g1,tp,LOCATION_GRAVE) end function s.sumfilter(c) return c:IsMonster() and c:IsRace(RACE_WARRIOR) and c:IsSummonable(true,nil) end function s.dtrop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards() if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then local sg=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then Duel.BreakEffect() Duel.ShuffleHand(tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) local sc=sg:Select(tp,1,1,nil):GetFirst() if sc then Duel.Summon(tp,sc,true,nil) end end end end