<?xml version="1.0" encoding="windows-1251"?>
<LevelScripts>
  <Script>
    <Action type="SetLevelVar" var="MaxBuildingUpgradeLevel" value="1" />
    <Action type="SetLevelVar" var="HousesGenerateBonuses" value="false" />
    <Action type="SetLevelVar" var="BuildingsCanBeSelled" value="false" />
    <Action type="SetLevelVar" var="BuildingsCanGetBroken" value="false" />
    <Action type="SetLevelVar" var="SkipTutorialButtonVisible" value="true" />

    <Action type="SetInputFilter" active="true" inputMask="InputMask.PopupsOnly" />

    <Action type="ShowArrow" overBuildingId="Office" untilSwitch="Switch.SpeechDone1" />
    <Action type="ShowSpeechModal" text="Script.03.Intro1" character="Assistant" mood="happy" />
    <Action type="SetSwitch" switch="Switch.SpeechDone1" />

    <Action type="ShowSpeechModal" text="Script.03.Intro2" character="Assistant" mood="happy" />

    <!--Улучшаем первый дом.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingsOwned" />
    <Action type="ShowArrow" overBuildingId="Bungalow1" rotation="270" untilSwitch="Switch.FirstBungalowSelected" />
    <Action type="ShowArrow" overBuildingId="Bungalow2" rotation="270" untilSwitch="Switch.FirstBungalowSelected" />
    <Action type="ShowSpeechUntilSwitch" text="Script.03.UpgradeHouse1" character="Assistant" switch="Switch.FirstBungalowSelected" posY="590" />

    <Action type="SetSwitch" switch="Switch.Pass1Enabled" />
    <Action type="SetSwitch" switch="Switch.Pass2Enabled" />

    <!--СЕЙЧАС ВЫПОЛНЯЕТСЯ ОДНА ИЗ ВЕТОК ПО АПГРЕЙДУ БУНГАЛО.-->

    <Action type="Wait" untilSwitch="Switch.BothBungalowsUpgraded" />

    <Action type="ShowArrow" overHudItem="Income" untilSwitch="Switch.Switch1" />
    <Action type="ShowSpeechModal" text="Script.03.UpgradeHouse5" character="Assistant"  pauseGame="false" posY="300" />
    <Action type="SetSwitch" switch="Switch.Switch1" />

    <!--Покупаем дом.-->
    <Action type="Wait" duration="1.0" />
    <Action type="SetBuildingVar" buildingId="BrickHouse" var="IsDisplayedForSale" value="true" />
    <Action type="Wait" duration="1.0" />

    <!--Просим кликнуть по дому.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingsRival" />
    <Action type="ShowArrow" overBuildingId="BrickHouse" rotation="270" untilSwitch="Switch.RivalHouseSelected" />
    <Action type="ShowSpeechUntilSwitch" text="Script.03.BuyHouse1" character="Assistant" switch="Switch.RivalHouseSelected" />
    <Action type="WaitBuildingSelected" buildingId="BrickHouse" />
    <Action type="SetSwitch" switch="Switch.RivalHouseSelected" />
    <Action type="WaitSpeechTextHidden" />

    <!--Просим кликнуть по кнопке КУПИТЬ.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingBuy" />
    <Action type="ShowArrow" point="215 540" rotation="225" untilSwitch="Switch.BrickHouseBought" />
    <Action type="ShowSpeechUntilSwitch" text="Script.03.BuyHouse2" character="Assistant" switch="Switch.BrickHouseBought" />
    <Action type="WaitBuildingBought" buildingId="BrickHouse" />
    <Action type="SetSwitch" switch="Switch.BrickHouseBought" />
    <Action type="WaitSpeechTextHidden" />

    <!--Просим улучшить его.-->
    <Action type="ShowSpeechUntilSwitch" text="Script.03.BuyHouse3" character="Assistant" mood="happy" switch="Switch.BrickHouseUpgraded" />
    <Action type="Wait" duration="0.5"/>
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingUpgrade" />
    <Action type="ShowArrow" point="215 540" rotation="225" untilSwitch="Switch.BrickHouseUpgraded" />
    <Action type="WaitBuildingUpgradeStarted" />
    <Action type="SetSwitch" switch="Switch.BrickHouseUpgraded" />
    <Action type="WaitBuildingUpgraded" />

    <!--Просим построить последнее бунгало.-->
    <Action type="ShowSpeechModal" text="Script.03.ConstructHouse" character="Assistant" mood="happy" pauseGame="false" />

    <!--Укажем стрелочкой на кнопку.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.HudPageHouses" />
    <Action type="ShowArrow" overHudItem="TabBtn1" untilSwitch="Switch.BungalowPicked" />
    <Action type="WaitStartPlaceBuilding" buildingKind="Bungalow" />
    <Action type="SetSwitch" switch="Switch.BungalowPicked" />
    <Action type="SetInputFilter" active="true" inputMask="InputMask.All" />

    <Action type="WaitGoalCompleted" goalId="Goal.Income" />
    <Action type="ShowArrow" overHudItem="Income" untilSwitch="Switch.ExplainIncome" />
    <Action type="ShowSpeechModal" text="Script.03.GoalDone" character="Assistant" mood="happy" posY="250" />
    <Action type="SetSwitch" switch="Switch.ExplainIncome" />
  </Script>

  <!--Если игрок решил первым апгрейдить БУНГАЛО1.-->
  <Script>
    <Action type="WaitBuildingSelected" buildingId="Bungalow1" />
    <Action type="Wait" untilSwitch="Switch.Pass1Enabled" />
    <Action type="ClearSwitch" switch="Switch.Pass2Enabled" />

    <Action type="SetSwitch" switch="Switch.FirstBungalowSelected" />
    <Action type="WaitSpeechTextHidden" />

    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingUpgrade" />
    <Action type="ShowArrow" point="375 380" rotation="225" untilSwitch="Switch.UpgradeStarted" />
    <Action type="ShowSpeechUntilSwitch" text="Script.03.UpgradeHouse2" character="Assistant" switch="Switch.UpgradeStarted" posY="590" />
    <Action type="WaitBuildingUpgradeStarted" />
    <Action type="SetSwitch" switch="Switch.UpgradeStarted" />
    <Action type="WaitSpeechTextHidden" />

    <!--Укажем на звездочку над домом.-->
    <Action type="WaitBuildingUpgraded" />
    <Action type="ShowArrow" point="305 358" rotation="225" untilSwitch="Switch.Branch1.TextHidden1" />
    <Action type="ShowSpeechModal" text="Script.03.UpgradeHouse3" character="Assistant" mood="happy" pauseGame="false" />
    <Action type="SetSwitch" switch="Switch.Branch1.TextHidden1" />

    <Action type="Wait" duration="1" />

    <!--Улучшаем второй дом.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingsOwned+InputMask.MapBuildingUpgrade"  mouse2="false" mouse3="false" />
    <Action type="ShowArrow" overBuildingId="Bungalow2" rotation="270" untilSwitch="Switch.OtherBungalowSelected" />
    <Action type="ShowSpeechUntilSwitch" text="Script.03.UpgradeHouse4" character="Assistant" switch="Switch.OtherBungalowUpgraded" posY="550" />
    <Action type="WaitBuildingSelected" buildingId="Bungalow2" />
    <Action type="SetSwitch" switch="Switch.OtherBungalowSelected" />
    <Action type="WaitBuildingUpgradeStarted" />
    <Action type="SetSwitch" switch="Switch.OtherBungalowUpgraded" />

    <Action type="WaitBuildingUpgraded" />
    <Action type="SetSwitch" switch="Switch.BothBungalowsUpgraded" />
  </Script>

  <!--Если игрок решил первым апгрейдить БУНГАЛО2.-->
  <Script>
    <Action type="WaitBuildingSelected" buildingId="Bungalow2" />
    <Action type="Wait" untilSwitch="Switch.Pass2Enabled" />
    <Action type="ClearSwitch" switch="Switch.Pass1Enabled" />

    <Action type="SetSwitch" switch="Switch.FirstBungalowSelected" />
    <Action type="WaitSpeechTextHidden" />

    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingUpgrade" />
    <Action type="ShowArrow" point="495 380" rotation="225" untilSwitch="Switch.UpgradeStarted" />
    <Action type="ShowSpeechUntilSwitch" text="Script.03.UpgradeHouse2" character="Assistant" switch="Switch.UpgradeStarted" posY="590" />
    <Action type="WaitBuildingUpgradeStarted" />
    <Action type="SetSwitch" switch="Switch.UpgradeStarted" />
    <Action type="WaitSpeechTextHidden" />

    <!--Укажем на звездочку над домом.-->
    <Action type="WaitBuildingUpgraded" />
    <Action type="ShowArrow" point="425 358" rotation="225" untilSwitch="Switch.Branch1.TextHidden1" />
    <Action type="ShowSpeechModal" text="Script.03.UpgradeHouse3" character="Assistant" mood="happy" pauseGame="false" />
    <Action type="SetSwitch" switch="Switch.Branch1.TextHidden1" />

    <Action type="Wait" duration="1" />

    <!--Улучшаем второй дом.-->
    <Action type="SetInputFilter" active="true" inputMask="InputMask.MapBuildingsOwned+InputMask.MapBuildingUpgrade"  mouse2="false" mouse3="false" />
    <Action type="ShowArrow" overBuildingId="Bungalow1" rotation="270" untilSwitch="Switch.OtherBungalowSelected" />
    <Action type="ShowSpeechUntilSwitch" text="Script.03.UpgradeHouse4" character="Assistant" switch="Switch.OtherBungalowUpgraded" posY="550" />
    <Action type="WaitBuildingSelected" buildingId="Bungalow1" />
    <Action type="SetSwitch" switch="Switch.OtherBungalowSelected" />
    <Action type="WaitBuildingUpgradeStarted" />
    <Action type="SetSwitch" switch="Switch.OtherBungalowUpgraded" />

    <Action type="WaitBuildingUpgraded" />
    <Action type="SetSwitch" switch="Switch.BothBungalowsUpgraded" />
  </Script>
</LevelScripts>