Beispiel #1
0
        public bool CheckForAttuneWeapon()
        {
            if (!AttuneWeaponSpell.IsAbsorbing(this.m_Mobile) && this.m_Mobile.Mana > 24)
            {
                if (this.m_Mobile.Debug)
                {
                    this.m_Mobile.Say(1436, "Casting Attune Weapon");
                }

                new AttuneWeaponSpell(this.m_Mobile, null).Cast();
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        public void SpellweavingPower()
        {
            CheckFocus();

            // Always attune if needed
            if (!AttuneWeaponSpell.IsAbsorbing(m_Mobile) && m_Mobile.Mana > 24)
            {
                if (m_Mobile.Debug)
                {
                    m_Mobile.Say(1436, "Casting Attune Weapon");
                }

                new AttuneWeaponSpell(m_Mobile, null).Cast();
            }

            if (m_Mobile.Combatant == null)
            {
                return;
            }

            // 10% chance to try and get help
            if (Utility.RandomDouble() > 0.89)
            {
                if (m_Mobile.Followers < m_Mobile.FollowersMax)
                {
                    Spell spell = GetSpellweavingSummon();

                    if (spell != null)
                    {
                        if (m_Mobile.Debug)
                        {
                            m_Mobile.Say(1436, "Summoning help");
                        }

                        spell.Cast();
                    }

                    if (m_Mobile.Target != null)
                    {
                        if (m_Mobile.Debug)
                        {
                            m_Mobile.Say(1436, "Invoking Nature's Fury's target");
                        }

                        m_Mobile.Target.Invoke(m_Mobile, m_Mobile.Combatant);
                    }

                    return;
                }
                else if (m_Mobile.Combatant is BaseCreature)
                {
                    if (m_Mobile.Debug)
                    {
                        m_Mobile.Say(1436, "Casting Dryad Allure");
                    }

                    new DryadAllureSpell(m_Mobile, null).Cast();
                }
            }

            RandomSpellweavingChoice();
            return;
        }