using System.Collections.Generic;
using Cute;

public class AreaBGInfoSection20
{
	public const int SECTION_ID = 20;

	public const int WERUSA_START = 10;

	private const int WERUSA_END = 17;

	private const int WERUSA_BG_SECTION_ID = 12;

	private const int LEVIRU_START = 18;

	private const int LEVIRU_END = 25;

	private const int LEVIRU_BG_SECTION_ID = 10;

	private const int IZUNIA_CHANGE_TEXTURE_START = 3;

	private const int IZUNIA_END = 9;

	private const int IZUNIA_BG_SECTION_ID = 2;

	public const int NATERA_START = 26;

	private const int NATERA_END = 33;

	private const int NATERA_BG_SECTION_ID = 9;

	private const int LAST_BATTLE_START = 34;

	private const int LAST_BATTLE_END = 40;

	private const int LAST_BATTLE_BG_SECTION_ID = 20;

	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 = Se.TYPE.SE_MAP_SECTION9_CHANGE_CHAPTER;
			}
			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 = Se.TYPE.SE_MAP_SECTION20_CHANGE_CHAPTER1
			},
			new ChapterExtraData
			{
				SectionId = 20,
				ExtraTextureChapter = 2,
				BGExtraEffectPath = "scn_map_change_8",
				AttachExtraEffectToBgRoot = true,
				SeType = Se.TYPE.SE_MAP_TREE_EFFECT
			}
		};
	}

	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 = Se.TYPE.SE_MAP_SECTION9_CHANGE_CHAPTER;
			}
			list.Add(chapterExtraData);
		}
		return list;
	}

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