Exemplo n.º 1
0
        private static void UnbindItems(Entity e, ref UI_Perk uiP)
        {
            e.perks.hasJetpack = false;
            e.perks.hasKatana  = false;

            e.perks.hasPerk = true;
        }
Exemplo n.º 2
0
        public void Action(ref Entity entity, ref UI_Perk UI_Perk)
        {
            switch (rarity)
            {
            case 0:
                switch (item)
                {
                case ItemsCommon.Heart:
                case ItemsCommon.HeartHalf:
                    if (entity.Health < 6 - (item == ItemsCommon.Heart ? 1 : 0))
                    {
                        entity.Health += (item == ItemsCommon.Heart) ? 2 : 1;
                        RemoveMe       = true;
                    }
                    else
                    {
                        RemoveMe = false;
                    }
                    break;

                //case ItemsCommon.Energy1:
                case ItemsCommon.Energy0:
                    itemInfo.Slide("Nomster", "Gives energy and potentially diabetes");
                    entity.speed += 0.20f;
                    break;

                case ItemsCommon.Firerate0:
                    itemInfo.Slide("Laxatives", "Oh lord it's coming!");
                    entity.fireRate -= 1;
                    break;

                case ItemsCommon.Damage0:
                    itemInfo.Slide("Pipse", "The power of pipse has been granted");
                    entity.Damage      += 1;
                    entity.pColor       = new Color((byte)(entity.pColor.R - (entity.pColor.R > 127 ? 25 : 0)), entity.pColor.G, (byte)(entity.pColor.B - (entity.pColor.B > 10 ? 50 : 0)));
                    entity.sprite.Color = new Color((byte)(entity.pColor.R - (entity.pColor.R > 127 ? 25 : 0)), entity.pColor.G, (byte)(entity.pColor.B - (entity.pColor.B > 10 ? 50 : 0)));
                    break;

                case ItemsCommon.Bomb0:
                    if (entity.bombCount < 99)
                    {
                        entity.bombCount++;
                        RemoveMe = true;
                    }
                    else
                    {
                        RemoveMe = false;
                    }
                    break;
                }
                break;

            case 1:
                switch (item)
                {
                case ItemsRare.SwitchRoom:
                    // Check Outside class checks
                    break;

                case ItemsRare.Fly0:
                    itemInfo.Slide("Bed Rule", "It gives you wi-- a jetpack!");
                    UnbindItems(entity, ref UI_Perk);
                    entity.perks.hasJetpack = true;
                    break;

                case ItemsRare.Manga:
                    itemInfo.Slide("Manga", "Protect the unprotected");
                    UnbindItems(entity, ref UI_Perk);
                    entity.perks.hasKatana = true;
                    break;
                }
                break;
            }
        }