--Eternum Rek'Sai function c11000109.initial_effect(c) --synchro summon aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,11000103),aux.NonTuner(Card.IsSetCard,0x1F4),2) c:EnableReviveLimit() --cannot special summon local e0=Effect.CreateEffect(c) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetValue(aux.synlimit) c:RegisterEffect(e0) --damage local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(11000109,1)) e1:SetCategory(CATEGORY_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_TO_GRAVE) e1:SetCondition(c11000109.damcon) e1:SetTarget(c11000109.damtg) e1:SetOperation(c11000109.damop) c:RegisterEffect(e1) --actlimit local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(0,1) e2:SetValue(c11000109.aclimit) e2:SetCondition(c11000109.actcon) c:RegisterEffect(e2) --Heal local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(11000109,0)) e3:SetCategory(CATEGORY_RECOVER) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetTarget(c11000109.rectg) e3:SetOperation(c11000109.recop) c:RegisterEffect(e3) end function c11000109.damcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) end function c11000109.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetLP(tp,Duel.GetLP(tp)/2) end function c11000109.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end function c11000109.aclimit(e,re,tp) return not re:GetHandler():IsImmuneToEffect(e) end function c11000109.actcon(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end function c11000109.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) end function c11000109.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) end