Exemplo n.º 1
0
        public override bool OnBeforeSwing(Mobile attacker, Mobile defender)
        {
            if (!Validate(attacker) || !CheckMana(attacker, false))
            {
                return(false);
            }

            switch (Utility.Random(7))
            {
            case 0:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.ArmorIgnore, 1028838);
                break;

            case 1:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.BleedAttack, 1028839);
                break;

            case 2:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.ConcussionBlow, 1028840);
                break;

            case 3:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.CrushingBlow, 1028841);
                break;

            case 4:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.DoubleStrike, 1028844);
                break;

            case 5:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.MortalStrike, 1028846);
                break;

            case 6:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.ParalyzingBlow, 1028848);
                break;

            default:
                // should never happen
                return(false);
            }


            return(((BladeWeaveRedirect)m_NewAttack[attacker]).NewAbility.OnBeforeSwing(attacker, defender));
        }
Exemplo n.º 2
0
		public override bool OnBeforeSwing(Mobile attacker, Mobile defender)
		{
			if (!Validate(attacker) || !CheckMana(attacker, false))
				return false;

			switch (Utility.Random(7))
			{
				case 0:
					m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.ArmorIgnore, 1028838);
					break;
				case 1:
					m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.BleedAttack, 1028839);
					break;
				case 2:
					m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.ConcussionBlow, 1028840);
					break;
				case 3:
					m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.CrushingBlow, 1028841);
					break;
				case 4:
					m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.DoubleStrike, 1028844);
					break;
				case 5:
					m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.MortalStrike, 1028846);
					break;
				case 6:
					m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.ParalyzingBlow, 1028848);
					break;
				default:
					// should never happen
					return false;
			}


			return ((BladeWeaveRedirect)m_NewAttack[attacker]).NewAbility.OnBeforeSwing(attacker, defender, false);
		}
Exemplo n.º 3
0
        public override bool OnBeforeSwing(Mobile attacker, Mobile defender)
        {
            if (!Validate(attacker) || !CheckMana(attacker, false))
            {
                return(false);
            }

            int ran = -1;

            if (attacker is BaseCreature && PetTrainingHelper.CheckSecondarySkill((BaseCreature)attacker, SkillName.Bushido))
            {
                ran = Utility.Random(9);
            }
            else
            {
                bool canfeint = attacker.Skills[WeaponAbility.Feint.GetSecondarySkill(attacker)].Value >= WeaponAbility.Feint.GetRequiredSecondarySkill(attacker);
                bool canblock = attacker.Skills[WeaponAbility.Block.GetSecondarySkill(attacker)].Value >= WeaponAbility.Block.GetRequiredSecondarySkill(attacker);

                if (canfeint && canblock)
                {
                    ran = Utility.Random(9);
                }
                else if (canblock)
                {
                    ran = Utility.Random(8);
                }
                else
                {
                    ran = Utility.RandomList(0, 1, 2, 3, 4, 5, 6, 8);
                }
            }

            switch (ran)
            {
            case 0:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.ArmorIgnore, 1028838);
                break;

            case 1:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.BleedAttack, 1028839);
                break;

            case 2:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.ConcussionBlow, 1028840);
                break;

            case 3:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.CrushingBlow, 1028841);
                break;

            case 4:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.DoubleStrike, 1028844);
                break;

            case 5:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.MortalStrike, 1028846);
                break;

            case 6:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.ParalyzingBlow, 1028848);
                break;

            case 7:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.Block, 1028853);
                break;

            case 8:
                m_NewAttack[attacker] = new BladeWeaveRedirect(WeaponAbility.Feint, 1028857);
                break;

            default:
                // should never happen
                return(false);
            }


            return(m_NewAttack[attacker].NewAbility.OnBeforeSwing(attacker, defender));
        }