Ejemplo n.º 1
0
        protected override void OnTarget(Mobile from, object target)           // Override the protected OnTarget() for our feature
        {
            if (m_Deed.Deleted || m_Deed.RootParent != from)
            {
                return;
            }

            if (target is BaseWeapon && m_Deed.AllowWeps)
            {
                BaseWeapon item = (BaseWeapon)target;
                if (item.LootType == LootType.Cursed)
                {
                    from.SendMessage("You cannot enhance that item further.");
                    return;
                }
                if (IncreaseWeaponAttribute(item))
                {
                    from.SendMessage(String.Format("You increase the items {0}... at a cost.", m_Deed.AosAttribute));
                    item.LootType = LootType.Cursed;
                    m_Deed.Delete(); // Delete the deed
                }
                else
                {
                    from.SendMessage(String.Format("{0} cannot be applied to that item with this deed.", m_Deed.AosAttribute));
                    return;
                }
            }
            else if (target is ElvenGlasses && m_Deed.AllowGlasses)
            {
                ElvenGlasses item = (ElvenGlasses)target;
                if (item.LootType == LootType.Cursed)
                {
                    from.SendMessage("You cannot enhance that item further.");
                    return;
                }
                if (IncreaseGlassesAttribute(item))
                {
                    from.SendMessage(String.Format("You increase the items {0}... at a cost.", m_Deed.AosAttribute));
                    item.LootType = LootType.Cursed;
                    m_Deed.Delete(); // Delete the deed
                }
                else
                {
                    from.SendMessage(String.Format("{0} cannot be applied to that item with this deed.", m_Deed.AosAttribute));
                    return;
                }
            }

            else
            {
                from.SendMessage(String.Format("You cannot add {0} to this item with this deed", m_Deed.AosAttribute));
            }
        }
Ejemplo n.º 2
0
        public bool IncreaseGlassesAttribute(ElvenGlasses item)
        {
            switch (m_Deed.AosAttribute)
            {
            case "AttackChance":
                item.Attributes.AttackChance += m_Deed.Level;
                break;

            case "BonusDex":
                item.Attributes.BonusDex += m_Deed.Level;
                break;

            case "BonusHits":
                item.Attributes.BonusHits += m_Deed.Level;
                break;

            case "BonusInt":
                item.Attributes.BonusHits += m_Deed.Level;
                break;

            case "BonusMana":
                item.Attributes.BonusMana += m_Deed.Level;
                break;

            case "BonusStam":
                item.Attributes.BonusStam += m_Deed.Level;
                break;

            case "BonusStr":
                item.Attributes.BonusStr += m_Deed.Level;
                break;

            case "CastRecovery":
                item.Attributes.CastRecovery += m_Deed.Level;
                break;

            case "CastSpeed":
                item.Attributes.CastSpeed += m_Deed.Level;
                break;

            case "DefendChance":
                item.Attributes.DefendChance += m_Deed.Level;
                break;

            case "EnhancePotions":
                item.Attributes.EnhancePotions += m_Deed.Level;
                break;

            case "IncreasedKarmaLoss":
                item.Attributes.IncreasedKarmaLoss += m_Deed.Level;
                break;

            case "LowerManaCost":
                item.Attributes.LowerManaCost += m_Deed.Level;
                break;

            case "LowerRegCost":
                item.Attributes.LowerRegCost += m_Deed.Level;
                break;

            case "Luck":
                item.Attributes.Luck += m_Deed.Level;
                break;

            case "NightSight":
                item.Attributes.NightSight += m_Deed.Level;
                break;

            case "ReflectPhysical":
                item.Attributes.ReflectPhysical += m_Deed.Level;
                break;

            case "RegenHits":
                item.Attributes.RegenHits += m_Deed.Level;
                break;

            case "RegenMana":
                item.Attributes.RegenMana += m_Deed.Level;
                break;

            case "SpellChanneling":
                item.Attributes.SpellChanneling += m_Deed.Level;
                break;

            case "SpellDamage":
                item.Attributes.SpellDamage += m_Deed.Level;
                break;

            case "WeaponDamage":
                item.Attributes.WeaponDamage += m_Deed.Level;
                break;

            case "WeaponSpeed":
                item.Attributes.WeaponSpeed += m_Deed.Level;
                break;

            case "DurabilityBonus":
                item.WeaponAttributes.DurabilityBonus += m_Deed.Level;
                break;

            case "HitColdArea":
                item.WeaponAttributes.HitColdArea += m_Deed.Level;
                break;

            case "HitDispel":
                item.WeaponAttributes.HitDispel += m_Deed.Level;
                break;

            case "HitEnergyArea":
                item.WeaponAttributes.HitEnergyArea += m_Deed.Level;
                break;

            case "HitFireArea":
                item.WeaponAttributes.HitFireArea += m_Deed.Level;
                break;

            case "HitFireball":
                item.WeaponAttributes.HitFireball += m_Deed.Level;
                break;

            case "HitHarm":
                item.WeaponAttributes.HitHarm += m_Deed.Level;
                break;

            case "HitLeechHits":
                item.WeaponAttributes.HitLeechHits += m_Deed.Level;
                break;

            case "HitLeechMana":
                item.WeaponAttributes.HitLeechMana += m_Deed.Level;
                break;

            case "HitLeechStam":
                item.WeaponAttributes.HitLeechStam += m_Deed.Level;
                break;

            case "HitLightning":
                item.WeaponAttributes.HitLightning += m_Deed.Level;
                break;

            case "HitLowerAttack":
                item.WeaponAttributes.HitLowerAttack += m_Deed.Level;
                break;

            case "HitLowerDefend":
                item.WeaponAttributes.HitLowerDefend += m_Deed.Level;
                break;

            case "HitMagicArrow":
                item.WeaponAttributes.HitMagicArrow += m_Deed.Level;
                break;

            case "HitPhysicalArea":
                item.WeaponAttributes.HitPhysicalArea += m_Deed.Level;
                break;

            case "HitPoisonArea":
                item.WeaponAttributes.HitPoisonArea += m_Deed.Level;
                break;

            case "LowerStatReq":
                item.WeaponAttributes.LowerStatReq += m_Deed.Level;
                break;

            case "MageWeapon":
                item.WeaponAttributes.MageWeapon += m_Deed.Level;
                break;

            case "ResistColdBonus":
                item.WeaponAttributes.ResistColdBonus += m_Deed.Level;
                break;

            case "ResistEnergyBonus":
                item.WeaponAttributes.ResistEnergyBonus += m_Deed.Level;
                break;

            case "ResistFireBonus":
                item.WeaponAttributes.ResistFireBonus += m_Deed.Level;
                break;

            case "ResistPhysicalBonus":
                item.WeaponAttributes.ResistPhysicalBonus += m_Deed.Level;
                break;

            case "ResistPoisonBonus":
                item.WeaponAttributes.ResistPoisonBonus += m_Deed.Level;
                break;

            case "SelfRepair":
                item.WeaponAttributes.SelfRepair += m_Deed.Level;
                break;

            case "UseBestSkill":
                item.WeaponAttributes.UseBestSkill += m_Deed.Level;
                break;

            case "MaxHitPoints":
                item.MaxHitPoints += m_Deed.Level;
                break;

            default:
                return(false);
            }
            return(true);
        }
Ejemplo n.º 3
0
        public bool IncreaseGlassesAttribute(ElvenGlasses item)
        {
            switch (m_Deed.AosAttribute)
            {
            case "DurabilityBonus":
                item.WeaponAttributes.DurabilityBonus += m_Deed.Level;
                break;

            case "HitColdArea":
                item.WeaponAttributes.HitColdArea += m_Deed.Level;
                break;

            case "HitDispel":
                item.WeaponAttributes.HitDispel += m_Deed.Level;
                break;

            case "HitEnergyArea":
                item.WeaponAttributes.HitEnergyArea += m_Deed.Level;
                break;

            case "HitFireArea":
                item.WeaponAttributes.HitFireArea += m_Deed.Level;
                break;

            case "HitFireball":
                item.WeaponAttributes.HitFireball += m_Deed.Level;
                break;

            case "HitHarm":
                item.WeaponAttributes.HitHarm += m_Deed.Level;
                break;

            case "HitLeechHits":
                item.WeaponAttributes.HitLeechHits += m_Deed.Level;
                break;

            case "HitLeechMana":
                item.WeaponAttributes.HitLeechMana += m_Deed.Level;
                break;

            case "HitLeechStam":
                item.WeaponAttributes.HitLeechStam += m_Deed.Level;
                break;

            case "HitLightning":
                item.WeaponAttributes.HitLightning += m_Deed.Level;
                break;

            case "HitLowerAttack":
                item.WeaponAttributes.HitLowerAttack += m_Deed.Level;
                break;

            case "HitLowerDefend":
                item.WeaponAttributes.HitLowerDefend += m_Deed.Level;
                break;

            case "HitMagicArrow":
                item.WeaponAttributes.HitMagicArrow += m_Deed.Level;
                break;

            case "HitPhysicalArea":
                item.WeaponAttributes.HitPhysicalArea += m_Deed.Level;
                break;

            case "HitPoisonArea":
                item.WeaponAttributes.HitPoisonArea += m_Deed.Level;
                break;

            case "LowerStatReq":
                item.WeaponAttributes.LowerStatReq += m_Deed.Level;
                break;

            case "MageWeapon":
                item.WeaponAttributes.MageWeapon += m_Deed.Level;
                break;

            case "ResistColdBonus":
                item.WeaponAttributes.ResistColdBonus += m_Deed.Level;
                break;

            case "ResistEnergyBonus":
                item.WeaponAttributes.ResistEnergyBonus += m_Deed.Level;
                break;

            case "ResistFireBonus":
                item.WeaponAttributes.ResistFireBonus += m_Deed.Level;
                break;

            case "ResistPhysicalBonus":
                item.WeaponAttributes.ResistPhysicalBonus += m_Deed.Level;
                break;

            case "ResistPoisonBonus":
                item.WeaponAttributes.ResistPoisonBonus += m_Deed.Level;
                break;

            case "SelfRepair":
                item.WeaponAttributes.SelfRepair += m_Deed.Level;
                break;

            case "UseBestSkill":
                item.WeaponAttributes.UseBestSkill += m_Deed.Level;
                break;

            case "MaxHitPoints":
                item.MaxHitPoints += m_Deed.Level;
                break;

            default:
                return(false);
            }
            return(true);
        }