open_tiger=false

flags.load_mayor_house = true;

SetActivLeaf("mayor_house");
Spirit_Particles()
AddObjForCur()
Back_To_Secr={
926,231,
1024,231,
1024,618,
926,618
}

FirePlace_Down={
803,391,
874,391,
874,466,
803,466
}

FirePlace_Up={
742,245,
913,245,
913,315,
742,315
}

Pig={
473,132,
550,132,
550,210,
473,210
}

Wolf={
326,124,
385,124,
385,210,
326,210
}

Tiger={
400,216,
476,216,
476,297,
400,297
}

Window={
142,45,
227,45,
227,363,
142,363
}

Mayor_Safe={
619,135,
701,135,
701,235,
619,235
}

Mayor_pile={
0,76,
155,76,
155,568,
0,568
}

addstaticobjecttogame( 120,"mayor_house"  ,958,126,"",952,429,60,404); --паутина
SetAlfa(120,1,0.5,0.2)
st_flame=1

-- addstaticobjecttogame( 220,"m_d"  ,270,157,""); --паутина
  -- AddParticleToObject(120,"d",365,412);
  -- MoveEmiter("d",365,412);

NewObj("verev","mayor_yard14",5000,5000,"155");  
if not obj.verev.is_collapsed then
addactivobjecttogame( 220,"mayor_house"  ,671,412,"","",0,0,34,662,35,112); --верёвка
end;


addstaticobjecttogame( 101,"mayor_house"  ,27 ,106,"",79,0,79,392); --паутина
addstaticobjecttogame( 102,"mayor_house"  ,27 ,106,"",0,0,79,392); --паутина
addstaticobjecttogame( 103,"mayor_house"  ,796,107,"",612,214,92,142); --паутина
addstaticobjecttogame( 104,"mayor_house"  ,796,107,"",414,214,92,142); --паутина
addstaticobjecttogame( 105,"mayor_house"  ,329,239,"",704,214,168,98); --паутина
addstaticobjecttogame( 106,"mayor_house"  ,329,239,"",485,376,168,98); --паутина
addstaticobjecttogame( 107,"mayor_house"  ,762,469,"",680,107,79,79); --паутина
addstaticobjecttogame( 108,"mayor_house"  ,762,469,"",872,429,80,79); --паутина
addstaticobjecttogame( 109,"mayor_house"  ,488,34 ,"",266,107,200,107); --паутина
addstaticobjecttogame( 110,"mayor_house" ,488,34 ,"",266,0,200,107); --паутина
addstaticobjecttogame( 111,"mayor_house" ,480,0  ,"",653,376,110,131); --паутина
addstaticobjecttogame( 112,"mayor_house" ,480,0  ,"",266,376,109,131); --паутина
addstaticobjecttogame( 113,"mayor_house" ,560,0  ,"",569,107,111,77); --паутина
addstaticobjecttogame( 114,"mayor_house" ,560,0  ,"",872,352,111,77); --паутина
addstaticobjecttogame( 115,"mayor_house" ,486,144,"",506,214,106,141); --паутина
addstaticobjecttogame( 116,"mayor_house" ,486,144,"",158,333,106,141); --паутина
addstaticobjecttogame( 117,"mayor_house" ,874,14 ,"",466,107,103,87); --паутина
addstaticobjecttogame( 118,"mayor_house" ,874,14 ,"",763,376,103,87); --паутина

for i=102,118,2 do
    speciale_action(2,i)
end;

for i=101,117,2 do
    speciale_action(2,i,true,3.7)
    speciale_action(2,i+1,true,4)
end;

CreatePolygon(48,4,"FirePlace_Down")
CreatePolygon(5,4,"Mayor_pile")




addactivobjecttogame(10,"mayor_house",323,370,"","",0,0,724,0,76,86); --ваза целая


addactivobjecttogame(12,"mayor_house",289,383,"","",0,0,614,0,110,73); --разбитая ваза
speciale_action(2,12);

addstaticobjecttogame(14,"mayor_house",491,187,"",984,833,11,13); --бивень кабана
speciale_action(2,14);
CreatePolygon(15,4,"Pig")

addstaticobjecttogame(16,"mayor_house",426,273,"",952,833,32,23); --открытый рот тигра
speciale_action(2,16);
CreatePolygon(17,4,"Tiger")

addstaticobjecttogame(18,"mayor_house",388,138,"",995,833,5,8); --клык волка
speciale_action(2,18);

CreatePolygon(19,4,"Wolf")


addstaticobjecttogame(24,"mayor_house",605,120,"",375,376,110,136); --портрет мэра
CreatePolygon(25,4,"Mayor_Safe")
speciale_action(2,25)
addstaticobjecttogame(26,"mayor_house",634,148,"",800,0,63,78); --сейф открыт
speciale_action(2,26);


CreatePolygon(33,4,"Back_To_Secr")



addactivobjecttogame(41,"mayor_house",124,55 ,"","",0,0,158,0,108,333); --забитое окно
set_pixel_check(41,false)


CreatePolygon(42,4,"Window")
speciale_action(2,42)
CreatePolygon(50,4,"FirePlace_Up")

addstaticobjecttogame(51,"mayor_house",799,252,"",466,0,148,99); --статуя 1
speciale_action(2,51);
addstaticobjecttogame(52,"mayor_house",754,248,"",759,107,158,106); --статуя 2
speciale_action(2,52);


addstaticobjecttogame(44,"mayor_house26",0  ,0  ,""); --бг


addfade(501,0);
vasep=false



if flags.vase_brokeM then
    vasep=true;
    speciale_action(2,10);
    speciale_action(2,12);        
end;




if flags.vepr then
  speciale_action(2,14);
  ActivateObject(15,false);
end;

if flags.volf and flags.vepr then
  speciale_action(2,16);
end;



if flags.tiger then
  ActivateObject(17,false);
end;



if flags.kamin_mayor then
  speciale_action(2,50);
  speciale_action(2,51);
  speciale_action(2,52);
  SetObjectPosition(24,680,120)
    speciale_action(2,25)
end;


if not flags.seyf_kartina and flags.safe_complete then
  speciale_action(2,25);
  speciale_action(2,26);
   ActivateObject(26,true)     
end;

if flags.seyf_kartina then
  speciale_action(2,25);
  speciale_action(2,26);
end;
-------------------------------------------------------    
    if flags.volf then
      speciale_action(2,18);
      ActivateObject(19,false);
    end;

if flags.kamin_puzzle then
  speciale_action(2,48)
end;



if flags.vaza_svecha then
if not vasep then
    vasep=true;
  speciale_action(2,10);
  speciale_action(2,12);
end;  
end;

if flags.mayor_wind then
  speciale_action(2,41);
  speciale_action(2,42)

end;