name: Mikanko
card_text: This card can be used to Ritual Summon any "Mikanko" Ritual Monster. You must also Tribute monsters from your hand or field whose total Levels equal or exceed the Level of the Ritual Monster you Ritual Summon. Then you can apply the following effect.
  ● Destroy cards your opponent controls up to the number of Equip Spells with different names in your GY, and if you do, inflict 1000 damage to your opponent for each card destroyed.
  You can only activate 1 "Mikanko Kagura" per turn.
external_ids: local SETCARD_ID_0 = 0x18d --Mikanko
  
lua: local SETCARD_ID_0 = 0x18d --Mikanko
  local s, id, o = GetID()
  function s.initial_effect(c)
  	local e1 = aux.AddRitualProcGreater2(c, s.filter, LOCATION_HAND, nil, nil, true, s.extraop)
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	c:RegisterEffect(e1)
  end
  function s.filter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  function s.extraop(e, tp, eg, ep, ev, re, r, rp, tc, mat)
  	if not tc then
  		return
  	end
  	local ct = Duel.GetMatchingGroup(Card.IsType, tp, LOCATION_GRAVE, 0, nil, TYPE_EQUIP):GetClassCount(Card.GetCode)
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_ONFIELD, nil)
  	if ct > 0 and #g > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
  		Duel.BreakEffect()
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  		local sg = g:Select(tp, 1, ct, nil)
  		Duel.HintSelection(sg)
  		local res = Duel.Destroy(sg, REASON_EFFECT)
  		Duel.Damage(1 - tp, res * 1000, REASON_EFFECT)
  	end
  end
  
  
source_text: Mikanko
  This card can be used to Ritual Summon any "Mikanko" Ritual Monster. You must also Tribute monsters from your hand or field whose total Levels equal or exceed the Level of the Ritual Monster you Ritual Summon. Then you can apply the following effect.
  ● Destroy cards your opponent controls up to the number of Equip Spells with different names in your GY, and if you do, inflict 1000 damage to your opponent for each card destroyed.
  You can only activate 1 "Mikanko Kagura" per turn.
target_text: -- Mikanko
  local SETCARD_ID_0 = 0x18d --Mikanko
  local s, id, o = GetID()
  function s.initial_effect(c)
  	local e1 = aux.AddRitualProcGreater2(c, s.filter, LOCATION_HAND, nil, nil, true, s.extraop)
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	c:RegisterEffect(e1)
  end
  function s.filter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  function s.extraop(e, tp, eg, ep, ev, re, r, rp, tc, mat)
  	if not tc then
  		return
  	end
  	local ct = Duel.GetMatchingGroup(Card.IsType, tp, LOCATION_GRAVE, 0, nil, TYPE_EQUIP):GetClassCount(Card.GetCode)
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_ONFIELD, nil)
  	if ct > 0 and #g > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
  		Duel.BreakEffect()
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  		local sg = g:Select(tp, 1, ct, nil)
  		Duel.HintSelection(sg)
  		local res = Duel.Destroy(sg, REASON_EFFECT)
  		Duel.Damage(1 - tp, res * 1000, REASON_EFFECT)
  	end
  end
  
  