name: Amazoness
card_text: 1 Level 5 or higher "Amazoness" monster + 1 "Amazoness" monster
  Your opponent's monsters cannot attack any monsters, except this one. You can target 1 "Amazoness" card you control and 1 "Amazoness" Warrior monster in your GY; destroy that card on the field, and if you do, Special Summon that other monster from the GY. This card cannot attack the turn this effect is activated. You can only use this effect of "Amazoness Pet Liger King" once per turn.
external_ids: local SETCARD_ID_0 = 0x4 --Amazoness
  
lua: local SETCARD_ID_0 = 0x4 --Amazoness
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcFun2(c, s.matfilter, aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_0), true)
  	--atk limit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(0, LOCATION_MZONE)
  	e1:SetValue(s.atlimit)
  	c:RegisterEffect(e1)
  	--destroy and spsummon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetCategory(CATEGORY_DESTROY + CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetCountLimit(1, id)
  	e2:SetCost(s.cost)
  	e2:SetTarget(s.target)
  	e2:SetOperation(s.operation)
  	c:RegisterEffect(e2)
  end
  function s.matfilter(c)
  	return c:IsLevelAbove(5) and c:IsFusionSetCard(SETCARD_ID_0)
  end
  function s.atlimit(e, c)
  	return c ~= e:GetHandler()
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():GetAttackAnnouncedCount() == 0
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CANNOT_ATTACK)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_OATH)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  	e:GetHandler():RegisterEffect(e1, true)
  end
  function s.desfilter(c, tp)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and Duel.GetMZoneCount(tp, c) > 0
  end
  function s.spfilter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	local c = e:GetHandler()
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.desfilter, tp, LOCATION_ONFIELD, 0, 1, nil, tp) and Duel.IsExistingTarget(s.spfilter, tp, LOCATION_GRAVE, 0, 1, nil, e, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g1 = Duel.SelectTarget(tp, s.desfilter, tp, LOCATION_ONFIELD, 0, 1, 1, nil, tp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g2 = Duel.SelectTarget(tp, s.spfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g1, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g2, 1, 0, 0)
  	e:SetLabelObject(g1:GetFirst())
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc1, tc2 = Duel.GetFirstTarget()
  	if tc1 ~= e:GetLabelObject() then
  		tc1, tc2 = tc2, tc1
  	end
  	if tc1:IsRelateToEffect(e) and Duel.Destroy(tc1, REASON_EFFECT) > 0 and tc2:IsRelateToEffect(e) then
  		Duel.SpecialSummon(tc2, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  
source_text: Amazoness
  1 Level 5 or higher "Amazoness" monster + 1 "Amazoness" monster
  Your opponent's monsters cannot attack any monsters, except this one. You can target 1 "Amazoness" card you control and 1 "Amazoness" Warrior monster in your GY; destroy that card on the field, and if you do, Special Summon that other monster from the GY. This card cannot attack the turn this effect is activated. You can only use this effect of "Amazoness Pet Liger King" once per turn.
target_text: -- Amazoness
  local SETCARD_ID_0 = 0x4 --Amazoness
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcFun2(c, s.matfilter, aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_0), true)
  	--atk limit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(0, LOCATION_MZONE)
  	e1:SetValue(s.atlimit)
  	c:RegisterEffect(e1)
  	--destroy and spsummon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetCategory(CATEGORY_DESTROY + CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetCountLimit(1, id)
  	e2:SetCost(s.cost)
  	e2:SetTarget(s.target)
  	e2:SetOperation(s.operation)
  	c:RegisterEffect(e2)
  end
  function s.matfilter(c)
  	return c:IsLevelAbove(5) and c:IsFusionSetCard(SETCARD_ID_0)
  end
  function s.atlimit(e, c)
  	return c ~= e:GetHandler()
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():GetAttackAnnouncedCount() == 0
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CANNOT_ATTACK)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_OATH)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  	e:GetHandler():RegisterEffect(e1, true)
  end
  function s.desfilter(c, tp)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and Duel.GetMZoneCount(tp, c) > 0
  end
  function s.spfilter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	local c = e:GetHandler()
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.desfilter, tp, LOCATION_ONFIELD, 0, 1, nil, tp) and Duel.IsExistingTarget(s.spfilter, tp, LOCATION_GRAVE, 0, 1, nil, e, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g1 = Duel.SelectTarget(tp, s.desfilter, tp, LOCATION_ONFIELD, 0, 1, 1, nil, tp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g2 = Duel.SelectTarget(tp, s.spfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g1, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g2, 1, 0, 0)
  	e:SetLabelObject(g1:GetFirst())
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc1, tc2 = Duel.GetFirstTarget()
  	if tc1 ~= e:GetLabelObject() then
  		tc1, tc2 = tc2, tc1
  	end
  	if tc1:IsRelateToEffect(e) and Duel.Destroy(tc1, REASON_EFFECT) > 0 and tc2:IsRelateToEffect(e) then
  		Duel.SpecialSummon(tc2, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  