# portnoi2
poshvalldrop = 0

i = 1
:ygm_outfitsmet
	if gm_outfits[i] = 1 and ((gm_outfits_b[i] > pcs_hips + 8) or (gm_outfits_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('gm_outfits'):jump 'ygm_outfitsmet'

i = 1
:ycats_dressmet
	if cats_dress[i] = 1 and ((cats_dress_b[i] > pcs_hips + 8) or (cats_dress_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('cats_dress'):jump 'ycats_dressmet'

i = 1
:ycats_outfitsmet
	if cats_outfits[i] = 1 and ((cats_outfits_b[i] > pcs_hips + 8) or (cats_outfits_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('cats_outfits'):jump 'ycats_outfitsmet'

i = 1
:ycoco_dressmet
	if coco_dress[i] = 1 and ((coco_dress_b[i] > pcs_hips + 8) or (coco_dress_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('coco_dress'):jump 'ycoco_dressmet'

i = 1
:ycoco_outfitsmet
	if coco_outfits[i] = 1 and ((coco_outfits_b[i] > pcs_hips + 8) or (coco_outfits_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('coco_outfits'):jump 'ycoco_outfitsmet'

i = 1
:yflamingos_dressmet
	if flamingos_dress[i] = 1 and ((flamingos_dress_b[i] > pcs_hips + 8) or (flamingos_dress_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('flamingos_dress'):jump 'yflamingos_dressmet'

i = 1
:yflamingos_outfitsmet
	if flamingos_outfits[i] = 1 and ((flamingos_outfits_b[i] > pcs_hips + 8) or (flamingos_outfits_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('flamingos_outfits'):jump 'yflamingos_outfitsmet'

i = 1
:yfashionistamet
	if fashionista[i] = 1 and ((fashionista_b[i] > pcs_hips + 8) or (fashionista_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('fashionista'):jump 'yfashionistamet'

i = 1
:ymoncherimet
	if moncheri[i] = 1 and ((moncheri_b[i] > pcs_hips + 8) or (moncheri_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('moncheri'):jump 'ymoncherimet'

i = 1
:yofficemet
	if gm_office[i] = 1 and ((gm_office_b[i] > pcs_hips + 8) or (gm_office_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('gm_office'):jump 'yofficemet'

i = 1
:yschoolmet
	if gm_school[i] = 1 and ((gm_school_b[i] > pcs_hips + 8) or (gm_school_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
	if i = 6: i = 7
if i <= ARRSIZE('gm_school'):jump 'yschoolmet'

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

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

i = 1
:yuniformmet
	if gm_uniform[i] = 1 and ((gm_uniform_b[i] > pcs_hips + 8) or (gm_uniform_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('gm_uniform'):jump 'yuniformmet'

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

i = 1
:ybeachmet
	if beach[i] = 1 and ((beach_b[i] > pcs_hips + 8) or (beach_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('beach'):jump 'ybeachmet'

i = 1
:yfancy_burlesquemet
	if fancy_burlesque[i] = 1 and ((fancy_burlesque_b[i] > pcs_hips + 8) or (fancy_burlesque_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('fancy_burlesque'):jump 'yfancy_burlesquemet'

i = 1
:ydolls_outfitsmet
	if dolls_outfits[i] = 1 and ((dolls_outfits_b[i] > pcs_hips + 8) or (dolls_outfits_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('dolls_outfits'):jump 'ydolls_outfitsmet'

i = 1
:ydolls_dressmet
	if dolls_dress[i] = 1 and ((dolls_dress_b[i] > pcs_hips + 8) or (dolls_dress_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('dolls_dress'):jump 'ydolls_dressmet'

i = 1
:ybomba_outfitsmet
	if bomba_outfits[i] = 1 and ((bomba_outfits_b[i] > pcs_hips + 8) or (bomba_outfits_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('bomba_outfits'):jump 'ybomba_outfitsmet'

i = 1
:ybomba_dressmet
	if bomba_dress[i] = 1 and ((bomba_dress_b[i] > pcs_hips + 8) or (bomba_dress_b[i] < pcs_hips - 8)):poshvalldrop += 1
	i += 1
if i <= ARRSIZE('bomba_dress'):jump 'ybomba_dressmet'

poshvalldrop = 500 * poshvalldrop

if money < poshvalldrop:
	'You do not have enough money to resize all of your clothing. The total cost would be <<poshvalldrop>> <b>₽</b>.'
elseif poshvalldrop = 0:
	'You do not have any clothes that need tailoring currently,'
elseif money >= poshvalldrop:
	money -= poshvalldrop

	i = 1
	:xgm_dressmet
		if gm_dress[i] = 1 and ((gm_dress_b[i] > pcs_hips + 8) or (gm_dress_b[i] < pcs_hips - 8)):gm_dress_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('gm_dress'):jump 'xgm_dressmet'

	i = 1
	:xgm_outfitsmet
		if gm_outfits[i] = 1 and ((gm_outfits_b[i] > pcs_hips + 8) or (gm_outfits_b[i] < pcs_hips - 8)):gm_outfits_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('gm_outfits'):jump 'xgm_outfitsmet'

	i = 1
	:xcats_dressmet
		if cats_dress[i] = 1 and ((cats_dress_b[i] > pcs_hips + 8) or (cats_dress_b[i] < pcs_hips - 8)):cats_dress_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('cats_dress'):jump 'xcats_dressmet'

	i = 1
	:xcats_outfitsmet
		if cats_outfits[i] = 1 and ((cats_outfits_b[i] > pcs_hips + 8) or (cats_outfits_b[i] < pcs_hips - 8)):cats_outfits_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('cats_outfits'):jump 'xcats_outfitsmet'

	i = 1
	:xcoco_dressmet
		if coco_dress[i] = 1 and ((coco_dress_b[i] > pcs_hips + 8) or (coco_dress_b[i] < pcs_hips - 8)):coco_dress_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('coco_dress'):jump 'xcoco_dressmet'

	i = 1
	:xcoco_outfitsmet
		if coco_outfits[i] = 1 and ((coco_outfits_b[i] > pcs_hips + 8) or (coco_outfits_b[i] < pcs_hips - 8)):coco_outfits_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('coco_outfits'):jump 'xcoco_outfitsmet'

	i = 1
	:xflamingos_dressmet
		if flamingos_dress[i] = 1 and ((flamingos_dress_b[i] > pcs_hips + 8) or (flamingos_dress_b[i] < pcs_hips - 8)):flamingos_dress_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('flamingos_dress'):jump 'xflamingos_dressmet'

	i = 1
	:xflamingos_outfitsmet
		if flamingos_outfits[i] = 1 and ((flamingos_outfits_b[i] > pcs_hips + 8) or (flamingos_outfits_b[i] < pcs_hips - 8)):flamingos_outfits_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('flamingos_outfits'):jump 'xflamingos_outfitsmet'

	i = 1
	:xfashionistamet
		if fashionista[i] = 1 and ((fashionista_b[i] > pcs_hips + 8) or (fashionista_b[i] < pcs_hips - 8)):fashionista_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('fashionista'):jump 'xfashionistamet'

	i = 1
	:xmoncherimet
		if moncheri[i] = 1 and ((moncheri_b[i] > pcs_hips + 8) or (moncheri_b[i] < pcs_hips - 8)):moncheri_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('moncheri'):jump 'xmoncherimet'

	i = 1
	:xofficemet
		if gm_office[i] = 1 and ((gm_office_b[i] > pcs_hips + 8) or (gm_office_b[i] < pcs_hips - 8)):gm_office_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('gm_office'):jump 'xofficemet'

	i = 1
	:xschoolmet
		if gm_school[i] = 1 and ((gm_school_b[i] > pcs_hips + 8) or (gm_school_b[i] < pcs_hips - 8)):gm_school_b[i] = pcs_hips
		i += 1
		if i = 6: i = 7
	if i <= ARRSIZE('gm_school'):jump 'xschoolmet'

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

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

	i = 1
	:xuniformmet
		if gm_uniform[i] = 1 and ((gm_uniform_b[i] > pcs_hips + 8) or (gm_uniform_b[i] < pcs_hips - 8)):gm_uniform_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('gm_uniform'):jump 'xuniformmet'

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

	i = 1
	:xbeachmet
		if beach[i] = 1 and ((beach_b[i] > pcs_hips + 8) or (beach_b[i] < pcs_hips - 8)):beach_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('beach'):jump 'xbeachmet'

	i = 1
	:xfancy_burlesquemet
		if fancy_burlesque[i] = 1 and ((fancy_burlesque_b[i] > pcs_hips + 8) or (fancy_burlesque_b[i] < pcs_hips - 8)):fancy_burlesque_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('fancy_burlesque'):jump 'xfancy_burlesquemet'

	i = 1
	:xdolls_outfitsmet
		if dolls_outfits[i] = 1 and ((dolls_outfits_b[i] > pcs_hips + 8) or (dolls_outfits_b[i] < pcs_hips - 8)):dolls_outfits_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('dolls_outfits'):jump 'xdolls_outfitsmet'

	i = 1
	:xdolls_dressmet
		if dolls_dress[i] = 1 and ((dolls_dress_b[i] > pcs_hips + 8) or (dolls_dress_b[i] < pcs_hips - 8)):dolls_dress_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('dolls_dress'):jump 'xdolls_dressmet'

	i = 1
	:xbomba_outfitsmet
		if bomba_outfits[i] = 1 and ((bomba_outfits_b[i] > pcs_hips + 8) or (bomba_outfits_b[i] < pcs_hips - 8)):bomba_outfits_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('bomba_outfits'):jump 'xbomba_outfitsmet'

	i = 1
	:xbomba_dressmet
		if bomba_dress[i] = 1 and ((bomba_dress_b[i] > pcs_hips + 8) or (bomba_dress_b[i] < pcs_hips - 8)):bomba_dress_b[i] = pcs_hips
		i += 1
	if i <= ARRSIZE('bomba_dress'):jump 'xbomba_dressmet'

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

if $loc = 'pav_factory':
	act 'Leave': gt 'pav_industrial'
else
	act 'Leave' :gt 'city_market', 'tailor'
end

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

