name: Minar
card_text: When this card is discarded directly from your hand to the Graveyard by an effect of a card controlled by your opponent, inflict 1000 points of damage to your opponent's Life Points.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--damage
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DAMAGE)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetCode(EVENT_TO_GRAVE)
  	e1:SetCondition(s.drcon)
  	e1:SetTarget(s.drtg)
  	e1:SetOperation(s.drop)
  	c:RegisterEffect(e1)
  end
  function s.drcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r, 0x4040) == 0x4040 and rp == 1 - tp
  end
  function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, 1 - tp, 1000)
  end
  function s.drop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Damage(1 - tp, 1000, REASON_EFFECT)
  end
  
  
source_text: Minar
  When this card is discarded directly from your hand to the Graveyard by an effect of a card controlled by your opponent, inflict 1000 points of damage to your opponent's Life Points.
target_text: -- Minar
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--damage
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DAMAGE)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetCode(EVENT_TO_GRAVE)
  	e1:SetCondition(s.drcon)
  	e1:SetTarget(s.drtg)
  	e1:SetOperation(s.drop)
  	c:RegisterEffect(e1)
  end
  function s.drcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r, 0x4040) == 0x4040 and rp == 1 - tp
  end
  function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, 1 - tp, 1000)
  end
  function s.drop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Damage(1 - tp, 1000, REASON_EFFECT)
  end
  
  