ModernUO/Scripts/Spells/Ninjitsu/FocusAttack.cs
asayre 2ad37d54aa Lots of fixes, changes, rewrites of various things, including but not limited to:
Logging of staff crafting items,
Fixes for the OSI client changes
The potion stacking stuff
BaseWeapon fix, so that damage increase things don't multiply themselves.
admin gump fixes for Firewall
Various display tweaks for weight
SoS no longer spawn in Tokuno
Hiryu hues happified to OSI standards
staff now see alliance chat correctly
Play barkeeper text increased per OSI
Various other OSI skill requirement changes
Various unimplemented features of the SE moves
EventSink for when the client version is received from client.
Client validation moved out of the core.
Client version validation now has options to ignore/kick/warn/annoy.  Automagically tries to detect current client.
Reverted the delayeddamagecontext back to OSI standards.
Can no longer use bags of sending in jail.

MagerySpell implemented. Now only Magery spells have a circle, and various other properties of 'em.
TransformationSpellHelper now implemented.  Things moved around for this.
Spells now need a Timespan for the cast delay, instead of arbitrarily based on Circle.  Circle doesn't make sense for non-Magery spells!
Alot of the spellweaving spells added to OSI standards.
2007-05-26 03:12:41 +00:00

74 lines
2.2 KiB
C#

using System;
using System.Collections;
using Server.Network;
using Server.Items;
using Server.Mobiles;
using Server.Targeting;
namespace Server.Spells.Ninjitsu
{
public class FocusAttack : NinjaMove
{
public FocusAttack()
{
}
public override int BaseMana{ get{ return Core.ML ? 10 : 20; } }
public override double RequiredSkill{ get{ return Core.ML? 30.0 : 60 ; } }
public override TextDefinition AbilityMessage{ get{ return new TextDefinition( 1063095 ); } } // You prepare to focus all of your abilities into your next strike.
public override bool Validate( Mobile from )
{
if ( from.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null )
{
from.SendLocalizedMessage( 1063096 ); // You cannot use this ability while holding a shield.
return false;
}
Item handOne = from.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;
if ( handOne != null && !(handOne is BaseRanged) )
return base.Validate( from );
Item handTwo = from.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon;
if ( handTwo != null && !(handTwo is BaseRanged) )
return base.Validate( from );
from.SendLocalizedMessage( 1063097 ); // You must be wielding a melee weapon without a shield to use this ability.
return false;
}
public override double GetDamageScalar( Mobile attacker, Mobile defender )
{
double ninjitsu = attacker.Skills[SkillName.Ninjitsu].Value;
return 1.0 + (ninjitsu * ninjitsu) / 43636;
}
public override double GetPropertyBonus( Mobile attacker )
{
double ninjitsu = attacker.Skills[SkillName.Ninjitsu].Value;
double bonus = (ninjitsu * ninjitsu) / 43636;
return 1.0 + (bonus * 3 + 0.01);
}
public override bool OnBeforeDamage( Mobile attacker, Mobile defender )
{
return Validate( attacker ) && CheckMana( attacker, true );
}
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
ClearCurrentMove( attacker );
attacker.SendLocalizedMessage( 1063098 ); // You focus all of your abilities and strike with deadly force!
attacker.PlaySound( 0x510 );
CheckGain( attacker );
}
}
}