diff --git a/Scripts/Engines/AI/Creature/BaseCreature.cs b/Scripts/Engines/AI/Creature/BaseCreature.cs index 94f18b6cd..e4275dd74 100644 --- a/Scripts/Engines/AI/Creature/BaseCreature.cs +++ b/Scripts/Engines/AI/Creature/BaseCreature.cs @@ -529,6 +529,9 @@ namespace Server.Mobiles int poisDamage = BreathPoisonDamage; int nrgyDamage = BreathEnergyDamage; + if( Evasion.CheckSpellEvasion( target ) ) + return; + if ( physDamage == 0 && fireDamage == 0 && coldDamage == 0 && poisDamage == 0 && nrgyDamage == 0 ) { // Unresistable damage even in AOS target.Damage( BreathComputeDamage(), this ); diff --git a/Scripts/Engines/Craft/DefTailoring.cs b/Scripts/Engines/Craft/DefTailoring.cs index 51c425b50..a3b44f809 100644 --- a/Scripts/Engines/Craft/DefTailoring.cs +++ b/Scripts/Engines/Craft/DefTailoring.cs @@ -59,7 +59,7 @@ namespace Server.Engines.Craft public override bool RetainsColorFrom( CraftItem item, Type type ) { - if ( !type.IsSubclassOf( typeof( Cloth ) ) ) + if ( !( type == typeof( Cloth ) ) ) return false; type = item.ItemType; diff --git a/Scripts/Engines/Harvest/Mining.cs b/Scripts/Engines/Harvest/Mining.cs index d5ca4f26e..4e481e262 100644 --- a/Scripts/Engines/Harvest/Mining.cs +++ b/Scripts/Engines/Harvest/Mining.cs @@ -308,6 +308,7 @@ namespace Server.Engines.Harvest if ( map.CanSpawnMobile( x, y, from.Z ) ) { + spawned.OnBeforeSpawn( new Point3D( x, y, from.Z ), map ); spawned.MoveToWorld( new Point3D( x, y, from.Z ), map ); spawned.Combatant = from; return; @@ -318,6 +319,7 @@ namespace Server.Engines.Harvest if ( map.CanSpawnMobile( x, y, z ) ) { + spawned.OnBeforeSpawn( new Point3D( x, y, z ), map ); spawned.MoveToWorld( new Point3D( x, y, z ), map ); spawned.Combatant = from; return; @@ -325,6 +327,7 @@ namespace Server.Engines.Harvest } } + spawned.OnBeforeSpawn( from.Location, from.Map ); spawned.MoveToWorld( from.Location, from.Map ); spawned.Combatant = from; } diff --git a/Scripts/Engines/Plants/PlantBowl.cs b/Scripts/Engines/Plants/PlantBowl.cs index 28672f707..efab1cdf7 100644 --- a/Scripts/Engines/Plants/PlantBowl.cs +++ b/Scripts/Engines/Plants/PlantBowl.cs @@ -54,13 +54,15 @@ namespace Server.Engines.Plants if ( targeted is FertileDirt ) { + int _dirtNeeded = Core.ML ? 20 : 40; + FertileDirt dirt = (FertileDirt)targeted; if ( !dirt.IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1042664 ); // You must have the object in your backpack to use it. } - else if ( dirt.Amount < 40 ) + else if ( dirt.Amount < _dirtNeeded ) { from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061896 ); // You need more dirt to fill a plant bowl! } @@ -70,7 +72,7 @@ namespace Server.Engines.Plants if ( from.PlaceInBackpack( fullBowl ) ) { - dirt.Consume( 40 ); + dirt.Consume( _dirtNeeded ); m_PlantBowl.Delete(); from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061895 ); // You fill the bowl with fresh dirt. diff --git a/Scripts/Items/Misc/BankCheck.cs b/Scripts/Items/Misc/BankCheck.cs index e1f214755..fa88ea1f9 100644 --- a/Scripts/Items/Misc/BankCheck.cs +++ b/Scripts/Items/Misc/BankCheck.cs @@ -64,11 +64,11 @@ namespace Server.Items public override int LabelNumber{ get{ return 1041361; } } // A bank check - public override void GetProperties(ObjectPropertyList list) + public override void GetProperties( ObjectPropertyList list ) { base.GetProperties( list ); - list.Add( 1060738, m_Worth.ToString() ); // value: ~1_val~ + list.Add( 1060738, Core.ML ? m_Worth.ToString( "N0" ) : m_Worth.ToString() ); // value: ~1_val~ } public override void OnSingleClick( Mobile from ) diff --git a/Scripts/Items/Resources/Blacksmithing/Ore.cs b/Scripts/Items/Resources/Blacksmithing/Ore.cs index 5f5e60b80..f8c5648a4 100644 --- a/Scripts/Items/Resources/Blacksmithing/Ore.cs +++ b/Scripts/Items/Resources/Blacksmithing/Ore.cs @@ -154,6 +154,9 @@ namespace Server.Items private bool IsForge( object obj ) { + if ( Core.ML && obj is Mobile && ((Mobile)obj).IsDeadBondedPet ) + return false; + if ( obj.GetType().IsDefined( typeof( ForgeAttribute ), false ) ) return true; diff --git a/Scripts/Items/Skill Items/Magical/Scrolls/SpellweavingScrolls.cs b/Scripts/Items/Skill Items/Magical/Scrolls/SpellweavingScrolls.cs index 10cde2c50..70a8c90fb 100644 --- a/Scripts/Items/Skill Items/Magical/Scrolls/SpellweavingScrolls.cs +++ b/Scripts/Items/Skill Items/Magical/Scrolls/SpellweavingScrolls.cs @@ -252,7 +252,7 @@ namespace Server.Items [Constructable] public SummonFiendScroll( int amount ) - : base( 606, 0x2D57, amount ) + : base( 607, 0x2D58, amount ) { } diff --git a/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs b/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs index f08c4187e..21f1d46aa 100644 --- a/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs +++ b/Scripts/Items/Skill Items/Tools/BaseRunicTool.cs @@ -475,6 +475,8 @@ namespace Server.Items if ( !isShield && armor.MeditationAllowance == ArmorMeditationAllowance.All ) m_Props.Set( 3, true ); // remove mage armor from possible properties + if ( armor.Resource >= CraftResource.RegularLeather && armor.Resource <= CraftResource.BarbedLeather ) + m_Props.Set( 0, true ); // remove lower requirements from possible properties for leather armor for ( int i = 0; i < attributeCount; ++i ) { diff --git a/Scripts/Items/Special/MonsterStatuette.cs b/Scripts/Items/Special/MonsterStatuette.cs index e2db66502..6e0dbafc3 100644 --- a/Scripts/Items/Special/MonsterStatuette.cs +++ b/Scripts/Items/Special/MonsterStatuette.cs @@ -78,7 +78,7 @@ namespace Server.Items /* Gazer */ new MonsterStatuetteInfo( 1049768, 0x20F4, 377 ), /* FireElemental */ new MonsterStatuetteInfo( 1049769, 0x20F3, 838 ), /* Wolf */ new MonsterStatuetteInfo( 1049770, 0x2122, 229 ), - /* Phillip's Steed */ new MonsterStatuetteInfo( 1063488, 0x3FFE, 205 ), + /* Phillip's Steed */ new MonsterStatuetteInfo( 1063488, 0x3FFE, 168 ), /* Seahorse */ new MonsterStatuetteInfo( 1070819, 0x25BA, 138 ) }; diff --git a/Scripts/Items/Weapons/BaseWeapon.cs b/Scripts/Items/Weapons/BaseWeapon.cs index 60edd45cb..bae4de486 100644 --- a/Scripts/Items/Weapons/BaseWeapon.cs +++ b/Scripts/Items/Weapons/BaseWeapon.cs @@ -1056,11 +1056,13 @@ namespace Server.Items if ( shield != null ) { - double chance = (parry - bushidoNonRacial) / 400.0; //As per OSI, no negitive effect from the Racial stuffs, ie, 120 parry and '0' bushido with humans + double chance = (parry - bushidoNonRacial) / 400.0; // As per OSI, no negitive effect from the Racial stuffs, ie, 120 parry and '0' bushido with humans + if ( chance <= 0 ) // chance shouldn't go below 0 + chance = 0; - // Parry over 100 grants a 5% bonus. - if ( parry >= 100.0 ) + // Parry/Bushido over 100 grants a 5% bonus. + if ( parry >= 100.0 || bushido >= 100.0) chance += 0.05; // Evasion grants a variable bonus post ML. 50% prior. diff --git a/Scripts/Spells/Base/Spell.cs b/Scripts/Spells/Base/Spell.cs index a866eaf3e..f258f2eca 100644 --- a/Scripts/Spells/Base/Spell.cs +++ b/Scripts/Spells/Base/Spell.cs @@ -653,10 +653,10 @@ namespace Server.Spells // Faster casting cap of 0 (if using the protection spell) // Paladin spells are subject to a faster casting cap of 4 // Paladins with magery of 70.0 or above are subject to a faster casting cap of 2 - int fcMax = 2; + int fcMax = 4; - if ( CastSkill == SkillName.Chivalry && m_Caster.Skills[SkillName.Magery].Value < 70.0 ) - fcMax = 4; + if ( CastSkill == SkillName.Magery || CastSkill == SkillName.Necromancy || ( CastSkill == SkillName.Chivalry && m_Caster.Skills[SkillName.Magery].Value >= 70.0 ) ) + fcMax = 2; int fc = AosAttributes.GetValue( m_Caster, AosAttribute.CastSpeed ); diff --git a/Scripts/Spells/Bushido/Evasion.cs b/Scripts/Spells/Bushido/Evasion.cs index 65b1864a3..88327de96 100644 --- a/Scripts/Spells/Bushido/Evasion.cs +++ b/Scripts/Spells/Bushido/Evasion.cs @@ -3,6 +3,7 @@ using System.Collections; using Server.Network; using Server.Items; using Server.Mobiles; +using Server.Spells; using Server.Targeting; namespace Server.Spells.Bushido @@ -30,20 +31,15 @@ namespace Server.Spells.Bushido public static bool VerifyCast( Mobile Caster, bool messages ) { - if( Caster == null ) //sanity + if( Caster == null ) // Sanity return false; - if( Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null ) - return true; - - //Intentional having a Shield check override all. - BaseWeapon weap = Caster.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon; if( weap == null ) weap = Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon; - if( weap != null ) + if( weap != null || Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null ) { if( Core.ML && Caster.Skills[weap.Skill].Base < 50 ) { @@ -71,9 +67,18 @@ namespace Server.Spells.Bushido public static bool CheckSpellEvasion( Mobile defender ) { - if( IsEvading( defender ) && VerifyCast( defender, false ) && BaseWeapon.CheckParry( defender ) ) //As per OSI, uses the exact same parry code + BaseWeapon weap = defender.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon; + + if ( weap == null ) + weap = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon; + + if ( Core.ML && defender.Spell != null && defender.Spell.IsCasting ) { - defender.Emote( "*evades*" ); //Yes. Eew. Blame OSI. + return false; + } + else if ( IsEvading( defender ) && BaseWeapon.CheckParry( defender ) && ( !Core.ML || defender.Skills[weap.Skill].Base > 50 ) && ( weap != null || defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null ) ) + { + defender.Emote( "*evades*" ); // Yes. Eew. Blame OSI. defender.FixedEffect( 0x37B9, 10, 16 ); return true; } @@ -158,15 +163,15 @@ namespace Server.Spells.Bushido if( !Core.ML ) return 1.5; - double bonus = 80; + double bonus = 0; - if( m.Skills.Bushido.Value > 60 ) - bonus += m.Skills.Bushido.Value; + if( m.Skills.Bushido.Value >= 60 ) + bonus += ( ( m.Skills.Bushido.Value - 60 * .004 ) + 0.16 ); - if( m.Skills.Anatomy.Value >= 100 && m.Skills.Tactics.Value >= 100 && m.Skills.Bushido.Value > 100 ) //Bushido being HIGHER than 100 for bonus is intended - bonus += 50; + if( m.Skills.Anatomy.Value >= 100 && m.Skills.Tactics.Value >= 100 && m.Skills.Bushido.Value > 100 ) //Bushido being HIGHER than 100 for bonus is intended + bonus += 0.10; - return 1.0 + bonus/500; + return 1.0 + bonus; } public static void BeginEvasion( Mobile m ) diff --git a/Scripts/Spells/Necromancy/Wither.cs b/Scripts/Spells/Necromancy/Wither.cs index a57677a5a..83f5ea0d4 100644 --- a/Scripts/Spells/Necromancy/Wither.cs +++ b/Scripts/Spells/Necromancy/Wither.cs @@ -62,6 +62,15 @@ namespace Server.Spells.Necromancy damage *= (300 + (m.Karma / 100) + (GetDamageSkill( Caster ) * 10)); damage /= 1000; + int sdiBonus = AosAttributes.GetValue( Caster, AosAttribute.SpellDamage ); + + // PvP spell damage increase cap of 15% from an item’s magic property in Publish 33(SE) + if ( Core.SE && m.Player && Caster.Player && sdiBonus > 15 ) + sdiBonus = 15; + + damage *= ( 100 + sdiBonus ); + damage /= 100; + // TODO: cap? //if ( damage > 40 ) // damage = 40; diff --git a/Scripts/Spells/Seventh/GateTravel.cs b/Scripts/Spells/Seventh/GateTravel.cs index 8746e8a20..e310a6edd 100644 --- a/Scripts/Spells/Seventh/GateTravel.cs +++ b/Scripts/Spells/Seventh/GateTravel.cs @@ -62,6 +62,24 @@ namespace Server.Spells.Seventh return SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ); } + private bool GateExistsAt(Map map, Point3D loc ) + { + bool _gateFound = false; + + IPooledEnumerable eable = map.GetItemsInRange( loc, 0 ); + foreach ( Item item in eable ) + { + if ( item is Moongate || item is PublicMoongate ) + { + _gateFound = true; + break; + } + } + eable.Free(); + + return _gateFound; + } + public void Effect( Point3D loc, Map map, bool checkMulti ) { if ( Factions.Sigil.ExistsOn( Caster ) ) @@ -102,6 +120,10 @@ namespace Server.Spells.Seventh { Caster.SendLocalizedMessage( 501942 ); // That location is blocked. } + else if ( Core.SE && ( GateExistsAt( map, loc ) || GateExistsAt( Caster.Map, Caster.Location ) ) ) // SE restricted stacking gates + { + Caster.SendLocalizedMessage( 1071242 ); // There is already a gate there. + } else if ( CheckSequence() ) { Caster.SendLocalizedMessage( 501024 ); // You open a magical gate to another location diff --git a/Scripts/Spells/Spellweaving/EssenceOfWind.cs b/Scripts/Spells/Spellweaving/EssenceOfWind.cs index 64f4640d6..7667c41e2 100644 --- a/Scripts/Spells/Spellweaving/EssenceOfWind.cs +++ b/Scripts/Spells/Spellweaving/EssenceOfWind.cs @@ -33,8 +33,8 @@ namespace Server.Spells.Spellweaving TimeSpan duration = TimeSpan.FromSeconds( (int)(skill / 24) + FocusLevel ); - int fcMalus = 2 * (FocusLevel + 1); - int ssiMalus = FocusLevel + 1; + int fcMalus = FocusLevel + 1; + int ssiMalus = 2 * (FocusLevel + 1); List targets = new List();