예제 #1
0
        public IBattleWeapon GetCopy()
        {
            TrueWeapon newWeapon = new TrueWeapon(self, Level, avatar);

            newWeapon.Life = Life;
            return(newWeapon);
        }
예제 #2
0
 public static void UpdateWeaponData(TrueWeapon weapon, int[] skillid, int[] skillvalue)
 {
     for (int i = 0; i < skillid.Length; i++)
     {
         switch (skillid[i])
         {
           //  case 501: if (weapon.Avatar.WeaponConfig.Type == (int)CardTypeSub.Weapon) weapon.Avatar.AddStrengthLevel(skillvalue[i]); break;
          //   case 502: if (weapon.Avatar.WeaponConfig.Type == (int)CardTypeSub.Armor) weapon.Avatar.AddStrengthLevel(skillvalue[i]); break;
          //   case 503: if (weapon.Avatar.WeaponConfig.Type == (int)CardTypeSub.Scroll) weapon.Avatar.AddStrengthLevel(skillvalue[i]); break;
           //  case 504: if (weapon.Avatar.WeaponConfig.Type == (int)CardTypeSub.Weapon) weapon.Avatar.AddHit(skillvalue[i]); break;
          //   case 505: if (weapon.Avatar.WeaponConfig.Type == (int)CardTypeSub.Armor) weapon.Avatar.AddDhit(skillvalue[i]); break;
          //   case 506: weapon.Avatar.RemoveNegaPoint(); break;
         }
     }
 }
예제 #3
0
        public void AddWeapon(int weaponId, int lv)
        {
            if (!CanAddWeapon())
            {
                return;
            }

            Weapon wpn = new Weapon(weaponId);
            wpn.UpgradeToLevel(lv);
            var tWeapon = new TrueWeapon(this, lv, wpn);
            AddWeapon(tWeapon);
        }
예제 #4
0
파일: Player.cs 프로젝트: narlon/TOMClassic
        public void UseWeapon(LiveMonster lm, ActiveCard card)
        {
            if (!CheckUseCard(card))
            {
                return;
            }

            try
            {
                Weapon wpn = new Weapon(card.CardId);
                wpn.UpgradeToLevel(card.Level);
                BattleManager.Instance.BattleInfo.GetPlayer(IsLeft).WeaponAdd++;

                var tWeapon = new TrueWeapon(lm, card.Level, wpn);
                lm.AddWeapon(tWeapon);
            }
            catch (Exception e)
            {
                NLog.Warn(e);
                BattleManager.Instance.FlowWordQueue.Add(new FlowWord("未知错误", lm.Position, 0, "Red", 26, 0, 0, 2, 15), false);
                return;
            }

            CardManager.DeleteCardAt(SelectId);
        }
예제 #5
0
 public IBattleWeapon GetCopy()
 {
     TrueWeapon newWeapon = new TrueWeapon(self, Level, avatar);
     newWeapon.Life = Life;
     return newWeapon;
 }