--created by Pina, coded by Lyris local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.spcon) e1:SetOperation(s.spop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e2:SetCost(s.cost) e2:SetOperation(s.operation) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_DESTROYED) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCondition(function(e,tp,eg,ep,ev,re,r) return r&REASON_BATTLE+REASON_EFFECT>0 end) e3:SetCost(s.dcost) e3:SetTarget(s.target) e3:SetOperation(s.op) c:RegisterEffect(e3) end function s.spfilter(c) return c:IsRace(RACE_PYRO) and c:IsAbleToRemoveAsCost() end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,2,nil) end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Remove(Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,2,2,nil),POS_FACEUP,REASON_COST) end function s.cfilter(c) return c:IsRace(RACE_PYRO) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.SendtoGrave(Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_DECK,0,1,1,nil),REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFacedown() or not c:IsRelateToEffect(e) then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end function s.dcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,1000) end Duel.PayLPCost(tp,1000) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end end function s.op(e,tp,eg,ep,ev,re,r,rp) for c in aux.Next(Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)) do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(-1000) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) c:RegisterEffect(e1) end end