-- Radiant-Summon - Xenoform function c249000108.initial_effect(c) c:EnableReviveLimit() --cannot special summon local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(aux.FALSE) c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(16898077,0)) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(c249000108.destg) e2:SetOperation(c249000108.desop) c:RegisterEffect(e2) --spsummon to grave local e3=Effect.CreateEffect(c) e3:SetDescription(2) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCode(EVENT_TO_GRAVE) e3:SetCountLimit(1,249000108) e3:SetCondition(c249000108.condition2) e3:SetTarget(c249000108.target2) e3:SetOperation(c249000108.operation2) c:RegisterEffect(e3) --Special Summon standy phase local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(12538374,0)) e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCode(EVENT_PHASE+PHASE_STANDBY) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1) e4:SetCondition(c249000108.condition) e4:SetTarget(c249000108.target2) e4:SetOperation(c249000108.operation2) c:RegisterEffect(e4) end function c249000108.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) end function c249000108.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Damage(1-tp,1000,REASON_EFFECT) end end function c249000108.filter2(c) return c:IsCode(249000108) and c:IsFaceup() end function c249000108.condition(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c249000108.filter2,tp,LOCATION_ONFIELD,0,1,nil) end function c249000108.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c249000108.operation2(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP) end end function c249000108.condition2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE) end