--Starforce Regenerator local s,id=GetID() function s.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_TRIGGER_O) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP|EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DESTROYED) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) --atk local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BATTLE_CONFIRM) e3:SetCondition(s.atkcon) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) --cannot be battle target local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e4:SetRange(LOCATION_MZONE) e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e4:SetValue(s.bttg) c:RegisterEffect(e4) end function s.cfilter(c,tp) return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.sptg(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,true,false) end Duel.SetCardOperationInfo(c,CATEGORY_SPECIAL_SUMMON) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToChain() then return end Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle() and bc:IsControler(1-tp) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local bc=c:GetBattleTarget() if chk==0 then return s.atkcon(e,tp,eg,ep,ev,re,r,rp) end Duel.SetCustomOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,LOCATION_MZONE,bc:GetBaseAttack()*2) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() if c:IsFaceup() and c:IsRelateToBattle() and c:IsRelateToChain() and bc:IsFaceup() and bc:IsRelateToBattle() and bc:IsControler(1-tp) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(bc:GetBaseAttack()*2) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_DISABLE|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end end function s.bttg(e,c) return c:IsControler(e:GetHandlerPlayer()) and c:IsSetCard(0x24f) and c~=e:GetHandler() end