--Signore Inferioringranaggio - Strax --Script by XGlitchy30 function c63553456.initial_effect(c) c:EnableCounterPermit(0x1554) --spsummon proc local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c63553456.spcon) e1:SetOperation(c63553456.spop) e1:SetValue(1) c:RegisterEffect(e1) --change position local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(63553456,0)) e2:SetCategory(CATEGORY_POSITION) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(c63553456.postg) e2:SetOperation(c63553456.posop) c:RegisterEffect(e2) --pierce local prc=Effect.CreateEffect(c) prc:SetType(EFFECT_TYPE_SINGLE) prc:SetCode(EFFECT_PIERCE) c:RegisterEffect(prc) --search local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_BATTLE_DAMAGE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(c63553456.ctcon) e3:SetTarget(c63553456.cttg) e3:SetOperation(c63553456.ctop) c:RegisterEffect(e3) end --filters function c63553456.scfilter(c) return c:IsSetCard(0x4554) and c:IsAbleToHand() end function c63553456.ctfilter(c) return c:GetCounter(0x1554)>0 end function c63553456.posfilter(c) return c:IsFaceup() and c:IsCanTurnSet() end --spsummon proc function c63553456.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsCanRemoveCounter(c:GetControler(),1,1,0x1554,3,REASON_COST) end function c63553456.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.RemoveCounter(tp,1,1,0x1554,3,REASON_RULE) end --change position function c63553456.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c63553456.posfilter,tp,0,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(c63553456.posfilter,tp,0,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) end function c63553456.posop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c63553456.posfilter,tp,0,LOCATION_MZONE,nil) if g:GetCount()>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) local op=Duel.GetOperatedGroup() op:KeepAlive() local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetLabelObject(op) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTarget(c63553456.indfilter) e1:SetValue(1) e1:SetReset(RESET_EVENT+0x1fe0000) Duel.RegisterEffect(e1,tp) end end function c63553456.indfilter(e,c) return e:GetLabelObject():IsContains(c) end --place counter function c63553456.ctcon(e,tp,eg,ep,ev,re,r,rp) if ep==tp then return false end local rc=eg:GetFirst() return rc==e:GetHandler() end function c63553456.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c63553456.scfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c63553456.ctop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c63553456.scfilter,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