name: The
card_text: When this card is Normal Summoned: You can place 1 "The Weather" Spell/Trap from your Deck face-up in your Spell & Trap Zone. You can only use this effect of "The Weather Painter Snow" once per turn. Once per turn, during the Standby Phase of the turn after this card was banished from the field to activate a "The Weather" card's effect: You can Special Summon this banished card.
external_ids: local SETCARD_ID_0 = 0x109 --The
  
lua: local SETCARD_ID_0 = 0x109 --The
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--place
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_SUMMON_SUCCESS)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.tftg)
  	e1:SetOperation(s.tfop)
  	c:RegisterEffect(e1)
  	--special summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e2:SetCode(EVENT_REMOVE)
  	e2:SetOperation(s.spreg)
  	c:RegisterEffect(e2)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 1))
  	e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e3:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e3:SetRange(LOCATION_REMOVED)
  	e3:SetCondition(s.spcon)
  	e3:SetTarget(s.sptg)
  	e3:SetOperation(s.spop)
  	e3:SetLabelObject(e2)
  	c:RegisterEffect(e3)
  end
  function s.tffilter(c, tp)
  	return c:IsType(TYPE_SPELL + TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(SETCARD_ID_0) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
  end
  function s.tftg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_SZONE) > 0 and Duel.IsExistingMatchingCard(s.tffilter, tp, LOCATION_DECK, 0, 1, nil, tp)
  	end
  	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
  end
  function s.tfop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_SZONE) <= 0 then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOFIELD)
  	local tc = Duel.SelectMatchingCard(tp, s.tffilter, tp, LOCATION_DECK, 0, 1, 1, nil, tp):GetFirst()
  	if tc then
  		Duel.MoveToField(tc, tp, tp, LOCATION_SZONE, POS_FACEUP, true)
  	end
  end
  function s.spreg(e, tp, eg, ep, ev, re, r, rp)
  	if not re then
  		return
  	end
  	local c = e:GetHandler()
  	local rc = re:GetHandler()
  	if c:IsReason(REASON_COST) and rc:IsSetCard(SETCARD_ID_0) and c:IsPreviousLocation(LOCATION_ONFIELD) and re:IsActivated() then
  		e:SetLabel(Duel.GetTurnCount() + 1)
  		c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 2)
  	end
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetLabelObject():GetLabel() == Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(id) > 0
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
  	e:GetHandler():ResetFlagEffect(id)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) then
  		Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  
source_text: The
  When this card is Normal Summoned: You can place 1 "The Weather" Spell/Trap from your Deck face-up in your Spell & Trap Zone. You can only use this effect of "The Weather Painter Snow" once per turn. Once per turn, during the Standby Phase of the turn after this card was banished from the field to activate a "The Weather" card's effect: You can Special Summon this banished card.
target_text: -- The
  local SETCARD_ID_0 = 0x109 --The
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--place
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_SUMMON_SUCCESS)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.tftg)
  	e1:SetOperation(s.tfop)
  	c:RegisterEffect(e1)
  	--special summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e2:SetCode(EVENT_REMOVE)
  	e2:SetOperation(s.spreg)
  	c:RegisterEffect(e2)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 1))
  	e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e3:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e3:SetRange(LOCATION_REMOVED)
  	e3:SetCondition(s.spcon)
  	e3:SetTarget(s.sptg)
  	e3:SetOperation(s.spop)
  	e3:SetLabelObject(e2)
  	c:RegisterEffect(e3)
  end
  function s.tffilter(c, tp)
  	return c:IsType(TYPE_SPELL + TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(SETCARD_ID_0) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
  end
  function s.tftg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_SZONE) > 0 and Duel.IsExistingMatchingCard(s.tffilter, tp, LOCATION_DECK, 0, 1, nil, tp)
  	end
  	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
  end
  function s.tfop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_SZONE) <= 0 then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOFIELD)
  	local tc = Duel.SelectMatchingCard(tp, s.tffilter, tp, LOCATION_DECK, 0, 1, 1, nil, tp):GetFirst()
  	if tc then
  		Duel.MoveToField(tc, tp, tp, LOCATION_SZONE, POS_FACEUP, true)
  	end
  end
  function s.spreg(e, tp, eg, ep, ev, re, r, rp)
  	if not re then
  		return
  	end
  	local c = e:GetHandler()
  	local rc = re:GetHandler()
  	if c:IsReason(REASON_COST) and rc:IsSetCard(SETCARD_ID_0) and c:IsPreviousLocation(LOCATION_ONFIELD) and re:IsActivated() then
  		e:SetLabel(Duel.GetTurnCount() + 1)
  		c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 2)
  	end
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetLabelObject():GetLabel() == Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(id) > 0
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
  	e:GetHandler():ResetFlagEffect(id)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) then
  		Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  