Exemple #1
0
		/// <summary>
		/// initializes all Character Classes
		/// </summary>
        public static void initClasses()
        {
            Class barbarian = new Class("Barbarian");
            Class bard = new Class("Bard");
            Class cleric = new Class("Cleric");
            Class druid = new Class("Druid");
            Class fighter = new Class("Fighter");
            Class monk = new Class("Monk");
            Class paladin = new Class("Paladin");
            Class ranger = new Class("Ranger");
            Class rogue = new Class("Rogue");
            Class sorcerer = new Class("Sorcerer");
            Class warlock = new Class("Warlock");
            Class wizard= new Class("Wizard");
        }
Exemple #2
0
        private void classBox_SelectedIndexChanged(object sender, EventArgs e)
        {


            //Get the currently selected item.
            string curItem = classBox.SelectedItem.ToString();

            Class selectClass = new Class(curItem);

            // changes label, grid, and buttons to be visable
            featuresLabel.Visible = true;
            featuresGrid.Visible = true;
            classButton.Visible = true;

            // changes class background image depending on what class is selected
            switch (curItem)
            {
                case "Barbarian":
                    classTab.BackgroundImage = Properties.Resources.barbarian0;
                    break;
                case "Bard":
                    classTab.BackgroundImage = Properties.Resources.bard0;
                    break;
                case "Cleric":
                    classTab.BackgroundImage = Properties.Resources.cleric0;
                    break;
                case "Druid":
                    classTab.BackgroundImage = Properties.Resources.druid0;
                    break;
                case "Fighter":
                    classTab.BackgroundImage = Properties.Resources.fighter0;
                    break;
                case "Monk":
                    classTab.BackgroundImage = Properties.Resources.monk0;
                    break;
                case "Paladin":
                    classTab.BackgroundImage = Properties.Resources.paladin0;
                    break;
                case "Ranger":
                    classTab.BackgroundImage = Properties.Resources.ranger0;
                    break;
                case "Rogue":
                    classTab.BackgroundImage = Properties.Resources.rogue0;
                    break;
                case "Sorcerer":
                    classTab.BackgroundImage = Properties.Resources.sorcerer0;
                    break;
                case "Warlock":
                    classTab.BackgroundImage = Properties.Resources.warlock0;
                    break;
                case "Wizard":
                    classTab.BackgroundImage = Properties.Resources.wizard0;
                    break;
                default:
                    break;
            }


            //Clear the Features DataGrid of all columns and rows.
            featuresGrid.Columns.Clear();
            featuresGrid.Rows.Clear();

            //Set the columns for the Features DataGrid.
            featuresGrid.ColumnCount = 2;
            featuresGrid.Columns[0].Name = "Name";
            featuresGrid.Columns[1].Name = "Description";

            featuresGrid.Rows.Add("Hit Dice:", "1d" + selectClass.hit + " per " + selectClass.className + " level");

            ArrayList prof = new ArrayList();
            prof = selectClass.prof;
            //ArrayList pDesc = new ArrayList();
            // pDesc = selectClass.getPDesc();

            for (int i = 0; i < prof.Count; i++)
            {
                featuresGrid.Rows.Add(prof[i]/*, pDesc[i]*/);
            }
        }
Exemple #3
0
 public void setClass(string s)
 {
     pClass = new Class(s);
 }