--Number P257: Roastng Rooster function c249001091.initial_effect(c) c:EnableReviveLimit() aux.AddCodeList(c,249001090) --spsummon condition local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetValue(c249001091.splimit) c:RegisterEffect(e0) --destroy local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(37818794,0)) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(c249001091.descon) e3:SetCost(c249001091.descost) e3:SetTarget(c249001091.destg) e3:SetOperation(c249001091.desop) c:RegisterEffect(e3) --multiatk local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_EXTRA_ATTACK) e4:SetValue(1) e4:SetCondition(c249001091.atkcon) c:RegisterEffect(e4) end function c249001091.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA end function c249001091.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,249001090) end function c249001091.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c249001091.destg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) end function c249001091.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) if g:GetCount()>0 then local atk=g:GetFirst():GetTextAttack() if atk<0 then atk=0 end Duel.HintSelection(g) if Duel.Destroy(g,REASON_EFFECT)~=0 then Duel.Damage(1-tp,atk,REASON_EFFECT) end end end function c249001091.atkcon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>0 end