コード例 #1
0
    // Token: 0x0600374A RID: 14154 RVA: 0x000E127C File Offset: 0x000DF47C
    public static void showProgress()
    {
        string text = "";

        if (RandomizerBonus.SkillTreeProgression() < 10)
        {
            text = text + "Trees (" + RandomizerBonus.SkillTreeProgression().ToString() + "/10)  ";
        }
        else
        {
            text += "$Trees (10/10)$  ";
        }
        text = text + "Maps (" + RandomizerBonus.MapStoneProgression().ToString() + "/9)  ";
        text = text + "Total (" + RandomizerBonus.GetPickupCount().ToString() + "/248)\n";
        if (Randomizer.CluesMode)
        {
            text += RandomizerClues.GetClues();
        }
        else
        {
            if (Keys.GinsoTree)
            {
                text += "*WV (3/3)*  ";
            }
            else
            {
                text = text + " *WV* (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)  ";
            }
            if (Keys.ForlornRuins)
            {
                text += "#GS (3/3)#  ";
            }
            else
            {
                text = text + "#GS# (" + RandomizerBonus.GumonSealShards().ToString() + "/3)  ";
            }
            if (Keys.MountHoru)
            {
                text += "@SS (3/3)@";
            }
            else
            {
                text = text + " @SS@ (" + RandomizerBonus.SunstoneShards().ToString() + "/3)";
            }
        }
        Randomizer.MessageQueue.Enqueue(text);
    }
コード例 #2
0
    public static void TeleportPickup(string Value)
    {
        int    shardCount = -1;
        char   colorChar  = ' ';
        string shardPart  = "";

        if (Value == "Ginso")
        {
            Characters.Sein.Inventory.SetRandomizerItem(1024, 1);
            shardCount = RandomizerBonus.WaterVeinShards();
            shardPart  = "Water Vein";
            colorChar  = '*';
        }
        if (Value == "Forlorn")
        {
            Characters.Sein.Inventory.SetRandomizerItem(1025, 1);
            shardCount = RandomizerBonus.GumonSealShards();
            shardPart  = "Gumon Seal";
            colorChar  = '#';
        }
        if (Value == "Horu")
        {
            Characters.Sein.Inventory.SetRandomizerItem(1026, 1);
            shardCount = RandomizerBonus.SunstoneShards();
            shardPart  = "Sunstone";
            colorChar  = '@';
        }

        if (Randomizer.Shards && shardCount >= 0 && shardCount < 2)
        {
            if (shardCount == 1)
            {
                shardPart = "1 more " + shardPart + " shard to activate";
            }
            else
            {
                shardPart = "2 " + shardPart + " shards to activate";
            }
            PickupMessage(colorChar + "Broken " + Value + " teleporter\nCollect " + shardPart + colorChar, 300);
            return;
        }
        TeleporterController.Activate(Randomizer.TeleportTable[Value].ToString(), false);
        PickupMessage(colorChar + Value + " teleporter activated" + colorChar);
    }
コード例 #3
0
ファイル: Randomizer.cs プロジェクト: rmadlal/OriDERandomizer
    // Token: 0x06003747 RID: 14151 RVA: 0x000E091C File Offset: 0x000DEB1C
    public static void showProgress()
    {
        string text = "";

        if (RandomizerBonus.SkillTreeProgression() < 10)
        {
            text += "Trees (" + RandomizerBonus.SkillTreeProgression().ToString() + "/10) ";
        }
        else
        {
            text += "#Trees (10/10)# ";
        }
        if (Keys.GinsoTree)
        {
            text += " #Water Vein (3/3)#\n";
        }
        else
        {
            text += " Water Vein (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)\n";
        }
        if (Keys.ForlornRuins)
        {
            text += "#Gumon Seal (3/3)# ";
        }
        else
        {
            text += "Gumon Seal (" + RandomizerBonus.GumonSealShards().ToString() + "/3) ";
        }
        if (Keys.MountHoru)
        {
            text += " #Sunstone (3/3)#";
        }
        else
        {
            text += " Sunstone (" + RandomizerBonus.SunstoneShards().ToString() + "/3)";
        }
        Randomizer.MessageProvider.SetMessage(text);
        UI.Hints.Show(Randomizer.MessageProvider, HintLayer.GameSaved, 3f);
    }
コード例 #4
0
    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");
            break;

        case 8:
            Randomizer.showHint("Explosion Power Upgrade");
            break;

        case 9:
            Randomizer.showHint("Spirit Light Efficiency");
            break;

        case 10:
            Randomizer.showHint("Extra Air Dash");
            break;

        case 11:
            Randomizer.showHint("Charge Dash Efficiency");
            break;

        case 12:
            Randomizer.showHint("Extra Double Jump");
            break;

        case 13:
            Randomizer.showHint("Health Regeneration");
            break;

        case 15:
            Randomizer.showHint("Energy Regeneration");
            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 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 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;
        }
        if (ID > 1 && ID < 17)
        {
            Characters.Sein.Inventory.SkillPointsCollected += 1 << ID;
        }
    }
コード例 #5
0
	// 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;
		}));
	}
コード例 #6
0
    public static int GetKeyEvents()
    {
        int bf       = 0;
        int wvShards = RandomizerBonus.WaterVeinShards();
        int gsShards = RandomizerBonus.GumonSealShards();
        int ssShards = RandomizerBonus.SunstoneShards();

        if (wvShards > 0)
        {
            bf += 1 << 0;
        }
        if (wvShards > 1)
        {
            bf += 1 << 1;
        }
        if (Keys.GinsoTree)
        {
            bf += 1 << 2;
        }
        if (gsShards > 0)
        {
            bf += 1 << 3;
        }
        if (gsShards > 1)
        {
            bf += 1 << 4;
        }
        if (Keys.ForlornRuins)
        {
            bf += 1 << 5;
        }
        if (ssShards > 0)
        {
            bf += 1 << 6;
        }
        if (ssShards > 1)
        {
            bf += 1 << 7;
        }
        if (Keys.MountHoru)
        {
            bf += 1 << 8;
        }
        if (Sein.World.Events.WaterPurified)
        {
            bf += 1 << 9;
        }
        if (Sein.World.Events.WindRestored)
        {
            bf += 1 << 10;
        }
        if (Randomizer.ForceTrees)
        {
            bf += 1 << 11;
        }
        if (Randomizer.Shards)
        {
            bf += 1 << 12;
        }
        if (Randomizer.fragsEnabled)
        {
            bf += 1 << 13;
        }
        if (Randomizer.WorldTour)
        {
            bf += 1 << 14;
        }
        return(bf);
    }
コード例 #7
0
    public static void showProgress()
    {
        string text = "";

        if (Randomizer.ForceTrees || Randomizer.CluesMode)
        {
            if (RandomizerBonus.SkillTreeProgression() == 10)
            {
                text += "$Trees (10/10)$  ";
            }
            else
            {
                text = text + "Trees (" + RandomizerBonus.SkillTreeProgression().ToString() + "/10)  ";
            }
        }
        if (Randomizer.WorldTour && Characters.Sein)
        {
            int relics = Characters.Sein.Inventory.GetRandomizerItem(302);
            if (relics < Randomizer.RelicCount)
            {
                text += "Relics (" + relics.ToString() + "/" + Randomizer.RelicCount.ToString() + ") ";
            }
            else
            {
                text += "$Relics (" + relics.ToString() + "/" + Randomizer.RelicCount.ToString() + ")$ ";
            }
        }
        if (RandomizerBonus.MapStoneProgression() == 9 && Randomizer.ForceMaps)
        {
            text += "$Maps (9/9)$  ";
        }
        else
        {
            text = text + "Maps (" + RandomizerBonus.MapStoneProgression().ToString() + "/9)  ";
        }
        text = text + "Total (" + RandomizerBonus.GetPickupCount().ToString() + "/256)\n";
        if (Randomizer.CluesMode)
        {
            text += RandomizerClues.GetClues();
        }
        else
        {
            if (Keys.GinsoTree)
            {
                text += "*WV (3/3)*  ";
            }
            else
            {
                text = text + " *WV* (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)  ";
            }
            if (Keys.ForlornRuins)
            {
                text += "#GS (3/3)#  ";
            }
            else
            {
                text = text + "#GS# (" + RandomizerBonus.GumonSealShards().ToString() + "/3)  ";
            }
            if (Keys.MountHoru)
            {
                text += "@SS (3/3)@";
            }
            else
            {
                text = text + " @SS@ (" + RandomizerBonus.SunstoneShards().ToString() + "/3)";
            }
        }
        if (Randomizer.fragsEnabled)
        {
            text = string.Concat(new string[] { text, " Frags: (", RandomizerBonus.WarmthFrags().ToString(), "/", Randomizer.fragKeyFinish.ToString(), ")" });
        }
        if (RandomizerBonus.ForlornEscapeHint())
        {
            string s_color = "";
            string g_color = "";
            if (Characters.Sein)
            {
                if (Characters.Sein.PlayerAbilities.HasAbility(AbilityType.Stomp))
                {
                    s_color = "$";
                }
                if (Characters.Sein.PlayerAbilities.HasAbility(AbilityType.Grenade))
                {
                    g_color = "$";
                }
            }

            text += "\n" + s_color + "Stomp: " + StompZone + s_color + g_color + "    Grenade: " + GrenadeZone + g_color;
        }
        Randomizer.printInfo(text);
    }
コード例 #8
0
    // 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;
        }
    }
コード例 #9
0
    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;
        }
    }