// Token: 0x06003793 RID: 14227 public static void Initialize() { RandomizerSyncManager.Countdown = 60 * RandomizerSyncManager.PERIOD; RandomizerSyncManager.webClient = new WebClient(); RandomizerSyncManager.webClient.DownloadStringCompleted += RandomizerSyncManager.RetryOnFail; RandomizerSyncManager.getClient = new WebClient(); RandomizerSyncManager.getClient.DownloadStringCompleted += RandomizerSyncManager.CheckPickups; RandomizerSyncManager.SendingUri = null; if (RandomizerSyncManager.UnsavedPickups == null) { RandomizerSyncManager.UnsavedPickups = new List<RandomizerSyncManager.Pickup>(); } if (RandomizerSyncManager.UriQueue == null) { RandomizerSyncManager.UriQueue = new Queue<Uri>(); } RandomizerSyncManager.flags = new Dictionary<string, bool>(); RandomizerSyncManager.flags.Add("seedSent", false); RandomizerSyncManager.LoseOnDeath = new HashSet<string>(); RandomizerSyncManager.SkillInfos = new List<RandomizerSyncManager.SkillInfoLine>(); RandomizerSyncManager.EventInfos = new List<RandomizerSyncManager.EventInfoLine>(); RandomizerSyncManager.UpgradeInfos = new List<RandomizerSyncManager.UpgradeInfoLine>(); RandomizerSyncManager.TeleportInfos = new List<RandomizerSyncManager.TeleportInfoLine>(); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Grove", 0)); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Swamp", 1)); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Grotto", 2)); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Valley", 3)); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Forlorn", 4)); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Sorrow", 5)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(0, 0, AbilityType.Bash)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(2, 1, AbilityType.ChargeFlame)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(3, 2, AbilityType.WallJump)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(4, 3, AbilityType.Stomp)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(5, 4, AbilityType.DoubleJump)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(8, 5, AbilityType.ChargeJump)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(12, 6, AbilityType.Climb)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(14, 7, AbilityType.Glide)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(50, 8, AbilityType.Dash)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(51, 9, AbilityType.Grenade)); RandomizerSyncManager.EventInfos.Add(new RandomizerSyncManager.EventInfoLine(0, 0, () => Keys.GinsoTree)); RandomizerSyncManager.EventInfos.Add(new RandomizerSyncManager.EventInfoLine(1, 1, () => Sein.World.Events.WaterPurified)); RandomizerSyncManager.EventInfos.Add(new RandomizerSyncManager.EventInfoLine(2, 2, () => Keys.ForlornRuins)); RandomizerSyncManager.EventInfos.Add(new RandomizerSyncManager.EventInfoLine(3, 3, () => Sein.World.Events.WindRestored)); RandomizerSyncManager.EventInfos.Add(new RandomizerSyncManager.EventInfoLine(4, 4, () => Keys.MountHoru)); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(17, 0, true, () => RandomizerBonus.WaterVeinShards())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(19, 1, true, () => RandomizerBonus.GumonSealShards())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(21, 2, true, () => RandomizerBonus.SunstoneShards())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(6, 3, true, () => RandomizerBonus.SpiritFlameLevel())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(13, 4, true, () => RandomizerBonus.HealthRegeneration())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(15, 5, true, () => RandomizerBonus.EnergyRegeneration())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(8, 12, false, delegate { if (!RandomizerBonus.ExplosionPower()) { return 0; } return 1; })); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(9, 13, false, delegate { if (!RandomizerBonus.ExpEfficiency()) { return 0; } return 1; })); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(10, 14, false, delegate { if (!RandomizerBonus.DoubleAirDash()) { return 0; } return 1; })); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(11, 15, false, delegate { if (!RandomizerBonus.ChargeDashEfficiency()) { return 0; } return 1; })); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(12, 16, false, delegate { if (!RandomizerBonus.DoubleJumpUpgrade()) { return 0; } return 1; })); }
public static void UpgradeID(int ID) { switch (ID) { case 0: Characters.Sein.Mortality.Health.SetAmount((float)(Characters.Sein.Mortality.Health.MaxHealth + 20)); Randomizer.showHint("Mega Health"); break; case 1: Characters.Sein.Energy.SetCurrent(Characters.Sein.Energy.Max + 5f); Randomizer.showHint("Mega Energy"); break; case 6: Randomizer.showHint("Spirit Flame Upgrade"); if (RandomizerBonus.SpiritFlameLevel() < 3) { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; } break; case 8: Randomizer.showHint("Explosion Power Upgrade"); if (!RandomizerBonus.ExplosionPower()) { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; } break; case 9: Randomizer.showHint("Spirit Light Efficiency"); if (!RandomizerBonus.ExpEfficiency()) { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; } break; case 10: Randomizer.showHint("Extra Air Dash"); if (!RandomizerBonus.DoubleAirDash()) { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; } break; case 11: Randomizer.showHint("Charge Dash Efficiency"); if (!RandomizerBonus.ChargeDashEfficiency()) { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; } break; case 12: Randomizer.showHint("Extra Double Jump"); if (!RandomizerBonus.DoubleJumpUpgrade()) { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; } break; case 13: if (RandomizerBonus.HealthRegeneration() < 3) { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; Randomizer.showHint("Health Regeneration (" + RandomizerBonus.HealthRegeneration().ToString() + "/3)"); } break; case -13: if (RandomizerBonus.HealthRegeneration() > 0) { Characters.Sein.Inventory.SkillPointsCollected -= 1 << -ID; } Randomizer.showHint("Health Regeneration (" + RandomizerBonus.HealthRegeneration().ToString() + "/3)"); break; case 15: if (RandomizerBonus.EnergyRegeneration() < 3) { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; } Randomizer.showHint("Energy Regeneration (" + RandomizerBonus.EnergyRegeneration().ToString() + "/3)"); break; case -15: Randomizer.showHint("Energy Regeneration"); if (RandomizerBonus.EnergyRegeneration() > 0) { Characters.Sein.Inventory.SkillPointsCollected -= 1 << -ID; Randomizer.showHint("Energy Regeneration (" + RandomizerBonus.EnergyRegeneration().ToString() + "/3)"); } break; case 17: if (RandomizerBonus.WaterVeinShards() >= 3) { Randomizer.showHint("*Water Vein Shard (extra)*"); } else { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; if (RandomizerBonus.WaterVeinShards() == 3) { Keys.GinsoTree = true; Randomizer.showHint("*Water Vein Shard (3/3)*"); } else { Randomizer.showHint("*Water Vein Shard (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)*"); } } break; case -17: if (RandomizerBonus.WaterVeinShards() > 0) { Characters.Sein.Inventory.SkillPointsCollected -= 1 << -ID; Keys.GinsoTree = false; Randomizer.showHint("*Water Vein Shard (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)*"); } break; case 19: if (RandomizerBonus.GumonSealShards() >= 3) { Randomizer.showHint("#Gumon Seal Shard (extra)#"); } else { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; if (RandomizerBonus.GumonSealShards() == 3) { Keys.ForlornRuins = true; Randomizer.showHint("#Gumon Seal Shard (3/3)#"); } else { Randomizer.showHint("#Gumon Seal Shard (" + RandomizerBonus.GumonSealShards().ToString() + "/3)#"); } } break; case -19: if (RandomizerBonus.GumonSealShards() > 0) { Characters.Sein.Inventory.SkillPointsCollected -= 1 << -ID; Keys.ForlornRuins = false; Randomizer.showHint("#Gumon Seal Shard (" + RandomizerBonus.GumonSealShards().ToString() + "/3)#"); } break; case 21: if (RandomizerBonus.SunstoneShards() >= 3) { Randomizer.showHint("@Sunstone Shard (extra)@"); } else { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; if (RandomizerBonus.SunstoneShards() == 3) { Keys.MountHoru = true; Randomizer.showHint("@Sunstone Shard (3/3)@"); } else { Randomizer.showHint("@Sunstone Shard (" + RandomizerBonus.SunstoneShards().ToString() + "/3)@"); } } break; case -21: if (RandomizerBonus.GumonSealShards() > 0) { Characters.Sein.Inventory.SkillPointsCollected -= 1 << -ID; Keys.MountHoru = false; Randomizer.showHint("@Sunstone Shard (" + RandomizerBonus.SunstoneShards().ToString() + "/3)@"); } break; } }