# portnoi2
poshvalldrop = 0

i = 1
:ycheapmet
	if cheap[i] = 1 and ((cheapB[i] > pcs_hips + 8) or (cheapB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 413:jump 'ycheapmet'

i = 1
:yaveragemet
	if average[i] = 1 and ((averageB[i] > pcs_hips + 8) or (averageB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 522:jump 'yaveragemet'

i = 1
:yexpensivemet
	if expensive[i] = 1 and ((expensiveB[i] > pcs_hips + 8) or (expensiveB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 425:jump 'yexpensivemet'

i = 1
:yformalmet
	if formal[i] = 1 and ((formalB[i] > pcs_hips + 8) or (formalB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 168:jump 'yformalmet'

i = 1
:yofficemet
	if office[i] = 1 and ((officeB[i] > pcs_hips + 8) or (officeB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 101:jump 'yofficemet'

i = 1
:yschoolmet
	if school[i] = 1 and ((schoolB[i] > pcs_hips + 8) or (schoolB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
	if i = 6: i = 7
if i <= 62:jump 'yschoolmet'

i = 1
:yfetishmet
	if fetish[i] = 1 and ((fetishB[i] > pcs_hips + 8) or (fetishB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 94:jump 'yfetishmet'

i = 1
:yexhibitmet
	if exhibit[i] = 1 and ((exhibitB[i] > pcs_hips + 8) or (exhibitB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 57:jump 'yexhibitmet'

i = 1
:yuniformmet
	if uniform[i] = 1 and ((uniformB[i] > pcs_hips + 8) or (uniformB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 59:jump 'yuniformmet'

i = 1
:yswimwearmet
	if swimwear[i] = 1 and ((swimwearB[i] > pcs_hips + 8) or (swimwearB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 135:jump 'yswimwearmet'

i = 1
:yburlesquemet
	if burlesque[i] = 1 and ((burlesqueB[i] > pcs_hips + 8) or (burlesqueB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 22:jump 'yburlesquemet'

i = 1
:yalternativemet
	if alternative[i] = 1 and ((alternativeB[i] > pcs_hips + 8) or (alternativeB[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= 129:jump 'yalternativemet'

poshvalldrop *= 500

if money < poshvalldrop:
	'You do not have enough money to resize all of your clothing. The total cost would be <<poshvalldrop>> <b>₽</b>.'

	if $loc = 'Gshveyfab':
		act 'Leave':gt 'Gshveyfab', 'start'
	else
		act 'Leave':gt 'rinok', 'tailor'
	end

	exit
elseif money >= poshvalldrop:
	money -= poshvalldrop

	i = 1
	:xcheapmet
		if cheap[i] = 1 and ((cheapB[i] > pcs_hips + 8) or (cheapB[i] < pcs_hips - 8)):cheapB[i] = pcs_hips
		i += 1
	if i <= 413:jump 'xcheapmet'

	i = 1
	:xaveragemet
		if average[i] = 1 and ((averageB[i] > pcs_hips + 8) or (averageB[i] < pcs_hips - 8)):averageB[i] = pcs_hips
		i += 1
	if i <= 522:jump 'xaveragemet'

	i = 1
	:xexpensivemet
		if expensive[i] = 1 and ((expensiveB[i] > pcs_hips + 8) or (expensiveB[i] < pcs_hips - 8)):expensiveB[i] = pcs_hips
		i += 1
	if i <= 425:jump 'xexpensivemet'

	i = 1
	:xformalmet
		if formal[i] = 1 and ((formalB[i] > pcs_hips + 8) or (formalB[i] < pcs_hips - 8)):formalB[i] = pcs_hips
		i += 1
	if i <= 168:jump 'xformalmet'

	i = 1
	:xofficemet
		if office[i] = 1 and ((officeB[i] > pcs_hips + 8) or (officeB[i] < pcs_hips - 8)):officeB[i] = pcs_hips
		i += 1
	if i <= 101:jump 'xofficemet'

	i = 1
	:xschoolmet
		if school[i] = 1 and ((schoolB[i] > pcs_hips + 8) or (schoolB[i] < pcs_hips - 8)):schoolB[i] = pcs_hips
		i += 1
		if i = 6: i = 7
	if i <= 62:jump 'xschoolmet'

	i = 1
	:xfetishmet
		if fetish[i] = 1 and ((fetishB[i] > pcs_hips + 8) or (fetishB[i] < pcs_hips - 8)):fetishB[i] = pcs_hips
		i += 1
	if i <= 113:jump 'xfetishmet'

	i = 1
	:xexhibitmet
		if exhibit[i] = 1 and ((exhibitB[i] > pcs_hips + 8) or (exhibitB[i] < pcs_hips - 8)):exhibitB[i] = pcs_hips
		i += 1
	if i <= 94:jump 'xexhibitmet'

	i = 1
	:xuniformmet
		if uniform[i] = 1 and ((uniformB[i] > pcs_hips + 8) or (uniformB[i] < pcs_hips - 8)):uniformB[i] = pcs_hips
		i += 1
	if i <= 49:jump 'xuniformmet'

	i = 1
	:xswimwearmet
		if swimwear[i] = 1 and ((swimwearB[i] > pcs_hips + 8) or (swimwearB[i] < pcs_hips - 8)):swimwearB[i] = pcs_hips
		i += 1
	if i <= 135:jump 'xswimwearmet'

	i = 1
	:xburlesquemet
		if burlesque[i] = 1 and ((burlesqueB[i] > pcs_hips + 8) or (burlesqueB[i] < pcs_hips - 8)):burlesqueB[i] = pcs_hips
		i += 1
	if i <= 22:jump 'xburlesquemet'

	i = 1
	:xalternativemet
		if alternative[i] = 1 and ((alternativeB[i] > pcs_hips + 8) or (alternativeB[i] < pcs_hips - 8)):alternativeB[i] = pcs_hips
		i += 1
	if i <= 129:jump 'xalternativemet'

	'You resize all clothing for <<poshvalldrop>> <b>₽</b>.'

	if $loc = 'Gshveyfab':
		act 'Leave':gt 'Gshveyfab', 'start'
	else
		act 'Leave':gt 'rinok', 'tailor'
	end

	exit
end

--- portnoi2 ---------------------------------

