Exemplo n.º 1
0
        // determines if a spellcastar is based on charisma, intelligence or wisdom
        public void Select(Spellcaster spellcaster, string keyAttributeName, int attributeScore)
        {
            switch (keyAttributeName)
            {
            case "Charisma":
                spellcaster.Charisma             = attributeScore;
                spellcaster.KeyAttributeModifier = spellcaster.GetModifier(spellcaster.Charisma);
                break;

            case "Intelligence":
                spellcaster.Intelligence         = attributeScore;
                spellcaster.KeyAttributeModifier = spellcaster.GetModifier(spellcaster.Intelligence);
                break;

            case "Wisdom":
                spellcaster.Wisdom = attributeScore;
                spellcaster.KeyAttributeModifier = spellcaster.GetModifier(spellcaster.Wisdom);
                break;
            }
        }