Beispiel #1
0
        private static string BuildWebAddress(SlickStrength slickness)
        {
            switch (slickness)
            {
            case SlickStrength.Regular:
                return("http://www.d20pfsrd.com/magic-items/magic-armor/magic-armor-and-shield-special-abilities/slick/");

            case SlickStrength.Improved:
                return("http://www.d20pfsrd.com/magic-items/magic-armor/magic-armor-and-shield-special-abilities/slick-improved/");

            case SlickStrength.Greater:
                return("http://www.d20pfsrd.com/magic-items/magic-armor/magic-armor-and-shield-special-abilities/slick-greater/");

            default:
                throw new InvalidEnumArgumentException(nameof(slickness), (int)slickness, slickness.GetType());
            }
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Core.Domain.Items.Enchantments.Paizo.CoreRulebook.Slick"/> class.
        /// </summary>
        /// <param name="slickness">The strength of the Slick enchantment.</param>
        /// /// <exception cref="System.ComponentModel.InvalidEnumArgumentException">Thrown when an argument is a nonstandard enum.</exception>
        internal Slick(SlickStrength slickness)
        {
            switch (slickness)
            {
            case SlickStrength.Regular:
                this.CasterLevel = 4;
                this.Cost        = 3750;
                break;

            case SlickStrength.Improved:
                this.CasterLevel = 10;
                this.Cost        = 15_000;
                break;

            case SlickStrength.Greater:
                this.CasterLevel = 15;
                this.Cost        = 33_750;
                break;

            default:
                throw new InvalidEnumArgumentException(nameof(slickness), (int)slickness, slickness.GetType());
            }
            byte skillBonus = Convert.ToByte((int)slickness);

            this.ApplicationEffects = (c) => c.Skills?.EscapeArtist?.CompetenceBonuses?.Add(() => skillBonus);
            this.Name = new NameFragment(Slick.BuildName(slickness), Slick.BuildWebAddress(slickness));
        }