name: 猛突進
card_text: 自分フィールド上に表側表示で存在する獣族モンスター1体を選択して破壊し、相手フィールド上に存在するモンスター1体を選択してデッキに戻す。
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_TODECK)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.dfilter(c)
  	return c:IsFaceup() and c:IsRace(RACE_BEAST)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.dfilter, tp, LOCATION_MZONE, 0, 1, nil) and Duel.IsExistingTarget(Card.IsAbleToDeck, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g1 = Duel.SelectTarget(tp, s.dfilter, tp, LOCATION_MZONE, 0, 1, 1, nil)
  	e:SetLabelObject(g1:GetFirst())
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local g2 = Duel.SelectTarget(tp, Card.IsAbleToDeck, tp, 0, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g1, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, g2, 1, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local tc1 = e:GetLabelObject()
  	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
  	local tc2 = g:GetFirst()
  	if tc2 == tc1 then
  		tc2 = g:GetNext()
  	end
  	if tc1:IsRelateToEffect(e) and s.dfilter(tc1) and Duel.Destroy(tc1, REASON_EFFECT) ~= 0 and tc2:IsRelateToEffect(e) then
  		Duel.SendtoDeck(tc2, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  	end
  end
  
  
source_text: 猛突進
  自分フィールド上に表側表示で存在する獣族モンスター1体を選択して破壊し、相手フィールド上に存在するモンスター1体を選択してデッキに戻す。
target_text: -- 猛突進
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_TODECK)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.dfilter(c)
  	return c:IsFaceup() and c:IsRace(RACE_BEAST)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.dfilter, tp, LOCATION_MZONE, 0, 1, nil) and Duel.IsExistingTarget(Card.IsAbleToDeck, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g1 = Duel.SelectTarget(tp, s.dfilter, tp, LOCATION_MZONE, 0, 1, 1, nil)
  	e:SetLabelObject(g1:GetFirst())
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local g2 = Duel.SelectTarget(tp, Card.IsAbleToDeck, tp, 0, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g1, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, g2, 1, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local tc1 = e:GetLabelObject()
  	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
  	local tc2 = g:GetFirst()
  	if tc2 == tc1 then
  		tc2 = g:GetNext()
  	end
  	if tc1:IsRelateToEffect(e) and s.dfilter(tc1) and Duel.Destroy(tc1, REASON_EFFECT) ~= 0 and tc2:IsRelateToEffect(e) then
  		Duel.SendtoDeck(tc2, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  	end
  end
  
  