name: Lunalight
card_text: "Lunalight Panther Dancer" + 2 "Lunalight" monsters
  Must be Fusion Summoned with the above Fusion Materials. Your opponent cannot target this card with card effects, also it cannot be destroyed by your opponent's card effects. Can make a second attack during each Battle Phase. Once per turn, at the end of the Damage Step, if this card attacked a monster: You can destroy all Special Summoned monsters your opponent controls.
external_ids: local CARD_ID_0 = 97165977 --Lunalight Panther Dancer
  local SETCARD_ID_0 = 0xdf --Lunalight
  
lua: local CARD_ID_0 = 97165977 --Lunalight Panther Dancer
  local SETCARD_ID_0 = 0xdf --Lunalight
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcCodeFun(c, CARD_ID_0, aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_0), 2, false, false)
  	--spsummon condition
  	local e0 = Effect.CreateEffect(c)
  	e0:SetType(EFFECT_TYPE_SINGLE)
  	e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e0:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e0:SetValue(aux.fuslimit)
  	c:RegisterEffect(e0)
  	--Immune
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetValue(aux.tgoval)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	e2:SetValue(aux.indoval)
  	c:RegisterEffect(e2)
  	--Double attack
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_EXTRA_ATTACK)
  	e3:SetValue(1)
  	c:RegisterEffect(e3)
  	--Destroy
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetCategory(CATEGORY_DESTROY)
  	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e4:SetCode(EVENT_DAMAGE_STEP_END)
  	e4:SetCountLimit(1)
  	e4:SetCondition(s.condition)
  	e4:SetTarget(s.target)
  	e4:SetOperation(s.operation)
  	c:RegisterEffect(e4)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return aux.dsercon(e, tp, eg, ep, ev, re, r, rp) and Duel.GetAttacker() == e:GetHandler() and Duel.GetAttackTarget()
  end
  function s.filter(c)
  	return c:IsSummonType(SUMMON_TYPE_SPECIAL)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_MZONE, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_MZONE, nil)
  	Duel.Destroy(g, REASON_EFFECT)
  end
  
  
source_text: Lunalight
  "Lunalight Panther Dancer" + 2 "Lunalight" monsters
  Must be Fusion Summoned with the above Fusion Materials. Your opponent cannot target this card with card effects, also it cannot be destroyed by your opponent's card effects. Can make a second attack during each Battle Phase. Once per turn, at the end of the Damage Step, if this card attacked a monster: You can destroy all Special Summoned monsters your opponent controls.
target_text: -- Lunalight
  local CARD_ID_0 = 97165977 --Lunalight Panther Dancer
  local SETCARD_ID_0 = 0xdf --Lunalight
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcCodeFun(c, CARD_ID_0, aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_0), 2, false, false)
  	--spsummon condition
  	local e0 = Effect.CreateEffect(c)
  	e0:SetType(EFFECT_TYPE_SINGLE)
  	e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e0:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e0:SetValue(aux.fuslimit)
  	c:RegisterEffect(e0)
  	--Immune
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetValue(aux.tgoval)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	e2:SetValue(aux.indoval)
  	c:RegisterEffect(e2)
  	--Double attack
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_EXTRA_ATTACK)
  	e3:SetValue(1)
  	c:RegisterEffect(e3)
  	--Destroy
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetCategory(CATEGORY_DESTROY)
  	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e4:SetCode(EVENT_DAMAGE_STEP_END)
  	e4:SetCountLimit(1)
  	e4:SetCondition(s.condition)
  	e4:SetTarget(s.target)
  	e4:SetOperation(s.operation)
  	c:RegisterEffect(e4)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return aux.dsercon(e, tp, eg, ep, ev, re, r, rp) and Duel.GetAttacker() == e:GetHandler() and Duel.GetAttackTarget()
  end
  function s.filter(c)
  	return c:IsSummonType(SUMMON_TYPE_SPECIAL)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_MZONE, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_MZONE, nil)
  	Duel.Destroy(g, REASON_EFFECT)
  end
  
  