name: Visas
card_text: This card's name becomes "Visas Starfrost" while on the field or in the GY. You can target any number of your "Visas" monsters that are banished, in your GY, and/or on your field; shuffle those "Visas" monsters into the Deck, and if you do, Special Summon this card from your hand, and if you do that, it gains 400 ATK for each monster you shuffled with a different original name. You can only use this effect of "Visas Samsara" once per turn. If this card you control would be used as Synchro Material, you can treat it as a non-Tuner.
external_ids: local CARD_ID_0 = 56099748 --Visas Starfrost
  local SETCARD_ID_0 = 0x198 --Visas
  
lua: local CARD_ID_0 = 56099748 --Visas Starfrost
  local SETCARD_ID_0 = 0x198 --Visas
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--change name
  	aux.EnableChangeCode(c, CARD_ID_0, LOCATION_MZONE + LOCATION_GRAVE)
  	--spsummon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TODECK + CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  	--non tuner
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_NONTUNER)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetValue(s.tnval)
  	c:RegisterEffect(e2)
  end
  function s.retfilter(c, e)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE + LOCATION_GRAVE + LOCATION_REMOVED) and s.retfilter(chkc, e)
  	end
  	local c = e:GetHandler()
  	local g = Duel.GetMatchingGroup(s.retfilter, tp, LOCATION_MZONE + LOCATION_GRAVE + LOCATION_REMOVED, 0, nil, e)
  	if chk == 0 then
  		return c:IsCanBeSpecialSummoned(e, 0, tp, false, false) and g:CheckSubGroup(aux.mzctcheck, 1, #g, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local tg = g:SelectSubGroup(tp, aux.mzctcheck, false, 1, #g, tp)
  	Duel.SetTargetCard(tg)
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, tg, #tg, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
  	Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  	local atk = Duel.GetOperatedGroup():Filter(Card.IsLocation, nil, LOCATION_DECK + LOCATION_EXTRA):GetClassCount(Card.GetCode) * 400
  	if atk > 0 and c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) > 0 then
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(atk)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  		c:RegisterEffect(e1)
  	end
  end
  function s.tnval(e, c)
  	return e:GetHandler():IsControler(c:GetControler())
  end
  
  
source_text: Visas
  This card's name becomes "Visas Starfrost" while on the field or in the GY. You can target any number of your "Visas" monsters that are banished, in your GY, and/or on your field; shuffle those "Visas" monsters into the Deck, and if you do, Special Summon this card from your hand, and if you do that, it gains 400 ATK for each monster you shuffled with a different original name. You can only use this effect of "Visas Samsara" once per turn. If this card you control would be used as Synchro Material, you can treat it as a non-Tuner.
target_text: -- Visas
  local CARD_ID_0 = 56099748 --Visas Starfrost
  local SETCARD_ID_0 = 0x198 --Visas
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--change name
  	aux.EnableChangeCode(c, CARD_ID_0, LOCATION_MZONE + LOCATION_GRAVE)
  	--spsummon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TODECK + CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  	--non tuner
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_NONTUNER)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetValue(s.tnval)
  	c:RegisterEffect(e2)
  end
  function s.retfilter(c, e)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE + LOCATION_GRAVE + LOCATION_REMOVED) and s.retfilter(chkc, e)
  	end
  	local c = e:GetHandler()
  	local g = Duel.GetMatchingGroup(s.retfilter, tp, LOCATION_MZONE + LOCATION_GRAVE + LOCATION_REMOVED, 0, nil, e)
  	if chk == 0 then
  		return c:IsCanBeSpecialSummoned(e, 0, tp, false, false) and g:CheckSubGroup(aux.mzctcheck, 1, #g, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local tg = g:SelectSubGroup(tp, aux.mzctcheck, false, 1, #g, tp)
  	Duel.SetTargetCard(tg)
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, tg, #tg, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
  	Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  	local atk = Duel.GetOperatedGroup():Filter(Card.IsLocation, nil, LOCATION_DECK + LOCATION_EXTRA):GetClassCount(Card.GetCode) * 400
  	if atk > 0 and c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) > 0 then
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(atk)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  		c:RegisterEffect(e1)
  	end
  end
  function s.tnval(e, c)
  	return e:GetHandler():IsControler(c:GetControler())
  end
  
  