--Drago Spirito Faerie --Scripted by: XGlitchy30 local s,id=GetID() function s.initial_effect(c) --battle protection c:BattleProtection() --energy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCustomCategory(CATEGORY_UPDATE_ENERGY) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DDD) e1:SetCode(EVENT_REMOVE) e1:HOPT() e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local en=Duel.GetEngagedCard(tp) if chk==0 then return en~=nil and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,en) end Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,en) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local en=Duel.GetEngagedCard(tp) if chk==0 then return en~=nil and en:IsCanUpdateEnergy(3,tp,REASON_EFFECT) end Duel.SetCustomOperationInfo(0,CATEGORY_UPDATE_ENERGY,en,1,INFOFLAG_INCREASE,3) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local en=Duel.GetEngagedCard(tp) if en then local _,incr=en:UpdateEnergy(3,tp,REASON_EFFECT,0,c) en=Duel.GetEngagedCard(tp) if incr==3 and en and en:HasLevel() and en:GetEnergy()0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end end