Exemple #1
0
 private void createTestCharacter()
 {
     /*playerCharacter = new Character("Nerissa", Character.Races.HalfElf, Character.Genders.Female,
      *  Character.Orders.Chaotic, Character.Morals.Neutral, 8, 13, 12, 14, 10, 17);
      * playerCharacter = new Sorcerer(playerCharacter);
      * playerCharacter.Portrait = Resources.FELSO04L;
      * playerCharacter = new Character("Hluothar", Character.Races.Human, Character.Genders.Male,
      *  Character.Orders.Chaotic, Character.Morals.Neutral, 18, 12, 15, 9, 10, 8);
      * playerCharacter = new Barbarian(playerCharacter);
      * playerCharacter.Portrait = Resources.MHUBA06L;*/
     playerCharacter = new Character("Corlynna", Character.Races.Elf, Character.Genders.Female,
                                     Character.Orders.Chaotic, Character.Morals.Good, 15, 18, 12, 12, 13, 10);
     playerCharacter          = new Ranger(playerCharacter);
     playerCharacter.Portrait = Resources.FELRA04L;
     playerCharacter.StartingInventory();
 }
Exemple #2
0
        private void CharacterSheet_Load(object sender, EventArgs e)
        {
            //createTestCharacter(); /* used to bypass the normal character creation process */
            playerCharacter.StartingInventory(); /* populate inventory with test items */
            // ensures that the createChar object is correctly cast as the starting form
            int i = 0;

            while (createChar == null)
            {
                if (Application.OpenForms[i] is CreateCharacter)
                {
                    createChar = (CreateCharacter)Application.OpenForms[i];
                }
                else
                {
                    i++;
                }
            }
            /**** Profile *****/
            picPortrait.Image = playerCharacter.Portrait;
            boxStr.Text       = Convert.ToString(playerCharacter.Strength);
            boxDex.Text       = Convert.ToString(playerCharacter.Dexterity);
            boxCon.Text       = Convert.ToString(playerCharacter.Constitution);
            boxInt.Text       = Convert.ToString(playerCharacter.Intelligence);
            boxWis.Text       = Convert.ToString(playerCharacter.Wisdom);
            boxCha.Text       = Convert.ToString(playerCharacter.Charisma);
            lblCharName.Text  = playerCharacter.ToString();
            lblCharInfo.Text  = playerCharacter.CharInfoToString();
            boxExp.Text       = playerCharacter.ExperienceToString();
            boxHP.Text        = playerCharacter.HitPointsToString();
            boxWillSave.Text  = playerCharacter.WillSaveToString();
            boxRefSave.Text   = playerCharacter.RefSaveToString();
            boxFortSave.Text  = playerCharacter.FortSaveToString();
            updateArmour();
            updatePlayerAttack();
            /**** Inventory *****/
            boxGold.Text = String.Format("{0:N0}", playerCharacter.Gold);
            generateInventoryPics();
            //initWeaponPics();
            //Allow drop for equipped item slots
            picMainHand.AllowDrop = true;
            picArmour.AllowDrop   = true;
        }