예제 #1
0
        public override void Use()
        {
            if (GameManager.PlayerObject.Player.CanDrink)
            {
                Game1.PlaySFX("SFX_Potion_01");
                int prevMana = GameManager.PlayerObject.Player.MP;
                GameManager.PlayerObject.Player.MP = Math.Min(GameManager.PlayerObject.Player.MaxMP, GameManager.PlayerObject.Player.MP + POTION_REGEN);

                int regened = GameManager.PlayerObject.Player.MP - prevMana;
                if (regened > 0)
                {
                    Effect effect = new Effect("+" + regened.ToString(), Color.Blue, "MP_GUI");
                    Owner.AddEffect(effect);
                }

                if (Amount > 1)
                {
                    Amount -= 1;
                }
                else
                {
                    GameManager.PlayerObject.Player.Inventory.Remove(Owner);
                }
            }
            else
            {
                GameManager.LogWarning("You cannot drink potions anymore !");
            }
        }
예제 #2
0
 public bool UseItem()
 {
     if (Owner.electronic)
     {
         Owner.SayDialogue("AdrenalineElectronic");
         gc.audioHandler.Play(Owner, VanillaAudio.CantDo);
         return(false);
     }
     Owner.AddEffect <Adrenaline>();
     gc.audioHandler.Play(Owner, VanillaAudio.UseSyringe);
     Count--;
     return(true);
 }
예제 #3
0
        public bool UseItem()
        {
            if (Owner.electronic)
            {
                Owner.SayDialogue("");
                gc.audioHandler.Play(Owner, vAudioClip.CantDo);

                return(false);
            }

            Owner.AddEffect <ChronomanticDilation>(15);
            gc.audioHandler.Play(Owner, vAudioClip.UseDrink);
            Count--;

            return(true);
        }