--[[ Curseflame Apostle Laro Apostolo Fiammaledetta Laro Card Author: Walrus Scripted by: XGlitchy30 ]] local s,id=GetID() function s.initial_effect(c) --link summon c:EnableReviveLimit() aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,ARCHE_CURSEFLAME),2,2) --If this card is Special Summoned: You can add 1 "Curseflame" card from your Deck or GY to your hand. local e1=Effect.CreateEffect(c) e1:SetDescription(id,0) e1:SetCategory(CATEGORIES_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:HOPT() e1:SetFunctions( nil, nil, s.thtg, s.thop ) c:RegisterEffect(e1) --Once per turn (Quick Effect): You can target 1 "Curseflame" monster that is in your GY or banishment; Special Summon it to your zone this card points to, and if you do, place 3 Curseflame Counters on it. local e2=Effect.CreateEffect(c) e2:SetDescription(id,1) e2:SetCategory(CATEGORY_SPECIAL_SUMMON|CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetRelevantTimings() e2:OPT() e2:SetFunctions( nil, nil, s.sptg, s.spop ) c:RegisterEffect(e2) --While there are 10 or more Curseflame counters on the field, all "Curseflame" monsters you control gain 1200 ATK/DEF. local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,0) e3:SetCondition(s.atkcon) e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,ARCHE_CURSEFLAME)) e3:SetValue(1200) c:RegisterEffect(e3) e3:UpdateDefenseClone(c) end --E1 function s.filter(c) return c:IsSetCard(ARCHE_CURSEFLAME) 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.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end --E2 function s.spfilter(c,e,tp,zone) return c:IsSetCard(ARCHE_CURSEFLAME) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) and c:IsCanAddCounter(COUNTER_CURSEFLAME,3,false,LOCATION_MZONE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local zone=e:GetHandler():GetLinkedZone(tp)&0x1f if chkc then return chkc:IsLocation(LOCATION_GB) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GB,0,1,nil,e,tp,zone) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GB,0,1,1,nil,e,tp,zone) Duel.SetCardOperationInfo(g,CATEGORY_SPECIAL_SUMMON) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,3,tp,COUNTER_CURSEFLAME) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToChain() or c:IsFacedown() then return end local zone=c:GetLinkedZone(tp)&0x1f local tc=Duel.GetFirstTarget() if tc:IsRelateToChain() and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)>0 then tc:AddCounter(COUNTER_CURSEFLAME,3) end end --E3 function s.atkcon(e) return Duel.GetCounter(0,1,1,COUNTER_CURSEFLAME)>=10 end