name: Dark
card_text: If this card was Special Summoned by the effect of "Dark Lucius LV4", negate the effects of your opponent's monsters destroyed by battle with this card. Once per turn, during the Standby Phase of your next turn after this card negated your opponent's monster effect by this effect: You can send this card to the GY; Special Summon 1 "Dark Lucius LV8" from your hand or Deck.
external_ids: local CARD_ID_0 = 58206034 --Dark Lucius LV8
  local CARD_ID_1 = 85313220 --Dark Lucius LV4
  
lua: local CARD_ID_0 = 58206034 --Dark Lucius LV8
  local CARD_ID_1 = 85313220 --Dark Lucius LV4
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--disable
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_BATTLED)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetOperation(s.disop)
  	c:RegisterEffect(e1)
  	--special summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e2:SetCondition(s.spcon)
  	e2:SetCost(s.spcost)
  	e2:SetTarget(s.sptg)
  	e2:SetOperation(s.spop)
  	c:RegisterEffect(e2)
  end
  s.lvup = { CARD_ID_1, CARD_ID_0 }
  s.lvdn = { CARD_ID_1 }
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local d = Duel.GetAttackTarget()
  	if d == c then
  		d = Duel.GetAttacker()
  	end
  	if d and d:IsStatus(STATUS_BATTLE_DESTROYED) and d:IsType(TYPE_EFFECT) and c:GetSummonType() == SUMMON_TYPE_SPECIAL + SUMMON_VALUE_LV and not c:IsStatus(STATUS_BATTLE_DESTROYED) then
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_DISABLE)
  		e1:SetReset(RESET_EVENT + 0x17a0000)
  		d:RegisterEffect(e1)
  		c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_SELF_TURN, 0, 2)
  	end
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return tp == Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(id) ~= 0
  end
  function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsAbleToGraveAsCost()
  	end
  	Duel.SendtoGrave(e:GetHandler(), REASON_COST)
  end
  function s.spfilter(c, e, tp)
  	return c:IsCode(CARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, true, true)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > -1 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_HAND + LOCATION_DECK, 0, 1, nil, e, tp)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND + LOCATION_DECK)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectMatchingCard(tp, s.spfilter, tp, LOCATION_HAND + LOCATION_DECK, 0, 1, 1, nil, e, tp)
  	local tc = g:GetFirst()
  	if tc then
  		Duel.SpecialSummon(tc, SUMMON_VALUE_LV, tp, tp, true, true, POS_FACEUP)
  		tc:CompleteProcedure()
  	end
  end
  
  
source_text: Dark
  If this card was Special Summoned by the effect of "Dark Lucius LV4", negate the effects of your opponent's monsters destroyed by battle with this card. Once per turn, during the Standby Phase of your next turn after this card negated your opponent's monster effect by this effect: You can send this card to the GY; Special Summon 1 "Dark Lucius LV8" from your hand or Deck.
target_text: -- Dark
  local CARD_ID_0 = 58206034 --Dark Lucius LV8
  local CARD_ID_1 = 85313220 --Dark Lucius LV4
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--disable
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_BATTLED)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetOperation(s.disop)
  	c:RegisterEffect(e1)
  	--special summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e2:SetCondition(s.spcon)
  	e2:SetCost(s.spcost)
  	e2:SetTarget(s.sptg)
  	e2:SetOperation(s.spop)
  	c:RegisterEffect(e2)
  end
  s.lvup = { CARD_ID_1, CARD_ID_0 }
  s.lvdn = { CARD_ID_1 }
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local d = Duel.GetAttackTarget()
  	if d == c then
  		d = Duel.GetAttacker()
  	end
  	if d and d:IsStatus(STATUS_BATTLE_DESTROYED) and d:IsType(TYPE_EFFECT) and c:GetSummonType() == SUMMON_TYPE_SPECIAL + SUMMON_VALUE_LV and not c:IsStatus(STATUS_BATTLE_DESTROYED) then
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_DISABLE)
  		e1:SetReset(RESET_EVENT + 0x17a0000)
  		d:RegisterEffect(e1)
  		c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_SELF_TURN, 0, 2)
  	end
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return tp == Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(id) ~= 0
  end
  function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsAbleToGraveAsCost()
  	end
  	Duel.SendtoGrave(e:GetHandler(), REASON_COST)
  end
  function s.spfilter(c, e, tp)
  	return c:IsCode(CARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, true, true)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > -1 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_HAND + LOCATION_DECK, 0, 1, nil, e, tp)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND + LOCATION_DECK)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectMatchingCard(tp, s.spfilter, tp, LOCATION_HAND + LOCATION_DECK, 0, 1, 1, nil, e, tp)
  	local tc = g:GetFirst()
  	if tc then
  		Duel.SpecialSummon(tc, SUMMON_VALUE_LV, tp, tp, true, true, POS_FACEUP)
  		tc:CompleteProcedure()
  	end
  end
  
  