--created & coded by Lyris, art from Cardfight!! Vanguard's "Silver Thorn Dragon Tamer, Luqiuier" --エントラフォーマスター・ルシエル local s,id,o=GetID() function s.initial_effect(c) aux.AddXyzProcedureLevelFree(c,aux.FilterBoolFunction(Card.IsXyzLevel,c,5),aux.drccheck,3,3,s.ovfilter,aux.Stringid(id,0)) aux.EnableExtraDeckSummonCountLimit() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(id,0)) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) c:RegisterEffect(e2) end function s.ovfilter(c) return c:IsFaceup() and c:IsRank(4) and c:IsSetCard(0x2c74) end function s.spfilter(c,e,tp) return c:IsSetCard(0x1c74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetOverlayGroup(tp,1,0):IsExists(s.spfilter,1,nil,e,tp) end Duel.Hint(HINT_OPSELECTED,0,e:GetDescription()) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_OVERLAY) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=Duel.GetOverlayGroup(tp,1,0):Filter(s.spfilter,nil,e,tp) if ft<=0 or #g==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if Duel.SpecialSummon(g:SelectSubGroup(tp,aux.drccheck,false,1,ft),0,tp,tp,false,false,POS_FACEUP)<2 then return end local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetOperation(s.checkop) e2:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_EXTRA) and aux.ExtraDeckSummonCountLimit[sump]<=0 and not c:IsSetCard(0x2c74) end function s.cfilter(c,tp) return c:GetSummonPlayer()==tp and c:IsPreviousLocation(LOCATION_EXTRA) and not c:IsSetCard(0x2c74) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.cfilter,1,nil,tp) then aux.ExtraDeckSummonCountLimit[tp]=aux.ExtraDeckSummonCountLimit[tp]-1 end if eg:IsExists(s.cfilter,1,nil,1-tp) then aux.ExtraDeckSummonCountLimit[1-tp]=aux.ExtraDeckSummonCountLimit[1-tp]-1 end end