name: Harpies'
card_text: All Winged Beast monsters on the field gain 200 ATK/DEF. If any "Harpie Lady" or "Harpie Lady Sisters" is Normal or Special Summoned: The player who conducted the Summon targets 1 Spell/Trap on the field; that player destroys that target.
external_ids: local CARD_ID_0 = 76812113 --Harpie Lady
  local CARD_ID_1 = 12206212 --Harpie Lady Sisters
  
lua: local CARD_ID_0 = 76812113 --Harpie Lady
  local CARD_ID_1 = 12206212 --Harpie Lady Sisters
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_1)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--trigger
  	local e4 = Effect.CreateEffect(c)
  	e4:SetCategory(CATEGORY_DESTROY)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e4:SetRange(LOCATION_FZONE)
  	e4:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_EVENT_PLAYER)
  	e4:SetCode(EVENT_CUSTOM + id)
  	e4:SetTarget(s.target)
  	e4:SetOperation(s.operation)
  	c:RegisterEffect(e4)
  	--atk/def
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_FIELD)
  	e5:SetCode(EFFECT_UPDATE_ATTACK)
  	e5:SetRange(LOCATION_FZONE)
  	e5:SetTarget(aux.TargetBoolFunction(Card.IsRace, RACE_WINDBEAST))
  	e5:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e5:SetValue(200)
  	c:RegisterEffect(e5)
  	local e6 = e5:Clone()
  	e6:SetCode(EFFECT_UPDATE_DEFENSE)
  	c:RegisterEffect(e6)
  	if not s.global_check then
  		s.global_check = true
  		local ge1 = Effect.CreateEffect(c)
  		ge1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  		ge1:SetCode(EVENT_SUMMON_SUCCESS)
  		ge1:SetOperation(s.check)
  		Duel.RegisterEffect(ge1, 0)
  		local ge2 = ge1:Clone()
  		ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
  		Duel.RegisterEffect(ge2, 0)
  	end
  end
  function s.check(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = eg:GetFirst()
  	local g1 = Group.CreateGroup()
  	local g2 = Group.CreateGroup()
  	while tc do
  		if tc:IsFaceup() and tc:IsCode(CARD_ID_0, CARD_ID_1) then
  			if tc:IsControler(0) then
  				g1:AddCard(tc)
  			else
  				g2:AddCard(tc)
  			end
  		end
  		tc = eg:GetNext()
  	end
  	if g1:GetCount() > 0 then
  		Duel.RaiseEvent(g1, EVENT_CUSTOM + id, re, r, rp, 0, 0)
  	end
  	if g2:GetCount() > 0 then
  		Duel.RaiseEvent(g2, EVENT_CUSTOM + id, re, r, rp, 1, 0)
  	end
  end
  function s.filter(c)
  	return c:IsType(TYPE_SPELL + TYPE_TRAP)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsOnField() and s.filter(chkc)
  	end
  	if chk == 0 then
  		return true
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc and tc:IsRelateToEffect(e) then
  		Duel.Destroy(tc, REASON_EFFECT)
  	end
  end
  
  
source_text: Harpies'
  All Winged Beast monsters on the field gain 200 ATK/DEF. If any "Harpie Lady" or "Harpie Lady Sisters" is Normal or Special Summoned: The player who conducted the Summon targets 1 Spell/Trap on the field; that player destroys that target.
target_text: -- Harpies'
  local CARD_ID_0 = 76812113 --Harpie Lady
  local CARD_ID_1 = 12206212 --Harpie Lady Sisters
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_1)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--trigger
  	local e4 = Effect.CreateEffect(c)
  	e4:SetCategory(CATEGORY_DESTROY)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e4:SetRange(LOCATION_FZONE)
  	e4:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_EVENT_PLAYER)
  	e4:SetCode(EVENT_CUSTOM + id)
  	e4:SetTarget(s.target)
  	e4:SetOperation(s.operation)
  	c:RegisterEffect(e4)
  	--atk/def
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_FIELD)
  	e5:SetCode(EFFECT_UPDATE_ATTACK)
  	e5:SetRange(LOCATION_FZONE)
  	e5:SetTarget(aux.TargetBoolFunction(Card.IsRace, RACE_WINDBEAST))
  	e5:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e5:SetValue(200)
  	c:RegisterEffect(e5)
  	local e6 = e5:Clone()
  	e6:SetCode(EFFECT_UPDATE_DEFENSE)
  	c:RegisterEffect(e6)
  	if not s.global_check then
  		s.global_check = true
  		local ge1 = Effect.CreateEffect(c)
  		ge1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  		ge1:SetCode(EVENT_SUMMON_SUCCESS)
  		ge1:SetOperation(s.check)
  		Duel.RegisterEffect(ge1, 0)
  		local ge2 = ge1:Clone()
  		ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
  		Duel.RegisterEffect(ge2, 0)
  	end
  end
  function s.check(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = eg:GetFirst()
  	local g1 = Group.CreateGroup()
  	local g2 = Group.CreateGroup()
  	while tc do
  		if tc:IsFaceup() and tc:IsCode(CARD_ID_0, CARD_ID_1) then
  			if tc:IsControler(0) then
  				g1:AddCard(tc)
  			else
  				g2:AddCard(tc)
  			end
  		end
  		tc = eg:GetNext()
  	end
  	if g1:GetCount() > 0 then
  		Duel.RaiseEvent(g1, EVENT_CUSTOM + id, re, r, rp, 0, 0)
  	end
  	if g2:GetCount() > 0 then
  		Duel.RaiseEvent(g2, EVENT_CUSTOM + id, re, r, rp, 1, 0)
  	end
  end
  function s.filter(c)
  	return c:IsType(TYPE_SPELL + TYPE_TRAP)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsOnField() and s.filter(chkc)
  	end
  	if chk == 0 then
  		return true
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc and tc:IsRelateToEffect(e) then
  		Duel.Destroy(tc, REASON_EFFECT)
  	end
  end
  
  