name: Worm
card_text: FLIP: Change all face-up Reptile-Type "Worm" monsters you control to face-down Defense Position, except this card.
external_ids: local SETCARD_ID_0 = 0x3e --Worm
  
lua: local SETCARD_ID_0 = 0x3e --Worm
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--flip
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FLIP + EFFECT_TYPE_SINGLE)
  	e1:SetCategory(CATEGORY_POSITION)
  	e1:SetTarget(s.postg)
  	e1:SetOperation(s.posop)
  	c:RegisterEffect(e1)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and c:IsRace(RACE_REPTILE)
  end
  function s.postg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, e:GetHandler())
  	Duel.SetOperationInfo(0, CATEGORY_POSITION, g, g:GetCount(), 0, 0)
  end
  function s.posop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, aux.ExceptThisCard(e))
  	Duel.ChangePosition(g, POS_FACEDOWN_DEFENSE, 0, POS_FACEDOWN_DEFENSE, 0)
  end
  
  
source_text: Worm
  FLIP: Change all face-up Reptile-Type "Worm" monsters you control to face-down Defense Position, except this card.
target_text: -- Worm
  local SETCARD_ID_0 = 0x3e --Worm
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--flip
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FLIP + EFFECT_TYPE_SINGLE)
  	e1:SetCategory(CATEGORY_POSITION)
  	e1:SetTarget(s.postg)
  	e1:SetOperation(s.posop)
  	c:RegisterEffect(e1)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and c:IsRace(RACE_REPTILE)
  end
  function s.postg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, e:GetHandler())
  	Duel.SetOperationInfo(0, CATEGORY_POSITION, g, g:GetCount(), 0, 0)
  end
  function s.posop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, aux.ExceptThisCard(e))
  	Duel.ChangePosition(g, POS_FACEDOWN_DEFENSE, 0, POS_FACEDOWN_DEFENSE, 0)
  end
  
  