name: Lone
card_text: Activate only if the 1 and only monster on your side of the field is "Chu-Ske the Mouse Fighter", "Monk Fighter", or "Master Monk". That monster cannot be destroyed as a result of battle, and is unaffected by any of your opponent's monster effects.
external_ids: local CARD_ID_0 = 3810071 --Monk Fighter
  local CARD_ID_1 = 8508055 --Chu-Ske the Mouse Fighter
  local CARD_ID_2 = 49814180 --Master Monk
  
lua: local CARD_ID_0 = 3810071 --Monk Fighter
  local CARD_ID_1 = 8508055 --Chu-Ske the Mouse Fighter
  local CARD_ID_2 = 49814180 --Master Monk
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_1, CARD_ID_0, CARD_ID_2)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	--indes
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_TARGET)
  	e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetValue(1)
  	c:RegisterEffect(e2)
  	--immune
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_IMMUNE_EFFECT)
  	e3:SetValue(s.efilter)
  	c:RegisterEffect(e3)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsCode(CARD_ID_1, CARD_ID_0, CARD_ID_2)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	local g = Duel.GetFieldGroup(tp, LOCATION_MZONE, 0)
  	if chk == 0 then
  		return g:GetCount() == 1 and s.filter(g:GetFirst())
  	end
  	Duel.SetTargetCard(g)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
  		c:SetCardTarget(tc)
  	end
  end
  function s.efilter(e, re)
  	return re:IsActiveType(TYPE_MONSTER) and re:GetOwnerPlayer() ~= e:GetHandlerPlayer()
  end
  
  
source_text: Lone
  Activate only if the 1 and only monster on your side of the field is "Chu-Ske the Mouse Fighter", "Monk Fighter", or "Master Monk". That monster cannot be destroyed as a result of battle, and is unaffected by any of your opponent's monster effects.
target_text: -- Lone
  local CARD_ID_0 = 3810071 --Monk Fighter
  local CARD_ID_1 = 8508055 --Chu-Ske the Mouse Fighter
  local CARD_ID_2 = 49814180 --Master Monk
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_1, CARD_ID_0, CARD_ID_2)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	--indes
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_TARGET)
  	e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetValue(1)
  	c:RegisterEffect(e2)
  	--immune
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_IMMUNE_EFFECT)
  	e3:SetValue(s.efilter)
  	c:RegisterEffect(e3)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsCode(CARD_ID_1, CARD_ID_0, CARD_ID_2)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	local g = Duel.GetFieldGroup(tp, LOCATION_MZONE, 0)
  	if chk == 0 then
  		return g:GetCount() == 1 and s.filter(g:GetFirst())
  	end
  	Duel.SetTargetCard(g)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
  		c:SetCardTarget(tc)
  	end
  end
  function s.efilter(e, re)
  	return re:IsActiveType(TYPE_MONSTER) and re:GetOwnerPlayer() ~= e:GetHandlerPlayer()
  end
  
  