name: Amazoness
card_text: "Amazoness Queen" + 1 "Amazoness" monster
  Other "Amazoness" cards you control cannot be destroyed by battle or card effects. If your "Amazoness" monster attacks a Defense Position monster, inflict piercing battle damage to your opponent. If this face-up Fusion Summoned card is destroyed by battle, or leaves the field because of an opponent's card effect while its owner controls it: You can Special Summon 1 "Amazoness Queen" from your hand, Deck, or GY.
external_ids: local CARD_ID_0 = 15951532 --Amazoness Queen
  local SETCARD_ID_0 = 0x4 --Amazoness
  
lua: local CARD_ID_0 = 15951532 --Amazoness Queen
  local SETCARD_ID_0 = 0x4 --Amazoness
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	aux.AddFusionProcCodeFun(c, CARD_ID_0, aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_0), 1, true, true)
  	--indes
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(LOCATION_ONFIELD, 0)
  	e1:SetTarget(s.indtg)
  	e1:SetValue(1)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	c:RegisterEffect(e2)
  	--pierce
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_PIERCE)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetTargetRange(LOCATION_MZONE, 0)
  	e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard, SETCARD_ID_0))
  	c:RegisterEffect(e3)
  	--special summon
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetCategory(CATEGORY_DAMAGE)
  	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e4:SetCode(EVENT_LEAVE_FIELD)
  	e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
  	e4:SetCondition(s.spcon)
  	e4:SetTarget(s.sptg)
  	e4:SetOperation(s.spop)
  	c:RegisterEffect(e4)
  end
  function s.indtg(e, c)
  	return c:IsSetCard(SETCARD_ID_0) and c ~= e:GetHandler()
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	return c:IsSummonType(SUMMON_TYPE_FUSION) and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer() == 1 - tp and c:IsReason(REASON_EFFECT))) and c:IsPreviousPosition(POS_FACEUP)
  end
  function s.filter(c, e, tp)
  	return c:IsCode(CARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_HAND + LOCATION_DECK + LOCATION_GRAVE, 0, 1, nil, e, tp)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND + LOCATION_DECK + LOCATION_GRAVE)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.filter), tp, LOCATION_HAND + LOCATION_DECK + LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	if g:GetCount() > 0 then
  		Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  
source_text: Amazoness
  "Amazoness Queen" + 1 "Amazoness" monster
  Other "Amazoness" cards you control cannot be destroyed by battle or card effects. If your "Amazoness" monster attacks a Defense Position monster, inflict piercing battle damage to your opponent. If this face-up Fusion Summoned card is destroyed by battle, or leaves the field because of an opponent's card effect while its owner controls it: You can Special Summon 1 "Amazoness Queen" from your hand, Deck, or GY.
target_text: -- Amazoness
  local CARD_ID_0 = 15951532 --Amazoness Queen
  local SETCARD_ID_0 = 0x4 --Amazoness
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	aux.AddFusionProcCodeFun(c, CARD_ID_0, aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_0), 1, true, true)
  	--indes
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(LOCATION_ONFIELD, 0)
  	e1:SetTarget(s.indtg)
  	e1:SetValue(1)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	c:RegisterEffect(e2)
  	--pierce
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_PIERCE)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetTargetRange(LOCATION_MZONE, 0)
  	e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard, SETCARD_ID_0))
  	c:RegisterEffect(e3)
  	--special summon
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetCategory(CATEGORY_DAMAGE)
  	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e4:SetCode(EVENT_LEAVE_FIELD)
  	e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
  	e4:SetCondition(s.spcon)
  	e4:SetTarget(s.sptg)
  	e4:SetOperation(s.spop)
  	c:RegisterEffect(e4)
  end
  function s.indtg(e, c)
  	return c:IsSetCard(SETCARD_ID_0) and c ~= e:GetHandler()
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	return c:IsSummonType(SUMMON_TYPE_FUSION) and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer() == 1 - tp and c:IsReason(REASON_EFFECT))) and c:IsPreviousPosition(POS_FACEUP)
  end
  function s.filter(c, e, tp)
  	return c:IsCode(CARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_HAND + LOCATION_DECK + LOCATION_GRAVE, 0, 1, nil, e, tp)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND + LOCATION_DECK + LOCATION_GRAVE)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.filter), tp, LOCATION_HAND + LOCATION_DECK + LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	if g:GetCount() > 0 then
  		Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  