--SP-前进加速
function c87593007.initial_effect(c)
	--counter
	local e1=Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_COUNTER)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetCondition(c87593007.condition)
	e1:SetTarget(c87593007.target)
	e1:SetOperation(c87593007.operation)
	c:RegisterEffect(e1)
end
function c87593007.condition(e,tp,eg,ep,ev,re,r,rp)
	return Duel.IsExistingMatchingCard(c87593007.ofilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e,tp)
end
function c87593007.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return true end
	Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,nil,nil)
end
function c87593007.ofilter(c,e,tp)
	if c:GetControler()==tp then cou=0x871 else cou=0x872 end
	return c:IsCode(87593200) and c:GetCounter(cou)<=2
end
function c87593007.operation(e,tp,eg,ep,ev,re,r,rp)
	local fo=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_SZONE,LOCATION_SZONE,nil,87593200)
	local tc=fo:GetFirst()
		tc:AddCounter(0x871,3)
		tc:AddCounter(0x872,3)
end
