name: Fengsheng
card_text: Look at your opponent's hand. Select and discard 1 Spirit monster to the Graveyard if Spirit monsters exist in his/her hand.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_HANDES)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  s.has_text_type = TYPE_SPIRIT
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0
  	end
  	Duel.SetTargetPlayer(tp)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local p = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER)
  	local g = Duel.GetFieldGroup(p, 0, LOCATION_HAND)
  	if g:GetCount() > 0 then
  		Duel.ConfirmCards(p, g)
  		local tg = g:Filter(Card.IsType, nil, TYPE_SPIRIT)
  		if tg:GetCount() > 0 then
  			Duel.Hint(HINT_SELECTMSG, p, HINTMSG_TOGRAVE)
  			local sg = tg:Select(p, 1, 1, nil)
  			Duel.SendtoGrave(sg, REASON_DISCARD + REASON_EFFECT)
  		end
  		Duel.ShuffleHand(1 - p)
  	end
  end
  
  
source_text: Fengsheng
  Look at your opponent's hand. Select and discard 1 Spirit monster to the Graveyard if Spirit monsters exist in his/her hand.
target_text: -- Fengsheng
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_HANDES)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  s.has_text_type = TYPE_SPIRIT
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0
  	end
  	Duel.SetTargetPlayer(tp)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local p = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER)
  	local g = Duel.GetFieldGroup(p, 0, LOCATION_HAND)
  	if g:GetCount() > 0 then
  		Duel.ConfirmCards(p, g)
  		local tg = g:Filter(Card.IsType, nil, TYPE_SPIRIT)
  		if tg:GetCount() > 0 then
  			Duel.Hint(HINT_SELECTMSG, p, HINTMSG_TOGRAVE)
  			local sg = tg:Select(p, 1, 1, nil)
  			Duel.SendtoGrave(sg, REASON_DISCARD + REASON_EFFECT)
  		end
  		Duel.ShuffleHand(1 - p)
  	end
  end
  
  