Exemplo n.º 1
0
        public virtual bool ConsumeReagents()
        {
            if (m_Scroll != null || !m_Caster.Player)
            {
                return(true);
            }

            if (AosAttributes.GetValue(m_Caster, AosAttribute.LowerRegCost) > Utility.Random(100))
            {
                return(true);
            }

            Container pack = m_Caster.Backpack;

            if (pack == null)
            {
                return(false);
            }

            if (pack.ConsumeTotal(m_Info.Reagents, m_Info.Amounts) == -1)
            {
                return(true);
            }

            if (GetType().BaseType == typeof(Spell))
            {
                if (ArcaneGem.ConsumeCharges(m_Caster, 1 + (int)Circle))
                {
                    return(true);
                }
            }

            return(false);
        }
Exemplo n.º 2
0
        public override bool ConsumeReagents()
        {
            var pm = Caster as PlayerMobile;

            if (pm != null)
            {
                var battle = AutoPvP.FindBattle(pm) as IUOFBattle;

                if (battle != null && battle.NoConsume)
                {
                    return(true);
                }
            }

            if (base.ConsumeReagents())
            {
                return(true);
            }

            if (ArcaneGem.ConsumeCharges(Caster, (Caster.EraSE ? 1 : 1 + (int)Circle)))
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 3
0
        public override bool ConsumeReagents()
        {
            if (base.ConsumeReagents())
            {
                return(true);
            }

            int count = 0;

            for (int i = 0; i < Caster.Items.Count; i++)
            {
                if (Caster.Items[i] is ILowerRegCost)
                {
                    count += ((ILowerRegCost)Caster.Items[i]).LowerRegCost;
                }
            }

            if (Utility.Random(100) > count)
            {
                return(true);
            }

            if (ArcaneGem.ConsumeCharges(Caster, (Core.SE ? 1 : 1 + (int)Circle)))
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 4
0
        public override bool ConsumeReagents()
        {
            if (base.ConsumeReagents())
            {
                return(true);
            }

            if (ArcaneGem.ConsumeCharges(Caster, (Core.SE ? 1 : 1 + (int)Circle)))
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 5
0
        public override bool ConsumeReagents()
        {
            if (base.ConsumeReagents())
            {
                return(true);
            }

            if (ArcaneGem.ConsumeCharges(this.Caster, 1))
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 6
0
        public override bool ConsumeReagents()
        {
            if (base.ConsumeReagents())
            {
                return(true);
            }

            if (ArcaneGem.ConsumeCharges(Caster, 1))
            {
                return(true);
            }

            if (Caster.AccessLevel != AccessLevel.Player)
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 7
0
        public virtual bool ConsumeReagents()
        {
            if (m_Scroll != null || !m_Caster.Player || Server.Custom.PvpToolkit.PvpCore.IsInDeathmatch(m_Caster))
            {
                return(true);
            }

            if (AosAttributes.GetValue(m_Caster, AosAttribute.LowerRegCost) > Utility.Random(100))
            {
                return(true);
            }

            Container pack = m_Caster.Backpack;

            if (pack == null)
            {
                return(false);
            }

            if (m_Caster.AccessLevel > AccessLevel.Player)
            {
                return(true);
            }

            if (pack.ConsumeTotal(m_Info.Reagents, m_Info.Amounts) == -1)
            {
                return(true);
            }

            if (GetType().BaseType == typeof(Spell))
            {
                if (ArcaneGem.ConsumeCharges(m_Caster, (Core.SE ? 1 : 1 + (int)Circle)))
                {
                    return(true);
                }
            }

            return(false);
        }
Exemplo n.º 8
0
 public override bool ConsumeReagents() =>
 base.ConsumeReagents() || ArcaneGem.ConsumeCharges(Caster, Core.SE ? 1 : 1 + (int)Circle);
Exemplo n.º 9
0
 public override bool ConsumeReagents() => base.ConsumeReagents() || ArcaneGem.ConsumeCharges(Caster, 1);