name: Insect
card_text: All Insect monsters your opponent controls are changed to Attack Position. If this card destroys an Insect monster by battle: This card gains 500 ATK.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Pos Change
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SET_POSITION)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTarget(s.target)
  	e1:SetTargetRange(0, LOCATION_MZONE)
  	e1:SetValue(POS_FACEUP_ATTACK)
  	c:RegisterEffect(e1)
  	--atkup
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e2:SetCode(EVENT_BATTLE_DESTROYING)
  	e2:SetCondition(s.atkcon)
  	e2:SetOperation(s.atkop)
  	c:RegisterEffect(e2)
  end
  function s.target(e, c)
  	return c:IsRace(RACE_INSECT)
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	local bc = e:GetHandler():GetBattleTarget()
  	return bc and bc:IsRace(RACE_INSECT)
  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:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(500)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  		c:RegisterEffect(e1)
  	end
  end
  
  
source_text: Insect
  All Insect monsters your opponent controls are changed to Attack Position. If this card destroys an Insect monster by battle: This card gains 500 ATK.
target_text: -- Insect
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Pos Change
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SET_POSITION)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTarget(s.target)
  	e1:SetTargetRange(0, LOCATION_MZONE)
  	e1:SetValue(POS_FACEUP_ATTACK)
  	c:RegisterEffect(e1)
  	--atkup
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e2:SetCode(EVENT_BATTLE_DESTROYING)
  	e2:SetCondition(s.atkcon)
  	e2:SetOperation(s.atkop)
  	c:RegisterEffect(e2)
  end
  function s.target(e, c)
  	return c:IsRace(RACE_INSECT)
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	local bc = e:GetHandler():GetBattleTarget()
  	return bc and bc:IsRace(RACE_INSECT)
  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:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(500)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  		c:RegisterEffect(e1)
  	end
  end
  
  