Reaper
"Spirit Reaper" + "Nightmare Horse"
This card is not destroyed as a result of battle. Destroy this card when it is targeted by the effect of a Spell, Trap, or Effect Monster. This card can attack your opponent's Life Points directly even if there is a monster on your opponent's side of the field. If this card successfully attacks your opponent's Life Points directly, your opponent discards 1 card randomly from his/her hand.
local CARD_ID_0 = 23205979 --Spirit Reaper
local CARD_ID_1 = 59290628 --Nightmare Horse

local CARD_ID_0 = 23205979 --Spirit Reaper
local CARD_ID_1 = 59290628 --Nightmare Horse
local s, id, o = GetID()
function s.initial_effect(c)
	--fusion material
	c:EnableReviveLimit()
	aux.AddFusionProcCode2(c, CARD_ID_0, CARD_ID_1, true, true)
	--battle indestructable
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
	e1:SetValue(1)
	c:RegisterEffect(e1)
	--handes
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 0))
	e2:SetCategory(CATEGORY_HANDES)
	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
	e2:SetCode(EVENT_BATTLE_DAMAGE)
	e2:SetCondition(s.condition)
	e2:SetTarget(s.target)
	e2:SetOperation(s.operation)
	c:RegisterEffect(e2)
	--self des
	local e3 = Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_SINGLE)
	e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e3:SetRange(LOCATION_MZONE)
	e3:SetCode(EFFECT_SELF_DESTROY)
	e3:SetCondition(s.sdcon)
	c:RegisterEffect(e3)
	--be target
	local e4 = Effect.CreateEffect(c)
	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
	e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
	e4:SetCode(EVENT_BECOME_TARGET)
	e4:SetOperation(s.desop1)
	c:RegisterEffect(e4)
	local e5 = Effect.CreateEffect(c)
	e5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
	e5:SetRange(LOCATION_MZONE)
	e5:SetCode(EVENT_CHAIN_SOLVED)
	e5:SetOperation(s.desop2)
	e5:SetLabelObject(e4)
	c:RegisterEffect(e5)
	local e6 = Effect.CreateEffect(c)
	e6:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
	e6:SetRange(LOCATION_MZONE)
	e6:SetCode(EVENT_BATTLED)
	e6:SetOperation(s.desop3)
	e6:SetLabelObject(e4)
	c:RegisterEffect(e6)
	--direct attack
	local e7 = Effect.CreateEffect(c)
	e7:SetType(EFFECT_TYPE_SINGLE)
	e7:SetCode(EFFECT_DIRECT_ATTACK)
	c:RegisterEffect(e7)
end
function s.condition(e, tp, eg, ep, ev, re, r, rp)
	return ep ~= tp and Duel.GetAttackTarget() == nil
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	Duel.SetOperationInfo(0, CATEGORY_HANDES, 0, 0, 1 - tp, 1)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetFieldGroup(ep, LOCATION_HAND, 0)
	if g:GetCount() == 0 then
		return
	end
	local sg = g:RandomSelect(1 - tp, 1)
	Duel.SendtoGrave(sg, REASON_DISCARD + REASON_EFFECT)
end
function s.sdcon(e)
	return e:GetHandler():GetOwnerTargetCount() > 0
end
function s.desop1(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then
		e:SetLabelObject(re)
		e:SetLabel(0)
	end
end
function s.desop2(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	if re == e:GetLabelObject():GetLabelObject() and c:IsRelateToEffect(re) then
		if Duel.GetCurrentPhase() == PHASE_DAMAGE and not Duel.IsDamageCalculated() then
			e:GetLabelObject():SetLabel(1)
		else
			if not c:IsDisabled() then
				Duel.Destroy(c, REASON_EFFECT)
			end
		end
	end
end
function s.desop3(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local des = e:GetLabelObject():GetLabel()
	e:GetLabelObject():SetLabel(0)
	if des == 1 and not c:IsDisabled() then
		Duel.Destroy(c, REASON_EFFECT)
	end
end


Reaper
"Spirit Reaper" + "Nightmare Horse"
This card is not destroyed as a result of battle. Destroy this card when it is targeted by the effect of a Spell, Trap, or Effect Monster. This card can attack your opponent's Life Points directly even if there is a monster on your opponent's side of the field. If this card successfully attacks your opponent's Life Points directly, your opponent discards 1 card randomly from his/her hand.
-- Reaper
local CARD_ID_0 = 23205979 --Spirit Reaper
local CARD_ID_1 = 59290628 --Nightmare Horse
local s, id, o = GetID()
function s.initial_effect(c)
	--fusion material
	c:EnableReviveLimit()
	aux.AddFusionProcCode2(c, CARD_ID_0, CARD_ID_1, true, true)
	--battle indestructable
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
	e1:SetValue(1)
	c:RegisterEffect(e1)
	--handes
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 0))
	e2:SetCategory(CATEGORY_HANDES)
	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
	e2:SetCode(EVENT_BATTLE_DAMAGE)
	e2:SetCondition(s.condition)
	e2:SetTarget(s.target)
	e2:SetOperation(s.operation)
	c:RegisterEffect(e2)
	--self des
	local e3 = Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_SINGLE)
	e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e3:SetRange(LOCATION_MZONE)
	e3:SetCode(EFFECT_SELF_DESTROY)
	e3:SetCondition(s.sdcon)
	c:RegisterEffect(e3)
	--be target
	local e4 = Effect.CreateEffect(c)
	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
	e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
	e4:SetCode(EVENT_BECOME_TARGET)
	e4:SetOperation(s.desop1)
	c:RegisterEffect(e4)
	local e5 = Effect.CreateEffect(c)
	e5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
	e5:SetRange(LOCATION_MZONE)
	e5:SetCode(EVENT_CHAIN_SOLVED)
	e5:SetOperation(s.desop2)
	e5:SetLabelObject(e4)
	c:RegisterEffect(e5)
	local e6 = Effect.CreateEffect(c)
	e6:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
	e6:SetRange(LOCATION_MZONE)
	e6:SetCode(EVENT_BATTLED)
	e6:SetOperation(s.desop3)
	e6:SetLabelObject(e4)
	c:RegisterEffect(e6)
	--direct attack
	local e7 = Effect.CreateEffect(c)
	e7:SetType(EFFECT_TYPE_SINGLE)
	e7:SetCode(EFFECT_DIRECT_ATTACK)
	c:RegisterEffect(e7)
end
function s.condition(e, tp, eg, ep, ev, re, r, rp)
	return ep ~= tp and Duel.GetAttackTarget() == nil
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	Duel.SetOperationInfo(0, CATEGORY_HANDES, 0, 0, 1 - tp, 1)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetFieldGroup(ep, LOCATION_HAND, 0)
	if g:GetCount() == 0 then
		return
	end
	local sg = g:RandomSelect(1 - tp, 1)
	Duel.SendtoGrave(sg, REASON_DISCARD + REASON_EFFECT)
end
function s.sdcon(e)
	return e:GetHandler():GetOwnerTargetCount() > 0
end
function s.desop1(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then
		e:SetLabelObject(re)
		e:SetLabel(0)
	end
end
function s.desop2(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	if re == e:GetLabelObject():GetLabelObject() and c:IsRelateToEffect(re) then
		if Duel.GetCurrentPhase() == PHASE_DAMAGE and not Duel.IsDamageCalculated() then
			e:GetLabelObject():SetLabel(1)
		else
			if not c:IsDisabled() then
				Duel.Destroy(c, REASON_EFFECT)
			end
		end
	end
end
function s.desop3(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local des = e:GetLabelObject():GetLabel()
	e:GetLabelObject():SetLabel(0)
	if des == 1 and not c:IsDisabled() then
		Duel.Destroy(c, REASON_EFFECT)
	end
end

