using System.Collections.Generic;
using Cute;

public class AreaBGInfoSection20
{

	public static List<ChapterExtraData> GetChapterExtraDatas()
	{
		List<ChapterExtraData> list = new List<ChapterExtraData>();
		list.AddRange(Chapter1_2());
		list.AddRange(Chapter3_9());
		list.AddRange(OtherWorldChapters(10, 17, 12, new List<int> { 1, 2, 6, 7 }, addTreeEffect: true));
		list.AddRange(OtherWorldChapters(18, 25, 10, new List<int> { 1, 2 }, addTreeEffect: true));
		list.AddRange(OtherWorldChapters(26, 33, 9, new List<int> { 2, 3, 4, 7, 8, 9 }, addTreeEffect: true));
		list.AddRange(OtherWorldChapters(34, 40, 20, null, addTreeEffect: false));
		return list;
	}

	private static List<ChapterExtraData> OtherWorldChapters(int start, int end, int section, List<int> extraTextureIndex, bool addTreeEffect)
	{
		List<ChapterExtraData> list = new List<ChapterExtraData>();
		for (int i = start; i <= end; i++)
		{
			ChapterExtraData chapterExtraData = new ChapterExtraData
			{
				SectionId = 20,
				ExtraTextureChapter = i,
				BGSectionId = section
			};
			chapterExtraData.AddTreeEffect = addTreeEffect;
			if (i == 17 || i == 25 || i == 33)
			{
				chapterExtraData.BGExtraEffectPath = "scn_map_change_9";
				chapterExtraData.SeType = 0;
			}
			if (extraTextureIndex.IsNotNullOrEmpty())
			{
				chapterExtraData.ExtraTextureIndex = extraTextureIndex;
				chapterExtraData.BGSuffix = "b";
			}
			list.Add(chapterExtraData);
		}
		return list;
	}

	private static List<ChapterExtraData> Chapter1_2()
	{
		return new List<ChapterExtraData>
		{
			new ChapterExtraData
			{
				SectionId = 20,
				ExtraTextureChapter = 1,
				BGExtraEffectPath = "scn_map_change_9",
				SeType = 0
			},
			new ChapterExtraData
			{
				SectionId = 20,
				ExtraTextureChapter = 2,
				BGExtraEffectPath = "scn_map_change_8",
				AttachExtraEffectToBgRoot = true,
				SeType = 0
			}
		};
	}

	private static List<ChapterExtraData> Chapter3_9()
	{
		List<ChapterExtraData> list = new List<ChapterExtraData>();
		for (int i = 3; i <= 9; i++)
		{
			ChapterExtraData chapterExtraData = new ChapterExtraData
			{
				SectionId = 20,
				ExtraTextureChapter = i,
				ExtraTextureIndex = { 1, 2, 6 },
				BGSectionId = 2,
				BGSuffix = "b"
			};
			if (i == 9)
			{
				chapterExtraData.BGExtraEffectPath = "scn_map_change_9";
				chapterExtraData.SeType = 0;
			}
			list.Add(chapterExtraData);
		}
		return list;
	}

	public static bool IsSpeedUpParticleTransition(int previousChapter, int nextChapter)
	{
		bool flag = previousChapter == 33 && nextChapter == 32;
		return previousChapter == 0 || flag;
	}
}
