name: Memory
card_text: When this card inflicts Battle Damage to your opponent by a direct attack, remove from play all Synchro Monsters in your opponent's Graveyard, and inflict 1000 damage to your opponent for each monster removed.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--remove
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_REMOVE + CATEGORY_DAMAGE)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetCode(EVENT_BATTLE_DAMAGE)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return ep ~= tp and Duel.GetAttackTarget() == nil
  end
  function s.filter(c)
  	return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_GRAVE, nil)
  	if g:GetCount() ~= 0 then
  		Duel.SetOperationInfo(0, CATEGORY_REMOVE, g, g:GetCount(), 0, 0)
  		Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, 1 - tp, g:GetCount() * 1000)
  	end
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_GRAVE, nil)
  	local ct = Duel.Remove(g, POS_FACEUP, REASON_EFFECT)
  	if ct ~= 0 then
  		Duel.Damage(1 - tp, ct * 1000, REASON_EFFECT)
  	end
  end
  
  
source_text: Memory
  When this card inflicts Battle Damage to your opponent by a direct attack, remove from play all Synchro Monsters in your opponent's Graveyard, and inflict 1000 damage to your opponent for each monster removed.
target_text: -- Memory
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--remove
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_REMOVE + CATEGORY_DAMAGE)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetCode(EVENT_BATTLE_DAMAGE)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return ep ~= tp and Duel.GetAttackTarget() == nil
  end
  function s.filter(c)
  	return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_GRAVE, nil)
  	if g:GetCount() ~= 0 then
  		Duel.SetOperationInfo(0, CATEGORY_REMOVE, g, g:GetCount(), 0, 0)
  		Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, 1 - tp, g:GetCount() * 1000)
  	end
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_GRAVE, nil)
  	local ct = Duel.Remove(g, POS_FACEUP, REASON_EFFECT)
  	if ct ~= 0 then
  		Duel.Damage(1 - tp, ct * 1000, REASON_EFFECT)
  	end
  end
  
  