--高速决斗技能-等级下降
Duel.LoadScript("speed_duel_common.lua")
function c100730180.initial_effect(c)
	aux.SpeedDuelAtMainPhase(c,c100730180.skill,c100730180.con,aux.Stringid(100730180,0))
	aux.SpeedDuelBeforeDraw(c,c100730180.skill2)
	aux.RegisterSpeedDuelSkillCardCommon()
end
function c100730180.filter(c)
	return c:IsType(TYPE_MONSTER) and c:IsLevelAbove(1)
end
function c100730180.con(e,tp)
	tp=e:GetLabelObject():GetOwner()
	return aux.SpeedDuelAtMainPhaseCondition(e,tp)
		and Duel.IsExistingMatchingCard(c100730180.filter,tp,LOCATION_HAND,0,1,nil)
		and Duel.IsExistingMatchingCard(c100730180.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c100730180.skill(e,tp)
	tp=e:GetLabelObject():GetOwner()
	Duel.Hint(HINT_CARD,1-tp,100730049)
	Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100730180,1))
	local source=Duel.SelectMatchingCard(tp,c100730180.filter,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
	Duel.ConfirmCards(1-tp,source)
	Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100730180,2))
	local to=Duel.SelectMatchingCard(tp,c100730180.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
	local e1=Effect.CreateEffect(to)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetCode(EFFECT_UPDATE_LEVEL)
	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
	e1:SetReset(RESET_EVENT+RESETS_STANDARD)
	e1:SetValue(-source:GetLevel())
	to:RegisterEffect(e1)
	Duel.ShuffleHand(tp)
end