--Liberated Storm Buster --Made and Scripted by Swaggy local cid,id=GetID() function cid.initial_effect(c) --time leap procedure aux.AddOrigTimeleapType(c,false) aux.AddTimeleapProc(c,5,cid.sumcon,cid.tlfilter,nil) c:EnableReviveLimit() --actlimit local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_FIELD) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e0:SetRange(LOCATION_MZONE) e0:SetCode(EFFECT_CANNOT_ACTIVATE) e0:SetTargetRange(0,1) e0:SetValue(1) e0:SetCondition(cid.armacon) c:RegisterEffect(e0) --harpie local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(cid.harpcon) e1:SetTarget(cid.harptg) e1:SetOperation(cid.harpop) c:RegisterEffect(e1) --atk local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(cid.atkcon) e2:SetCost(cid.atkcost) e2:SetOperation(cid.atkop) c:RegisterEffect(e2) --revive local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY) e3:SetRange(LOCATION_GRAVE) e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCondition(cid.revcon) e3:SetTarget(cid.revtg) e3:SetOperation(cid.revop) c:RegisterEffect(e3) end function cid.sumcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>=3 end function cid.tlfilter(c,e,mg) return c:IsAttribute(ATTRIBUTE_WIND) and c:GetLevel()==e:GetHandler():GetFuture()-1 end function cid.armacon(e) return Duel.GetAttacker()==e:GetHandler() end function cid.harpcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_TIMELEAP) end function cid.harpfilter(c) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToHand() end function cid.harptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and cid.harpfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(cid.harpfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,cid.harpfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_MZONE) end function cid.danfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSummonable(true,nil) end function cid.harpop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then if Duel.IsExistingMatchingCard(cid.danfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(433003,1)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) local g=Duel.SelectMatchingCard(tp,cid.danfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) Duel.Summon(tp,g:GetFirst(),true,nil) end end end function cid.atkfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsDiscardable() end function cid.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=Duel.GetAttackTarget() if not c then return false end if c:IsControler(1-tp) then c=Duel.GetAttacker() end e:SetLabelObject(c) return c and c:IsAttribute(ATTRIBUTE_WIND) and c:IsRelateToBattle() end function cid.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cid.atkfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.DiscardHand(tp,cid.atkfilter,1,1,REASON_COST+REASON_DISCARD) end function cid.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetLabelObject() if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) tc:RegisterEffect(e1) end end function cid.revfilter(c,tp) return c:GetSummonLocation()==LOCATION_EXTRA and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousRaceOnField(),RACE_THUNDER)>0 end function cid.revcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(cid.revfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) end function cid.revtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function cid.revop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) e1:SetReset(RESET_EVENT+RESETS_REDIRECT) c:RegisterEffect(e1,true) end end