{
  IF ( INT_GAME_TURN == 0 )
  {
    DO SET_REINCARNATION                       OFF
    DO SET_NO_BLUE_REINC
    SET $0                                     0
    DO SET_DRUM_TOWER_POS                      90 44
    DO SET_ATTACK_VARIABLE                     $0
    DO STATE_CONSTRUCT_BUILDING                ON
    DO STATE_FETCH_WOOD                        ON
    SET INT_ATTR_ATTACK_PERCENTAGE             150
    SET INT_ATTR_PREF_SPY_TRAINS               0
    SET INT_ATTR_PREF_RELIGIOUS_TRAINS         0
    SET INT_ATTR_PREF_WARRIOR_TRAINS           0
    SET INT_ATTR_PREF_FIREWARRIOR_TRAINS       0
    SET INT_ATTR_PREF_BOAT_HUTS                0
    SET INT_ATTR_PREF_BALLOON_HUTS             0
    SET INT_ATTR_MAX_BUILDINGS_ON_GO           1
    SET INT_ATTR_HOUSE_PERCENTAGE              0
    DO STATE_SHAMAN_GET_WILDS                  ON
    SET INT_ATTR_EXPANSION                     30
    DO STATE_HOUSE_A_PERSON                    ON
    DO STATE_STATE_BRING_NEW_PEOPLE_BACK       ON
    DO STATE_POPULATE_DRUM_TOWER               ON
    DO STATE_DEFEND                            ON
    DO STATE_FIREWARRIOR_DEFEND                ON
    DO STATE_DEFEND_BASE                       ON
    SET INT_ATTR_DEFENSE_RAD_INCR              2
    SET INT_ATTR_MAX_DEFENSIVE_ACTIONS         2
    SET INT_ATTR_USE_PREACHER_FOR_DEFENCE      1
    DO STATE_PREACH                            ON
    SET INT_ATTR_SHAMEN_BLAST                  0
    DO STATE_SPELL_DEFENCE                     92 46 ON
    SET INT_ATTR_SPY_CHECK_FREQUENCY           128
    SET INT_ATTR_SPY_DISCOVER_CHANCE           50
    SET INT_ATTR_ENEMY_SPY_MAX_STAND           128
    SET INT_ATTR_RETREAT_VALUE                 20
    SET INT_ATTR_RANDOM_BUILD_SIDE             0
    DO STATE_BUILD_VEHICLE                     ON
    DO STATE_FETCH_LOST_PEOPLE                 ON
    DO STATE_FETCH_LOST_VEHICLE                OFF
    DO STATE_FETCH_FAR_VEHICLE                 ON
    SET INT_ATTR_PEOPLE_PER_BOAT               15
    SET INT_ATTR_PREF_BOAT_DRIVERS             1
    DO STATE_TRAIN_PEOPLE                      ON
    SET INT_ATTR_PREF_SPY_PEOPLE               0
    SET INT_ATTR_PREF_RELIGIOUS_PEOPLE         30
    SET INT_ATTR_PREF_WARRIOR_PEOPLE           0
    SET INT_ATTR_PREF_FIREWARRIOR_PEOPLE       30
    DO SET_MARKER_ENTRY                        1 2 -1 0 0 0 1
    DO SET_MARKER_ENTRY                        2 3 -1 0 0 0 1
    DO SET_MARKER_ENTRY                        3 4 -1 0 0 0 1
    DO SET_MARKER_ENTRY                        4 5 -1 0 0 0 1
    DO SET_MARKER_ENTRY                        5 6 -1 0 0 0 1
    SET INT_ATTR_MAX_TRAIN_AT_ONCE             3
    SET INT_ATTR_GROUP_OPTION                  2
    DO STATE_AUTO_ATTACK                       ON
    SET INT_ATTR_COUNT_PREACH_DAMAGE           1
    SET INT_ATTR_MAX_ATTACKS                   3
    SET INT_ATTR_AWAY_BRAVE                    0
    SET INT_ATTR_AWAY_WARRIOR                  0
    SET INT_ATTR_AWAY_RELIGIOUS                100
    SET INT_ATTR_AWAY_SPY                      0
    SET INT_ATTR_AWAY_FIREWARRIOR              100
    SET INT_ATTR_AWAY_SHAMAN                   100
    SET INT_ATTR_BASE_UNDER_ATTACK_RETREAT     1
    SET $1                                     0
    SET $2                                     0
    SET $3                                     0
    SET $4                                     0
    SET $5                                     0
    SET $6                                     0
    SET $7                                     1
    SET $8                                     1
    SET $9                                     1
    SET $10                                    0
    SET $11                                    0
    SET $12                                    0
    SET $13                                    0
    SET $14                                    0
    SET $15                                    1
    SET $16                                    0
    SET $17                                    0
    SET $18                                    0
    SET $19                                    0
    SET $20                                    0
    SET $21                                    0
    SET $22                                    0
    SET $23                                    15
    SET $24                                    0
    SET $25                                    0
    SET $26                                    1
    DO GIVE_MANA_TO_PLAYER RED 100000
    DO SET_TIMER_GOING                         900
    DO CREATE_MSG_NARRATIVE                    171
    DO SET_MSG_AUTO_OPEN_DLG
  }
  ELSE
  {
    EVERY 64 4
    {
      IF ( INT_MY_NUM_PEOPLE < 8 && INT_MY_NUM_KILLED_BY_HUMAN > 10 )
      {
        IF ( $10 < 2 )
        {
          DO GIVE_UP_AND_SULK                     ON
        }
        ENDIF
      }
      ENDIF
      SET $19                                   INT_R_PERSON_SHAMAN
      INCREMENT $19 INT_Y_PERSON_SHAMAN
      INCREMENT $19 INT_G_PERSON_SHAMAN
      IF ( $20 == 0 && $19 == 2 )
      {
        DO CREATE_MSG_INFORMATION                172
        DO SET_MSG_AUTO_OPEN_DLG
        DO SET_MSG_DELETE_ON_OK
        SET $20                                  1
      }
      ENDIF
    }
    EVERY 8
    {
      IF ( $18 == 0 )
      {
        DO FLYBY_CREATE_NEW
        DO FLYBY_ALLOW_INTERRUPT                 ON
        DO FLYBY_SET_EVENT_POS                   242 48 1 15
        DO FLYBY_SET_EVENT_POS                   8 38 16 40
        DO FLYBY_SET_EVENT_POS                   92 46 70 50
        DO FLYBY_SET_EVENT_POS                   32 22 140 40
        DO FLYBY_SET_EVENT_POS                   238 8 200 40
        DO FLYBY_SET_EVENT_POS                   240 174 270 60
        DO FLYBY_SET_EVENT_POS                   224 172 350 30
        DO FLYBY_SET_EVENT_POS                   118 14 400 50
        DO FLYBY_SET_EVENT_POS                   130 204 475 45
        DO FLYBY_SET_EVENT_POS                   224 72 550 50
        DO FLYBY_SET_EVENT_POS                   242 48 625 25
        DO FLYBY_SET_EVENT_ANGLE                 750 1 15
        DO FLYBY_SET_EVENT_ANGLE                 800 16 64
        DO FLYBY_SET_EVENT_ANGLE                 1530 81 49
        DO FLYBY_SET_EVENT_ANGLE                 1762 131 59
        DO FLYBY_SET_EVENT_ANGLE                 840 191 64
        DO FLYBY_SET_EVENT_ANGLE                 1983 256 84
        DO FLYBY_SET_EVENT_ANGLE                 270 341 49
        DO FLYBY_SET_EVENT_ANGLE                 1063 391 69
        DO FLYBY_SET_EVENT_ANGLE                 1965 461 74
        DO FLYBY_SET_EVENT_ANGLE                 269 536 74
        DO FLYBY_SET_EVENT_ANGLE                 750 611 39
        DO FLYBY_SET_EVENT_ZOOM                  -20 1 100
        DO FLYBY_SET_EVENT_ZOOM                  0 130 80
        DO FLYBY_SET_EVENT_ZOOM                  -40 250 80
        DO FLYBY_SET_EVENT_ZOOM                  -20 350 80
        DO FLYBY_SET_EVENT_ZOOM                  0 450 80
        DO FLYBY_SET_EVENT_ZOOM                  -50 550 50
        DO FLYBY_SET_EVENT_ZOOM                  0 600 50
        DO FLYBY_SET_END_TARGET                  242 48 750 0
        DO FLYBY_START
        SET $18                                  1
      }
      ENDIF
    }
    EVERY 256 133
    {
      IF ( INT_MY_NUM_PEOPLE < 73 )
      {
        DO SET_BUCKET_USAGE                      ON
        DO SET_BUCKET_COUNT_FOR_SPELL INT_BLAST                 8
        DO SET_BUCKET_COUNT_FOR_SPELL INT_CONVERT               8
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SWARM                 32
        DO SET_BUCKET_COUNT_FOR_SPELL INT_INVISIBILITY          40
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SHIELD                48
        DO SET_BUCKET_COUNT_FOR_SPELL INT_LAND_BRIDGE           66
        DO SET_BUCKET_COUNT_FOR_SPELL INT_LIGHTNING             64
        DO SET_BUCKET_COUNT_FOR_SPELL INT_HYPNOTISM             70
        DO SET_BUCKET_COUNT_FOR_SPELL INT_TORNADO               72
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SWAMP                 80
        DO SET_BUCKET_COUNT_FOR_SPELL INT_FLATTEN               100
        DO SET_BUCKET_COUNT_FOR_SPELL INT_EARTHQUAKE            140
        DO SET_BUCKET_COUNT_FOR_SPELL INT_EROSION               168
        DO SET_BUCKET_COUNT_FOR_SPELL INT_FIRESTORM             320
        DO SET_BUCKET_COUNT_FOR_SPELL INT_ANGEL_OF_DEATH        408
        DO SET_BUCKET_COUNT_FOR_SPELL INT_VOLCANO               640
      }
      ELSE
      {
        DO SET_BUCKET_USAGE                      ON
        DO SET_BUCKET_COUNT_FOR_SPELL INT_BLAST                 4
        DO SET_BUCKET_COUNT_FOR_SPELL INT_CONVERT               4
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SWARM                 16
        DO SET_BUCKET_COUNT_FOR_SPELL INT_INVISIBILITY          20
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SHIELD                24
        DO SET_BUCKET_COUNT_FOR_SPELL INT_LAND_BRIDGE           33
        DO SET_BUCKET_COUNT_FOR_SPELL INT_LIGHTNING             32
        DO SET_BUCKET_COUNT_FOR_SPELL INT_HYPNOTISM             35
        DO SET_BUCKET_COUNT_FOR_SPELL INT_TORNADO               36
        DO SET_BUCKET_COUNT_FOR_SPELL INT_SWAMP                 40
        DO SET_BUCKET_COUNT_FOR_SPELL INT_FLATTEN               50
        DO SET_BUCKET_COUNT_FOR_SPELL INT_EARTHQUAKE            70
        DO SET_BUCKET_COUNT_FOR_SPELL INT_EROSION               84
        DO SET_BUCKET_COUNT_FOR_SPELL INT_FIRESTORM             180
        DO SET_BUCKET_COUNT_FOR_SPELL INT_ANGEL_OF_DEATH        204
        DO SET_BUCKET_COUNT_FOR_SPELL INT_VOLCANO               320
      }
      ENDIF
    }
    EVERY 64
    {
      SET $10                                   INT_M_BUILDING_SMALL_HUT
      INCREMENT $10 INT_M_BUILDING_MEDIUM_HUT
      INCREMENT $10 INT_M_BUILDING_LARGE_HUT
      SET $11                                   $10
      INCREMENT $11 INT_M_BUILDING_SMALL_HUT
      INCREMENT $11 INT_M_BUILDING_SMALL_HUT
      INCREMENT $11 INT_M_BUILDING_MEDIUM_HUT
      INCREMENT $11 INT_M_BUILDING_MEDIUM_HUT
      INCREMENT $11 INT_M_BUILDING_MEDIUM_HUT
      INCREMENT $11 INT_M_BUILDING_MEDIUM_HUT
      INCREMENT $11 INT_M_BUILDING_LARGE_HUT
      INCREMENT $11 INT_M_BUILDING_LARGE_HUT
      INCREMENT $11 INT_M_BUILDING_LARGE_HUT
      INCREMENT $11 INT_M_BUILDING_LARGE_HUT
      INCREMENT $11 INT_M_BUILDING_LARGE_HUT
      INCREMENT $11 INT_M_BUILDING_LARGE_HUT
      IF ( INT_MY_NUM_PEOPLE > 29 )
      {
        DO STATE_SHAMAN_GET_WILDS                OFF
      }
      ELSE
      {
        IF ( INT_MY_NUM_PEOPLE < 20 )
        {
          DO STATE_SHAMAN_GET_WILDS               ON
        }
        ENDIF
      }
      ENDIF
      IF ( INT_ATTR_EXPANSION < 40 )
      {
        INCREMENT INT_ATTR_EXPANSION 1
      }
      ENDIF
    }
    EVERY 256 8
    {
      DO PUT_PERSON_IN_DT INT_FIREWARRIOR 42 38
      DO PUT_PERSON_IN_DT INT_FIREWARRIOR 44 52
      DO PUT_PERSON_IN_DT INT_FIREWARRIOR 60 66
      DO PUT_PERSON_IN_DT INT_FIREWARRIOR 66 26
    }
    EVERY 256 16
    {
      IF ( INT_M_PERSON_RELIGIOUS > 1 )
      {
        DO MARKER_ENTRIES                        1 2 3 4
      }
      ENDIF
      IF ( INT_M_PERSON_RELIGIOUS > 4 )
      {
        DO MARKER_ENTRIES                        5 -1 -1 -1
      }
      ENDIF
    }
    EVERY 16
    {
      IF ( $16 == 0 )
      {
        DO HAS_TIMER_REACHED_ZERO                $17
        IF ( $17 == 1 )
        {
          DO TRIGGER_LEVEL_LOST
          SET $16                                 1
        }
        ENDIF
        IF ( INT_R_PERSON_SHAMAN == 0 && INT_Y_PERSON_SHAMAN == 0 )
        {
          IF ( INT_G_PERSON_SHAMAN == 0 && INT_B_PERSON_SHAMAN > 0 )
          {
            DO TRIGGER_LEVEL_WON
            SET $16                                1
          }
          ENDIF
        }
        ENDIF
        SET $21                                  INT_R_PERSON_SHAMAN
        INCREMENT $21 INT_Y_PERSON_SHAMAN
        INCREMENT $21 INT_G_PERSON_SHAMAN
        IF ( INT_B_PERSON_SHAMAN == 0 && $21 > 0 )
        {
          DO TRIGGER_LEVEL_LOST
          SET $16                                 1
        }
        ENDIF
      }
      ENDIF
    }
  }
  ENDIF
}
SCRIPT_END
