name: 召喚獣カリギュラ
card_text: 「召喚師アレイスター」+闇属性モンスター
  1:このカードがモンスターゾーンに存在する限り、その間はお互いに、1ターンに1度しかモンスターの効果を発動できず、1度のバトルフェイズ中にモンスター1体でしか攻撃できない。
external_ids: local CARD_ID_0 = 86120751 --召喚師アレイスター
  
lua: local CARD_ID_0 = 86120751 --召喚師アレイスター
  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_DARK), 1, true, true)
  	--effect count
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_CHAINING)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e1:SetOperation(s.scount)
  	c:RegisterEffect(e1)
  	local e4 = e1:Clone()
  	e4:SetOperation(s.ocount)
  	c:RegisterEffect(e4)
  	--activate limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetTargetRange(1, 0)
  	e3:SetCondition(s.econ1)
  	e3:SetValue(s.elimit)
  	c:RegisterEffect(e3)
  	local e6 = e3:Clone()
  	e6:SetCondition(s.econ2)
  	e6:SetTargetRange(0, 1)
  	c:RegisterEffect(e6)
  	--attack limit
  	local e7 = Effect.CreateEffect(c)
  	e7:SetType(EFFECT_TYPE_FIELD)
  	e7:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
  	e7:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
  	e7:SetRange(LOCATION_MZONE)
  	e7:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e7:SetCondition(s.atkcon)
  	e7:SetTarget(s.atktg)
  	c:RegisterEffect(e7)
  	local e8 = Effect.CreateEffect(c)
  	e8:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e8:SetCode(EVENT_ATTACK_ANNOUNCE)
  	e8:SetRange(LOCATION_MZONE)
  	e8:SetOperation(s.checkop)
  	e8:SetLabelObject(e7)
  	c:RegisterEffect(e8)
  end
  function s.scount(e, tp, eg, ep, ev, re, r, rp)
  	if ep ~= tp or not re:IsActiveType(TYPE_MONSTER) then
  		return
  	end
  	e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + 0x3ff0000 + RESET_PHASE + PHASE_END, 0, 1)
  end
  function s.econ1(e)
  	return e:GetHandler():GetFlagEffect(id) ~= 0
  end
  function s.ocount(e, tp, eg, ep, ev, re, r, rp)
  	if ep == tp or not re:IsActiveType(TYPE_MONSTER) then
  		return
  	end
  	e:GetHandler():RegisterFlagEffect(13529467, RESET_EVENT + 0x3ff0000 + RESET_PHASE + PHASE_END, 0, 1)
  end
  function s.econ2(e)
  	return e:GetHandler():GetFlagEffect(13529467) ~= 0
  end
  function s.elimit(e, re, tp)
  	return re:IsActiveType(TYPE_MONSTER)
  end
  function s.atkcon(e)
  	return e:GetHandler():GetFlagEffect(13529468) ~= 0
  end
  function s.atktg(e, c)
  	return c:GetFieldID() ~= e:GetLabel()
  end
  function s.checkop(e, tp, eg, ep, ev, re, r, rp)
  	if e:GetHandler():GetFlagEffect(13529468) ~= 0 then
  		return
  	end
  	local fid = eg:GetFirst():GetFieldID()
  	e:GetHandler():RegisterFlagEffect(13529468, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
  	e:GetLabelObject():SetLabel(fid)
  end
  
  
source_text: 召喚獣カリギュラ
  「召喚師アレイスター」+闇属性モンスター
  1:このカードがモンスターゾーンに存在する限り、その間はお互いに、1ターンに1度しかモンスターの効果を発動できず、1度のバトルフェイズ中にモンスター1体でしか攻撃できない。
target_text: -- 召喚獣カリギュラ
  local CARD_ID_0 = 86120751 --召喚師アレイスター
  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_DARK), 1, true, true)
  	--effect count
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_CHAINING)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e1:SetOperation(s.scount)
  	c:RegisterEffect(e1)
  	local e4 = e1:Clone()
  	e4:SetOperation(s.ocount)
  	c:RegisterEffect(e4)
  	--activate limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetTargetRange(1, 0)
  	e3:SetCondition(s.econ1)
  	e3:SetValue(s.elimit)
  	c:RegisterEffect(e3)
  	local e6 = e3:Clone()
  	e6:SetCondition(s.econ2)
  	e6:SetTargetRange(0, 1)
  	c:RegisterEffect(e6)
  	--attack limit
  	local e7 = Effect.CreateEffect(c)
  	e7:SetType(EFFECT_TYPE_FIELD)
  	e7:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
  	e7:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
  	e7:SetRange(LOCATION_MZONE)
  	e7:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e7:SetCondition(s.atkcon)
  	e7:SetTarget(s.atktg)
  	c:RegisterEffect(e7)
  	local e8 = Effect.CreateEffect(c)
  	e8:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e8:SetCode(EVENT_ATTACK_ANNOUNCE)
  	e8:SetRange(LOCATION_MZONE)
  	e8:SetOperation(s.checkop)
  	e8:SetLabelObject(e7)
  	c:RegisterEffect(e8)
  end
  function s.scount(e, tp, eg, ep, ev, re, r, rp)
  	if ep ~= tp or not re:IsActiveType(TYPE_MONSTER) then
  		return
  	end
  	e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + 0x3ff0000 + RESET_PHASE + PHASE_END, 0, 1)
  end
  function s.econ1(e)
  	return e:GetHandler():GetFlagEffect(id) ~= 0
  end
  function s.ocount(e, tp, eg, ep, ev, re, r, rp)
  	if ep == tp or not re:IsActiveType(TYPE_MONSTER) then
  		return
  	end
  	e:GetHandler():RegisterFlagEffect(13529467, RESET_EVENT + 0x3ff0000 + RESET_PHASE + PHASE_END, 0, 1)
  end
  function s.econ2(e)
  	return e:GetHandler():GetFlagEffect(13529467) ~= 0
  end
  function s.elimit(e, re, tp)
  	return re:IsActiveType(TYPE_MONSTER)
  end
  function s.atkcon(e)
  	return e:GetHandler():GetFlagEffect(13529468) ~= 0
  end
  function s.atktg(e, c)
  	return c:GetFieldID() ~= e:GetLabel()
  end
  function s.checkop(e, tp, eg, ep, ev, re, r, rp)
  	if e:GetHandler():GetFlagEffect(13529468) ~= 0 then
  		return
  	end
  	local fid = eg:GetFirst():GetFieldID()
  	e:GetHandler():RegisterFlagEffect(13529468, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
  	e:GetLabelObject():SetLabel(fid)
  end
  
  