# portnoi2
poshvalldrop = 0

i = 1
:cheapmet
	if cheap[i] = 1 and cheapB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 85:jump 'cheapmet'

i = 1
:averagemet
	if average[i] = 1 and averageB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 125:jump 'averagemet'

i = 1
:expensivemet
	if expensive[i] = 1 and expensiveB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 147:jump 'expensivemet'

i = 1
:formalmet
	if formal[i] = 1 and formalB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 14:jump 'formalmet'

i = 1
:officemet
	if office[i] = 1 and officeB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 30:jump 'officemet'

i = 1
:schoolmet
	if school[i] = 1 and schoolB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 14:jump 'schoolmet'

i = 1
:exercisemet
	if exercise[i] = 1 and exerciseB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 26:jump 'exercisemet'

i = 1
:naughtymet
	if naughty[i] = 1 and naughtyB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 67:jump 'naughtymet'

i = 1
:exhibitmet
	if exhibit[i] = 1 and exhibitB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 30:jump 'exhibitmet'

i = 1
:uniformmet
	if uniform[i] = 1 and uniformB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 24:jump 'uniformmet'

i = 1
:coatmet
	if coat[i] = 1 and coatB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 12:jump 'coatmet'

i = 1
:swimwearmet
	if swimwear[i] = 1 and swimwearB[i]!bedra:poshvalldrop += 1
	i += 1
if i <= 30:jump 'swimwearmet'

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

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

	exit
elseif money >= poshvalldrop * 500:
	money -= poshvalldrop * 500

	i = 1
	:cheapmet
		if cheap[i] = 1 and cheapB[i]!bedra:cheapB[i] = bedra
		i += 1
	if i <= 85:jump 'cheapmet'

	i = 1
	:averagemet
		if average[i] = 1 and averageB[i]!bedra:averageB[i] = bedra
		i += 1
	if i <= 125:jump 'averagemet'

	i = 1
	:expensivemet
		if expensive[i] = 1 and expensiveB[i]!bedra:expensiveB[i] = bedra
		i += 1
	if i <= 147:jump 'expensivemet'

	i = 1
	:formalmet
		if formal[i] = 1 and formalB[i]!bedra:formalB[i] = bedra
		i += 1
	if i <= 14:jump 'formalmet'

	i = 1
	:officemet
		if office[i] = 1 and officeB[i]!bedra:officeB[i] = bedra
		i += 1
	if i <= 30:jump 'officemet'

	i = 1
	:schoolmet
		if school[i] = 1 and schoolB[i]!bedra:schoolB[i] = bedra
		i += 1
	if i <= 14:jump 'schoolmet'

	i = 1
	:exercisemet
		if exercise[i] = 1 and exerciseB[i]!bedra:exerciseB[i] = bedra
		i += 1
	if i <= 26:jump 'exercisemet'

	i = 1
	:naughtymet
		if naughty[i] = 1 and naughtyB[i]!bedra:naughtyB[i] = bedra
		i += 1
	if i <= 67:jump 'naughtymet'

	i = 1
	:exhibitmet
		if exhibit[i] = 1 and exhibitB[i]!bedra:exhibitB[i] = bedra
		i += 1
	if i <= 30:jump 'exhibitmet'

	i = 1
	:uniformmet
		if uniform[i] = 1 and uniformB[i]!bedra:uniformB[i] = bedra
		i += 1
	if i <= 24:jump 'uniformmet'

	i = 1
	:coatmet
		if coat[i] = 1 and coatB[i]!bedra:coatB[i] = bedra
		i += 1
	if i <= 12:jump 'coatmet'

	i = 1
	:swimwearmet
		if swimwear[i] = 1 and swimwearB[i]!bedra:swimwearB[i] = bedra
		i += 1
	if i <= 30:jump 'swimwearmet'

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

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

	exit
end

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

