/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\commands\aosprops.cs
Lines of code: 70
***********************************************************/


using System;
using System.Reflection;
using Server.Items;
using Server.Targeting;
using Server.Mobiles;
using Server.Gumps;

namespace Server.Commands
{
	public class aosprops
	{
		public static void Initialize()
		{
			CommandSystem.Register( "aosprops", AccessLevel.Player, new CommandEventHandler( aosprops_OnCommand ) );
		}

		[Usage( "aosprops" )]
		[Description( "Shows Aos properties such as HCI, FC, FCR. etc" )]
		private static void aosprops_OnCommand( CommandEventArgs e )
		{		
		PlayerMobile pm = e.Mobile as PlayerMobile;
		
		
		pm.CloseGump(typeof(AoSpropsGump));
		pm.SendGump(new AoSpropsGump(pm));		
		}
		

		
	}
}



namespace Server.Gumps
{
	public class AoSpropsGump : Gump
	{
		public AoSpropsGump(Mobile pm): base( 0, 0 )
		{
		
		//get props
		string props="";		
		
		props += String.Format("Damage increase: <b>{0}%</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.WeaponDamage ));		
		props += String.Format("Hit chance increase: <b>{0}%</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.AttackChance ));
		props += String.Format("Defense chance increase: <b>{0}%</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.DefendChance ));
		props += String.Format("Lower ammo cost: <b>{0}%</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.LowerAmmoCost ));
		props += String.Format("Reflect physical: <b>{0}%</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.ReflectPhysical ));
		props += String.Format("Swing speed increase: <b>{0}%</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.WeaponSpeed ));
		
	
		props += String.Format("Hit regen: <b>{0}</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.RegenHits ));
		props += String.Format("Mana regen: <b>{0}</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.RegenMana ));
		props += String.Format("Stamina regen: <b>{0}</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.RegenStam ));
		

		props += String.Format("Spell damage increase: <b>{0}%</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.SpellDamage ));
		props += String.Format("FC/FCR: <b>{0}/{1}</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.CastSpeed ),AosAttributes.GetValue( pm, AosAttribute.CastRecovery ));
		props += String.Format("Lower reg cost: <b>{0}%</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.LowerRegCost ));
		props += String.Format("Lower mana cost: <b>{0}%</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.LowerManaCost ));
		props += String.Format("Enhance potions: <b>{0}%</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.EnhancePotions ));
		

		props += String.Format("\r\nResists (phys/fire/cold/pois/energy): <b>{0} {1} {2} {3} {4} </b>\r\n\r\n",pm.PhysicalResistance,pm.FireResistance,pm.ColdResistance,pm.PoisonResistance,pm.EnergyResistance);		

		
		props += String.Format("Item Str: <b>{0}</b>  Raw str: <b>{1}</b>  Total Str: <b>{2}</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.BonusStr ),pm.RawStr,pm.Str);		
		props += String.Format("Item Dex: <b>{0}</b>  Raw dex: <b>{1}</b>  Total Dex: <b>{2}</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.BonusDex ),pm.RawDex,pm.Dex);		
		props += String.Format("Item Int: <b>{0}</b>  Raw int: <b>{1}</b>  Total Int: <b>{2}</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.BonusInt ),pm.RawInt,pm.Int);				
		props += String.Format("Item hits: <b>{0}</b>  Total hits: <b>{1}</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.BonusHits ),pm.HitsMax);		
		props += String.Format("Item stam: <b>{0}</b>  Total stam: <b>{1}</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.BonusStam ),pm.StamMax);		
		props += String.Format("Item mana: <b>{0}</b>  Total mana: <b>{1}</b>\r\n",AosAttributes.GetValue( pm, AosAttribute.BonusMana ),pm.ManaMax);			
		props += String.Format("Luck: <b>{0}</b></b>\r\n",AosAttributes.GetValue( pm, AosAttribute.Luck ));			
				
		
	
		
			this.Closable=true;
			this.Disposable=true;
			this.Dragable=true;
			this.Resizable=false;
			this.AddPage(0);
			this.AddBackground(55, 15, 444, 503, 9200);
			this.AddImage(6, 20, 10440);
			this.AddHtml( 82, 46, 392, 438, props, (bool)true, (bool)true);
			this.AddButton(250, 492, 247, 248, (int)Buttons.Button1, GumpButtonType.Reply, 0);
			this.AddLabel(95, 21, 0, String.Format("{0}",pm.Name));
		}
		
		public enum Buttons
		{
			Button1,
		}
	}
}
