name: Ruin,
card_text: You can Ritual Summon this card with "Cycle of the World". This card's name becomes "Ruin, Queen of Oblivion" while in the hand or on the field. If this card is Ritual Summoned: It can make up to 2 attacks on monsters during each Battle Phase this turn. If this card is sent to the GY: You can target 1 Ritual Monster you control; while it is face-up on your field, your opponent cannot activate cards or effects when your Ritual Monsters declare an attack.
external_ids: local CARD_ID_0 = 46427957 --Ruin, Queen of Oblivion
  
lua: local CARD_ID_0 = 46427957 --Ruin, Queen of Oblivion
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	--multi attack
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCondition(s.atkcon)
  	e1:SetOperation(s.atkop)
  	c:RegisterEffect(e1)
  	--actlimit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e2:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
  	e2:SetCode(EVENT_TO_GRAVE)
  	e2:SetTarget(s.target)
  	e2:SetOperation(s.operation)
  	c:RegisterEffect(e2)
  	--name change
  	aux.EnableChangeCode(c, CARD_ID_0, LOCATION_MZONE + LOCATION_HAND)
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) then
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  		e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
  		e1:SetValue(1)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		c:RegisterEffect(e1)
  	end
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsType(TYPE_RITUAL)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, LOCATION_MZONE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, s.filter, tp, LOCATION_MZONE, 0, 1, 1, nil)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  		e1:SetCode(EVENT_ATTACK_ANNOUNCE)
  		e1:SetRange(LOCATION_MZONE)
  		e1:SetCondition(s.actcon)
  		e1:SetOperation(s.actop)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e1)
  		tc:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 2))
  	end
  end
  function s.actcon(e, tp, eg, ep, ev, re, r, rp)
  	local ac = Duel.GetAttacker()
  	return ac and ac:IsControler(tp) and ac:IsType(TYPE_RITUAL)
  end
  function s.actop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetTargetRange(0, 1)
  	e1:SetValue(1)
  	e1:SetReset(RESET_PHASE + PHASE_DAMAGE)
  	Duel.RegisterEffect(e1, tp)
  end
  
  
source_text: Ruin,
  You can Ritual Summon this card with "Cycle of the World". This card's name becomes "Ruin, Queen of Oblivion" while in the hand or on the field. If this card is Ritual Summoned: It can make up to 2 attacks on monsters during each Battle Phase this turn. If this card is sent to the GY: You can target 1 Ritual Monster you control; while it is face-up on your field, your opponent cannot activate cards or effects when your Ritual Monsters declare an attack.
target_text: -- Ruin,
  local CARD_ID_0 = 46427957 --Ruin, Queen of Oblivion
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	--multi attack
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCondition(s.atkcon)
  	e1:SetOperation(s.atkop)
  	c:RegisterEffect(e1)
  	--actlimit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e2:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
  	e2:SetCode(EVENT_TO_GRAVE)
  	e2:SetTarget(s.target)
  	e2:SetOperation(s.operation)
  	c:RegisterEffect(e2)
  	--name change
  	aux.EnableChangeCode(c, CARD_ID_0, LOCATION_MZONE + LOCATION_HAND)
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) then
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  		e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
  		e1:SetValue(1)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		c:RegisterEffect(e1)
  	end
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsType(TYPE_RITUAL)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, LOCATION_MZONE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, s.filter, tp, LOCATION_MZONE, 0, 1, 1, nil)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  		e1:SetCode(EVENT_ATTACK_ANNOUNCE)
  		e1:SetRange(LOCATION_MZONE)
  		e1:SetCondition(s.actcon)
  		e1:SetOperation(s.actop)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e1)
  		tc:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 2))
  	end
  end
  function s.actcon(e, tp, eg, ep, ev, re, r, rp)
  	local ac = Duel.GetAttacker()
  	return ac and ac:IsControler(tp) and ac:IsType(TYPE_RITUAL)
  end
  function s.actop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetTargetRange(0, 1)
  	e1:SetValue(1)
  	e1:SetReset(RESET_PHASE + PHASE_DAMAGE)
  	Duel.RegisterEffect(e1, tp)
  end
  
  