コード例 #1
0
        private void setClassArmor()
        {
            EntityArmor armor = EntityArmor.Light;

            if (cboSelectCharacterClass.Text == "Cleric")
            {
                armor = EntityArmor.Medium;
            }
            else if (cboSelectCharacterClass.Text == "Fighter")
            {
                armor = EntityArmor.Heavy;
            }
            else if (cboSelectCharacterClass.Text == "Rogue")
            {
                armor = EntityArmor.Light;
            }
            else if (cboSelectCharacterClass.Text == "Wizard")
            {
                armor = EntityArmor.None;
            }

            playerPickingClass.Armor = armor;

            return;
        }
コード例 #2
0
 public Player(int r_intStrengthAbility, int r_intDexterityAbility, int r_intConstitutionAbility,
               int r_intIntelligenceAbility, int r_intWisdomAbility, int r_intCharismaAbility, EntityAttacks r_entAttacks, EntityArmor r_entArmor) : base()
 {
     //TODO need weapon and skills
     intStrengthAbility     = r_intStrengthAbility;
     intDexterityAbility    = r_intDexterityAbility;
     intConstitutionAbility = r_intConstitutionAbility;
     intIntelligenceAbility = r_intIntelligenceAbility;
     intWisdomAbility       = r_intWisdomAbility;
     intCharismaAbility     = r_intCharismaAbility;
     entArmor  = r_entArmor;
     entAttack = r_entAttacks;
 }
コード例 #3
0
 //Create the object
 public Entity()
 {
     intHealth               = 10;
     strName                 = "";
     entGender               = EntityGender.Female;
     intAge                  = 20;
     intHeightFeet           = 5;
     intHeightInches         = 11;
     strWeight               = "";
     entEyeColor             = EntityEyeColor.Blue;
     entHairColor            = EntityHairColor.Black;
     strSkin                 = "Weathered";
     intStrengthAbility      = 0;
     intDexterityAbility     = 0;
     intConstitutionAbility  = 0;
     intIntelligenceAbility  = 0;
     intWisdomAbility        = 0;
     intCharismaAbility      = 0;
     strStrengthModifier     = "";
     strDexterityModifier    = "";
     strConstitutionModifier = "";
     strIntelligenceModifier = "";
     strWisdomModifier       = "";
     strCharismaModifier     = "";
     strStrengthSaving       = "";
     strDexteritySaving      = "";
     strConstitutionSaving   = "";
     strIntelligenceSaving   = "";
     strWisdomSaving         = "";
     strCharismaSaving       = "";
     entAttack               = EntityAttacks.Melee;
     entWeapon               = EntityWeapons.Sword;
     entCharacterRace        = EntityCharacterRace.Human;
     entCharacterClass       = EntityCharacterClass.Fighter;
     entArmor                = EntityArmor.Medium;
 }