예제 #1
0
        public override void HealSelf()
        {
            short heal      = GameFunctions.RndNext(65, 75);
            short newHealth = (short)(Health + heal);

            if (newHealth > 100)
            {
                newHealth = 100;
            }

            if (Health > 0)
            {
                Health = newHealth;
                GameFunctions.AddToCombatLog($"{_name} drank a potion for {heal} health.");
                HealItems--;
            }
            else
            {
                Health = 0;
            }
        }
예제 #2
0
 public bool IsAccuracySuccessful() => GameFunctions.RndNextDouble() < _accuracyN;