<?xml version="1.0" ?>
<enemy>
    <behaviour>
        <condition id="getBool">
            <string id="id">buttonoff</string>
            <string id="value" values="yesno">no</string>
            <action id="setButtonEnabled">
                <string id="Button" values="buttons">VikingMeleeUpgrade</string>
                <string id="Team" values="teams">ownTeam</string>
                <string id="Enabled" values="yesno">no</string>
            </action>
            <action id="setButtonEnabled">
                <string id="Button" values="buttons">VikingHealUpgrade</string>
                <string id="Team" values="teams">ownTeam</string>
                <string id="Enabled" values="yesno">no</string>
            </action>
            <action id="setBool">
                <string id="id">buttonoff</string>
                <string id="value" values="yesno">yes</string>
            </action>
        </condition>
        <condition id="getBool">
            <string id="id">heal</string>
            <string id="value" values="yesno">yes</string>
            <condition id="buttonEnabled">
                <string id="Button" values="buttons">VikingHeal</string>
                <string id="Team to check" values="teams">ownTeam</string>
                <string id="didUpgrade" values="yesno">yes</string>
                <sequence>
                    <string id="Is blocking">yes</string>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">yes</string>
                        <string id="Freeze input" values="yesno">yes</string>
                    </action>
                    <action id="showText">
                        <string id="Text identifier">lvl101d2_king castheal</string>
                        <float id="Duration">4.00</float>
                        <string id="Texture">portrait_chief</string>
                        <string id="Location" values="textLocation">left</string>
                    </action>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">no</string>
                        <string id="Freeze input" values="yesno">no</string>
                    </action>
                    <action id="setBool">
                        <string id="id">heal</string>
                        <string id="value" values="yesno">no</string>
                    </action>
                </sequence>
            </condition>
        </condition>
        <condition id="getBool">
            <string id="id">firstbeserker</string>
            <string id="value" values="yesno">no</string>
            <condition id="unitCount">
                <string id="unitType" values="enemies">VikingMelee</string>
                <string id="logic" values="unitcountlogic">lesser_equals</string>
                <string id="ownUnits" values="yesno">no</string>
                <int id="unitCount">7</int>
                <condition id="getBool">
                    <string id="id">heal</string>
                    <string id="value" values="yesno">no</string>
                    <sequence>
                        <string id="Is blocking">yes</string>
                        <action id="wait">
                            <string id="timeunit" values="timeunits">seconds</string>
                            <float id="time">5.00</float>
                        </action>
                        <action id="setFreezeGame">
                            <string id="Freeze game" values="yesno">yes</string>
                            <string id="Freeze input" values="yesno">yes</string>
                        </action>
                        <action id="showText">
                            <string id="Text identifier">lvl101d0_king spells</string>
                            <float id="Duration">10.00</float>
                            <string id="Texture">portrait_chief</string>
                            <string id="Location" values="textLocation">left</string>
                        </action>
                        <action id="showText">
                            <string id="Text identifier">lvl101d1_king heal</string>
                            <float id="Duration">10.00</float>
                            <string id="Texture">portrait_chief</string>
                            <string id="Location" values="textLocation">left</string>
                        </action>
                        <action id="setButtonEnabled">
                            <string id="Button" values="buttons">VikingHealUpgrade</string>
                            <string id="Team" values="teams">ownTeam</string>
                            <string id="Enabled" values="yesno">yes</string>
                        </action>
                        <action id="setButtonHighlighted">
                            <string id="Button" values="buttons">VikingMelee</string>
                            <string id="Team" values="teams">ownTeam</string>
                            <string id="Highlighted" values="yesno">no</string>
                        </action>
                        <action id="setButtonHighlighted">
                            <string id="Button" values="buttons">VikingHealUpgrade</string>
                            <string id="Team" values="teams">ownTeam</string>
                            <string id="Highlighted" values="yesno">yes</string>
                        </action>
                        <action id="setFreezeGame">
                            <string id="Freeze game" values="yesno">no</string>
                            <string id="Freeze input" values="yesno">no</string>
                        </action>
                        <action id="setBool">
                            <string id="id">heal</string>
                            <string id="value" values="yesno">yes</string>
                        </action>
                        <action id="setBool">
                            <string id="id">firstbeserker</string>
                            <string id="value" values="yesno">yes</string>
                        </action>
                    </sequence>
                </condition>
            </condition>
        </condition>
        <condition id="getBool">
            <string id="id">worker1</string>
            <string id="value" values="yesno">no</string>
            <condition id="unitCount">
                <string id="unitType" values="enemies">VikingWorker</string>
                <string id="logic" values="unitcountlogic">equals</string>
                <string id="ownUnits" values="yesno">yes</string>
                <int id="unitCount">1</int>
                <sequence>
                    <string id="Is blocking">yes</string>
                    <action id="wait">
                        <string id="timeunit" values="timeunits">seconds</string>
                        <float id="time">0.30</float>
                    </action>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">yes</string>
                        <string id="Freeze input" values="yesno">yes</string>
                    </action>
                    <action id="showText">
                        <string id="Text identifier">lvl101a9_king niceminer</string>
                        <float id="Duration">7.00</float>
                        <string id="Texture">portrait_chief</string>
                        <string id="Location" values="textLocation">left</string>
                    </action>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">no</string>
                        <string id="Freeze input" values="yesno">no</string>
                    </action>
                    <action id="setBool">
                        <string id="id">worker1</string>
                        <string id="value" values="yesno">yes</string>
                    </action>
                </sequence>
            </condition>
        </condition>
        <condition id="getBool">
            <string id="id">texta</string>
            <string id="value" values="yesno">no</string>
            <condition id="timePassed">
                <string id="timeunit" values="timeunits">seconds</string>
                <float id="time">0.10</float>
                <sequence>
                    <string id="Is blocking">yes</string>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">yes</string>
                        <string id="Freeze input" values="yesno">yes</string>
                    </action>
                    <action id="moveCamera">
                        <float id="Target position">-30.00</float>
                        <float id="Scrolling duration">1.00</float>
                    </action>
                    <action id="showText">
                        <string id="Text identifier">lvl101a6_king find</string>
                        <float id="Duration">5.00</float>
                        <string id="Texture">portrait_chief</string>
                        <string id="Location" values="textLocation">left</string>
                    </action>
                    <action id="showText">
                        <string id="Text identifier">lvl101a7_soldier nogold</string>
                        <float id="Duration">3.00</float>
                        <string id="Texture">portrait_berserker</string>
                        <string id="Location" values="textLocation">right</string>
                    </action>
                    <action id="showText">
                        <string id="Text identifier">lvl101a8_king miners</string>
                        <float id="Duration">4.00</float>
                        <string id="Texture">portrait_chief</string>
                        <string id="Location" values="textLocation">left</string>
                    </action>
                    <action id="showMission">
                        <string id="Text identifier">lvl101obj</string>
                    </action>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">no</string>
                        <string id="Freeze input" values="yesno">no</string>
                    </action>
                    <action id="setBool">
                        <string id="id">texta</string>
                        <string id="value" values="yesno">yes</string>
                    </action>
                </sequence>
                <action id="setBool">
                    <string id="id">workerrepeat</string>
                    <string id="value" values="yesno">yes</string>
                </action>
            </condition>
        </condition>
        <condition id="unitCount">
            <string id="unitType" values="enemies">VikingMelee</string>
            <string id="logic" values="unitcountlogic">greater_equals</string>
            <string id="ownUnits" values="yesno">yes</string>
            <int id="unitCount">1</int>
            <condition id="getBool">
                <string id="id">donebeserkers</string>
                <string id="value" values="yesno">no</string>
                <sequence>
                    <string id="Is blocking">yes</string>
                    <action id="moveCamera">
                        <float id="Target position">-30.00</float>
                        <float id="Scrolling duration">3.00</float>
                    </action>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">no</string>
                        <string id="Freeze input" values="yesno">yes</string>
                    </action>
                    <action id="moveCamera">
                        <float id="Target position">-10.00</float>
                        <float id="Scrolling duration">5.00</float>
                    </action>
                    <action id="showText">
                        <string id="Text identifier">lvl101b2_king beserkersbuild</string>
                        <float id="Duration">6.00</float>
                        <string id="Texture">portrait_chief</string>
                        <string id="Location" values="textLocation">left</string>
                    </action>
                    <action id="wait">
                        <string id="timeunit" values="timeunits">seconds</string>
                        <float id="time">5.00</float>
                    </action>
                    <action id="showText">
                        <string id="Text identifier">lvl101b3_king beserkerdead</string>
                        <float id="Duration">6.00</float>
                        <string id="Texture">portrait_chief</string>
                        <string id="Location" values="textLocation">left</string>
                    </action>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">no</string>
                        <string id="Freeze input" values="yesno">no</string>
                    </action>
                    <action id="setBool">
                        <string id="id">donebeserkers</string>
                        <string id="value" values="yesno">yes</string>
                    </action>
                </sequence>
                <action id="setBool">
                    <string id="id">beserkersdone</string>
                    <string id="value" values="yesno">yes</string>
                </action>
            </condition>
            <action id="setBool">
                <string id="id">workerrepeat</string>
                <string id="value" values="yesno">no</string>
            </action>
        </condition>
        <condition id="getBool">
            <string id="id">beserkersrepeat</string>
            <string id="value" values="yesno">yes</string>
            <condition id="getBool">
                <string id="id">beserkersdone</string>
                <string id="value" values="yesno">no</string>
                <condition id="timer">
                    <string id="timeunit" values="timeunits">seconds</string>
                    <float id="time">25.00</float>
                    <sequence>
                        <string id="Is blocking">yes</string>
                        <action id="setFreezeGame">
                            <string id="Freeze game" values="yesno">yes</string>
                            <string id="Freeze input" values="yesno">yes</string>
                        </action>
                        <action id="showText">
                            <string id="Text identifier">lvl101b1_king berserkers</string>
                            <float id="Duration">10.00</float>
                            <string id="Texture">portrait_chief</string>
                            <string id="Location" values="textLocation">left</string>
                        </action>
                        <action id="setFreezeGame">
                            <string id="Freeze game" values="yesno">no</string>
                            <string id="Freeze input" values="yesno">no</string>
                        </action>
                    </sequence>
                </condition>
                <condition id="goldAmount">
                    <string id="ownGoldAmount" values="yesno">yes</string>
                    <string id="logic" values="unitcountlogic">lesser</string>
                    <int id="amount">55</int>
                    <action id="setButtonHighlighted">
                        <string id="Button" values="buttons">VikingMelee</string>
                        <string id="Team" values="teams">ownTeam</string>
                        <string id="Highlighted" values="yesno">no</string>
                    </action>
                </condition>
                <condition id="goldAmount">
                    <string id="ownGoldAmount" values="yesno">yes</string>
                    <string id="logic" values="unitcountlogic">greater_equals</string>
                    <int id="amount">55</int>
                    <action id="setButtonHighlighted">
                        <string id="Button" values="buttons">VikingMelee</string>
                        <string id="Team" values="teams">ownTeam</string>
                        <string id="Highlighted" values="yesno">yes</string>
                    </action>
                </condition>
                <action id="setButtonHighlighted">
                    <string id="Button" values="buttons">VikingMeleeUpgrade</string>
                    <string id="Team" values="teams">ownTeam</string>
                    <string id="Highlighted" values="yesno">yes</string>
                </action>
            </condition>
        </condition>
        <condition id="unitCount">
            <string id="unitType" values="enemies">VikingWorker</string>
            <string id="logic" values="unitcountlogic">greater</string>
            <string id="ownUnits" values="yesno">yes</string>
            <int id="unitCount">2</int>
            <condition id="getBool">
                <string id="id">buildbeserkers</string>
                <string id="value" values="yesno">no</string>
                <sequence>
                    <string id="Is blocking">yes</string>
                    <action id="setButtonHighlighted">
                        <string id="Button" values="buttons">VikingWorker</string>
                        <string id="Team" values="teams">ownTeam</string>
                        <string id="Highlighted" values="yesno">no</string>
                    </action>
                    <action id="setBool">
                        <string id="id">workerrepeat</string>
                        <string id="value" values="yesno">no</string>
                    </action>
                    <action id="moveCamera">
                        <float id="Target position">-30.00</float>
                        <float id="Scrolling duration">3.00</float>
                    </action>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">yes</string>
                        <string id="Freeze input" values="yesno">yes</string>
                    </action>
                    <action id="showText">
                        <string id="Text identifier">lvl101a0_king enoughminers</string>
                        <float id="Duration">10.00</float>
                        <string id="Texture">portrait_chief</string>
                        <string id="Location" values="textLocation">left</string>
                    </action>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">no</string>
                        <string id="Freeze input" values="yesno">no</string>
                    </action>
                    <action id="setBool">
                        <string id="id">beserkersrepeat</string>
                        <string id="value" values="yesno">yes</string>
                    </action>
                    <action id="setBool">
                        <string id="id">buildbeserkers</string>
                        <string id="value" values="yesno">yes</string>
                    </action>
                    <action id="setButtonEnabled">
                        <string id="Button" values="buttons">VikingMeleeUpgrade</string>
                        <string id="Team" values="teams">ownTeam</string>
                        <string id="Enabled" values="yesno">yes</string>
                    </action>
                </sequence>
            </condition>
        </condition>
        <condition id="getBool">
            <string id="id">workerrepeat</string>
            <string id="value" values="yesno">yes</string>
            <condition id="unitCount">
                <string id="unitType" values="enemies">VikingWorker</string>
                <string id="logic" values="unitcountlogic">lesser</string>
                <string id="ownUnits" values="yesno">yes</string>
                <int id="unitCount">3</int>
                <condition id="timer">
                    <string id="timeunit" values="timeunits">seconds</string>
                    <float id="time">40.00</float>
                    <sequence>
                        <string id="Is blocking">yes</string>
                        <action id="setFreezeGame">
                            <string id="Freeze game" values="yesno">yes</string>
                            <string id="Freeze input" values="yesno">yes</string>
                        </action>
                        <action id="showText">
                            <string id="Text identifier">lvl101a8_king miners</string>
                            <float id="Duration">6.00</float>
                            <string id="Texture">portrait_chief</string>
                            <string id="Location" values="textLocation">left</string>
                        </action>
                        <action id="setFreezeGame">
                            <string id="Freeze game" values="yesno">no</string>
                            <string id="Freeze input" values="yesno">no</string>
                        </action>
                    </sequence>
                </condition>
                <condition id="goldAmount">
                    <string id="ownGoldAmount" values="yesno">yes</string>
                    <string id="logic" values="unitcountlogic">lesser</string>
                    <int id="amount">50</int>
                    <action id="setButtonHighlighted">
                        <string id="Button" values="buttons">VikingWorker</string>
                        <string id="Team" values="teams">ownTeam</string>
                        <string id="Highlighted" values="yesno">no</string>
                    </action>
                </condition>
                <condition id="goldAmount">
                    <string id="ownGoldAmount" values="yesno">yes</string>
                    <string id="logic" values="unitcountlogic">greater_equals</string>
                    <int id="amount">50</int>
                    <action id="setButtonHighlighted">
                        <string id="Button" values="buttons">VikingWorker</string>
                        <string id="Team" values="teams">ownTeam</string>
                        <string id="Highlighted" values="yesno">yes</string>
                    </action>
                </condition>
            </condition>
        </condition>
        <condition id="timer">
            <string id="timeunit" values="timeunits">seconds</string>
            <float id="time">60.00</float>
            <condition id="goldAmount">
                <string id="ownGoldAmount" values="yesno">yes</string>
                <string id="logic" values="unitcountlogic">greater</string>
                <int id="amount">500</int>
                <sequence>
                    <string id="Is blocking">yes</string>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">yes</string>
                        <string id="Freeze input" values="yesno">yes</string>
                    </action>
                    <action id="showText">
                        <string id="Text identifier">lvl101e1_king spendgold</string>
                        <float id="Duration">4.00</float>
                        <string id="Texture">portrait_chief</string>
                        <string id="Location" values="textLocation">left</string>
                    </action>
                    <action id="setFreezeGame">
                        <string id="Freeze game" values="yesno">no</string>
                        <string id="Freeze input" values="yesno">no</string>
                    </action>
                </sequence>
            </condition>
        </condition>
    </behaviour>
</enemy>
