name: Gorgon,
card_text: 2 monsters including an "Evil Eye" monster
  Gains 100 ATK for each "Evil Eye" card with different names in your GY. If this card is equipped with "Evil Eye of Selene" (Quick Effect): You can target 1 Effect Monster your opponent controls; negate its effects until the end of this turn. You can only use this effect of "Gorgon, Empress of the Evil Eyed" once per turn. Once per turn, during the next Standby Phase after this effect was activated: Destroy 1 monster this card points to.
external_ids: local CARD_ID_0 = 44133040 --Evil Eye of Selene
  
lua: local CARD_ID_0 = 44133040 --Evil Eye of Selene
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--link summon
  	aux.AddLinkProcedure(c, nil, 2, 2, s.lcheck)
  	c:EnableReviveLimit()
  	--atkup
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetValue(s.atkval)
  	c:RegisterEffect(e1)
  	--disable
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_DISABLE)
  	e2:SetType(EFFECT_TYPE_QUICK_O)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetCode(EVENT_FREE_CHAIN)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, id)
  	e2:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
  	e2:SetCondition(s.discon)
  	e2:SetTarget(s.distg)
  	e2:SetOperation(s.disop)
  	c:RegisterEffect(e2)
  	--destroy
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 1))
  	e3:SetCategory(CATEGORY_DESTROY)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e3:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCountLimit(1)
  	e3:SetCondition(s.descon)
  	e3:SetTarget(s.destg)
  	e3:SetOperation(s.desop)
  	c:RegisterEffect(e3)
  end
  function s.lcheck(g)
  	return g:IsExists(Card.IsLinkSetCard, 1, nil, 0x129)
  end
  function s.atkval(e, c)
  	local g = Duel.GetMatchingGroup(Card.IsSetCard, c:GetControler(), LOCATION_GRAVE, 0, nil, 0x129)
  	return g:GetClassCount(Card.GetCode) * 100
  end
  function s.discon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():GetEquipGroup():IsExists(Card.IsCode, 1, nil, CARD_ID_0)
  end
  function s.distg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsOnField() and chkc:IsControler(1 - tp) and aux.NegateEffectMonsterFilter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DISABLE)
  	local g = Duel.SelectTarget(tp, aux.NegateEffectMonsterFilter, tp, 0, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DISABLE, g, 1, 0, 0)
  	if Duel.GetCurrentPhase() == PHASE_STANDBY then
  		e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_STANDBY, EFFECT_FLAG_OATH, 2, Duel.GetTurnCount())
  	else
  		e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_STANDBY, EFFECT_FLAG_OATH, 1, 0)
  	end
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then
  		Duel.NegateRelatedChain(tc, RESET_TURN_SET)
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_DISABLE)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		local e2 = Effect.CreateEffect(c)
  		e2:SetType(EFFECT_TYPE_SINGLE)
  		e2:SetCode(EFFECT_DISABLE_EFFECT)
  		e2:SetValue(RESET_TURN_SET)
  		e2:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e2)
  	end
  end
  function s.descon(e, tp, eg, ep, ev, re, r, rp)
  	local tid = e:GetHandler():GetFlagEffectLabel(id)
  	return tid and tid ~= Duel.GetTurnCount()
  end
  function s.desfilter(c, g)
  	return g:IsContains(c)
  end
  function s.destg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local cg = e:GetHandler():GetLinkedGroup()
  	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, cg)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0)
  end
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	local cg = e:GetHandler():GetLinkedGroup()
  	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, cg)
  	if g:GetCount() > 0 then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  		local sg = g:Select(tp, 1, 1, nil)
  		Duel.HintSelection(sg)
  		Duel.Destroy(sg, REASON_EFFECT)
  	end
  end
  
  
source_text: Gorgon,
  2 monsters including an "Evil Eye" monster
  Gains 100 ATK for each "Evil Eye" card with different names in your GY. If this card is equipped with "Evil Eye of Selene" (Quick Effect): You can target 1 Effect Monster your opponent controls; negate its effects until the end of this turn. You can only use this effect of "Gorgon, Empress of the Evil Eyed" once per turn. Once per turn, during the next Standby Phase after this effect was activated: Destroy 1 monster this card points to.
target_text: -- Gorgon,
  local CARD_ID_0 = 44133040 --Evil Eye of Selene
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--link summon
  	aux.AddLinkProcedure(c, nil, 2, 2, s.lcheck)
  	c:EnableReviveLimit()
  	--atkup
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetValue(s.atkval)
  	c:RegisterEffect(e1)
  	--disable
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_DISABLE)
  	e2:SetType(EFFECT_TYPE_QUICK_O)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetCode(EVENT_FREE_CHAIN)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, id)
  	e2:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
  	e2:SetCondition(s.discon)
  	e2:SetTarget(s.distg)
  	e2:SetOperation(s.disop)
  	c:RegisterEffect(e2)
  	--destroy
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 1))
  	e3:SetCategory(CATEGORY_DESTROY)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e3:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCountLimit(1)
  	e3:SetCondition(s.descon)
  	e3:SetTarget(s.destg)
  	e3:SetOperation(s.desop)
  	c:RegisterEffect(e3)
  end
  function s.lcheck(g)
  	return g:IsExists(Card.IsLinkSetCard, 1, nil, 0x129)
  end
  function s.atkval(e, c)
  	local g = Duel.GetMatchingGroup(Card.IsSetCard, c:GetControler(), LOCATION_GRAVE, 0, nil, 0x129)
  	return g:GetClassCount(Card.GetCode) * 100
  end
  function s.discon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():GetEquipGroup():IsExists(Card.IsCode, 1, nil, CARD_ID_0)
  end
  function s.distg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsOnField() and chkc:IsControler(1 - tp) and aux.NegateEffectMonsterFilter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DISABLE)
  	local g = Duel.SelectTarget(tp, aux.NegateEffectMonsterFilter, tp, 0, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DISABLE, g, 1, 0, 0)
  	if Duel.GetCurrentPhase() == PHASE_STANDBY then
  		e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_STANDBY, EFFECT_FLAG_OATH, 2, Duel.GetTurnCount())
  	else
  		e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_STANDBY, EFFECT_FLAG_OATH, 1, 0)
  	end
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then
  		Duel.NegateRelatedChain(tc, RESET_TURN_SET)
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_DISABLE)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		local e2 = Effect.CreateEffect(c)
  		e2:SetType(EFFECT_TYPE_SINGLE)
  		e2:SetCode(EFFECT_DISABLE_EFFECT)
  		e2:SetValue(RESET_TURN_SET)
  		e2:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e2)
  	end
  end
  function s.descon(e, tp, eg, ep, ev, re, r, rp)
  	local tid = e:GetHandler():GetFlagEffectLabel(id)
  	return tid and tid ~= Duel.GetTurnCount()
  end
  function s.desfilter(c, g)
  	return g:IsContains(c)
  end
  function s.destg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local cg = e:GetHandler():GetLinkedGroup()
  	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, cg)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0)
  end
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	local cg = e:GetHandler():GetLinkedGroup()
  	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, cg)
  	if g:GetCount() > 0 then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  		local sg = g:Select(tp, 1, 1, nil)
  		Duel.HintSelection(sg)
  		Duel.Destroy(sg, REASON_EFFECT)
  	end
  end
  
  