Royal
If you control "Necrovalley": Both players discard any monsters in their hands.
local CARD_ID_0 = 47355498 --Necrovalley

local CARD_ID_0 = 47355498 --Necrovalley
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_HANDES + CATEGORY_TOGRAVE)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetCondition(s.condition)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.condition(e, tp, eg, ep, ev, re, r, rp)
	return Duel.IsEnvironment(CARD_ID_0, tp)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(nil, tp, LOCATION_HAND, LOCATION_HAND, 1, e:GetHandler())
	end
	Duel.SetOperationInfo(0, CATEGORY_HANDES, nil, 0, PLAYER_ALL, 0)
	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, nil, 1, PLAYER_ALL, LOCATION_HAND)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetMatchingGroup(Card.IsType, tp, LOCATION_HAND, LOCATION_HAND, nil, TYPE_MONSTER)
	if g:GetCount() > 0 then
		Duel.SendtoGrave(g, REASON_EFFECT + REASON_DISCARD)
	end
end


Royal
If you control "Necrovalley": Both players discard any monsters in their hands.
-- Royal
local CARD_ID_0 = 47355498 --Necrovalley
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_HANDES + CATEGORY_TOGRAVE)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetCondition(s.condition)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.condition(e, tp, eg, ep, ev, re, r, rp)
	return Duel.IsEnvironment(CARD_ID_0, tp)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(nil, tp, LOCATION_HAND, LOCATION_HAND, 1, e:GetHandler())
	end
	Duel.SetOperationInfo(0, CATEGORY_HANDES, nil, 0, PLAYER_ALL, 0)
	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, nil, 1, PLAYER_ALL, LOCATION_HAND)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetMatchingGroup(Card.IsType, tp, LOCATION_HAND, LOCATION_HAND, nil, TYPE_MONSTER)
	if g:GetCount() > 0 then
		Duel.SendtoGrave(g, REASON_EFFECT + REASON_DISCARD)
	end
end

