示例#1
0
文件: Skill.cs 项目: jjaspe/Libraries
 public bool addMod_Weapon(Weapon newWeapon)
 {
     // Make sure a weapon with the same name doesn't exist.
     if (!isGov_Weapon(newWeapon.itsName))
     {
         for (int i = 0; i < Globals.WEAPON_LIMIT; i++)
         {
             if (itsGov_Weapons[i].is_empty)
             {
                 itsGov_Weapons[i] = newWeapon;
                 itsGov_Weapons[i].is_empty = false;
                 return true;
             }
         }
         return false;
     }
     else
         return false;
 }
示例#2
0
 private void initializeLists()
 {
     itsStats = new propertyList();
     itsSkills = new propertyList();
     itsAttributes = new propertyList();
     itsTargets = new characterList();
     itsWeapons = new Weapon[Globals.WEAPON_LIMIT];
     for (int i = 0; i < Globals.WEAPON_LIMIT; i++)
         itsWeapons[i] = new Weapon();
 }
示例#3
0
 public bool setCurrentWeapon(string name)
 {
     int i = weaponIndex(name);
     if (i < Globals.WEAPON_LIMIT)
     {
         itsCurrentWeapon = itsWeapons[i];
         return true;
     }
     else
         return false;
 }
示例#4
0
 public bool removeWeapon(Weapon oldWeapon)
 {
     int i = weaponIndex(oldWeapon.itsName);
     if (i < Globals.WEAPON_LIMIT)
     {
         itsWeapons[i].is_empty = true;
         return true;
     }
     else
         return false;
 }
示例#5
0
 public bool addWeapon(Weapon newWeapon)
 {
     for (int i = 0; i < Globals.WEAPON_LIMIT; i++)
     {
         if (itsWeapons[i].is_empty)
         {
             itsWeapons[i] = newWeapon;
             itsWeapons[i].is_empty = false;
             return true;
         }
     }
     return false;
 }
示例#6
0
        public Weapon copy(Weapon copyWeapon)
        {
            copyWeapon = (Weapon)base.copy(copyWeapon);
            copyWeapon.itsName = this.itsName;

            for (int i = 0; i < itsActions.Count; i++)
                copyWeapon.itsActions[i] = this.itsActions[i].copy(new WeaponAction());

            for (int i = 0; i < itsChoosableActions.Length; i++)
                copyWeapon.itsChoosableActions[i] = this.itsChoosableActions[i].copy(new WeaponAction());

            copyWeapon.itsUsers = this.itsUsers.copy();

            copyWeapon.itsTargets = this.itsTargets.copy();

            for (int i = 0; i < target_Users.Length; i++)
                copyWeapon.target_Users[i] = this.target_Users[i];

                copyWeapon.itsModifiedSkills = this.itsModifiedSkills.copy();

             for (int i = 0; i < itsSkillModifiers.Length; i++)
                copyWeapon.itsSkillModifiers[i] = this.itsSkillModifiers[i];

             return copyWeapon;
        }
示例#7
0
文件: Skill.cs 项目: jjaspe/Libraries
        private void initializeLists()
        {
            itsWeaponModifiers = new Weapon[Globals.WEAPON_LIMIT];
            for (int i = 0; i < Globals.WEAPON_LIMIT; i++)
                itsWeaponModifiers[i] = new Weapon();

            itsAtt_Coefficients = new coefficientList();
            itsGoverningAttributes = new propertyList();
            itsGoverningStats = new propertyList();
            itsGov_Weapons = new Weapon[0];
        }