Dragon
FLIP: Destroy all face-up "Dragon Capture Jar"(s) on the field. If you destroy any, change all face-up Dragon-Type monsters on the field to Attack Position.
local CARD_ID_0 = 50045299 --Dragon Capture Jar

local CARD_ID_0 = 50045299 --Dragon Capture Jar
local s, id, o = GetID()
function s.initial_effect(c)
	--flip
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_DESTROY + CATEGORY_POSITION)
	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_FLIP)
	e1:SetTarget(s.target)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
function s.filter(c)
	return c:IsFaceup() and c:IsCode(CARD_ID_0)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_SZONE, LOCATION_SZONE, nil)
	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
end
function s.pfilter(c)
	return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsRace(RACE_DRAGON)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_SZONE, LOCATION_SZONE, nil)
	if Duel.Destroy(g, REASON_EFFECT) > 0 then
		local pg = Duel.GetMatchingGroup(s.pfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
		Duel.ChangePosition(pg, POS_FACEUP_ATTACK)
	end
end


Dragon
FLIP: Destroy all face-up "Dragon Capture Jar"(s) on the field. If you destroy any, change all face-up Dragon-Type monsters on the field to Attack Position.
-- Dragon
local CARD_ID_0 = 50045299 --Dragon Capture Jar
local s, id, o = GetID()
function s.initial_effect(c)
	--flip
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_DESTROY + CATEGORY_POSITION)
	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_FLIP)
	e1:SetTarget(s.target)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
function s.filter(c)
	return c:IsFaceup() and c:IsCode(CARD_ID_0)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_SZONE, LOCATION_SZONE, nil)
	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
end
function s.pfilter(c)
	return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsRace(RACE_DRAGON)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_SZONE, LOCATION_SZONE, nil)
	if Duel.Destroy(g, REASON_EFFECT) > 0 then
		local pg = Duel.GetMatchingGroup(s.pfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
		Duel.ChangePosition(pg, POS_FACEUP_ATTACK)
	end
end

