name: 魔法名-「大いなる獣」
card_text: 1:除外されている自分の「召喚獣」モンスターを任意の数だけ対象として発動できる(同名カードは1枚まで)。
  そのモンスターを守備表示で特殊召喚する。
external_ids: local CARD_ID_0 = 59822133 --青眼の精霊龍
  local SETCARD_ID_0 = 0xf4 --召喚獣
  
lua: local CARD_ID_0 = 59822133 --青眼の精霊龍
  local SETCARD_ID_0 = 0xf4 --召喚獣
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetHintTiming(0, TIMING_END_PHASE)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.filter(c, e, tp)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP_DEFENSE)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc, e, tp)
  	end
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingTarget(s.filter, tp, LOCATION_REMOVED, 0, 1, nil, e, tp)
  	end
  	local ft = Duel.GetLocationCount(tp, LOCATION_MZONE)
  	if Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) then
  		ft = 1
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_REMOVED, 0, nil, e, tp):Filter(Card.IsCanBeEffectTarget, nil, e)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local tg = g:SelectSubGroup(tp, aux.dncheck, false, 1, ft)
  	Duel.SetTargetCard(tg)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, tg, tg:GetCount(), 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local ft = Duel.GetLocationCount(tp, LOCATION_MZONE)
  	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
  	if ft <= 0 or g:GetCount() == 0 or (g:GetCount() > 1 and Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0)) then
  		return
  	end
  	if g:GetCount() <= ft then
  		Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP_DEFENSE)
  	else
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  		local sg = g:Select(tp, ft, ft, nil)
  		Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP_DEFENSE)
  		g:Sub(sg)
  		Duel.SendtoGrave(g, REASON_RULE)
  	end
  end
  
  
source_text: 魔法名-「大いなる獣」
  1:除外されている自分の「召喚獣」モンスターを任意の数だけ対象として発動できる(同名カードは1枚まで)。
  そのモンスターを守備表示で特殊召喚する。
target_text: -- 魔法名-「大いなる獣」
  local CARD_ID_0 = 59822133 --青眼の精霊龍
  local SETCARD_ID_0 = 0xf4 --召喚獣
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetHintTiming(0, TIMING_END_PHASE)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.filter(c, e, tp)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP_DEFENSE)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc, e, tp)
  	end
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingTarget(s.filter, tp, LOCATION_REMOVED, 0, 1, nil, e, tp)
  	end
  	local ft = Duel.GetLocationCount(tp, LOCATION_MZONE)
  	if Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) then
  		ft = 1
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_REMOVED, 0, nil, e, tp):Filter(Card.IsCanBeEffectTarget, nil, e)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local tg = g:SelectSubGroup(tp, aux.dncheck, false, 1, ft)
  	Duel.SetTargetCard(tg)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, tg, tg:GetCount(), 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local ft = Duel.GetLocationCount(tp, LOCATION_MZONE)
  	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
  	if ft <= 0 or g:GetCount() == 0 or (g:GetCount() > 1 and Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0)) then
  		return
  	end
  	if g:GetCount() <= ft then
  		Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP_DEFENSE)
  	else
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  		local sg = g:Select(tp, ft, ft, nil)
  		Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP_DEFENSE)
  		g:Sub(sg)
  		Duel.SendtoGrave(g, REASON_RULE)
  	end
  end
  
  