From 73a43ed06a17d57d7dc2e07396a73393cce5dcec Mon Sep 17 00:00:00 2001 From: xavier Date: Tue, 23 Aug 2011 15:41:49 +0000 Subject: [PATCH] --- .../Veteran Rewards/WeaponEngravingTool.cs | 6 ++--- Scripts/Items/Weapons/BaseWeapon.cs | 17 +++++++++++++- Scripts/Mobiles/AI/MageAI.cs | 23 ++++++++++++++++--- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs b/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs index f293ac71b..26b37aa4e 100644 --- a/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs +++ b/Scripts/Items/Special/Veteran Rewards/WeaponEngravingTool.cs @@ -258,10 +258,10 @@ namespace Server.Items } else { - if ( relay.Text.Length > 64 ) - m_Target.EngravedText = relay.Text.Substring( 0, 64 ); + if( relay.Text.Length > 64 ) + m_Target.EngravedText = Utility.FixHtml( relay.Text.Substring( 0, 64 ) ); else - m_Target.EngravedText = relay.Text; + m_Target.EngravedText = Utility.FixHtml( relay.Text ); state.Mobile.SendLocalizedMessage( 1072361 ); // You engraved the object. m_Target.InvalidateProperties(); diff --git a/Scripts/Items/Weapons/BaseWeapon.cs b/Scripts/Items/Weapons/BaseWeapon.cs index 83404e244..b60a4bc3f 100644 --- a/Scripts/Items/Weapons/BaseWeapon.cs +++ b/Scripts/Items/Weapons/BaseWeapon.cs @@ -3073,8 +3073,23 @@ namespace Server.Items else list.Add( Name ); + /* + * Want to move this to the engraving tool, let the non-harmful + * formatting show, and remove CLILOCs embedded: more like OSI + * did with the books that had markup, etc. + * + * This will have a negative effect on a few event things imgame + * as is. + * + * If we cant find a more OSI-ish way to clean it up, we can + * easily put this back, and use it in the deserialize + * method and engraving tool, to make it perm cleaned up. + */ + if ( !String.IsNullOrEmpty( m_EngravedText ) ) - list.Add( 1062613, Utility.FixHtml( m_EngravedText ) ); + list.Add( 1062613, m_EngravedText ); + + /* list.Add( 1062613, Utility.FixHtml( m_EngravedText ) ); */ } public override bool AllowEquipedCast( Mobile from ) diff --git a/Scripts/Mobiles/AI/MageAI.cs b/Scripts/Mobiles/AI/MageAI.cs index 648c8e918..6c8be3b4a 100644 --- a/Scripts/Mobiles/AI/MageAI.cs +++ b/Scripts/Mobiles/AI/MageAI.cs @@ -78,7 +78,7 @@ namespace Server.Mobiles base.DoActionWander(); - if ( !m_Mobile.Controlled ) + if ( (Utility.RandomDouble() < .05) ) { Spell spell = CheckCastHealingSpell(); @@ -297,7 +297,7 @@ namespace Server.Mobiles if ( spell != null ) return spell; - switch ( Utility.Random( 16 ) ) + switch ( Utility.Random( 13 ) ) { case 0: case 1: @@ -343,6 +343,18 @@ namespace Server.Mobiles break; } + case 9: + { + m_Mobile.DebugSay( "Attempting to Invis" ); + + if (spell == null ) + { + spell = new InvisibilitySpell( m_Mobile, null ); + } + + break; + } + default: // Damage them. { m_Mobile.DebugSay( "Just doing damage" ); @@ -861,11 +873,16 @@ namespace Server.Mobiles bool isDispel = ( targ is DispelSpell.InternalTarget ); bool isParalyze = ( targ is ParalyzeSpell.InternalTarget ); bool isTeleport = ( targ is TeleportSpell.InternalTarget ); + bool isInvisible = ( targ is InvisibilitySpell.InternalTarget ); bool teleportAway = false; Mobile toTarget; - if ( isDispel ) + if( isInvisible ) + { + toTarget = m_Mobile; + } + else if ( isDispel ) { toTarget = FindDispelTarget( false );