// Token: 0x0600376D RID: 14189 RVA: 0x000E2764 File Offset: 0x000E0964 public static void UpgradeID(int ID) { bool flag = ID < 0; if (flag) { ID = -ID; } if (RandomizerBonusSkill.BonusSkillNames.ContainsKey(ID)) { RandomizerBonusSkill.FoundBonusSkill(ID); return; } if (ID >= 200 && ID < 260) { int abilityId = (ID - 200) % 30; Ability ability = abilities[abilityId]; if (ID < 230) { ability.Found(); } else { ability.Lost(); } return; } switch (ID) { case 0: if (!flag) { Characters.Sein.Mortality.Health.SetAmount((float)(Characters.Sein.Mortality.Health.MaxHealth + 20)); RandomizerSwitch.PickupMessage("Mega Health"); return; } break; case 1: if (!flag) { Characters.Sein.Energy.SetCurrent(Characters.Sein.Energy.Max + 5f); RandomizerSwitch.PickupMessage("Mega Energy"); return; } break; case 2: Randomizer.returnToStart(); RandomizerSwitch.PickupMessage("Go Home!"); return; case 20: break; case 6: if (!flag) { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); RandomizerSwitch.PickupMessage("Attack Upgrade (" + RandomizerBonus.SpiritFlameLevel().ToString() + ")"); return; } if (RandomizerBonus.SpiritFlameLevel() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); RandomizerSwitch.PickupMessage("Attack Upgrade (" + RandomizerBonus.SpiritFlameLevel().ToString() + ")"); return; } break; case 8: RandomizerSwitch.PickupMessage("Explosion Power Upgrade"); if (!RandomizerBonus.ExplosionPower()) { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); return; } break; case 9: if (!flag) { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); } else if (Characters.Sein.Inventory.GetRandomizerItem(ID) > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); } if (Characters.Sein.Inventory.GetRandomizerItem(ID) == 1) { RandomizerSwitch.PickupMessage("Spirit Light Efficiency"); } else { RandomizerSwitch.PickupMessage("Spirit Light Efficiency (" + Characters.Sein.Inventory.GetRandomizerItem(ID).ToString() + ")"); } break; case 10: RandomizerSwitch.PickupMessage("Extra Air Dash"); if (!RandomizerBonus.DoubleAirDash()) { Characters.Sein.Inventory.SetRandomizerItem(ID, 1); return; } break; case 11: RandomizerSwitch.PickupMessage("Charge Dash Efficiency"); if (!RandomizerBonus.ChargeDashEfficiency()) { Characters.Sein.Inventory.SetRandomizerItem(ID, 1); return; } break; case 12: if (!flag) { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); if (RandomizerBonus.DoubleJumpUpgrades() == 1) { RandomizerSwitch.PickupMessage("Extra Double Jump"); return; } RandomizerSwitch.PickupMessage("Extra Double Jump (" + RandomizerBonus.DoubleJumpUpgrades().ToString() + ")"); return; } else if (RandomizerBonus.DoubleJumpUpgrades() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); if (RandomizerBonus.DoubleJumpUpgrades() == 1) { RandomizerSwitch.PickupMessage("Extra Double Jump"); return; } RandomizerSwitch.PickupMessage("Extra Double Jump (" + RandomizerBonus.DoubleJumpUpgrades().ToString() + ")"); return; } break; case 13: if (!flag) { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); RandomizerSwitch.PickupMessage("Health Regeneration (" + RandomizerBonus.HealthRegeneration().ToString() + ")"); return; } if (RandomizerBonus.HealthRegeneration() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); RandomizerSwitch.PickupMessage("Health Regeneration (" + RandomizerBonus.HealthRegeneration().ToString() + ")"); return; } break; case 15: if (!flag) { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); RandomizerSwitch.PickupMessage("Energy Regeneration (" + RandomizerBonus.EnergyRegeneration().ToString() + ")"); return; } if (RandomizerBonus.EnergyRegeneration() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); RandomizerSwitch.PickupMessage("Energy Regeneration (" + RandomizerBonus.EnergyRegeneration().ToString() + ")"); return; } break; case 17: if (flag) { if (RandomizerBonus.WaterVeinShards() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); RandomizerSwitch.PickupMessage("*Water Vein Shard (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)*"); } } else if (RandomizerBonus.WaterVeinShards() >= 3) { RandomizerSwitch.PickupMessage("*Water Vein Shard (extra)*"); } else { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); RandomizerSwitch.PickupMessage("*Water Vein Shard (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)*", 300); } Keys.GinsoTree = (RandomizerBonus.WaterVeinShards() >= 3); if (Keys.GinsoTree) { RandomizerStatsManager.FoundEvent(0); } return; case 19: if (flag) { if (RandomizerBonus.GumonSealShards() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); RandomizerSwitch.PickupMessage("#Gumon Seal Shard (" + RandomizerBonus.GumonSealShards().ToString() + "/3)#"); } } else if (RandomizerBonus.GumonSealShards() >= 3) { RandomizerSwitch.PickupMessage("#Gumon Seal Shard (extra)#"); } else { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); RandomizerSwitch.PickupMessage("#Gumon Seal Shard (" + RandomizerBonus.GumonSealShards().ToString() + "/3)#", 300); } Keys.ForlornRuins = (RandomizerBonus.GumonSealShards() >= 3); if (Keys.ForlornRuins) { RandomizerStatsManager.FoundEvent(2); } return; case 21: if (flag) { if (RandomizerBonus.SunstoneShards() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); RandomizerSwitch.PickupMessage("@Sunstone Shard (" + RandomizerBonus.SunstoneShards().ToString() + "/3)@"); } } else if (RandomizerBonus.SunstoneShards() >= 3) { RandomizerSwitch.PickupMessage("@Sunstone Shard (extra)@"); } else { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); RandomizerSwitch.PickupMessage("@Sunstone Shard (" + RandomizerBonus.SunstoneShards().ToString() + "/3)@", 300); } Keys.MountHoru = (RandomizerBonus.SunstoneShards() >= 3); if (Keys.MountHoru) { RandomizerStatsManager.FoundEvent(4); } return; case 28: if (!flag) { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); } else if (RandomizerBonus.WarmthFrags() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); } if (Randomizer.fragKeyFinish < RandomizerBonus.WarmthFrags()) { RandomizerSwitch.PickupMessage("@Warmth Fragment (extra)@", 300); return; } RandomizerSwitch.PickupMessage(string.Concat(new object[] { "@Warmth Fragment (", RandomizerBonus.WarmthFrags().ToString(), "/", Randomizer.fragKeyFinish, ")@" }), 300); break; case 29: return; case 30: if (!flag) { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); RandomizerSwitch.PickupMessage("Bleeding x" + RandomizerBonus.Bleeding().ToString()); return; } if (RandomizerBonus.Bleeding() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); RandomizerSwitch.PickupMessage("Bleeding x" + RandomizerBonus.Bleeding().ToString()); return; } break; case 31: if (!flag) { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); } else if (RandomizerBonus.Lifesteal() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); } if (Lifesteal() == 1) { RandomizerSwitch.PickupMessage("Health Leech"); } else { RandomizerSwitch.PickupMessage("Health Leech x" + RandomizerBonus.Lifesteal().ToString()); } break; case 32: if (!flag) { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); } else if (RandomizerBonus.Manavamp() > 0) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); } if (Manavamp() == 1) { RandomizerSwitch.PickupMessage("Energy Leech"); } else { RandomizerSwitch.PickupMessage("Energy Leech x" + RandomizerBonus.Manavamp().ToString()); } break; case 33: if (!flag) { int v = Characters.Sein.Inventory.IncRandomizerItem(ID, 1); RandomizerSwitch.PickupMessage("Skill Velocity Upgrade x" + v.ToString()); if (Characters.Sein.Inventory.GetRandomizerItem(108) == 0) { RandomizerBonusSkill.FoundBonusSkill(108); } return; } if (RandomizerBonus.Velocity() > 0) { int v = Characters.Sein.Inventory.IncRandomizerItem(ID, -1); RandomizerSwitch.PickupMessage("Skill Velocity Upgrade x" + v.ToString()); return; } break; case 34: Characters.Sein.Inventory.SetRandomizerItem(34, 1); RandomizerSwitch.PickupMessage("Return to start disabled!"); break; case 35: Characters.Sein.Inventory.SetRandomizerItem(34, 0); RandomizerSwitch.PickupMessage("Return to start enabled!"); break; case 36: RandomizerSwitch.PickupMessage("Underwater Skill Usage"); Characters.Sein.Inventory.SetRandomizerItem(36, 1); break; case 37: if (!flag) { int v = Characters.Sein.Inventory.IncRandomizerItem(ID, 1); RandomizerSwitch.PickupMessage("Jump Upgrade x" + v.ToString()); if (Characters.Sein.Inventory.GetRandomizerItem(108) == 0) { RandomizerBonusSkill.FoundBonusSkill(108); } return; } if (RandomizerBonus.Jumpgrades() > 0) { int v = Characters.Sein.Inventory.IncRandomizerItem(ID, -1); RandomizerSwitch.PickupMessage("Jump Upgrade x" + v.ToString()); return; } break; case 40: if (!Characters.Sein || flag) { return; } RandomizerSwitch.PickupMessage("@Wall Jump Lost!!@", 240); Characters.Sein.PlayerAbilities.WallJump.HasAbility = false; Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities(); return; case 41: if (!Characters.Sein || flag) { return; } RandomizerSwitch.PickupMessage("@ChargeFlame Lost!!@", 240); Characters.Sein.PlayerAbilities.ChargeFlame.HasAbility = false; Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities(); return; case 42: if (!Characters.Sein || flag) { return; } RandomizerSwitch.PickupMessage("@DoubleJump Lost!!@", 240); Characters.Sein.PlayerAbilities.DoubleJump.HasAbility = false; Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities(); return; case 43: if (!Characters.Sein || flag) { return; } RandomizerSwitch.PickupMessage("@Bash Lost!!@", 240); Characters.Sein.PlayerAbilities.Bash.HasAbility = false; Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities(); return; case 44: if (!Characters.Sein || flag) { return; } RandomizerSwitch.PickupMessage("@Stomp Lost!!@", 240); Characters.Sein.PlayerAbilities.Stomp.HasAbility = false; Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities(); return; case 45: if (!Characters.Sein || flag) { return; } RandomizerSwitch.PickupMessage("@Glide Lost!!@", 240); Characters.Sein.PlayerAbilities.Glide.HasAbility = false; Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities(); return; case 46: if (!Characters.Sein || flag) { return; } RandomizerSwitch.PickupMessage("@Climb Lost!!@", 240); Characters.Sein.PlayerAbilities.Climb.HasAbility = false; Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities(); return; case 47: if (!Characters.Sein || flag) { return; } RandomizerSwitch.PickupMessage("@Charge Jump Lost!!@", 240); Characters.Sein.PlayerAbilities.ChargeJump.HasAbility = false; Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities(); return; case 48: if (!Characters.Sein || flag) { return; } RandomizerSwitch.PickupMessage("@Dash Lost!!@", 240); Characters.Sein.PlayerAbilities.Dash.HasAbility = false; Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities(); return; case 49: if (!Characters.Sein || flag) { return; } RandomizerSwitch.PickupMessage("@Grenade Lost!!@", 240); Characters.Sein.PlayerAbilities.Grenade.HasAbility = false; Characters.Sein.Prefabs.EnsureRightPrefabsAreThereForAbilities(); return; case 81: if (Characters.Sein.Inventory.GetRandomizerItem(ID) > 0) { return; } Characters.Sein.Inventory.IncRandomizerItem(ID, 1); string s_color = ""; string g_color = ""; if (Characters.Sein.PlayerAbilities.HasAbility(AbilityType.Stomp)) { s_color = "$"; } if (Characters.Sein.PlayerAbilities.HasAbility(AbilityType.Grenade)) { g_color = "$"; } RandomizerSwitch.PickupMessage(s_color + "Stomp: " + Randomizer.StompZone + s_color + g_color + " Grenade: " + Randomizer.GrenadeZone + g_color, 480); break; default: if (flag) { Characters.Sein.Inventory.IncRandomizerItem(ID, -1); } else { Characters.Sein.Inventory.IncRandomizerItem(ID, 1); } return; } }