--La Classique AoJ Fromboliera, Regaliae --Script by XGlitchy30 function c19772599.initial_effect(c) c:EnableReviveLimit() aux.AddFusionProcFunRep(c,c19772599.matfilter,2,true) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(c19772599.splimit) c:RegisterEffect(e1) --special summon rule local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetRange(LOCATION_EXTRA) e2:SetCondition(c19772599.spcon) e2:SetOperation(c19772599.spop) e2:SetValue(50331648) c:RegisterEffect(e2) --to hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(19772599,0)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCondition(c19772599.thcon) e3:SetTarget(c19772599.thtg) e3:SetOperation(c19772599.thop) c:RegisterEffect(e3) --atklimit local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_CANNOT_ATTACK) e4:SetCondition(c19772599.atkcon) c:RegisterEffect(e4) --banish local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(19772599,1)) e5:SetType(EFFECT_TYPE_IGNITION) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) e5:SetCondition(c19772599.rmcon) e5:SetCost(c19772599.rmcost) e5:SetTarget(c19772599.rmtg) e5:SetOperation(c19772599.rmop) c:RegisterEffect(e5) end --filters function c19772599.matfilter(c) return c:IsFusionSetCard(0x197) and c:GetLevel()==4 end function c19772599.thfilter(c) return c:IsSetCard(0x197) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() end --splimit and procedure function c19772599.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA end function c19772599.spfilter(c,fc) return c19772599.matfilter(c) and c:IsCanBeFusionMaterial(fc) end function c19772599.spfilter1(c,tp,g) return g:IsExists(c19772599.spfilter2,1,c,tp,c) end function c19772599.spfilter2(c,tp,mc) return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0 end function c19772599.spcon(e,c) if c==nil then return true end local tp=c:GetControler() local g=Duel.GetReleaseGroup(tp):Filter(c19772599.spfilter,nil,c) return g:IsExists(c19772599.spfilter1,1,nil,tp,g) end function c19772599.spop(e,tp,eg,ep,ev,re,r,rp,c) local g=Duel.GetReleaseGroup(tp):Filter(c19772599.spfilter,nil,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) local g1=g:FilterSelect(tp,c19772599.spfilter1,1,1,nil,tp,g) local mc=g1:GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) local g2=g:FilterSelect(tp,c19772599.spfilter2,1,1,mc,tp,mc) g1:Merge(g2) c:SetMaterial(g1) Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL) end --to hand function c19772599.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end function c19772599.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c19772599.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c19772599.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c19772599.thfilter,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 --atklimit function c19772599.atkcon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)>=Duel.GetFieldGroupCount(1-e:GetHandlerPlayer(),LOCATION_HAND,0) end --banish function c19772599.rmcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)