name: Invoked
card_text: "Aleister the Invoker" + 1 WIND monster
  Once per turn (Quick Effect): You can target 1 face-up monster on the field; change it to face-down Defense Position.
external_ids: local CARD_ID_0 = 86120751 --Aleister the Invoker
  
lua: local CARD_ID_0 = 86120751 --Aleister the Invoker
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcCodeFun(c, CARD_ID_0, aux.FilterBoolFunction(Card.IsFusionAttribute, ATTRIBUTE_WIND), 1, true, true)
  	--position
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_POSITION)
  	e1:SetType(EFFECT_TYPE_QUICK_O)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
  	e1:SetTarget(s.settg)
  	e1:SetOperation(s.setop)
  	c:RegisterEffect(e1)
  end
  function s.setfilter(c)
  	return c:IsFaceup() and c:IsCanTurnSet()
  end
  function s.settg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and s.setfilter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.setfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_POSCHANGE)
  	local g = Duel.SelectTarget(tp, s.setfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_POSITION, g, 1, 0, 0)
  end
  function s.setop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsFaceup() and tc:IsRelateToEffect(e) then
  		Duel.ChangePosition(tc, POS_FACEDOWN_DEFENSE)
  	end
  end
  
  
source_text: Invoked
  "Aleister the Invoker" + 1 WIND monster
  Once per turn (Quick Effect): You can target 1 face-up monster on the field; change it to face-down Defense Position.
target_text: -- Invoked
  local CARD_ID_0 = 86120751 --Aleister the Invoker
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcCodeFun(c, CARD_ID_0, aux.FilterBoolFunction(Card.IsFusionAttribute, ATTRIBUTE_WIND), 1, true, true)
  	--position
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_POSITION)
  	e1:SetType(EFFECT_TYPE_QUICK_O)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
  	e1:SetTarget(s.settg)
  	e1:SetOperation(s.setop)
  	c:RegisterEffect(e1)
  end
  function s.setfilter(c)
  	return c:IsFaceup() and c:IsCanTurnSet()
  end
  function s.settg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and s.setfilter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.setfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_POSCHANGE)
  	local g = Duel.SelectTarget(tp, s.setfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_POSITION, g, 1, 0, 0)
  end
  function s.setop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsFaceup() and tc:IsRelateToEffect(e) then
  		Duel.ChangePosition(tc, POS_FACEDOWN_DEFENSE)
  	end
  end
  
  