--Alien Homotherium function c213140.initial_effect(c) --summon success local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(213140,0)) e1:SetCategory(CATEGORY_COUNTER) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(c213140.addct) e1:SetOperation(c213140.addc) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) --spsummon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(213140,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,213140) e3:SetCondition(c213140.spcon1) e3:SetTarget(c213140.sptg1) e3:SetOperation(c213140.spop1) c:RegisterEffect(e3) --spsummon opp local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(213140,2)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_TO_GRAVE) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCountLimit(1,213141) e4:SetCondition(c213140.condition) e4:SetTarget(c213140.target) e4:SetOperation(c213140.operation) c:RegisterEffect(e4) end function c213140.cfilter(c) return c:IsFaceup() and c:GetCounter(0x100e)>0 end function c213140.spcon1(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(c213140.cfilter,tp,0,LOCATION_MZONE,1,nil) end function c213140.sptg1(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,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c213140.spop1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end c213140.counter_add_list={0x100e} function c213140.addct(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x100e) end function c213140.addc(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then e:GetHandler():AddCounter(0x100e,1) end end function c213140.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():GetPreviousControler()==tp end function c213140.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function c213140.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,1-tp,false,false,POS_FACEUP) end end