Пример #1
0
        private void GiveBook()
        {
            // On vérifie que le questeur à réussi à tuer avec HonorableExecution
            if (QuestPlayer != null && HonorableExecution.GetSwingBonus(QuestPlayer) > 0)
            {
                QuestPlayer.Backpack.AddItem(new CounterAttackScroll());
            }

            QuestPlayer = null;
        }
Пример #2
0
        public override int GetAttackSpeedBonus()
        {
            int bonus = base.GetAttackSpeedBonus();

            if (Core.SE)
            {
                /*
                 * This is likely true for Core.AOS as well... both guides report the same
                 * formula, and both are wrong.
                 * The old formula left in for AOS for legacy & because we aren't quite 100%
                 * Sure that AOS has THIS formula
                 */
                bonus += AosAttributes.GetValue(this, AosAttribute.WeaponSpeed);

                if (Spells.Chivalry.DivineFurySpell.UnderEffect(this))
                {
                    bonus += 10;
                }

                // Bonus granted by successful use of Honorable Execution.
                bonus += HonorableExecution.GetSwingBonus(this);

                if (DualWield.Registry.Contains(this))
                {
                    bonus += ((DualWield.DualWieldTimer)DualWield.Registry[this]).BonusSwingSpeed;
                }

                if (Feint.Registry.Contains(this))
                {
                    bonus -= ((Feint.FeintTimer)Feint.Registry[this]).SwingSpeedReduction;
                }

                TransformContext context = TransformationSpellHelper.GetContext(this);

                if (context != null && context.Spell is ReaperFormSpell reaperSpell)
                {
                    bonus += reaperSpell.SwingSpeedBonus;
                }

                int discordanceEffect = 0;

                // Discordance gives a malus of -0/-28% to swing speed.
                if (SkillHandlers.Discordance.GetEffect(this, ref discordanceEffect))
                {
                    bonus -= discordanceEffect;
                }

                if (EssenceOfWindSpell.IsDebuffed(this))
                {
                    bonus -= EssenceOfWindSpell.GetSSIMalus(this);
                }

                if (bonus > 60)
                {
                    bonus = 60;
                }
            }
            else if (Core.AOS)
            {
                bonus += AosAttributes.GetValue(this, AosAttribute.WeaponSpeed);

                if (Spells.Chivalry.DivineFurySpell.UnderEffect(this))
                {
                    bonus += 10;
                }

                int discordanceEffect = 0;

                // Discordance gives a malus of -0/-28% to swing speed.
                if (SkillHandlers.Discordance.GetEffect(this, ref discordanceEffect))
                {
                    bonus -= discordanceEffect;
                }
            }

            return(bonus);
        }